pub enum Literal {
StringLiteral {
lexical_form: String,
lang: Option<Lang>,
},
DatatypeLiteral {
lexical_form: String,
datatype: IriRef,
},
NumericLiteral(NumericLiteral),
BooleanLiteral(bool),
}
Variants§
Implementations§
Source§impl Literal
impl Literal
pub fn integer(n: isize) -> Literal
pub fn double(d: f64) -> Literal
pub fn decimal(d: Decimal) -> Literal
pub fn datatype(lexical_form: &str, datatype: &IriRef) -> Literal
pub fn boolean(b: bool) -> Literal
pub fn str(lexical_form: &str) -> Literal
pub fn lang_str(lexical_form: &str, lang: Lang) -> Literal
pub fn lexical_form(&self) -> String
pub fn numeric_value(&self) -> Option<NumericLiteral>
Trait Implementations§
Source§impl Deref for Literal
impl Deref for Literal
fn deref( &self, base: &Option<IriS>, prefixmap: &Option<PrefixMap>, ) -> Result<Self, DerefError>
fn deref_opt<T>(
maybe: &Option<T>,
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Option<T>, DerefError>where
T: Deref,
fn deref_opt_box<T>(
maybe: &Option<Box<T>>,
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Option<Box<T>>, DerefError>where
T: Deref,
fn deref_vec<T>(
ts: &[T],
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Vec<T>, DerefError>where
T: Deref,
fn deref_vec_box<T>(
ts: &[Box<T>],
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Vec<T>, DerefError>where
T: Deref,
fn deref_opt_vec<T>(
maybe_ts: &Option<Vec<T>>,
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Option<Vec<T>>, DerefError>where
T: Deref,
Source§impl<'de> Deserialize<'de> for Literal
impl<'de> Deserialize<'de> for Literal
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
impl Eq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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,
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.