pub struct Constant<T, M> { /* private fields */ }
Expand description
Wraps a type so that Load::load
returns a constant value.
Implementations§
Trait Implementations§
Source§impl<D: Discover + Unpin, M: Copy> Discover for Constant<D, M>
impl<D: Discover + Unpin, M: Copy> Discover for Constant<D, M>
Proxies Discover
such that all changes are wrapped with a constant load.
Source§impl<S, M, Request> Service<Request> for Constant<S, M>
impl<S, M, Request> Service<Request> for Constant<S, M>
impl<'pin, T, M> Unpin for Constant<T, M>where
__Constant<'pin, T, M>: Unpin,
impl<T, M> UnsafeUnpin for Constant<T, M>
Auto Trait Implementations§
impl<T, M> Freeze for Constant<T, M>
impl<T, M> RefUnwindSafe for Constant<T, M>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<T, M> Send for Constant<T, M>
impl<T, M> Sync for Constant<T, M>
impl<T, M> UnwindSafe for Constant<T, M>where
T: UnwindSafe,
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