Skip to main content

Spinner

Struct Spinner 

Source
pub struct Spinner { /* private fields */ }

Implementations§

Source§

impl Spinner

Source

pub fn new() -> Self

Source

pub fn with_prefix(prefix: String) -> Self

Source

pub fn with_style(style: ProgressStyle) -> Self

Source

pub fn with_elapsed(elapsed: Duration) -> Self

Source

pub fn with_finish(finish: ProgressFinish) -> Self

Source

pub fn with_options(options: SpinnerOptions) -> Self

Source

pub fn with( elapsed: Option<Duration>, finish: Option<ProgressFinish>, options: SpinnerOptions, ) -> Self

Source

pub fn spin(&self) -> Result<()>

Source

pub fn tick(&self)

Source

pub fn run<T: Send + 'static, F: FnOnce() -> T + Send + 'static>( &self, process: F, ) -> Result<T>

Source

pub fn suspend<F: FnOnce() -> R, R>(&self, f: F) -> R

Source

pub fn set_steady_tick(&self, interval: u64)

Source

pub fn message(&self) -> String

Source

pub fn set_message(&self, message: impl Into<Cow<'static, str>>)

Source

pub fn clear_message(&self)

Source

pub fn prefix(&self) -> String

Source

pub fn set_prefix(&self, prefix: impl Into<Cow<'static, str>>)

Source

pub fn clear_prefix(&self)

Source

pub fn duration(&self) -> Duration

Source

pub fn elapsed(&self) -> Duration

Source

pub fn eta(&self) -> Duration

Source

pub fn is_finished(&self) -> bool

Source

pub fn finish(&self) -> Result<()>

Source

pub fn finish_with_message( &self, message: impl Into<Cow<'static, str>>, ) -> Result<()>

Source

pub fn finish_using_style(&self) -> Result<()>

Source

pub fn finish_and_clear(&self) -> Result<()>

Source

pub fn abandon(&self) -> Result<()>

Source

pub fn abandon_with_message(&self, message: String) -> Result<()>

Source

pub fn reset_elapsed(&self)

Source

pub fn reset_eta(&self)

Source

pub fn reset(&self) -> Result<()>

Trait Implementations§

Source§

impl Clone for Spinner

Source§

fn clone(&self) -> Spinner

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.