pub enum BackendState {
Scheduled,
Loading,
Starting,
Waiting {
address: BackendAddr,
},
Ready {
address: BackendAddr,
},
Terminating {
last_status: BackendStatus,
termination: TerminationKind,
reason: TerminationReason,
},
HardTerminating {
last_status: BackendStatus,
reason: TerminationReason,
},
Terminated {
last_status: BackendStatus,
termination: Option<TerminationKind>,
reason: Option<TerminationReason>,
exit_code: Option<i32>,
},
}
Variants§
Scheduled
Loading
Starting
Waiting
Fields
§
address: BackendAddr
Ready
Fields
§
address: BackendAddr
Terminating
Fields
§
last_status: BackendStatus
Last status before either soft or hard termination.
§
termination: TerminationKind
👎Deprecated: Use HardTerminating instead
§
reason: TerminationReason
HardTerminating
Fields
§
last_status: BackendStatus
Last status before either soft or hard termination.
§
reason: TerminationReason
Terminated
Fields
§
last_status: BackendStatus
§
termination: Option<TerminationKind>
§
reason: Option<TerminationReason>
Implementations§
Source§impl BackendState
impl BackendState
pub fn address(&self) -> Option<BackendAddr>
pub fn status(&self) -> BackendStatus
pub fn status_int(&self) -> i32
pub fn to_loading(&self) -> BackendState
pub fn to_starting(&self) -> BackendState
pub fn to_waiting(&self, address: SocketAddr) -> BackendState
pub fn to_ready(&self, address: BackendAddr) -> BackendState
pub fn to_terminating(&self, reason: TerminationReason) -> BackendState
pub fn to_hard_terminating(&self, reason: TerminationReason) -> BackendState
pub fn to_terminated(&self, exit_code: Option<i32>) -> BackendState
Trait Implementations§
Source§impl Clone for BackendState
impl Clone for BackendState
Source§fn clone(&self) -> BackendState
fn clone(&self) -> BackendState
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 BackendState
impl Debug for BackendState
Source§impl Default for BackendState
impl Default for BackendState
Source§impl<'de> Deserialize<'de> for BackendState
impl<'de> Deserialize<'de> for BackendState
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Mappable for BackendState
impl Mappable for BackendState
Source§impl PartialEq for BackendState
impl PartialEq for BackendState
Source§impl Serialize for BackendState
impl Serialize for BackendState
Source§impl Valuable for BackendState
impl Valuable for BackendState
impl StructuralPartialEq for BackendState
Auto Trait Implementations§
impl Freeze for BackendState
impl RefUnwindSafe for BackendState
impl Send for BackendState
impl Sync for BackendState
impl Unpin for BackendState
impl UnwindSafe for BackendState
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