#[non_exhaustive]pub struct User {
pub name: String,
pub id: Option<u32>,
pub is_admin: bool,
}Expand description
A user account.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe account name.
id: Option<u32>The numeric user id (Unix); None on Windows, where accounts are SIDs.
is_admin: boolRoot, or an Administrator with an elevated token.
Trait Implementations§
impl Eq for User
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Forget for User
impl Freeze for User
impl Move for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl UnwindSafe for User
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