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§
Sourcefn get_request(&self) -> &Req
fn get_request(&self) -> &Req
Request that triggered the event.
Sourcefn get_success(&self) -> &Option<S>
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.