Struct Style

Source
pub struct Style<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> { /* private fields */ }
Expand description

Style is represents a theme of a Table.

corner top left         top intersection                    corner top right
               .             |                             .
                .            V                            .
                 ╭───┬───┬───┬───┬───┬───┬────┬────┬────╮
                 │ i │ 0 │ 1 │ 2 │ 3 │ 4 │ 5  │ 6  │ 7  │
                 ├───┼───┼───┼───┼───┼───┼────┼────┼────┤ <- this horizontal line is custom 'horizontals'
                 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0  │ 0  │ 0  │    other lines horizontal lines are not set they called 'horizontal'
                 │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5  │ 6  │ 7  │
                 │ 2 │ 0 │ 2 │ 4 │ 6 │ 8 │ 10 │ 12 │ 14 │
                 ╰───┴───┴───┴───┴───┴───┴────┴────┴────╯
               .         ^                    ^           .
              .          |                    |            .
corner bottom left       |         bottom intersection     corner bottom right
                         |
                         |
            all this vertical lines are called 'vertical'
                    ┌───┬───┬───┬───┬───┐
                    │ 0 │ 1 │ 2 │ 3 │ 4 │
intersection left ->├───X───X───X───X───┤ <- all this horizontal lines are called 'horizontal'
                    │ 1 │ 2 │ 3 │ 4 │ 5 │
                    ├───X───X───X───X───┤ <- intersection right
                    │ 2 │ 3 │ 4 │ 5 │ 6 │
                    └───┴───┴───┴───┴───┘

All 'X' positions are called 'intersection'.
It's a place where 'vertical' and 'horizontal' lines intersect.

It tries to limit an controlling a valid state of it. For example, it won’t allow to call method Style::corner_top_left unless Style::left and Style::top is set.

You can turn Style into Theme to have a precise control using Into implementation.

§Example

use tabled::{Table, settings::style::Style};

let data = vec!["Hello", "2021"];
let mut table = Table::new(&data);

let style = Style::ascii().bottom('*').intersection(' ');
table.with(style);

println!("{}", table);

Implementations§

Source§

impl Style<(), (), (), (), (), (), 0, 0>

Source

pub const fn empty() -> Style<(), (), (), (), (), (), 0, 0>

This style is a style with no styling options on,

     id  distribution            link
     0      Fedora      https://getfedora.org/
     2     OpenSUSE    https://www.opensuse.org/
     3   Endeavouros   https://endeavouros.com/

Note: The cells in the example have 1-left and 1-right indent.

This style can be used as a base style to build a custom one.

let style = Style::empty()
    .top('*')
    .bottom('*')
    .vertical('#')
    .intersection_top('*');
Source

pub const fn blank() -> Style<(), (), (), (), (), On, 0, 0>

This style is analog of empty but with a vertical space(’ ’) line.

     id   distribution             link
     0       Fedora       https://getfedora.org/
     2      OpenSUSE     https://www.opensuse.org/
     3    Endeavouros    https://endeavouros.com/
Source

pub const fn ascii() -> Style<On, On, On, On, On, On, 0, 0>

This is a style which relays only on ASCII charset.

It has horizontal and vertical lines.

    +----+--------------+---------------------------+
    | id | distribution |           link            |
    +----+--------------+---------------------------+
    | 0  |    Fedora    |  https://getfedora.org/   |
    +----+--------------+---------------------------+
    | 2  |   OpenSUSE   | https://www.opensuse.org/ |
    +----+--------------+---------------------------+
    | 3  | Endeavouros  | https://endeavouros.com/  |
    +----+--------------+---------------------------+
Source

pub const fn psql() -> Style<(), (), (), (), (), On, 1, 0>

psql style looks like a table style PostgreSQL uses.

It has only 1 horizontal line which splits header. And no left and right vertical lines.

     id | distribution |           link
    ----+--------------+---------------------------
     0  |    Fedora    |  https://getfedora.org/
     2  |   OpenSUSE   | https://www.opensuse.org/
     3  | Endeavouros  | https://endeavouros.com/
Source

pub const fn markdown() -> Style<(), (), On, On, (), On, 1, 0>

