Struct users::mock::MockUsers

source ·
pub struct MockUsers { /* private fields */ }
Expand description

A mocking users object that you can add your own users and groups to.

Implementations§

Create a new, empty mock users object.

Add a user to the users table.

Add a group to the groups table.

Trait Implementations§

Returns a Group object if one exists for the given group ID; otherwise, returns None.
Returns a Group object if one exists for the given groupname; otherwise, returns None.
Returns the group ID for the user running the process.
Returns the group name of the user running the process.
Returns the effective group id.
Returns the effective group name.
Returns a User if one exists for the given user ID; otherwise, returns None.
Returns a User if one exists for the given username; otherwise, returns None.
Returns the user ID for the user running the process.
Returns the username of the user running the process.
Returns the effective user id.
Returns the effective username.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.