pub struct IndexeddbStores {
pub crypto: IndexeddbCryptoStore,
pub state: IndexeddbStateStore,
pub event_cache: IndexeddbEventCacheStore,
pub media: IndexeddbMediaStore,
}Expand description
Structure containing implementations of every type of store using IndexedDB for persistent storage.
Note that each of the stores is behind a feature flag and will only be available when its corresponding flag is set.
Fields§
§crypto: IndexeddbCryptoStoreAn IndexedDB-backed implementation of CryptoStore
state: IndexeddbStateStoreAn IndexedDB-backed implementation of StateStore
event_cache: IndexeddbEventCacheStoreAn IndexedDB-backed implementation of EventCacheStore
media: IndexeddbMediaStoreAn IndexedDB-backed implementation of MediaStore
Implementations§
Source§impl IndexeddbStores
impl IndexeddbStores
Sourcepub async fn open(
name: &str,
passphrase: Option<&str>,
) -> Result<Self, OpenStoreError>
pub async fn open( name: &str, passphrase: Option<&str>, ) -> Result<Self, OpenStoreError>
Opens and returns all stores using the given database name and, optionally, a passphrase.
If e2e-encryption and state-store features are not enabled,
passphrase is ignored. Otherwise passphrase is used to import or
create a StoreCipher which encrypts contents of all stores.
Note that each of the stores is behind a feature flag and will only be opened when the corresponding flag is set.
Sourcepub async fn open_without_passphrase(name: &str) -> Result<Self, OpenStoreError>
pub async fn open_without_passphrase(name: &str) -> Result<Self, OpenStoreError>
Opens and returns all stores using the given database name. Contents of the stores are NOT encrypted.
Note that each of the stores is behind a feature flag and will only be opened when the corresponding flag is set.
Sourcepub async fn open_with_passphrase(
name: &str,
passphrase: &str,
) -> Result<Self, OpenStoreError>
pub async fn open_with_passphrase( name: &str, passphrase: &str, ) -> Result<Self, OpenStoreError>
Opens and returns all stores using the given database name and
passphrase. Passphrase is used to import or create a StoreCipher
which encrypts contents of all stores.
Note that IndexeddbEventCacheStore and IndexeddbMediaStore are
behind feature flags and will only be opened when their
corresponding flags are set.
Auto Trait Implementations§
impl !Freeze for IndexeddbStores
impl !RefUnwindSafe for IndexeddbStores
impl !Send for IndexeddbStores
impl !Sync for IndexeddbStores
impl Unpin for IndexeddbStores
impl !UnwindSafe for IndexeddbStores
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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