pub struct Border<T = char> {
    pub top: Option<T>,
    pub bottom: Option<T>,
    pub left: Option<T>,
    pub right: Option<T>,
    pub left_top_corner: Option<T>,
    pub left_bottom_corner: Option<T>,
    pub right_top_corner: Option<T>,
    pub right_bottom_corner: Option<T>,
}
Expand description

Border is a representation of a cells’s borders (left, right, top, bottom, and the corners)

Fields

top: Option<T>

A character for a top.

bottom: Option<T>

A character for a bottom.

left: Option<T>

A character for a left.

right: Option<T>

A character for a right.

left_top_corner: Option<T>

A character for a left top corner.

left_bottom_corner: Option<T>

A character for a left bottom corner.

right_top_corner: Option<T>

A character for a right top corner.

right_bottom_corner: Option<T>

A character for a right bottom corner.

Implementations

This function constructs a cell borders with all sides set.

Checks whether any side is set.

This function constructs a cell borders with all sides’s char set to a given character.

It behaives like Border::full with the same character set to each side.

This function constructs a cell borders with all sides’s char set to a given character.

It behaives like Border::full with the same character set to each side.

This function constructs a cell borders with all sides’s char set to a given character.

It behaives like Border::full with the same character set to each side.

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
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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.