pub struct MemoryStorage { /* private fields */ }Expand description
MediaStorage in memory. The ID is the media’s name with a number in front
(1-cat.png), or media-1 for media without a name.
Clones share the same storage.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryStorage
impl Clone for MemoryStorage
Source§impl Debug for MemoryStorage
impl Debug for MemoryStorage
Source§impl Default for MemoryStorage
impl Default for MemoryStorage
Source§impl MediaRead for MemoryStorage
impl MediaRead for MemoryStorage
Source§impl MediaSave for MemoryStorage
impl MediaSave for MemoryStorage
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
media: &'life1 Media,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
media: &'life1 Media,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stores
media and returns the ID to read it with. The storage chooses the ID; it may
use Media::name.Auto Trait Implementations§
impl Freeze for MemoryStorage
impl RefUnwindSafe for MemoryStorage
impl Send for MemoryStorage
impl Sync for MemoryStorage
impl Unpin for MemoryStorage
impl UnsafeUnpin for MemoryStorage
impl UnwindSafe for MemoryStorage
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