Struct object_store::memory::InMemory
source · [−]pub struct InMemory { /* private fields */ }
Expand description
In-memory storage suitable for testing or for opting out of using a cloud storage provider.
Implementations
Trait Implementations
sourceimpl ObjectStore for InMemory
impl ObjectStore for InMemory
sourcefn list_with_delimiter<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 Path>
) -> Pin<Box<dyn Future<Output = Result<ListResult>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_with_delimiter<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 Path>
) -> Pin<Box<dyn Future<Output = Result<ListResult>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
The memory implementation returns all results, as opposed to the cloud versions which limit their results to 1k or more because of API limitations.
sourcefn put<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path,
bytes: Bytes
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path,
bytes: Bytes
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Save the provided bytes to the specified location.
sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<GetResult>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<GetResult>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Return the bytes that are stored at the specified location.
sourcefn get_range<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path,
range: Range<usize>
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_range<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path,
range: Range<usize>
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Return the bytes that are stored at the specified location in the given byte range Read more
sourcefn head<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Return the metadata for the specified location
sourcefn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Delete the object at the specified location.
sourcefn list<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 Path>
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'_, Result<ObjectMeta>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 Path>
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'_, Result<ObjectMeta>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
List all the objects with the given prefix. Read more
sourcefn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Copy an object from one path to another in the same object store. Read more
sourcefn copy_if_not_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn copy_if_not_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Copy an object from one path to another, only if destination is empty. Read more
sourcefn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Move an object from one path to another in the same object store. Read more
Auto Trait Implementations
impl !RefUnwindSafe for InMemory
impl Send for InMemory
impl Sync for InMemory
impl Unpin for InMemory
impl !UnwindSafe for InMemory
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more