pub enum QueryResults {
Solutions(QuerySolutionStream),
Boolean(bool),
Graph(QueryTripleStream),
}
Expand description
Results of a SPARQL query.
Variants§
Solutions(QuerySolutionStream)
Results of a SELECT query.
Boolean(bool)
Result of a ASK query.
Graph(QueryTripleStream)
Implementations§
Source§impl QueryResults
impl QueryResults
Sourcepub fn read(
reader: impl Read + 'static,
format: QueryResultsFormat,
) -> Result<QueryResults, QuerySolutionsToStreamError>
pub fn read( reader: impl Read + 'static, format: QueryResultsFormat, ) -> Result<QueryResults, QuerySolutionsToStreamError>
Reads a SPARQL query results serialization.
Sourcepub async fn write<W>(
self,
writer: W,
format: QueryResultsFormat,
) -> Result<W, QueryEvaluationError>where
W: Write,
pub async fn write<W>(
self,
writer: W,
format: QueryResultsFormat,
) -> Result<W, QueryEvaluationError>where
W: Write,
Writes the query results (solutions or boolean).
This method fails if it is called on the Graph
results.
Sourcepub async fn write_graph<W>(
self,
writer: W,
format: impl Into<RdfFormat>,
) -> Result<W, QueryEvaluationError>where
W: Write,
pub async fn write_graph<W>(
self,
writer: W,
format: impl Into<RdfFormat>,
) -> Result<W, QueryEvaluationError>where
W: Write,
Writes the graph query results.
This method fails if it is called on the Solution
or Boolean
results.
Trait Implementations§
Source§impl From<QuerySolutionStream> for QueryResults
impl From<QuerySolutionStream> for QueryResults
Source§fn from(value: QuerySolutionStream) -> QueryResults
fn from(value: QuerySolutionStream) -> QueryResults
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QueryResults
impl !RefUnwindSafe for QueryResults
impl Send for QueryResults
impl !Sync for QueryResults
impl Unpin 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> 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