[−][src]Struct tari_service_framework::LazyService
LazyService
Implements the tower_service::Service
trait. The poll_ready
function will poll
the given future. Once that future is ready, the resulting value is passed into the
given service_fn
function which must return a service. Subsequent calls to
poll_ready
and call
are delegated to that service.
This is instantiated by the lazy_service
combinator in ServiceHandlesFuture
.
Implementations
impl<TFn, F, S> LazyService<TFn, F, S>
[src]
Trait Implementations
impl<TFn, F, S, TReq> Service<TReq> for LazyService<TFn, F, S> where
F: Future + Unpin,
TFn: FnOnce(F::Output) -> S,
S: Service<TReq>,
[src]
F: Future + Unpin,
TFn: FnOnce(F::Output) -> S,
S: Service<TReq>,
Auto Trait Implementations
impl<TFn, F, S> RefUnwindSafe for LazyService<TFn, F, S> where
F: RefUnwindSafe,
S: RefUnwindSafe,
TFn: RefUnwindSafe,
F: RefUnwindSafe,
S: RefUnwindSafe,
TFn: RefUnwindSafe,
impl<TFn, F, S> Send for LazyService<TFn, F, S> where
F: Send,
S: Send,
TFn: Send,
F: Send,
S: Send,
TFn: Send,
impl<TFn, F, S> Sync for LazyService<TFn, F, S> where
F: Sync,
S: Sync,
TFn: Sync,
F: Sync,
S: Sync,
TFn: Sync,
impl<TFn, F, S> Unpin for LazyService<TFn, F, S> where
F: Unpin,
S: Unpin,
TFn: Unpin,
F: Unpin,
S: Unpin,
TFn: Unpin,
impl<TFn, F, S> UnwindSafe for LazyService<TFn, F, S> where
F: UnwindSafe,
S: UnwindSafe,
TFn: UnwindSafe,
F: UnwindSafe,
S: UnwindSafe,
TFn: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,