pub trait MeasurePolicy {
// Required methods
fn measure(
&self,
measurables: &[Box<dyn Measurable>],
constraints: Constraints,
) -> MeasureResult;
fn min_intrinsic_width(
&self,
measurables: &[Box<dyn Measurable>],
height: f32,
) -> f32;
fn max_intrinsic_width(
&self,
measurables: &[Box<dyn Measurable>],
height: f32,
) -> f32;
fn min_intrinsic_height(
&self,
measurables: &[Box<dyn Measurable>],
width: f32,
) -> f32;
fn max_intrinsic_height(
&self,
measurables: &[Box<dyn Measurable>],
width: f32,
) -> f32;
}Expand description
Policy responsible for measuring and placing children.
Required Methods§
Sourcefn measure(
&self,
measurables: &[Box<dyn Measurable>],
constraints: Constraints,
) -> MeasureResult
fn measure( &self, measurables: &[Box<dyn Measurable>], constraints: Constraints, ) -> MeasureResult
Runs the measurement pass with the provided children and constraints.
Sourcefn min_intrinsic_width(
&self,
measurables: &[Box<dyn Measurable>],
height: f32,
) -> f32
fn min_intrinsic_width( &self, measurables: &[Box<dyn Measurable>], height: f32, ) -> f32
Computes the minimum intrinsic width of this policy.
Sourcefn max_intrinsic_width(
&self,
measurables: &[Box<dyn Measurable>],
height: f32,
) -> f32
fn max_intrinsic_width( &self, measurables: &[Box<dyn Measurable>], height: f32, ) -> f32
Computes the maximum intrinsic width of this policy.
Sourcefn min_intrinsic_height(
&self,
measurables: &[Box<dyn Measurable>],
width: f32,
) -> f32
fn min_intrinsic_height( &self, measurables: &[Box<dyn Measurable>], width: f32, ) -> f32
Computes the minimum intrinsic height of this policy.
Sourcefn max_intrinsic_height(
&self,
measurables: &[Box<dyn Measurable>],
width: f32,
) -> f32
fn max_intrinsic_height( &self, measurables: &[Box<dyn Measurable>], width: f32, ) -> f32
Computes the maximum intrinsic height of this policy.