pub trait MessagePusher: Send + Sync {
// Required method
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
message: PushMessage,
) -> Pin<Box<dyn Future<Output = Result<(), SaTokenError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Message pusher trait 消息推送器 trait
Implement this trait to create custom message delivery mechanisms 实现此 trait 以创建自定义消息传递机制
Required Methods§
Sourcefn push<'life0, 'life1, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
message: PushMessage,
) -> Pin<Box<dyn Future<Output = Result<(), SaTokenError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
message: PushMessage,
) -> Pin<Box<dyn Future<Output = Result<(), SaTokenError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Push a message to a specific user 向特定用户推送消息
§Arguments | 参数
login_id- User login ID | 用户登录 IDmessage- Message to push | 要推送的消息