Trait tauri::Manager[][src]

pub trait Manager<P: Params>: ManagerBase<P> {
    fn config(&self) -> Arc<Config> { ... }
fn emit_all<E: ?Sized, S>(&self, event: &E, payload: S) -> Result<()>
    where
        P::Event: Borrow<E>,
        E: TagRef<P::Event>,
        S: Serialize + Clone
, { ... }
fn emit_to<E: ?Sized, L: ?Sized, S: Serialize + Clone>(
        &self,
        label: &L,
        event: &E,
        payload: S
    ) -> Result<()>
    where
        P::Label: Borrow<L>,
        P::Event: Borrow<E>,
        L: TagRef<P::Label>,
        E: TagRef<P::Event>
, { ... }
fn listen_global<E: Into<P::Event>, F>(
        &self,
        event: E,
        handler: F
    ) -> EventHandler
    where
        F: Fn(Event) + Send + 'static
, { ... }
fn once_global<E: Into<P::Event>, F>(
        &self,
        event: E,
        handler: F
    ) -> EventHandler
    where
        F: Fn(Event) + Send + 'static
, { ... }
fn trigger_global<E: ?Sized>(&self, event: &E, data: Option<String>)
    where
        P::Event: Borrow<E>,
        E: TagRef<P::Event>
, { ... }
fn unlisten(&self, handler_id: EventHandler) { ... }
fn get_window<L: ?Sized>(&self, label: &L) -> Option<Window<P>>
    where
        P::Label: Borrow<L>,
        L: TagRef<P::Label>
, { ... }
fn windows(&self) -> HashMap<P::Label, Window<P>> { ... }
fn manage<T>(&self, state: T)
    where
        T: Send + Sync + 'static
, { ... }
fn state<T>(&self) -> State<'_, T>
    where
        T: Send + Sync + 'static
, { ... } }
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.

Implementors