pub struct Group(pub Group);Expand description
A value representing a group.
Tuple Fields§
§0: GroupImplementations§
Trait Implementations§
impl Eq for Group
Source§impl FromStr for Group
impl FromStr for Group
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses the string into a Group.
If the string is a number, it will be treated as the group’s GID. Otherwise, it will be treated as the group’s name.
§Examples
use dmon::{nix::unistd::Gid, user::Group};
let group: Group = "0".parse().unwrap();
assert_eq!(group.0.name, "root");
let group: Group = "root".parse().unwrap();
assert_eq!(group.0.gid, Gid::from_raw(0));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