Struct relm4::loading_widgets::LoadingWidgets
source · 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§
source§impl LoadingWidgets
impl LoadingWidgets
sourcepub fn new<C, W>(container: &C, child: W) -> Selfwhere
C: RelmRemoveExt + Clone + 'static,
W: AsRef<C::Child>,
C::Child: Clone + AsRef<C::Child>,
pub fn new<C, W>(container: &C, child: W) -> Selfwhere
C: RelmRemoveExt + Clone + 'static,
W: AsRef<C::Child>,
C::Child: Clone + AsRef<C::Child>,
Create new LoadingWidgets
with one child.
sourcepub fn with_children<C, W>(container: &C, children: &[W]) -> Selfwhere
C: RelmRemoveExt + Clone + 'static,
W: AsRef<C::Child>,
C::Child: Clone + AsRef<C::Child>,
pub fn with_children<C, W>(container: &C, children: &[W]) -> Selfwhere
C: RelmRemoveExt + Clone + 'static,
W: AsRef<C::Child>,
C::Child: Clone + AsRef<C::Child>,
Create new LoadingWidgets
with multiple children.