use-rating 0.0.1

Primitive electronic rating wrappers for RustUse
Documentation
  • Coverage
  • 100%
    23 out of 23 items documented1 out of 20 items with examples
  • Size
  • Source code size: 10.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 767.28 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
  • RustUse/use-electronics
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-rating

Primitive electronic rating vocabulary.

use-rating keeps units simple for v0: volts, amperes, watts, percent, Celsius, and hertz are documented numeric wrappers. It does not duplicate use-units, implement electrical simulation, calculate derating, or model safety certification.

Example

use use_rating::{PowerRating, Tolerance, VoltageRating};

let voltage = VoltageRating::new_volts(16.0)?;
let power = PowerRating::new_watts(0.25)?;
let tolerance = Tolerance::from_percent(1.0)?;

assert_eq!(voltage.to_string(), "16 V");
assert_eq!(power.to_string(), "0.25 W");
assert_eq!(tolerance.to_string(), "+/-1%");
# Ok::<(), use_rating::RatingError>(())

Scope

Use this crate for descriptive rating metadata. Broader unit systems, electrical formulas, derating calculators, and safety logic are out of scope.