pub struct Builder<R: Runtime> { /* private fields */ }Available on crate feature
plugin only.Expand description
Builder for the StoreCollection.
Implementations§
Source§impl<R: Runtime> StoreCollectionBuilder<R>
impl<R: Runtime> StoreCollectionBuilder<R>
Sourcepub fn default_save_strategy(self, strategy: SaveStrategy) -> Self
pub fn default_save_strategy(self, strategy: SaveStrategy) -> Self
Sets the default save strategy to be used by the stores.
Sourcepub fn save_denylist<I, T>(self, denylist: I) -> Self
pub fn save_denylist<I, T>(self, denylist: I) -> Self
Sets a list of stores that should not be saved to disk.
Sourcepub fn sync_denylist<I, T>(self, denylist: I) -> Self
pub fn sync_denylist<I, T>(self, denylist: I) -> Self
Sets a list of stores that should not be synchronized across windows.
Sourcepub fn migration(self, id: impl Into<StoreId>, migration: Migration) -> Self
Available on crate feature unstable-migration only.
pub fn migration(self, id: impl Into<StoreId>, migration: Migration) -> Self
unstable-migration only.Defines a migration for a store.
Sourcepub fn migrations<I>(self, id: impl Into<StoreId>, migrations: I) -> Selfwhere
I: IntoIterator<Item = Migration>,
Available on crate feature unstable-migration only.
pub fn migrations<I>(self, id: impl Into<StoreId>, migrations: I) -> Selfwhere
I: IntoIterator<Item = Migration>,
unstable-migration only.Defines multiple migrations for a store.
Sourcepub fn on_before_each_migration<F>(self, f: F) -> Self
Available on crate feature unstable-migration only.
pub fn on_before_each_migration<F>(self, f: F) -> Self
unstable-migration only.Sets a closure to be called before each migration step.
Sourcepub fn build_plugin(self) -> TauriPlugin<R>
pub fn build_plugin(self) -> TauriPlugin<R>
Initializes the plugin with a StoreCollection.
§Panics
Panics if a store collection is already initialized.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for StoreCollectionBuilder<R>
impl<R> !RefUnwindSafe for StoreCollectionBuilder<R>
impl<R> Send for StoreCollectionBuilder<R>
impl<R> Sync for StoreCollectionBuilder<R>
impl<R> Unpin for StoreCollectionBuilder<R>
impl<R> !UnwindSafe for StoreCollectionBuilder<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more