pub trait IntoHandler<T>: 'static {
// Required methods
fn id(&self) -> Ustr;
fn handle(&self, message: T);
}Expand description
Compile-time type-safe message handler trait that takes ownership.
Unlike Handler<T> which borrows messages, this trait takes ownership
of messages, enabling zero-copy processing when the handler needs to store
or forward the message.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".