Struct users::cache::UsersCache [] [src]

pub struct UsersCache { /* fields omitted */ }

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

Methods

impl UsersCache
[src]

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

impl Default for UsersCache
[src]

Returns the "default value" for a type. Read more

impl Users for UsersCache
[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 UsersCache
[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.