pub enum NumericUnion {
Decimal(Decimal),
Double(f64),
Float(f32),
Integer(i64),
}
Expand description
A datatype that is the union of numeric xsd data types. “numericUnion” is equivalent to the xsd specification that uses an xsd:union of memberTypes=“xsd:decimal xsd:double xsd:float xsd:integer”.
ID: http://www.linkedmodel.org/schema/dtype#numericUnion
Variants§
Decimal(Decimal)
decimal represents a subset of the real numbers, which can be represented by decimal numerals.
Double(f64)
The double datatype is patterned after the IEEE double-precision 64-bit floating point type [IEEE 754-1985].
Float(f32)
float is patterned after the IEEE single-precision 32-bit floating point type [IEEE 754-1985].
Integer(i64)
integer is ·derived· from decimal by fixing the value of ·fractionDigits· to be 0and disallowing the trailing decimal point.
Implementations§
Source§impl NumericUnion
impl NumericUnion
Sourcepub fn is_negative(&self) -> bool
pub fn is_negative(&self) -> bool
Determine if this value is negative
Trait Implementations§
Source§impl Clone for NumericUnion
impl Clone for NumericUnion
Source§fn clone(&self) -> NumericUnion
fn clone(&self) -> NumericUnion
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 NumericUnion
impl Debug for NumericUnion
Source§impl<'de> Deserialize<'de> for NumericUnion
impl<'de> Deserialize<'de> for NumericUnion
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 From<Decimal> for NumericUnion
impl From<Decimal> for NumericUnion
Source§impl From<f32> for NumericUnion
impl From<f32> for NumericUnion
Source§impl From<f64> for NumericUnion
impl From<f64> for NumericUnion
Source§impl From<i64> for NumericUnion
impl From<i64> for NumericUnion
Source§impl PartialEq for NumericUnion
impl PartialEq for NumericUnion
Source§impl Serialize for NumericUnion
impl Serialize for NumericUnion
impl StructuralPartialEq for NumericUnion
Auto Trait Implementations§
impl Freeze for NumericUnion
impl RefUnwindSafe for NumericUnion
impl Send for NumericUnion
impl Sync for NumericUnion
impl Unpin for NumericUnion
impl UnwindSafe for NumericUnion
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