#[non_exhaustive]pub enum TripleComponent {
Variable(String),
Iri(String),
Literal(Value),
LangLiteral {
value: String,
lang: String,
},
BlankNode(String),
}Expand description
A component of a triple pattern.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Variable(String)
A variable to bind.
Iri(String)
A constant IRI.
Literal(Value)
A constant literal value.
LangLiteral
A language-tagged string literal (RDF rdf:langString).
Carries the lexical value and the BCP47 language tag separately so that the tag survives the translator to planner to RDF store round-trip.
BlankNode(String)
A blank node with a scoped label (used in INSERT DATA).
Implementations§
Source§impl TripleComponent
impl TripleComponent
Sourcepub fn as_variable(&self) -> Option<&str>
pub fn as_variable(&self) -> Option<&str>
Returns the variable name if this component is a Variable, or None.
Trait Implementations§
Source§impl Clone for TripleComponent
impl Clone for TripleComponent
Source§fn clone(&self) -> TripleComponent
fn clone(&self) -> TripleComponent
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 moreAuto Trait Implementations§
impl Freeze for TripleComponent
impl RefUnwindSafe for TripleComponent
impl Send for TripleComponent
impl Sync for TripleComponent
impl Unpin for TripleComponent
impl UnsafeUnpin for TripleComponent
impl UnwindSafe for TripleComponent
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more