pub trait ObjectStore: Display + Send + Sync + Debug + 'static {
    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
; 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
; 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
; 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
; 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
; 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
; 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
; 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
; 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
; 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
, { ... } }
Expand description

Universal API to multiple object store services.

Required Methods

Save the provided bytes to the specified location.

Return the bytes that are stored at the specified location.

Return the bytes that are stored at the specified location in the given byte range

Return the metadata for the specified location

Delete the object at the specified location.

List all the objects with the given prefix.

Prefixes are evaluated on a path segment basis, i.e. foo/bar/ is a prefix of foo/bar/x but not of foo/bar_baz/x.

List objects with the given prefix and an implementation specific delimiter. Returns common prefixes (directories) in addition to object metadata.

Prefixes are evaluated on a path segment basis, i.e. foo/bar/ is a prefix of foo/bar/x but not of foo/bar_baz/x.

Copy an object from one path to another in the same object store.

If there exists an object at the destination, it will be overwritten.

Copy an object from one path to another, only if destination is empty.

Will return an error if the destination already has an object.

Provided Methods

Move an object from one path to another in the same object store.

By default, this is implemented as a copy and then delete source. It may not check when deleting source that it was the same object that was originally copied.

If there exists an object at the destination, it will be overwritten.

Implementors