pub struct Attribute {
pub name: Option<String>,
pub privilege: Privilege,
/* private fields */
}Fields§
§name: Option<String>§privilege: PrivilegeImplementations§
Source§impl Attribute
impl Attribute
pub fn from( detail: AttributeDetail, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn name(&self) -> String
pub fn consider_context( &self, context: &Context, ) -> Result<Attribute, RegentError>
Sourcepub async fn assess<Handler: HostHandler>(
&self,
host_handler: &mut Handler,
host_properties: &Option<HostProperties>,
optional_secret_provider: &Option<SecretProvidersPool>,
) -> Result<AttributeComplianceAssessment, RegentError>
pub async fn assess<Handler: HostHandler>( &self, host_handler: &mut Handler, host_properties: &Option<HostProperties>, optional_secret_provider: &Option<SecretProvidersPool>, ) -> Result<AttributeComplianceAssessment, RegentError>
Result because the assessment might fail. If it succeeds, it will return either None (AKA already compliant) or Some(Vec of Remediation) (AKA what shall be done to reach the expected state).
pub async fn reach_compliance<Handler: HostHandler>( &self, host_handler: &mut Handler, host_properties: &Option<HostProperties>, optional_secret_provider: &Option<SecretProvidersPool>, ) -> Result<AttributeComplianceResult, RegentError>
pub fn check(&self) -> Result<(), RegentError>
pub fn timeout(&self) -> Result<Duration, RegentError>
Sourcepub fn with_timeout(self, user_defined_timeout: Duration) -> Self
pub fn with_timeout(self, user_defined_timeout: Duration) -> Self
Set a timeout using a Duration
Sourcepub fn with_timeout_secs(self, seconds: u64) -> Self
pub fn with_timeout_secs(self, seconds: u64) -> Self
Set a timeout using seconds
Sourcepub fn with_timeout_millis(self, milliseconds: u64) -> Self
pub fn with_timeout_millis(self, milliseconds: u64) -> Self
Set a timeout using milliseconds
pub fn apt( details: AptBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn pacman( details: PacmanBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn yumdnf( details: YumDnfBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn command( details: CommandBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn service( details: ServiceBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn debug( details: DebugBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn lineinfile( details: LineInFileBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn ping( details: PingBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn user( details: UserBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn group( details: GroupBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn cron( details: CronBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn hostname( details: HostnameBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn apt_repo( details: AptRepoBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn dnf_repo( details: DnfRepoBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn iptables( details: IptablesBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
pub fn ollama( details: OllamaBlockExpectedState, privilege: Privilege, name: Option<String>, ) -> Attribute
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
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
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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