pub async fn with_loading_screen_async<F>(loading_fn: Option<fn()>, task_fn: F)Expand description
Runs a loading screen animation while executing a task synchronously.
§Parameters
loading_fn: An optional function to display the loading screen. IfNone, the default donut spinner is used.task_fn: The task to be executed synchronously.
§Examples
use loading_screen::{with_loading_screen, donut};
with_loading_screen(Some(donut), || {
// Your task here
});