markdown style mimics a Markdown table style.

    | id | distribution |           link            |
    |----|--------------|---------------------------|
    | 0  |    Fedora    |  https://getfedora.org/   |
    | 2  |   OpenSUSE   | https://www.opensuse.org/ |
    | 3  | Endeavouros  | https://endeavouros.com/  |
Source

pub const fn modern() -> Style<On, On, On, On, On, On, 0, 0>

This style is analog of Style::ascii which uses UTF-8 charset.

It has vertical and horizontal split lines.

    ┌────┬──────────────┬───────────────────────────┐
    │ id │ distribution │           link            │
    ├────┼──────────────┼───────────────────────────┤
    │ 0  │    Fedora    │  https://getfedora.org/   │
    ├────┼──────────────┼───────────────────────────┤
    │ 2  │   OpenSUSE   │ https://www.opensuse.org/ │
    ├────┼──────────────┼───────────────────────────┤
    │ 3  │ Endeavouros  │ https://endeavouros.com/  │
    └────┴──────────────┴───────────────────────────┘
Source

pub const fn sharp() -> Style<On, On, On, On, (), On, 1, 0>

This style looks like a Style::modern but without horozizontal lines except a header.

Beware: It uses UTF-8 characters.

    ┌────┬──────────────┬───────────────────────────┐
    │ id │ distribution │           link            │
    ├────┼──────────────┼───────────────────────────┤
    │ 0  │    Fedora    │  https://getfedora.org/   │
    │ 2  │   OpenSUSE   │ https://www.opensuse.org/ │
    │ 3  │ Endeavouros  │ https://endeavouros.com/  │
    └────┴──────────────┴───────────────────────────┘
Source

pub const fn rounded() -> Style<On, On, On, On, (), On, 1, 0>

This style looks like a Style::sharp but with rounded corners.

Beware: It uses UTF-8 characters.

    ╭────┬──────────────┬───────────────────────────╮
    │ id │ distribution │           link            │
    ├────┼──────────────┼───────────────────────────┤
    │ 0  │    Fedora    │  https://getfedora.org/   │
    │ 2  │   OpenSUSE   │ https://www.opensuse.org/ │
    │ 3  │ Endeavouros  │ https://endeavouros.com/  │
    ╰────┴──────────────┴───────────────────────────╯
Source

pub const fn modern_rounded() -> Style<On, On, On, On, On, On, 0, 0>

This style looks like a Style::rounded but with horizontals lines.

Beware: It uses UTF-8 characters.

    ╭────┬──────────────┬───────────────────────────╮
    │ id │ distribution │           link            │
    ├────┼──────────────┼───────────────────────────┤
    │ 0  │    Fedora    │  https://getfedora.org/   │
    ├────┼──────────────┼───────────────────────────┤
    │ 2  │   OpenSUSE   │ https://www.opensuse.org/ │
    ├────┼──────────────┼───────────────────────────┤
    │ 3  │ Endeavouros  │ https://endeavouros.com/  │
    ╰────┴──────────────┴───────────────────────────╯
Source

pub const fn extended() -> Style<On, On, On, On, On, On, 0, 0>

This style uses a chars which resembles ‘2 lines’.

Beware: It uses UTF8 characters.

    ╔════╦══════════════╦═══════════════════════════╗
    ║ id ║ distribution ║           link            ║
    ╠════╬══════════════╬═══════════════════════════╣
    ║ 0  ║    Fedora    ║  https://getfedora.org/   ║
    ╠════╬══════════════╬═══════════════════════════╣
    ║ 2  ║   OpenSUSE   ║ https://www.opensuse.org/ ║
    ╠════╬══════════════╬═══════════════════════════╣
    ║ 3  ║ Endeavouros  ║ https://endeavouros.com/  ║
    ╚════╩══════════════╩═══════════════════════════╝
Source

pub const fn dots() -> Style<On, On, On, On, On, On, 0, 0>

This is a style uses only ‘.’ and ‘:’ chars. It has a vertical and horizontal split lines.

    .................................................
    : id : distribution :           link            :
    :....:..............:...........................:
    : 0  :    Fedora    :  https://getfedora.org/   :
    :....:..............:...........................:
    : 2  :   OpenSUSE   : https://www.opensuse.org/ :
    :....:..............:...........................:
    : 3  : Endeavouros  : https://endeavouros.com/  :
    :....:..............:...........................:
