pub struct KeyInputs<'a> {
pub build_id: &'a str,
pub route_pattern: &'a str,
pub params: &'a BTreeMap<String, String>,
pub query: &'a BTreeMap<String, String>,
pub vary: &'a BTreeMap<String, String>,
pub source_generations: &'a BTreeMap<String, String>,
pub user_id: Option<&'a str>,
}Expand description
The ordered inputs to the cache key. Maps are BTreeMap so iteration is
already sorted — input 3 (params), 4 (query), 5 (vary), and 6 (source
generations) all require deterministic key order.
Fields§
§build_id: &'a str- Whole-cache buster — changes every deploy.
route_pattern: &'a str- The route pattern (
/p/:id), not the resolved URL.
params: &'a BTreeMap<String, String>- Resolved param map, keys sorted.
query: &'a BTreeMap<String, String>- Query string, keys sorted.
vary: &'a BTreeMap<String, String>cache_policy.varyheader values, keyed by header name (sorted).
source_generations: &'a BTreeMap<String, String>source_name → generationfor every source insource_reads.
user_id: Option<&'a str>user.id(or"_anon") —Someonly when the routerequiresuser.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for KeyInputs<'a>
impl<'a> RefUnwindSafe for KeyInputs<'a>
impl<'a> Send for KeyInputs<'a>
impl<'a> Sync for KeyInputs<'a>
impl<'a> Unpin for KeyInputs<'a>
impl<'a> UnsafeUnpin for KeyInputs<'a>
impl<'a> UnwindSafe for KeyInputs<'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