pub struct LoadingWidgets { /* private fields */ }
Expand description

A type that stores widget containers and their child widgets and removes all children automatically when dropped.

This mechanism is used by async components and factories to show widgets while the async init function isn’t completed. Once the actual widgets are initialized, the temporary loading widgets can be removed again, which is simply done with this type.

Implementations§

Create new LoadingWidgets with one child.

Create new LoadingWidgets with multiple children.

Examples found in repository?
src/loading_widgets.rs (line 77)
71
72
73
74
75
76
77
78
    pub fn new<C, W>(container: &C, child: W) -> Self
    where
        C: RelmRemoveExt + Clone + 'static,
        W: AsRef<C::Child>,
        C::Child: Clone + AsRef<C::Child>,
    {
        Self::with_children(container, &[child])
    }

Add another child to the temporary loading widgets.

Add many children to the temporary loading widgets.

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Returns the position. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns the position. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more