pub trait QueryableDataset: Sized + 'static {
type InternalTerm: Clone + Eq + Hash;
type Error: Error + Send + Sync;
// Required methods
fn internal_quads_for_pattern(
&self,
subject: Option<&Self::InternalTerm>,
predicate: Option<&Self::InternalTerm>,
object: Option<&Self::InternalTerm>,
graph_name: Option<Option<&Self::InternalTerm>>,
) -> Box<dyn Iterator<Item = Result<InternalQuad<Self>, Self::Error>>>;
fn internalize_term(
&self,
term: Term,
) -> Result<Self::InternalTerm, Self::Error>;
fn externalize_term(
&self,
term: Self::InternalTerm,
) -> Result<Term, Self::Error>;
// Provided methods
fn internal_named_graphs(
&self,
) -> Box<dyn Iterator<Item = Result<Self::InternalTerm, Self::Error>>> { ... }
fn contains_internal_graph_name(
&self,
graph_name: &Self::InternalTerm,
) -> Result<bool, Self::Error> { ... }
fn externalize_expression_term(
&self,
term: Self::InternalTerm,
) -> Result<ExpressionTerm, Self::Error> { ... }
fn internalize_expression_term(
&self,
term: ExpressionTerm,
) -> Result<Self::InternalTerm, Self::Error> { ... }
fn internal_term_effective_boolean_value(
&self,
term: Self::InternalTerm,
) -> Result<Option<bool>, Self::Error> { ... }
}
Expand description
A RDF dataset that can be queried using SPARQL
Required Associated Types§
Sourcetype InternalTerm: Clone + Eq + Hash
type InternalTerm: Clone + Eq + Hash
Internal representation of an RDF term
Can be just an integer that indexes into a dictionary…
Equality here is the RDF term equality (SPARQL sameTerm
function)
Required Methods§
Sourcefn internal_quads_for_pattern(
&self,
subject: Option<&Self::InternalTerm>,
predicate: Option<&Self::InternalTerm>,
object: Option<&Self::InternalTerm>,
graph_name: Option<Option<&Self::InternalTerm>>,
) -> Box<dyn Iterator<Item = Result<InternalQuad<Self>, Self::Error>>>
fn internal_quads_for_pattern( &self, subject: Option<&Self::InternalTerm>, predicate: Option<&Self::InternalTerm>, object: Option<&Self::InternalTerm>, graph_name: Option<Option<&Self::InternalTerm>>, ) -> Box<dyn Iterator<Item = Result<InternalQuad<Self>, Self::Error>>>
Fetches quads according to a pattern
For graph_name
, Some(None)
encodes the default graph and Some(Some(_))
a named graph
Sourcefn internalize_term(
&self,
term: Term,
) -> Result<Self::InternalTerm, Self::Error>
fn internalize_term( &self, term: Term, ) -> Result<Self::InternalTerm, Self::Error>
Builds an internal term from the Term
struct
Sourcefn externalize_term(
&self,
term: Self::InternalTerm,
) -> Result<Term, Self::Error>
fn externalize_term( &self, term: Self::InternalTerm, ) -> Result<Term, Self::Error>
Builds a Term
from an internal term
Provided Methods§
Sourcefn internal_named_graphs(
&self,
) -> Box<dyn Iterator<Item = Result<Self::InternalTerm, Self::Error>>>
fn internal_named_graphs( &self, ) -> Box<dyn Iterator<Item = Result<Self::InternalTerm, Self::Error>>>
Fetches the list of dataset named graphs
Sourcefn contains_internal_graph_name(
&self,
graph_name: &Self::InternalTerm,
) -> Result<bool, Self::Error>
fn contains_internal_graph_name( &self, graph_name: &Self::InternalTerm, ) -> Result<bool, Self::Error>
Returns if the dataset contains a given named graph
Sourcefn externalize_expression_term(
&self,
term: Self::InternalTerm,
) -> Result<ExpressionTerm, Self::Error>
fn externalize_expression_term( &self, term: Self::InternalTerm, ) -> Result<ExpressionTerm, Self::Error>
Builds an ExpressionTerm
from an internal term
Sourcefn internalize_expression_term(
&self,
term: ExpressionTerm,
) -> Result<Self::InternalTerm, Self::Error>
fn internalize_expression_term( &self, term: ExpressionTerm, ) -> Result<Self::InternalTerm, Self::Error>
Builds an internal term from an ExpressionTerm
Sourcefn internal_term_effective_boolean_value(
&self,
term: Self::InternalTerm,
) -> Result<Option<bool>, Self::Error>
fn internal_term_effective_boolean_value( &self, term: Self::InternalTerm, ) -> Result<Option<bool>, Self::Error>
Computes the term Effective boolean value
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.