pub struct FleetDiff {
pub workers: Vec<WorkerDiffRow>,
pub state_counts: BTreeMap<String, usize>,
pub ready_workers: usize,
pub explanation: String,
}Expand description
The whole-fleet desired-vs-live diff with a capacity-collapse explanation.
Fields§
§workers: Vec<WorkerDiffRow>§state_counts: BTreeMap<String, usize>Count per diff state (only non-zero entries), for the explanation.
ready_workers: usizeWorkers usable for the command right now.
explanation: StringOne-line capacity-collapse explanation.
Implementations§
Source§impl FleetDiff
impl FleetDiff
Sourcepub fn capacity_collapsed(&self) -> bool
pub fn capacity_collapsed(&self) -> bool
Whether the fleet has collapsed to zero usable workers.
Sourcepub fn count(&self, state: WorkerDiffState) -> usize
pub fn count(&self, state: WorkerDiffState) -> usize
Count of workers in a given state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FleetDiff
impl<'de> Deserialize<'de> for FleetDiff
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
impl Eq for FleetDiff
impl StructuralPartialEq for FleetDiff
Auto Trait Implementations§
impl Freeze for FleetDiff
impl RefUnwindSafe for FleetDiff
impl Send for FleetDiff
impl Sync for FleetDiff
impl Unpin for FleetDiff
impl UnsafeUnpin for FleetDiff
impl UnwindSafe for FleetDiff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.