#[non_exhaustive]pub enum ControlState {
Normal,
Shed {
from_lane: Lane,
},
Lockdown,
Draining,
Stopping,
}Expand description
What the control line asks for.
use net_io::{ControlState, Lane};
let shed = ControlState::Shed { from_lane: Lane(2) };
assert_ne!(shed, ControlState::Normal);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.
Normal
No reaction.
Shed
Refuse new connections in from_lane and every less important lane.
Lockdown
Refuse new connections on listeners not marked lockdown_allowed.
Draining
Close the door and drain.
Stopping
Kill every remaining connection.
Trait Implementations§
Source§impl Clone for ControlState
impl Clone for ControlState
impl Copy for ControlState
Source§impl Debug for ControlState
impl Debug for ControlState
Source§impl Default for ControlState
impl Default for ControlState
impl Eq for ControlState
Source§impl PartialEq for ControlState
impl PartialEq for ControlState
impl StructuralPartialEq for ControlState
Auto Trait Implementations§
impl Freeze for ControlState
impl RefUnwindSafe for ControlState
impl Send for ControlState
impl Sync for ControlState
impl Unpin for ControlState
impl UnsafeUnpin for ControlState
impl UnwindSafe for ControlState
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