pub enum Status {
Starting,
Running,
Idle,
Stopping,
Stopped,
Warning,
Building,
Error,
Unknown,
}Expand description
Represents different lifecycle states a project instance can be in.
§Wire format
Status MUST cross a service boundary (gRPC, HTTP/JSON) via Status::as_str_name /
Status::from_str_name, never via fmt::Display (which is colorized for terminal
output only) and never via an ad hoc lowercase/uppercase string match. See
Status::from_str_name for the fail-loud parsing contract this replaces.
Variants§
Starting
The project is in the process of starting.
Running
The project is currently running.
Idle
The project is running but idle.
Stopping
The project is in the process of stopping.
Stopped
The project has stopped.
Warning
The project is running with warnings.
Building
The project is in the process of building.
Error
The project has encountered an error.
Unknown
The status could not be determined. A legitimate VALUE (e.g. “not yet reported”),
never a silent fallback for a parse failure — see Status::from_str_name.
Implementations§
Source§impl Status
impl Status
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
The canonical, uncolored, wire-safe name for this variant (prost-enum convention).
Sourcepub fn from_str_name(s: &str) -> Result<Status, StatusParseError>
pub fn from_str_name(s: &str) -> Result<Status, StatusParseError>
Parses a wire value produced by Status::as_str_name.
Case-insensitive (accepts "Running", "running", or "RUNNING") so that services
mid-migration from an ad hoc lowercase encoding don’t all need to change in the same
commit, but an unrecognized value is always an Err, never silently mapped to any
variant. Callers MUST log the raw value and count it via a metric on the Err path,
per the wire-format contract documented on Status itself.
Trait Implementations§
impl Copy for Status
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>,
impl Eq for Status
Source§impl Ord for Status
impl Ord for Status
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Status
impl PartialOrd 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 UnsafeUnpin for Status
impl UnwindSafe for Status
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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