papergrid

Struct Borders

Source
pub struct Borders<T = char> {
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 horizontal_left: Option<T>, pub horizontal_right: Option<T>, pub vertical: Option<T>, pub vertical_left: Option<T>, pub vertical_right: Option<T>, pub 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.

§horizontal_left: Option<T>

A horizontal split on the left frame line.

§horizontal_right: Option<T>

A horizontal split on the right frame line.

§vertical: Option<T>

A vertical split.

§vertical_left: Option<T>

A vertical split on the left frame line.

§vertical_right: Option<T>

A vertical split on the right frame line.

§intersection: Option<T>

A top left charcter on the frame.

Implementations§

Source§

impl<T> Borders<T>

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.

Trait Implementations§

Source§

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

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> Debug for Borders<T>

Source§

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

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

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

Source§

fn default() -> Borders<T>

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

Auto Trait Implementations§

§

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

§

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.