pub struct LayoutEngine {
pub min_col_width: usize,
pub max_col_width: usize,
}Expand description
Stateless layout engine. Instantiate once; call resolve on every render.
Fields§
§min_col_width: usize§max_col_width: usizeImplementations§
Source§impl LayoutEngine
impl LayoutEngine
pub fn new() -> Self
pub fn with_bounds(min_col_width: usize, max_col_width: usize) -> Self
Sourcepub fn resolve(
&self,
cache: &LayoutCache,
terminal_width: usize,
) -> Vec<ColumnLayout>
pub fn resolve( &self, cache: &LayoutCache, terminal_width: usize, ) -> Vec<ColumnLayout>
Layout phase: resolve column widths for the given terminal width.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayoutEngine
impl RefUnwindSafe for LayoutEngine
impl Send for LayoutEngine
impl Sync for LayoutEngine
impl Unpin for LayoutEngine
impl UnsafeUnpin for LayoutEngine
impl UnwindSafe for LayoutEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more