pub enum Subject<I = IriBuf, B = BlankIdBuf> {
Blank(B),
Iri(I),
}Expand description
RDF Subject.
Either a blank node identifier or an IRI.
Hash implementation
It is guaranteed that the Hash implementation of Subject is
transparent, meaning that the hash of Term::Blank(id) the same as id
and the hash of Subject::Iri(iri) is the same as iri.
Variants§
Implementations§
source§impl<I, B> Subject<I, B>
impl<I, B> Subject<I, B>
pub fn is_blank(&self) -> bool
pub fn is_iri(&self) -> bool
pub fn as_blank(&self) -> Option<&B>
pub fn as_iri(&self) -> Option<&I>
pub fn into_blank(self) -> Option<B>
pub fn into_iri(self) -> Option<I>
pub fn into_term<L>(self) -> Term<I, B, L>
pub fn as_str(&self) -> &strwhere I: AsRef<str>, B: AsRef<str>,
source§impl Subject
impl Subject
pub fn as_subject_ref(&self) -> SubjectRef<'_>
pub fn as_graph_label_ref(&self) -> GraphLabelRef<'_>
pub fn as_term_ref(&self) -> TermRef<'_>
pub fn inserted_into<V: VocabularyMut>( &self, vocabulary: &mut V ) -> Subject<V::Iri, V::BlankId>
pub fn insert_into<V: VocabularyMut>( self, vocabulary: &mut V ) -> Subject<V::Iri, V::BlankId>
Trait Implementations§
source§impl<'a> From<&'a Subject<IriBuf, BlankIdBuf>> for SubjectRef<'a>
impl<'a> From<&'a Subject<IriBuf, BlankIdBuf>> for SubjectRef<'a>
source§impl<I: Ord, B: Ord> Ord for Subject<I, B>
impl<I: Ord, B: Ord> Ord for Subject<I, B>
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<I1: PartialEq<I2>, B1: PartialEq<B2>, I2, B2> PartialEq<Subject<I2, B2>> for Subject<I1, B1>
impl<I1: PartialEq<I2>, B1: PartialEq<B2>, I2, B2> PartialEq<Subject<I2, B2>> for Subject<I1, B1>
source§impl<I1: PartialOrd<I2>, B1: PartialOrd<B2>, I2, B2> PartialOrd<Subject<I2, B2>> for Subject<I1, B1>
impl<I1: PartialOrd<I2>, B1: PartialOrd<B2>, I2, B2> PartialOrd<Subject<I2, B2>> for Subject<I1, B1>
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 more