Type Alias opendal::operator_futures::FutureWriter
source · pub type FutureWriter<F> = OperatorFuture<(OpWrite, OpWriter), Writer, F>;
Expand description
Future that generated by Operator::writer_with
.
Users can add more options by public functions provided by this struct.
Aliased Type§
struct FutureWriter<F> { /* private fields */ }
Implementations§
source§impl<F: Future<Output = Result<Writer>>> FutureWriter<F>
impl<F: Future<Output = Result<Writer>>> FutureWriter<F>
sourcepub fn append(self, v: bool) -> Self
pub fn append(self, v: bool) -> Self
Set the append mode of op.
If the append mode is set, the data will be appended to the end of the file.
§Notes
Service could return Unsupported
if the underlying storage does not support append.
sourcepub fn chunk(self, v: usize) -> Self
pub fn chunk(self, v: usize) -> Self
Set the chunk size of op.
If chunk size is set, the data will be chunked by the underlying writer.
§NOTE
Service could have their own limitation for chunk size. It’s possible that chunk size is not equal to the given chunk size.
For example:
- AWS S3 requires the part size to be in [5MiB, 5GiB].
- GCS requires the part size to be aligned with 256 KiB.
The services will alter the chunk size to meet their requirements.
sourcepub fn concurrent(self, v: usize) -> Self
pub fn concurrent(self, v: usize) -> Self
Set the maximum concurrent write task amount.
sourcepub fn cache_control(self, v: &str) -> Self
pub fn cache_control(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_type(self, v: &str) -> Self
pub fn content_type(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_disposition(self, v: &str) -> Self
pub fn content_disposition(self, v: &str) -> Self
Set the content disposition of option
sourcepub fn user_metadata(
self,
data: impl IntoIterator<Item = (String, String)>,
) -> Self
pub fn user_metadata( self, data: impl IntoIterator<Item = (String, String)>, ) -> Self
Set the user defined metadata of the op
§Notes
we don’t need to include the user defined metadata prefix in the key. every service will handle it internally