pub enum ConditionalHeader<Etag, DateTime> {
IfNoneMatch,
IfMatch(Etag),
IfUnmodifiedSince(DateTime),
}
Expand description
HTTP Conditional Header
Conditional headers used in the idempotency verification.
Variants§
IfNoneMatch
Allow the request only if the resource does not exists.
Used to avoid ID colisions creating resources.
IfMatch(Etag)
This header will allow the request to proceed only if the resource match with the specified Etag.
Used in resource updates to avoid the lost update problem.
IfUnmodifiedSince(DateTime)
Accept the request if the resource has not been modified after the date specified.
Trait Implementations§
Source§impl<Etag, DateTime> Display for ConditionalHeader<Etag, DateTime>
impl<Etag, DateTime> Display for ConditionalHeader<Etag, DateTime>
Source§impl<Etag: PartialEq, DateTime: PartialEq> PartialEq for ConditionalHeader<Etag, DateTime>
impl<Etag: PartialEq, DateTime: PartialEq> PartialEq for ConditionalHeader<Etag, DateTime>
Source§fn eq(&self, other: &ConditionalHeader<Etag, DateTime>) -> bool
fn eq(&self, other: &ConditionalHeader<Etag, DateTime>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<Etag: Eq, DateTime: Eq> Eq for ConditionalHeader<Etag, DateTime>
impl<Etag, DateTime> StructuralPartialEq for ConditionalHeader<Etag, DateTime>
Auto Trait Implementations§
impl<Etag, DateTime> Freeze for ConditionalHeader<Etag, DateTime>
impl<Etag, DateTime> RefUnwindSafe for ConditionalHeader<Etag, DateTime>where
Etag: RefUnwindSafe,
DateTime: RefUnwindSafe,
impl<Etag, DateTime> Send for ConditionalHeader<Etag, DateTime>
impl<Etag, DateTime> Sync for ConditionalHeader<Etag, DateTime>
impl<Etag, DateTime> Unpin for ConditionalHeader<Etag, DateTime>
impl<Etag, DateTime> UnwindSafe for ConditionalHeader<Etag, DateTime>where
Etag: UnwindSafe,
DateTime: UnwindSafe,
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