Source

pub const fn re_structured_text() -> Style<On, On, (), (), (), On, 1, 0>

This style is one of table views in ReStructuredText.

    ==== ============== ===========================
     id   distribution             link            
    ==== ============== ===========================
     0       Fedora       https://getfedora.org/   
     2      OpenSUSE     https://www.opensuse.org/
     3    Endeavouros    https://endeavouros.com/  
    ==== ============== ===========================
Source

pub const fn ascii_rounded() -> Style<On, On, On, On, (), On, 0, 0>

This is a theme analog of Style::rounded, but in using ascii charset and with no horizontal lines.

    .-----------------------------------------------.
    | id | distribution |           link            |
    | 0  |    Fedora    |  https://getfedora.org/   |
    | 2  |   OpenSUSE   | https://www.opensuse.org/ |
    | 3  | Endeavouros  | https://endeavouros.com/  |
    '-----------------------------------------------'
Source§

impl<T, B, L, R, H, V, const HN: usize, const VN: usize> Style<T, B, L, R, H, V, HN, VN>

Source

pub const fn horizontals<const SIZE: usize>( self, list: [(usize, HorizontalLine<L, R, V>); SIZE], ) -> Style<T, B, L, R, H, V, SIZE, VN>

Set border horizontal lines.

§Example
use tabled::{settings::style::{Style, HorizontalLine}, Table};

let data = (0..3).map(|i| ("Hello", i));
let mut table = Table::new(data);

let style = Style::rounded().horizontals([
    (1, HorizontalLine::filled('#')),
    (2, HorizontalLine::filled('&')),
    (3, HorizontalLine::filled('@')),
]);

table.with(style);

assert_eq!(
    table.to_string(),
    concat!(
        "╭───────┬─────╮\n",
        "│ &str  │ i32 │\n",
        "###############\n",
        "│ Hello │ 0   │\n",
        "&&&&&&&&&&&&&&&\n",
        "│ Hello │ 1   │\n",
        "@@@@@@@@@@@@@@@\n",
        "│ Hello │ 2   │\n",
        "╰───────┴─────╯",
    )
)
Source

pub const fn verticals<const SIZE: usize>( self, list: [(usize, VerticalLine<T, B, H>); SIZE], ) -> Style<T, B, L, R, H, V, HN, SIZE>

Set border vertical lines.

§Example
use tabled::{settings::style::{Style, VerticalLine}, Table};

let data = (0..3).map(|i| ("Hello", "World", i));
let mut table = Table::new(data);

let style = Style::rounded().verticals([
    (1, VerticalLine::new('#').top(':').bottom('.')),
    (2, VerticalLine::new('&').top(':').bottom('.')),
]);
let table = table.with(style).to_string();

assert_eq!(
    table,
    concat!(
        "╭───────:───────:─────╮\n",
        "│ &str  # &str  & i32 │\n",
        "├───────┼───────┼─────┤\n",
        "│ Hello # World & 0   │\n",
        "│ Hello # World & 1   │\n",
        "│ Hello # World & 2   │\n",
        "╰───────.───────.─────╯",
    )
)
Source

pub const fn remove_horizontals(self) -> Style<T, B, L, R, H, V, 0, VN>

Removes all horizontal lines set by Style::horizontals

Source

pub const fn remove_verticals(self) -> Style<T, B, L, R, H, V, HN, 0>

Removes all verticals lines set by Style::verticals

Source

pub const fn top(self, c: char) -> Style<On, B, L, R, H, V, HN, VN>
where T: Copy, B: Copy, H: Copy,

Sets a top border.

Any corners and intersections which were set will be overridden.

Source

pub const fn bottom(self, c: char) -> Style<T, On, L, R, H, V, HN, VN>
where T: Copy, B: Copy, H: Copy,

Sets a bottom border.

Any corners and intersections which were set will be overridden.

Source

pub const fn left(self, c: char) -> Style<T, B, On, R, H, V, HN, VN>
where L: Copy, R: Copy, V: Copy,

Sets a left border.

Any corners and intersections which were set will be overridden.

Source

pub const fn right(self, c: char) -> Style<T, B, L, On, H, V, HN, VN>
where L: Copy, R: Copy, V: Copy,

Sets a right border.

