pub enum ToxicKind {
Noop,
Latency {
latency: u64,
jitter: u64,
},
Timeout {
timeout: u64,
},
Bandwidth {
rate: u64,
},
SlowClose {
delay: u64,
},
Slicer {
average_size: u64,
size_variation: u64,
delay: u64,
},
LimitData {
bytes: u64,
},
}
Expand description
Toxic kind and toxic-specific attributes
Variants§
Noop
Passes all data through without any toxic effects
Latency
Passes data through with the a delay of latency +/- jitter added
Fields
Timeout
Stops any data from flowing through, and will close the connection after a timeout
Bandwidth
Passes data through at a limited rate
SlowClose
Stops the TCP connection from closing until after a delay
Slicer
Slices data into multiple smaller packets
Fields
LimitData
Adds a limit of bytes transferred to the proxy session
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToxicKind
impl<'de> Deserialize<'de> for ToxicKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToxicKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToxicKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ToxicKind
impl Serialize for ToxicKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ToxicKind
impl StructuralPartialEq for ToxicKind
Auto Trait Implementations§
impl Freeze for ToxicKind
impl RefUnwindSafe for ToxicKind
impl Send for ToxicKind
impl Sync for ToxicKind
impl Unpin for ToxicKind
impl UnwindSafe for ToxicKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)