tauri_store

Trait StoreStateExt

Source
pub trait StoreStateExt {
    // Required methods
    fn parse<T: DeserializeOwned>(&self) -> Result<T>;
    fn try_get<T: DeserializeOwned>(&self, key: impl AsRef<str>) -> Result<T>;
}

Required Methods§

Source

fn parse<T: DeserializeOwned>(&self) -> Result<T>

Tries to parse the store state as an instance of type T.

Source

fn try_get<T: DeserializeOwned>(&self, key: impl AsRef<str>) -> Result<T>

Gets a value from the store and tries to parse it as an instance of type T.

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.

Implementors§