pub struct CacheControl {
pub max_age: Option<u64>,
pub no_cache: bool,
pub no_store: bool,
pub must_revalidate: bool,
pub private: bool,
pub public: bool,
pub proxy_revalidate: bool,
pub s_maxage: Option<u64>,
}Fields§
§max_age: Option<u64>§no_cache: bool§no_store: bool§must_revalidate: bool§private: bool§public: bool§proxy_revalidate: bool§s_maxage: Option<u64>Implementations§
Source§impl CacheControl
impl CacheControl
pub fn parse(header: &str) -> Self
pub fn is_cacheable(&self) -> bool
pub fn is_fresh(&self, stored_time: SystemTime) -> bool
Trait Implementations§
Source§impl Clone for CacheControl
impl Clone for CacheControl
Source§fn clone(&self) -> CacheControl
fn clone(&self) -> CacheControl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheControl
impl Debug for CacheControl
Source§impl Default for CacheControl
impl Default for CacheControl
Source§fn default() -> CacheControl
fn default() -> CacheControl
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CacheControl
impl<'de> Deserialize<'de> for CacheControl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CacheControl
impl RefUnwindSafe for CacheControl
impl Send for CacheControl
impl Sync for CacheControl
impl Unpin for CacheControl
impl UnsafeUnpin for CacheControl
impl UnwindSafe for CacheControl
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