pub struct Module {
pub name: &'static str,
pub tier: Tier,
pub context: Option<&'static str>,
pub settings: &'static [Setting],
pub migrations: Option<Migrations>,
pub route_names: &'static [RouteName],
pub screens: &'static [(&'static str, File)],
pub forms: &'static [Form],
pub areas: &'static [Mount],
pub jobs: fn(Worker) -> Worker,
}Expand description
A module crate’s MODULE: its manifest (name, tier, context, settings)
spreading what sofie gen writes in its src/wiring.rs; a package writes its own.
Fields§
§name: &'static strThe crate name; also its database schema and its configuration prefix.
tier: Tier§context: Option<&'static str>Metadata only, granting no access.
settings: &'static [Setting]§migrations: Option<Migrations>§route_names: &'static [RouteName]A handler’s module path is not known at runtime, so the wiring names each route.
screens: &'static [(&'static str, File)]A key naming another module’s screen, <module>/<area>/<name>, replaces that screen.
forms: &'static [Form]§areas: &'static [Mount]§jobs: fn(Worker) -> WorkerImplementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Module
impl !UnwindSafe for Module
impl Freeze for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
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