pub trait Measure {
// Required method
fn height_for(&self, width: u16) -> u16;
}Expand description
A widget that can report the height it needs for a given width, before ever being rendered.
Lets a caller size a pane to fit content (e.g. a wrapped Paragraph,
behind the egc feature) instead of guessing a fixed height up front.
Independent of any Backend: sizing is pure content math, not drawing.
Required Methods§
Sourcefn height_for(&self, width: u16) -> u16
fn height_for(&self, width: u16) -> u16
The number of rows this widget would need to render at width
columns.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".