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.

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

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

Construction for QuadrantInsideBorderSet

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
impl BorderSymbol
sourcepub fn join_outward(&mut self, side: Side, border: BorderType)
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.
sourcepub fn join_inward(&mut self, side: Side, border: BorderType)
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.
Trait Implementations§
source§impl Clone for BorderSymbol
impl Clone for BorderSymbol
source§fn clone(&self) -> BorderSymbol
fn clone(&self) -> BorderSymbol
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for BorderSymbol
impl Debug for BorderSymbol
source§impl PartialEq for BorderSymbol
impl PartialEq for BorderSymbol
impl Copy for BorderSymbol
impl Eq for BorderSymbol
impl StructuralPartialEq for BorderSymbol
Auto Trait Implementations§
impl Freeze for BorderSymbol
impl RefUnwindSafe for BorderSymbol
impl Send for BorderSymbol
impl Sync for BorderSymbol
impl Unpin for BorderSymbol
impl UnwindSafe for BorderSymbol
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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