pub struct Unit {
pub quantity: Option<String>,
pub ids: Vec<String>,
pub dimensions: Option<UnitDimensions>,
pub scale: f64,
pub offset: f64,
}Fields
quantity: Option<String>ids: Vec<String>dimensions: Option<UnitDimensions>scale: f64offset: f64Implementations
Trait Implementations
sourceimpl From<&str> for &Unit
impl From<&str> for &Unit
Make a Haystack Unit from a &str slice
If no unit is found, the default empty unit is returned
sourceimpl PartialOrd<Unit> for Unit
impl PartialOrd<Unit> for Unit
sourcefn partial_cmp(&self, other: &Unit) -> Option<Ordering>
fn partial_cmp(&self, other: &Unit) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Unit
Auto Trait Implementations
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more