pub struct UserBlockExpectedState { /* private fields */ }Expand description
Configuration for a user account
Use the builder pattern to create and manage user accounts with various properties. When state is Present, you can specify user properties like UID, shell, home directory, etc. When state is Absent, the user will be removed (and optionally their home directory).
The append field controls whether supplementary groups are appended to existing groups
or replaced entirely.
Implementations§
Source§impl UserBlockExpectedState
impl UserBlockExpectedState
pub fn absent( &mut self, username: &str, remove_home: Option<bool>, ) -> UserBlockExpectedState
pub fn present_with_defaults(username: &str) -> UserBlockExpectedState
pub fn present_with_details( username: &str, details: UserDetails, ) -> UserBlockExpectedState
Trait Implementations§
Source§impl<Handler: HostHandler> AssessCompliance<Handler> for UserBlockExpectedState
impl<Handler: HostHandler> AssessCompliance<Handler> for UserBlockExpectedState
Source§async fn assess_compliance(
&self,
host_handler: &mut Handler,
host_properties: &Option<HostProperties>,
privilege: &Privilege,
_optional_secret_provider: &Option<SecretProvidersPool>,
) -> Result<AttributeComplianceAssessment, RegentError>
async fn assess_compliance( &self, host_handler: &mut Handler, host_properties: &Option<HostProperties>, privilege: &Privilege, _optional_secret_provider: &Option<SecretProvidersPool>, ) -> Result<AttributeComplianceAssessment, RegentError>
Assess whether the host is compliant. Read more
Source§impl Check for UserBlockExpectedState
impl Check for UserBlockExpectedState
Source§fn check_host_compatibility(
&self,
host_properties: &HostProperties,
) -> Result<(), RegentError>
fn check_host_compatibility( &self, host_properties: &HostProperties, ) -> Result<(), RegentError>
If host properties are known, checks whether this attribute is compatible with the host or not. Read more
Source§impl Clone for UserBlockExpectedState
impl Clone for UserBlockExpectedState
Source§fn clone(&self) -> UserBlockExpectedState
fn clone(&self) -> UserBlockExpectedState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UserBlockExpectedState
impl Debug for UserBlockExpectedState
Source§impl<'de> Deserialize<'de> for UserBlockExpectedState
impl<'de> Deserialize<'de> for UserBlockExpectedState
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 PartialEq for UserBlockExpectedState
impl PartialEq for UserBlockExpectedState
Source§impl Serialize for UserBlockExpectedState
impl Serialize for UserBlockExpectedState
impl StructuralPartialEq for UserBlockExpectedState
Source§impl Timeout for UserBlockExpectedState
impl Timeout for UserBlockExpectedState
Source§fn default_timeout(&self) -> Duration
fn default_timeout(&self) -> Duration
Get the default timeout for this operation. Read more
Auto Trait Implementations§
impl Freeze for UserBlockExpectedState
impl RefUnwindSafe for UserBlockExpectedState
impl Send for UserBlockExpectedState
impl Sync for UserBlockExpectedState
impl Unpin for UserBlockExpectedState
impl UnsafeUnpin for UserBlockExpectedState
impl UnwindSafe for UserBlockExpectedState
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