Struct SocketCred

pub struct SocketCred(pub(in ::os::unix::net::ancillary) ucred);

Unix credential.

Fields

0: ucred

Implementations

impl SocketCred

fn new() -> SocketCred

Creates a Unix credential struct.

PID, UID and GID is set to 0.

fn set_pid(&mut self, pid: pid_t)

Set the PID.

fn get_pid(&self) -> pid_t

Gets the current PID.

fn set_uid(&mut self, uid: uid_t)

Set the UID.

fn get_uid(&self) -> uid_t

Gets the current UID.

fn set_gid(&mut self, gid: gid_t)

Set the GID.

fn get_gid(&self) -> gid_t

Gets the current GID.

Trait Implementations

impl Clone for SocketCred

fn clone(&self) -> SocketCred

Auto Trait Implementations

impl Freeze for SocketCred

impl RefUnwindSafe for SocketCred

impl Send for SocketCred

impl Sync for SocketCred

impl Unpin for SocketCred

impl UnsafeUnpin for SocketCred

impl UnwindSafe for SocketCred

Blanket Implementations

impl<T> Any for SocketCred where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for SocketCred where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for SocketCred where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for SocketCred where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for SocketCred

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for SocketCred where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for SocketCred

impl<T> ToOwned for SocketCred where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for SocketCred where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for SocketCred where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for SocketCred where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>