Enum ConditionalHeader

Source
pub enum ConditionalHeader<Etag, DateTime> {
    IfNoneMatch,
    IfMatch(Etag),
    IfUnmodifiedSince(DateTime),
}
Expand description

HTTP Conditional Header

Conditional headers used in the idempotency verification.

Variants§

§

IfNoneMatch

If-None-Match

Allow the request only if the resource does not exists.

Used to avoid ID colisions creating resources.

§

IfMatch(Etag)

If-Match

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)

If-Unmodified-Since

Accept the request if the resource has not been modified after the date specified.

Trait Implementations§

Source§

impl<Etag: Debug, DateTime: Debug> Debug for ConditionalHeader<Etag, DateTime>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Etag, DateTime> Display for ConditionalHeader<Etag, DateTime>
where Etag: Display, DateTime: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Etag: PartialEq, DateTime: PartialEq> PartialEq for ConditionalHeader<Etag, DateTime>

Source§

fn eq(&self, other: &ConditionalHeader<Etag, DateTime>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Etag: Eq, DateTime: Eq> Eq for ConditionalHeader<Etag, DateTime>

Source§

impl<Etag, DateTime> StructuralPartialEq for ConditionalHeader<Etag, DateTime>

Auto Trait Implementations§

§

impl<Etag, DateTime> Freeze for ConditionalHeader<Etag, DateTime>
where Etag: Freeze, DateTime: Freeze,

§

impl<Etag, DateTime> RefUnwindSafe for ConditionalHeader<Etag, DateTime>
where Etag: RefUnwindSafe, DateTime: RefUnwindSafe,

§

impl<Etag, DateTime> Send for ConditionalHeader<Etag, DateTime>
where Etag: Send, DateTime: Send,

§

impl<Etag, DateTime> Sync for ConditionalHeader<Etag, DateTime>
where Etag: Sync, DateTime: Sync,

§

impl<Etag, DateTime> Unpin for ConditionalHeader<Etag, DateTime>
where Etag: Unpin, DateTime: Unpin,

§

impl<Etag, DateTime> UnwindSafe for ConditionalHeader<Etag, DateTime>
where Etag: UnwindSafe, DateTime: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.