Struct dfdi::CachedService

source ·
pub struct CachedService<'cx, S: Service>(pub S::Output<'cx>);
Expand description

Cached service

A provider that returns the same reference on every call

Tuple Fields

0: S::Output<'cx>

Implementations

Create a new cached service

Trait Implementations

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.