pub trait Manager<R: Runtime>: ManagerBase<R> {
Show 16 methods fn config(&self) -> Arc<Config> { ... }
fn emit_all<S: Serialize + Clone>(
        &self,
        event: &str,
        payload: S
    ) -> Result<()> { ... }
fn emit_to<S: Serialize + Clone>(
        &self,
        label: &str,
        event: &str,
        payload: S
    ) -> Result<()> { ... }
fn listen_global<F>(
        &self,
        event: impl Into<String>,
        handler: F
    ) -> EventHandler
    where
        F: Fn(Event) + Send + 'static
, { ... }
fn once_global<F>(
        &self,
        event: impl Into<String>,
        handler: F
    ) -> EventHandler
    where
        F: FnOnce(Event) + Send + 'static
, { ... }
fn trigger_global(&self, event: &str, data: Option<String>) { ... }
fn unlisten(&self, handler_id: EventHandler) { ... }
fn get_window(&self, label: &str) -> Option<Window<R>> { ... }
fn windows(&self) -> HashMap<String, Window<R>> { ... }
fn manage<T>(&self, state: T)
    where
        T: Send + Sync + 'static
, { ... }
fn state<T>(&self) -> State<'_, T>
    where
        T: Send + Sync + 'static
, { ... }
fn try_state<T>(&self) -> Option<State<'_, T>>
    where
        T: Send + Sync + 'static
, { ... }
fn env(&self) -> Env { ... }
fn fs_scope(&self) -> FsScope { ... }
fn asset_protocol_scope(&self) -> FsScope { ... }
fn shell_scope(&self) -> ShellScope { ... }
}
Expand description

Manages a running application.

Provided methods

The Config the manager was created with.

Emits a event to all windows.

Emits an event to a window with the specified label.

Listen to a global event.

Listen to a global event only once.

Trigger a global event.

Remove an event listener.

Fetch a single window from the manager.

Fetch all managed windows.

Add state to the state managed by the application. See crate::Builder for instructions.

Gets the managed state for the type T. Panics if the type is not managed.

Tries to get the managed state for the type T. Returns None if the type is not managed.

Gets the managed Env.

Gets the scope for the filesystem APIs.

Gets the scope for the asset protocol.

Gets the scope for the shell execute APIs.

Implementors