Struct std::os::unix::net::SocketCred [−][src]
pub struct SocketCred(_);
This is supported on Unix only.
Expand description
Unix credential.
Implementations
impl SocketCred[src]
impl SocketCred[src]pub fn new() -> SocketCred[src]
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
pub fn new() -> SocketCred[src]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.
pub fn set_pid(&mut self, pid: pid_t)[src]
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)[src]This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Set the PID.
pub fn get_pid(&self) -> pid_t[src]
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[src]This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Get the current PID.
pub fn set_uid(&mut self, uid: uid_t)[src]
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)[src]This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
Set the UID.
pub fn get_uid(&self) -> uid_t[src]
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[src]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
impl Clone for SocketCred[src]
impl Clone for SocketCred[src]This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.
fn clone(&self) -> SocketCred[src]
fn clone(&self) -> SocketCred[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into #41263)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more