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) -> StoreConfig
pub fn new(cross_process_store_locks_holder_name: String) -> StoreConfig
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) -> StoreConfig
pub fn crypto_store(self, store: impl IntoCryptoStore) -> StoreConfig
Set a custom implementation of a CryptoStore
.
The crypto store must be opened before being set.
Sourcepub fn state_store(self, store: impl IntoStateStore) -> StoreConfig
pub fn state_store(self, store: impl IntoStateStore) -> StoreConfig
Set a custom implementation of a StateStore
.
Sourcepub fn event_cache_store<S>(self, event_cache_store: S) -> StoreConfigwhere
S: IntoEventCacheStore,
pub fn event_cache_store<S>(self, event_cache_store: S) -> StoreConfigwhere
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§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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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