pub trait Provider {
type ProvidedType: 'static;
// Required method
fn provide(
&self,
container: &Container,
) -> Result<Self::ProvidedType, InjectError>;
// Provided method
fn id(&self) -> TypeId { ... }
}
Expand description
Value provider.
Required Associated Types§
type ProvidedType: 'static
Required Methods§
Sourcefn provide(
&self,
container: &Container,
) -> Result<Self::ProvidedType, InjectError>
fn provide( &self, container: &Container, ) -> Result<Self::ProvidedType, InjectError>
Provides the value using the Container