pub struct ThemeModule;Expand description
The theme module: its tables migrate with the application’s, and it
registers the Themes screen under web.manage_themes.
Trait Implementations§
Source§impl Module for ThemeModule
impl Module for ThemeModule
Source§fn admin_base(&self) -> Option<&'static str>
fn admin_base(&self) -> Option<&'static str>
The Themes screen mounts at the panel’s top level (/admin/themes),
reached from the settings index.
Source§fn register(&self, registry: &mut Registry)
fn register(&self, registry: &mut Registry)
The Themes screen, its settings entry and its permission.
Source§fn id(&self) -> ModuleId
fn id(&self) -> ModuleId
Stable identity, a lowercase
vendor.package code. Namespaces this
module’s applied-migration history and is the target of other modules’
requires. Its string must equal the module_id of
the set returned by migrations.Source§fn migrations(&self) -> MigrationSet
fn migrations(&self) -> MigrationSet
This module’s migrations, in apply order. Defaults to none, for a
code-only module.
Source§fn requires(&self) -> &'static [ModuleId]
fn requires(&self) -> &'static [ModuleId]
Ids of modules whose migrations and registration must run before this
module’s, so cross-module foreign keys and contributions resolve. Defaults
to none.
Source§fn requires_db_capabilities(&self) -> &'static [Capability]
fn requires_db_capabilities(&self) -> &'static [Capability]
Database capabilities this module cannot work without. The application
refuses to boot if one is unavailable, with a clear error naming the
module and capability, instead of failing deep inside a migration.
Source§fn optional_db_capabilities(&self) -> &'static [Capability]
fn optional_db_capabilities(&self) -> &'static [Capability]
Database capabilities this module uses when present and does without when
absent. Query the boot-time
CapabilitySet
to gate the enhanced path (for example trigram fuzzy search).Source§fn boot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 BootCx<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn boot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 BootCx<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Runs once at boot, after every module’s migrations have applied and
every module has registered, before anything is served: the place for
a sweep, a seed, or a check that needs the database. An error aborts
the boot; for a plugin it quarantines the plugin instead. Default: nothing.
Source§fn catalogs(&self) -> &'static [(&'static str, &'static str)]
fn catalogs(&self) -> &'static [(&'static str, &'static str)]
This module’s UI-string catalogs, as
(locale, po_text) pairs, each an
include_str!’d gettext PO baked into the binary. English needs none (its
source string is the key); other locales ship a PO. The boot loader merges
them into the shared catalog store. Default: none.Auto Trait Implementations§
impl Freeze for ThemeModule
impl RefUnwindSafe for ThemeModule
impl Send for ThemeModule
impl Sync for ThemeModule
impl Unpin for ThemeModule
impl UnsafeUnpin for ThemeModule
impl UnwindSafe for ThemeModule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more