[][src]Trait inject::provider::RefProvider

pub trait RefProvider {
    type ProvidedRef: 'static;
    fn provide<'a>(
        &'a self,
        container: &'a Container
    ) -> Result<&'a Self::ProvidedRef, InjectError>; fn id(&self) -> TypeId { ... } }

Reference provider.

Associated Types

type ProvidedRef: 'static

Loading content...

Required methods

fn provide<'a>(
    &'a self,
    container: &'a Container
) -> Result<&'a Self::ProvidedRef, InjectError>

Provides the reference using the Container

Loading content...

Provided methods

fn id(&self) -> TypeId

Returns the type id of the provided reference.

Loading content...

Implementations on Foreign Types

impl<T: Inject> RefProvider for Arc<T>[src]

type ProvidedRef = T

impl<T: Inject> RefProvider for Rc<T>[src]

type ProvidedRef = T

impl<T: Inject> RefProvider for Box<T>[src]

type ProvidedRef = T

Loading content...

Implementors

Loading content...