pub struct StorageRegistry { /* private fields */ }Expand description
Registry for storage providers with dual-key lookup.
Implementations§
Source§impl StorageRegistry
impl StorageRegistry
Sourcepub fn register_known(
&mut self,
platform: StoragePlatform,
factory: Arc<dyn StorageProviderFactory>,
)
pub fn register_known( &mut self, platform: StoragePlatform, factory: Arc<dyn StorageProviderFactory>, )
Register a built-in storage provider (dual-keyed).
Sourcepub fn register_extension(
&mut self,
name: String,
factory: Arc<dyn StorageProviderFactory>,
)
pub fn register_extension( &mut self, name: String, factory: Arc<dyn StorageProviderFactory>, )
Register a third-party storage extension (string-keyed only).
Sourcepub fn get(
&self,
platform: &StoragePlatform,
) -> Option<&Arc<dyn StorageProviderFactory>>
pub fn get( &self, platform: &StoragePlatform, ) -> Option<&Arc<dyn StorageProviderFactory>>
Resolve by enum key (fast path for built-in platforms).
Sourcepub fn get_by_name(
&self,
name: &str,
) -> Option<&Arc<dyn StorageProviderFactory>>
pub fn get_by_name( &self, name: &str, ) -> Option<&Arc<dyn StorageProviderFactory>>
Resolve by string name (extension path, also works for built-in).
Trait Implementations§
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