pub struct StorageHandle { /* private fields */ }Expand description
Opaque handle encapsulating storage connection pooling and configuration resolution.
Implementations§
Source§impl StorageHandle
impl StorageHandle
pub fn new(resolver: Arc<dyn StorageConfigResolver>) -> Self
pub fn with_registry( registry: Arc<StorageRegistry>, resolver: Arc<dyn StorageConfigResolver>, ) -> Self
Sourcepub async fn connect_store<S: StorageConnection>(
&self,
plugin_namespace: &str,
) -> Result<Arc<S>, String>
pub async fn connect_store<S: StorageConnection>( &self, plugin_namespace: &str, ) -> Result<Arc<S>, String>
Resolves configuration and establishes a scoped storage connection.
Sourcepub async fn get_or_init_pool<T: StorageProviderPool, F, Fut>(
&self,
init: F,
) -> Result<Arc<T>, String>
pub async fn get_or_init_pool<T: StorageProviderPool, F, Fut>( &self, init: F, ) -> Result<Arc<T>, String>
Accesses or initializes a pooled storage resource safely.
Trait Implementations§
Source§impl Clone for StorageHandle
impl Clone for StorageHandle
Source§fn clone(&self) -> StorageHandle
fn clone(&self) -> StorageHandle
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 moreSource§impl Debug for StorageHandle
impl Debug for StorageHandle
Auto Trait Implementations§
impl !RefUnwindSafe for StorageHandle
impl !UnwindSafe for StorageHandle
impl Freeze for StorageHandle
impl Send for StorageHandle
impl Sync for StorageHandle
impl Unpin for StorageHandle
impl UnsafeUnpin for StorageHandle
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