Skip to main content

SubcomposeLayoutScope

Trait SubcomposeLayoutScope 

Source
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§

Source

fn constraints(&self) -> Constraints

Returns the constraints that the parent passed to this layout.

Provided Methods§

Source

fn layout<I>(&mut self, width: f32, height: f32, placements: I) -> MeasureResult
where 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".

Implementors§