pub enum KeysetLoadPolicy {
CacheOnly,
CacheThenNetwork,
Refresh,
}Expand description
Policy controlling how keysets are loaded.
Determines the data-fetching strategy for keyset queries: memory cache, local database, and/or network.
Variants§
CacheOnly
Use in-memory cache and local database only. Never contacts the network. Returns an error if neither cache nor database has data.
CacheThenNetwork
Return cached data when fresh (TTL not expired). When the cache is empty, tries the database first, then the network. When the cache is populated but stale (TTL expired), fetches directly from the network, falling back to the stale cache if the network call fails. This is the default.
Refresh
Fetch data from the mint over the network and update the cache. Falls back to stale cached data if the network call fails; only returns an error when no cached data exists at all.
Trait Implementations§
Source§impl Clone for KeysetLoadPolicy
impl Clone for KeysetLoadPolicy
Source§fn clone(&self) -> KeysetLoadPolicy
fn clone(&self) -> KeysetLoadPolicy
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 moreimpl Copy for KeysetLoadPolicy
Source§impl Debug for KeysetLoadPolicy
impl Debug for KeysetLoadPolicy
Source§impl Default for KeysetLoadPolicy
impl Default for KeysetLoadPolicy
Source§fn default() -> KeysetLoadPolicy
fn default() -> KeysetLoadPolicy
Returns the “default value” for a type. Read more
impl Eq for KeysetLoadPolicy
Source§impl Hash for KeysetLoadPolicy
impl Hash for KeysetLoadPolicy
Source§impl PartialEq for KeysetLoadPolicy
impl PartialEq for KeysetLoadPolicy
impl StructuralPartialEq for KeysetLoadPolicy
Auto Trait Implementations§
impl Freeze for KeysetLoadPolicy
impl RefUnwindSafe for KeysetLoadPolicy
impl Send for KeysetLoadPolicy
impl Sync for KeysetLoadPolicy
impl Unpin for KeysetLoadPolicy
impl UnsafeUnpin for KeysetLoadPolicy
impl UnwindSafe for KeysetLoadPolicy
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