pub enum Status {
NotExist,
Initializing,
Running,
Stopping,
Stopped,
Failed(String),
}
Expand description
The current lifecycle status of a resource.
Variants§
NotExist
The resource does not exist.
Initializing
The resource is being created.
Running
The resource is running.
Stopping
The resource is being stopped.
Stopped
The resource is stopped.
Failed(String)
The resource has failed, with an error message.
Implementations§
Source§impl Status
impl Status
Sourcepub fn is_not_exist(&self) -> bool
pub fn is_not_exist(&self) -> bool
Returns true if this is a Status::NotExist
, otherwise false
Sourcepub fn is_initializing(&self) -> bool
pub fn is_initializing(&self) -> bool
Returns true if this is a Status::Initializing
, otherwise false
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Returns true if this is a Status::Running
, otherwise false
Sourcepub fn is_stopping(&self) -> bool
pub fn is_stopping(&self) -> bool
Returns true if this is a Status::Stopping
, otherwise false
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Returns true if this is a Status::Stopped
, otherwise false
Sourcepub fn as_failed_mut(&mut self) -> Option<&mut String>
pub fn as_failed_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Status::Failed
, otherwise None
Sourcepub fn as_failed(&self) -> Option<&String>
pub fn as_failed(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Status::Failed
, otherwise None
Sourcepub fn into_failed(self) -> Result<String, Self>
pub fn into_failed(self) -> Result<String, Self>
Returns the inner fields if this is a Status::Failed
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
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>,
Source§impl Named for Status
impl Named for Status
Source§fn typename() -> &'static str
fn typename() -> &'static str
Source§fn typehash() -> u64
fn typehash() -> u64
Source§fn arm(&self) -> Option<&'static str>
fn arm(&self) -> Option<&'static str>
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
Source§impl Ord for Status
impl Ord for Status
Source§impl PartialOrd for Status
impl PartialOrd for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
Source§type State = T
type State = T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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