pub trait RenderAbstractLayoutBuilderMixin: RenderObjectWithLayoutCallbackMixin {
// Required methods
fn callback(self: RenderHandle<Self>, app: &App) -> Option<Listener>;
fn set_callback(
self: RenderHandle<Self>,
app: &mut App,
callback: Option<Listener>,
);
// Provided methods
fn update_callback(self: RenderHandle<Self>, app: &mut App, value: Listener) { ... }
fn layout_info(self: RenderHandle<Self>, app: &App) -> AnyBoxConstraints { ... }
}Expand description
Generic mixin for RenderObjects created by AbstractLayoutBuilders, which run a
builder callback during layout (Dart’s RenderAbstractLayoutBuilderMixin /
RenderConstrainedLayoutBuilder).
The callback is LayoutBuilderElement::rebuild_with_constraints; it reads the constraints
from the render object rather than receiving them.
Required Methods§
Sourcefn callback(self: RenderHandle<Self>, app: &App) -> Option<Listener>
fn callback(self: RenderHandle<Self>, app: &App) -> Option<Listener>
The layout callback, if set.
Sourcefn set_callback(
self: RenderHandle<Self>,
app: &mut App,
callback: Option<Listener>,
)
fn set_callback( self: RenderHandle<Self>, app: &mut App, callback: Option<Listener>, )
Sets (or clears) the layout callback without scheduling it.
Provided Methods§
Sourcefn update_callback(self: RenderHandle<Self>, app: &mut App, value: Listener)
fn update_callback(self: RenderHandle<Self>, app: &mut App, value: Listener)
Change the layout callback and schedule it.
Sourcefn layout_info(self: RenderHandle<Self>, app: &App) -> AnyBoxConstraints
fn layout_info(self: RenderHandle<Self>, app: &App) -> AnyBoxConstraints
The information the builder is given: this box’s constraints, with their subclass.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".