pub struct Context<M: FileManager> {
pub file_manager: M,
/* private fields */
}Expand description
A shared environment for database operations.
Fields§
§file_manager: MThe file manager for the ManagedFile implementor.
Implementations§
Source§impl<M: FileManager> Context<M>
impl<M: FileManager> Context<M>
Sourcepub fn cache(&self) -> Option<&ChunkCache>
pub fn cache(&self) -> Option<&ChunkCache>
Returns the context’s chunk cache.
Sourcepub fn with_cache(self, cache: ChunkCache) -> Self
pub fn with_cache(self, cache: ChunkCache) -> Self
Replaces the cache currently set with cache.
Sourcepub fn with_vault<V: Vault>(self, vault: V) -> Self
pub fn with_vault<V: Vault>(self, vault: V) -> Self
Replaces the vault currently set with vault.
Sourcepub fn with_any_vault(self, vault: Arc<dyn AnyVault>) -> Self
pub fn with_any_vault(self, vault: Arc<dyn AnyVault>) -> Self
Replaces the vault currently set with vault.
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for Context<M>where
M: Freeze,
impl<M> !RefUnwindSafe for Context<M>
impl<M> Send for Context<M>
impl<M> Sync for Context<M>
impl<M> Unpin for Context<M>where
M: Unpin,
impl<M> !UnwindSafe for Context<M>
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