Enum jsonrpsee_core::server::MethodCallback
source · pub enum MethodCallback {
Sync(SyncMethod),
Async(AsyncMethod<'static>),
Subscription(SubscriptionMethod<'static>),
Unsubscription(Arc<dyn Send + Sync + Fn(Id<'_>, Params<'_>, ConnectionId, MaxResponseSize, Extensions) -> MethodResponse>),
}
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, Extensions) -> MethodResponse>)
Unsubscription method handler.
Trait Implementations§
source§impl Clone for MethodCallback
impl Clone for MethodCallback
source§fn clone(&self) -> MethodCallback
fn clone(&self) -> MethodCallback
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 Freeze for MethodCallback
impl !RefUnwindSafe for MethodCallback
impl Send for MethodCallback
impl Sync for MethodCallback
impl Unpin for MethodCallback
impl !UnwindSafe for MethodCallback
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)