Struct std::os::unix::net::SocketCred
pub struct SocketCred(_);
Unix credential.
Implementations
impl SocketCred
pub fn new() -> SocketCred
Create a Unix credential struct.
PID, UID and GID is set to 0.
pub fn set_pid(&mut self, pid: pid_t)
Set the PID.
pub fn get_pid(&self) -> pid_t
Get the current PID.
pub fn set_uid(&mut self, uid: uid_t)
Set the UID.
pub fn get_uid(&self) -> uid_t
Get the current UID.
pub fn set_gid(&mut self, gid: gid_t)
Set the GID.
pub fn get_gid(&self) -> gid_t
Get the current GID.
Trait Implementations
impl Clone for SocketCred
Auto Trait Implementations
impl RefUnwindSafe for SocketCred
impl Send for SocketCred
impl Sync for SocketCred
impl Unpin for SocketCred
impl UnwindSafe for SocketCred
Blanket Implementations
impl<T> From<T> for T
pub fn from(t: T) -> T
Performs the conversion.
pub fn into(self) -> U
Performs the conversion.
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
#41263)recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
Performs the conversion.
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
Performs the conversion.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/os/unix/net/struct.SocketCred.html