Enum jsonrpsee_core::server::rpc_module::MethodKind
source · pub enum MethodKind {
Sync(SyncMethod),
Async(AsyncMethod<'static>),
Subscription(SubscriptionMethod<'static>),
Unsubscription(Arc<dyn Send + Sync + Fn(Id<'_>, Params<'_>, ConnectionId, MaxResponseSize) -> MethodResponse>),
}
Available on crate feature
server
only.Expand description
Callback wrapper that can be either sync or async.
Variants§
Sync(SyncMethod)
Synchronous method handler.
Async(AsyncMethod<'static>)
Asynchronous method handler.
Subscription(SubscriptionMethod<'static>)
Subscription method handler.
Unsubscription(Arc<dyn Send + Sync + Fn(Id<'_>, Params<'_>, ConnectionId, MaxResponseSize) -> MethodResponse>)
Unsubscription method handler.
Trait Implementations§
source§impl Clone for MethodKind
impl Clone for MethodKind
source§fn clone(&self) -> MethodKind
fn clone(&self) -> MethodKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MethodKind
impl Send for MethodKind
impl Sync for MethodKind
impl Unpin for MethodKind
impl !UnwindSafe for MethodKind
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