Skip to main content

FluxFrames

Struct FluxFrames 

Source
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.

PresetGlyphsFramesDescription
BRAILLE⣾ ⣷ ⣯ ⣟ ⡿ ⢿ ⣽ ⣻8Full cell, one dot missing (default)
ORBIT⠁ ⠈ ⠐ ⠠ ⢀ ⡀ ⠄ ⠂8Single dot orbiting (inverse)
CLASSIC⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏10Classic braille spinner
LINE│ ╱ ─ ╲4Rotating line
BLOCK▖ ▘ ▝ ▗4Quarter-block rotation
ARC◜ ◝ ◞ ◟4Quarter-arc rotation
CLOCK◷ ◶ ◵ ◴4Quarter-circle pie slice
MOON◓ ◑ ◒ ◐4Half-circle moon phase
TRIANGLES▲ ▶ ▼ ◀4Filled triangle four dirs
PULSE⣀ ⣤ ⣶ ⣾ ⣿ ⣾ ⣶ ⣤8Braille fill pulse
BOUNCE⠉ ⠒ ⣀ ⠒4Braille row bouncing top→mid→bottom
HALF▀ ▐ ▄ ▌4Half-block rotating clockwise
SQUARE◰ ◳ ◲ ◱4White square, one filled quadrant
DICE⚀ ⚁ ⚂ ⚃ ⚄ ⚅6Dice faces one to six
BAR▁ ▂ ▃ ▄ ▅ ▆ ▇ █8Sub-block growing bar
CORNERS┌ ┐ ┘ └4Box-drawing corners rotate
CIRCLE_FILL○ ◔ ◑ ◕ ●5Circle filling clockwise
PISTON▁ ▃ ▅ ▇ █ ▇ ▅ ▃8Bouncing bar (repeats)
STAR✶ ✷ ✸ ✹4Braille-asterisk star ramp
PAIR⠉ ⠘ ⠰ ⢠ ⣀ ⡄ ⠆ ⠃8Two dots rotating together
DIAMOND◇ ◈ ◆ ◈4Diamond 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

Source

pub const BRAILLE: &'static [char]

Full braille cell with one dot missing — the gap rotates clockwise.

⣾ ⣷ ⣯ ⣟ ⡿ ⢿ ⣽ ⣻default.

Source

pub const ORBIT: &'static [char]

Single braille dot orbiting clockwise — visual complement of BRAILLE.

⠁ ⠈ ⠐ ⠠ ⢀ ⡀ ⠄ ⠂

Source

pub const CLASSIC: &'static [char]

Classic 10-frame braille spinner.

⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏

Source

pub const LINE: &'static [char]

Rotating line — 4 frames.

│ ╱ ─ ╲

Source

pub const BLOCK: &'static [char]

Quarter-block rotation — 4 frames.

▖ ▘ ▝ ▗

Source

pub const ARC: &'static [char]

Quarter-arc rotation — 4 frames.

◜ ◝ ◞ ◟

Source

pub const CLOCK: &'static [char]

Quarter-circle pie slice rotating through four positions.

◷ ◶ ◵ ◴

Source

pub const MOON: &'static [char]

Half-circle (moon phase) rotating through four positions.

◓ ◑ ◒ ◐

Source

pub const TRIANGLES: &'static [char]

Filled triangle pointing in four directions.

▲ ▶ ▼ ◀

Source

pub const PULSE: &'static [char]

Braille fill pulsing from a thin baseline up to full density and back.

⣀ ⣤ ⣶ ⣾ ⣿ ⣾ ⣶ ⣤

Source

pub const BOUNCE: &'static [char]

Single braille row bouncing top → middle → bottom → middle.

⠉ ⠒ ⣀ ⠒

is intentionally repeated — that is the bounce return step.

Source

pub const HALF: &'static [char]

Half-block rotating clockwise through four positions.

▀ ▐ ▄ ▌

Source

pub const SQUARE: &'static [char]

White square with one filled quadrant rotating clockwise.

◰ ◳ ◲ ◱

Source

pub const DICE: &'static [char]

Dice faces cycling from one to six.

⚀ ⚁ ⚂ ⚃ ⚄ ⚅

Source

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.

Source

pub const CORNERS: &'static [char]

Box-drawing corners rotating clockwise.

┌ ┐ ┘ └

Source

pub const CIRCLE_FILL: &'static [char]

Circle gradually filling clockwise through five stages.

○ ◔ ◑ ◕ ●

Source

pub const PISTON: &'static [char]

Bar that bounces from one-eighth height to full and back.

▁ ▃ ▅ ▇ █ ▇ ▅ ▃

, , are intentionally repeated — that is the bounce return.

Source

pub const STAR: &'static [char]

Four braille-asterisk star glyphs increasing in density.

✶ ✷ ✸ ✹

Source

pub const PAIR: &'static [char]

Two adjacent braille dots rotating clockwise around the cell.

⠉ ⠘ ⠰ ⢠ ⣀ ⡄ ⠆ ⠃

Source

pub const DIAMOND: &'static [char]

Diamond pulsing between hollow, dotted, and solid.

◇ ◈ ◆ ◈

is intentionally repeated — that is the pulse return step.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.