Struct users::mock::MockUsers[][src]

pub struct MockUsers { /* fields omitted */ }

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

Methods

impl MockUsers
[src]

Create a new, empty mock users object.

Add a user to the users table.

Add a group to the groups table.

Trait Implementations

impl Users for MockUsers
[src]

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.

impl Groups for MockUsers
[src]

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.

Auto Trait Implementations

impl Send for MockUsers

impl Sync for MockUsers