Struct gcs_rsync::storage::ObjectClient
source · [−]pub struct ObjectClient { /* private fields */ }Implementations
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more