Skip to main content

Hook

Trait Hook 

Source
pub trait Hook: Unpin {
    // Provided methods
    fn poll_change(&mut self, _cx: &mut Context<'_>) -> Poll<()> { ... }
    fn pre_component_update(&mut self, _updater: &mut ComponentUpdater<'_, '_>) { ... }
    fn post_component_update(&mut self, _updater: &mut ComponentUpdater<'_, '_>) { ... }
    fn pre_component_draw(&mut self, _drawer: &mut ComponentDrawer<'_, '_>) { ... }
    fn post_component_draw(&mut self, _drawer: &mut ComponentDrawer<'_, '_>) { ... }
    fn on_drop(&mut self) { ... }
}

Provided Methods§

Source

fn poll_change(&mut self, _cx: &mut Context<'_>) -> Poll<()>

Source

fn pre_component_update(&mut self, _updater: &mut ComponentUpdater<'_, '_>)

Source

fn post_component_update(&mut self, _updater: &mut ComponentUpdater<'_, '_>)

Source

fn pre_component_draw(&mut self, _drawer: &mut ComponentDrawer<'_, '_>)

Source

fn post_component_draw(&mut self, _drawer: &mut ComponentDrawer<'_, '_>)

Source

fn on_drop(&mut self)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Hook for Vec<Box<dyn AnyHook>>

Source§

fn poll_change(&mut self, _cx: &mut Context<'_>) -> Poll<()>

Source§

fn pre_component_update(&mut self, _updater: &mut ComponentUpdater<'_, '_>)

Source§

fn post_component_update(&mut self, _updater: &mut ComponentUpdater<'_, '_>)

Source§

fn pre_component_draw(&mut self, _updater: &mut ComponentDrawer<'_, '_>)

Source§

fn post_component_draw(&mut self, _updater: &mut ComponentDrawer<'_, '_>)

Source§

fn on_drop(&mut self)

Implementors§