Registry / testing / fail
library0.5.1rscratesunverified

Fail points for Rust, enabling controlled failure injection in tests.

# Cargo.toml [dependencies] fail = "0.5.1"
INSTALL
IMPORT
SIG · FAIL
F
fail
testingrustv0.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fail_point
use fail::fail_point;

Use a fail point to inject failures.

use fail::fail_point; fn might_fail() { fail_point!("my_fail_point"); // normal code } fn main() { might_fail(); }
Debug
Known issues
gotchaFail points only work when the `failpoints` feature is enabled.
fix
Enable the `failpoints` feature in your Cargo.toml: `fail = { features = ["failpoints"] }`.
affects: *
Upgrade
Version history
0.5.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Resources
fail — cargo add fail · libregistry