pub trait Uploader: Send + Sync {
// Required methods
fn upload_with(
&self,
key: &str,
data: Vec<u8>,
options: UploadOptions,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send;
fn upload_stream(
&self,
key: &str,
reader: impl AsyncRead + Unpin + Send + Sync + 'static,
options: UploadOptions,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send;
// Provided methods
fn upload(
&self,
key: &str,
data: Vec<u8>,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send { ... }
fn upload_chunks<S, B, E>(
&self,
key: &str,
chunks: S,
options: UploadOptions,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
where S: Stream<Item = Result<B, E>> + Send + 'static,
B: Into<Bytes> + 'static,
E: Into<Box<dyn Error + Send + Sync>> + 'static { ... }
}Expand description
Upload objects. Implemented by a BucketRef granting
perms::Uploader.
Required Methods§
Sourcefn upload_with(
&self,
key: &str,
data: Vec<u8>,
options: UploadOptions,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
fn upload_with( &self, key: &str, data: Vec<u8>, options: UploadOptions, ) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
See Bucket::upload_with.
Sourcefn upload_stream(
&self,
key: &str,
reader: impl AsyncRead + Unpin + Send + Sync + 'static,
options: UploadOptions,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
fn upload_stream( &self, key: &str, reader: impl AsyncRead + Unpin + Send + Sync + 'static, options: UploadOptions, ) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
Provided Methods§
Sourcefn upload(
&self,
key: &str,
data: Vec<u8>,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
fn upload( &self, key: &str, data: Vec<u8>, ) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
See Bucket::upload.
Sourcefn upload_chunks<S, B, E>(
&self,
key: &str,
chunks: S,
options: UploadOptions,
) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
fn upload_chunks<S, B, E>( &self, key: &str, chunks: S, options: UploadOptions, ) -> impl Future<Output = Result<ObjectAttrs, Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".