pub enum WorldStatus {
AwaitingCreation,
Live,
Unhealthy(SystemTime),
}
Expand description
A world status represents the different phases of a world.
Variants§
AwaitingCreation
Waiting for the world to be created. Accumulate joined hosts or procs while we’re waiting.
Live
World is created and enough procs based on the scheduler parameter. All procs in the world are without failures.
Unhealthy(SystemTime)
World is created but it does not have enough procs or some procs are failing.
SystemTime
contains the time when the world became unhealthy.
Implementations§
Source§impl WorldStatus
impl WorldStatus
Sourcepub fn is_awaiting_creation(&self) -> bool
pub fn is_awaiting_creation(&self) -> bool
Returns true if this is a WorldStatus::AwaitingCreation
, otherwise false
Sourcepub fn is_unhealthy(&self) -> bool
pub fn is_unhealthy(&self) -> bool
Returns true if this is a WorldStatus::Unhealthy
, otherwise false
Sourcepub fn as_unhealthy_mut(&mut self) -> Option<&mut SystemTime>
pub fn as_unhealthy_mut(&mut self) -> Option<&mut SystemTime>
Optionally returns mutable references to the inner fields if this is a WorldStatus::Unhealthy
, otherwise None
Sourcepub fn as_unhealthy(&self) -> Option<&SystemTime>
pub fn as_unhealthy(&self) -> Option<&SystemTime>
Optionally returns references to the inner fields if this is a WorldStatus::Unhealthy
, otherwise None
Sourcepub fn into_unhealthy(self) -> Result<SystemTime, Self>
pub fn into_unhealthy(self) -> Result<SystemTime, Self>
Returns the inner fields if this is a WorldStatus::Unhealthy
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl Clone for WorldStatus
impl Clone for WorldStatus
Source§fn clone(&self) -> WorldStatus
fn clone(&self) -> WorldStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WorldStatus
impl Debug for WorldStatus
Source§impl<'de> Deserialize<'de> for WorldStatus
impl<'de> Deserialize<'de> for WorldStatus
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 Display for WorldStatus
impl Display for WorldStatus
Source§impl PartialEq for WorldStatus
impl PartialEq for WorldStatus
Source§impl Serialize for WorldStatus
impl Serialize for WorldStatus
impl StructuralPartialEq for WorldStatus
Auto Trait Implementations§
impl Freeze for WorldStatus
impl RefUnwindSafe for WorldStatus
impl Send for WorldStatus
impl Sync for WorldStatus
impl Unpin for WorldStatus
impl UnwindSafe for WorldStatus
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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