Struct gcs_rsync::storage::ObjectClient
source · pub struct ObjectClient { /* private fields */ }
Implementations§
source§impl ObjectClient
impl ObjectClient
pub async fn new( token_generator: Box<dyn TokenGenerator> ) -> StorageResult<Self>
pub async fn get( &self, o: &Object, fields: &str ) -> StorageResult<PartialObject>
pub async fn delete(&self, o: &Object) -> StorageResult<String>
pub async fn download( &self, o: &Object ) -> StorageResult<impl Stream<Item = StorageResult<Bytes>>>
pub async fn upload<S>(&self, o: &Object, stream: S) -> StorageResult<()>where S: TryStream + Send + Sync + 'static, S::Error: Into<Box<dyn Error + Send + Sync>>, Bytes: From<S::Ok>,
pub async fn upload_with_metadata<S>( &self, m: &ObjectMetadata, o: &Object, stream: S ) -> StorageResult<()>where S: TryStream<Ok = Bytes> + Send + Sync + 'static, S::Error: Into<Box<dyn Error + Send + Sync>> + Send + Sync,
pub async fn list( &self, bucket: &str, objects_list_request: &ObjectsListRequest ) -> impl Stream<Item = StorageResult<PartialObject>> + '_
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectClient
impl Send for ObjectClient
impl Sync for ObjectClient
impl Unpin for ObjectClient
impl !UnwindSafe for ObjectClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more