#[non_exhaustive]pub struct CacheEntryMeta {
pub version: u32,
pub key: String,
pub request_url: String,
pub status: u16,
pub stored_at: u64,
pub validated_at: u64,
pub decoded: bool,
pub headers: Vec<(String, String)>,
pub body_len: u64,
pub body_sha256: String,
}Expand description
Metadata of one stored response.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: u32Layout version, CACHE_FORMAT_VERSION.
key: StringThe entry’s cache key; must equal the key it is looked up under.
request_url: StringThe request URL without query or fragment. For display only.
status: u16HTTP status of the stored response.
stored_at: u64When the body was first stored (Unix seconds).
validated_at: u64When the body was last confirmed current (Unix seconds).
decoded: boolWhether the body is already free of HTTP content coding.
headers: Vec<(String, String)>Allow-listed response headers.
body_len: u64Body length in bytes (set by the encoder).
body_sha256: StringLowercase hex SHA-256 of the body (set by the encoder).
Implementations§
Trait Implementations§
Source§impl Clone for CacheEntryMeta
impl Clone for CacheEntryMeta
Source§impl Debug for CacheEntryMeta
impl Debug for CacheEntryMeta
Source§impl<'de> Deserialize<'de> for CacheEntryMeta
impl<'de> Deserialize<'de> for CacheEntryMeta
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
impl Eq for CacheEntryMeta
Source§impl PartialEq for CacheEntryMeta
impl PartialEq for CacheEntryMeta
Source§impl Serialize for CacheEntryMeta
impl Serialize for CacheEntryMeta
impl StructuralPartialEq for CacheEntryMeta
Auto Trait Implementations§
impl Forget for CacheEntryMeta
impl Freeze for CacheEntryMeta
impl Move for CacheEntryMeta
impl RefUnwindSafe for CacheEntryMeta
impl Send for CacheEntryMeta
impl Sync for CacheEntryMeta
impl Unpin for CacheEntryMeta
impl UnsafeUnpin for CacheEntryMeta
impl UnwindSafe for CacheEntryMeta
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