pub trait ControlLine:
Send
+ Sync
+ 'static {
// Required methods
fn epoch(&self) -> u64;
fn state(&self) -> ControlState;
fn deadline(&self) -> Option<Instant>;
}Expand description
A process-wide signal (shed, lockdown, drain, stop) that net-io’s workers read at the top of each loop, before each accept batch, and before each admission.
The epoch changes on every state change; the state is read only when it moved.
Required Methods§
Sourcefn state(&self) -> ControlState
fn state(&self) -> ControlState
The current state; read only when the epoch moved.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".