pub struct NNProtoRegistry { /* private fields */ }Expand description
内部协议处理器注册表
Implementations§
Source§impl NNProtoRegistry
impl NNProtoRegistry
pub fn new() -> Self
Sourcepub fn register_push_handler(
&self,
cmd_id: u16,
handler: Arc<dyn NNPushHandler>,
)
pub fn register_push_handler( &self, cmd_id: u16, handler: Arc<dyn NNPushHandler>, )
注册推送处理器
Sourcepub async fn dispatch_push(&self, cmd_id: u16, body: Bytes)
pub async fn dispatch_push(&self, cmd_id: u16, body: Bytes)
分发推送
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NNProtoRegistry
impl !RefUnwindSafe for NNProtoRegistry
impl Send for NNProtoRegistry
impl Sync for NNProtoRegistry
impl Unpin for NNProtoRegistry
impl UnsafeUnpin for NNProtoRegistry
impl !UnwindSafe for NNProtoRegistry
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