pub struct SocketCred(_);
🔬This is a nightly-only experimental API. (
unix_socket_ancillary_data
#76915)Available on (Android or Linux) and Unix only.
Expand description
Unix credential.
Implementations
sourceimpl SocketCred
impl SocketCred
sourcepub fn new() -> SocketCred
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
#76915)
pub fn new() -> SocketCred
unix_socket_ancillary_data
#76915)Create a Unix credential struct.
PID, UID and GID is set to 0.
sourcepub fn set_pid(&mut self, pid: pid_t)
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
#76915)
pub fn set_pid(&mut self, pid: pid_t)
unix_socket_ancillary_data
#76915)Set the PID.
sourcepub fn get_pid(&self) -> pid_t
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
#76915)
pub fn get_pid(&self) -> pid_t
unix_socket_ancillary_data
#76915)Get the current PID.
sourcepub fn set_uid(&mut self, uid: uid_t)
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
#76915)
pub fn set_uid(&mut self, uid: uid_t)
unix_socket_ancillary_data
#76915)Set the UID.
sourcepub fn get_uid(&self) -> uid_t
🔬This is a nightly-only experimental API. (unix_socket_ancillary_data
#76915)
pub fn get_uid(&self) -> uid_t
unix_socket_ancillary_data
#76915)Get the current UID.
Trait Implementations
sourceimpl Clone for SocketCred
impl Clone for SocketCred
sourcefn clone(&self) -> SocketCred
fn clone(&self) -> SocketCred
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for SocketCred
impl Send for SocketCred
impl Sync for SocketCred
impl Unpin for SocketCred
impl UnwindSafe for SocketCred
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more