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) · Source§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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Group
impl PartialOrd for Group
impl StructuralPartialEq for Group
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnsafeUnpin for Group
impl UnwindSafe for Group
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more