pub struct AppCfg {
pub entry: Option<String>,
pub id: Option<String>,
pub kind: Option<AppKind>,
pub locale: Option<LanguageIdentifier>,
pub fallback_locale: Option<LanguageIdentifier>,
pub single_instance: bool,
}Expand description
[app] block.
Fields§
§entry: Option<String>Markup entry filename relative to the app dir. Defaults to main.lmn.
id: Option<String>Stable identifier used for per-app state directories (window state, plugin caches). Falls back to the app directory name when absent.
kind: Option<AppKind>Optional app-kind override ("markup" | "rust" | "cpp" |
"python"). Optional and used only to override auto-detection: when
absent, crate::app_kind::detect inspects the directory; when present,
it wins. Lets an ambiguous directory (e.g. a Rust workspace member that
should still run as pure markup) pin its build/run route.
locale: Option<LanguageIdentifier>BCP-47 tag naming the locale the app starts in, e.g. "de-DE".
Absent means “follow the OS”, falling back to en-US. The tag
selects which locale/<tag>.ftl catalogue translatable="..."
markup and the scripts’ t() builtin resolve against; every
catalogue in the directory is loaded regardless. A tag that is not
valid BCP-47 is a lumen.toml error.
fallback_locale: Option<LanguageIdentifier>BCP-47 tag naming the locale a key missing from the active catalogue
falls through to before the element’s own authored text. Defaults to
en-US. Set it to the language the app’s source strings are written
in, so an app authored in German does not probe an en-US catalogue
it does not ship. Naming the active locale here leaves nothing to
fall through to, so a miss goes straight to the authored text. A tag
that is not valid BCP-47 is a lumen.toml error.
single_instance: boolWhen true, a second launch of this app forwards its command-line
arguments to the already-running instance and exits instead of
opening a second window; the primary sees them as
on_second_instance(args). Defaults to false: most apps are fine
with more than one window open, and the lock has a real
side effect (a bound socket / named pipe) that an app should opt
into rather than acquire by surprise. Windowed runs only - a
headless / --headless run never locks, so CI and the SDK’s
non-interactive embedding never contend over one socket.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppCfg
impl<'de> Deserialize<'de> for AppCfg
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 AppCfg
impl RefUnwindSafe for AppCfg
impl Send for AppCfg
impl Sync for AppCfg
impl Unpin for AppCfg
impl UnsafeUnpin for AppCfg
impl UnwindSafe for AppCfg
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.