pub struct StorageFaultConfig {
pub disk_full: bool,
pub read_error: bool,
pub write_error: bool,
pub snapshot_failure: bool,
pub silent_corrupt_probability: f64,
pub slow_disk_ticks: u64,
}Expand description
Runtime fault configuration for storage.
Fields§
§disk_full: boolIf true, all writes fail with “disk full”.
read_error: boolIf true, all reads fail with “read error”.
write_error: boolIf true, all writes fail with “write error”.
snapshot_failure: boolIf true, snapshots fail.
silent_corrupt_probability: f64Probability of silent data corruption on read (0.0–1.0). Corrupted data is returned without error.
slow_disk_ticks: u64Simulated disk latency in ticks (0 = instant).
When > 0, writes are buffered until tick() is called.
Trait Implementations§
Source§impl Clone for StorageFaultConfig
impl Clone for StorageFaultConfig
Source§fn clone(&self) -> StorageFaultConfig
fn clone(&self) -> StorageFaultConfig
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 StorageFaultConfig
impl Debug for StorageFaultConfig
Auto Trait Implementations§
impl Freeze for StorageFaultConfig
impl RefUnwindSafe for StorageFaultConfig
impl Send for StorageFaultConfig
impl Sync for StorageFaultConfig
impl Unpin for StorageFaultConfig
impl UnsafeUnpin for StorageFaultConfig
impl UnwindSafe for StorageFaultConfig
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