Struct UCred

pub struct UCred { pub uid: uid_t, pub gid: gid_t, pub pid: Option<pid_t> }

Credentials for a UNIX process for credentials passing.

Fields

uid: uid_t

The UID part of the peer credential. This is the effective UID of the process at the domain socket's endpoint.

gid: gid_t

The GID part of the peer credential. This is the effective GID of the process at the domain socket's endpoint.

pid: Option<pid_t>

The PID part of the peer credential. This field is optional because the PID part of the peer credentials is not supported on every platform. On platforms where the mechanism to discover the PID exists, this field will be populated to the PID of the process at the domain socket's endpoint. Otherwise, it will be set to None.

Trait Implementations

impl Clone for UCred

fn clone(&self) -> UCred

impl Copy for UCred

impl Debug for UCred

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for UCred

fn assert_fields_are_eq(&self)

impl Hash for UCred

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for UCred

fn eq(&self, other: &UCred) -> bool

impl StructuralPartialEq for UCred

impl TrivialClone for UCred

Auto Trait Implementations

impl Freeze for UCred

impl RefUnwindSafe for UCred

impl Send for UCred

impl Sync for UCred

impl Unpin for UCred

impl UnsafeUnpin for UCred

impl UnwindSafe for UCred

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for UCred

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Printable for UCred where T: Copy + Debug,

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

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

impl<T> SizedTypeProperties for UCred

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

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

impl<T, U> Into<U> for UCred 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 UCred 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 UCred where U: TryFrom<T>,

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