jsonrpsee_core::server

Trait IntoResponse

source
pub trait IntoResponse {
    type Output: Serialize + Clone;

    // Required method
    fn into_response(self) -> ResponsePayload<'static, Self::Output>;
}
Available on crate feature server only.
Expand description

Something that can be converted into a JSON-RPC method call response.

If the value couldn’t be serialized/encoded, jsonrpsee will sent out an error to the client response could not be serialized.

Required Associated Types§

source

type Output: Serialize + Clone

Output.

Required Methods§

source

fn into_response(self) -> ResponsePayload<'static, Self::Output>

Something that can be converted into a JSON-RPC method call response.

Implementations on Foreign Types§

source§

impl IntoResponse for &'static str

source§

type Output = &'static str

source§

fn into_response(self) -> ResponsePayload<'static, Self::Output>

source§

impl IntoResponse for bool

source§

impl IntoResponse for i8

source§

impl IntoResponse for i16

source§

impl IntoResponse for i32

source§

impl IntoResponse for i64

source§

impl IntoResponse for i128

source§

impl IntoResponse for isize

source§

impl IntoResponse for u8

source§

impl IntoResponse for u16

source§

impl IntoResponse for u32

source§

impl IntoResponse for u64

source§

impl IntoResponse for u128

source§

impl IntoResponse for ()

source§

impl IntoResponse for usize

source§

impl IntoResponse for String

source§

impl IntoResponse for ErrorObjectOwned

source§

impl<T> IntoResponse for Option<T>
where T: Serialize + Clone,

source§

impl<T> IntoResponse for ResponsePayload<'static, T>
where T: Serialize + Clone,

source§

type Output = T

source§

fn into_response(self) -> ResponsePayload<'static, Self::Output>

source§

impl<T> IntoResponse for Vec<T>
where T: Serialize + Clone,

source§

type Output = Vec<T>

source§

fn into_response(self) -> ResponsePayload<'static, Self::Output>

source§

impl<T, E: Into<ErrorObjectOwned>> IntoResponse for Result<T, E>
where T: Serialize + Clone,

source§

type Output = T

source§

fn into_response(self) -> ResponsePayload<'static, Self::Output>

source§

impl<T, const N: usize> IntoResponse for [T; N]

Implementors§

source§

impl IntoResponse for Value

source§

impl<T> IntoResponse for jsonrpsee_core::server::ResponsePayload<'static, T>
where T: Serialize + Clone,