pub struct ColumnWidthCalculator { /* private fields */ }
Expand description
Handles all column width calculations for the viewport Extracted from ViewportManager to improve maintainability and testability
Implementations§
Source§impl ColumnWidthCalculator
impl ColumnWidthCalculator
Sourcepub fn get_packing_mode(&self) -> ColumnPackingMode
pub fn get_packing_mode(&self) -> ColumnPackingMode
Get current packing mode
Sourcepub fn set_packing_mode(&mut self, mode: ColumnPackingMode)
pub fn set_packing_mode(&mut self, mode: ColumnPackingMode)
Set packing mode and mark cache as dirty
Sourcepub fn cycle_packing_mode(&mut self)
pub fn cycle_packing_mode(&mut self)
Cycle to the next packing mode
Sourcepub fn get_debug_info(&self) -> &[ColumnWidthDebugInfo] ⓘ
pub fn get_debug_info(&self) -> &[ColumnWidthDebugInfo] ⓘ
Get debug information about column width calculations
Sourcepub fn mark_dirty(&mut self)
pub fn mark_dirty(&mut self)
Mark cache as dirty (needs recalculation)
Sourcepub fn calculate_with_terminal_width(
&mut self,
dataview: &DataView,
viewport_rows: &Range<usize>,
terminal_width: u16,
)
pub fn calculate_with_terminal_width( &mut self, dataview: &DataView, viewport_rows: &Range<usize>, terminal_width: u16, )
Calculate optimal widths with terminal width awareness
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColumnWidthCalculator
impl RefUnwindSafe for ColumnWidthCalculator
impl Send for ColumnWidthCalculator
impl Sync for ColumnWidthCalculator
impl Unpin for ColumnWidthCalculator
impl UnwindSafe for ColumnWidthCalculator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more