#[repr(u8)]pub enum Status {
Ok = 0,
Degraded = 1,
Critical = 2,
Stall = 3,
}Expand description
Health status reported by an agent in a single VLP frame.
The discriminants are explicit because they form part of the on-wire
contract: agents serialise Status as u8 and observers reconstruct via
Status::try_from_u8.
Variants§
Ok = 0
The agent is healthy and making progress.
Degraded = 1
The agent is making progress but reporting elevated trouble (e.g. retrying, throttled).
Critical = 2
The agent is about to die. Emitted by the panic hook in
varta-client immediately before unwinding.
Stall = 3
The agent appears stuck. Emitted by varta-watch when no beat has
arrived within the configured threshold.
Implementations§
Source§impl Status
impl Status
Sourcepub fn try_from_u8(byte: u8) -> Result<Status, DecodeError>
pub fn try_from_u8(byte: u8) -> Result<Status, DecodeError>
Decode a status byte from the wire format. Returns
DecodeError::BadStatus carrying the offending byte if the value is
not a known variant.
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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