Function users::get_group_by_gid
source · [−]Expand description
Searches for a Group
with the given ID in the system’s group database.
Returns it if one is found, otherwise returns None
.
libc functions used
Examples
use users::get_group_by_gid;
match get_group_by_gid(102) {
Some(group) => println!("Found group {:?}", group.name()),
None => println!("Group not found"),
}