pub struct JsonRpcProgram<Program>(/* private fields */);Expand description
Carries a typed JSON-RPC program during fluent composition.
Implementations§
Source§impl<Program> JsonRpcProgram<Program>
impl<Program> JsonRpcProgram<Program>
Sourcepub fn merge<Other>(
self,
other: JsonRpcProgram<Other>,
) -> JsonRpcProgram<Merge<Program, Other>>
pub fn merge<Other>( self, other: JsonRpcProgram<Other>, ) -> JsonRpcProgram<Merge<Program, Other>>
Records the composition of two typed JSON-RPC programs.
Sourcepub fn method<Handler, Params>(
self,
name: &'static str,
operation: Operation<Handler, Params>,
) -> JsonRpcProgram<Merge<Program, Method<Handler, Params>>>
pub fn method<Handler, Params>( self, name: &'static str, operation: Operation<Handler, Params>, ) -> JsonRpcProgram<Merge<Program, Method<Handler, Params>>>
Registers a typed operation under a JSON-RPC method name.
Sourcepub fn into_program(self) -> Program
pub fn into_program(self) -> Program
Removes the fluent wrapper and returns the first-order syntax tree.
Trait Implementations§
Auto Trait Implementations§
impl<Program> Freeze for JsonRpcProgram<Program>where
Program: Freeze,
impl<Program> RefUnwindSafe for JsonRpcProgram<Program>where
Program: RefUnwindSafe,
impl<Program> Send for JsonRpcProgram<Program>where
Program: Send,
impl<Program> Sync for JsonRpcProgram<Program>where
Program: Sync,
impl<Program> Unpin for JsonRpcProgram<Program>where
Program: Unpin,
impl<Program> UnsafeUnpin for JsonRpcProgram<Program>where
Program: UnsafeUnpin,
impl<Program> UnwindSafe for JsonRpcProgram<Program>where
Program: UnwindSafe,
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<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.