use-resistor 0.0.1

Primitive resistor vocabulary for RustUse electronics crates
Documentation
  • Coverage
  • 65.52%
    19 out of 29 items documented1 out of 15 items with examples
  • Size
  • Source code size: 10.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 638.53 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s 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-resistor

Primitive resistor vocabulary.

use-resistor describes resistor values, kinds, and optional ratings. It stores resistance in ohms and does not calculate circuit behavior, decode color bands, or duplicate a broad unit system.

Example

use use_rating::{PowerRating, Tolerance};
use use_resistor::{ResistanceValue, ResistorKind, ResistorSpec};

let spec = ResistorSpec::new(ResistanceValue::new_ohms(10_000.0)?, ResistorKind::Fixed)
    .with_tolerance(Tolerance::from_percent(1.0)?)
    .with_power_rating(PowerRating::new_watts(0.25)?);

assert_eq!(spec.kind(), ResistorKind::Fixed);
assert_eq!(spec.tolerance().map(Tolerance::percent), Some(1.0));
# Ok::<(), Box<dyn std::error::Error>>(())

Scope

Use this crate for descriptive resistor metadata. Circuit solving, color-code decoding, and simulation are out of scope.