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>

source

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.

source

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.

source

pub fn concurrent(self, v: usize) -> Self

Set the maximum concurrent write task amount.

source

pub fn cache_control(self, v: &str) -> Self

Set the content type of option

source

pub fn content_type(self, v: &str) -> Self

Set the content type of option

source

pub fn content_disposition(self, v: &str) -> Self

Set the content disposition of option

source

pub fn executor(self, executor: Executor) -> Self

Set the executor for this operation.

source

pub fn if_none_match(self, s: &str) -> Self

Set the If-None-Match for this operation.

source

pub fn if_not_exists(self, b: bool) -> Self

Set the If-Not-Exist for this operation.

source

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