pub trait LayoutData: Any + Debug {
// Required methods
fn same_as(&self, other: &(dyn LayoutData + 'static)) -> bool;
fn as_any(&self) -> &(dyn Any + 'static);
}Expand description
Data a child’s modifier gives one kind of parent layout, which that
layout’s measure policy reads by its type: a grid cell, or the data of
an app’s own layout. Compose’s ParentDataModifierNode data. Every
'static type with Debug and PartialEq is layout data.
Required Methods§
Sourcefn same_as(&self, other: &(dyn LayoutData + 'static)) -> bool
fn same_as(&self, other: &(dyn LayoutData + 'static)) -> bool
Whether other holds the same data, so a parent can keep its last
measure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".