pub struct EffectResult {
pub event: PipelineEvent,
pub ui_events: Vec<UIEvent>,
}Expand description
Result of executing an effect.
Contains both the PipelineEvent (for reducer) and optional UIEvents (for display). This separation keeps UI concerns out of the reducer while allowing handlers to emit rich feedback during execution.
Fields§
§event: PipelineEventEvent for reducer (affects state).
ui_events: Vec<UIEvent>UI events for display (do not affect state).
Implementations§
Source§impl EffectResult
impl EffectResult
Sourcepub fn event(event: PipelineEvent) -> Self
pub fn event(event: PipelineEvent) -> Self
Create result with just a pipeline event (no UI events).
Sourcepub fn with_ui(event: PipelineEvent, ui_events: Vec<UIEvent>) -> Self
pub fn with_ui(event: PipelineEvent, ui_events: Vec<UIEvent>) -> Self
Create result with pipeline event and UI events.
Sourcepub fn with_ui_event(self, ui_event: UIEvent) -> Self
pub fn with_ui_event(self, ui_event: UIEvent) -> Self
Add a UI event to the result.
Trait Implementations§
Source§impl Clone for EffectResult
impl Clone for EffectResult
Source§fn clone(&self) -> EffectResult
fn clone(&self) -> EffectResult
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 Freeze for EffectResult
impl RefUnwindSafe for EffectResult
impl Send for EffectResult
impl Sync for EffectResult
impl Unpin for EffectResult
impl UnwindSafe for EffectResult
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> 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