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§
Sourcefn is_notification() -> bool
fn is_notification() -> bool
Returns true
if this is a notification response type.
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 IntoResponse for ()
impl IntoResponse for ()
Support JSON-RPC notification methods.
Source§impl<R: Serialize + Send + 'static> IntoResponse for Result<R, Error>
impl<R: Serialize + Send + 'static> IntoResponse for Result<R, Error>
Support JSON-RPC request methods.