pub struct TableBorder(/* private fields */);Expand description
Line model used by a TablePresentation.
Connected grids use a LineGlyphs repertoire so LineNetwork can
derive every corner, tee, and crossing from the recorded geometry.
Markdown and booktabs tables contain only independent straight rules and
therefore use Canvas cell lines instead.
use urushi::{
BlockStyle, LineGlyphs, Table, TableBorder, TablePresentation, TextStyle,
};
let table = Table::text().headers(["Name"]).row(["Iris"]);
let presentation = TablePresentation::new(
BlockStyle::new(),
BlockStyle::new(),
TextStyle::new(),
)
.border(TableBorder::network(LineGlyphs::ROUNDED));
let _view = presentation.compose(&table);Implementations§
Source§impl TableBorder
impl TableBorder
Sourcepub const fn network(glyphs: LineGlyphs) -> Self
pub const fn network(glyphs: LineGlyphs) -> Self
Creates a connected grid with a caller-owned glyph repertoire.
Trait Implementations§
Source§impl Clone for TableBorder
impl Clone for TableBorder
Source§fn clone(&self) -> TableBorder
fn clone(&self) -> TableBorder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TableBorder
impl Debug for TableBorder
Source§impl PartialEq for TableBorder
impl PartialEq for TableBorder
Source§fn eq(&self, other: &TableBorder) -> bool
fn eq(&self, other: &TableBorder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TableBorder
impl Eq for TableBorder
impl StructuralPartialEq for TableBorder
Auto Trait Implementations§
impl Freeze for TableBorder
impl RefUnwindSafe for TableBorder
impl Send for TableBorder
impl Sync for TableBorder
impl Unpin for TableBorder
impl UnsafeUnpin for TableBorder
impl UnwindSafe for TableBorder
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