pub struct Machine {
pub allowed_padding_bytes: u64,
pub max_padding_frac: f64,
pub allowed_blocked_microsec: u64,
pub max_blocking_frac: f64,
pub states: Vec<State>,
pub include_small_packets: bool,
}
Expand description
A probabilistic state machine (Rabin automaton) consisting of zero or more
State
that determine when to inject and/or block outgoing traffic.
Fields§
§allowed_padding_bytes: u64
The number of bytes of padding a machine is allowed to generate as actions before other limits apply.
max_padding_frac: f64
The maximum fraction of padding bytes to allow as actions.
allowed_blocked_microsec: u64
The number of microseconds of blocking a machine is allowed to generate as actions before other limits apply.
max_blocking_frac: f64
The maximum fraction of blocking (microseconds) to allow as actions.
states: Vec<State>
The states that make up the machine.
include_small_packets: bool
Implementations§
source§impl Machine
impl Machine
sourcepub fn name(&self) -> String
pub fn name(&self) -> String
Get a unique and deterministic string that represents the machine. The name is generated by hashing the serialization of the machine.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Machine
impl<'de> Deserialize<'de> for Machine
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
source§impl PartialEq for Machine
impl PartialEq for Machine
impl StructuralPartialEq for Machine
Auto Trait Implementations§
impl Freeze for Machine
impl RefUnwindSafe for Machine
impl Send for Machine
impl Sync for Machine
impl Unpin for Machine
impl UnwindSafe for Machine
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