#[non_exhaustive]pub struct Preconditions {
pub if_match: Vec<EtagMatcher>,
pub if_none_match: Vec<EtagMatcher>,
}Expand description
Protocol-neutral write preconditions.
Use Preconditions::none to skip all checks. Multiple matchers within a
list are OR’d; the two lists are AND’d.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.if_match: Vec<EtagMatcher>If-Match-style matchers. The write proceeds only if any matcher
matches the current ETag.
if_none_match: Vec<EtagMatcher>If-None-Match-style matchers. The write proceeds only if no
matcher matches the current ETag.
Implementations§
Source§impl Preconditions
impl Preconditions
Sourcepub fn new(if_match: Vec<EtagMatcher>, if_none_match: Vec<EtagMatcher>) -> Self
pub fn new(if_match: Vec<EtagMatcher>, if_none_match: Vec<EtagMatcher>) -> Self
Builds protocol-neutral write preconditions from matcher lists.
Sourcepub fn none() -> Self
pub fn none() -> Self
Returns a Preconditions value with both lists empty (no checks).
Auto Trait Implementations§
impl Freeze for Preconditions
impl RefUnwindSafe for Preconditions
impl Send for Preconditions
impl Sync for Preconditions
impl Unpin for Preconditions
impl UnsafeUnpin for Preconditions
impl UnwindSafe for Preconditions
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
Mutably borrows from an owned value. Read more