Skip to main content

DesktopBundleConfig

Struct DesktopBundleConfig 

Source
pub struct DesktopBundleConfig {
    pub bundle_dir: PathBuf,
    pub state: Option<Value>,
    pub max_asset_bytes: u64,
    pub route_state: RouteStateRegistry,
    pub api_routes: ApiRouteRegistry,
    pub token_css: Option<HashMap<String, String>>,
}
Expand description

Bundle-backed desktop runtime configuration.

Use this from app-specific packaged runners that load protocol.bin and immutable assets from a bundle while registering Rust-owned route state and typed IPC handlers in the executable.

Fields§

§bundle_dir: PathBuf

Desktop bundle directory created by webui desktop build.

§state: Option<Value>

Optional Rust-owned startup state. When omitted, bundled state.json is used.

§max_asset_bytes: u64

Maximum file length delivered by one protocol response.

§route_state: RouteStateRegistry

Rust route state providers.

§api_routes: ApiRouteRegistry

Rust custom-protocol API handlers.

§token_css: Option<HashMap<String, String>>

Optional pre-resolved design token CSS keyed by theme name.

Implementations§

Source§

impl DesktopBundleConfig

Source

pub fn new(bundle_dir: PathBuf) -> Self

Create a bundle config with empty route/IPC registries.

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> 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, 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.