pub struct SocketCred(_);Available on Unix only.
Expand description
Unix credential.
Implementations
impl SocketCred
source
impl SocketCred
sourcepub fn new() -> SocketCred
source Available on (Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD) and (Android or Linux) only.
pub fn new() -> SocketCred
sourceCreate a Unix credential struct.
PID, UID and GID is set to 0.
pub fn set_pid(&mut self, pid: pid_t)
source Available on (Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD) and (Android or Linux) only.
pub fn set_pid(&mut self, pid: pid_t)
sourceSet the PID.
pub fn get_pid(&self) -> pid_t
source Available on (Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD) and (Android or Linux) only.
pub fn get_pid(&self) -> pid_t
sourceGet the current PID.
pub fn set_uid(&mut self, uid: uid_t)
source Available on (Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD) and (Android or Linux) only.
pub fn set_uid(&mut self, uid: uid_t)
sourceSet the UID.
pub fn get_uid(&self) -> uid_t
source Available on (Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD) and (Android or Linux) only.
pub fn get_uid(&self) -> uid_t
sourceGet the current UID.
Trait Implementations
impl Clone for SocketCred
source Available on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
impl Clone for SocketCred
sourcefn clone(&self) -> SocketCred
source
fn clone(&self) -> SocketCred
sourceReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0 · source
fn clone_from(&mut self, source: &Self)
1.0.0 · sourcePerforms 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
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more