Skip to main content

ComposedEvent

Trait ComposedEvent 

Source
pub trait ComposedEvent: UserEvent {
    type Inner: UserEvent<Addr = Self::Addr, Message = Self::Message>;

    // Required method
    fn from_inner(event: Self::Inner) -> Self;
}
Expand description

A complete event algebra formed by adding owned inputs around an inner behavior event algebra.

from_inner is the structure-preserving injection used by effect composition. A single owned lane uses EventLayer; a domain with several genuinely coexisting owned inputs may use a named exhaustive sum.

Required Associated Types§

Source

type Inner: UserEvent<Addr = Self::Addr, Message = Self::Message>

Required Methods§

Source

fn from_inner(event: Self::Inner) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Owned, Inner> ComposedEvent for EventLayer<Owned, Inner>
where Inner: UserEvent,

Source§

type Inner = Inner