Skip to content

Commit a35d1ee

Browse files
committed
fix(sacp): add missing HasDefaultEndpoint bounds to handler methods
on_receive_request, on_receive_notification, and on_receive_message were missing the HasDefaultEndpoint where-clause that the _from variants have. This ensures consistent trait bounds across all handler registration methods.
1 parent 87e8139 commit a35d1ee

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/sacp/src/jsonrpc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ impl<H: JrMessageHandler> JrConnectionBuilder<H> {
673673
>,
674674
>
675675
where
676+
H::Role: HasDefaultEndpoint,
676677
H::Role: HasEndpoint<<H::Role as JrRole>::HandlerEndpoint>,
677678
Req: JrRequest,
678679
Notif: JrNotification,
@@ -731,6 +732,7 @@ impl<H: JrMessageHandler> JrConnectionBuilder<H> {
731732
ChainedHandler<H, RequestHandler<H::Role, <H::Role as JrRole>::HandlerEndpoint, Req, F>>,
732733
>
733734
where
735+
H::Role: HasDefaultEndpoint,
734736
H::Role: HasEndpoint<<H::Role as JrRole>::HandlerEndpoint>,
735737
F: AsyncFnMut(
736738
Req,
@@ -793,6 +795,7 @@ impl<H: JrMessageHandler> JrConnectionBuilder<H> {
793795
>,
794796
>
795797
where
798+
H::Role: HasDefaultEndpoint,
796799
H::Role: HasEndpoint<<H::Role as JrRole>::HandlerEndpoint>,
797800
Notif: JrNotification,
798801
F: AsyncFnMut(Notif, JrConnectionCx<H::Role>) -> Result<T, crate::Error> + Send,

0 commit comments

Comments
 (0)