pub struct ProductInput {
pub trade_name: String,
pub other_names: Vec<String>,
pub supplier: SupplierInput,
pub components: Vec<ComponentInput>,
pub measured_properties: MeasuredPropertiesInput,
pub evidence: Vec<EvidenceSource>,
}Expand description
Raw input to the generate feature: a product’s identity, supplier,
formulation, and any measured-property evidence. This is the domain
model — deliberately separate from the MHLW-schema SdsRoot in
crate::schema, which is the output shape.
Derives Default for the same reason as SupplierInput — test
ergonomics for the new fields, not a meaningful default product.
Deliberately NOT #[serde(default)] on the struct itself: trade_name,
supplier, and components must remain required keys in the input
file. Only the three fields below whose omission has an unambiguous
meaning (“nothing was supplied”) get #[serde(default)].
Fields§
§trade_name: String§other_names: Vec<String>§supplier: SupplierInput§components: Vec<ComponentInput>§measured_properties: MeasuredPropertiesInputMeasured-property evidence for the seven safety-sensitive
properties Section 1/3 generation alone can never resolve — see
docs/sdsforge-architecture.md’s “Properties that require
product-level evidence” table and
super::unresolved::PRODUCT_LEVEL_POLICIES. Omitting this key
means no measured-property evidence was supplied at all — the same
as measured_properties: {} — never a parse error.
evidence: Vec<EvidenceSource>The evidence sources referenced by measured_properties entries’
evidence_id fields. An entry whose evidence_id doesn’t resolve
here can never become Confirmed — see the resolution logic in
super::result. Omitting this key means no evidence was supplied.
Trait Implementations§
Source§impl Clone for ProductInput
impl Clone for ProductInput
Source§fn clone(&self) -> ProductInput
fn clone(&self) -> ProductInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProductInput
impl Debug for ProductInput
Source§impl Default for ProductInput
impl Default for ProductInput
Source§fn default() -> ProductInput
fn default() -> ProductInput
Source§impl<'de> Deserialize<'de> for ProductInput
impl<'de> Deserialize<'de> for ProductInput
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>,
Auto Trait Implementations§
impl Freeze for ProductInput
impl RefUnwindSafe for ProductInput
impl Send for ProductInput
impl Sync for ProductInput
impl Unpin for ProductInput
impl UnsafeUnpin for ProductInput
impl UnwindSafe for ProductInput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more