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