pub struct DefMessageHandler;Implementations§
Trait Implementations§
Source§impl Default for DefMessageHandler
impl Default for DefMessageHandler
Source§fn default() -> DefMessageHandler
fn default() -> DefMessageHandler
Returns the “default value” for a type. Read more
Source§impl MessageHandler for DefMessageHandler
impl MessageHandler for DefMessageHandler
Source§fn on_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
处理消息
Source§fn on_custom_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_custom_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
处理自定义消息
Source§fn on_notice_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_notice_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
处理通知消息
Source§fn on_response<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 Response,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_response<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 Response,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
处理响应
Source§fn on_ack_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_ack_message<'life0, 'async_trait>(
&'life0 self,
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
处理服务端的ack
Source§fn on_data<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_data<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
处理数据消息
Source§fn supported_commands(&self) -> Vec<Command>
fn supported_commands(&self) -> Vec<Command>
获取支持的命令列表
Source§fn supports_command(&self, command: Command) -> bool
fn supports_command(&self, command: Command) -> bool
检查是否支持某个命令
Auto Trait Implementations§
impl Freeze for DefMessageHandler
impl RefUnwindSafe for DefMessageHandler
impl Send for DefMessageHandler
impl Sync for DefMessageHandler
impl Unpin for DefMessageHandler
impl UnwindSafe for DefMessageHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more