pub struct ModuleBuilder { /* private fields */ }Expand description
Builder for explicit module definitions.
Implementations§
Source§impl ModuleBuilder
impl ModuleBuilder
Sourcepub fn import_typed<M>(self) -> Selfwhere
M: Module,
pub fn import_typed<M>(self) -> Selfwhere
M: Module,
Adds a typed module import.
Sourcepub fn provider_typed<P>(self) -> Selfwhere
P: ProviderRegistrant,
pub fn provider_typed<P>(self) -> Selfwhere
P: ProviderRegistrant,
Adds a typed provider declaration and registration callback.
Sourcepub fn controller(self, name: impl Into<String>) -> Self
pub fn controller(self, name: impl Into<String>) -> Self
Adds a controller declaration.
Sourcepub fn controller_typed<C>(self) -> Selfwhere
C: ControllerRegistrant,
pub fn controller_typed<C>(self) -> Selfwhere
C: ControllerRegistrant,
Adds a typed controller declaration and runtime descriptor.
Sourcepub fn export_typed<P>(self) -> Self
pub fn export_typed<P>(self) -> Self
Adds a typed provider export declaration.
Sourcepub fn async_initializer(self, initializer: AsyncProviderInitializer) -> Self
pub fn async_initializer(self, initializer: AsyncProviderInitializer) -> Self
Adds an async provider initializer.
Sourcepub fn build(self) -> ModuleDefinition
pub fn build(self) -> ModuleDefinition
Completes the module definition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleBuilder
impl RefUnwindSafe for ModuleBuilder
impl Send for ModuleBuilder
impl Sync for ModuleBuilder
impl Unpin for ModuleBuilder
impl UnsafeUnpin for ModuleBuilder
impl UnwindSafe for ModuleBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more