pub struct SocketCred(_);
This is supported on Unix only.
Expand description
Unix credential.
Implementations
sourceimpl SocketCred
impl SocketCred
sourcepub fn new() -> SocketCred
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
pub fn new() -> SocketCred
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Create a Unix credential struct.
PID, UID and GID is set to 0.
sourcepub fn set_pid(&mut self, pid: pid_t)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
pub fn set_pid(&mut self, pid: pid_t)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Set the PID.
sourcepub fn get_pid(&self) -> pid_t
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
pub fn get_pid(&self) -> pid_t
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Get the current PID.
sourcepub fn set_uid(&mut self, uid: uid_t)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
pub fn set_uid(&mut self, uid: uid_t)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Set the UID.
sourcepub fn get_uid(&self) -> uid_t
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
pub fn get_uid(&self) -> uid_t
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Get the current UID.
Trait Implementations
sourceimpl Clone for SocketCred
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
impl Clone for SocketCred
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
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 more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more