pub enum ServiceState {
Stopped,
Starting,
Ready,
Degraded(String),
Stopping,
Failed(String),
}Expand description
State of a service in its lifecycle.
Variants§
Stopped
Service has not been started.
Starting
Service is initializing (e.g., building index).
Ready
Service is operational and accepting requests.
Degraded(String)
Service is partially operational.
Stopping
Service is shutting down.
Failed(String)
Service failed to start or encountered a fatal error.
Implementations§
Source§impl ServiceState
impl ServiceState
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Returns true if the service can handle requests (Ready or Degraded).
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if the service is in a terminal state (Stopped or Failed).
Trait Implementations§
Source§impl Clone for ServiceState
impl Clone for ServiceState
Source§fn clone(&self) -> ServiceState
fn clone(&self) -> ServiceState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceState
impl Debug for ServiceState
Source§impl Display for ServiceState
impl Display for ServiceState
Source§impl PartialEq for ServiceState
impl PartialEq for ServiceState
impl StructuralPartialEq for ServiceState
Auto Trait Implementations§
impl Freeze for ServiceState
impl RefUnwindSafe for ServiceState
impl Send for ServiceState
impl Sync for ServiceState
impl Unpin for ServiceState
impl UnsafeUnpin for ServiceState
impl UnwindSafe for ServiceState
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