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