pub trait BucketClient {
// Required methods
fn bucket_name(&self) -> &str;
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
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 Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait;
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 + 'async_trait,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A GCS client that targets a specific bucket.
Required Methods§
Sourcefn bucket_name(&self) -> &str
fn bucket_name(&self) -> &str
Returns the name of the bucket to which this BucketClient is connected.
Sourcefn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks connectivity to the bucket.
Sourcefn list_objects<'a, 'life0, 'async_trait>(
&'life0 self,
options: ListObjectOptions<'a>,
) -> Pin<Box<dyn Future<Output = Result<Page<Object>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
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
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Returns a page of objects.
Sourcefn 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>>
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>>
Creates a new object.
Sourcefn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets an object’s metadata.
Sourcefn 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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Downloads an object.
Sourcefn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes an object. This library does not consider deleting a non-existent object an error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.