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: chartop_right_corner: charbottom_left_corner: charbottom_right_corner: charouter_left_vertical: charouter_right_vertical: charouter_bottom_horizontal: charouter_top_horizontal: charintersection: charvertical: charhorizontal: char

Implementations

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                                             |
   +---------------------------------------------------------------------------------+

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                                             ║
 ╚═════════════════════════════════════════════════════════════════════════════════╝
┌─────────────────────────────────────────────────────────────────────────────────┐
│                            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                                             │
└─────────────────────────────────────────────────────────────────────────────────┘
╭─────────────────────────────────────────────────────────────────────────────────╮
│                            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                                             │
╰─────────────────────────────────────────────────────────────────────────────────╯
╔─────────────────────────────────────────────────────────────────────────────────╗
│                            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                                             │
╚─────────────────────────────────────────────────────────────────────────────────╝

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.