pub struct TblFit { /* private fields */ }
Expand description
A fitter, accumulating data about the table which must fit into a given width, then computing the best column widths.
Implementations
sourceimpl TblFit
impl TblFit
sourcepub fn new(
cols_count: usize,
available_width: usize
) -> Result<Self, InsufficientWidthError>
pub fn new(
cols_count: usize,
available_width: usize
) -> Result<Self, InsufficientWidthError>
Build a new fitter, or return an error if the width isn’t enough for the given number of columns.
available_width: total available width, including external borders
pub fn see_cell(&mut self, col_idx: usize, cell_width: usize)
sourcepub fn fit(&self) -> TblFitResult
pub fn fit(&self) -> TblFitResult
compute the fitting
Auto Trait Implementations
impl RefUnwindSafe for TblFit
impl Send for TblFit
impl Sync for TblFit
impl Unpin for TblFit
impl UnwindSafe for TblFit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more