pub struct MethodTable { /* private fields */ }Expand description
A JSON-RPC surface: every method a program declared, keyed by the name it answers to.
Implementations§
Source§impl MethodTable
impl MethodTable
Source§impl MethodTable
impl MethodTable
Sourcepub fn names(&self) -> Vec<&'static str>
pub fn names(&self) -> Vec<&'static str>
Returns every method name this surface answers to, in lexical order.
Sourcepub fn merge(self, other: Self) -> Result<Self, DuplicateMethod>
pub fn merge(self, other: Self) -> Result<Self, DuplicateMethod>
Composes two surfaces, which is only defined when they name different methods.
§Errors
Answers with the duplicated name when both surfaces declare it.
Trait Implementations§
Source§impl Clone for MethodTable
impl Clone for MethodTable
Source§fn clone(&self) -> MethodTable
fn clone(&self) -> MethodTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MethodTable
impl Debug for MethodTable
Source§impl Default for MethodTable
impl Default for MethodTable
Source§fn default() -> MethodTable
fn default() -> MethodTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for MethodTable
impl !UnwindSafe for MethodTable
impl Freeze for MethodTable
impl Send for MethodTable
impl Sync for MethodTable
impl Unpin for MethodTable
impl UnsafeUnpin for MethodTable
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§impl<This> JsonRpcProgramExt<This> for This
impl<This> JsonRpcProgramExt<This> for This
Source§fn compile_jsonrpc<Program>(
&self,
program: Program,
) -> <Program as JsonRpcProgramAlg<This>>::Methodswhere
Program: JsonRpcProgramAlg<This>,
fn compile_jsonrpc<Program>(
&self,
program: Program,
) -> <Program as JsonRpcProgramAlg<This>>::Methodswhere
Program: JsonRpcProgramAlg<This>,
Compiles a named JSON-RPC program with this interpreter.