Any corners and intersections which were set will be overridden.

Source

pub const fn horizontal(self, c: char) -> Style<T, B, L, R, On, V, HN, VN>
where T: Copy, B: Copy, H: Copy,

Sets a horizontal split line.

Any corners and intersections which were set will be overridden.

Source

pub const fn vertical(self, c: char) -> Style<T, B, L, R, H, On, HN, VN>
where L: Copy, R: Copy, V: Copy,

Sets a vertical split line.

Any corners and intersections which were set will be overridden.

Source

pub const fn line_vertical<Top, Bottom, Intersection>( self, line: VerticalLine<Top, Bottom, Intersection>, ) -> Style<Top, Bottom, L, R, Intersection, On, HN, VN>
where L: Copy, R: Copy, Top: Copy, Bottom: Copy, Intersection: Copy,

Set a vertical line. An equivalent of calling vertical+top_intersection+bottom_intersection+intersion.

Notice, that it will clear everything that is outdated, meaning If your style has a top border line and but the given vertical line has not got it then it will be removed.

Source

pub const fn line_horizontal<Left, Right, Intersection>( self, line: HorizontalLine<Left, Right, Intersection>, ) -> Style<T, B, Left, Right, On, Intersection, HN, VN>
where L: Copy, R: Copy, Left: Copy, Right: Copy, Intersection: Copy,

Set a horizontal line. An equivalent of calling horizontal+left_intersection+right_intersection+intersion.

Notice, that it will clear everything that is outdated, meaning If your style has a left border line and but the given vertical line has not got it then it will be removed.

Source

pub const fn line_top<Left, Right, Intersection>( self, line: HorizontalLine<Left, Right, Intersection>, ) -> Style<On, B, Left, Right, H, Intersection, HN, VN>
where L: Copy, R: Copy, Left: Copy, Right: Copy, Intersection: Copy,

Set a horizontal line. An equivalent of calling top+cornet_top_right+cornet_top_left+top_intersection.

Notice, that it will clear everything that is outdated, meaning If your style has a left border line and but the given vertical line has not got it then it will be removed.

Source

pub const fn line_bottom<Left, Right, Intersection>( self, line: HorizontalLine<Left, Right, Intersection>, ) -> Style<T, On, Left, Right, H, Intersection, HN, VN>
where L: Copy, R: Copy, Left: Copy, Right: Copy, Intersection: Copy,

Set a horizontal line. An equivalent of calling bottom+cornet_bottom_right+cornet_bottom_left+bottom_intersection.

Notice, that it will clear everything that is outdated, meaning If your style has a left border line and but the given vertical line has not got it then it will be removed.

Source

pub const fn line_left<Top, Bottom, Intersection>( self, line: VerticalLine<Top, Bottom, Intersection>, ) -> Style<Top, Bottom, On, R, Intersection, V, HN, VN>
where L: Copy, R: Copy, Top: Copy, Bottom: Copy, Intersection: Copy,

Set a vertical line. An equivalent of calling left+corner_top_left+corner_bottom_left+left_intersection.

Notice, that it will clear everything that is outdated, meaning If your style has a top border line and but the given vertical line has not got it then it will be removed.

Source

pub const fn line_right<Top, Bottom, Intersection>( self, line: VerticalLine<Top, Bottom, Intersection>, ) -> Style<Top, Bottom, L, On, Intersection, V, HN, VN>
where L: Copy, R: Copy, Top: Copy, Bottom: Copy, Intersection: Copy,

Set a vertical line. An equivalent of calling right+corner_top_right+corner_bottom_right+right_intersection.

Notice, that it will clear everything that is outdated, meaning If your style has a top border line and but the given vertical line has not got it then it will be removed.

Source

pub const fn frame<Top, Bottom, Left, Right>( self, border: Border<Top, Bottom, Left, Right>, ) -> Style<Top, Bottom, Left, Right, H, V, HN, VN>
where T: Copy, B: Copy, L: Copy, R: Copy, H: Copy, V: Copy, Left: Copy, Right: Copy, Top: Copy, Bottom: Copy,

Set a frame for a style.

It makes assumptions that a full frame will be set, but it may not be.

§Example
use tabled::{Table, settings::style::{Style, Border}};

