Skip to main content

UiHandled

Trait UiHandled 

Source
pub trait UiHandled {
    // Required method
    fn handled(self) -> bool;
}
Expand description

What a Registry::register_ui handler returns: () (never marks events as used) or bool (true = the handler used this key:/char: event — the host then doesn’t, e.g. Esc doesn’t close the screen).

Required Methods§

Source

fn handled(self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl UiHandled for ()

Source§

fn handled(self) -> bool

Source§

impl UiHandled for bool

Source§

fn handled(self) -> bool

Implementors§