pub struct CacheContext<'a> {
pub method: &'a str,
pub path: &'a str,
pub query_string: &'a str,
pub headers: &'a HeaderMap,
pub body: &'a Value,
}
Expand description
Context containing request information for cache operations.
This struct contains information about the current request that can be used for:
- Making caching decisions through predicate functions
- Generating custom cache keys
Fields§
§method: &'a str
The HTTP method of the request (e.g., “GET”, “POST”)
path: &'a str
The request path
query_string: &'a str
The query string from the request URL
headers: &'a HeaderMap
HTTP headers from the request
body: &'a Value
The request body as a byte slice
Auto Trait Implementations§
impl<'a> Freeze for CacheContext<'a>
impl<'a> RefUnwindSafe for CacheContext<'a>
impl<'a> Send for CacheContext<'a>
impl<'a> Sync for CacheContext<'a>
impl<'a> Unpin for CacheContext<'a>
impl<'a> UnwindSafe for CacheContext<'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