Trait users::Users [−][src]
Trait for producers of users.
Required methods
fn get_user_by_uid(&self, uid: uid_t) -> Option<Arc<User>>
[src]
Returns a User
if one exists for the given user ID; otherwise, returns None
.
fn get_user_by_name<S: AsRef<OsStr> + ?Sized>(
&self,
username: &S
) -> Option<Arc<User>>
[src]
&self,
username: &S
) -> Option<Arc<User>>
Returns a User
if one exists for the given username; otherwise, returns None
.
fn get_current_uid(&self) -> uid_t
[src]
Returns the user ID for the user running the process.
fn get_current_username(&self) -> Option<Arc<OsString>>
[src]
Returns the username of the user running the process.
fn get_effective_uid(&self) -> uid_t
[src]
Returns the effective user id.
fn get_effective_username(&self) -> Option<Arc<OsString>>
[src]
Returns the effective username.
Implementors
impl Users for UsersCache
[src]
fn get_user_by_uid(&self, uid: uid_t) -> Option<Arc<User>>
[src]
fn get_user_by_name<S: AsRef<OsStr> + ?Sized>(
&self,
username: &S
) -> Option<Arc<User>>
[src]
&self,
username: &S
) -> Option<Arc<User>>
fn get_current_uid(&self) -> uid_t
[src]
fn get_current_username(&self) -> Option<Arc<OsString>>
[src]
fn get_effective_uid(&self) -> uid_t
[src]
fn get_effective_username(&self) -> Option<Arc<OsString>>
[src]
impl Users for MockUsers
[src]
fn get_user_by_uid(&self, uid: uid_t) -> Option<Arc<User>>
[src]
fn get_user_by_name<S: AsRef<OsStr> + ?Sized>(
&self,
username: &S
) -> Option<Arc<User>>
[src]
&self,
username: &S
) -> Option<Arc<User>>