pub struct LiteralRef<'a> {
pub value: &'a str,
pub type_: LiteralTypeRef<'a>,
}Expand description
RDF Literal reference.
Fields§
§value: &'a strLiteral value.
type_: LiteralTypeRef<'a>Literal type.
Implementations§
Source§impl<'a> LiteralRef<'a>
impl<'a> LiteralRef<'a>
pub const fn new(value: &'a str, type_: LiteralTypeRef<'a>) -> Self
pub const fn as_type(&self) -> LiteralTypeRef<'a>
pub const fn as_type_mut(&mut self) -> &mut LiteralTypeRef<'a>
pub const fn into_type(self) -> LiteralTypeRef<'a>
pub const fn as_value(&self) -> &'a str
pub const fn into_value(self) -> &'a str
pub const fn into_parts(self) -> (&'a str, LiteralTypeRef<'a>)
pub const fn as_str(&self) -> &'a str
pub fn as_bytes(&self) -> &'a [u8] ⓘ
pub const fn is_lang_string(&self) -> bool
pub const fn is_undirected_lang_string(&self) -> bool
pub const fn is_dir_lang_string(&self) -> bool
pub const fn lang_tag(&self) -> Option<&'a LangTag>
pub const fn direction(&self) -> Option<Direction>
pub fn into_cow(self) -> CowLiteral<'a>
Trait Implementations§
Source§impl AsRef<str> for LiteralRef<'_>
impl AsRef<str> for LiteralRef<'_>
Source§impl Borrow<str> for LiteralRef<'_>
impl Borrow<str> for LiteralRef<'_>
Source§impl<'a> Clone for LiteralRef<'a>
impl<'a> Clone for LiteralRef<'a>
impl<'a> Copy for LiteralRef<'a>
Source§impl<'a> Debug for LiteralRef<'a>
impl<'a> Debug for LiteralRef<'a>
Source§impl Display for LiteralRef<'_>
impl Display for LiteralRef<'_>
Source§impl<'a, V: LiteralVocabularyMut> EmbedIntoVocabulary<V> for LiteralRef<'a>
impl<'a, V: LiteralVocabularyMut> EmbedIntoVocabulary<V> for LiteralRef<'a>
Source§type Embedded = <V as LiteralVocabulary>::Literal
type Embedded = <V as LiteralVocabulary>::Literal
Type of the value once embedded into the vocabulary.
fn embed_into_vocabulary(self, vocabulary: &mut V) -> Self::Embedded
Source§impl<'a, V: LiteralVocabularyMut> EmbeddedIntoVocabulary<V> for LiteralRef<'a>
impl<'a, V: LiteralVocabularyMut> EmbeddedIntoVocabulary<V> for LiteralRef<'a>
type Embedded = <V as LiteralVocabulary>::Literal
fn embedded_into_vocabulary(&self, vocabulary: &mut V) -> Self::Embedded
impl<'a> Eq for LiteralRef<'a>
Source§impl Equivalent<Literal> for LiteralRef<'_>
impl Equivalent<Literal> for LiteralRef<'_>
Source§fn equivalent(&self, key: &Literal) -> bool
fn equivalent(&self, key: &Literal) -> bool
Compare self to
key and return true if they are equal.Source§impl<'a> Hash for LiteralRef<'a>
impl<'a> Hash for LiteralRef<'a>
impl IsObject for LiteralRef<'_>
Source§impl<'a> Ord for LiteralRef<'a>
impl<'a> Ord for LiteralRef<'a>
Source§fn cmp(&self, other: &LiteralRef<'a>) -> Ordering
fn cmp(&self, other: &LiteralRef<'a>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for LiteralRef<'a>
impl<'a> PartialEq for LiteralRef<'a>
Source§impl PartialEq<Literal> for LiteralRef<'_>
impl PartialEq<Literal> for LiteralRef<'_>
Source§impl<'a> PartialEq<LiteralRef<'a>> for Literal
impl<'a> PartialEq<LiteralRef<'a>> for Literal
Source§impl<'a> PartialOrd for LiteralRef<'a>
impl<'a> PartialOrd for LiteralRef<'a>
Source§impl PartialOrd<Literal> for LiteralRef<'_>
impl PartialOrd<Literal> for LiteralRef<'_>
Source§impl<'a> PartialOrd<LiteralRef<'a>> for Literal
impl<'a> PartialOrd<LiteralRef<'a>> for Literal
Source§impl RdfDisplay for LiteralRef<'_>
impl RdfDisplay for LiteralRef<'_>
Source§fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
fn rdf_fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter.
Source§fn rdf_display(&self) -> RdfDisplayed<&Self>
fn rdf_display(&self) -> RdfDisplayed<&Self>
Prepare the value to be formatted as an RDF syntax element.
Source§impl<'a> Serialize for LiteralRef<'a>
impl<'a> Serialize for LiteralRef<'a>
impl<'a> StructuralPartialEq for LiteralRef<'a>
Source§impl<'a> TryFrom<LiteralRef<'a>> for LiteralIndex
impl<'a> TryFrom<LiteralRef<'a>> for LiteralIndex
Source§impl<'a, L: TryFrom<LiteralRef<'a>>> TryFrom<LiteralRef<'a>> for LiteralOrIndex<L>
impl<'a, L: TryFrom<LiteralRef<'a>>> TryFrom<LiteralRef<'a>> for LiteralOrIndex<L>
Auto Trait Implementations§
impl<'a> Freeze for LiteralRef<'a>
impl<'a> RefUnwindSafe for LiteralRef<'a>
impl<'a> Send for LiteralRef<'a>
impl<'a> Sync for LiteralRef<'a>
impl<'a> Unpin for LiteralRef<'a>
impl<'a> UnsafeUnpin for LiteralRef<'a>
impl<'a> UnwindSafe for LiteralRef<'a>
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> Comparable<K> for Q
impl<Q, K> Comparable<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.