pub struct Margin { /* private fields */ }
Expand description
Margin is responsible for a left/right/top/bottom outer indent of a grid.
§Example
use tabled::{settings::{Margin, Style}, Table};
let data = vec!["Hello", "World", "!"];
let mut table = Table::new(data);
table
.with(Style::markdown())
.with(Margin::new(3, 3, 1, 0));
assert_eq!(
table.to_string(),
concat!(
" \n",
" | &str | \n",
" |-------| \n",
" | Hello | \n",
" | World | \n",
" | ! | ",
)
);
Implementations§
Trait Implementations§
Source§impl<R, D> TableOption<R, ColoredConfig, D> for Margin
impl<R, D> TableOption<R, ColoredConfig, D> for Margin
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 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> TableOption<R, CompactMultilineConfig, D> for Margin
impl<R, D> TableOption<R, CompactMultilineConfig, D> for Margin
Source§fn change(self, _: &mut R, cfg: &mut CompactMultilineConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut CompactMultilineConfig, _: &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 moreAuto Trait Implementations§
impl Freeze for Margin
impl RefUnwindSafe for Margin
impl Send for Margin
impl Sync for Margin
impl Unpin for Margin
impl UnwindSafe for Margin
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