pub trait SubcomposeLayoutScope: MeasureScope {
// Required method
fn constraints(&self) -> Constraints;
// Provided method
fn layout<I>(
&mut self,
width: f32,
height: f32,
placements: I,
) -> MeasureResult
where I: IntoIterator<Item = Placement> { ... }
}Expand description
Base trait for measurement scopes.
Required Methods§
Sourcefn constraints(&self) -> Constraints
fn constraints(&self) -> Constraints
Returns the constraints that the parent passed to this layout.
Provided Methods§
Sourcefn layout<I>(&mut self, width: f32, height: f32, placements: I) -> MeasureResultwhere
I: IntoIterator<Item = Placement>,
fn layout<I>(&mut self, width: f32, height: f32, placements: I) -> MeasureResultwhere
I: IntoIterator<Item = Placement>,
Builds a measure result of size width by height, in logical pixels, with the given
placements.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".