pub struct Attribute {
pub privilege: Privilege,
pub name: Option<String>,
/* private fields */
}Fields§
§privilege: Privilege§name: Option<String>Implementations§
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
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 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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more