pub(crate) enum StorageOrPath<S: Storage> {
Storage(S),
Path(PathBuf),
}
Expand description
Alternatively a storage object or a path to it.
Only for internal use. Externally, two separate functions should be provided.
Variants§
Implementations§
Source§impl<S: Storage> StorageOrPath<S>
impl<S: Storage> StorageOrPath<S>
Sourcepub async fn open_storage<G: ImplicitOpenGate<S>>(
self,
opts: StorageOpenOptions,
gate: &mut G,
) -> Result<S>
pub async fn open_storage<G: ImplicitOpenGate<S>>( self, opts: StorageOpenOptions, gate: &mut G, ) -> Result<S>
Open the storage object.
Auto Trait Implementations§
impl<S> Freeze for StorageOrPath<S>where
S: Freeze,
impl<S> RefUnwindSafe for StorageOrPath<S>where
S: RefUnwindSafe,
impl<S> Send for StorageOrPath<S>
impl<S> Sync for StorageOrPath<S>
impl<S> Unpin for StorageOrPath<S>where
S: Unpin,
impl<S> UnwindSafe for StorageOrPath<S>where
S: UnwindSafe,
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