@statesync/tauri / TauriFileBackendOptions
Interface: TauriFileBackendOptions
Defined in: persistence.ts:52
Configuration for createTauriFileBackend.
Properties
args?
optional args: Record<string, unknown>;Defined in: persistence.ts:104
Optional additional arguments forwarded to every Tauri command invocation.
Useful for scoping storage to a specific user, profile, or namespace.
Example
{ profileId: 'default' }clearCommand?
optional clearCommand: string;Defined in: persistence.ts:92
Optional Tauri command name for clearing persisted state.
If omitted, calling clear() on the returned backend is a no-op. When provided, the Rust command receives { ...args } and should delete the stored data.
Example
`'clear_settings'`invoke
invoke: TauriInvoke;Defined in: persistence.ts:60
A Tauri-compatible invoke function used to call Rust commands.
Typically invoke from @tauri-apps/api/core.
See
loadCommand
loadCommand: string;Defined in: persistence.ts:81
The Tauri command name for loading a previously persisted snapshot.
The Rust command receives { ...args } (or nothing if args is empty) and should return SnapshotEnvelope<T> | null.
Example
`'load_settings'`saveCommand
saveCommand: string;Defined in: persistence.ts:71
The Tauri command name for persisting a snapshot.
The Rust command receives { snapshot: SnapshotEnvelope<T>, ...args } as its argument payload. It should write the envelope to disk (or other durable storage) and return Ok(()).
Example
`'save_settings'`