Crate tauri_store

Crate tauri_store 

Source
Expand description

§tauri-store

Persistent stores for Tauri.

§Features

  • Save your stores to disk.
  • Synchronize across multiple windows.
  • Debounce or throttle store updates.
  • Access the stores from both JavaScript and Rust.

§Documentation

Check the documentation for more information on how to install and use the plugins.

§Plugins

Currently, the following plugins are available:

NameVersionWorks with
tauri-storenpmEverything
@tauri-store/pinianpmVue, Nuxt
@tauri-store/sveltenpmSvelte
@tauri-store/valtionpmReact
@tauri-store/vuenpmVue, Nuxt
@tauri-store/zustandnpmReact

§Supported Tauri Version

The plugins require Tauri 2.0 or later.

Modules§

prelude

Structs§

Builderplugin
Builder for the StoreCollection.
DefaultMarker
Default collection marker.
EventSource
Source of a store event.
HandleWindows or Linux or macOS
Plugin handle.
JsonMarshaler
Serializes and deserializes JSON stores.
Migration
A migration step.
MigrationContext
Context for a migration step.
PrettyJsonMarshaler
Serializes and deserializes pretty JSON stores.
PrettyTomlMarshalermarshaler-toml
Serializes and deserializes pretty TOML stores.
Store
A key-value store that can persist its state to disk.
StoreCollection
A collection of stores. This is the core component for store plugins.
StoreId
Unique identifier for a store.
StoreOptions
Options to configure the store behavior.
StoreState
Internal state of a store.
TomlMarshalermarshaler-toml
Serializes and deserializes TOML stores.
WatcherId
Unique watcher identifier.

Enums§

Error
Runtime errors for the stores.
Json
Represents any valid JSON value.
SaveStrategy
The strategy to use when saving a store.

Constants§

STORE_CONFIG_CHANGE_EVENT
STORE_STATE_CHANGE_EVENT
STORE_UNLOAD_EVENT

Traits§

CollectionMarker
A marker trait used to enable plugin interoperability.
ManagerExt
Extension for the Manager trait providing access to the store collection.
Marshaler
Describes how stores should be serialized and deserialized.

Functions§

initplugin
Initializes the store plugin.

Type Aliases§

BoxResult
A Result type with a boxed error.
MarshalingError
Generic marshaling error.
OnLoadFn
Closure to be called when a store is loaded.
Result
A Result type with Error as the error variant.