pub struct PresentationReduction {
pub state: PresentationState,
pub generation: PresentationGeneration,
pub generation_changed: bool,
}Expand description
Result of one pure lifecycle reduction.
generation_changed is true only for successful attachment and always equals
generation != the reducer’s input generation.
§Examples
use ailloli_ui_runtime::app::{reduce_presentation, PresentationEvent, PresentationGeneration, PresentationState};
let reduced = reduce_presentation(PresentationState::Declared, PresentationGeneration::INITIAL, PresentationEvent::AllowCreation)?;
assert_eq!(reduced.state, PresentationState::CreationAllowed);
assert!(!reduced.generation_changed);Fields§
§state: PresentationStateState after applying the event.
generation: PresentationGenerationGeneration after applying the event.
generation_changed: boolWhether generation advanced during this reduction.
Trait Implementations§
Source§impl Clone for PresentationReduction
impl Clone for PresentationReduction
Source§fn clone(&self) -> PresentationReduction
fn clone(&self) -> PresentationReduction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PresentationReduction
impl Debug for PresentationReduction
Source§impl PartialEq for PresentationReduction
impl PartialEq for PresentationReduction
impl Copy for PresentationReduction
impl Eq for PresentationReduction
impl StructuralPartialEq for PresentationReduction
Auto Trait Implementations§
impl Freeze for PresentationReduction
impl RefUnwindSafe for PresentationReduction
impl Send for PresentationReduction
impl Sync for PresentationReduction
impl Unpin for PresentationReduction
impl UnwindSafe for PresentationReduction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.