Skip to main content

UserEvent

Trait UserEvent 

Source
pub trait UserEvent: Sized {
    type Addr: Address;
    type Message;

    // Required methods
    fn user(from: Self::Addr, message: Self::Message) -> Self;
    fn into_user(self) -> Result<User<Self::Addr, Self::Message>, Self>;
}
Expand description

Construction/extraction of the user lane through a composed event type.

Required Associated Types§

Required Methods§

Source

fn user(from: Self::Addr, message: Self::Message) -> Self

Source

fn into_user(self) -> Result<User<Self::Addr, Self::Message>, Self>

§Errors

Returns the unchanged event when it belongs to another composed lane.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§