pub struct UserIdentity {
pub uid: u32,
pub name: Option<Box<str>>,
}Expand description
The owning user of a process.
Fields§
§uid: u32Numeric user id.
name: Option<Box<str>>Resolved user name, when the OS lets us look it up.
Name resolution can fail or be denied for another user’s process, which is why the numeric id is always present and the name is not.
Implementations§
Source§impl UserIdentity
impl UserIdentity
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
The name if resolved, otherwise the numeric id rendered as text.
Trait Implementations§
Source§impl Clone for UserIdentity
impl Clone for UserIdentity
Source§fn clone(&self) -> UserIdentity
fn clone(&self) -> UserIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UserIdentity
impl Debug for UserIdentity
impl Eq for UserIdentity
Source§impl PartialEq for UserIdentity
impl PartialEq for UserIdentity
impl StructuralPartialEq for UserIdentity
Auto Trait Implementations§
impl Freeze for UserIdentity
impl RefUnwindSafe for UserIdentity
impl Send for UserIdentity
impl Sync for UserIdentity
impl Unpin for UserIdentity
impl UnsafeUnpin for UserIdentity
impl UnwindSafe for UserIdentity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more