[−][src]Struct umanux::userlib::UserDBLocal
Fields
users: UserList
groups: Vec<Group>
Implementations
impl UserDBLocal
[src]
#[must_use]pub fn import_from_strings(
passwd_content: &str,
shadow_content: &str,
group_content: &str
) -> Self
[src]
passwd_content: &str,
shadow_content: &str,
group_content: &str
) -> Self
Import the database from strings
pub fn load_files(files: Files) -> Result<Self, UserLibError>
[src]
Import the database from a [Files
] struct
Trait Implementations
impl UserDBRead for UserDBLocal
[src]
pub fn get_all_users(&self) -> Vec<&User>
[src]
pub fn get_user_by_name(&self, name: &str) -> Option<&User>
[src]
pub fn get_user_by_id(&self, uid: u32) -> Option<&User>
[src]
pub fn get_all_groups(&self) -> Vec<Group>
[src]
pub fn get_group_by_name(&self, name: &str) -> Option<&Group>
[src]
pub fn get_group_by_id(&self, id: u32) -> Option<&Group>
[src]
impl UserDBValidation for UserDBLocal
[src]
pub fn is_uid_valid_and_free(&self, uid: u32) -> bool
[src]
pub fn is_username_valid_and_free(&self, name: &str) -> bool
[src]
pub fn is_gid_valid_and_free(&self, gid: u32) -> bool
[src]
pub fn is_groupname_valid_and_free(&self, name: &str) -> bool
[src]
impl UserDBWrite for UserDBLocal
[src]
pub fn delete_user(
&mut self,
args: DeleteUserArgs<'_>
) -> Result<User, UserLibError>
[src]
&mut self,
args: DeleteUserArgs<'_>
) -> Result<User, UserLibError>
pub fn new_user(
&mut self,
args: CreateUserArgs<'_>
) -> Result<&User, UserLibError>
[src]
&mut self,
args: CreateUserArgs<'_>
) -> Result<&User, UserLibError>
pub fn delete_group(&mut self, _group: &Group) -> Result<(), UserLibError>
[src]
pub fn new_group(&mut self) -> Result<&Group, UserLibError>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for UserDBLocal
impl !Send for UserDBLocal
impl !Sync for UserDBLocal
impl Unpin for UserDBLocal
impl UnwindSafe for UserDBLocal
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,
pub 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.
pub 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>,