Enum perseus::state::PageThawPrefs
source · [−]Expand description
The user’s preferences on page state thawing. Templates have three places they can fetch state from: the page state store (called active state), the frozen state, and the server. They’re typically prioritized in that order, but if thawing occurs later in an app, it may be desirable to override active state in favor of frozen state. These preferences allow setting an inclusion or exclusion list.
Variants
Include(Vec<String>)
Include the attached pages by their URLs (with no leading /
). Pages listed here will prioritize frozen state over active state, allowing thawing to override the current state of the app.
IncludeAll
Includes all pages in the app, making frozen state always override state that’s already been initialized.
Exclude(Vec<String>)
Exludes the attached pages by their URLs (with no leading /
). Pages listed here will prioritize active state over frozen state as usual, and any pages not listed here will prioritize
frozen state. Exclude(Vec::new())
is equivalent to IncludeAll
.
Implementations
sourceimpl PageThawPrefs
impl PageThawPrefs
sourcepub fn should_use_frozen_state(&self, url: &str) -> bool
pub fn should_use_frozen_state(&self, url: &str) -> bool
Checks whether or not the given URl should prioritize frozen state over active state.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PageThawPrefs
impl Send for PageThawPrefs
impl Sync for PageThawPrefs
impl Unpin for PageThawPrefs
impl UnwindSafe for PageThawPrefs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more