pub struct Group {
pub name: String,
pub password: Option<String>,
pub gid: c_uint,
pub members: Vec<String>,
}
Expand description
Group struct
Fields§
§name: String
Group name
password: Option<String>
Group password
gid: c_uint
Group ID
members: Vec<String>
Members of group
Implementations§
Source§impl Group
impl Group
Sourcepub fn new_from_groupname(username: &str) -> Result<Self>
pub fn new_from_groupname(username: &str) -> Result<Self>
Get group information by group name
Sourcepub fn new_from_gid(gid: c_uint) -> Result<Self>
pub fn new_from_gid(gid: c_uint) -> Result<Self>
Get group information by group ID
Sourcepub fn display_members(&self) -> String
pub fn display_members(&self) -> String
Convert members array (Vector
) to String
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