pub struct ServiceCloneFactory<S>(/* private fields */);
Expand description
A HttpServiceFactory
that simply clones the given service for each new connection.
Create by calling service_clone_factory
.
Trait Implementations§
Source§impl<S: Clone> Clone for ServiceCloneFactory<S>
impl<S: Clone> Clone for ServiceCloneFactory<S>
Source§fn clone(&self) -> ServiceCloneFactory<S>
fn clone(&self) -> ServiceCloneFactory<S>
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<S: Debug> Debug for ServiceCloneFactory<S>
impl<S: Debug> Debug for ServiceCloneFactory<S>
Source§impl<S> HttpServiceFactory for ServiceCloneFactory<S>
impl<S> HttpServiceFactory for ServiceCloneFactory<S>
Source§type Error = Infallible
type Error = Infallible
The error type that can be returned by
new_service
.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<S> Freeze for ServiceCloneFactory<S>where
S: Freeze,
impl<S> RefUnwindSafe for ServiceCloneFactory<S>where
S: RefUnwindSafe,
impl<S> Send for ServiceCloneFactory<S>where
S: Send,
impl<S> Sync for ServiceCloneFactory<S>where
S: Sync,
impl<S> Unpin for ServiceCloneFactory<S>where
S: Unpin,
impl<S> UnwindSafe for ServiceCloneFactory<S>where
S: 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