Struct dfdi::Cached

source ·
pub struct Cached<'cx, S, P>where
    S: Service,
    P: Provider<'cx, S>,
{ /* private fields */ }
Expand description

Cached provider

A provider that calls the underlying provider on the first call and returns the result of that on all calls

Implementations

Create a new cached provider

Equivelant to calling Cached::new with a provider wrapped in a provider_fn type hint

Trait Implementations

Returns the “default value” for a type. Read more
Build the output object

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.