Trait cloud_storage_lite::client::BucketClient[][src]

pub trait BucketClient {
    fn bucket_name(&self) -> &str;
#[must_use] fn ping<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn list_objects<'a, 'life0, 'async_trait>(
        &'life0 self,
        options: ListObjectOptions<'a>
    ) -> Pin<Box<dyn Future<Output = Result<Page<Object>, Error>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn create_object<'life0, 'life1, 'async_trait, S>(
        &'life0 self,
        key: &'life1 str,
        value: S
    ) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>>
    where
        S: TryStream + Send + Sync + 'static,
        S::Error: Into<Box<dyn Error + Send + Sync>>,
        Bytes: From<S::Ok>,
        S: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_object<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn download_object<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Result<Bytes, Error>>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_object<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

A GCS client that targets a specific bucket.

Required methods

fn bucket_name(&self) -> &str[src]

Returns the name of the bucket to which this BucketClient is connected.

#[must_use]fn ping<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Checks connectivity to the bucket.

#[must_use]fn list_objects<'a, 'life0, 'async_trait>(
    &'life0 self,
    options: ListObjectOptions<'a>
) -> Pin<Box<dyn Future<Output = Result<Page<Object>, Error>> + Send + 'async_trait>> where
    'a: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns a page of objects.

#[must_use]fn create_object<'life0, 'life1, 'async_trait, S>(
    &'life0 self,
    key: &'life1 str,
    value: S
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>> where
    S: TryStream + Send + Sync + 'static,
    S::Error: Into<Box<dyn Error + Send + Sync>>,
    Bytes: From<S::Ok>,
    S: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Creates a new object.

#[must_use]fn get_object<'life0, 'life1, 'async_trait>(
    &'life0 self,
    key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Gets an object’s metadata.

#[must_use]fn download_object<'life0, 'life1, 'async_trait>(
    &'life0 self,
    key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Result<Bytes, Error>>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Downloads an object.

#[must_use]fn delete_object<'life0, 'life1, 'async_trait>(
    &'life0 self,
    key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Deletes an object. This library does not consider deleting a non-existent object an error.

Loading content...

Implementors

impl BucketClient for GcsBucketClient[src]

Loading content...