pub struct HandlerResponse<A> {
pub actions: Vec<A>,
pub consumed: bool,
pub needs_render: bool,
}Expand description
Response returned by an event handler.
Fields§
§actions: Vec<A>§consumed: bool§needs_render: boolImplementations§
Source§impl<A> HandlerResponse<A>
impl<A> HandlerResponse<A>
pub fn ignored() -> HandlerResponse<A>
pub fn action(action: A) -> HandlerResponse<A>
Sourcepub fn actions<I>(actions: I) -> HandlerResponse<A>where
I: IntoIterator<Item = A>,
pub fn actions<I>(actions: I) -> HandlerResponse<A>where
I: IntoIterator<Item = A>,
Multiple actions, event consumed.
Sourcepub fn actions_passthrough<I>(actions: I) -> HandlerResponse<A>where
I: IntoIterator<Item = A>,
pub fn actions_passthrough<I>(actions: I) -> HandlerResponse<A>where
I: IntoIterator<Item = A>,
Multiple actions, event NOT consumed (passthrough to other handlers).
pub fn with_render(self) -> HandlerResponse<A>
pub fn with_consumed(self, consumed: bool) -> HandlerResponse<A>
Trait Implementations§
Source§impl<A> Clone for HandlerResponse<A>where
A: Clone,
impl<A> Clone for HandlerResponse<A>where
A: Clone,
Source§fn clone(&self) -> HandlerResponse<A>
fn clone(&self) -> HandlerResponse<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 moreAuto Trait Implementations§
impl<A> Freeze for HandlerResponse<A>
impl<A> RefUnwindSafe for HandlerResponse<A>where
A: RefUnwindSafe,
impl<A> Send for HandlerResponse<A>where
A: Send,
impl<A> Sync for HandlerResponse<A>where
A: Sync,
impl<A> Unpin for HandlerResponse<A>where
A: Unpin,
impl<A> UnsafeUnpin for HandlerResponse<A>
impl<A> UnwindSafe for HandlerResponse<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<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