pub struct TableStyle {
pub top_left_corner: char,
pub top_right_corner: char,
pub bottom_left_corner: char,
pub bottom_right_corner: char,
pub outer_left_vertical: char,
pub outer_right_vertical: char,
pub outer_bottom_horizontal: char,
pub outer_top_horizontal: char,
pub intersection: char,
pub vertical: char,
pub horizontal: char,
}
Expand description
A set of characters which make up a table style
§Example
term_data_table::TableStyle {
top_left_corner: '╔',
top_right_corner: '╗',
bottom_left_corner: '╚',
bottom_right_corner: '╝',
outer_left_vertical: '╠',
outer_right_vertical: '╣',
outer_bottom_horizontal: '╩',
outer_top_horizontal: '╦',
intersection: '╬',
vertical: '║',
horizontal: '═',
};
Fields§
§top_left_corner: char
§top_right_corner: char
§bottom_left_corner: char
§bottom_right_corner: char
§outer_left_vertical: char
§outer_right_vertical: char
§outer_bottom_horizontal: char
§outer_top_horizontal: char
§intersection: char
§vertical: char
§horizontal: char
Implementations§
Source§impl TableStyle
impl TableStyle
Sourcepub const SIMPLE: TableStyle
pub const SIMPLE: TableStyle
Basic terminal table style
§Example
+---------------------------------------------------------------------------------+ | This is some centered text | +----------------------------------------+----------------------------------------+ | This is left aligned text | This is right aligned text | +----------------------------------------+----------------------------------------+ | This is left aligned text | This is right aligned text | +----------------------------------------+----------------------------------------+ | This is some really really really really really really really really really tha | | t is going to wrap to the next line | +---------------------------------------------------------------------------------+
Sourcepub const EXTENDED: TableStyle
pub const EXTENDED: TableStyle
Table style using extended character set
§Example
╔═════════════════════════════════════════════════════════════════════════════════╗ ║ This is some centered text ║ ╠════════════════════════════════════════╦════════════════════════════════════════╣ ║ This is left aligned text ║ This is right aligned text ║ ╠════════════════════════════════════════╬════════════════════════════════════════╣ ║ This is left aligned text ║ This is right aligned text ║ ╠════════════════════════════════════════╩════════════════════════════════════════╣ ║ This is some really really really really really really really really really tha ║ ║ t is going to wrap to the next line ║ ╚═════════════════════════════════════════════════════════════════════════════════╝
Sourcepub const THIN: TableStyle
pub const THIN: TableStyle
┌─────────────────────────────────────────────────────────────────────────────────┐ │ This is some centered text │ ├────────────────────────────────────────┬────────────────────────────────────────┤ │ This is left aligned text │ This is right aligned text │ ├────────────────────────────────────────┼────────────────────────────────────────┤ │ This is left aligned text │ This is right aligned text │ ├────────────────────────────────────────┴────────────────────────────────────────┤ │ This is some really really really really really really really really really tha │ │ t is going to wrap to the next line │ └─────────────────────────────────────────────────────────────────────────────────┘
Sourcepub const ROUNDED: TableStyle
pub const ROUNDED: TableStyle
╭─────────────────────────────────────────────────────────────────────────────────╮ │ This is some centered text │ ├────────────────────────────────────────┬────────────────────────────────────────┤ │ This is left aligned text │ This is right aligned text │ ├────────────────────────────────────────┼────────────────────────────────────────┤ │ This is left aligned text │ This is right aligned text │ ├────────────────────────────────────────┴────────────────────────────────────────┤ │ This is some really really really really really really really really really tha │ │ t is going to wrap to the next line │ ╰─────────────────────────────────────────────────────────────────────────────────╯
Sourcepub const ELEGANT: TableStyle
pub const ELEGANT: TableStyle
╔─────────────────────────────────────────────────────────────────────────────────╗ │ This is some centered text │ ╠────────────────────────────────────────╦────────────────────────────────────────╣ │ This is left aligned text │ This is right aligned text │ ╠────────────────────────────────────────┼────────────────────────────────────────╣ │ This is left aligned text │ This is right aligned text │ ╠────────────────────────────────────────╩────────────────────────────────────────╣ │ This is some really really really really really really really really really tha │ │ t is going to wrap to the next line │ ╚─────────────────────────────────────────────────────────────────────────────────╝
Sourcepub const BLANK: TableStyle
pub const BLANK: TableStyle
Table style comprised of null characters
§Example
This is some centered text This is left aligned text This is right aligned text This is left aligned text This is right aligned text This is some really really really really really really really really really tha t is going to wrap to the next line
Sourcepub const EMPTY: TableStyle
pub const EMPTY: TableStyle
Table style comprised of empty characters for compatibility with terminals that don’t handle null characters appropriately
§Example
This is some centered text This is left aligned text This is right aligned text This is left aligned text This is right aligned text This is some really really really really really really really really really tha t is going to wrap to the next line
Trait Implementations§
Source§impl Clone for TableStyle
impl Clone for TableStyle
Source§fn clone(&self) -> TableStyle
fn clone(&self) -> TableStyle
Returns a duplicate of the value. Read more
1.0.0 · 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 TableStyle
impl Debug for TableStyle
impl Copy for TableStyle
Auto Trait Implementations§
impl Freeze for TableStyle
impl RefUnwindSafe for TableStyle
impl Send for TableStyle
impl Sync for TableStyle
impl Unpin for TableStyle
impl UnwindSafe for TableStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more