Struct matrix_sdk_base::store::StoreConfig
source · pub struct StoreConfig { /* private fields */ }
Expand description
Configuration for the various stores.
By default, this always includes a state store and an event cache store.
When the e2e-encryption
feature is enabled, this also includes a crypto
store.
§Examples
let store_config =
StoreConfig::new("cross-process-store-locks-holder-name".to_owned());
Implementations§
source§impl StoreConfig
impl StoreConfig
sourcepub fn new(cross_process_store_locks_holder_name: String) -> Self
pub fn new(cross_process_store_locks_holder_name: String) -> Self
Create a new default StoreConfig
.
To learn more about cross_process_store_locks_holder_name
, please read
CrossProcessStoreLock::new
.
sourcepub fn crypto_store(self, store: impl IntoCryptoStore) -> Self
Available on crate feature e2e-encryption
only.
pub fn crypto_store(self, store: impl IntoCryptoStore) -> Self
e2e-encryption
only.Set a custom implementation of a CryptoStore
.
The crypto store must be opened before being set.
sourcepub fn state_store(self, store: impl IntoStateStore) -> Self
pub fn state_store(self, store: impl IntoStateStore) -> Self
Set a custom implementation of a StateStore
.
sourcepub fn event_cache_store<S>(self, event_cache_store: S) -> Selfwhere
S: IntoEventCacheStore,
pub fn event_cache_store<S>(self, event_cache_store: S) -> Selfwhere
S: IntoEventCacheStore,
Set a custom implementation of an EventCacheStore
.
Trait Implementations§
source§impl Clone for StoreConfig
impl Clone for StoreConfig
source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StoreConfig
impl !RefUnwindSafe for StoreConfig
impl Send for StoreConfig
impl Sync for StoreConfig
impl Unpin for StoreConfig
impl !UnwindSafe for StoreConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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>
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