pub struct Measurement<U> { /* private fields */ }Expand description
Equality compares the unit too: convert before comparing across units.
Implementations§
Source§impl<U: Unit> Measurement<U>
impl<U: Unit> Measurement<U>
Trait Implementations§
Source§impl<U: Unit> Cast for Measurement<U>
Whole thousandths survive the float column exactly. Unordered: the quantity alone would put
500 grams after 2 kilograms.
impl<U: Unit> Cast for Measurement<U>
Whole thousandths survive the float column exactly. Unordered: the quantity alone would put 500 grams after 2 kilograms.
const COLUMNS: &'static [ColumnSpec]
fn encode(&self, out: &mut Vec<SqlValue>)
fn decode(row: &mut dyn ColumnReader) -> Result<Self>
const NULLABLE: bool = false
Source§const SENSITIVE: bool = false
const SENSITIVE: bool = false
A field holding it is never filtered, sorted, listed or searched, as
#[sensitive] ones.Source§const MOVES: Option<fn(&Self) -> Option<&'static Targets>> = None
const MOVES: Option<fn(&Self) -> Option<&'static Targets>> = None
Set for a value moving between listed states; a save of any other value skips the check.
Source§const HOLDS_STATES: bool = _
const HOLDS_STATES: bool = _
Set when a state anywhere in the value is checked on save, as a field’s of several.
fn refuse_unlisted_move( field: &str, stored: &Self, current: &Self, ) -> Result<(), Error>
Source§impl<U: Clone> Clone for Measurement<U>
impl<U: Clone> Clone for Measurement<U>
impl<U: Copy> Copy for Measurement<U>
Source§impl<U: Debug> Debug for Measurement<U>
impl<U: Debug> Debug for Measurement<U>
Source§impl<'de, U: Unit> Deserialize<'de> for Measurement<U>
impl<'de, U: Unit> Deserialize<'de> for Measurement<U>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<U: Eq> Eq for Measurement<U>
Source§impl<U: Unit> Fields for Measurement<U>
impl<U: Unit> Fields for Measurement<U>
Source§impl<U: Unit> Filter for Measurement<U>
Available on crate feature measure only.
impl<U: Unit> Filter for Measurement<U>
Available on crate feature
measure only.Source§impl<U: Hash> Hash for Measurement<U>
impl<U: Hash> Hash for Measurement<U>
Source§impl<U: Unit> LogFields for Measurement<U>
Available on crate feature measure only.
impl<U: Unit> LogFields for Measurement<U>
Available on crate feature
measure only.Source§impl<U: PartialEq> PartialEq for Measurement<U>
impl<U: PartialEq> PartialEq for Measurement<U>
Source§impl<U: Unit> Present for Measurement<U>
impl<U: Unit> Present for Measurement<U>
Source§impl<U: Unit> Serialize for Measurement<U>
impl<U: Unit> Serialize for Measurement<U>
impl<U: PartialEq> StructuralPartialEq for Measurement<U>
Auto Trait Implementations§
impl<U> Freeze for Measurement<U>where
U: Freeze,
impl<U> RefUnwindSafe for Measurement<U>where
U: RefUnwindSafe,
impl<U> Send for Measurement<U>where
U: Send,
impl<U> Sync for Measurement<U>where
U: Sync,
impl<U> Unpin for Measurement<U>where
U: Unpin,
impl<U> UnsafeUnpin for Measurement<U>where
U: UnsafeUnpin,
impl<U> UnwindSafe for Measurement<U>where
U: 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