let data = [["10:52:19", "Hello"], ["10:52:20", "World"]];
let table = Table::new(data)
    .with(Style::ascii().frame(Border::inherit(Style::modern())))
    .to_string();

assert_eq!(
    table,
    concat!(
        "┌──────────+───────┐\n",
        "│ 0        | 1     │\n",
        "+----------+-------+\n",
        "│ 10:52:19 | Hello │\n",
        "+----------+-------+\n",
        "│ 10:52:20 | World │\n",
        "└──────────+───────┘",
    )
);
Source§

impl<B, R, H, V, const HN: usize, const VN: usize> Style<On, B, On, R, H, V, HN, VN>

Source

pub const fn corner_top_left(self, c: char) -> Self

Sets a top left corner.

Source§

impl<B, L, H, V, const HN: usize, const VN: usize> Style<On, B, L, On, H, V, HN, VN>

Source

pub const fn corner_top_right(self, c: char) -> Self

Sets a top right corner.

Source§

impl<T, L, H, V, const HN: usize, const VN: usize> Style<T, On, L, On, H, V, HN, VN>

Source

pub const fn corner_bottom_right(self, c: char) -> Self

Sets a bottom right corner.

Source§

impl<T, R, H, V, const HN: usize, const VN: usize> Style<T, On, On, R, H, V, HN, VN>

Source

pub const fn corner_bottom_left(self, c: char) -> Self

Sets a bottom left corner.

Source§

impl<T, B, R, V, const HN: usize, const VN: usize> Style<T, B, On, R, On, V, HN, VN>

Source

pub const fn intersection_left(self, c: char) -> Self

Sets a left intersection char.

Source§

impl<T, B, L, V, const HN: usize, const VN: usize> Style<T, B, L, On, On, V, HN, VN>

Source

pub const fn intersection_right(self, c: char) -> Self

Sets a right intersection char.

Source§

impl<B, L, R, H, const HN: usize, const VN: usize> Style<On, B, L, R, H, On, HN, VN>

Source

pub const fn intersection_top(self, c: char) -> Self

Sets a top intersection char.

Source§

impl<T, L, R, H, const HN: usize, const VN: usize> Style<T, On, L, R, H, On, HN, VN>

Source

pub const fn intersection_bottom(self, c: char) -> Self

Sets a bottom intersection char.

Source§

impl<T, B, L, R, const HN: usize, const VN: usize> Style<T, B, L, R, On, On, HN, VN>

Source

pub const fn intersection(self, c: char) -> Self
where T: Copy, B: Copy, R: Copy, L: Copy,

Sets an inner intersection char. A char between horizontal and vertical split lines.

Source§

impl<B, L, R, H, V, const HN: usize, const VN: usize> Style<On, B, L, R, H, V, HN, VN>

Source

pub const fn remove_top(self) -> Style<(), B, L, R, H, V, HN, VN>
where B: Copy, H: Copy,

Removes top border.

Source§

impl<T, L, R, H, V, const HN: usize, const VN: usize> Style<T, On, L, R, H, V, HN, VN>

Source

pub const fn remove_bottom(self) -> Style<T, (), L, R, H, V, HN, VN>
where T: Copy, H: Copy,

Removes bottom border.

Source§

impl<T, B, R, H, V, const HN: usize, const VN: usize> Style<T, B, On, R, H, V, HN, VN>

Source

pub const fn remove_left(self) -> Style<T, B, (), R, H, V, HN, VN>
where R: Copy, V: Copy,

Removes left border.

Source§

impl<T, B, L, H, V, const HN: usize, const VN: usize> Style<T, B, L, On, H, V, HN, VN>

Source

pub const fn remove_right(self) -> Style<T, B, L, (), H, V, HN, VN>
where L: Copy, V: Copy,

Removes right border.

Source§

impl<T, B, L, R, V, const HN: usize, const VN: usize> Style<T, B, L, R, On, V, HN, VN>

Source

pub const fn remove_horizontal(self) -> Style<T, B, L, R, (), V, HN, VN>
where T: Copy, B: Copy, V: Copy,

Removes horizontal split lines.

Not including custom split lines.

Source§

impl<T, B, L, R, H, const HN: usize, const VN: usize> Style<T, B, L, R, H, On, HN, VN>

Source

