pub struct CommandExpectedState { /* private fields */ }Expand description
Configuration for a shell command to execute
The command will be executed each time compliance is assessed. Use this for idempotent commands or one-time setup tasks.
Implementations§
Source§impl CommandExpectedState
impl CommandExpectedState
pub fn new(cmd: &str) -> CommandExpectedState
pub fn new_from_secret(sec_ref: SecretReference) -> CommandExpectedState
Trait Implementations§
Source§impl<Handler: HostHandler> AssessCompliance<Handler> for CommandExpectedState
impl<Handler: HostHandler> AssessCompliance<Handler> for CommandExpectedState
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.
Source§impl Check for CommandExpectedState
impl Check for CommandExpectedState
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.
Source§impl Clone for CommandExpectedState
impl Clone for CommandExpectedState
Source§impl Debug for CommandExpectedState
impl Debug for CommandExpectedState
Source§impl<'de> Deserialize<'de> for CommandExpectedState
impl<'de> Deserialize<'de> for CommandExpectedState
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 CommandExpectedState
impl PartialEq for CommandExpectedState
Source§impl Serialize for CommandExpectedState
impl Serialize for CommandExpectedState
impl StructuralPartialEq for CommandExpectedState
Source§impl Timeout for CommandExpectedState
impl Timeout for CommandExpectedState
Source§fn default_timeout(&self) -> Duration
fn default_timeout(&self) -> Duration
Get the default timeout for this operation.
Auto Trait Implementations§
impl Freeze for CommandExpectedState
impl RefUnwindSafe for CommandExpectedState
impl Send for CommandExpectedState
impl Sync for CommandExpectedState
impl Unpin for CommandExpectedState
impl UnsafeUnpin for CommandExpectedState
impl UnwindSafe for CommandExpectedState
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