pub trait SystemHandler: Send + Sync {
// Provided methods
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
system_message: &'life1 MessageBody,
) -> Pin<Box<dyn Future<Output = (u16, String)> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn pre_start(&self) { ... }
fn raw_process<'life0, 'life1, 'async_trait>(
&'life0 self,
system_message: &'life1 MessageBody,
) -> Pin<Box<dyn Future<Output = AckMessage> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
系统消息处理器 trait
Provided Methods§
Sourcefn process<'life0, 'life1, 'async_trait>(
&'life0 self,
system_message: &'life1 MessageBody,
) -> Pin<Box<dyn Future<Output = (u16, String)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
system_message: &'life1 MessageBody,
) -> Pin<Box<dyn Future<Output = (u16, String)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
处理系统消息,返回 (状态码, 响应消息)
Sourcefn raw_process<'life0, 'life1, 'async_trait>(
&'life0 self,
system_message: &'life1 MessageBody,
) -> Pin<Box<dyn Future<Output = AckMessage> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_process<'life0, 'life1, 'async_trait>(
&'life0 self,
system_message: &'life1 MessageBody,
) -> Pin<Box<dyn Future<Output = AckMessage> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
内部处理方法,封装 ACK 构建逻辑