pub struct LineChar { /* private fields */ }
Expand description
LineChar
sets a char to a specific location on a horizontal line.
§Example
use tabled::{
Table,
grid::config::Offset,
assert::assert_table,
settings::{style::{Style, LineChar}, object::{Object, Rows, Columns}}
};
let mut table = Table::new(["Hello World"]);
table
.with(Style::markdown())
.modify(
Rows::one(1),
(LineChar::horizontal(':', Offset::Start(0)), LineChar::horizontal(':', Offset::End(0))),
)
.modify((1, 0).and((1, 1)), LineChar::vertical('#', Offset::Start(0)));
assert_table!(
table,
"| &str |"
"|:-----------:|"
"# Hello World #"
);
Implementations§
Trait Implementations§
Source§impl<R> CellOption<R, ColoredConfig> for LineCharwhere
R: Records + ExactRecords,
impl<R> CellOption<R, ColoredConfig> for LineCharwhere
R: Records + ExactRecords,
Source§fn change(self, records: &mut R, cfg: &mut ColoredConfig, entity: Entity)
fn change(self, records: &mut R, cfg: &mut ColoredConfig, entity: Entity)
Modification function of a certail part of a grid targeted by
Entity
.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 Ord for LineChar
impl Ord for LineChar
Source§impl PartialOrd for LineChar
impl PartialOrd for LineChar
impl Copy for LineChar
impl Eq for LineChar
impl StructuralPartialEq for LineChar
Auto Trait Implementations§
impl Freeze for LineChar
impl RefUnwindSafe for LineChar
impl Send for LineChar
impl Sync for LineChar
impl Unpin for LineChar
impl UnwindSafe for LineChar
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