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

source

pub const fn is_boolean(&self) -> bool

source

pub const fn as_boolean(&self) -> Option<&bool>

source

pub const fn is_double(&self) -> bool

source

pub const fn as_double(&self) -> Option<&OrderedFloat<f64>>

source

pub const fn is_decimal(&self) -> bool

source

pub const fn as_decimal(&self) -> Option<&Decimal>

source

pub const fn is_integer(&self) -> bool

source

pub const fn as_integer(&self) -> Option<&i64>

source

pub const fn is_unsigned(&self) -> bool

source

pub const fn as_unsigned(&self) -> Option<&u64>

source

pub const fn is_string(&self) -> bool

source

pub const fn as_string(&self) -> Option<&LanguageString>

source

pub const fn is_iri(&self) -> bool

source

pub const fn as_iri(&self) -> Option<&Url>

source

pub const fn is_binary(&self) -> bool

source

pub const fn as_binary(&self) -> Option<&Binary>

Trait Implementations§

source§

impl Clone for SimpleValue

source§

fn clone(&self) -> SimpleValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SimpleValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SimpleValue

source§

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Binary> for SimpleValue

source§

fn from(v: Binary) -> Self

Converts to this type from the input type.
source§

impl From<Decimal> for SimpleValue

source§

fn from(v: Decimal) -> Self

Converts to this type from the input type.
source§

impl From<LanguageString> for SimpleValue

source§

fn from(v: LanguageString) -> Self

Converts to this type from the input type.
source§

impl From<OrderedFloat<f64>> for SimpleValue

source§

fn from(v: OrderedFloat<f64>) -> Self

Converts to this type from the input type.
source§

impl From<SimpleValue> for EnvironmentDefBody

source§

fn from(v: SimpleValue) -> Self

Converts to this type from the input type.
source§

impl From<SimpleValue> for SequenceMember

source§

fn from(v: SimpleValue) -> Self

Converts to this type from the input type.
source§

impl From<SimpleValue> for Value

source§

fn from(v: SimpleValue) -> Self

Converts to this type from the input type.
source§

impl From<Url> for SimpleValue

source§

fn from(v: Url) -> Self

Converts to this type from the input type.
source§

impl From<bool> for SimpleValue

source§

fn from(v: bool) -> Self

Converts to this type from the input type.
source§

impl From<i64> for SimpleValue

source§

fn from(v: i64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for SimpleValue

source§

fn from(v: u64) -> Self

Converts to this type from the input type.
source§

impl Serialize for SimpleValue

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,