summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/repository.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/repository.rs b/src/repository.rs
index 57f2d63..245b2e4 100644
--- a/src/repository.rs
+++ b/src/repository.rs
@@ -12,15 +12,12 @@ use crate::id;
use futures::future::Future;
///
-pub trait Repository: Debug {
+pub trait Repository: Debug + Sync + Send {
type Id: id::Id;
type Error: Debug;
type Node: node::Node<Id = Self::Id, Error = Self::Error>;
- type Get: Future<Item = Self::Node, Error = Self::Error>;
-
/// It should be trivial to get the Id of a Node.
- fn get<ID>(id: ID) -> Result<Self::Get, Self::Error>
- where ID: id::Id;
+ fn get(&self, id: Self::Id) -> Box<Future<Item = Self::Node, Error = Self::Error>>;
}