Skip to main content

WidgetCoreRect

Trait WidgetCoreRect 

Source
pub trait WidgetCoreRect: WidgetCore {
    // Required methods
    fn rect(&self) -> Rect;
    fn set_rect(&mut self, rect: Rect);
}
Expand description

Extension for a widget core with a Rect

This is only implemented on the core when there is not an explicit definition of Layout::rect.

Required Methods§

Source

fn rect(&self) -> Rect

Get the stored Rect

This should be equivalent to Layout::rect.

Source

fn set_rect(&mut self, rect: Rect)

Set the stored Rect

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§