Skip to main content

prefetch_mode

Function prefetch_mode 

Source
pub fn prefetch_mode(cx: &Cx) -> PrefetchMode
Expand description

Returns the default prefetch mode for links in this context.

Checks these sources in order and uses the first value it finds:

  1. A PrefetchMode in the request context.
  2. A PrefetchMode in the app context.
  3. PrefetchMode::Intent.

Set the default for the app with RouterBuilderRuntimeExt::prefetch, or use Cx::with to set a PrefetchMode for links rendered in a particular scope.