Struct jsonrpsee_core::server::rpc_module::MethodCallback   
source · pub struct MethodCallback { /* private fields */ }Expand description
Method callback wrapper that contains a sync or async closure, plus a table with resources it needs to claim to run
Implementations§
source§impl MethodCallback
 
impl MethodCallback
sourcepub fn claim(
    &self,
    name: &str,
    resources: &Resources
) -> Result<ResourceGuard, Error>
 
pub fn claim(
    &self,
    name: &str,
    resources: &Resources
) -> Result<ResourceGuard, Error>
Attempt to claim resources prior to executing a method. On success returns a guard that releases claimed resources when dropped.
sourcepub fn inner(&self) -> &MethodKind
 
pub fn inner(&self) -> &MethodKind
Get handle to the callback.
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 more