pub struct OpWrite { /* private fields */ }
Expand description
Args for write
operation.
Implementations§
Source§impl OpWrite
impl OpWrite
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new OpWrite
.
If input path is not a file path, an error will be returned.
Sourcepub fn append(&self) -> bool
pub fn append(&self) -> bool
Get the append from op.
The append is the flag to indicate that this write operation is an append operation.
Sourcepub fn with_append(self, append: bool) -> Self
pub fn with_append(self, append: 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 content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Get the content type from option
Sourcepub fn with_content_type(self, content_type: &str) -> Self
pub fn with_content_type(self, content_type: &str) -> Self
Set the content type of option
Sourcepub fn content_disposition(&self) -> Option<&str>
pub fn content_disposition(&self) -> Option<&str>
Get the content disposition from option
Sourcepub fn with_content_disposition(self, content_disposition: &str) -> Self
pub fn with_content_disposition(self, content_disposition: &str) -> Self
Set the content disposition of option
Sourcepub fn content_encoding(&self) -> Option<&str>
pub fn content_encoding(&self) -> Option<&str>
Get the content encoding from option
Sourcepub fn with_content_encoding(self, content_encoding: &str) -> Self
pub fn with_content_encoding(self, content_encoding: &str) -> Self
Set the content encoding of option
Sourcepub fn cache_control(&self) -> Option<&str>
pub fn cache_control(&self) -> Option<&str>
Get the cache control from option
Sourcepub fn with_cache_control(self, cache_control: &str) -> Self
pub fn with_cache_control(self, cache_control: &str) -> Self
Set the content type of option
Sourcepub fn concurrent(&self) -> usize
pub fn concurrent(&self) -> usize
Get the concurrent.
Sourcepub fn with_concurrent(self, concurrent: usize) -> Self
pub fn with_concurrent(self, concurrent: usize) -> Self
Set the maximum concurrent write task amount.
Sourcepub fn with_if_match(self, s: &str) -> Self
pub fn with_if_match(self, s: &str) -> Self
Set the If-Match of the option
Sourcepub fn with_if_none_match(self, s: &str) -> Self
pub fn with_if_none_match(self, s: &str) -> Self
Set the If-None-Match of the option
Sourcepub fn if_none_match(&self) -> Option<&str>
pub fn if_none_match(&self) -> Option<&str>
Get If-None-Match from option
Sourcepub fn with_if_not_exists(self, b: bool) -> Self
pub fn with_if_not_exists(self, b: bool) -> Self
Set the If-Not-Exist of the option
Sourcepub fn if_not_exists(&self) -> bool
pub fn if_not_exists(&self) -> bool
Get If-Not-Exist from option
Sourcepub fn with_user_metadata(self, metadata: HashMap<String, String>) -> Self
pub fn with_user_metadata(self, metadata: HashMap<String, String>) -> Self
Set the user defined metadata of the op