pub trait Groups {
// Required methods
fn get_group_by_gid(&self, gid: gid_t) -> Option<Arc<Group>>;
fn get_group_by_name<S: AsRef<OsStr> + ?Sized>(
&self,
group_name: &S,
) -> Option<Arc<Group>>;
fn get_current_gid(&self) -> gid_t;
fn get_current_groupname(&self) -> Option<Arc<OsStr>>;
fn get_effective_gid(&self) -> gid_t;
fn get_effective_groupname(&self) -> Option<Arc<OsStr>>;
}
Expand description
Trait for producers of groups.
Required Methods§
Sourcefn get_group_by_gid(&self, gid: gid_t) -> Option<Arc<Group>>
fn get_group_by_gid(&self, gid: gid_t) -> Option<Arc<Group>>
Returns a Group
if one exists for the given group ID; otherwise, returns None
.
Sourcefn get_group_by_name<S: AsRef<OsStr> + ?Sized>(
&self,
group_name: &S,
) -> Option<Arc<Group>>
fn get_group_by_name<S: AsRef<OsStr> + ?Sized>( &self, group_name: &S, ) -> Option<Arc<Group>>
Returns a Group
if one exists for the given groupname; otherwise, returns None
.
Sourcefn get_current_gid(&self) -> gid_t
fn get_current_gid(&self) -> gid_t
Returns the group ID for the user running the process.
Sourcefn get_current_groupname(&self) -> Option<Arc<OsStr>>
fn get_current_groupname(&self) -> Option<Arc<OsStr>>
Returns the group name of the user running the process.
Sourcefn get_effective_gid(&self) -> gid_t
fn get_effective_gid(&self) -> gid_t
Returns the effective group id.
Sourcefn get_effective_groupname(&self) -> Option<Arc<OsStr>>
fn get_effective_groupname(&self) -> Option<Arc<OsStr>>
Returns the effective group name.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.