pub struct LocalStorage { /* private fields */ }Implementations§
Trait Implementations§
Source§impl FileStorage for LocalStorage
impl FileStorage for LocalStorage
Source§fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original_filename: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, AdminError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original_filename: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, AdminError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store
data (raw bytes) and return the public URL/path to the stored file.
original_filename is used only to preserve the file extension.Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AdminError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AdminError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a stored file by its URL/path (as returned by
save). Idempotent.Auto Trait Implementations§
impl Freeze for LocalStorage
impl RefUnwindSafe for LocalStorage
impl Send for LocalStorage
impl Sync for LocalStorage
impl Unpin for LocalStorage
impl UnsafeUnpin for LocalStorage
impl UnwindSafe for LocalStorage
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