Struct shaku::ModuleBuildContext[][src]

pub struct ModuleBuildContext<M: Module> { /* fields omitted */ }

Builds a Module and its associated components. Build context, such as parameters and resolved components, are stored in this struct.

Implementations

impl<M: Module> ModuleBuildContext<M>[src]

pub fn submodules(&self) -> &M::Submodules[src]

Access this module's submodules

pub fn build_component<C: Component<M>>(&mut self) -> Arc<C::Interface>[src]

Resolve a component by building it if it is not already resolved or overridden.

pub fn provider_fn<P: Provider<M>>(&self) -> Arc<ProviderFn<M, P::Interface>> where
    M: HasProvider<P::Interface>, 
[src]

Get a provider function from the given provider impl, or an overridden one if configured during module build.

Auto Trait Implementations

impl<M> !RefUnwindSafe for ModuleBuildContext<M>[src]

impl<M> Send for ModuleBuildContext<M> where
    <M as Module>::Submodules: Send
[src]

impl<M> !Sync for ModuleBuildContext<M>[src]

impl<M> Unpin for ModuleBuildContext<M> where
    <M as Module>::Submodules: Unpin
[src]

impl<M> !UnwindSafe for ModuleBuildContext<M>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.