tower_lsp::jsonrpc

Trait FromParams

Source
pub trait FromParams:
    Sealed
    + Send
    + Sized
    + 'static {
    // Required method
    fn from_params(params: Option<Value>) -> Result<Self>;
}
Expand description

A trait implemented by all JSON-RPC method parameters.

Required Methods§

Source

fn from_params(params: Option<Value>) -> Result<Self>

Attempts to deserialize Self from the params value extracted from Request.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromParams for ()

Deserialize non-existent JSON-RPC parameters.

Source§

fn from_params(params: Option<Value>) -> Result<Self>

Source§

impl<P: DeserializeOwned + Send + 'static> FromParams for (P,)

Deserialize required JSON-RPC parameters.

Source§

fn from_params(params: Option<Value>) -> Result<Self>

Implementors§