pub struct RatioUnit {
pub name: String,
pub value: RationalInteger,
pub minimum: Option<RationalInteger>,
pub maximum: Option<RationalInteger>,
pub default_magnitude: Option<RationalInteger>,
}Fields§
§name: String§value: RationalInteger§minimum: Option<RationalInteger>§maximum: Option<RationalInteger>§default_magnitude: Option<RationalInteger>Implementations§
Source§impl RatioUnit
impl RatioUnit
pub fn clear_constraint_magnitudes(&mut self)
Sourcepub fn value_decimal(&self) -> Decimal
pub fn value_decimal(&self) -> Decimal
Unit scale as decimal (schema ratio unit values always commit).
pub fn minimum_decimal(&self) -> Option<Decimal>
pub fn maximum_decimal(&self) -> Option<Decimal>
pub fn default_magnitude_decimal(&self) -> Option<Decimal>
Sourcepub fn maximum_canonical_decimal(&self) -> Option<Decimal>
pub fn maximum_canonical_decimal(&self) -> Option<Decimal>
Maximum bound lifted to canonical ratio space via maximum * value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RatioUnit
impl<'de> Deserialize<'de> for RatioUnit
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 Eq for RatioUnit
impl StructuralPartialEq for RatioUnit
Auto Trait Implementations§
impl Freeze for RatioUnit
impl RefUnwindSafe for RatioUnit
impl Send for RatioUnit
impl Sync for RatioUnit
impl Unpin for RatioUnit
impl UnsafeUnpin for RatioUnit
impl UnwindSafe for RatioUnit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.