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 PartialOrd for Group
impl PartialOrd for Group
impl 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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes