pub struct TowerMakeServiceFactory<M, T> { /* private fields */ }
Available on crate feature
tower
only.Expand description
A HttpServiceFactory
that wraps a tower::MakeService
.
The given tower::MakeService
will be called to create a new service for each new connection.
Create by calling tower_make_service_factory
or custom_tower_make_service_factory
.
Trait Implementations§
Source§impl<M: Clone, T: Clone> Clone for TowerMakeServiceFactory<M, T>
impl<M: Clone, T: Clone> Clone for TowerMakeServiceFactory<M, T>
Source§fn clone(&self) -> TowerMakeServiceFactory<M, T>
fn clone(&self) -> TowerMakeServiceFactory<M, T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<M, T> HttpServiceFactory for TowerMakeServiceFactory<M, T>where
M: MakeService<T, IncomingRequest> + Send,
M::Future: Send,
M::Service: HttpService,
T: Clone + Send,
impl<M, T> HttpServiceFactory for TowerMakeServiceFactory<M, T>where
M: MakeService<T, IncomingRequest> + Send,
M::Future: Send,
M::Service: HttpService,
T: Clone + Send,
Source§type Error = <M as MakeService<T, Request<IncomingBody>>>::MakeError
type Error = <M as MakeService<T, Request<IncomingBody>>>::MakeError
The error type that can be returned by
new_service
.Source§type Service = <M as MakeService<T, Request<IncomingBody>>>::Service
type Service = <M as MakeService<T, Request<IncomingBody>>>::Service
The service type that is created by this factory.
Source§async fn new_service(
&mut self,
_remote_addr: SocketAddr,
) -> Result<Self::Service, Self::Error>
async fn new_service( &mut self, _remote_addr: SocketAddr, ) -> Result<Self::Service, Self::Error>
Create a new service for a new connection. Read more
Auto Trait Implementations§
impl<M, T> Freeze for TowerMakeServiceFactory<M, T>
impl<M, T> RefUnwindSafe for TowerMakeServiceFactory<M, T>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<M, T> Send for TowerMakeServiceFactory<M, T>
impl<M, T> Sync for TowerMakeServiceFactory<M, T>
impl<M, T> Unpin for TowerMakeServiceFactory<M, T>
impl<M, T> UnwindSafe for TowerMakeServiceFactory<M, T>where
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more