pub struct CacheRegistry { /* private fields */ }Expand description
Explicit cache store registry.
Implementations§
Source§impl CacheRegistry
impl CacheRegistry
Sourcepub fn register(
&mut self,
name: impl Into<String>,
factory: Arc<dyn CacheStoreFactory>,
) -> AppResult<()>
pub fn register( &mut self, name: impl Into<String>, factory: Arc<dyn CacheStoreFactory>, ) -> AppResult<()>
Register a store factory under name.
Sourcepub async fn build(
&self,
config: &CacheConfig,
) -> AppResult<Arc<dyn CacheStore>>
pub async fn build( &self, config: &CacheConfig, ) -> AppResult<Arc<dyn CacheStore>>
Build the store selected by CacheConfig::store.
Trait Implementations§
Source§impl Default for CacheRegistry
impl Default for CacheRegistry
Source§fn default() -> CacheRegistry
fn default() -> CacheRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for CacheRegistry
impl !UnwindSafe for CacheRegistry
impl Freeze for CacheRegistry
impl Send for CacheRegistry
impl Sync for CacheRegistry
impl Unpin for CacheRegistry
impl UnsafeUnpin for CacheRegistry
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