Enum nquads_syntax::Subject
source · 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 Subject<IriBuf, BlankIdBuf>
impl Subject<IriBuf, BlankIdBuf>
pub fn as_subject_ref(&self) -> Subject<Iri<'_>, &BlankId>
pub fn as_graph_label_ref(&self) -> Subject<Iri<'_>, &BlankId>
pub fn as_term_ref(
&self
) -> Term<Iri<'_>, &BlankId, &Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>
Trait Implementations§
source§impl<I, B> Ord for Subject<I, B>where
I: Ord,
B: Ord,
impl<I, B> Ord for Subject<I, B>where
I: Ord,
B: Ord,
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<M: Clone> Parse<M> for Subject
impl<M: Clone> Parse<M> for Subject
fn parse_with<L, F>(
parser: &mut Parser<L, F>
) -> Result<Meta<Self, M>, MetaError<L::Error, M>>where
L: Tokens,
F: FnMut(Span) -> M,
fn parse<C, F, E>(
chars: C,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>where
C: Iterator<Item = Result<DecodedChar, E>>,
F: FnMut(Span) -> M,
fn parse_infallible<C, F>(
chars: C,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error, M>>where
C: Iterator<Item = DecodedChar>,
F: FnMut(Span) -> M,
fn parse_utf8<C, F, E>(
chars: C,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>where
C: Iterator<Item = Result<char, E>>,
F: FnMut(Span) -> M,
fn parse_utf8_infallible<C, F>(
chars: C,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error, M>>where
C: Iterator<Item = char>,
F: FnMut(Span) -> M,
fn parse_utf16<C, F, E>(
chars: C,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>where
C: Iterator<Item = Result<char, E>>,
F: FnMut(Span) -> M,
fn parse_utf16_infallible<C, F>(
chars: C,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error, M>>where
C: Iterator<Item = char>,
F: FnMut(Span) -> M,
fn parse_str<F>(
string: &str,
metadata_builder: F
) -> Result<Meta<Self, M>, MetaError<Error, M>>where
F: FnMut(Span) -> M,
source§impl<I1, B1, I2, B2> PartialEq<Subject<I2, B2>> for Subject<I1, B1>where
I1: PartialEq<I2>,
B1: PartialEq<B2>,
impl<I1, B1, I2, B2> PartialEq<Subject<I2, B2>> for Subject<I1, B1>where
I1: PartialEq<I2>,
B1: PartialEq<B2>,
source§impl<I1, B1, I2, B2> PartialOrd<Subject<I2, B2>> for Subject<I1, B1>where
I1: PartialOrd<I2>,
B1: PartialOrd<B2>,
impl<I1, B1, I2, B2> PartialOrd<Subject<I2, B2>> for Subject<I1, B1>where
I1: PartialOrd<I2>,
B1: PartialOrd<B2>,
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