pub struct MemoryStore { /* private fields */ }Expand description
An in-memory tus storage backend.
Data is held in a shared Arc<RwLock<HashMap>> so all handles and clones
refer to the same underlying state. Suitable for testing and development;
not intended for production use (no persistence, no multi-process support).
Implementations§
Source§impl MemoryStore
impl MemoryStore
Trait Implementations§
Source§impl Clone for MemoryStore
impl Clone for MemoryStore
Source§fn clone(&self) -> MemoryStore
fn clone(&self) -> MemoryStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for MemoryStore
impl Default for MemoryStore
Source§impl SendDataStore for MemoryStore
impl SendDataStore for MemoryStore
type UploadType = MemoryUpload
Source§async fn create_upload(
&self,
info: UploadInfo,
) -> Result<MemoryUpload, TusError>
async fn create_upload( &self, info: UploadInfo, ) -> Result<MemoryUpload, TusError>
Create a new upload slot and return a handle to it.
Source§async fn get_upload(&self, id: &UploadId) -> Result<MemoryUpload, TusError>
async fn get_upload(&self, id: &UploadId) -> Result<MemoryUpload, TusError>
Retrieve an existing upload by ID.
Auto Trait Implementations§
impl Freeze for MemoryStore
impl !RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl !UnwindSafe for MemoryStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<TraitVariantBlanketType> DataStore for TraitVariantBlanketTypewhere
TraitVariantBlanketType: SendDataStore,
impl<TraitVariantBlanketType> DataStore for TraitVariantBlanketTypewhere
TraitVariantBlanketType: SendDataStore,
type UploadType = <TraitVariantBlanketType as SendDataStore>::UploadType
Source§async fn create_upload(
&self,
info: UploadInfo,
) -> Result<<TraitVariantBlanketType as DataStore>::UploadType, TusError>
async fn create_upload( &self, info: UploadInfo, ) -> Result<<TraitVariantBlanketType as DataStore>::UploadType, TusError>
Create a new upload slot and return a handle to it.
Source§async fn get_upload(
&self,
id: &UploadId,
) -> Result<<TraitVariantBlanketType as DataStore>::UploadType, TusError>
async fn get_upload( &self, id: &UploadId, ) -> Result<<TraitVariantBlanketType as DataStore>::UploadType, TusError>
Retrieve an existing upload by ID.