[][src]Struct typout::Spinner

pub struct Spinner { /* fields omitted */ }

Spinner provides animation frames which are used by the spinner animation thread to animate a pinned message.

Implementations

impl Spinner[src]

pub fn set_frames<I, T>(&mut self, frames: I) where
    I: IntoIterator<Item = T>,
    T: Into<String>, 
[src]

Sets animation frame sequence.

pub fn set_speed(&mut self, speed: u32)[src]

Sets animation speed. This attribute is used by the sleep() method.

pub fn next_frame(&mut self) -> String[src]

Returns the next animation frame.

pub fn next_message<M>(&mut self, data: M) -> String where
    M: Into<String>, 
[src]

Returns a formated message of the next animation frame.

pub fn sleep(&mut self)[src]

Blocks the thread for the number of ms based on the speed variable.

Trait Implementations

impl Clone for Spinner[src]

impl Debug for Spinner[src]

impl Default for Spinner[src]

Auto Trait Implementations

impl RefUnwindSafe for Spinner

impl Send for Spinner

impl Sync for Spinner

impl Unpin for Spinner

impl UnwindSafe for Spinner

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.