pub struct UnitValue<T> {
pub value: T,
pub unit: Option<String>,
}
Expand description
A single value with an optional unit attached to it
Fields§
§value: T
§unit: Option<String>
Implementations§
Trait Implementations§
Source§impl<T: PartialOrd> PartialOrd for UnitValue<T>
impl<T: PartialOrd> PartialOrd for UnitValue<T>
impl<T> StructuralPartialEq for UnitValue<T>
Auto Trait Implementations§
impl<T> Freeze for UnitValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for UnitValue<T>where
T: RefUnwindSafe,
impl<T> Send for UnitValue<T>where
T: Send,
impl<T> Sync for UnitValue<T>where
T: Sync,
impl<T> Unpin for UnitValue<T>where
T: Unpin,
impl<T> UnwindSafe for UnitValue<T>where
T: UnwindSafe,
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