Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatychev committed Jul 17, 2024
1 parent 176ab3b commit 4e0af5f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion api/src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub trait Dataset {
where
Self: 'x;
/// The error type that this dataset may raise.
type Error: Error + 'static;
type Error: Error + 'static + Send + Sync;

/// An iterator visiting all quads of this dataset in arbitrary order.
///
Expand Down
2 changes: 1 addition & 1 deletion api/src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub trait Graph {
where
Self: 'x;
/// The error type that this graph may raise.
type Error: Error + 'static;
type Error: Error + 'static + Send + Sync;

/// An iterator visiting all triples of this graph in arbitrary order.
///
Expand Down
4 changes: 2 additions & 2 deletions api/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub trait Source {
/// The type of items this source yields.
type Item<'x>;
/// The type of errors produced by this source.
type Error: Error + 'static;
type Error: Error + 'static + Send + Sync;

/// Call f for some item(s) (possibly zero) from this source, if any.
///
Expand Down Expand Up @@ -200,7 +200,7 @@ pub trait Source {
impl<'a, I, T, E> Source for I
where
I: Iterator<Item = Result<T, E>> + 'a,
E: Error + 'static,
E: Error + 'static + Send + Sync,
{
type Item<'x> = T;
type Error = E;
Expand Down
2 changes: 1 addition & 1 deletion api/src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ pub trait FromTerm: Sized {
/// See also [`FromTerm`]
pub trait TryFromTerm: Sized {
/// The error type produced when failing to copy a given term
type Error: 'static + std::error::Error;
type Error: 'static + std::error::Error + Send + Sync;
/// Try to copy `term` into an instance of this type.
fn try_from_term<T: Term>(term: T) -> Result<Self, Self::Error>;
}
Expand Down
4 changes: 2 additions & 2 deletions inmem/src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use _iter::*;

/// A dataset with a single quad index (GSPO).
/// Fast to load but slow on some queries, with a relatively low memory footprint.
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GenericLightDataset<TI: TermIndex> {
terms: TI,
quads: BTreeSet<[TI::Index; 4]>,
Expand Down Expand Up @@ -194,7 +194,7 @@ impl<TI: GraphNameIndex> SetDataset for GenericLightDataset<TI> {}

/// A heavily indexed dataset.
/// Fast to query but slow to load, with a relatively high memory footprint.
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GenericFastDataset<TI: GraphNameIndex> {
terms: TI,
gspo: BTreeSet<[TI::Index; 4]>,
Expand Down
2 changes: 1 addition & 1 deletion inmem/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub trait TermIndex {
/// The type of [indices](Index) used by this [`TermIndex`]
type Index: Index;
/// The type of error that this [`TermIndex`] may raise
type Error: Error + 'static;
type Error: Error + 'static + Send + Sync;

/// Get the index corresponding to term `t`, if it exists.
///
Expand Down
6 changes: 3 additions & 3 deletions rio/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct StrictRioTripleSource<T>(pub T);
impl<T> sophia_api::source::Source for StrictRioTripleSource<T>
where
T: rio_api::parser::TriplesParser,
T::Error: Error + 'static,
T::Error: Error + 'static + Send + Sync,
{
type Item<'x> = Trusted<rio_api::model::Triple<'x>>;

Expand Down Expand Up @@ -50,7 +50,7 @@ pub struct StrictRioQuadSource<T>(pub T);
impl<T> sophia_api::source::Source for StrictRioQuadSource<T>
where
T: rio_api::parser::QuadsParser,
T::Error: Error + 'static,
T::Error: Error + 'static + Send + Sync,
{
type Item<'x> = Trusted<rio_api::model::Quad<'x>>;

Expand Down Expand Up @@ -83,7 +83,7 @@ pub struct GeneralizedRioSource<T>(pub T);
impl<T> sophia_api::source::Source for GeneralizedRioSource<T>
where
T: rio_api::parser::GeneralizedQuadsParser,
T::Error: Error + 'static,
T::Error: Error + 'static + Send + Sync,
{
type Item<'x> = Trusted<rio_api::model::GeneralizedQuad<'x>>;

Expand Down

0 comments on commit 4e0af5f

Please sign in to comment.