#[non_exhaustive]pub enum ActionStatus {
InProgress,
Complete,
Failed,
Cancelled,
Expired,
RolloutPassed,
Unknown(String),
}Expand description
The state of an agent action. States added by newer Kibana versions are
kept as Unknown.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl ActionStatus
impl ActionStatus
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether the action can no longer progress. An unknown state counts as finished, so waiting stops at a state this client cannot interpret instead of running until the deadline. This also returns true for known failures; inspect the status before treating the action as successful.
use security_client_rs::fleet::ActionStatus;
assert!(ActionStatus::Failed.is_finished());
assert!(!ActionStatus::InProgress.is_finished());
let added_by_kibana = ActionStatus::from("NEW_STATUS".to_owned());
assert!(added_by_kibana.is_finished());
assert!(matches!(added_by_kibana, ActionStatus::Unknown(_)));Trait Implementations§
Source§impl Clone for ActionStatus
impl Clone for ActionStatus
Source§impl Debug for ActionStatus
impl Debug for ActionStatus
Source§impl<'de> Deserialize<'de> for ActionStatus
impl<'de> Deserialize<'de> for ActionStatus
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
impl Eq for ActionStatus
Source§impl From<ActionStatus> for String
impl From<ActionStatus> for String
Source§fn from(status: ActionStatus) -> Self
fn from(status: ActionStatus) -> Self
Converts to this type from the input type.
Source§impl From<String> for ActionStatus
impl From<String> for ActionStatus
Source§impl Hash for ActionStatus
impl Hash for ActionStatus
Source§impl PartialEq for ActionStatus
impl PartialEq for ActionStatus
Source§impl Serialize for ActionStatus
impl Serialize for ActionStatus
impl StructuralPartialEq for ActionStatus
Auto Trait Implementations§
impl Freeze for ActionStatus
impl RefUnwindSafe for ActionStatus
impl Send for ActionStatus
impl Sync for ActionStatus
impl Unpin for ActionStatus
impl UnsafeUnpin for ActionStatus
impl UnwindSafe for ActionStatus
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