pub struct StatOptions {
pub version: Option<String>,
pub if_match: Option<String>,
pub if_none_match: Option<String>,
pub if_version_match: Option<String>,
pub if_version_not_match: Option<String>,
pub if_modified_since: Option<Timestamp>,
pub if_unmodified_since: Option<Timestamp>,
pub override_content_type: Option<String>,
pub override_cache_control: Option<String>,
pub override_content_disposition: Option<String>,
}Expand description
Options for stat operations.
Each condition checks the file being observed, and every condition must
hold for the stat to return metadata. A missing file fails the stat with
crate::ErrorKind::NotFound no matter which conditions are set. An
existing file that fails a condition returns
crate::ErrorKind::ConditionNotMatch, and a condition the service does
not advertise through its capability returns
crate::ErrorKind::Unsupported; OpenDAL never silently drops a
condition.
See the conditional operation specification for the complete cross-operation contract.
Fields§
§version: Option<String>Stat the given version of the file instead of the current one.
This selects which stored version the stat describes; it is not a
condition on the file. A version that does not exist returns
crate::ErrorKind::NotFound.
Check crate::Capability::stat_with_version before using this
option.
if_match: Option<String>Stat only when the file has this exact ETag.
The condition succeeds when the file exists and its ETag equals this
value. A file with a different ETag returns
crate::ErrorKind::ConditionNotMatch; a missing file returns
crate::ErrorKind::NotFound. Only concrete ETag values are
portable; a wildcard such as "*" has no portable meaning here.
The operation returns crate::ErrorKind::Unsupported when the
service does not advertise crate::Capability::stat_with_if_match.
if_none_match: Option<String>Stat only when the file does not have this ETag.
With a concrete ETag value, the condition succeeds when the file
exists with a different ETag. A file whose ETag equals this value
returns crate::ErrorKind::ConditionNotMatch; a missing file
returns crate::ErrorKind::NotFound. Only concrete ETag values
are portable; a wildcard such as "*" has no portable meaning here.
The operation returns crate::ErrorKind::Unsupported when the
service does not advertise
crate::Capability::stat_with_if_none_match.
if_version_match: Option<String>Stat only when the file has this exact version.
The condition succeeds when the file exists and its version equals
this value. A file with a different version returns
crate::ErrorKind::ConditionNotMatch; a missing file returns
crate::ErrorKind::NotFound.
The operation returns crate::ErrorKind::Unsupported when the
service does not advertise
crate::Capability::stat_with_if_version_match.
if_version_not_match: Option<String>Stat only when the file does not have this version.
The condition succeeds when the file exists with a different version.
A file whose version equals this value returns
crate::ErrorKind::ConditionNotMatch; a missing file returns
crate::ErrorKind::NotFound.
The operation returns crate::ErrorKind::Unsupported when the
service does not advertise
crate::Capability::stat_with_if_version_not_match.
if_modified_since: Option<Timestamp>Stat only when the file was modified after this timestamp.
The condition succeeds when the file exists and was modified after
this time. A file not modified since this time returns
crate::ErrorKind::ConditionNotMatch; a missing file returns
crate::ErrorKind::NotFound.
The operation returns crate::ErrorKind::Unsupported when the
service does not advertise
crate::Capability::stat_with_if_modified_since.
if_unmodified_since: Option<Timestamp>Stat only when the file was not modified after this timestamp.
The condition succeeds when the file exists and was not modified
after this time. A file modified after this time returns
crate::ErrorKind::ConditionNotMatch; a missing file returns
crate::ErrorKind::NotFound.
The operation returns crate::ErrorKind::Unsupported when the
service does not advertise
crate::Capability::stat_with_if_unmodified_since.
override_content_type: Option<String>Specify the content-type header that should be sent back by the operation.
This option is only meaningful when used along with presign.
override_cache_control: Option<String>Specify the cache-control header that should be sent back by the operation.
This option is only meaningful when used along with presign.
override_content_disposition: Option<String>Specify the content-disposition header that should be sent back by the operation.
This option is only meaningful when used along with presign.
Trait Implementations§
Source§impl Clone for StatOptions
impl Clone for StatOptions
Source§fn clone(&self) -> StatOptions
fn clone(&self) -> StatOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StatOptions
impl Debug for StatOptions
Source§impl Default for StatOptions
impl Default for StatOptions
Source§fn default() -> StatOptions
fn default() -> StatOptions
impl Eq for StatOptions
Source§impl From<StatOptions> for OpStat
impl From<StatOptions> for OpStat
Source§fn from(value: StatOptions) -> Self
fn from(value: StatOptions) -> Self
Source§impl PartialEq for StatOptions
impl PartialEq for StatOptions
impl StructuralPartialEq for StatOptions
Auto Trait Implementations§
impl Freeze for StatOptions
impl RefUnwindSafe for StatOptions
impl Send for StatOptions
impl Sync for StatOptions
impl Unpin for StatOptions
impl UnsafeUnpin for StatOptions
impl UnwindSafe for StatOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.