pub struct BehaviorConfig {
pub connection_delay_ms: u64,
pub throttle_bytes_per_sec: Option<u64>,
pub drop_connection_probability: f64,
pub partial_data_bytes: Option<usize>,
}Expand description
Behavior simulation configuration
Fields§
§connection_delay_ms: u64Simulate connection delay (milliseconds)
throttle_bytes_per_sec: Option<u64>Simulate slow data transfer (bytes per second)
drop_connection_probability: f64Simulate connection drops (probability 0.0-1.0)
partial_data_bytes: Option<usize>Simulate partial data (send N bytes then close)
Trait Implementations§
Source§impl Clone for BehaviorConfig
impl Clone for BehaviorConfig
Source§fn clone(&self) -> BehaviorConfig
fn clone(&self) -> BehaviorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BehaviorConfig
impl Debug for BehaviorConfig
Source§impl Default for BehaviorConfig
impl Default for BehaviorConfig
Source§fn default() -> BehaviorConfig
fn default() -> BehaviorConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BehaviorConfig
impl<'de> Deserialize<'de> for BehaviorConfig
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
Auto Trait Implementations§
impl Freeze for BehaviorConfig
impl RefUnwindSafe for BehaviorConfig
impl Send for BehaviorConfig
impl Sync for BehaviorConfig
impl Unpin for BehaviorConfig
impl UnwindSafe for BehaviorConfig
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