checkpoint

This commit is contained in:
Jane Lusby 2020-06-16 15:38:33 -07:00
parent b23cd1e6e4
commit 5817e03bf3
3 changed files with 14 additions and 13 deletions

View File

@ -40,4 +40,6 @@
/// parameterized by 'a), *not* that the object itself has 'static lifetime.
pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
mod peer_set;
mod peer_set {
mod set;
}

View File

@ -1 +0,0 @@
mod set;

View File

@ -1,16 +1,6 @@
use crate::Error;
use std::{fmt::Debug, future::Future, pin::Pin};
pub trait Discover {
type Key;
}
pub trait Service<Request> {
type Error;
type Future: Future<Output = Result<Response, Self::Error>>;
fn call(&mut self, req: Request) -> Self::Future;
}
use crate::Error;
pub struct Request;
pub struct Response;
@ -33,3 +23,13 @@ where
todo!()
}
}
pub trait Discover {
type Key;
}
pub trait Service<Request> {
type Error;
type Future: Future<Output = Result<Response, Self::Error>>;
fn call(&mut self, req: Request) -> Self::Future;
}