pub struct AppConfig {Show 19 fields
pub product_name: String,
pub product_names: BTreeMap<String, String>,
pub product_version: String,
pub lingxia_id: Option<String>,
pub lingxia_server: Option<String>,
pub env: AppEnv,
pub home_app_id: String,
pub home_app_version: String,
pub cache_max_size_mb: u64,
pub storage: Option<StorageConfig>,
pub splash: Option<SplashConfig>,
pub dev_ws_url: Option<String>,
pub dev_bundle_base_url: Option<String>,
pub app_links: Option<AppLinksConfig>,
pub theme: Option<ThemeConfig>,
pub settings_destination: Option<SettingsDestination>,
pub capabilities: Option<CapabilitiesConfig>,
pub panels: Option<PanelsConfig>,
pub update_trusted_public_keys: Vec<String>,
}Fields§
§product_name: String§product_names: BTreeMap<String, String>Locale-specific display names from app.productNames.
product_version: String§lingxia_id: Option<String>§lingxia_server: Option<String>§env: AppEnvThe environment this build was produced for. Defaults to AppEnv::Prod
when the field is missing.
home_app_id: String§home_app_version: String§cache_max_size_mb: u64§storage: Option<StorageConfig>§splash: Option<SplashConfig>§dev_ws_url: Option<String>§dev_bundle_base_url: Option<String>§app_links: Option<AppLinksConfig>§theme: Option<ThemeConfig>§settings_destination: Option<SettingsDestination>§capabilities: Option<CapabilitiesConfig>§panels: Option<PanelsConfig>§update_trusted_public_keys: Vec<String>Ed25519 public keys that may verify in-app update envelopes.
Embedded from host lingxia.yaml at build time; never from check-update.
Empty: dev still checks without verifying; prod skips.
Implementations§
Source§impl AppConfig
impl AppConfig
pub fn parse_and_validate(content: &str) -> Result<Self, AppContextError>
Sourcepub fn localized_product_name(&self, locale: &str) -> &str
pub fn localized_product_name(&self, locale: &str) -> &str
Resolve the display name for a locale: exact tag, then language,
then productName.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AppConfig
impl StructuralPartialEq for AppConfig
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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