pub struct Padding(/* private fields */);
Expand description
Padding is responsible for a left/right/top/bottom inner indent of a particular cell.
let table = Table::new(&data).with(Modify::new(Rows::single(0)).with(Padding::new(0, 0, 1, 1).set_fill('>', '<', '^', 'V')));
Implementations§
Source§impl Padding
impl Padding
Sourcepub fn new(left: usize, right: usize, top: usize, bottom: usize) -> Self
pub fn new(left: usize, right: usize, top: usize, bottom: usize) -> Self
Construct’s an Padding object.
It uses space(’ ’) as a default fill character.
To set a custom character you can use Self::set_fill
function.
Sourcepub fn zero() -> Self
pub fn zero() -> Self
Construct’s an Padding object with all sides set to 0.
It uses space(’ ’) as a default fill character.
To set a custom character you can use Self::set_fill
function.
Trait Implementations§
Source§impl<R> CellOption<R> for Padding
impl<R> CellOption<R> for Padding
Source§fn change_cell(&mut self, table: &mut Table<R>, entity: Entity)
fn change_cell(&mut self, table: &mut Table<R>, entity: Entity)
Modification function of a single cell.
Auto Trait Implementations§
impl Freeze for Padding
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
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