pub struct S3Algo { /* private fields */ }Implementations§
Source§impl S3Algo
impl S3Algo
Sourcepub fn list_prefix(
&self,
bucket: String,
prefix: Option<String>,
) -> ListObjects<impl Stream<Item = Result<ListObjectsV2Output, Error>> + Sized + Send>
pub fn list_prefix( &self, bucket: String, prefix: Option<String>, ) -> ListObjects<impl Stream<Item = Result<ListObjectsV2Output, Error>> + Sized + Send>
List objects of a bucket.
Source§impl S3Algo
impl S3Algo
Sourcepub async fn upload_files<P, F, I, R>(
&self,
bucket: String,
files: I,
progress: P,
default_request: R,
) -> Result<(), Error>
pub async fn upload_files<P, F, I, R>( &self, bucket: String, files: I, progress: P, default_request: R, ) -> Result<(), Error>
Upload multiple files to S3.
upload_files provides counting of uploaded files and bytes through the progress closure:
For common use cases it is adviced to use files_recursive for the files parameter.
progress will be called after the upload of each file, with some data about that upload.
The first usize parameter is the number of this file in the upload, while RequestReport
holds more data such as size in bytes, and the duration of the upload. It is thus possible to
report progress both in amount of files, or amount of bytes, depending on what granularity is
desired.
progress returns a generic F: Future to support async operations like, for example, logging the
results to a file; this future will be run as part of the upload algorithm.
default_request constructs the default request struct - only the fields bucket, key,
body and content_length are overwritten by the upload algorithm.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for S3Algo
impl !RefUnwindSafe for S3Algo
impl Send for S3Algo
impl Sync for S3Algo
impl Unpin for S3Algo
impl !UnwindSafe for S3Algo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more