pub struct MadsBuilder { /* private fields */ }Expand description
Builds an application by explicitly providing and constructing providers.
Implementations§
Source§impl MadsBuilder
impl MadsBuilder
Sourcepub fn new(config: Config) -> Self
pub fn new(config: Config) -> Self
Creates a builder with configuration available to provider constructors and resolvers.
Sourcepub fn root<M: Module>(&mut self) -> Result<&mut Self>
pub fn root<M: Module>(&mut self) -> Result<&mut Self>
Selects the root module for scoped analysis and construction.
Sourcepub fn provide<T>(&mut self, value: T) -> Result<&mut Self>
pub fn provide<T>(&mut self, value: T) -> Result<&mut Self>
Provides a concrete application-scoped value.
Sourcepub async fn construct<T>(&mut self) -> Result<&mut Self>
pub async fn construct<T>(&mut self) -> Result<&mut Self>
Constructs exactly one statically declared provider using currently provided dependencies.
Sourcepub fn analyze(&self) -> GraphAnalysis
pub fn analyze(&self) -> GraphAnalysis
Analyzes the complete provider graph without invoking constructors.
Sourcepub fn lifecycle_hook<H>(&mut self, hook: H) -> &mut Selfwhere
H: LifecycleHook + 'static,
pub fn lifecycle_hook<H>(&mut self, hook: H) -> &mut Selfwhere
H: LifecycleHook + 'static,
Registers a hook that runs when the completed application starts and stops.
Auto Trait Implementations§
impl !RefUnwindSafe for MadsBuilder
impl !UnwindSafe for MadsBuilder
impl Forget for MadsBuilder
impl Freeze for MadsBuilder
impl Move for MadsBuilder
impl Send for MadsBuilder
impl Sync for MadsBuilder
impl Unpin for MadsBuilder
impl UnsafeUnpin for MadsBuilder
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