pub struct AllocFaultConfig {
pub fail_probability: f64,
pub hard_limit_bytes: u64,
pub min_fail_size: u64,
}Expand description
Memory allocator fault injection configuration.
Fields§
§fail_probability: f64Probability of any single allocation failing [0.0, 1.0].
hard_limit_bytes: u64Hard limit on total heap bytes. All allocations after this are rejected. 0 = no limit.
min_fail_size: u64Only fail allocations larger than this size (bytes). 0 = all sizes.
Trait Implementations§
Source§impl Clone for AllocFaultConfig
impl Clone for AllocFaultConfig
Source§fn clone(&self) -> AllocFaultConfig
fn clone(&self) -> AllocFaultConfig
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 AllocFaultConfig
impl Debug for AllocFaultConfig
Source§impl Default for AllocFaultConfig
impl Default for AllocFaultConfig
Source§fn default() -> AllocFaultConfig
fn default() -> AllocFaultConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AllocFaultConfig
impl<'de> Deserialize<'de> for AllocFaultConfig
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 AllocFaultConfig
impl PartialEq for AllocFaultConfig
Source§impl Serialize for AllocFaultConfig
impl Serialize for AllocFaultConfig
impl StructuralPartialEq for AllocFaultConfig
Auto Trait Implementations§
impl Freeze for AllocFaultConfig
impl RefUnwindSafe for AllocFaultConfig
impl Send for AllocFaultConfig
impl Sync for AllocFaultConfig
impl Unpin for AllocFaultConfig
impl UnsafeUnpin for AllocFaultConfig
impl UnwindSafe for AllocFaultConfig
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