Skip to main content

ElementExt

Trait ElementExt 

Source
pub trait ElementExt: ParentElement + Sized {
    // Provided method
    fn on_prepaint<F>(self, callback: F) -> Self
       where F: FnOnce(Bounds<Pixels>, &mut Window, &mut App) + 'static { ... }
}
Expand description

Extends a GPUI parent element with post-layout prepaint observation.

Provided Methods§

Source

fn on_prepaint<F>(self, callback: F) -> Self
where F: FnOnce(Bounds<Pixels>, &mut Window, &mut App) + 'static,

Invokes callback during prepaint with this element’s resolved bounds.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§