pub struct HsRule {
pub cas: &'static str,
pub shape: ShapePattern,
pub purity_range: Option<RangeInclusive<f64>>,
pub hs_code: &'static str,
pub heading_description: &'static str,
pub confidence: f32,
}Expand description
A single HS classification rule for a known CAS number.
Rules are stored in a &'static [HsRule] slice embedded at compile time,
so zero heap allocation is needed at runtime.
Fields§
§cas: &'static strCAS registry number (e.g. "1310-73-2").
shape: ShapePatternRequired physical form for this rule to match.
purity_range: Option<RangeInclusive<f64>>Optional purity constraint (w/w%). None = no constraint.
hs_code: &'static strSix-digit HS 2022 code (no dots, e.g. "281511").
heading_description: &'static strHuman-readable description of the HS heading.
confidence: f32Confidence score (0.0–1.0) for this rule.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HsRule
impl RefUnwindSafe for HsRule
impl Send for HsRule
impl Sync for HsRule
impl Unpin for HsRule
impl UnsafeUnpin for HsRule
impl UnwindSafe for HsRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more