pub struct CompleteDimension { /* private fields */ }
Implementations§
Source§impl CompleteDimension
impl CompleteDimension
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Checks whether is the dimensions is set.
Sourcepub fn set_widths(&mut self, columns: Vec<usize>)
pub fn set_widths(&mut self, columns: Vec<usize>)
Set column widths.
In general the method is only considered to be useful to a TableOption
.
BE CAREFUL WITH THIS METHOD as it supposed that the content is not bigger than the provided widths.
Sourcepub fn set_heights(&mut self, rows: Vec<usize>)
pub fn set_heights(&mut self, rows: Vec<usize>)
Set rows heights.
In general the method is only considered to be useful to a TableOption
.
BE CAREFUL WITH THIS METHOD as it supposed that the content is not bigger than the provided heights.
Sourcepub fn clear_width(&mut self)
pub fn clear_width(&mut self)
Force width estimation.
Sourcepub fn clear_height(&mut self)
pub fn clear_height(&mut self)
Force height estimation.
Sourcepub fn reastimate(&mut self, hint: Option<Entity>)
pub fn reastimate(&mut self, hint: Option<Entity>)
Copies a reference from self.
Sourcepub fn get_widths(&self) -> Option<&[usize]>
pub fn get_widths(&self) -> Option<&[usize]>
Return inner width list.
Sourcepub fn get_heights(&self) -> Option<&[usize]>
pub fn get_heights(&self) -> Option<&[usize]>
Return inner heights list.
Trait Implementations§
Source§impl Clone for CompleteDimension
impl Clone for CompleteDimension
Source§fn clone(&self) -> CompleteDimension
fn clone(&self) -> CompleteDimension
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompleteDimension
impl Debug for CompleteDimension
Source§impl Default for CompleteDimension
impl Default for CompleteDimension
Source§fn default() -> CompleteDimension
fn default() -> CompleteDimension
Returns the “default value” for a type. Read more
Source§impl Dimension for CompleteDimension
impl Dimension for CompleteDimension
Source§impl<R> Estimate<R, ColoredConfig> for CompleteDimension
impl<R> Estimate<R, ColoredConfig> for CompleteDimension
Source§fn estimate(&mut self, records: R, cfg: &ColoredConfig)
fn estimate(&mut self, records: R, cfg: &ColoredConfig)
Estimates a metric.
Source§impl<R> Estimate<R, SpannedConfig> for CompleteDimension
impl<R> Estimate<R, SpannedConfig> for CompleteDimension
Source§fn estimate(&mut self, records: R, cfg: &SpannedConfig)
fn estimate(&mut self, records: R, cfg: &SpannedConfig)
Estimates a metric.
Source§impl Ord for CompleteDimension
impl Ord for CompleteDimension
Source§fn cmp(&self, other: &CompleteDimension) -> Ordering
fn cmp(&self, other: &CompleteDimension) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CompleteDimension
impl PartialEq for CompleteDimension
Source§impl PartialOrd for CompleteDimension
impl PartialOrd for CompleteDimension
Source§impl<R, C> TableOption<R, C, CompleteDimension> for HeightListwhere
R: ExactRecords + Records,
impl<R, C> TableOption<R, C, CompleteDimension> for HeightListwhere
R: ExactRecords + Records,
Source§fn change(self, records: &mut R, _: &mut C, dims: &mut CompleteDimension)
fn change(self, records: &mut R, _: &mut C, dims: &mut CompleteDimension)
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<R, C> TableOption<R, C, CompleteDimension> for WidthListwhere
R: Records,
impl<R, C> TableOption<R, C, CompleteDimension> for WidthListwhere
R: Records,
Source§fn change(self, records: &mut R, _: &mut C, dimension: &mut CompleteDimension)
fn change(self, records: &mut R, _: &mut C, dimension: &mut CompleteDimension)
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<R, W> TableOption<R, ColoredConfig, CompleteDimension> for CellHeightIncrease<W>where
W: Measurement<Height>,
R: Records + ExactRecords + PeekableRecords,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
impl<R, W> TableOption<R, ColoredConfig, CompleteDimension> for CellHeightIncrease<W>where
W: Measurement<Height>,
R: Records + ExactRecords + PeekableRecords,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<R, W> TableOption<R, ColoredConfig, CompleteDimension> for CellHeightLimit<W>where
W: Measurement<Height>,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
impl<R, W> TableOption<R, ColoredConfig, CompleteDimension> for CellHeightLimit<W>where
W: Measurement<Height>,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimension> for MinWidth<W, P>where
W: Measurement<Width>,
P: Peaker,
R: Records + ExactRecords + PeekableRecords,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: Cell + AsRef<str>,
impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimension> for MinWidth<W, P>where
W: Measurement<Width>,
P: Peaker,
R: Records + ExactRecords + PeekableRecords,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: Cell + AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<R, W, P> TableOption<R, ColoredConfig, CompleteDimension> for TableHeightIncrease<W, P>where
W: Measurement<Height>,
P: Peaker + Clone,
R: Records + ExactRecords + PeekableRecords,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
impl<R, W, P> TableOption<R, ColoredConfig, CompleteDimension> for TableHeightIncrease<W, P>where
W: Measurement<Height>,
P: Peaker + Clone,
R: Records + ExactRecords + PeekableRecords,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<R, W, P> TableOption<R, ColoredConfig, CompleteDimension> for TableHeightLimit<W, P>where
W: Measurement<Height>,
P: Peaker + Clone,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
impl<R, W, P> TableOption<R, ColoredConfig, CompleteDimension> for TableHeightLimit<W, P>where
W: Measurement<Height>,
P: Peaker + Clone,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimension> for Truncate<'_, W, P>where
W: Measurement<Width>,
P: Peaker,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: Cell + AsRef<str>,
impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimension> for Truncate<'_, W, P>where
W: Measurement<Width>,
P: Peaker,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: Cell + AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimension> for Wrap<W, P>where
W: Measurement<Width>,
P: Peaker,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: Cell + AsRef<str>,
impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimension> for Wrap<W, P>where
W: Measurement<Width>,
P: Peaker,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
for<'a> &'a R: Records,
for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: Cell + AsRef<str>,
Source§fn change(
self,
records: &mut R,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut R, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreSource§impl TableOption<VecRecords<Text<String>>, ColoredConfig, CompleteDimension> for ColumnNames
impl TableOption<VecRecords<Text<String>>, ColoredConfig, CompleteDimension> for ColumnNames
Source§fn change(
self,
records: &mut VecRecords<Text<String>>,
cfg: &mut ColoredConfig,
dims: &mut CompleteDimension,
)
fn change( self, records: &mut VecRecords<Text<String>>, cfg: &mut ColoredConfig, dims: &mut CompleteDimension, )
The function modificaties of records and a grid configuration.
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an
TableOption
is going to change table layout. Read moreimpl Eq for CompleteDimension
impl StructuralPartialEq for CompleteDimension
Auto Trait Implementations§
impl Freeze for CompleteDimension
impl RefUnwindSafe for CompleteDimension
impl Send for CompleteDimension
impl Sync for CompleteDimension
impl Unpin for CompleteDimension
impl UnwindSafe for CompleteDimension
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