pub const fn remove_vertical(self) -> Style<T, B, L, R, H, (), HN, VN>
where R: Copy, L: Copy,

Removes vertical split lines.

Source§

impl<H, V, const HN: usize, const VN: usize> Style<On, On, On, On, H, V, HN, VN>

Source

pub const fn remove_frame(self) -> Style<(), (), (), (), H, V, HN, VN>
where V: Copy, H: Copy,

Removes frame.

Trait Implementations§

Source§

impl<T: Clone, B: Clone, L: Clone, R: Clone, H: Clone, V: Clone, const HSIZE: usize, const VSIZE: usize> Clone for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn clone(&self) -> Style<T, B, L, R, H, V, HSIZE, VSIZE>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, B: Debug, L: Debug, R: Debug, H: Debug, V: Debug, const HSIZE: usize, const VSIZE: usize> Debug for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> From<Style<T, B, L, R, H, V, HSIZE, VSIZE>> for Borders<char>

Source§

fn from(value: Style<T, B, L, R, H, V, HSIZE, VSIZE>) -> Self

Converts to this type from the input type.
Source§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> From<Style<T, B, L, R, H, V, HSIZE, VSIZE>> for Theme

Source§

fn from(style: Style<T, B, L, R, H, V, HSIZE, VSIZE>) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash, B: Hash, L: Hash, R: Hash, H: Hash, V: Hash, const HSIZE: usize, const VSIZE: usize> Hash for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: Ord, B: Ord, L: Ord, R: Ord, H: Ord, V: Ord, const HSIZE: usize, const VSIZE: usize> Ord for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn cmp(&self, other: &Style<T, B, L, R, H, V, HSIZE, VSIZE>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: PartialEq, B: PartialEq, L: PartialEq, R: PartialEq, H: PartialEq, V: PartialEq, const HSIZE: usize, const VSIZE: usize> PartialEq for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn eq(&self, other: &Style<T, B, L, R, H, V, HSIZE, VSIZE>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd, B: PartialOrd, L: PartialOrd, R: PartialOrd, H: PartialOrd, V: PartialOrd, const HSIZE: usize, const VSIZE: usize> PartialOrd for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn partial_cmp( &self, other: &Style<T, B, L, R, H, V, HSIZE, VSIZE>, ) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, ColoredConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn change(self, _: &mut Data, cfg: &mut ColoredConfig, _: &mut Dims)

The function modificaties of records and a grid configuration.
Source§

fn hint_change(&self) -> Option<Entity>

A hint whether an TableOption is going to change table layout. Read more
Source§

impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, CompactConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn change(self, _: &mut Data, cfg: &mut CompactConfig, _: &mut Dims)

The function modificaties of records and a grid configuration.
Source§

fn hint_change(&self) -> Option<Entity>

A hint whether an TableOption is going to change table layout. Read more
Source§

impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, CompactMultilineConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

fn change(self, _: &mut Data, cfg: &mut CompactMultilineConfig, _: &mut Dims)

The function modificaties of records and a grid configuration.
Source§

fn hint_change(&self) -> Option<Entity>

A hint whether an TableOption is going to change table layout. Read more
Source§

impl<T: Eq, B: Eq, L: Eq, R: Eq, H: Eq, V: Eq, const HSIZE: usize, const VSIZE: usize> Eq for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Source§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> StructuralPartialEq for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Auto Trait Implementations§

§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> Freeze for Style<T, B, L, R, H, V, HSIZE, VSIZE>

§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> RefUnwindSafe for Style<T, B, L, R, H, V, HSIZE, VSIZE>

§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> Send for Style<T, B, L, R, H, V, HSIZE, VSIZE>
where T: Send, B: Send, L: Send, R: Send, H: Send, V: Send,

§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> Sync for Style<T, B, L, R, H, V, HSIZE, VSIZE>
where T: Sync, B: Sync, L: Sync, R: Sync, H: Sync, V: Sync,

§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> Unpin for Style<T, B, L, R, H, V, HSIZE, VSIZE>
where T: Unpin, B: Unpin, L: Unpin, R: Unpin, H: Unpin, V: Unpin,

§

impl<T, B, L, R, H, V, const HSIZE: usize, const VSIZE: usize> UnwindSafe for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.