[−][src]Struct typout::Spinner
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]
I: IntoIterator<Item = T>,
T: Into<String>,
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]
M: Into<String>,
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,