pub struct AccessControlMaxAge(_);
Expand description
Access-Control-Max-Age
header, part of
CORS
The Access-Control-Max-Age
header indicates how long the results of a
preflight request can be cached in a preflight result cache.
ABNF
Access-Control-Max-Age = \"Access-Control-Max-Age\" \":\" delta-seconds
Example values
531
Examples
use std::time::Duration;
use headers::AccessControlMaxAge;
let max_age = AccessControlMaxAge::from(Duration::from_secs(531));
Trait Implementations
sourceimpl Clone for AccessControlMaxAge
impl Clone for AccessControlMaxAge
sourcefn clone(&self) -> AccessControlMaxAge
fn clone(&self) -> AccessControlMaxAge
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AccessControlMaxAge
impl Debug for AccessControlMaxAge
sourceimpl From<Duration> for AccessControlMaxAge
impl From<Duration> for AccessControlMaxAge
sourcefn from(dur: Duration) -> AccessControlMaxAge
fn from(dur: Duration) -> AccessControlMaxAge
Converts to this type from the input type.
sourceimpl Hash for AccessControlMaxAge
impl Hash for AccessControlMaxAge
sourceimpl Header for AccessControlMaxAge
impl Header for AccessControlMaxAge
sourcefn name() -> &'static HeaderName
fn name() -> &'static HeaderName
The name of this header.
sourcefn decode<'i, I>(values: &mut I) -> Result<AccessControlMaxAge, Error>where
I: Iterator<Item = &'i HeaderValue>,
fn decode<'i, I>(values: &mut I) -> Result<AccessControlMaxAge, Error>where
I: Iterator<Item = &'i HeaderValue>,
Decode this type from an iterator of
HeaderValue
s.sourceimpl Ord for AccessControlMaxAge
impl Ord for AccessControlMaxAge
sourcefn cmp(&self, other: &AccessControlMaxAge) -> Ordering
fn cmp(&self, other: &AccessControlMaxAge) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<AccessControlMaxAge> for AccessControlMaxAge
impl PartialEq<AccessControlMaxAge> for AccessControlMaxAge
sourcefn eq(&self, other: &AccessControlMaxAge) -> bool
fn eq(&self, other: &AccessControlMaxAge) -> bool
sourceimpl PartialOrd<AccessControlMaxAge> for AccessControlMaxAge
impl PartialOrd<AccessControlMaxAge> for AccessControlMaxAge
sourcefn partial_cmp(&self, other: &AccessControlMaxAge) -> Option<Ordering>
fn partial_cmp(&self, other: &AccessControlMaxAge) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for AccessControlMaxAge
impl StructuralEq for AccessControlMaxAge
impl StructuralPartialEq for AccessControlMaxAge
Auto Trait Implementations
impl RefUnwindSafe for AccessControlMaxAge
impl Send for AccessControlMaxAge
impl Sync for AccessControlMaxAge
impl Unpin for AccessControlMaxAge
impl UnwindSafe for AccessControlMaxAge
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.