pub enum BarStyle {
Show 16 variants
Braille,
Block,
Shade,
Dot,
Diamond,
Square,
Star,
Heart,
Arrow,
Circle,
Spark,
Cross,
Progress,
Thick,
Wave,
Pip,
}Expand description
Selects the glyph set used for the arc and background track.
Braille (the default) uses braille bytes and
supports the full fade_width density ramp. All other variants use a
single Unicode character for the arc and one for the track, with no
intermediate fade.
| Variant | Arc | Track | Notes |
|---|---|---|---|
Braille | ⣿ | ⣀ | Braille density fade (default) |
Block | █ | ░ | Solid / light block |
Shade | ▓ | ░ | Dark shade / light block |
Dot | ● | · | Filled / middle dot |
Diamond | ◆ | ◇ | Filled / open diamond |
Square | ■ | □ | Filled / open square |
Star | ★ | ☆ | Filled / outline star |
Heart | ♥ | ♡ | Filled / outline heart |
Arrow | ▶ | ▷ | Solid / outline right triangle |
Circle | ◉ | ○ | Fisheye / open circle |
Spark | ✦ | ✧ | Black / white four-pointed star |
Cross | ✚ | ✛ | Heavy / open-centre cross |
Progress | ▰ | ▱ | Bold progress-bar segments |
Thick | ━ | ─ | Heavy / thin horizontal line |
Wave | ≈ | ˜ | Wave / tilde |
Pip | ▪ | · | Small square / middle dot |
§Examples
use tui_spinner::{BarSpinner, BarStyle};
let braille = BarSpinner::new(0); // default
let block = BarSpinner::new(0).bar_style(BarStyle::Block);
let dot = BarSpinner::new(0).bar_style(BarStyle::Dot);Variants§
Braille
Dense braille glyphs with a smooth density-gradient fade (default).
Respects arc_char, track, and fade_width settings.
Block
Solid block — █ arc, ░ track.
Shade
Shade blocks — ▓ arc, ░ track.
Dot
Filled / middle dot — ● arc, · track.
Diamond
Filled / open diamond — ◆ arc, ◇ track.
Square
Filled / open square — ■ arc, □ track.
Star
Filled / outline star — ★ arc, ☆ track.
Heart
Filled / outline heart — ♥ arc, ♡ track.
Arrow
Solid / outline right-pointing triangle — ▶ arc, ▷ track.
Circle
Fisheye / open circle — ◉ arc, ○ track.
Spark
Black / white four-pointed star — ✦ arc, ✧ track.
Cross
Heavy Greek cross / open-centre cross — ✚ arc, ✛ track.
Progress
Bold progress-bar segments — ▰ arc, ▱ track.
Thick
Heavy / thin horizontal line — ━ arc, ─ track.
Wave
Wave / tilde — ≈ arc, ˜ track.
Pip
Small square / middle dot — ▪ arc, · track.
Trait Implementations§
impl Copy for BarStyle
impl Eq for BarStyle
impl StructuralPartialEq for BarStyle
Auto Trait Implementations§
impl Freeze for BarStyle
impl RefUnwindSafe for BarStyle
impl Send for BarStyle
impl Sync for BarStyle
impl Unpin for BarStyle
impl UnsafeUnpin for BarStyle
impl UnwindSafe for BarStyle
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