[go: up one dir, main page]

Struct users::cache::UsersCache

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

A producer of user and group instances that caches every result.

Implementations§

Creates a new empty cache.

Creates a new cache that contains all the users present on the system.

This is unsafe because we cannot prevent data races if two caches were attempted to be initialised on different threads at the same time.

Trait Implementations§

Returns the “default value” for a type. Read more
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.