pub enum BorderStyle {
Standard,
Rounded,
Dashed,
RoundedDashed,
CornerGapped,
RoundedCornerGapped,
DoubleLineStandard,
DoubleLineRounded,
Thick,
ThickRounded,
ThickDashed,
ThickCornerGapped,
}Expand description
Predefined border styles for the pie chart block wrapper.
These styles provide convenient ways to customize the appearance of the block that wraps the pie chart.
§Unicode Limitations
Note that DoubleLineRounded and ThickRounded use mixed styles because
Unicode doesn’t have true rounded double-line or thick-line box-drawing
characters. These styles use single-line rounded corners with double/thick
edges for a softer appearance.
§Examples
use tui_piechart::{PieChart, PieSlice, border_style::BorderStyle};
use ratatui::style::Color;
let slices = vec![PieSlice::new("Rust", 45.0, Color::Red)];
// Dashed borders for a subtle look
let chart = PieChart::new(slices.clone())
.block(BorderStyle::Dashed.block().title("Dashed"));
// Thick rounded for bold emphasis
let chart = PieChart::new(slices)
.block(BorderStyle::ThickRounded.block().title("Bold"));Variants§
Standard
Standard single-line borders (default)
Rounded
Rounded corners with single-line borders
Dashed
Dashed lines throughout (┄┄┄)
RoundedDashed
Rounded corners with dashed borders
CornerGapped
Standard borders with gaps only at corners
RoundedCornerGapped
Rounded borders with gaps only at corners
DoubleLineStandard
Double-line borders for standard style
DoubleLineRounded
Double-line borders with rounded corners (mixed: rounded corners + double edges)
Thick
Thick borders (uses heavy line drawing characters)
ThickRounded
Thick borders with rounded corners (mixed: rounded corners + thick edges)
ThickDashed
Thick borders with dashed lines
ThickCornerGapped
Thick borders with gaps only at corners
Implementations§
Trait Implementations§
Source§impl Clone for BorderStyle
impl Clone for BorderStyle
Source§fn clone(&self) -> BorderStyle
fn clone(&self) -> BorderStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BorderStyle
impl Debug for BorderStyle
Source§impl Default for BorderStyle
impl Default for BorderStyle
Source§fn default() -> BorderStyle
fn default() -> BorderStyle
Source§impl PartialEq for BorderStyle
impl PartialEq for BorderStyle
impl Copy for BorderStyle
impl Eq for BorderStyle
impl StructuralPartialEq for BorderStyle
Auto Trait Implementations§
impl Freeze for BorderStyle
impl RefUnwindSafe for BorderStyle
impl Send for BorderStyle
impl Sync for BorderStyle
impl Unpin for BorderStyle
impl UnwindSafe for BorderStyle
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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