#[repr(u8)]pub enum LifecycleState {
Created = 0,
Starting = 1,
Running = 2,
Draining = 3,
Stopped = 4,
Failed = 5,
}Expand description
Server lifecycle states.
This type is experimental and its API may change without notice.
Each state is represented as a u8 for atomic storage.
Variants§
Created = 0
Initial state after ServerBuilder::build().
Starting = 1
Server::start() has been called; binding and accept-loop init in progress.
Running = 2
Listener bound, accept loop running, ready to accept connections.
Draining = 3
Shutdown requested; draining in-flight connections.
Stopped = 4
All connections drained; terminal state.
Failed = 5
Fatal error during startup or drain; terminal state.
Implementations§
Source§impl LifecycleState
impl LifecycleState
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Whether this is a terminal state (no further transitions expected).
Trait Implementations§
Source§impl Clone for LifecycleState
impl Clone for LifecycleState
Source§fn clone(&self) -> LifecycleState
fn clone(&self) -> LifecycleState
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 LifecycleState
Source§impl Debug for LifecycleState
impl Debug for LifecycleState
Source§impl Display for LifecycleState
impl Display for LifecycleState
impl Eq for LifecycleState
Source§impl Hash for LifecycleState
impl Hash for LifecycleState
Source§impl PartialEq for LifecycleState
impl PartialEq for LifecycleState
impl StructuralPartialEq for LifecycleState
Auto Trait Implementations§
impl Freeze for LifecycleState
impl RefUnwindSafe for LifecycleState
impl Send for LifecycleState
impl Sync for LifecycleState
impl Unpin for LifecycleState
impl UnsafeUnpin for LifecycleState
impl UnwindSafe for LifecycleState
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