Struct UCred
pub struct UCred { /* private fields */ }
Credentials of a process.
Implementations
impl UCred
fn uid(&self) -> uid_tGets UID (user ID) of the process.
fn gid(&self) -> gid_tGets GID (group ID) of the process.
fn pid(&self) -> Option<pid_t>Gets PID (process ID) of the process.
This is implemented under Linux, Android, OpenBSD, FreeBSD (since FreeBSD 13), NetBSD, NTO, iOS, macOS, tvOS, watchOS, visionOS, Solaris, Illumos, Cygwin, Haiku, and Redox. On other platforms this will always return
None.
Trait Implementations
impl Clone for UCred
fn clone(&self) -> Self
impl Copy for UCred
impl Debug for UCred
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for UCred
impl Hash for UCred
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for UCred
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq 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) -> TReturns the argument unchanged.
impl<T> ToOwned for UCred
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for UCred
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for UCred
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
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>