pub struct HsPrediction {
pub hs_code: String,
pub heading_description: String,
pub confidence: f32,
pub source: PredictionSource,
pub notes: Vec<String>,
pub alternatives: Vec<AlternativePrediction>,
pub recommended_action: RecommendedAction,
pub jp_tariff_code: Option<String>,
pub jp_tariff_year: Option<u16>,
}Expand description
HS code prediction result returned by the classification pipeline.
Fields§
§hs_code: StringSix-digit HS 2022 code without punctuation (e.g. "281511").
heading_description: StringOfficial HS 2022 heading description for this code.
confidence: f32Confidence score in the range [0.0, 1.0].
source: PredictionSourceWhich part of the pipeline produced this prediction.
notes: Vec<String>Supplementary notes (shape caveats, concentration notes, etc.).
alternatives: Vec<AlternativePrediction>Alternative HS codes worth considering.
recommended_action: RecommendedActionRecommended next action for the user.
jp_tariff_code: Option<String>Nine-digit Japan statistical item code (統計品目番号).
Based on Japan Customs 実行関税率表. Updated annually; the year used
is indicated by the jp_tariff_year field.
None when no Japan-specific code is registered for this HS heading.
jp_tariff_year: Option<u16>Tariff schedule year used for the jp_tariff_code field (e.g. 2026).
Implementations§
Trait Implementations§
Source§impl Clone for HsPrediction
impl Clone for HsPrediction
Source§fn clone(&self) -> HsPrediction
fn clone(&self) -> HsPrediction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HsPrediction
impl Debug for HsPrediction
Source§impl<'de> Deserialize<'de> for HsPrediction
impl<'de> Deserialize<'de> for HsPrediction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HsPrediction
impl RefUnwindSafe for HsPrediction
impl Send for HsPrediction
impl Sync for HsPrediction
impl Unpin for HsPrediction
impl UnsafeUnpin for HsPrediction
impl UnwindSafe for HsPrediction
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