BorderStyle

Struct BorderStyle 

Source
pub struct BorderStyle {
    pub top_left: char,
    pub top: char,
    pub top_right: char,
    pub right: char,
    pub bottom_right: char,
    pub bottom: char,
    pub bottom_left: char,
    pub left: char,
}
Expand description

Custom border characters.

Fieldsยง

ยงtop_left: char

Top-left corner.

ยงtop: char

Top edge.

ยงtop_right: char

Top-right corner.

ยงright: char

Right edge.

ยงbottom_right: char

Bottom-right corner.

ยงbottom: char

Bottom edge.

ยงbottom_left: char

Bottom-left corner.

ยงleft: char

Left edge.

Implementationsยง

Sourceยง

impl BorderStyle

Source

pub const NONE: Self

No border (empty characters).

Source

pub const NORMAL: Self

Normal box drawing border.

Source

pub const ROUNDED: Self

Rounded corner border.

Source

pub const THICK: Self

Thick/bold border.

Source

pub const DOUBLE: Self

Double line border.

Source

pub const ASCII: Self

ASCII border.

Source

pub const BLOCK: Self

Block border.

Source

pub const DASHED: Self

Dashed border.

Source

pub const fn new( top_left: char, top: char, top_right: char, right: char, bottom_right: char, bottom: char, bottom_left: char, left: char, ) -> Self

Create a custom border style.

Trait Implementationsยง

Sourceยง

impl Clone for BorderStyle

Sourceยง

fn clone(&self) -> BorderStyle

Returns a duplicate of the value. Read more
1.0.0ยง

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

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for BorderStyle

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl Default for BorderStyle

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl PartialEq for BorderStyle

Sourceยง

fn eq(&self, other: &BorderStyle) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0ยง

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 Copy for BorderStyle

Sourceยง

impl Eq for BorderStyle

Sourceยง

impl StructuralPartialEq for BorderStyle

Auto Trait Implementationsยง

Blanket Implementationsยง

ยง

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

ยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
ยง

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

ยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
ยง

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

ยง

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

Mutably borrows from an owned value. Read more
ยง

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

ยง

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
ยง

impl<T> From<T> for T

ยง

fn from(t: T) -> T

Returns the argument unchanged.

ยง

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

ยง

fn into(self) -> U

Calls U::from(self).

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

ยง

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

ยง

type Owned = T

The resulting type after obtaining ownership.
ยง

fn to_owned(&self) -> T

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

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

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

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

ยง

type Error = Infallible

The type returned in the event of a conversion error.
ยง

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

Performs the conversion.
ยง

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.
ยง

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

Performs the conversion.