pub struct FluxFrames;Expand description
Built-in frame sequences for FluxSpinner.
Pass any preset (or a custom &'static [char] slice) to
FluxSpinner::frames to change the animation glyphs.
| Preset | Glyphs | Frames | Description |
|---|---|---|---|
BRAILLE | ⣾ ⣷ ⣯ ⣟ ⡿ ⢿ ⣽ ⣻ | 8 | Full cell, one dot missing (default) |
ORBIT | ⠁ ⠈ ⠐ ⠠ ⢀ ⡀ ⠄ ⠂ | 8 | Single dot orbiting (inverse) |
CLASSIC | ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏ | 10 | Classic braille spinner |
LINE | │ ╱ ─ ╲ | 4 | Rotating line |
BLOCK | ▖ ▘ ▝ ▗ | 4 | Quarter-block rotation |
ARC | ◜ ◝ ◞ ◟ | 4 | Quarter-arc rotation |
CLOCK | ◷ ◶ ◵ ◴ | 4 | Quarter-circle pie slice |
MOON | ◓ ◑ ◒ ◐ | 4 | Half-circle moon phase |
TRIANGLES | ▲ ▶ ▼ ◀ | 4 | Filled triangle four dirs |
PULSE | ⣀ ⣤ ⣶ ⣾ ⣿ ⣾ ⣶ ⣤ | 8 | Braille fill pulse |
BOUNCE | ⠉ ⠒ ⣀ ⠒ | 4 | Braille row bouncing top→mid→bottom |
HALF | ▀ ▐ ▄ ▌ | 4 | Half-block rotating clockwise |
SQUARE | ◰ ◳ ◲ ◱ | 4 | White square, one filled quadrant |
DICE | ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ | 6 | Dice faces one to six |
BAR | ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ | 8 | Sub-block growing bar |
CORNERS | ┌ ┐ ┘ └ | 4 | Box-drawing corners rotate |
CIRCLE_FILL | ○ ◔ ◑ ◕ ● | 5 | Circle filling clockwise |
PISTON | ▁ ▃ ▅ ▇ █ ▇ ▅ ▃ | 8 | Bouncing bar (repeats) |
STAR | ✶ ✷ ✸ ✹ | 4 | Braille-asterisk star ramp |
PAIR | ⠉ ⠘ ⠰ ⢠ ⣀ ⡄ ⠆ ⠃ | 8 | Two dots rotating together |
DIAMOND | ◇ ◈ ◆ ◈ | 4 | Diamond pulse (repeats) |
§Examples
use tui_spinner::{FluxSpinner, FluxFrames};
let braille = FluxSpinner::new(0); // BRAILLE is the default
let orbit = FluxSpinner::new(0).frames(FluxFrames::ORBIT);
let line = FluxSpinner::new(0).frames(FluxFrames::LINE);
let custom = FluxSpinner::new(0).frames(&['a', 'b', 'c', 'd']);Implementations§
Source§impl FluxFrames
impl FluxFrames
Sourcepub const BRAILLE: &'static [char]
pub const BRAILLE: &'static [char]
Full braille cell with one dot missing — the gap rotates clockwise.
⣾ ⣷ ⣯ ⣟ ⡿ ⢿ ⣽ ⣻ — default.
Sourcepub const ORBIT: &'static [char]
pub const ORBIT: &'static [char]
Single braille dot orbiting clockwise — visual complement of BRAILLE.
⠁ ⠈ ⠐ ⠠ ⢀ ⡀ ⠄ ⠂
Sourcepub const CLOCK: &'static [char]
pub const CLOCK: &'static [char]
Quarter-circle pie slice rotating through four positions.
◷ ◶ ◵ ◴
Sourcepub const MOON: &'static [char]
pub const MOON: &'static [char]
Half-circle (moon phase) rotating through four positions.
◓ ◑ ◒ ◐
Sourcepub const PULSE: &'static [char]
pub const PULSE: &'static [char]
Braille fill pulsing from a thin baseline up to full density and back.
⣀ ⣤ ⣶ ⣾ ⣿ ⣾ ⣶ ⣤
Sourcepub const BOUNCE: &'static [char]
pub const BOUNCE: &'static [char]
Single braille row bouncing top → middle → bottom → middle.
⠉ ⠒ ⣀ ⠒
⠒ is intentionally repeated — that is the bounce return step.
Sourcepub const SQUARE: &'static [char]
pub const SQUARE: &'static [char]
White square with one filled quadrant rotating clockwise.
◰ ◳ ◲ ◱
Sourcepub const BAR: &'static [char]
pub const BAR: &'static [char]
Eight sub-block glyphs growing from one-eighth to full height.
▁ ▂ ▃ ▄ ▅ ▆ ▇ █
Clockwise runs the bar upward; counter-clockwise shrinks it back down.
Sourcepub const CIRCLE_FILL: &'static [char]
pub const CIRCLE_FILL: &'static [char]
Circle gradually filling clockwise through five stages.
○ ◔ ◑ ◕ ●
Sourcepub const PISTON: &'static [char]
pub const PISTON: &'static [char]
Bar that bounces from one-eighth height to full and back.
▁ ▃ ▅ ▇ █ ▇ ▅ ▃
▃, ▅, ▇ are intentionally repeated — that is the bounce return.
Sourcepub const STAR: &'static [char]
pub const STAR: &'static [char]
Four braille-asterisk star glyphs increasing in density.
✶ ✷ ✸ ✹
Auto Trait Implementations§
impl Freeze for FluxFrames
impl RefUnwindSafe for FluxFrames
impl Send for FluxFrames
impl Sync for FluxFrames
impl Unpin for FluxFrames
impl UnsafeUnpin for FluxFrames
impl UnwindSafe for FluxFrames
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> 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