pub struct Group { /* private fields */ }Expand description
Type containing group information.
It is returned by User::groups or Groups::list.
use sysinfo::Users;
let mut users = Users::new_with_refreshed_list();
for user in users.list() {
println!(
"user: (ID: {:?}, group ID: {:?}, name: {:?})",
user.id(),
user.group_id(),
user.name(),
);
for group in user.groups() {
println!("group: (ID: {:?}, name: {:?})", group.id(), group.name());
}
}Implementations§
Trait Implementations§
impl Eq for Group
Source§impl Ord for Group
impl Ord for Group
1.21.0 (const: unstable)§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more