pub struct CacheValidators {
pub etag: Option<String>,
pub last_modified: Option<String>,
}Expand description
Origin-supplied validators for one stored URL/representation. Keep these with the body:
a 304 has no replacement body. ETags are opaque, including quotes and the W/ prefix.
Fields§
§etag: Option<String>§last_modified: Option<String>Implementations§
Source§impl CacheValidators
impl CacheValidators
pub fn is_empty(&self) -> bool
Sourcepub fn updated(&self, response: &Response) -> Self
pub fn updated(&self, response: &Response) -> Self
Learn validators after successfully storing a 2xx representation, or merge those on a 304 with the existing ones. Other statuses leave the cached validators unchanged. A new 2xx without validators clears old ones; they described the previous body.
Trait Implementations§
Source§impl Clone for CacheValidators
impl Clone for CacheValidators
Source§impl Debug for CacheValidators
impl Debug for CacheValidators
Source§impl Default for CacheValidators
impl Default for CacheValidators
impl Eq for CacheValidators
Source§impl PartialEq for CacheValidators
impl PartialEq for CacheValidators
impl StructuralPartialEq for CacheValidators
Auto Trait Implementations§
impl Forget for CacheValidators
impl Freeze for CacheValidators
impl Move for CacheValidators
impl RefUnwindSafe for CacheValidators
impl Send for CacheValidators
impl Sync for CacheValidators
impl Unpin for CacheValidators
impl UnsafeUnpin for CacheValidators
impl UnwindSafe for CacheValidators
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