Trait SuspenseExtension

Source
pub trait SuspenseExtension<T>: Sealed {
    // Required method
    fn with_loading_placeholder(
        self,
        display_placeholder: impl FnOnce() -> Element,
    ) -> Result<T, RenderError>;
}
Expand description

Provides context methods to Result<T, RenderError> to show loading indicators for suspended results

This trait is sealed and cannot be implemented outside of dioxus-core

Required Methods§

Source

fn with_loading_placeholder( self, display_placeholder: impl FnOnce() -> Element, ) -> Result<T, RenderError>

Add a loading indicator if the result is suspended

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> SuspenseExtension<T> for Result<T, RenderError>

Source§

fn with_loading_placeholder( self, display_placeholder: impl FnOnce() -> Element, ) -> Result<T, RenderError>

Implementors§