pub enum PrefetchMode {
Never,
Intent,
Viewport,
}Expand description
Controls when the browser loads a linked page before the user follows it.
Loading a page early, or prefetching, can make navigation faster. The runtime may skip it, for example if the browser is set to save data. Prefetching renders the page on the server even if the user never opens it, so rendering a page must be safe in that case.
Set the prefetch argument on link to choose when to load that page.
Otherwise, the link uses the default returned by prefetch_mode.
Variants§
Never
Loads the page only after the user follows the link.
Intent
Loads the page after the user hovers over the link briefly or as soon as the link gets focus. This is the default.
Viewport
Loads the page when the link comes into view.
Trait Implementations§
Source§impl Clone for PrefetchMode
impl Clone for PrefetchMode
impl Copy for PrefetchMode
Source§impl Debug for PrefetchMode
impl Debug for PrefetchMode
Source§impl Default for PrefetchMode
impl Default for PrefetchMode
impl Eq for PrefetchMode
Source§impl Hash for PrefetchMode
impl Hash for PrefetchMode
Source§impl PartialEq for PrefetchMode
impl PartialEq for PrefetchMode
impl StructuralPartialEq for PrefetchMode
Auto Trait Implementations§
impl Freeze for PrefetchMode
impl RefUnwindSafe for PrefetchMode
impl Send for PrefetchMode
impl Sync for PrefetchMode
impl Unpin for PrefetchMode
impl UnsafeUnpin for PrefetchMode
impl UnwindSafe for PrefetchMode
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.