Skip to main content

ObjectStoreGetExt

Trait ObjectStoreGetExt 

Source
pub trait ObjectStoreGetExt:
    Display
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_bytes<'life0, 'life1, 'async_trait>(
        &'life0 self,
        src: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        src: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn object_size<'life0, 'life1, 'async_trait>(
        &'life0 self,
        src: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        src: &'life1 Path,
        on_bytes: &'life2 (dyn Fn(u64) + Send + Sync),
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Required Methods§

Source

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the bytes at given path in object store

Source

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return whether an object exists at the given path.

Source

fn object_size<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the size in bytes of the object at the given path.

Provided Methods§

Source

fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Path, on_bytes: &'life2 (dyn Fn(u64) + Send + Sync), ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Like Self::get_bytes, additionally invoking on_bytes with the size of each received chunk while the download is in flight, so callers can render live progress. The default implementation reports the full size in one call once the download completes; stores that stream their responses override it to report per chunk.

Trait Implementations§

Source§

impl ObjectStoreGetExt for Box<dyn ObjectStoreGetExt>

Source§

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the bytes at given path in object store
Source§

fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Path, on_bytes: &'life2 (dyn Fn(u64) + Send + Sync), ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Like Self::get_bytes, additionally invoking on_bytes with the size of each received chunk while the download is in flight, so callers can render live progress. The default implementation reports the full size in one call once the download completes; stores that stream their responses override it to report per chunk.
Source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return whether an object exists at the given path.
Source§

fn object_size<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the size in bytes of the object at the given path.

Implementations on Foreign Types§

Source§

impl ObjectStoreGetExt for Box<dyn ObjectStoreGetExt>

Source§

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Path, on_bytes: &'life2 (dyn Fn(u64) + Send + Sync), ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn object_size<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl ObjectStoreGetExt for Box<dyn ObjectStore>

Source§

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Path, on_bytes: &'life2 (dyn Fn(u64) + Send + Sync), ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn object_size<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl ObjectStoreGetExt for Arc<dyn ObjectStoreGetExt>

Source§

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Path, on_bytes: &'life2 (dyn Fn(u64) + Send + Sync), ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn object_size<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl ObjectStoreGetExt for Arc<dyn ObjectStore>

Source§

fn get_bytes<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_bytes_with_progress<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Path, on_bytes: &'life2 (dyn Fn(u64) + Send + Sync), ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn object_size<'life0, 'life1, 'async_trait>( &'life0 self, src: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§