Skip to main content

prefetch_route_data

Function prefetch_route_data 

Source
pub fn prefetch_route_data<S, T, F, Fut>(source: S, fetcher: F)
where S: PartialEq + Clone + Send + 'static, F: Fn(S) -> Fut + 'static, Fut: Future<Output = PageJson<T>> + Send + 'static,
Expand description

悬停预取一份路由数据:键与 route_data 相同(fetcher 的类型 + source)。 之后导航到该页时 route_data 直接复用结果。只用于不依赖会话的公开数据。