[−][src]Struct redox_users::AllGroups
AllGroups provides
(borrowed) access to all groups on the system. Note that this
struct implements All, for a bunch of convenience
functions.
General notes that also apply to this struct may be found with
AllUsers.
Implementations
impl AllGroups[src]
pub fn new(config: Config) -> Result<AllGroups>[src]
Create a new AllGroups.
pub fn add_group(
&mut self,
name: &str,
gid: usize,
users: &[&str]
) -> Result<()>[src]
&mut self,
name: &str,
gid: usize,
users: &[&str]
) -> Result<()>
Adds a group with the specified attributes to this AllGroups.
This function is classified as a mutating operation,
and users must therefore call save
in order for the new group to be applied to the system.
pub fn save(&self) -> Result<()>[src]
Syncs the data stored in this AllGroups instance to the filesystem.
To apply changes from an AllGroups, you MUST call this function!
Trait Implementations
impl All for AllGroups[src]
fn iter(&self) -> Iter<'_, Self::Gruser>[src]
fn iter_mut(&mut self) -> IterMut<'_, Self::Gruser>[src]
fn get_by_name(&self, name: impl AsRef<str>) -> Option<&Self::Gruser>[src]
fn get_mut_by_name(
&mut self,
name: impl AsRef<str>
) -> Option<&mut Self::Gruser>[src]
&mut self,
name: impl AsRef<str>
) -> Option<&mut Self::Gruser>
fn get_by_id(&self, id: usize) -> Option<&Self::Gruser>[src]
fn get_mut_by_id(&mut self, id: usize) -> Option<&mut Self::Gruser>[src]
fn get_unique_id(&self) -> Option<usize>[src]
fn remove_by_name(&mut self, name: impl AsRef<str>)[src]
fn remove_by_id(&mut self, id: usize)[src]
Auto Trait Implementations
impl RefUnwindSafe for AllGroups
impl Send for AllGroups
impl Sync for AllGroups
impl Unpin for AllGroups
impl UnwindSafe for AllGroups
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,