pub struct QuantitySpec {
pub base_unit: String,
pub allowed_suffixes: Vec<String>,
pub min: Option<QuantityValue>,
pub max: Option<QuantityValue>,
}Fields§
§base_unit: StringCanonical base unit (e.g., "kg", "m", "s", "B").
allowed_suffixes: Vec<String>Suffixes accepted on input and rendered on output (e.g., ["kg","g","mg"]).
min: Option<QuantityValue>Optional inclusive range, expressed in canonical fixed-point form.
max: Option<QuantityValue>Trait Implementations§
Source§impl Clone for QuantitySpec
impl Clone for QuantitySpec
Source§fn clone(&self) -> QuantitySpec
fn clone(&self) -> QuantitySpec
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 moreAuto Trait Implementations§
impl Freeze for QuantitySpec
impl RefUnwindSafe for QuantitySpec
impl Send for QuantitySpec
impl Sync for QuantitySpec
impl Unpin for QuantitySpec
impl UnsafeUnpin for QuantitySpec
impl UnwindSafe for QuantitySpec
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