pub enum QueryResults {
Solutions {
variables: Vec<Variable>,
solutions: Vec<Vec<Option<Term>>>,
},
Graph {
triples: Vec<Triple>,
},
Boolean(bool),
}Expand description
Materialized query results: SELECT bindings, an ASK boolean, or a graph.
Variants§
Solutions
SPARQL SELECT solutions.
Fields
Graph
SPARQL CONSTRUCT / DESCRIBE triples (default graph).
Boolean(bool)
SPARQL ASK — true iff the WHERE pattern has a solution.
Implementations§
Source§impl QueryResults
impl QueryResults
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the query returned no solutions / no triples / ASK false.
Sourcepub fn variables(&self) -> &[Variable]
pub fn variables(&self) -> &[Variable]
SELECT projection variables ([] for graph and ASK results).
Sourcepub fn solutions(&self) -> &[Vec<Option<Term>>]
pub fn solutions(&self) -> &[Vec<Option<Term>>]
SELECT solution rows ([] for graph and ASK results).
Sourcepub fn as_boolean(&self) -> Option<bool>
pub fn as_boolean(&self) -> Option<bool>
SPARQL ASK boolean (None for SELECT / graph results).
Trait Implementations§
Source§impl Clone for QueryResults
impl Clone for QueryResults
Source§fn clone(&self) -> QueryResults
fn clone(&self) -> QueryResults
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 Debug for QueryResults
impl Debug for QueryResults
Source§impl PartialEq for QueryResults
impl PartialEq for QueryResults
impl StructuralPartialEq for QueryResults
Auto Trait Implementations§
impl Freeze for QueryResults
impl RefUnwindSafe for QueryResults
impl Send for QueryResults
impl Sync for QueryResults
impl Unpin for QueryResults
impl UnsafeUnpin for QueryResults
impl UnwindSafe for QueryResults
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].