pub type ModuleFactory = Arc<dyn Fn() -> Result<Arc<dyn ManagedModule>> + Send + Sync>;Expand description
Factory closure that constructs a fresh ManagedModule on demand.
ManagedRouter calls this every time a route mounts and there is no
persisted instance to restore. Returning Err propagates through
handle_route_change and leaves the router in the “no active module”
state for the failed route — same as the other SDKs when a definition
can’t be resolved.
Aliased Type§
pub struct ModuleFactory { /* private fields */ }