pub trait ManagerExt<R: Runtime>: Manager<R> {
// Provided methods
fn zustand(&self) -> Zustand<'_, R> { ... }
fn with_store<F, T>(&self, id: impl AsRef<str>, f: F) -> Result<T>
where F: FnOnce(&mut Store<R, ZustandMarker>) -> T { ... }
}
Expand description
Extension for the Manager
trait providing access to the Zustand plugin.
Provided Methods§
Sourcefn zustand(&self) -> Zustand<'_, R>
fn zustand(&self) -> Zustand<'_, R>
Returns a handle to the Zustand plugin.
§Panics
Panics if the internal store collection is not yet being managed by Tauri.
This likely indicates that it was called before the plugin was properly initialized.
Sourcefn with_store<F, T>(&self, id: impl AsRef<str>, f: F) -> Result<T>
fn with_store<F, T>(&self, id: impl AsRef<str>, f: F) -> Result<T>
Calls a closure with a mutable reference to the store with the given id.
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.