[][src]Struct unix_cred::xucred::Xucred

#[repr(C)]pub struct Xucred { /* fields omitted */ }

Represents the credentials of a Unix socket's peer.


impl Xucred[src]

pub fn uid(&self) -> uid_t[src]

Get the peer's effective user ID.

pub fn gid(&self) -> gid_t[src]

Get the peer's effective group ID.

pub fn groups(&self) -> &[gid_t][src]

Get the peer's supplementary group list.

On FreeBSD, this is truncated to the first 16 supplementary groups. If you need the full group list, on FreeBSD 13+ you can use the PID (as returned by pid()) to look up the process and determine its full group list.

Trait Implementations

impl Clone for Xucred[src]

impl Debug for Xucred[src]

impl Eq for Xucred[src]

impl Hash for Xucred[src]

impl PartialEq<Xucred> for Xucred[src]

impl StructuralEq for Xucred[src]

impl StructuralPartialEq for Xucred[src]

Auto Trait Implementations

impl RefUnwindSafe for Xucred

impl Send for Xucred

impl Sync for Xucred

impl Unpin for Xucred

impl UnwindSafe for Xucred

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.