pub enum LiteralType<I = IriBuf> {
Any(I),
LangString(LangTagBuf),
}
Expand description
RDF literal type.
Variants§
Implementations§
Source§impl<I> LiteralType<I>
impl<I> LiteralType<I>
pub fn is_lang_string(&self) -> bool
pub fn lang_tag(&self) -> Option<&LangTag>
pub fn is_xsd_string_with( &self, vocabulary: &impl IriVocabulary<Iri = I>, ) -> bool
pub fn is_xsd_string(&self) -> boolwhere
I: IsXsdStringIri,
pub fn is_iri(&self, iri: &I) -> boolwhere
I: PartialEq,
pub fn as_ref(&self) -> LiteralTypeRef<'_, I>
pub fn as_lexical_type_ref_with<'a>( &'a self, vocabulary: &'a impl IriVocabulary<Iri = I>, ) -> LexicalLiteralTypeRef<'a>
Source§impl LiteralType
impl LiteralType
pub fn as_lexical_type_ref(&self) -> LexicalLiteralTypeRef<'_>
Trait Implementations§
Source§impl<I: Clone> Clone for LiteralType<I>
impl<I: Clone> Clone for LiteralType<I>
Source§fn clone(&self) -> LiteralType<I>
fn clone(&self) -> LiteralType<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<I: Debug> Debug for LiteralType<I>
impl<I: Debug> Debug for LiteralType<I>
Source§impl<V, I: EmbedIntoVocabulary<V>> EmbedIntoVocabulary<V> for LiteralType<I>
impl<V, I: EmbedIntoVocabulary<V>> EmbedIntoVocabulary<V> for LiteralType<I>
Source§type Embedded = LiteralType<<I as EmbedIntoVocabulary<V>>::Embedded>
type Embedded = LiteralType<<I as EmbedIntoVocabulary<V>>::Embedded>
Type of the value once embedded into the vocabulary.
fn embed_into_vocabulary(self, vocabulary: &mut V) -> Self::Embedded
Source§impl<V, I: EmbeddedIntoVocabulary<V>> EmbeddedIntoVocabulary<V> for LiteralType<I>
impl<V, I: EmbeddedIntoVocabulary<V>> EmbeddedIntoVocabulary<V> for LiteralType<I>
type Embedded = LiteralType<<I as EmbeddedIntoVocabulary<V>>::Embedded>
fn embedded_into_vocabulary(&self, vocabulary: &mut V) -> Self::Embedded
Source§impl<V: IriVocabulary> ExtractFromVocabulary<V> for LiteralType<V::Iri>
impl<V: IriVocabulary> ExtractFromVocabulary<V> for LiteralType<V::Iri>
type Extracted = LiteralType
fn extract_from_vocabulary(self, vocabulary: &V) -> Self::Extracted
Source§impl<V: IriVocabulary> ExtractedFromVocabulary<V> for LiteralType<V::Iri>
impl<V: IriVocabulary> ExtractedFromVocabulary<V> for LiteralType<V::Iri>
type Extracted = LiteralType
Source§impl<I: Hash> Hash for LiteralType<I>
impl<I: Hash> Hash for LiteralType<I>
Source§impl<I: Ord> Ord for LiteralType<I>
impl<I: Ord> Ord for LiteralType<I>
Source§fn cmp(&self, other: &LiteralType<I>) -> Ordering
fn cmp(&self, other: &LiteralType<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<I: PartialEq> PartialEq<LiteralType<I>> for LiteralTypeRef<'_, I>
impl<I: PartialEq> PartialEq<LiteralType<I>> for LiteralTypeRef<'_, I>
Source§impl<'a, I: PartialEq> PartialEq<LiteralTypeRef<'a, I>> for LiteralType<I>
impl<'a, I: PartialEq> PartialEq<LiteralTypeRef<'a, I>> for LiteralType<I>
Source§impl<I: PartialEq> PartialEq for LiteralType<I>
impl<I: PartialEq> PartialEq for LiteralType<I>
Source§impl<I: PartialOrd> PartialOrd for LiteralType<I>
impl<I: PartialOrd> PartialOrd for LiteralType<I>
Source§impl<I: RdfDisplay> RdfDisplay for LiteralType<I>
impl<I: RdfDisplay> RdfDisplay for LiteralType<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.
impl<I: Eq> Eq for LiteralType<I>
impl<I> StructuralPartialEq for LiteralType<I>
Auto Trait Implementations§
impl<I> Freeze for LiteralType<I>where
I: Freeze,
impl<I> RefUnwindSafe for LiteralType<I>where
I: RefUnwindSafe,
impl<I> Send for LiteralType<I>where
I: Send,
impl<I> Sync for LiteralType<I>where
I: Sync,
impl<I> Unpin for LiteralType<I>where
I: Unpin,
impl<I> UnwindSafe for LiteralType<I>where
I: UnwindSafe,
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.