SpinnerStyle

Enum SpinnerStyle 

Source
pub enum SpinnerStyle {
Show 85 variants Dots, Dots2, Dots3, Dots4, Dots5, Dots6, Dots7, Dots8, Dots9, Dots10, Dots11, Dots12, Dots13, Dots14, DotsCircle, Sand, Bounce, Line, Line2, Pipe, RollingLine, SimpleDots, SimpleDotsScrolling, Star, Star2, Arc, Circle, CircleHalves, CircleQuarters, SquareCorners, Triangle, Binary, Squish, Flip, Hamburger, BoxBounce, BoxBounce2, Noise, GrowVertical, GrowHorizontal, Balloon, Balloon2, Toggle, Toggle2, Toggle3, Toggle4, Toggle5, Toggle6, Toggle7, Toggle8, Toggle9, Toggle10, Toggle11, Toggle12, Toggle13, Arrow, Arrow2, Arrow3, BouncingBar, BouncingBall, Pong, Shark, BetaWave, Aesthetic, Material, Clock, Moon, Earth, Hearts, Smiley, Monkey, Runner, Weather, Christmas, Grenade, FingerDance, Speaker, OrangePulse, BluePulse, OrangeBluePulse, TimeTravel, Mindblown, Dqpb, Point, Layer,
}
Expand description

Spinner animation style.

Use SpinnerStyle::from_name() for string-based lookup (Python parity).

§Examples

use fast_rich::progress::SpinnerStyle;

// Using enum directly
let style = SpinnerStyle::Dots;

// Using string lookup
let style = SpinnerStyle::from_name("moon").unwrap();

Variants§

§

Dots

Default dots animation (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏)

§

Dots2

Dots variant 2

§

Dots3

Dots variant 3

§

Dots4

Dots variant 4

§

Dots5

Dots variant 5

§

Dots6

Dots variant 6

§

Dots7

Dots variant 7

§

Dots8

Dots variant 8

§

Dots9

Dots variant 9

§

Dots10

Dots variant 10

§

Dots11

Dots variant 11

§

Dots12

Dots variant 12 (two-character)

§

Dots13

Dots variant 13

§

Dots14

Dots variant 14

§

DotsCircle

Circular dots pattern

§

Sand

Sand falling animation

§

Bounce

Bounce animation

§

Line

Classic line spinner (-|/)

§

Line2

Line variant 2

§

Pipe

Pipe corners

§

RollingLine

Rolling line

§

SimpleDots

Simple dots (…)

§

SimpleDotsScrolling

Simple dots scrolling

§

Star

Star animation

§

Star2

Star variant 2

§

Arc

Arc animation

§

Circle

Circle animation

§

CircleHalves

Circle halves

§

CircleQuarters

Circle quarters

§

SquareCorners

Square corners

§

Triangle

Triangle animation

§

Binary

Binary sequence

§

Squish

Squish animation

§

Flip

Flip animation

§

Hamburger

Hamburger menu animation

§

BoxBounce

Box bounce

§

BoxBounce2

Box bounce variant 2

§

Noise

Noise animation

§

GrowVertical

Vertical growing bar

§

GrowHorizontal

Horizontal growing bar

§

Balloon

Balloon animation

§

Balloon2

Balloon variant 2

§

Toggle

Toggle animation

§

Toggle2

Toggle variant 2

§

Toggle3

Toggle variant 3

§

Toggle4

Toggle variant 4

§

Toggle5

Toggle variant 5

§

Toggle6

Toggle variant 6

§

Toggle7

Toggle variant 7

§

Toggle8

Toggle variant 8

§

Toggle9

Toggle variant 9

§

Toggle10

Toggle variant 10

§

Toggle11

Toggle variant 11

§

Toggle12

Toggle variant 12

§

Toggle13

Toggle variant 13

§

Arrow

Arrow animation

§

Arrow2

Arrow variant 2 (emoji)

§

Arrow3

Arrow variant 3

§

BouncingBar

Bouncing bar animation

§

BouncingBall

Bouncing ball animation

§

Pong

Pong game animation

§

Shark

Shark animation

§

BetaWave

Beta wave animation

§

Aesthetic

Aesthetic loading bar

§

Material

Material design animation

§

Clock

Clock animation 🕐

§

Moon

Moon phases 🌑🌒🌓🌔🌕

§

Earth

Earth rotation 🌍🌎🌏

§

Hearts

Hearts 💛💙💜💚

§

Smiley

Smiley 😄

§

Monkey

See no evil monkey 🙈🙉🙊

§

Runner

Runner 🚶🏃

§

Weather

Weather animation ☀️🌧

§

Christmas

Christmas tree 🌲🎄

§

Grenade

Grenade explosion

§

FingerDance

Finger dance 🤘🤟

§

Speaker

Speaker 🔈🔉🔊

§

OrangePulse

Orange pulse 🔸🔶🟠

§

BluePulse

Blue pulse 🔹🔷🔵

§

OrangeBluePulse

Orange-blue pulse

§

TimeTravel

Time travel (reverse clock)

§

Mindblown

Mind blown 🤯

§

Dqpb

dqpb animation

§

Point

Point animation

§

Layer

Layer animation

Implementations§

Source§

impl SpinnerStyle

Source

pub fn def(&self) -> &'static SpinnerDef

Get the spinner definition (frames and interval).

Source

pub fn frames(&self) -> &'static [&'static str]

Get the frames for this spinner style.

Source

pub fn interval_ms(&self) -> u64

Get the interval between frames in milliseconds.

Source

pub fn from_name(name: &str) -> Option<SpinnerStyle>

Create a SpinnerStyle from a string name (Python parity).

Names are case-insensitive and support both camelCase and snake_case.

§Examples
use fast_rich::progress::SpinnerStyle;

assert!(SpinnerStyle::from_name("dots").is_some());
assert!(SpinnerStyle::from_name("moon").is_some());
assert!(SpinnerStyle::from_name("bouncingBar").is_some());
assert!(SpinnerStyle::from_name("bouncing_bar").is_some());
Source

pub fn all_names() -> &'static [&'static str]

Get all available spinner style names.

Trait Implementations§

Source§

impl Clone for SpinnerStyle

Source§

fn clone(&self) -> SpinnerStyle

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SpinnerStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SpinnerStyle

Source§

fn default() -> SpinnerStyle

Returns the “default value” for a type. Read more
Source§

impl PartialEq for SpinnerStyle

Source§

fn eq(&self, other: &SpinnerStyle) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SpinnerStyle

Source§

impl Eq for SpinnerStyle

Source§

impl StructuralPartialEq for SpinnerStyle

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.