pub struct ModuleContext {
pub ports: Ports,
pub config: Arc<dyn Config>,
pub events: EventBus,
pub templates: Arc<TemplateRegistry>,
pub venture: Arc<Venture>,
pub ui_mounted: bool,
}Expand description
Everything a module’s router needs: its declared ports, the typed config, the bus, the templates and the venture identity.
Fields§
§ports: PortsOnly the ports the module declared in requires()/optional().
config: Arc<dyn Config>Full config; module keys are prefixed (EMAIL_SIGNUP_CONFIRM_TTL_DAYS).
events: EventBus§templates: Arc<TemplateRegistry>§venture: Arc<Venture>§ui_mounted: booltrue when the venture mounted a UI renderer (ADR 0010). A module
then defaults its landing redirects (confirmed, expired,
unsubscribed, status) to <api base>/ui/<module>/<action>/<page>
instead of pages the venture site has to provide.
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleContext
impl !UnwindSafe for ModuleContext
impl Freeze for ModuleContext
impl Send for ModuleContext
impl Sync for ModuleContext
impl Unpin for ModuleContext
impl UnsafeUnpin for ModuleContext
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