pub struct PasswdEntry {
pub username: String,
pub password_in_shadow: bool,
pub uid: uid_t,
pub gid: gid_t,
pub gecos: String,
pub home_dir: String,
pub shell: String,
}Expand description
An entry to the /etc/passwd file.
Fields§
§username: String§password_in_shadow: bool§uid: uid_t§gid: gid_t§gecos: String§home_dir: String§shell: StringImplementations§
Source§impl PasswdEntry
impl PasswdEntry
Sourcepub fn parse_entry<T: ToString>(entry: &T) -> PasswdEntry
pub fn parse_entry<T: ToString>(entry: &T) -> PasswdEntry
Parse a passwd entry from a string
Sourcepub fn get_entry_from_passwd<T: ToString>(name: &T) -> Result<PasswdEntry, i32>
pub fn get_entry_from_passwd<T: ToString>(name: &T) -> Result<PasswdEntry, i32>
Get the entry from the password database
Sourcepub fn get_entry_from_passwd_by_uid(uid: uid_t) -> Result<PasswdEntry, i32>
pub fn get_entry_from_passwd_by_uid(uid: uid_t) -> Result<PasswdEntry, i32>
Get the entry from the password database by uid
Trait Implementations§
Source§impl Clone for PasswdEntry
impl Clone for PasswdEntry
Source§fn clone(&self) -> PasswdEntry
fn clone(&self) -> PasswdEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PasswdEntry
impl RefUnwindSafe for PasswdEntry
impl Send for PasswdEntry
impl Sync for PasswdEntry
impl Unpin for PasswdEntry
impl UnwindSafe for PasswdEntry
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