pub struct PagesCfg {
pub entry: Option<String>,
pub enabled: Option<bool>,
pub include: Option<Vec<String>>,
}Expand description
[pages] block - file-based multi-page navigation.
Static app structure belongs in lumen.toml (the single source of
truth). Auto-discovery loads every .lmn file in the app dir as a page
keyed by its filename stem; these fields let the config pin the static
bits the AOT build and the runtime both read.
[pages]
entry = "index" # home page key (default: "index", else the
# [app] entry stem, else "main")
enabled = true # force multi-page on/off (default: auto -
# on when >1 .lmn file is present, or
# `include` names >1 page)
include = ["index.lmn", "settings.lmn", "user.lmn"] # explicit page set,
# overriding directory auto-discoveryFields§
§entry: Option<String>Home/entry page key (filename stem, no .lmn). Defaults to index
when an index.lmn exists, else the [app] entry stem, else main.
enabled: Option<bool>Force multi-page mode on (true) or off (false) and win over the
auto default either way. When absent, multi-page activates
automatically when more than one .lmn file sits in the app
directory, or when include names more than one page that exists,
including pages living in a subfolder the directory scan never sees.
So single-page apps (main.lmn / a lone index.lmn, or a
single-entry include) keep the exact legacy single-file load path.
include: Option<Vec<String>>Explicit ordered page-file list (relative filenames, may name a subfolder). When set, this overrides directory auto-discovery: only these files are pages. An entry naming a file that is not there is skipped with a warning and does not count toward the multi-page default, so the block can be written ahead of the pages it names; when every entry is missing the app still fails to load, naming a file the list asked for.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PagesCfg
impl<'de> Deserialize<'de> for PagesCfg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PagesCfg
impl RefUnwindSafe for PagesCfg
impl Send for PagesCfg
impl Sync for PagesCfg
impl Unpin for PagesCfg
impl UnsafeUnpin for PagesCfg
impl UnwindSafe for PagesCfg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.