pub enum FirestoreDbSessionCacheMode {
None,
ReadThroughCache(FirestoreSharedCacheBackend),
ReadCachedOnly(FirestoreSharedCacheBackend),
}Expand description
Re-exports all public items from the db module.
The db module contains the core FirestoreDb client and
functionalities for interacting with the Firestore database, such as CRUD operations,
queries, and transactions.
Defines the caching mode for Firestore operations within a session.
This enum is used in FirestoreDbSessionParams to control how and if
caching is utilized for read operations.
Variants§
None
No caching is performed. All read operations go directly to Firestore.
ReadThroughCache(FirestoreSharedCacheBackend)
Enables read-through caching.
When a read operation is performed:
- The cache is checked first.
- If data is found in the cache, it’s returned.
- If data is not in the cache, it’s fetched from Firestore, stored in the cache, and then returned.
This mode is only available if the caching feature is enabled.
ReadCachedOnly(FirestoreSharedCacheBackend)
Reads exclusively from the cache.
When a read operation is performed:
- The cache is checked.
- If data is found, it’s returned.
- If data is not found, the operation will typically result in a “not found” status without attempting to fetch from Firestore.
This mode is only available if the caching feature is enabled.
Trait Implementations§
Source§impl Clone for FirestoreDbSessionCacheMode
impl Clone for FirestoreDbSessionCacheMode
Source§fn clone(&self) -> FirestoreDbSessionCacheMode
fn clone(&self) -> FirestoreDbSessionCacheMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for FirestoreDbSessionCacheMode
impl !UnwindSafe for FirestoreDbSessionCacheMode
impl Freeze for FirestoreDbSessionCacheMode
impl Send for FirestoreDbSessionCacheMode
impl Sync for FirestoreDbSessionCacheMode
impl Unpin for FirestoreDbSessionCacheMode
impl UnsafeUnpin for FirestoreDbSessionCacheMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request