use-diode 0.0.1

Primitive diode vocabulary for RustUse electronics crates
Documentation
  • Coverage
  • 62.07%
    18 out of 29 items documented1 out of 14 items with examples
  • Size
  • Source code size: 10.73 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 649.86 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-diode

Primitive diode vocabulary.

use-diode describes diode kinds, anode/cathode polarity, and optional ratings. It does not simulate I/V curves, model diode equations, implement semiconductor physics, or handle LED color science.

Example

use use_diode::{DiodeKind, DiodePolarity, DiodeSpec};
use use_rating::{CurrentRating, VoltageRating};

let spec = DiodeSpec::new(DiodeKind::Schottky)
    .with_forward_voltage(VoltageRating::new_volts(0.3)?)
    .with_current_rating(CurrentRating::new_amperes(1.0)?);

assert_eq!(spec.kind(), DiodeKind::Schottky);
assert_eq!(DiodePolarity::Cathode.to_string(), "cathode");
# Ok::<(), Box<dyn std::error::Error>>(())

Scope

Use this crate for descriptive diode metadata. Semiconductor equations and circuit simulation are out of scope.