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 fn plain<S>(content: S) -> Self
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 duplicate 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<&Url> for SimpleValue
impl From<&Url> for SimpleValue
Source§impl From<&bool> for SimpleValue
impl From<&bool> for SimpleValue
Source§impl From<&f64> for SimpleValue
impl From<&f64> for SimpleValue
Source§impl From<&i16> for SimpleValue
impl From<&i16> for SimpleValue
Source§impl From<&i32> for SimpleValue
impl From<&i32> for SimpleValue
Source§impl From<&i64> for SimpleValue
impl From<&i64> for SimpleValue
Source§impl From<&str> for SimpleValue
impl From<&str> for SimpleValue
Source§impl From<&u16> for SimpleValue
impl From<&u16> for SimpleValue
Source§impl From<&u32> for SimpleValue
impl From<&u32> for SimpleValue
Source§impl From<&u64> for SimpleValue
impl From<&u64> 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<String> for SimpleValue
impl From<String> for SimpleValue
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<f64> for SimpleValue
impl From<f64> for SimpleValue
Source§impl From<i16> for SimpleValue
impl From<i16> for SimpleValue
Source§impl From<i32> for SimpleValue
impl From<i32> for SimpleValue
Source§impl From<i64> for SimpleValue
impl From<i64> for SimpleValue
Source§impl From<u16> for SimpleValue
impl From<u16> for SimpleValue
Source§impl From<u32> for SimpleValue
impl From<u32> for SimpleValue
Source§impl From<u64> for SimpleValue
impl From<u64> for SimpleValue
Auto Trait Implementations§
impl Freeze for SimpleValue
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