pub struct Spinner { /* private fields */ }Expand description
A named terminal spinner. Mirrors rich.spinner.Spinner.
Implementations§
Source§impl Spinner
impl Spinner
Sourcepub fn text(self, text: impl Into<String>) -> Self
pub fn text(self, text: impl Into<String>) -> Self
Trailing text after the frame, parsed as console markup (upstream
passes a str through Text.from_markup).
Sourcepub fn style(self, style: impl Into<StyleType>) -> Self
pub fn style(self, style: impl Into<StyleType>) -> Self
Style applied to the spinner frame (not the trailing text): a style
or a theme name such as "status.spinner".
Trait Implementations§
Source§impl Renderable for Spinner
impl Renderable for Spinner
Source§fn rich_render(
&self,
console: &Console,
options: &ConsoleOptions,
) -> Vec<Segment>
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Port of Spinner.__rich_console__: the frame for the console’s clock
(Console::get_time), so each redraw inside a Live display moves
the animation on.
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
Port of Spinner.__rich_measure__, which measures self.render(0).
Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.Auto Trait Implementations§
impl !Freeze for Spinner
impl !RefUnwindSafe for Spinner
impl !Sync for Spinner
impl Send for Spinner
impl Unpin for Spinner
impl UnsafeUnpin for Spinner
impl UnwindSafe for Spinner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more