Enum sdml_core::model::values::SimpleValue
source · pub enum SimpleValue {
Boolean(bool),
Double(OrderedFloat<f64>),
Decimal(Decimal),
Integer(i64),
Unsigned(u64),
String(LanguageString),
IriReference(Url),
Binary(Binary),
}
Expand description
Corresponds to the grammar rule simple_value
.
Variants§
Boolean(bool)
Corresponds to the grammar rule boolean
.
Double(OrderedFloat<f64>)
Corresponds to the grammar rule double
.
Decimal(Decimal)
Corresponds to the grammar rule decimal
.
Integer(i64)
Corresponds to the grammar rule integer
.
Unsigned(u64)
Corresponds to the grammar rule unsigned
.
String(LanguageString)
Corresponds to the grammar rule string
.
IriReference(Url)
Corresponds to the grammar rule iri_reference
.
Binary(Binary)
Corresponds to the grammar rule binary
.
Implementations§
source§impl SimpleValue
impl SimpleValue
pub const fn is_boolean(&self) -> bool
pub const fn as_boolean(&self) -> Option<&bool>
pub const fn is_double(&self) -> bool
pub const fn as_double(&self) -> Option<&OrderedFloat<f64>>
pub const fn is_decimal(&self) -> bool
pub const fn as_decimal(&self) -> Option<&Decimal>
pub const fn is_integer(&self) -> bool
pub const fn as_integer(&self) -> Option<&i64>
pub const fn is_unsigned(&self) -> bool
pub const fn as_unsigned(&self) -> Option<&u64>
pub const fn is_string(&self) -> bool
pub const fn as_string(&self) -> Option<&LanguageString>
pub const fn is_iri(&self) -> bool
pub const fn as_iri(&self) -> Option<&Url>
pub const fn is_binary(&self) -> bool
pub const fn as_binary(&self) -> Option<&Binary>
Trait Implementations§
source§impl Clone for SimpleValue
impl Clone for SimpleValue
source§fn clone(&self) -> SimpleValue
fn clone(&self) -> SimpleValue
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 SimpleValue
impl Debug for SimpleValue
source§impl<'de> Deserialize<'de> for SimpleValue
impl<'de> Deserialize<'de> for SimpleValue
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 Display for SimpleValue
impl Display for SimpleValue
source§impl From<Binary> for SimpleValue
impl From<Binary> for SimpleValue
source§impl From<Decimal> for SimpleValue
impl From<Decimal> for SimpleValue
source§impl From<LanguageString> for SimpleValue
impl From<LanguageString> for SimpleValue
source§fn from(v: LanguageString) -> Self
fn from(v: LanguageString) -> Self
Converts to this type from the input type.
source§impl From<OrderedFloat<f64>> for SimpleValue
impl From<OrderedFloat<f64>> for SimpleValue
source§fn from(v: OrderedFloat<f64>) -> Self
fn from(v: OrderedFloat<f64>) -> Self
Converts to this type from the input type.
source§impl From<SimpleValue> for EnvironmentDefBody
impl From<SimpleValue> for EnvironmentDefBody
source§fn from(v: SimpleValue) -> Self
fn from(v: SimpleValue) -> Self
Converts to this type from the input type.
source§impl From<SimpleValue> for SequenceMember
impl From<SimpleValue> for SequenceMember
source§fn from(v: SimpleValue) -> Self
fn from(v: SimpleValue) -> Self
Converts to this type from the input type.
source§impl From<SimpleValue> for Value
impl From<SimpleValue> for Value
source§fn from(v: SimpleValue) -> Self
fn from(v: SimpleValue) -> Self
Converts to this type from the input type.
source§impl From<Url> for SimpleValue
impl From<Url> for SimpleValue
source§impl From<bool> for SimpleValue
impl From<bool> for SimpleValue
source§impl From<i64> for SimpleValue
impl From<i64> for SimpleValue
source§impl From<u64> for SimpleValue
impl From<u64> for SimpleValue
Auto Trait Implementations§
impl RefUnwindSafe for SimpleValue
impl Send for SimpleValue
impl Sync for SimpleValue
impl Unpin for SimpleValue
impl UnwindSafe for SimpleValue
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