pub struct CompactConfig { /* private fields */ }
Expand description
This structure represents a settings of a grid.
grid: crate::Grid.
Implementations§
Source§impl CompactConfig
impl CompactConfig
Sourcepub const fn new() -> CompactConfig
pub const fn new() -> CompactConfig
Returns an standard config.
Sourcepub const fn set_margin(self, margin: Sides<Indent>) -> CompactConfig
pub const fn set_margin(self, margin: Sides<Indent>) -> CompactConfig
Set grid margin.
Sourcepub const fn get_margin(&self) -> &Sides<Indent>
pub const fn get_margin(&self) -> &Sides<Indent>
Returns a grid margin.
Sourcepub const fn set_borders(self, borders: Borders<char>) -> CompactConfig
pub const fn set_borders(self, borders: Borders<char>) -> CompactConfig
Set the Borders
value as correct one.
Sourcepub const fn get_borders(&self) -> &Borders<char>
pub const fn get_borders(&self) -> &Borders<char>
Returns a current Borders
structure.
Sourcepub const fn get_borders_color(&self) -> &Borders<ANSIStr<'static>>
pub const fn get_borders_color(&self) -> &Borders<ANSIStr<'static>>
Returns a current Borders
structure.
Sourcepub const fn set_padding(self, padding: Sides<Indent>) -> CompactConfig
pub const fn set_padding(self, padding: Sides<Indent>) -> CompactConfig
Set a padding to a given cells.
Sourcepub const fn get_padding(&self) -> &Sides<Indent>
pub const fn get_padding(&self) -> &Sides<Indent>
Get a padding for a given.
Sourcepub const fn set_alignment_horizontal(
self,
alignment: AlignmentHorizontal,
) -> CompactConfig
pub const fn set_alignment_horizontal( self, alignment: AlignmentHorizontal, ) -> CompactConfig
Set a horizontal alignment.
Sourcepub const fn get_alignment_horizontal(&self) -> AlignmentHorizontal
pub const fn get_alignment_horizontal(&self) -> AlignmentHorizontal
Get a alignment horizontal.
Sourcepub const fn set_borders_color(
self,
borders: Borders<ANSIStr<'static>>,
) -> CompactConfig
pub const fn set_borders_color( self, borders: Borders<ANSIStr<'static>>, ) -> CompactConfig
Sets colors of border carcass on the grid.
Sourcepub const fn set_margin_color(
self,
color: Sides<ANSIStr<'static>>,
) -> CompactConfig
pub const fn set_margin_color( self, color: Sides<ANSIStr<'static>>, ) -> CompactConfig
Set colors for a margin.
Sourcepub const fn get_margin_color(&self) -> &Sides<ANSIStr<'static>>
pub const fn get_margin_color(&self) -> &Sides<ANSIStr<'static>>
Returns a margin color.
Sourcepub const fn set_padding_color(
self,
color: Sides<ANSIStr<'static>>,
) -> CompactConfig
pub const fn set_padding_color( self, color: Sides<ANSIStr<'static>>, ) -> CompactConfig
Set a padding to a given cells.
Sourcepub const fn get_padding_color(&self) -> &Sides<ANSIStr<'static>>
pub const fn get_padding_color(&self) -> &Sides<ANSIStr<'static>>
Set a padding to a given cells.
Trait Implementations§
Source§impl Clone for CompactConfig
impl Clone for CompactConfig
Source§fn clone(&self) -> CompactConfig
fn clone(&self) -> CompactConfig
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 CompactConfig
impl Debug for CompactConfig
Source§impl Default for CompactConfig
impl Default for CompactConfig
Source§fn default() -> CompactConfig
fn default() -> CompactConfig
Returns the “default value” for a type. Read more
Source§impl<R> Estimate<R, CompactConfig> for CompactGridDimension
impl<R> Estimate<R, CompactConfig> for CompactGridDimension
Source§fn estimate(&mut self, records: R, cfg: &CompactConfig)
fn estimate(&mut self, records: R, cfg: &CompactConfig)
Estimates a metric.
Source§impl From<CompactConfig> for CompactMultilineConfig
impl From<CompactConfig> for CompactMultilineConfig
Source§fn from(config: CompactConfig) -> Self
fn from(config: CompactConfig) -> Self
Converts to this type from the input type.
Source§impl From<CompactConfig> for SpannedConfig
impl From<CompactConfig> for SpannedConfig
Source§fn from(compact: CompactConfig) -> SpannedConfig
fn from(compact: CompactConfig) -> SpannedConfig
Converts to this type from the input type.
Source§impl From<CompactMultilineConfig> for CompactConfig
impl From<CompactMultilineConfig> for CompactConfig
Source§fn from(cfg: CompactMultilineConfig) -> Self
fn from(cfg: CompactMultilineConfig) -> Self
Converts to this type from the input type.
Source§impl Hash for CompactConfig
impl Hash for CompactConfig
Source§impl Ord for CompactConfig
impl Ord for CompactConfig
Source§fn cmp(&self, other: &CompactConfig) -> Ordering
fn cmp(&self, other: &CompactConfig) -> 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 CompactConfig
impl PartialEq for CompactConfig
Source§impl PartialOrd for CompactConfig
impl PartialOrd for CompactConfig
Source§impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, CompactConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>
impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, CompactConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>
Source§fn change(self, _: &mut Data, cfg: &mut CompactConfig, _: &mut Dims)
fn change(self, _: &mut Data, cfg: &mut CompactConfig, _: &mut Dims)
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, D> TableOption<R, ColoredConfig, D> for CompactConfig
impl<R, D> TableOption<R, ColoredConfig, D> for CompactConfig
Source§fn change(self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D)
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, D> TableOption<R, CompactConfig, D> for Alignment
impl<R, D> TableOption<R, CompactConfig, D> for Alignment
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D> TableOption<R, CompactConfig, D> for Borders<char>
impl<R, D> TableOption<R, CompactConfig, D> for Borders<char>
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D> TableOption<R, CompactConfig, D> for CompactConfig
impl<R, D> TableOption<R, CompactConfig, D> for CompactConfig
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D> TableOption<R, CompactConfig, D> for Margin
impl<R, D> TableOption<R, CompactConfig, D> for Margin
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D, C> TableOption<R, CompactConfig, D> for MarginColor<C>
impl<R, D, C> TableOption<R, CompactConfig, D> for MarginColor<C>
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D> TableOption<R, CompactConfig, D> for Padding
impl<R, D> TableOption<R, CompactConfig, D> for Padding
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D, C> TableOption<R, CompactConfig, D> for PaddingColor<C>
impl<R, D, C> TableOption<R, CompactConfig, D> for PaddingColor<C>
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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, D> TableOption<R, CompactConfig, D> for Theme
impl<R, D> TableOption<R, CompactConfig, D> for Theme
Source§fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)
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 Copy for CompactConfig
impl Eq for CompactConfig
impl StructuralPartialEq for CompactConfig
Auto Trait Implementations§
impl Freeze for CompactConfig
impl RefUnwindSafe for CompactConfig
impl Send for CompactConfig
impl Sync for CompactConfig
impl Unpin for CompactConfig
impl UnwindSafe for CompactConfig
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