Trait finchers::NewEndpoint
[−]
[src]
pub trait NewEndpoint: Sized { type Item; type Future: Future<Item = Self::Item, Error = FinchersError>; type Endpoint: Endpoint<Item = Self::Item, Future = Self::Future>; fn new_endpoint(&self) -> Self::Endpoint; fn into_service(self) -> EndpointService<Self> { ... } }
A factory of Endpoint
.
Associated Types
type Item
type Future: Future<Item = Self::Item, Error = FinchersError>
type Endpoint: Endpoint<Item = Self::Item, Future = Self::Future>
Required Methods
fn new_endpoint(&self) -> Self::Endpoint
Provided Methods
fn into_service(self) -> EndpointService<Self>
Implementors
impl<F, R> NewEndpoint for F where
F: Fn() -> R,
R: Endpoint,impl<E: NewEndpoint> NewEndpoint for Rc<E>
impl<E: NewEndpoint> NewEndpoint for Arc<E>