Struct BoxCloneSyncService

struct BoxCloneSyncService<T, U, E>(_)

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 as >::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 as >::Future: Send + 'static

Returns a Layer for wrapping a Service in a BoxCloneSyncService middleware.

impl<M, S, Target, Request> MakeService for BoxCloneSyncService<T, U, E>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
fn make_service(self: &mut Self, target: Target) -> <M as MakeService<Target, Request>>::Future

impl<T> Any for BoxCloneSyncService<T, U, E>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for BoxCloneSyncService<T, U, E>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for BoxCloneSyncService<T, U, E>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for BoxCloneSyncService<T, U, E>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for BoxCloneSyncService<T, U, E>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for BoxCloneSyncService<T, U, E>

impl<T> ToOwned for BoxCloneSyncService<T, U, E>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for BoxCloneSyncService<T, U, E>

impl<T, Request> ServiceExt for BoxCloneSyncService<T, U, E>

impl<T, U> Into for BoxCloneSyncService<T, U, E>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for BoxCloneSyncService<T, U, E>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for BoxCloneSyncService<T, U, E>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T, U, E> Clone for BoxCloneSyncService<T, U, E>

fn clone(self: &Self) -> Self

impl<T, U, E> Debug for BoxCloneSyncService<T, U, E>

fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result

impl<T, U, E> Freeze for BoxCloneSyncService<T, U, E>

impl<T, U, E> RefUnwindSafe for BoxCloneSyncService<T, U, E>

impl<T, U, E> Send for BoxCloneSyncService<T, U, E>

impl<T, U, E> Service for BoxCloneSyncService<T, U, E>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), E>>
fn call(self: &mut Self, request: T) -> <Self as >::Future

impl<T, U, E> Sync for BoxCloneSyncService<T, U, E>

impl<T, U, E> Unpin for BoxCloneSyncService<T, U, E>

impl<T, U, E> UnsafeUnpin for BoxCloneSyncService<T, U, E>

impl<T, U, E> UnwindSafe for BoxCloneSyncService<T, U, E>