Struct users::mock::Group [−][src]
Information about a particular group.
Fields
name_arc: Arc<OsString>
This group’s name, as an owned OsString possibly shared with a cache.
Prefer using the name() accessor to using this field, if possible.
Methods
impl Group[src]
impl Grouppub fn new<S: AsRef<OsStr> + ?Sized>(gid: gid_t, name: &S) -> Self[src]
pub fn new<S: AsRef<OsStr> + ?Sized>(gid: gid_t, name: &S) -> SelfCreate a new Group with the given group ID and name, with the
rest of the fields filled in with dummy values.
This method does not actually create a new group on the system—it should only be used for comparing groups in tests.
pub fn gid(&self) -> gid_t[src]
pub fn gid(&self) -> gid_tReturns this group’s ID.
pub fn name(&self) -> &OsStr[src]
pub fn name(&self) -> &OsStrReturns this group’s name.
Trait Implementations
impl GroupExt for Group[src]
impl GroupExt for Groupfn members(&self) -> &[OsString][src]
fn members(&self) -> &[OsString]Returns a slice of the list of users that are in this group as their non-primary group. Read more
fn add_member<S: AsRef<OsStr> + ?Sized>(self, member: &S) -> Self[src]
fn add_member<S: AsRef<OsStr> + ?Sized>(self, member: &S) -> SelfAdds a new member to this group.
impl Clone for Group[src]
impl Clone for Groupfn clone(&self) -> Group[src]
fn clone(&self) -> GroupReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for Group[src]
impl Debug for Group