[][src]Trait swagger::composites::BoxedMakeService

pub trait BoxedMakeService<C, U, V, W> {
    fn boxed_make_service(
        &mut self,
        context: C
    ) -> Result<Box<dyn Service<ReqBody = U, ResBody = V, Error = W, Future = Box<dyn Future<Item = Response<V>, Error = W>>>>, Error>; }

Trait for wrapping hyper MakeServices to make the return type of make_service uniform. This is necessary in order for the MakeServices with different Instance types to be stored in a single collection.

Required methods

fn boxed_make_service(
    &mut self,
    context: C
) -> Result<Box<dyn Service<ReqBody = U, ResBody = V, Error = W, Future = Box<dyn Future<Item = Response<V>, Error = W>>>>, Error>

Create a new Service trait object

Loading content...

Implementors

impl<'a, SC, T, Rq, Rs, Er, S> BoxedMakeService<&'a SC, Rq, Rs, Er> for T where
    S: Service<ReqBody = Rq, ResBody = Rs, Error = Er, Future = Box<dyn Future<Item = Response<Rs>, Error = Er>>> + 'static,
    T: MakeService<&'a SC, ReqBody = Rq, ResBody = Rs, Error = Er, Future = FutureResult<S, Error>, Service = S, MakeError = Error>,
    Rq: Payload,
    Rs: Payload,
    Er: Error + Send + Sync + 'static, 
[src]

fn boxed_make_service(
    &mut self,
    context: &'a SC
) -> Result<Box<dyn Service<ReqBody = Rq, ResBody = Rs, Error = Er, Future = Box<dyn Future<Item = Response<Rs>, Error = Er>>>>, Error>
[src]

Call the make_service method of the wrapped MakeService and Box the result

Loading content...