Trait hyperdriver::service::AdaptCustomBodyExt

source ·
pub trait AdaptCustomBodyExt<BIn, BOut>: Sized {
    // Required method
    fn adapt_custom_body(self) -> AdaptCustomBodyService<BIn, BOut, Self>;
}
Expand description

Extension trait for Service to adapt inner body types to crate::Body.

Required Methods§

source

fn adapt_custom_body(self) -> AdaptCustomBodyService<BIn, BOut, Self>

Adapt a service to use custom body types internally, but still accept and return Body as the outer body type.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<BIn, BOut, S> AdaptCustomBodyExt<BIn, BOut> for S
where S: Service<Request<BIn>, Response = Response<BOut>>,