Expand description
§use-component
Primitive electronic component identity and classification.
use-component stores labels such as R1, C4, U2, D3, J1, and SW1 without turning them into schematic, BOM, inventory, or component database records.
§Example
use use_component::{ComponentKind, ReferenceDesignator};
let reference = ReferenceDesignator::new("R1")?;
let kind: ComponentKind = "resistor".parse()?;
assert_eq!(reference.as_str(), "R1");
assert_eq!(kind.to_string(), "resistor");§Scope
Use this crate for small component labels, values, and classification. It does not model schematics, BOMs, inventory, or component databases.
Modules§
- prelude
- Commonly used component primitives.
Structs§
- Component
Id - A stable component identifier.
- Component
Value - A descriptive component value such as
10k,100nF, orSTM32F4. - Reference
Designator - A reference designator such as
R1,C4,U2,D3,J1, orSW1.
Enums§
- Component
Kind - A small electronic component classification vocabulary.
- Component
Kind Parse Error - Errors returned while parsing component kinds.
- Component
Text Error - Errors returned by non-empty component text wrappers.