pub struct CreateUserAndGroup { /* private fields */ }
Expand description
Sysusers entry of type u
.
Implementations§
Source§impl CreateUserAndGroup
impl CreateUserAndGroup
Sourcepub fn new(
name: String,
gecos: String,
home_dir: Option<PathBuf>,
shell: Option<PathBuf>,
) -> Result<Self, SdError>
pub fn new( name: String, gecos: String, home_dir: Option<PathBuf>, shell: Option<PathBuf>, ) -> Result<Self, SdError>
Create a new CreateUserAndGroup
entry, using a filepath reference.
Sourcepub fn new_with_id(
name: String,
id: u32,
gecos: String,
home_dir: Option<PathBuf>,
shell: Option<PathBuf>,
) -> Result<Self, SdError>
pub fn new_with_id( name: String, id: u32, gecos: String, home_dir: Option<PathBuf>, shell: Option<PathBuf>, ) -> Result<Self, SdError>
Create a new CreateUserAndrGroup
entry, using a numeric ID.
Sourcepub fn new_with_uid_gid(
name: String,
uid: u32,
gid: u32,
gecos: String,
home_dir: Option<PathBuf>,
shell: Option<PathBuf>,
) -> Result<Self, SdError>
pub fn new_with_uid_gid( name: String, uid: u32, gid: u32, gecos: String, home_dir: Option<PathBuf>, shell: Option<PathBuf>, ) -> Result<Self, SdError>
Create a new CreateUserAndGroup
entry, using a UID and a GID.
Sourcepub fn new_with_uid_groupname(
name: String,
uid: u32,
groupname: String,
gecos: String,
home_dir: Option<PathBuf>,
shell: Option<PathBuf>,
) -> Result<Self, SdError>
pub fn new_with_uid_groupname( name: String, uid: u32, groupname: String, gecos: String, home_dir: Option<PathBuf>, shell: Option<PathBuf>, ) -> Result<Self, SdError>
Create a new CreateUserAndGroup
entry, using a UID and a groupname.
Sourcepub fn new_with_path(
name: String,
path: PathBuf,
gecos: String,
home_dir: Option<PathBuf>,
shell: Option<PathBuf>,
) -> Result<Self, SdError>
pub fn new_with_path( name: String, path: PathBuf, gecos: String, home_dir: Option<PathBuf>, shell: Option<PathBuf>, ) -> Result<Self, SdError>
Create a new CreateUserAndGroup
entry, using a filepath reference.
Sourcepub fn type_signature(&self) -> &str
pub fn type_signature(&self) -> &str
Return the single-character signature for the “Type” field of this entry.
Sourcepub fn has_dynamic_ids(&self) -> bool
pub fn has_dynamic_ids(&self) -> bool
Return whether UID and GID are dynamically allocated at runtime.
Sourcepub fn static_uid(&self) -> Option<u32>
pub fn static_uid(&self) -> Option<u32>
Return the user identifier (UID) of this entry, if statically set.
Sourcepub fn static_gid(&self) -> Option<u32>
pub fn static_gid(&self) -> Option<u32>
Return the groups identifier (GID) of this entry, if statically set.
Trait Implementations§
Source§impl Clone for CreateUserAndGroup
impl Clone for CreateUserAndGroup
Source§fn clone(&self) -> CreateUserAndGroup
fn clone(&self) -> CreateUserAndGroup
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 moreSource§impl Debug for CreateUserAndGroup
impl Debug for CreateUserAndGroup
Source§impl<'de> Deserialize<'de> for CreateUserAndGroup
impl<'de> Deserialize<'de> for CreateUserAndGroup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CreateUserAndGroup
impl Display for CreateUserAndGroup
Source§impl FromStr for CreateUserAndGroup
impl FromStr for CreateUserAndGroup
Source§impl PartialEq for CreateUserAndGroup
impl PartialEq for CreateUserAndGroup
Source§impl Serialize for CreateUserAndGroup
impl Serialize for CreateUserAndGroup
impl StructuralPartialEq for CreateUserAndGroup
Auto Trait Implementations§
impl Freeze for CreateUserAndGroup
impl RefUnwindSafe for CreateUserAndGroup
impl Send for CreateUserAndGroup
impl Sync for CreateUserAndGroup
impl Unpin for CreateUserAndGroup
impl UnwindSafe for CreateUserAndGroup
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