pub enum WorkerState {
Active,
Draining,
Disconnected,
Offline,
Lost,
}Expand description
A worker’s state as the master sees it (see archive/PROJECT.md, Worker lifecycle).
Variants§
Active
Connected; takes new tasks.
Draining
Finishing its tasks; takes no new ones.
Disconnected
Its stream dropped; its tasks may still run. Active again if it reconnects with the same incarnation, lost when its lease runs out.
Offline
It deregistered.
Lost
No heartbeat within the lease: its attempts ended lost.
Implementations§
Trait Implementations§
Source§impl Clone for WorkerState
impl Clone for WorkerState
Source§fn clone(&self) -> WorkerState
fn clone(&self) -> WorkerState
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 WorkerState
Source§impl Debug for WorkerState
impl Debug for WorkerState
Source§impl<'de> Deserialize<'de> for WorkerState
impl<'de> Deserialize<'de> for WorkerState
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 Display for WorkerState
impl Display for WorkerState
impl Eq for WorkerState
Source§impl Hash for WorkerState
impl Hash for WorkerState
Source§impl JsonSchema for WorkerState
impl JsonSchema for WorkerState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for WorkerState
impl PartialEq for WorkerState
Source§impl Serialize for WorkerState
impl Serialize for WorkerState
impl StructuralPartialEq for WorkerState
Auto Trait Implementations§
impl Freeze for WorkerState
impl RefUnwindSafe for WorkerState
impl Send for WorkerState
impl Sync for WorkerState
impl Unpin for WorkerState
impl UnsafeUnpin for WorkerState
impl UnwindSafe for WorkerState
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