-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
Currently, it's not possible to override MethodCallback
in Methods
because Methods::merge
fails early if a callback with the name already exists
jsonrpsee/core/src/server/rpc_module.rs
Lines 355 to 357 in a0ce8d4
for name in other.callbacks.keys() { | |
self.verify_method_name(name)?; | |
} |
This makes it impossible to disable various callbacks dynamically when RpcModule
s (via server proc macro's into_rpc
) are merged.
now that verify_method_name
is public this could be solved by:
- support
Methods::iter
andMethods::into_iter
so callbacks can be inserted individually. - support
Methods::merge_replace
which replaces existing handlers
Metadata
Metadata
Assignees
Labels
No labels