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.

Implementations on Foreign Types§

source§

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

Support JSON-RPC request methods.

source§

impl IntoResponse for ()

Support JSON-RPC notification methods.

Implementors§