pub struct Spinner<Message: Debug + Send + Sync + Clone> { /* private fields */ }
Expand description

A simple component that renders a spinner with the given text.

Implementations§

source§

impl<Message: Debug + Send + Sync + Clone> Spinner<Message>

source

pub fn new<S: Into<String>>( text: S, spin_steps: Vec<char>, interval: Duration ) -> Self

Trait Implementations§

source§

impl<Message: Debug + Send + Sync + Clone + 'static> Component for Spinner<Message>

§

type Message = Message

The type of messages that can be sent to this component.
source§

fn children(&self) -> Option<Vec<&Box<dyn Component<Message = Self::Message>>>>

The children this component has. May be empty when present. Read more
source§

fn children_mut( &mut self ) -> Option<Vec<&mut Box<dyn Component<Message = Self::Message>>>>

The children this component has, but mutable. May be empty when present.
source§

fn update<'life0, 'life1, 'async_trait>( &'life0 mut self, ctx: &'life1 mut MakeupUpdate<'_, Self> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Process any messages that have been sent to this component. Messages are expected to be process asynchronously, ie. any long-running operations should be tokio::spawned as a task.
source§

fn render<'life0, 'life1, 'async_trait>( &'life0 self, _ctx: &'life1 RenderContext ) -> Pin<Box<dyn Future<Output = Result<DrawCommandBatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Render this component.
source§

fn key(&self) -> Key

A unique key for this component. See generate_key.
source§

fn dimensions(&self) -> Result<Option<Dimensions>>

The dimensions of this component. Coordinates are calculated automatically by the parent component that manages layout, or are implied by render order.
source§

fn batch(&self, commands: Vec<DrawCommand>) -> Result<DrawCommandBatch>

Batch the given render commands with this component’s key.
source§

fn style(&self) -> Option<Style>

source§

impl<Message: Debug + Debug + Send + Sync + Clone> Debug for Spinner<Message>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Message> RefUnwindSafe for Spinner<Message>
where Message: RefUnwindSafe,

§

impl<Message> Send for Spinner<Message>

§

impl<Message> Sync for Spinner<Message>

§

impl<Message> Unpin for Spinner<Message>
where Message: Unpin,

§

impl<Message> UnwindSafe for Spinner<Message>
where Message: UnwindSafe,

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> AsAny for T
where T: Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

source§

fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V