pub struct NotificationHandler<Role: JrRole, End: JrEndpoint, Notif: JrNotification = UntypedMessage, F = ()> { /* private fields */ }Expand description
Handler for typed notification messages
Implementations§
Source§impl<Role: JrRole, End: JrEndpoint, Notif: JrNotification, F> NotificationHandler<Role, End, Notif, F>
impl<Role: JrRole, End: JrEndpoint, Notif: JrNotification, F> NotificationHandler<Role, End, Notif, F>
Trait Implementations§
Source§impl<Role, End: JrEndpoint, Notif, F, T> JrMessageHandler for NotificationHandler<Role, End, Notif, F>where
Role: HasEndpoint<End> + JrRole,
Notif: JrNotification,
F: AsyncFnMut(Notif, JrConnectionCx<Role>) -> Result<T, Error>,
T: IntoHandled<(Notif, JrConnectionCx<Role>)>,
impl<Role, End: JrEndpoint, Notif, F, T> JrMessageHandler for NotificationHandler<Role, End, Notif, F>where
Role: HasEndpoint<End> + JrRole,
Notif: JrNotification,
F: AsyncFnMut(Notif, JrConnectionCx<Role>) -> Result<T, Error>,
T: IntoHandled<(Notif, JrConnectionCx<Role>)>,
Source§fn describe_chain(&self) -> impl Debug
fn describe_chain(&self) -> impl Debug
Returns a debug description of the handler chain for diagnostics
Source§async fn handle_message(
&mut self,
message_cx: MessageCx,
connection_cx: JrConnectionCx<Role>,
) -> Result<Handled<MessageCx>, Error>
async fn handle_message( &mut self, message_cx: MessageCx, connection_cx: JrConnectionCx<Role>, ) -> Result<Handled<MessageCx>, Error>
Attempt to claim an incoming message (request or notification). Read more
Auto Trait Implementations§
impl<Role, End, Notif, F> Freeze for NotificationHandler<Role, End, Notif, F>
impl<Role, End, Notif, F> RefUnwindSafe for NotificationHandler<Role, End, Notif, F>where
F: RefUnwindSafe,
Role: RefUnwindSafe,
impl<Role, End, Notif, F> Send for NotificationHandler<Role, End, Notif, F>where
F: Send,
impl<Role, End, Notif, F> Sync for NotificationHandler<Role, End, Notif, F>where
F: Sync,
impl<Role, End, Notif, F> Unpin for NotificationHandler<Role, End, Notif, F>
impl<Role, End, Notif, F> UnwindSafe for NotificationHandler<Role, End, Notif, F>where
F: UnwindSafe,
Role: UnwindSafe,
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