pub struct LiteralRef<'a, I = IriBuf> {
pub value: &'a str,
pub type_: LiteralTypeRef<'a, I>,
}Expand description
RDF Literal reference.
Fields§
§value: &'a strLiteral 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>) -> LiteralRef<'a, I>
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 as EmbeddedIntoVocabulary<V>>::Embedded>where
I: EmbeddedIntoVocabulary<V>,
pub fn inserted_type_into_vocabulary<V>(
&self,
vocabulary: &mut V,
) -> Literal<<I as EmbeddedIntoVocabulary<V>>::Embedded>where
I: EmbeddedIntoVocabulary<V>,
Source§impl<I> LiteralRef<'_, I>where
I: ToOwned,
impl<I> LiteralRef<'_, I>where
I: ToOwned,
pub fn into_owned(self) -> Literal<<I as ToOwned>::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§fn clone(&self) -> LiteralRef<'a, I>
fn clone(&self) -> LiteralRef<'a, I>
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<'a, I> Debug for LiteralRef<'a, I>where
I: Debug,
impl<'a, I> Debug for LiteralRef<'a, I>where
I: Debug,
Source§impl Display for LiteralRef<'_>
impl Display for LiteralRef<'_>
Source§impl<'a, V> DisplayWithContext<V> for LiteralRef<'a, <V as IriVocabulary>::Iri>
Available on crate feature contextual only.
impl<'a, V> DisplayWithContext<V> for LiteralRef<'a, <V as IriVocabulary>::Iri>
Available on crate feature
contextual only.Source§impl<V> EmbedIntoVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>
impl<V> EmbedIntoVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::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, ) -> <LiteralRef<'_, <V as IriVocabulary>::Iri> as EmbedIntoVocabulary<V>>::Embedded
Source§impl<V> EmbeddedIntoVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>
impl<V> EmbeddedIntoVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>
type Embedded = <V as LiteralVocabulary>::Literal
fn embedded_into_vocabulary( &self, vocabulary: &mut V, ) -> <LiteralRef<'_, <V as IriVocabulary>::Iri> as EmbeddedIntoVocabulary<V>>::Embedded
Source§impl<V> ExtractFromVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>where
V: IriVocabulary,
impl<V> ExtractFromVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>where
V: IriVocabulary,
type Extracted = Literal
fn extract_from_vocabulary( self, vocabulary: &V, ) -> <LiteralRef<'_, <V as IriVocabulary>::Iri> as ExtractFromVocabulary<V>>::Extracted
Source§impl<V> ExtractedFromVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>where
V: IriVocabulary,
impl<V> ExtractedFromVocabulary<V> for LiteralRef<'_, <V as IriVocabulary>::Iri>where
V: IriVocabulary,
type Extracted = Literal
Source§fn extracted_from_vocabulary(
&self,
vocabulary: &V,
) -> <LiteralRef<'_, <V as IriVocabulary>::Iri> as ExtractedFromVocabulary<V>>::Extracted
fn extracted_from_vocabulary( &self, vocabulary: &V, ) -> <LiteralRef<'_, <V as IriVocabulary>::Iri> as ExtractedFromVocabulary<V>>::Extracted
Exports a value embedded into the vocabulary
V. Read moreSource§impl<'a, I> Hash for LiteralRef<'a, I>where
I: Hash,
impl<'a, I> Hash for LiteralRef<'a, I>where
I: Hash,
Source§impl<'a, I> Ord for LiteralRef<'a, I>where
I: Ord,
impl<'a, I> Ord for LiteralRef<'a, I>where
I: Ord,
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 for LiteralRef<'a, I>where
I: PartialEq,
impl<'a, I> PartialEq for LiteralRef<'a, I>where
I: PartialEq,
Source§impl<'a, I> PartialOrd for LiteralRef<'a, I>where
I: PartialOrd,
impl<'a, I> PartialOrd for LiteralRef<'a, I>where
I: PartialOrd,
Source§impl<I> RdfDisplay for LiteralRef<'_, I>where
I: RdfDisplay + IsXsdStringIri,
impl<I> RdfDisplay for LiteralRef<'_, I>where
I: RdfDisplay + IsXsdStringIri,
Source§impl<'a, V> RdfDisplayWithContext<V> for LiteralRef<'a, <V as IriVocabulary>::Iri>
Available on crate feature contextual only.
impl<'a, V> RdfDisplayWithContext<V> for LiteralRef<'a, <V as IriVocabulary>::Iri>
Available on crate feature
contextual only.Source§impl<'a, I, L> TryFrom<LiteralRef<'a, I>> for LiteralOrIndex<L>where
L: TryFrom<LiteralRef<'a, I>>,
impl<'a, I, L> TryFrom<LiteralRef<'a, I>> for LiteralOrIndex<L>where
L: TryFrom<LiteralRef<'a, I>>,
Source§type Error = <L as TryFrom<LiteralRef<'a, I>>>::Error
type Error = <L as TryFrom<LiteralRef<'a, I>>>::Error
The type returned in the event of a conversion error.
Source§fn try_from(
literal: LiteralRef<'a, I>,
) -> Result<LiteralOrIndex<L>, <LiteralOrIndex<L> as TryFrom<LiteralRef<'a, I>>>::Error>
fn try_from( literal: LiteralRef<'a, I>, ) -> Result<LiteralOrIndex<L>, <LiteralOrIndex<L> as TryFrom<LiteralRef<'a, I>>>::Error>
Performs the conversion.
Source§impl<'a, T> TryFrom<LiteralRef<'a, T>> for LiteralIndex
impl<'a, T> TryFrom<LiteralRef<'a, T>> for LiteralIndex
Source§fn try_from(
_value: LiteralRef<'a, T>,
) -> Result<LiteralIndex, <LiteralIndex as TryFrom<LiteralRef<'a, T>>>::Error>
fn try_from( _value: LiteralRef<'a, T>, ) -> Result<LiteralIndex, <LiteralIndex as TryFrom<LiteralRef<'a, T>>>::Error>
Performs the conversion.
impl<'a, I> Copy for LiteralRef<'a, I>
impl<'a, I> Eq for LiteralRef<'a, I>where
I: Eq,
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> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
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.