Struct cooklang::quantity::QuantityUnit
source · pub struct QuantityUnit { /* private fields */ }Expand description
Unit text with lazy rich information
Implementations§
source§impl QuantityUnit
impl QuantityUnit
sourcepub fn unit_info(&self) -> Option<UnitInfo>
pub fn unit_info(&self) -> Option<UnitInfo>
Cached information about the unit.
If None is returned it means
the unit has not been parsed yet. Try with Self::unit_info_or_parse.
sourcepub fn unit_info_or_parse(&self, converter: &Converter) -> UnitInfo
pub fn unit_info_or_parse(&self, converter: &Converter) -> UnitInfo
Information about the unit
Trait Implementations§
source§impl Clone for QuantityUnit
impl Clone for QuantityUnit
source§fn clone(&self) -> QuantityUnit
fn clone(&self) -> QuantityUnit
Returns a copy of the value. Read more
1.0.0 · 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 QuantityUnit
impl Debug for QuantityUnit
source§impl<'de> Deserialize<'de> for QuantityUnit
impl<'de> Deserialize<'de> for QuantityUnit
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 Display for QuantityUnit
impl Display for QuantityUnit
Auto Trait Implementations§
impl RefUnwindSafe for QuantityUnit
impl Send for QuantityUnit
impl Sync for QuantityUnit
impl Unpin for QuantityUnit
impl UnwindSafe for QuantityUnit
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