#[non_exhaustive]pub struct AppMeta {
pub name: String,
pub url: Option<String>,
pub locale: String,
pub debug: bool,
pub env_prefix: Option<String>,
pub key: Option<String>,
pub previous_keys: Vec<String>,
}Expand description
Application-level metadata. The name is the human-readable application
name, the baseline for the admin brand: a BrandSetting in the admin can
override it, but this is the default when none is set.
Non-exhaustive: build one with Default and set fields, so a field added
in a later release is additive.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe display name of the application (e.g. "Acme Blog"). Shown as the
admin brand unless overridden by a brand setting.
url: Option<String>The application’s public base URL (scheme and host, with any port), such
as https://acme.example. It is the canonical origin absolute links build
on, distinct from the server bind address (they differ behind a proxy or a
local .test domain). When unset, base_url derives it from the bind
address.
locale: StringThe application’s default locale (BCP 47, e.g. "en"): the deployment
default for UI-string translation, the last stop in a request’s locale
chain before the English source when neither the operator’s preference nor
the request’s Accept-Language resolves.
debug: boolDebug mode: error pages include the internal cause. Off by default;
enable only in development. Read via debug where request context is
not available (error rendering).
env_prefix: Option<String>The prefix of the environment variables that override this configuration
(<PREFIX>__SECTION__KEY). Declared here so the application and the lat
command agree on it; unset means the framework default. Read from the files
alone by declared_env_prefix, since it selects the environment layer.
key: Option<String>The application key, id:<base64 of 32 bytes> (lat key generate
writes one; LAT__APP__KEY overrides). Everything the framework
encrypts or signs uses it. Unset, a key derived from backend.secret or
the key stored at the first boot is used, so a deployment without one
keeps working; a production deployment sets it.
previous_keys: Vec<String>Keys retired by a rotation, each id:<base64>, still read; see
crate::crypt.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppMeta
impl<'de> Deserialize<'de> for AppMeta
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 AppMeta
impl RefUnwindSafe for AppMeta
impl Send for AppMeta
impl Sync for AppMeta
impl Unpin for AppMeta
impl UnsafeUnpin for AppMeta
impl UnwindSafe for AppMeta
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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