pub struct WidgetLayout {
pub max_height: Option<usize>,
pub width_mode: WidthMode,
}Expand description
Layout constraints requested by a widget.
max_height is a preference rather than a terminal allocation. The renderer
combines it with the laid-out content height, terminal height, and the other
non-empty widgets. width_mode controls whether each logical row wraps or is
truncated with an ellipsis.
Fields§
§max_height: Option<usize>§width_mode: WidthModeTrait Implementations§
Source§impl Clone for WidgetLayout
impl Clone for WidgetLayout
Source§fn clone(&self) -> WidgetLayout
fn clone(&self) -> WidgetLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WidgetLayout
Source§impl Debug for WidgetLayout
impl Debug for WidgetLayout
Source§impl Default for WidgetLayout
impl Default for WidgetLayout
Source§fn default() -> WidgetLayout
fn default() -> WidgetLayout
Returns the “default value” for a type. Read more
impl Eq for WidgetLayout
Source§impl PartialEq for WidgetLayout
impl PartialEq for WidgetLayout
impl StructuralPartialEq for WidgetLayout
Auto Trait Implementations§
impl Freeze for WidgetLayout
impl RefUnwindSafe for WidgetLayout
impl Send for WidgetLayout
impl Sync for WidgetLayout
impl Unpin for WidgetLayout
impl UnsafeUnpin for WidgetLayout
impl UnwindSafe for WidgetLayout
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