Registry / utility / diff-struct

diff-struct

JSON →
library0.5.3rscratesunverified

A trait for diffing and applying diffs to types.

# Cargo.toml [dependencies] diff-struct = "0.5.3"
INSTALL
IMPORT
SIG · DIFF-STRUCT
D
diff-struct
utilityrustv0.5.3
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.

Diff
use diff_struct::Diff;

Derive Diff trait and compute difference between two struct instances.

use diff_struct::Diff; #[derive(Diff)] struct Point { x: i32, y: i32 } fn main() { let a = Point { x: 0, y: 0 }; let b = Point { x: 1, y: 2 }; let diff = a.diff(&b); println!("Diff: {:?}", diff); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

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