Struct papergrid::config::compact::CompactConfig
source · 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 set_margin(self, margin: Sides<Indent>) -> Self
pub const fn set_margin(self, margin: Sides<Indent>) -> Self
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>) -> Self
pub const fn set_borders(self, borders: Borders<char>) -> Self
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>) -> Self
pub const fn set_padding(self, padding: Sides<Indent>) -> Self
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,
) -> Self
pub const fn set_alignment_horizontal( self, alignment: AlignmentHorizontal, ) -> Self
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>>) -> Self
pub const fn set_borders_color(self, borders: Borders<ANSIStr<'static>>) -> Self
Sets colors of border carcass on the grid.
sourcepub const fn set_margin_color(self, color: Sides<ANSIStr<'static>>) -> Self
pub const fn set_margin_color(self, color: Sides<ANSIStr<'static>>) -> Self
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>>) -> Self
pub const fn set_padding_color(self, color: Sides<ANSIStr<'static>>) -> Self
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 copy 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§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 SpannedConfig
impl From<CompactConfig> for SpannedConfig
source§fn from(compact: CompactConfig) -> Self
fn from(compact: CompactConfig) -> Self
Converts to this type from the input type.
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§fn eq(&self, other: &CompactConfig) -> bool
fn eq(&self, other: &CompactConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CompactConfig
impl PartialOrd for CompactConfig
source§fn partial_cmp(&self, other: &CompactConfig) -> Option<Ordering>
fn partial_cmp(&self, other: &CompactConfig) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. 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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)