Struct users::User[][src]

pub struct User {
    pub name_arc: Arc<OsString>,
    // some fields omitted
}

Information about a particular user.

Fields

This user’s name, as an owned OsString possibly shared with a cache. Prefer using the name() accessor to using this field, if possible.

Methods

impl User
[src]

Create a new User with the given user ID, name, and primary group ID, with the rest of the fields filled with dummy values.

This method does not actually create a new user on the system—it should only be used for comparing users in tests.

Returns this user’s ID.

Returns this user’s name.

Returns the ID of this user’s primary group.

Returns a list of groups this user is a member of

Trait Implementations

impl UserExt for User
[src]

Returns a path to this user’s home directory.

Sets this user value’s home directory to the given string. Can be used to construct test users, which by default come with a dummy home directory string. Read more

Returns a path to this user’s shell.

Sets this user’s shell path to the given string. Can be used to construct test users, which by default come with a dummy shell field. Read more

Returns the user’s encrypted password.

Sets this user’s password to the given string. Can be used to construct tests users, which by default come with a dummy password field. Read more

impl Clone for User
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for User
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for User

impl Sync for User