pub enum MessageResult<Action> {
Action(Action),
RequestRebuild,
Nop,
Stale,
}Expand description
The possible outcomes from a View::message
Variants§
Action(Action)
An action for a parent message handler to use
This allows for sub-sections of your app to use an elm-like architecture
RequestRebuild
A view has requested a rebuild, even though its value hasn’t changed.
This can happen for example by some kind of async action. An example would be an async virtualized list, which fetches new entries, and requires a rebuild for the new entries.
Nop
This event had no impact on the app state, or the impact it did have does not require the element tree to be recreated.
Stale
The view this message was being routed to no longer exists.
Implementations§
Source§impl<A> MessageResult<A>
impl<A> MessageResult<A>
Sourcepub fn map<B>(self, f: impl FnOnce(A) -> B) -> MessageResult<B>
pub fn map<B>(self, f: impl FnOnce(A) -> B) -> MessageResult<B>
Maps the action type A to B, i.e. MessageResult<A> to MessageResult<B>
Trait Implementations§
Source§impl<Action: Debug> Debug for MessageResult<Action>
impl<Action: Debug> Debug for MessageResult<Action>
Source§impl<Action> Default for MessageResult<Action>
impl<Action> Default for MessageResult<Action>
Source§fn default() -> MessageResult<Action>
fn default() -> MessageResult<Action>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<Action> Freeze for MessageResult<Action>where
Action: Freeze,
impl<Action> RefUnwindSafe for MessageResult<Action>where
Action: RefUnwindSafe,
impl<Action> Send for MessageResult<Action>where
Action: Send,
impl<Action> Sync for MessageResult<Action>where
Action: Sync,
impl<Action> Unpin for MessageResult<Action>where
Action: Unpin,
impl<Action> UnwindSafe for MessageResult<Action>where
Action: UnwindSafe,
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