Struct nquads_syntax::Quad
source · pub struct Quad<S = Subject<IriBuf, BlankIdBuf>, P = IriBuf, O = Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, G = Subject<IriBuf, BlankIdBuf>>(pub S, pub P, pub O, pub Option<G>);Expand description
RDF quad.
Tuple Fields§
§0: S§1: P§2: O§3: Option<G>Implementations§
source§impl Quad<Subject<IriBuf, BlankIdBuf>, IriBuf, Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Subject<IriBuf, BlankIdBuf>>
impl Quad<Subject<IriBuf, BlankIdBuf>, IriBuf, Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Subject<IriBuf, BlankIdBuf>>
pub fn into_grdf(
self
) -> Quad<Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Term<IriBuf, BlankIdBuf, Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>>
pub fn as_grdf(
&self
) -> Quad<Term<Iri<'_>, &BlankId, &Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Term<Iri<'_>, &BlankId, &Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Term<Iri<'_>, &BlankId, &Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>, Term<Iri<'_>, &BlankId, &Literal<StringLiteral, IriBuf, LanguageTagBuf<Vec<u8, Global>>>>>
source§impl<S, P, O, G> Quad<S, P, O, G>
impl<S, P, O, G> Quad<S, P, O, G>
sourcepub fn new(
subject: S,
predicate: P,
object: O,
graph: Option<G>
) -> Quad<S, P, O, G>
pub fn new(
subject: S,
predicate: P,
object: O,
graph: Option<G>
) -> Quad<S, P, O, G>
Creates a new quad.
sourcepub fn subject(&self) -> &S
pub fn subject(&self) -> &S
Returns a reference to the subject of the quad, the first component.
sourcepub fn into_subject(self) -> S
pub fn into_subject(self) -> S
Turns the quad into its subject, the first component.
sourcepub fn predicate(&self) -> &P
pub fn predicate(&self) -> &P
Returns a reference to the predicate of the quad, the second component.
sourcepub fn into_predicate(self) -> P
pub fn into_predicate(self) -> P
Turns the quad into its predicate, the second component.
sourcepub fn into_object(self) -> O
pub fn into_object(self) -> O
Turns the quad into its object, the third component.
sourcepub fn graph(&self) -> Option<&G>
pub fn graph(&self) -> Option<&G>
Returns a reference to the graph of the quad, the fourth component.
sourcepub fn into_graph(self) -> Option<G>
pub fn into_graph(self) -> Option<G>
Turns the quad into its graph, the fourth component.
pub fn into_parts(self) -> (S, P, O, Option<G>)
Trait Implementations§
source§impl<S, P, O, G> Display for Quad<S, P, O, G>where
S: RdfDisplay,
P: RdfDisplay,
O: RdfDisplay,
G: RdfDisplay,
impl<S, P, O, G> Display for Quad<S, P, O, G>where
S: RdfDisplay,
P: RdfDisplay,
O: RdfDisplay,
G: RdfDisplay,
source§impl<S, P, O, G> Ord for Quad<S, P, O, G>where
S: Ord,
P: Ord,
O: Ord,
G: Ord,
impl<S, P, O, G> Ord for Quad<S, P, O, G>where
S: Ord,
P: Ord,
O: Ord,
G: 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 Quad<Meta<Subject, M>, Meta<IriBuf, M>, Meta<Object<M>, M>, Meta<GraphLabel, M>>
impl<M: Clone> Parse<M> for Quad<Meta<Subject, M>, Meta<IriBuf, M>, Meta<Object<M>, M>, Meta<GraphLabel, M>>
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<M: Clone> Parse<M> for Quad<Meta<Term<M>, M>, Meta<Term<M>, M>, Meta<Term<M>, M>, Meta<Term<M>, M>>
impl<M: Clone> Parse<M> for Quad<Meta<Term<M>, M>, Meta<Term<M>, M>, Meta<Term<M>, M>, Meta<Term<M>, M>>
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<S1, P1, O1, G1, S2, P2, O2, G2> PartialEq<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>where
S1: PartialEq<S2>,
P1: PartialEq<P2>,
O1: PartialEq<O2>,
G1: PartialEq<G2>,
impl<S1, P1, O1, G1, S2, P2, O2, G2> PartialEq<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>where
S1: PartialEq<S2>,
P1: PartialEq<P2>,
O1: PartialEq<O2>,
G1: PartialEq<G2>,
source§impl<S1, P1, O1, G1, S2, P2, O2, G2> PartialOrd<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>where
S1: PartialOrd<S2>,
P1: PartialOrd<P2>,
O1: PartialOrd<O2>,
G1: PartialOrd<G2>,
impl<S1, P1, O1, G1, S2, P2, O2, G2> PartialOrd<Quad<S2, P2, O2, G2>> for Quad<S1, P1, O1, G1>where
S1: PartialOrd<S2>,
P1: PartialOrd<P2>,
O1: PartialOrd<O2>,
G1: PartialOrd<G2>,
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