Registry / utility / derive-error

derive-error

JSON →
library0.0.5rscratesunverified

Derive macro for Error using macros 1.1.

# Cargo.toml [dependencies] derive-error = "0.0.5"
INSTALL
IMPORT
SIG · DERIVE-ERROR
D
derive-error
utilityrustv0.0.5
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.

Error
use derive_error::Error;

Derive the Error trait for a custom enum.

use derive_error::Error; #[derive(Debug, Error)] pub enum MyError { NotFound, PermissionDenied, } fn main() { let e = MyError::NotFound; println!("{}", e); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
derive-error — cargo add derive-error · libregistry