Function set_default_backend_for_uninitialized

Source
pub fn set_default_backend_for_uninitialized<F>(
    f: F,
) -> Result<Arc<dyn Backend>>
where F: FnOnce() -> Result<Arc<dyn Backend>>,
Expand description

Sets a default backend if the default backend is uninitialized and returns the default backend.

This method takes a closure that returns the backend and then the backend is set as the default backend if the default backend is uninitialized. The closure is only called if the backend is to be set.