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]

[src]

Create a new bundle from a codec and a service

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]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

[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]

Requests handled by the service

Responses given by the service

Errors produced by the service

The Service value created by this factory

[src]

Create and return a new service value.