pub trait Execute: Send + 'static {
// Required method
fn execute(self: Box<Self>) -> BoxedMessageStream;
// Provided methods
fn execute_with_epoch(self: Box<Self>, _epoch: u64) -> BoxedMessageStream { ... }
fn boxed(self) -> Box<dyn Execute>
where Self: Sized + Send + 'static { ... }
}Expand description
Execute describes the methods an executor should implement to handle control messages.
Required Methods§
fn execute(self: Box<Self>) -> BoxedMessageStream
Provided Methods§
fn execute_with_epoch(self: Box<Self>, _epoch: u64) -> BoxedMessageStream
fn boxed(self) -> Box<dyn Execute>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".