Registry / utility / failure-derive

failure-derive

JSON →
library0.1.8rscratesunverified

Derive macros for the failure crate, providing ergonomic error types.

# Cargo.toml [dependencies] failure_derive = "0.1.8"
INSTALL
IMPORT
SIG · FAILURE-DERIVE
F
failure-derive
utilityrustv0.1.8
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
✓ use failure_derive::Fail;

Derive the Fail trait for a custom error enum.

use failure_derive::Fail; #[derive(Fail, Debug)] pub enum MyError { #[fail(display = "An error occurred: {}", _0)] General(String), }
Debug
Known issues
breakingThe failure crate is deprecated in favor of std::error::Error and thiserror/anyhow.
fix
Migrate to thiserror for derive macros or anyhow for error handling.
affects: >=0.1.0
Upgrade
Version history
0.1.8latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
failure-derive — cargo add failure-derive · libregistry