Struct rdf_types::LiteralRef
source · 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<'a, I: ToOwned> LiteralRef<'a, I>
impl<'a, I: ToOwned> LiteralRef<'a, 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<'a, I> AsRef<str> for LiteralRef<'a, I>
impl<'a, I> AsRef<str> for LiteralRef<'a, I>
source§impl<'a, I> Borrow<str> for LiteralRef<'a, I>
impl<'a, I> Borrow<str> for LiteralRef<'a, 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<'a> Display for LiteralRef<'a>
impl<'a> Display for LiteralRef<'a>
source§impl<'a, V: LiteralVocabularyMut> EmbedIntoVocabulary<V> for LiteralRef<'a, V::Iri>
impl<'a, V: LiteralVocabularyMut> EmbedIntoVocabulary<V> for LiteralRef<'a, V::Iri>
§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, V::Iri>
impl<'a, V: LiteralVocabularyMut> EmbeddedIntoVocabulary<V> for LiteralRef<'a, V::Iri>
type Embedded = <V as LiteralVocabulary>::Literal
fn embedded_into_vocabulary(&self, vocabulary: &mut V) -> Self::Embedded
source§impl<'a, V: IriVocabulary> ExtractFromVocabulary<V> for LiteralRef<'a, V::Iri>
impl<'a, V: IriVocabulary> ExtractFromVocabulary<V> for LiteralRef<'a, V::Iri>
source§impl<'a, V: IriVocabulary> ExtractedFromVocabulary<V> for LiteralRef<'a, V::Iri>
impl<'a, V: IriVocabulary> ExtractedFromVocabulary<V> for LiteralRef<'a, 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<Literal<I>> for LiteralRef<'a, I>
impl<'a, I: PartialEq> PartialEq<Literal<I>> for LiteralRef<'a, I>
source§impl<'a, I: PartialEq> PartialEq<LiteralRef<'a, I>> for Literal<I>
impl<'a, I: PartialEq> PartialEq<LiteralRef<'a, I>> for Literal<I>
source§fn eq(&self, other: &LiteralRef<'a, I>) -> bool
fn eq(&self, other: &LiteralRef<'a, I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a, I: PartialEq> PartialEq for LiteralRef<'a, I>
impl<'a, I: PartialEq> PartialEq for LiteralRef<'a, I>
source§fn eq(&self, other: &LiteralRef<'a, I>) -> bool
fn eq(&self, other: &LiteralRef<'a, I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a, I: PartialOrd> PartialOrd for LiteralRef<'a, I>
impl<'a, I: PartialOrd> PartialOrd for LiteralRef<'a, I>
source§fn partial_cmp(&self, other: &LiteralRef<'a, I>) -> Option<Ordering>
fn partial_cmp(&self, other: &LiteralRef<'a, I>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, I: RdfDisplay + IsXsdStringIri> RdfDisplay for LiteralRef<'a, I>
impl<'a, I: RdfDisplay + IsXsdStringIri> RdfDisplay for LiteralRef<'a, 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<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.