pub enum PhysicalForm {
Solid,
Powder {
particle_size_um: Option<f64>,
},
Granules,
Liquid,
Solution {
solvent: Option<String>,
concentration_pct_ww: Option<f64>,
},
Gas,
Foil {
thickness_mm: Option<f64>,
},
Ingot,
Unknown,
}Expand description
Physical state / form of the chemical product.
The same compound can have different HS subheadings depending on its form. For example, sodium hydroxide solid → 2815.11, aqueous solution → 2815.12.
Variants§
Solid
Solid bulk material (lumps, pellets, flakes, rods, …).
Powder
Fine-grained powder.
Granules
Coarser granulated product.
Liquid
Pure liquid (not a solution).
Solution
Solution of the substance in a solvent.
Fields
Gas
Gas or vapour.
Foil
Thin metal sheet.
Ingot
Cast metal product (ingot, billet, slab, …).
Unknown
Form not yet determined (initial session value).
Implementations§
Source§impl PhysicalForm
impl PhysicalForm
Sourcepub fn is_solution(&self) -> bool
pub fn is_solution(&self) -> bool
Returns true if this is a solution variant.
Sourcepub fn concentration_pct(&self) -> Option<f64>
pub fn concentration_pct(&self) -> Option<f64>
Returns the concentration (w/w%) if this is a solution with known concentration.
Trait Implementations§
Source§impl Clone for PhysicalForm
impl Clone for PhysicalForm
Source§fn clone(&self) -> PhysicalForm
fn clone(&self) -> PhysicalForm
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 PhysicalForm
impl Debug for PhysicalForm
Source§impl<'de> Deserialize<'de> for PhysicalForm
impl<'de> Deserialize<'de> for PhysicalForm
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
Source§impl PartialEq for PhysicalForm
impl PartialEq for PhysicalForm
Source§fn eq(&self, other: &PhysicalForm) -> bool
fn eq(&self, other: &PhysicalForm) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PhysicalForm
impl Serialize for PhysicalForm
impl StructuralPartialEq for PhysicalForm
Auto Trait Implementations§
impl Freeze for PhysicalForm
impl RefUnwindSafe for PhysicalForm
impl Send for PhysicalForm
impl Sync for PhysicalForm
impl Unpin for PhysicalForm
impl UnsafeUnpin for PhysicalForm
impl UnwindSafe for PhysicalForm
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