#[non_exhaustive]pub enum OperState {
Up,
Down,
NotPresent,
Unknown,
}Expand description
RFC 2863’s operational status — the states something here produces.
dormant, testing and lowerLayerDown are not declared, deliberately: a
state is added when a device produces it. Linux’s operstate documentation
defines dormant as “L1 up, but waiting for an external event”, and a
coverage gap is L1 down — so a terminal out of coverage is Down with
OperStatus::recoverable set, never dormant (#121).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Up
Passing traffic.
Down
Not passing traffic; OperStatus::recoverable says whether it
expects to again without help.
NotPresent
The device node is gone: a serial port unplugged, an interface
removed. Distinct from Down because no amount of waiting fixes it.
Unknown
The device has not said, and nothing else can tell. The default.
Implementations§
Trait Implementations§
impl Copy for OperState
impl Eq for OperState
impl StructuralPartialEq for OperState
Auto Trait Implementations§
impl Freeze for OperState
impl RefUnwindSafe for OperState
impl Send for OperState
impl Sync for OperState
impl Unpin for OperState
impl UnsafeUnpin for OperState
impl UnwindSafe for OperState
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