Trait tower_lsp::jsonrpc::IntoResponse

source ·
pub trait IntoResponse:
    Sealed
    + Send
    + 'static {
    // Required methods
    fn into_response(self, id: Option<Id>) -> Option<Response>;
    fn is_notification() -> bool;
}
Expand description

A trait implemented by all JSON-RPC response types.

Required Methods§

source

fn into_response(self, id: Option<Id>) -> Option<Response>

Attempts to construct a Response using Self and a corresponding Id.

source

fn is_notification() -> bool

Returns true if this is a notification response type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoResponse for ()

Support JSON-RPC notification methods.

source§

impl<R: Serialize + Send + 'static> IntoResponse for Result<R, Error>

Support JSON-RPC request methods.

Implementors§