#[non_exhaustive]pub enum WorkloadState {
Created,
Running,
Stopped,
Completed,
Error,
Restarting,
Unknown,
NotFound,
}Expand description
Lifecycle state of a workload as reported by a provider.
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.
Created
Created but not yet started.
Running
Running.
Stopped
Stopped by request.
Completed
Ran to completion successfully.
Error
Terminated with an error.
Restarting
Restarting.
Unknown
State could not be determined.
NotFound
No such workload exists.
Implementations§
Source§impl WorkloadState
impl WorkloadState
Sourcepub const fn is_running(self) -> bool
pub const fn is_running(self) -> bool
Returns true when the workload is actively running.
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Returns true when the workload has reached a terminal state.
Trait Implementations§
Source§impl Clone for WorkloadState
impl Clone for WorkloadState
Source§fn clone(&self) -> WorkloadState
fn clone(&self) -> WorkloadState
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 moreimpl Copy for WorkloadState
Source§impl Debug for WorkloadState
impl Debug for WorkloadState
Source§impl Default for WorkloadState
impl Default for WorkloadState
Source§fn default() -> WorkloadState
fn default() -> WorkloadState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WorkloadState
impl<'de> Deserialize<'de> for WorkloadState
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 Display for WorkloadState
impl Display for WorkloadState
impl Eq for WorkloadState
Source§impl PartialEq for WorkloadState
impl PartialEq for WorkloadState
Source§impl Serialize for WorkloadState
impl Serialize for WorkloadState
impl StructuralPartialEq for WorkloadState
Auto Trait Implementations§
impl Freeze for WorkloadState
impl RefUnwindSafe for WorkloadState
impl Send for WorkloadState
impl Sync for WorkloadState
impl Unpin for WorkloadState
impl UnsafeUnpin for WorkloadState
impl UnwindSafe for WorkloadState
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