Struct MapTargetService

Source
pub struct MapTargetService<T, F> {
    pub f: F,
    pub inner: T,
}

Fields§

§f: F§inner: T

Trait Implementations§

Source§

impl<FAC, F> AsyncMakeService for MapTargetService<FAC, F>
where FAC: AsyncMakeService, F: Clone,

Source§

type Service = MapTargetService<<FAC as AsyncMakeService>::Service, F>

The type of service this factory creates.
Source§

type Error = <FAC as AsyncMakeService>::Error

The type of error that can occur during service creation.
Source§

async fn make_via_ref( &self, old: Option<&Self::Service>, ) -> Result<Self::Service, Self::Error>

Asynchronously creates a new service, optionally using an existing service as a reference. Read more
Source§

fn make(&self) -> impl Future<Output = Result<Self::Service, Self::Error>>

Asynchronously creates a new service without referencing an existing one. Read more
Source§

impl<FAC, F> MakeService for MapTargetService<FAC, F>
where FAC: MakeService, F: Clone,

Source§

type Service = MapTargetService<<FAC as MakeService>::Service, F>

The type of service this factory creates.
Source§

type Error = <FAC as MakeService>::Error

The type of error that can occur during service creation.
Source§

fn make_via_ref( &self, old: Option<&Self::Service>, ) -> Result<Self::Service, Self::Error>

Creates a new service, optionally using an existing service as a reference. Read more
Source§

fn make(&self) -> Result<Self::Service, Self::Error>

Creates a new service without referencing an existing one. Read more
Source§

impl<T, F, R> Service<R> for MapTargetService<T, F>
where F: MapTarget<R>, T: Service<F::Target>,

Source§

type Response = <T as Service<<F as MapTarget<R>>::Target>>::Response

The type of response returned by this service.
Source§

type Error = <T as Service<<F as MapTarget<R>>::Target>>::Error

The type of error that this service can produce.
Source§

fn call( &self, req: R, ) -> impl Future<Output = Result<Self::Response, Self::Error>>

Asynchronously process the request and return the response. Read more

Auto Trait Implementations§

§

impl<T, F> Freeze for MapTargetService<T, F>
where F: Freeze, T: Freeze,

§

impl<T, F> RefUnwindSafe for MapTargetService<T, F>

§

impl<T, F> Send for MapTargetService<T, F>
where F: Send, T: Send,

§

impl<T, F> Sync for MapTargetService<T, F>
where F: Sync, T: Sync,

§

impl<T, F> Unpin for MapTargetService<T, F>
where F: Unpin, T: Unpin,

§

impl<T, F> UnwindSafe for MapTargetService<T, F>
where F: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T, Request, Response, E> BoxService<Request, Response, E> for T
where T: Service<Request, Response = Response, Error = E> + 'static, Request: 'static,

Source§

fn into_boxed(self) -> BoxedService<Request, Response, E>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.