Type Alias opendal::operator_futures::FutureWrite
source · pub type FutureWrite<F> = OperatorFuture<(OpWrite, OpWriter, Buffer), (), F>;
Expand description
Future that generated by Operator::write_with
.
Users can add more options by public functions provided by this struct.
Aliased Type§
struct FutureWrite<F> { /* private fields */ }
Implementations§
source§impl<F: Future<Output = Result<()>>> FutureWrite<F>
impl<F: Future<Output = Result<()>>> FutureWrite<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 buffer size of op.
If buffer size is set, the data will be buffered by the underlying writer.
§NOTE
Service could have their own minimum buffer size while perform write operations like multipart uploads. So the buffer size may be larger than the given buffer size.
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 if_none_match(self, s: &str) -> Self
pub fn if_none_match(self, s: &str) -> Self
Set the If-None-Match for this operation.
sourcepub fn if_not_exists(self, b: bool) -> Self
pub fn if_not_exists(self, b: bool) -> Self
Set the If-Not-Exist for this operation.
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