pub enum EffectPayload<E> {
Emitted {
variant: EffectVariantId,
body: E,
},
}Expand description
Typed effect payload. Generic over the producer composition’s seam-effect
sum (see the codegen-emitted {Composition}Effect enum).
The variant carries the typed EffectVariantId alongside the body so
the dispatcher can look up a route without pattern-matching on the
producer’s effect enum (the ProducerEffect trait hides that under
ProducerEffect::variant_id).
Variants§
Emitted
Producer emitted a typed effect variant.
Fields
§
variant: EffectVariantIdTyped variant id (matches the producer’s effect enum tag).
§
body: EThe typed effect body.
Implementations§
Source§impl<E: ProducerEffect> EffectPayload<E>
impl<E: ProducerEffect> EffectPayload<E>
Trait Implementations§
Source§impl<E: Clone> Clone for EffectPayload<E>
impl<E: Clone> Clone for EffectPayload<E>
Source§fn clone(&self) -> EffectPayload<E>
fn clone(&self) -> EffectPayload<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: Debug> Debug for EffectPayload<E>
impl<E: Debug> Debug for EffectPayload<E>
Source§impl<E: PartialEq> PartialEq for EffectPayload<E>
impl<E: PartialEq> PartialEq for EffectPayload<E>
Source§fn eq(&self, other: &EffectPayload<E>) -> bool
fn eq(&self, other: &EffectPayload<E>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<E: Eq> Eq for EffectPayload<E>
impl<E> StructuralPartialEq for EffectPayload<E>
Auto Trait Implementations§
impl<E> Freeze for EffectPayload<E>where
E: Freeze,
impl<E> RefUnwindSafe for EffectPayload<E>where
E: RefUnwindSafe,
impl<E> Send for EffectPayload<E>where
E: Send,
impl<E> Sync for EffectPayload<E>where
E: Sync,
impl<E> Unpin for EffectPayload<E>where
E: Unpin,
impl<E> UnsafeUnpin for EffectPayload<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for EffectPayload<E>where
E: 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§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.