pub enum BorderType {
Square,
Ascii,
Rounded,
Double,
Heavy,
Dashed,
HeavyDashed,
Custom(BorderSet),
}Expand description
Border style presets.
Eight variants: seven named glyph sets — Square (default), Ascii,
Rounded, Double, Heavy, Dashed, HeavyDashed — plus Custom, which
accepts any BorderSet, so arbitrary corner/edge/junction glyphs are
supported without a new variant. This doc comment is the source of truth for
the “border styles” count cited in the README.
Variants§
Square
No border (but space reserved if Borders::ALL is set).
Ascii
ASCII fallback border.
Rounded
Single line border with rounded corners.
Double
Double line border.
Heavy
Heavy line border.
Dashed
Single line border with dashed edges (┄, ┆).
HeavyDashed
Heavy line border with dashed edges (┅, ┇).
Custom(BorderSet)
Custom border character set.
Implementations§
Source§impl BorderType
impl BorderType
Sourcepub const NAMED_STYLE_COUNT: usize = 7
pub const NAMED_STYLE_COUNT: usize = 7
The number of built-in named border styles (every variant except the
open-ended Custom). Cited by the README and the
border_type_variant_count_matches_readme test.
Sourcepub const BORDER_STYLE_COUNT: usize = 8
pub const BORDER_STYLE_COUNT: usize = 8
The total number of border style variants including Custom.
Sourcepub fn to_border_set(&self) -> BorderSet
pub fn to_border_set(&self) -> BorderSet
Convert this border type to its corresponding border character set.