pub struct LiteralRef<'a, I = IriBuf> {
pub value: &'a str,
pub type_: LiteralTypeRef<'a, I>,
}
Expand description
RDF Literal reference.
Fields§
§value: &'a str
Literal value.
type_: LiteralTypeRef<'a, I>
Literal type.
Implementations§
Source§impl<'a, I> LiteralRef<'a, I>
impl<'a, I> LiteralRef<'a, I>
pub fn new(value: &'a str, type_: LiteralTypeRef<'a, I>) -> Self
pub fn as_type(&self) -> LiteralTypeRef<'a, I>
pub fn as_type_mut(&mut self) -> &mut LiteralTypeRef<'a, I>
pub fn into_type(self) -> LiteralTypeRef<'a, I>
pub fn as_value(&self) -> &'a str
pub fn into_value(self) -> &'a str
pub fn into_parts(self) -> (&'a str, LiteralTypeRef<'a, I>)
pub fn as_str(&self) -> &'a str
pub fn as_bytes(&self) -> &'a [u8] ⓘ
pub fn is_lang_string(&self) -> bool
pub fn lang_tag(&self) -> Option<&'a LangTag>
pub fn insert_type_into_vocabulary<V>(
self,
vocabulary: &mut V,
) -> Literal<I::Embedded>where
I: EmbeddedIntoVocabulary<V>,
pub fn inserted_type_into_vocabulary<V>(
&self,
vocabulary: &mut V,
) -> Literal<I::Embedded>where
I: EmbeddedIntoVocabulary<V>,
Source§impl<I: ToOwned> LiteralRef<'_, I>
impl<I: ToOwned> LiteralRef<'_, I>
pub fn into_owned(self) -> Literal<I::Owned>
Source§impl<'a, I> LiteralRef<'a, I>
impl<'a, I> LiteralRef<'a, I>
pub fn cast_into_owned<J>(self) -> Literal<J>
Trait Implementations§
Source§impl<I> AsRef<str> for LiteralRef<'_, I>
impl<I> AsRef<str> for LiteralRef<'_, I>
Source§impl<I> Borrow<str> for LiteralRef<'_, I>
impl<I> Borrow<str> for LiteralRef<'_, I>
Source§impl<'a, I> Clone for LiteralRef<'a, I>
impl<'a, I> Clone for LiteralRef<'a, I>
Source§impl<'a, I: Debug> Debug for LiteralRef<'a, I>
impl<'a, I: Debug> Debug for LiteralRef<'a, I>
Source§impl Display for LiteralRef<'_>
impl Display for LiteralRef<'_>
Source§impl<V: LiteralVocabularyMut> EmbedIntoVocabulary<V> for LiteralRef<'_, V::Iri>
impl<V: LiteralVocabularyMut> EmbedIntoVocabulary<V> for LiteralRef<'_, V::Iri>
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<V: LiteralVocabularyMut> EmbeddedIntoVocabulary<V> for LiteralRef<'_, V::Iri>
impl<V: LiteralVocabularyMut> EmbeddedIntoVocabulary<V> for LiteralRef<'_, V::Iri>
type Embedded = <V as LiteralVocabulary>::Literal
fn embedded_into_vocabulary(&self, vocabulary: &mut V) -> Self::Embedded
Source§impl<V: IriVocabulary> ExtractFromVocabulary<V> for LiteralRef<'_, V::Iri>
impl<V: IriVocabulary> ExtractFromVocabulary<V> for LiteralRef<'_, V::Iri>
Source§impl<V: IriVocabulary> ExtractedFromVocabulary<V> for LiteralRef<'_, V::Iri>
impl<V: IriVocabulary> ExtractedFromVocabulary<V> for LiteralRef<'_, V::Iri>
Source§impl<'a, I: Hash> Hash for LiteralRef<'a, I>
impl<'a, I: Hash> Hash for LiteralRef<'a, I>
Source§impl<'a, I: Ord> Ord for LiteralRef<'a, I>
impl<'a, I: Ord> Ord for LiteralRef<'a, I>
Source§fn cmp(&self, other: &LiteralRef<'a, I>) -> Ordering
fn cmp(&self, other: &LiteralRef<'a, I>) -> Ordering
1.21.0 · 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, I: PartialEq> PartialEq for LiteralRef<'a, I>
impl<'a, I: PartialEq> PartialEq for LiteralRef<'a, I>
Source§impl<'a, I: PartialOrd> PartialOrd for LiteralRef<'a, I>
impl<'a, I: PartialOrd> PartialOrd for LiteralRef<'a, I>
Source§impl<I: RdfDisplay + IsXsdStringIri> RdfDisplay for LiteralRef<'_, I>
impl<I: RdfDisplay + IsXsdStringIri> RdfDisplay for LiteralRef<'_, I>
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, I, L: TryFrom<LiteralRef<'a, I>>> TryFrom<LiteralRef<'a, I>> for LiteralOrIndex<L>
impl<'a, I, L: TryFrom<LiteralRef<'a, I>>> TryFrom<LiteralRef<'a, I>> for LiteralOrIndex<L>
Source§impl<'a, T> TryFrom<LiteralRef<'a, T>> for LiteralIndex
impl<'a, T> TryFrom<LiteralRef<'a, T>> for LiteralIndex
impl<'a, I> Copy for LiteralRef<'a, I>
impl<'a, I: Eq> Eq for LiteralRef<'a, I>
impl<'a, I> StructuralPartialEq for LiteralRef<'a, I>
Auto Trait Implementations§
impl<'a, I> Freeze for LiteralRef<'a, I>
impl<'a, I> RefUnwindSafe for LiteralRef<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for LiteralRef<'a, I>where
I: Sync,
impl<'a, I> Sync for LiteralRef<'a, I>where
I: Sync,
impl<'a, I> Unpin for LiteralRef<'a, I>
impl<'a, I> UnwindSafe for LiteralRef<'a, I>where
I: RefUnwindSafe,
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§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.