Struct no_std_compat::os::unix::net::SocketCred
source · pub struct SocketCred(/* private fields */);
🔬This is a nightly-only experimental API. (
unix_socket_ancillary_data
)Available on Unix only.
Expand description
Unix credential.
Implementations§
source§impl SocketCred
impl SocketCred
sourcepub fn new() -> SocketCred
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
)Available on Android or Linux only.
pub fn new() -> SocketCred
unix_socket_ancillary_data
)Create a Unix credential struct.
PID, UID and GID is set to 0.
sourcepub fn set_pid(&mut self, pid: i32)
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
)Available on Android or Linux only.
pub fn set_pid(&mut self, pid: i32)
unix_socket_ancillary_data
)Set the PID.
sourcepub fn get_pid(&self) -> i32
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
)Available on Android or Linux only.
pub fn get_pid(&self) -> i32
unix_socket_ancillary_data
)Get the current PID.
sourcepub fn set_uid(&mut self, uid: u32)
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
)Available on Android or Linux only.
pub fn set_uid(&mut self, uid: u32)
unix_socket_ancillary_data
)Set the UID.
sourcepub fn get_uid(&self) -> u32
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
)Available on Android or Linux only.
pub fn get_uid(&self) -> u32
unix_socket_ancillary_data
)Get the current UID.
Trait Implementations§
source§impl Clone for SocketCred
impl Clone for SocketCred
source§fn clone(&self) -> SocketCred
fn clone(&self) -> SocketCred
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SocketCred
impl RefUnwindSafe for SocketCred
impl Send for SocketCred
impl Sync for SocketCred
impl Unpin for SocketCred
impl UnwindSafe for SocketCred
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)