Struct copra::service::EncapsulatedMethod
[−]
[src]
pub struct EncapsulatedMethod<C, S> { /* fields omitted */ }
A bunble of a codec and a user-defined service
This struct is used to provide a unified interface for the request dispatcher.
Methods
impl<C, S> EncapsulatedMethod<C, S>
[src]
Trait Implementations
impl<C, S> Service for EncapsulatedMethod<C, S> where
C: MethodCodec + Clone + 'static,
S: Service<Request = (C::Request, Controller), Response = (C::Response, Controller), Error = MethodError>,
S: Clone + 'static,
MethodError: From<C::Error>,
[src]
C: MethodCodec + Clone + 'static,
S: Service<Request = (C::Request, Controller), Response = (C::Response, Controller), Error = MethodError>,
S: Clone + 'static,
MethodError: From<C::Error>,
type Request = (Bytes, Controller)
Requests handled by the service.
type Response = (Bytes, Controller)
Responses given by the service.
type Error = MethodError
Errors produced by the service.
type Future = MethodFuture
The future response value.
fn call(&self, req: Self::Request) -> Self::Future
[src]
Process the request and return the response asynchronously.
impl<C, S> NewService for EncapsulatedMethod<C, S> where
C: MethodCodec + Clone + 'static,
MethodError: From<C::Error>,
S: Service<Request = (C::Request, Controller), Response = (C::Response, Controller), Error = MethodError>,
S: Clone + 'static,
[src]
C: MethodCodec + Clone + 'static,
MethodError: From<C::Error>,
S: Service<Request = (C::Request, Controller), Response = (C::Response, Controller), Error = MethodError>,
S: Clone + 'static,
type Request = (Bytes, Controller)
Requests handled by the service
type Response = (Bytes, Controller)
Responses given by the service
type Error = MethodError
Errors produced by the service
type Instance = Self
The Service
value created by this factory
fn new_service(&self) -> Result<Self::Instance>
[src]
Create and return a new service value.