pub struct Singleton<M, Dst>where
M: Service<Dst>,{ /* private fields */ }Available on crate features
client and client-pool only.Expand description
A singleton pool over an inner service.
The singleton wraps an inner service maker, bundling all calls to ensure only one service is created. Once made, it returns clones of the made service.
Implementations§
Trait Implementations§
Source§impl<M, Target> Service<Target> for Singleton<M, Target>
impl<M, Target> Service<Target> for Singleton<M, Target>
Auto Trait Implementations§
impl<M, Dst> Freeze for Singleton<M, Dst>where
M: Freeze,
impl<M, Dst> RefUnwindSafe for Singleton<M, Dst>where
M: RefUnwindSafe,
impl<M, Dst> Send for Singleton<M, Dst>
impl<M, Dst> Sync for Singleton<M, Dst>
impl<M, Dst> Unpin for Singleton<M, Dst>where
M: Unpin,
impl<M, Dst> UnwindSafe for Singleton<M, Dst>where
M: 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