Skip to main content

Method

Struct Method 

Source
pub struct Method<Handler, Params = Positional> { /* private fields */ }
Expand description

Represents one named JSON-RPC method without choosing an interpreter.

Trait Implementations§

Source§

impl<Compiler, Handler, Handle> CompileJsonRpcProgram<Compiler> for Method<Handler, Positional>
where Compiler: JsonRpcApiAlg + HandlerContextAlg<Handler::Context, Handle = Handle> + JsonRpcMethodAlg<Handle, Handler::Args, Handler::Output>, Handler: OperationAlg + ApplyAlg<Handle, Handler::Args> + Send + Sync + 'static,

Source§

type Methods = <Compiler as JsonRpcAlg>::Methods

The method collection produced by Compiler.
Source§

fn compile_jsonrpc_program(self, compiler: &Compiler) -> Self::Methods

Folds the complete first-order program through compiler.
Source§

impl<Compiler, Handler, Handle> CompileJsonRpcProgram<Compiler> for Method<Handler, NamedParams>
where Compiler: JsonRpcApiAlg + HandlerContextAlg<Handler::Context, Handle = Handle> + JsonRpcMethodAlg<Handle, Handler::Args, Handler::Output>, Handler: OperationAlg + ApplyAlg<Handle, Handler::Args> + Send + Sync + 'static,

Source§

type Methods = <Compiler as JsonRpcAlg>::Methods

The method collection produced by Compiler.
Source§

fn compile_jsonrpc_program(self, compiler: &Compiler) -> Self::Methods

Folds the complete first-order program through compiler.
Source§

impl<Compiler, Handler, Handle> CompileJsonRpcProgram<Compiler> for Method<Handler, FalliblePositional>
where Compiler: JsonRpcApiAlg + HandlerContextAlg<Handler::Context, Handle = Handle> + JsonRpcFallibleAlg<Handle, Handler::Args, Handler::Output>, Handler: OperationAlg + ApplyAlg<Handle, Handler::Args> + Send + Sync + 'static,

Source§

type Methods = <Compiler as JsonRpcAlg>::Methods

The method collection produced by Compiler.
Source§

fn compile_jsonrpc_program(self, compiler: &Compiler) -> Self::Methods

Folds the complete first-order program through compiler.
Source§

impl<Compiler, Handler, Handle> CompileJsonRpcProgram<Compiler> for Method<Handler, FallibleNamed>
where Compiler: JsonRpcApiAlg + HandlerContextAlg<Handler::Context, Handle = Handle> + JsonRpcFallibleAlg<Handle, Handler::Args, Handler::Output>, Handler: OperationAlg + ApplyAlg<Handle, Handler::Args> + Send + Sync + 'static,

Source§

type Methods = <Compiler as JsonRpcAlg>::Methods

The method collection produced by Compiler.
Source§

fn compile_jsonrpc_program(self, compiler: &Compiler) -> Self::Methods

Folds the complete first-order program through compiler.
Source§

impl<Handler: Debug, Params: Debug> Debug for Method<Handler, Params>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Handler, Params> Freeze for Method<Handler, Params>
where Handler: Freeze, PhantomData<fn(Params)>: Freeze,

§

impl<Handler, Params> RefUnwindSafe for Method<Handler, Params>
where Handler: RefUnwindSafe, PhantomData<fn(Params)>: RefUnwindSafe,

§

impl<Handler, Params> Send for Method<Handler, Params>
where Handler: Send, PhantomData<fn(Params)>: Send,

§

impl<Handler, Params> Sync for Method<Handler, Params>
where Handler: Sync, PhantomData<fn(Params)>: Sync,

§

impl<Handler, Params> Unpin for Method<Handler, Params>
where Handler: Unpin, PhantomData<fn(Params)>: Unpin,

§

impl<Handler, Params> UnsafeUnpin for Method<Handler, Params>
where Handler: UnsafeUnpin, PhantomData<fn(Params)>: UnsafeUnpin,

§

impl<Handler, Params> UnwindSafe for Method<Handler, Params>
where Handler: UnwindSafe, PhantomData<fn(Params)>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<This> JsonRpcProgramExt<This> for This

Source§

fn compile_jsonrpc<Program>( &self, program: Program, ) -> <Program as JsonRpcProgramAlg<This>>::Methods
where Program: JsonRpcProgramAlg<This>,

Compiles a named JSON-RPC program with this interpreter.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.