Struct BoxCloneSyncService
pub struct BoxCloneSyncService<T, U, E>(/* private field */);
A Clone + Send + Sync boxed Service.
BoxCloneSyncService turns a service into a trait object, allowing the
response future type to be dynamic, and allowing the service to be cloned and shared.
This is similar to BoxCloneService except the resulting
service implements Sync.
Implementations
impl<T, U, E> BoxCloneSyncService<T, U, E>
fn new<S>(inner: S) -> Self where S: Service<T, Response = U, Error = E> + Clone + Send + Sync + 'static, S::Future: Send + 'static,Create a new
BoxCloneSyncService.fn layer<S>() -> LayerFn<fn(S) -> Self> where S: Service<T, Response = U, Error = E> + Clone + Send + Sync + 'static, S::Future: Send + 'static,Returns a
Layerfor wrapping aServicein aBoxCloneSyncServicemiddleware.
Trait Implementations
impl<T, U, E> Clone for BoxCloneSyncService<T, U, E>
fn clone(&self) -> Self
impl<T, U, E> Debug for BoxCloneSyncService<T, U, E>
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result
impl<T, U, E> Service<T> for BoxCloneSyncService<T, U, E>
type Response = U;type Error = E;type Future = Pin<Box<dyn Future<Output = Result<U, E>> + Send>>;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), E>>fn call(&mut self, request: T) -> Self::Future