Skip to main content

Module io

Module io 

Source
Expand description

Synchronous IO wrappers that inject failures into real Read/Write types.

Each wrapper holds a FailureSchedule and increments an attempt counter on every read/write call. When the schedule fires, the call returns an io::Error derived from the FailureMode. On non-failing attempts, the wrapper delegates to the underlying type and preserves its bytes-on-disk behavior.

Structs§

ChaosReader
Wraps a Read and injects failures per a FailureSchedule.
ChaosWriter
Wraps a Write and injects failures per a FailureSchedule.

Type Aliases§

ChaosFile
Convenience: a ChaosWriter<File>.