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

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

Implementations

Create a new, empty mock users table.

Add a user to the users table.

Add a group to the groups table.

Trait Implementations

Returns a Group if one exists for the given group ID; otherwise, returns None.

Returns a Group 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.