pub struct Justify<W> { /* private fields */ }
Expand description
Justify sets all columns widths to the set value.
Be aware that it doesn’t consider padding.
So if you want to set a exact width you might need to use Padding
to set it to 0.
§Examples
use tabled::{width::Justify, Style, Modify, object::Segment, Padding, Table};
let data = ["Hello", "World", "!"];
let table = Table::new(&data)
.with(Style::markdown())
.with(Modify::new(Segment::all()).with(Padding::zero()))
.with(Justify::new(3));
Max
usage to justify by a max column width.
use tabled::{width::Justify, Style, Table};
let data = ["Hello", "World", "!"];
let table = Table::new(&data)
.with(Style::markdown())
.with(Justify::max());
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for Justify<W>where
W: Freeze,
impl<W> RefUnwindSafe for Justify<W>where
W: RefUnwindSafe,
impl<W> Send for Justify<W>where
W: Send,
impl<W> Sync for Justify<W>where
W: Sync,
impl<W> Unpin for Justify<W>where
W: Unpin,
impl<W> UnwindSafe for Justify<W>where
W: UnwindSafe,
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