[−][src]Struct shaku::ModuleBuilder
Builds a Module
. Component parameters can be set, and both components and providers
implementations can be overridden.
Implementations
impl<M: Module> ModuleBuilder<M>
[src]
pub fn with_submodules(submodules: M::Submodules) -> Self
[src]
Create a ModuleBuilder by providing the module's submodules.
pub fn with_component_parameters<C: Component<M>>(
self,
params: C::Parameters
) -> Self where
M: HasComponent<C::Interface>,
[src]
self,
params: C::Parameters
) -> Self where
M: HasComponent<C::Interface>,
Set the parameters of the specified component. If the parameters are not manually set, the defaults will be used.
pub fn with_component_override<I: Interface + ?Sized>(
self,
component: Box<I>
) -> Self where
M: HasComponent<I>,
[src]
self,
component: Box<I>
) -> Self where
M: HasComponent<I>,
Override a component implementation.
pub fn with_provider_override<I: 'static + ?Sized>(
self,
provider_fn: ProviderFn<M, I>
) -> Self where
M: HasProvider<I>,
[src]
self,
provider_fn: ProviderFn<M, I>
) -> Self where
M: HasProvider<I>,
Override a provider implementation.
pub fn build(self) -> M
[src]
Build the module
Auto Trait Implementations
impl<M> !RefUnwindSafe for ModuleBuilder<M>
impl<M> !Send for ModuleBuilder<M>
impl<M> !Sync for ModuleBuilder<M>
impl<M> Unpin for ModuleBuilder<M> where
M: Unpin,
<M as Module>::Submodules: Unpin,
M: Unpin,
<M as Module>::Submodules: Unpin,
impl<M> !UnwindSafe for ModuleBuilder<M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,