Trait tauri::Manager[][src]

pub trait Manager<M: Params>: ManagerBase<M> {
    fn config(&self) -> &Config { ... }
fn emit_all<S: Serialize + Clone>(
        &self,
        event: M::Event,
        payload: Option<S>
    ) -> Result<()> { ... }
fn emit_to<S: Serialize + Clone>(
        &self,
        label: &M::Label,
        event: M::Event,
        payload: Option<S>
    ) -> Result<()> { ... }
fn create_window(&mut self, pending: PendingWindow<M>) -> Result<Window<M>> { ... }
fn listen_global<F>(&self, event: M::Event, handler: F) -> EventHandler
    where
        F: Fn(Event) + Send + 'static
, { ... }
fn once_global<F>(&self, event: M::Event, handler: F)
    where
        F: Fn(Event) + Send + 'static
, { ... }
fn trigger_global(&self, event: M::Event, data: Option<String>) { ... }
fn unlisten(&self, handler_id: EventHandler) { ... }
fn get_window(&self, label: &M::Label) -> Option<Window<M>> { ... }
fn windows(&self) -> HashMap<M::Label, Window<M>> { ... } }

Manages a running application.

TODO: expand these docs

Provided methods

fn config(&self) -> &Config[src]

The Config the manager was created with.

fn emit_all<S: Serialize + Clone>(
    &self,
    event: M::Event,
    payload: Option<S>
) -> Result<()>
[src]

Emits a event to all windows.

fn emit_to<S: Serialize + Clone>(
    &self,
    label: &M::Label,
    event: M::Event,
    payload: Option<S>
) -> Result<()>
[src]

Emits an event to a window with the specified label.

fn create_window(&mut self, pending: PendingWindow<M>) -> Result<Window<M>>[src]

Creates a new Window on the Runtime and attaches it to the Manager.

fn listen_global<F>(&self, event: M::Event, handler: F) -> EventHandler where
    F: Fn(Event) + Send + 'static, 
[src]

Listen to a global event.

fn once_global<F>(&self, event: M::Event, handler: F) where
    F: Fn(Event) + Send + 'static, 
[src]

Listen to a global event only once.

fn trigger_global(&self, event: M::Event, data: Option<String>)[src]

Trigger a global event.

fn unlisten(&self, handler_id: EventHandler)[src]

Remove an event listener.

fn get_window(&self, label: &M::Label) -> Option<Window<M>>[src]

Fetch a single window from the manager.

fn windows(&self) -> HashMap<M::Label, Window<M>>[src]

Fetch all managed windows.

Loading content...

Implementors

impl<P: Params> Manager<P> for App<P>[src]

impl<P: Params> Manager<P> for Window<P>[src]

Loading content...