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§
source§impl Ord for Group
impl Ord for Group
source§impl PartialEq for Group
impl PartialEq for Group
source§impl PartialOrd for Group
impl PartialOrd for Group
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq 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 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