pub enum SpaTransition {
Fade,
Slide,
}Expand description
How spa-mode animates the swap between pages, set via
crate::Server::with_spa_transition. Both variants use the View
Transitions API when the browser supports it, and are a plain synchronous
swap (no animation) otherwise.
Variants§
Fade
The browser’s default cross-fade, with no CSS injected. This is the
default for with_spa_mode()/with_spa_root() when
with_spa_transition() isn’t called.
Slide
The outgoing page slides out to the left while the incoming page
slides in from the right — the same direction for every navigation,
including the browser Back button. mini-static injects the CSS this
needs (keyframes, and the mix-blend-mode: normal override the
browser’s default cross-fade blend mode requires to look like a clean
slide instead of a wash between the two pages) — no site CSS required.
Trait Implementations§
Source§impl Clone for SpaTransition
impl Clone for SpaTransition
Source§fn clone(&self) -> SpaTransition
fn clone(&self) -> SpaTransition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SpaTransition
Source§impl Debug for SpaTransition
impl Debug for SpaTransition
Source§impl Default for SpaTransition
impl Default for SpaTransition
Source§fn default() -> SpaTransition
fn default() -> SpaTransition
impl Eq for SpaTransition
Source§impl PartialEq for SpaTransition
impl PartialEq for SpaTransition
impl StructuralPartialEq for SpaTransition
Auto Trait Implementations§
impl Freeze for SpaTransition
impl RefUnwindSafe for SpaTransition
impl Send for SpaTransition
impl Sync for SpaTransition
impl Unpin for SpaTransition
impl UnsafeUnpin for SpaTransition
impl UnwindSafe for SpaTransition
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
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
key and return true if they are equal.