Enum ratatui_block::BorderSymbol

source ·
pub enum BorderSymbol {
Show 13 variants StartCornerRegular, StartCornerAngled(Side, BorderType), StartCornerProlonged(Side, BorderType), StartCornerCrossed(Side, BorderType, Side, BorderType), SideRegular, SideOverlap(Side, BorderType), SideOutward(Side, BorderType), SideInward(Side, BorderType), SideCrossed(Side, BorderType, Side, BorderType), EndCornerRegular, EndCornerAngled(Side, BorderType), EndCornerProlonged(Side, BorderType), EndCornerCrossed(Side, BorderType, Side, BorderType),
}
Expand description

Symbol descriptor.

Describes the symbols geometrically as they occur along one side of the area.

Schematics for the connection.

schematics

Which side of the other area is connected may also influence the actual glyph.

connection sides

Construction for PlainBorderSet. Note that some of the glyphs do not exist in unicode and are replaced with single line versions.

plain_border_set

Construction for QuadrantInsideBorderSet

quadrant_inside_border_set quadrant_inside_border_set quadrant_inside_border_set quadrant_inside_border_set

Variants§

§

StartCornerRegular

Regular start corner.

§

StartCornerAngled(Side, BorderType)

Start corner with an extension perpendicular to the line.

§

StartCornerProlonged(Side, BorderType)

Start corner that goes on in the direction of the line.

§

StartCornerCrossed(Side, BorderType, Side, BorderType)

Crossing at the start. The first value is the border perpendicular to the line, the second goes in the direction of the line.

§

SideRegular

Regular side.

§

SideOverlap(Side, BorderType)

Regular side, but overlapping with some other border.

§

SideOutward(Side, BorderType)

Side with a connection point outwards.

§

SideInward(Side, BorderType)

Side with a connection point inwards.

§

SideCrossed(Side, BorderType, Side, BorderType)

Side with a crossing. The first value is the border outwards, the second goes inwards.

§

EndCornerRegular

Regular end corner.

§

EndCornerAngled(Side, BorderType)

End corner with an extension perpendicular to the line.

§

EndCornerProlonged(Side, BorderType)

End corner that goes on in the direction of the line.

§

EndCornerCrossed(Side, BorderType, Side, BorderType)

Crossing at the end. The first value is the border perpendicular to the line, the second goes in the direction of the line.

Implementations§

source§

impl BorderSymbol

source

pub fn join_outward(&mut self, side: Side, border: BorderType)

Adds an outward connection to the given border.

Replaces any existing outward connection. Changes the BorderSymbol to add an outward connection if possible.

source

pub fn join_inward(&mut self, side: Side, border: BorderType)

Adds an inward connection to the given border.

Replaces any existing inward connection. Changes the BorderSymbol to add an inward connection if possible.

source

pub fn overlap(&mut self, side: Side, border: BorderType)

Changes the BorderSymbol to add an overlapping area if possible.

Does nothing if this is not possible for the current symbol.

source

pub fn prolong(&mut self, side: Side, border: BorderType)

Changes the BorderSymbol to prolong the border along the side.

Does nothing if this is not possible for the current symbol.

Trait Implementations§

source§

impl Clone for BorderSymbol

source§

fn clone(&self) -> BorderSymbol

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 Debug for BorderSymbol

source§

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

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

impl PartialEq for BorderSymbol

source§

fn eq(&self, other: &BorderSymbol) -> 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 Copy for BorderSymbol

source§

impl Eq for BorderSymbol

source§

impl StructuralPartialEq for BorderSymbol

Auto Trait Implementations§

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 T)

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

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

source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.