Struct tabled::grid::config::Borders

source ·
pub struct Borders<T> {
Show 15 fields pub top: Option<T>, pub top_left: Option<T>, pub top_right: Option<T>, pub top_intersection: Option<T>, pub bottom: Option<T>, pub bottom_left: Option<T>, pub bottom_right: Option<T>, pub bottom_intersection: Option<T>, pub horizontal: Option<T>, pub vertical: Option<T>, pub intersection: Option<T>, pub left: Option<T>, pub left_intersection: Option<T>, pub right: Option<T>, pub right_intersection: Option<T>,
}
Expand description

Borders represents a Table frame with horizontal and vertical split lines.

Fields§

§top: Option<T>

A top horizontal on the frame.

§top_left: Option<T>

A top left on the frame.

§top_right: Option<T>

A top right on the frame.

§top_intersection: Option<T>

A top horizontal intersection on the frame.

§bottom: Option<T>

A bottom horizontal on the frame.

§bottom_left: Option<T>

A bottom left on the frame.

§bottom_right: Option<T>

A bottom right on the frame.

§bottom_intersection: Option<T>

A bottom horizontal intersection on the frame.

§horizontal: Option<T>

A horizontal split.

§vertical: Option<T>

A vertical split.

§intersection: Option<T>

A top left character on the frame.

§left: Option<T>

A vertical split on the left frame line.

§left_intersection: Option<T>

A horizontal split on the left frame line.

§right: Option<T>

A vertical split on the right frame line.

§right_intersection: Option<T>

A horizontal split on the right frame line.

Implementations§

source§

impl<T> Borders<T>

source

pub const fn empty() -> Borders<T>

Returns empty borders.

source

pub const fn filled(val: T) -> Borders<T>
where T: Copy,

Returns Borders filled in with a supplied value.

source

pub const fn is_empty(&self) -> bool

A verification whether any border was set.

source

pub const fn has_left(&self) -> bool

Verifies if borders has left line set on the frame.

source

pub const fn has_right(&self) -> bool

Verifies if borders has right line set on the frame.

source

pub const fn has_top(&self) -> bool

Verifies if borders has top line set on the frame.

source

pub const fn has_bottom(&self) -> bool

Verifies if borders has bottom line set on the frame.

source

pub const fn has_horizontal(&self) -> bool

Verifies if borders has horizontal lines set.

source

pub const fn has_vertical(&self) -> bool

Verifies if borders has vertical lines set.

source

pub fn convert_into<T1>(self) -> Borders<T1>
where T1: From<T>,

Converts borders type into another one.

Trait Implementations§

source§

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

source§

fn clone(&self) -> Borders<T>

Returns a copy 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 for Borders<T>
where T: Debug,

source§

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

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

impl<T> Default for Borders<T>
where T: Default,

source§

fn default() -> Borders<T>

Returns the “default value” for a type. Read more
source§

impl From<Borders<char>> for Theme

Available on crate feature std only.
source§

fn from(borders: Borders<char>) -> 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 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> Hash for Borders<T>
where T: Hash,

source§

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

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 for Borders<T>
where T: Ord,

source§

fn cmp(&self, other: &Borders<T>) -> 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 + PartialOrd,

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

impl<T> PartialEq for Borders<T>
where T: PartialEq,

source§

fn eq(&self, other: &Borders<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd for Borders<T>
where T: PartialOrd,

source§

fn partial_cmp(&self, other: &Borders<T>) -> 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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Borders<char>

Available on crate feature std only.
source§

fn change(self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D)

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<R, D> TableOption<R, CompactConfig, D> for Borders<char>

source§

fn change(self, _: &mut R, cfg: &mut CompactConfig, _: &mut D)

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<R, D> TableOption<R, CompactMultilineConfig, D> for Borders<char>

source§

fn change(self, _: &mut R, cfg: &mut CompactMultilineConfig, _: &mut D)

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> Copy for Borders<T>
where T: Copy,

source§

impl<T> Eq for Borders<T>
where T: Eq,

source§

impl<T> StructuralEq for Borders<T>

source§

impl<T> StructuralPartialEq for Borders<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Borders<T>
where T: RefUnwindSafe,

§

impl<T> Send for Borders<T>
where T: Send,

§

impl<T> Sync for Borders<T>
where T: Sync,

§

impl<T> Unpin for Borders<T>
where T: Unpin,

§

impl<T> UnwindSafe for Borders<T>
where T: UnwindSafe,

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

§

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

§

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

§

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.