Skip to main content

IEvent

Trait IEvent 

Source
pub trait IEvent<Req: IRequest, S: ISuccess>:
    Clone
    + Debug
    + Send
    + Sync {
    // Required methods
    fn new(kind: EventKind, request: Req, success: Option<S>) -> Self;
    fn get_kind(&self) -> &EventKind;
    fn get_request(&self) -> &Req;
    fn get_success(&self) -> &Option<S>;
}
Expand description

A command lifecycle event carrying the request and optional success data.

Required Methods§

Source

fn new(kind: EventKind, request: Req, success: Option<S>) -> Self

Create a new event.

Source

fn get_kind(&self) -> &EventKind

Lifecycle stage of the event.

Source

fn get_request(&self) -> &Req

Request that triggered the event.

Source

fn get_success(&self) -> &Option<S>

Success data, if the command succeeded.

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§