diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-06-25 21:07:23 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-06-25 21:07:23 +0200 |
commit | 11b647db34fcb3debf85196d55131486b784d0ce (patch) | |
tree | 04d1785c2d2401c321dfb5e0ff1f772299cbbd30 | |
parent | c022e64aff9e7c9374c9a95b08d5dfcf59ce06ef (diff) | |
download | daglib-repository-ext.tar.gz daglib-repository-ext.tar.xz |
Fix: We must return concrete types hererepository-ext
-rw-r--r-- | src/node.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node.rs b/src/node.rs index b6a088b..282241f 100644 --- a/src/node.rs +++ b/src/node.rs @@ -23,17 +23,16 @@ use futures::stream::Stream; /// pub trait Node: Debug + PartialEq + Eq { type Id: Id; - type NodePayload: Debug; + type Payload: Debug; type Error: Debug; - type Payload: Future<Item = Self::NodePayload, Error = Self::Error>; /// It should be trivial to get the Id of a Node. fn id(&self) -> Self::Id; /// Fetch the payload of the node. - fn payload(&self) -> Self::Payload; + fn payload(&self) -> Box<Future<Item = Self::Payload, Error = Self::Error>>; /// Fetch the Ids of the parents of this node - fn parent_ids(&self) -> Stream<Item = Self::Id, Error = Self::Error>; + fn parent_ids(&self) -> Box<Stream<Item = Self::Id, Error = Self::Error>>; } |