Registry / utility / derivative

derivative

JSON →
library2.2.0rscratesunverified

A set of alternative `derive` attributes for Rust, providing more control over trait implementations.

# Cargo.toml [dependencies] derivative = "2.2.0"
INSTALL
IMPORT
SIG · DERIVATIVE
D
derivative
utilityrustv2.2.0
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.

Derivative
use derivative::Derivative;

Minimal example using Derivative to customize Debug output.

use derivative::Derivative; #[derive(Derivative)] #[derivative(Debug)] struct Point { x: i32, #[derivative(Debug="ignore")] y: i32, } fn main() { let p = Point { x: 1, y: 2 }; println!("{:?}", p); // Point { x: 1 } }
Debug
Known issues
gotchaDerivative is largely superseded by the standard library's derive macros and may not be actively maintained.
fix
Consider using standard `#[derive(...)]` or `serde`'s attributes instead.
affects: >=2.0.0
Upgrade
Version history
2.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
derivative — cargo add derivative · libregistry