pub trait UserExt {
fn home_dir(&self) -> &Path;
fn with_home_dir<S: AsRef<OsStr> + ?Sized>(self, home_dir: &S) -> Self;
fn shell(&self) -> &Path;
fn with_shell<S: AsRef<OsStr> + ?Sized>(self, shell: &S) -> Self;
fn password(&self) -> &OsStr;
fn with_password<S: AsRef<OsStr> + ?Sized>(self, password: &S) -> Self;
}
Expand description
Unix-specific extensions for User
s.
Required Methods
Sets this user value’s home directory to the given string. Can be used to construct test users, which by default come with a dummy home directory string.
Sets this user’s shell path to the given string. Can be used to construct test users, which by default come with a dummy shell field.