Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 31 fields pub dir: PathBuf, pub app_id: String, pub bundle_id: String, pub version: String, pub name: BTreeMap<String, String>, pub icon: Option<String>, pub platform_icons: BTreeMap<String, String>, pub alternate_icons: BTreeMap<String, BTreeMap<String, String>>, pub publisher: Option<String>, pub files_folder: bool, pub background_audio: bool, pub overlays: bool, pub languages: Vec<String>, pub default_language: String, pub strict: bool, pub theme_mode: ThemeMode, pub brand_seed: Option<Srgb>, pub protocol_package: Package, pub protocol_source: SourceFile, pub engine_package: Package, pub engine_type: String, pub ui_package: Package, pub ui_sources: Vec<SourceFile>, pub root: String, pub targets: Vec<TargetConfig>, pub libraries: Vec<PathBuf>, pub modules: Vec<ModuleConfig>, pub build_modules: Modules, pub contributes: BTreeMap<String, Vec<String>>, pub resources: Vec<ResourceDef>, pub layouts: Option<LayoutConfig>,
}

Fields§

§dir: PathBuf§app_id: String§bundle_id: String§version: String§name: BTreeMap<String, String>§icon: Option<String>

[app].icon, or default in [app.icon]: a checked square PNG relative to dir.

§platform_icons: BTreeMap<String, String>

The other entries of [app.icon]: platform name to a checked square PNG, or a file or folder in the platform’s own form, relative to dir.

§alternate_icons: BTreeMap<String, BTreeMap<String, String>>

[app.alternate_icons.<name>]: name to its checked entries, as [app.icon] has them, with default for every platform.

§publisher: Option<String>

[app].publisher, trimmed; None when absent or blank.

§files_folder: bool

[app].files_folder.

§background_audio: bool

[app].background_audio.

§overlays: bool

[app].overlays.

§languages: Vec<String>§default_language: String§strict: bool§theme_mode: ThemeMode§brand_seed: Option<Srgb>§protocol_package: Package§protocol_source: SourceFile§engine_package: Package§engine_type: String§ui_package: Package§ui_sources: Vec<SourceFile>§root: String§targets: Vec<TargetConfig>§libraries: Vec<PathBuf>

Manifests of component libraries the UI uses.

§modules: Vec<ModuleConfig>

The application’s modules, in the order Bern.toml lists them.

§build_modules: Modules

Declared modules and whether this build includes them.

§contributes: BTreeMap<String, Vec<String>>

Slot id to the application’s own components placed there, before the modules’.

§resources: Vec<ResourceDef>

Files shipped with the application, directories expanded, sorted by name.

§layouts: Option<LayoutConfig>

Breakpoints from [layouts], if declared.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.