pub struct EventOutcome<A> {
pub actions: Vec<A>,
pub needs_render: bool,
}Expand description
Result of mapping an event into actions plus an optional render hint.
Fields§
§actions: Vec<A>Actions to enqueue.
needs_render: boolWhether to force a re-render.
Implementations§
Source§impl<A> EventOutcome<A>
impl<A> EventOutcome<A>
Sourcepub fn needs_render() -> Self
pub fn needs_render() -> Self
No actions, but request a render.
Sourcepub fn actions<I>(actions: I) -> Selfwhere
I: IntoIterator<Item = A>,
pub fn actions<I>(actions: I) -> Selfwhere
I: IntoIterator<Item = A>,
Wrap multiple actions.
Sourcepub fn with_render(self) -> Self
pub fn with_render(self) -> Self
Mark that a render is needed.
Trait Implementations§
Source§impl<A: Clone> Clone for EventOutcome<A>
impl<A: Clone> Clone for EventOutcome<A>
Source§fn clone(&self) -> EventOutcome<A>
fn clone(&self) -> EventOutcome<A>
Returns a duplicate 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<A: Debug> Debug for EventOutcome<A>
impl<A: Debug> Debug for EventOutcome<A>
Source§impl<A> Default for EventOutcome<A>
impl<A> Default for EventOutcome<A>
Source§impl<A> From<A> for EventOutcome<A>
impl<A> From<A> for EventOutcome<A>
Source§impl<A> From<Option<A>> for EventOutcome<A>
impl<A> From<Option<A>> for EventOutcome<A>
Source§impl<A> From<Vec<A>> for EventOutcome<A>
impl<A> From<Vec<A>> for EventOutcome<A>
Source§impl<A: PartialEq> PartialEq for EventOutcome<A>
impl<A: PartialEq> PartialEq for EventOutcome<A>
impl<A: Eq> Eq for EventOutcome<A>
impl<A> StructuralPartialEq for EventOutcome<A>
Auto Trait Implementations§
impl<A> Freeze for EventOutcome<A>
impl<A> RefUnwindSafe for EventOutcome<A>where
A: RefUnwindSafe,
impl<A> Send for EventOutcome<A>where
A: Send,
impl<A> Sync for EventOutcome<A>where
A: Sync,
impl<A> Unpin for EventOutcome<A>where
A: Unpin,
impl<A> UnwindSafe for EventOutcome<A>where
A: 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
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§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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more