Trait users::Users
[−]
[src]
pub trait Users {
fn get_user_by_uid(&mut self, uid: uid_t) -> Option<User>;
fn get_user_by_name(&mut self, username: &str) -> Option<User>;
fn get_group_by_gid(&mut self, gid: gid_t) -> Option<Group>;
fn get_group_by_name(&mut self, group_name: &str) -> Option<Group>;
fn get_current_uid(&mut self) -> uid_t;
fn get_current_username(&mut self) -> Option<String>;
fn get_current_gid(&mut self) -> gid_t;
fn get_current_groupname(&mut self) -> Option<String>;
fn get_effective_uid(&mut self) -> uid_t;
fn get_effective_gid(&mut self) -> gid_t;
fn get_effective_username(&mut self) -> Option<String>;
fn get_effective_groupname(&mut self) -> Option<String>;
}The trait for the OSUsers object.
Required Methods
fn get_user_by_uid(&mut self, uid: uid_t) -> Option<User>
Return a User object if one exists for the given user ID; otherwise, return None.
fn get_user_by_name(&mut self, username: &str) -> Option<User>
Return a User object if one exists for the given username; otherwise, return None.
fn get_group_by_gid(&mut self, gid: gid_t) -> Option<Group>
Return a Group object if one exists for the given group ID; otherwise, return None.
fn get_group_by_name(&mut self, group_name: &str) -> Option<Group>
Return a Group object if one exists for the given groupname; otherwise, return None.
fn get_current_uid(&mut self) -> uid_t
Return the user ID for the user running the process.
fn get_current_username(&mut self) -> Option<String>
Return the username of the user running the process.
fn get_current_gid(&mut self) -> gid_t
Return the group ID for the user running the process.
fn get_current_groupname(&mut self) -> Option<String>
Return the group name of the user running the process.
fn get_effective_uid(&mut self) -> uid_t
Return the effective user id.
fn get_effective_gid(&mut self) -> gid_t
Return the effective group id.
fn get_effective_username(&mut self) -> Option<String>
Return the effective username.
fn get_effective_groupname(&mut self) -> Option<String>
Return the effective group name.