pub struct AllGroups { /* private fields */ }Expand description
Implementations§
Source§impl AllGroups
impl AllGroups
Sourcepub fn add_group(&mut self, builder: GroupBuilder) -> Result<&Group, Error>
pub fn add_group(&mut self, builder: GroupBuilder) -> Result<&Group, Error>
Consumes a builder, adding a new group to this AllGroups. Returns a
reference to the created Group.
Make sure to call AllGroups::save in order for the new group to be
applied to the system.
§Defaults
If a builder is not passed a group id (GroupBuilder::gid) before
being passed to this function, AllGroups::get_unique_id is used.
If the builder is not passed any users (GroupBuilder::user), the
group will still be created.
Trait Implementations§
Source§impl All for AllGroups
impl All for AllGroups
Source§fn get_mut_by_name(
&mut self,
name: impl AsRef<str>,
) -> Option<&mut <Self as AllInner>::Gruser>
fn get_mut_by_name( &mut self, name: impl AsRef<str>, ) -> Option<&mut <Self as AllInner>::Gruser>
Mutable version of
All::get_by_name.Source§fn get_mut_by_id(
&mut self,
id: usize,
) -> Option<&mut <Self as AllInner>::Gruser>
fn get_mut_by_id( &mut self, id: usize, ) -> Option<&mut <Self as AllInner>::Gruser>
Mutable version of
All::get_by_id.Source§fn get_unique_id(&self) -> Option<usize>
fn get_unique_id(&self) -> Option<usize>
Source§fn remove_by_id(&mut self, id: usize) -> bool
fn remove_by_id(&mut self, id: usize) -> bool
Id version of
All::remove_by_name.