pub struct CacheDecisionContext<'a> {
pub method: &'a str,
pub path: &'a str,
pub query_string: &'a str,
pub headers: &'a HeaderMap,
pub body: &'a [u8],
}Expand description
Context used to determine if a request/response should be cached.
This struct contains information about the current request that can be examined by cache predicate functions to make caching decisions.
Fields§
§method: &'a strThe HTTP method of the request (e.g., “GET”, “POST”)
path: &'a strThe request path
query_string: &'a strThe query string from the request URL
headers: &'a HeaderMapHTTP headers from the request
body: &'a [u8]The request body as a byte slice
Auto Trait Implementations§
impl<'a> Freeze for CacheDecisionContext<'a>
impl<'a> RefUnwindSafe for CacheDecisionContext<'a>
impl<'a> Send for CacheDecisionContext<'a>
impl<'a> Sync for CacheDecisionContext<'a>
impl<'a> Unpin for CacheDecisionContext<'a>
impl<'a> UnwindSafe for CacheDecisionContext<'a>
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