comparative-fault 0.1.0

Apply US comparative-negligence rules (pure, modified 50%, modified 51%, contributory) to a damages award.
Documentation
  • Coverage
  • 100%
    10 out of 10 items documented1 out of 6 items with examples
  • Size
  • Source code size: 9.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 342.88 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • theluckystrike

comparative-fault

Apply US comparative-negligence rules to a damages award.

When more than one party is at fault, the plaintiff's recovery is reduced by their own share of responsibility. US states do this in four materially different ways:

Rule Effect
Pure comparative Reduce by fault share, no cut-off
Modified 50% bar Reduce, but barred at 50% or more
Modified 51% bar Reduce, but barred above 50%
Contributory Any fault bars recovery entirely

The two modified rules diverge at exactly a 50/50 split, which is a common settlement posture: under a 50% bar the plaintiff takes nothing, under a 51% bar they take half.

use comparative_fault::{net_recovery, Rule};

assert_eq!(net_recovery(100_000.0, 0.20, Rule::Pure), 80_000.0);
assert_eq!(net_recovery(100_000.0, 0.50, Rule::Modified50), 0.0);
assert_eq!(net_recovery(100_000.0, 0.50, Rule::Modified51), 50_000.0);

Estimates only; not legal advice. Reference calculator: https://worthmyclaim.com/

License

MIT