Skip to main content

NoticeRouting

Trait NoticeRouting 

Source
pub trait NoticeRouting: Send + Sync {
    // Required method
    fn route(&self, notice: &Notice, cx: &RouteCx) -> Route;

    // Provided method
    fn ask(&self, notice: &Notice) { ... }
}
Expand description

An application’s routing policy. A closure Fn(&Notice, &RouteCx) -> Route is one.

It is asked on the thread that raised the notice: it must be quick and must not raise notices itself.

Required Methods§

Source

fn route(&self, notice: &Notice, cx: &RouteCx) -> Route

The surfaces that show notice.

Provided Methods§

Source

fn ask(&self, notice: &Notice)

Hands a notice routed to Surface::Decisions to the application’s Decisions surface. egui-pop has none: by default it is only kept (and in the history when routed there).

Implementors§