pub trait Layouter<W, K, N, T, V, P>{
// Required methods
fn layout(&mut self, weave: &mut W, sizes: impl FnMut(&K) -> V);
fn size(&self) -> V;
fn view(
&mut self,
min: V,
max: V,
callback: impl FnMut(LayoutItem<K, V, P>),
);
}Expand description
Required Methods§
Sourcefn layout(&mut self, weave: &mut W, sizes: impl FnMut(&K) -> V)
fn layout(&mut self, weave: &mut W, sizes: impl FnMut(&K) -> V)
Arranges a Weave’s content for graphical rendering using a closure which maps Nodes to their dimensions.
§Panics
Panics if the Weave’s content could not be arranged due to an unsatisfiable constraint or numerical overflow.
May panic if map panics or if the underlying Weave is improperly implemented.
Sourcefn view(&mut self, min: V, max: V, callback: impl FnMut(LayoutItem<K, V, P>))
fn view(&mut self, min: V, max: V, callback: impl FnMut(LayoutItem<K, V, P>))
Returns LayoutItems within the specified bounds in the order that they should be rendered.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".