Skip to main content

RepliableEvent

Trait RepliableEvent 

Source
pub trait RepliableEvent {
    // Required methods
    fn reply<T>(&self, msg: T)
       where Message: From<T>,
             T: Serialize;
    fn reply_and_quote<T>(&self, msg: T)
       where Message: From<T>,
             T: Serialize;
}
Expand description

满足此 trait 即可被回复

Required Methods§

Source

fn reply<T>(&self, msg: T)
where Message: From<T>, T: Serialize,

快速回复消息

Source

fn reply_and_quote<T>(&self, msg: T)
where Message: From<T>, T: Serialize,

快速回复消息并且引用

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§