jsonrpsee_server

Trait IntoResponse

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

    // Required method
    fn into_response(self) -> ResponsePayload<'static, Self::Output>;
}
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, <&'static str as IntoResponse>::Output>

source§

impl IntoResponse for Value

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 ErrorObject<'static>

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, <ResponsePayload<'static, T> as IntoResponse>::Output>

source§

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

source§

impl<T, E> IntoResponse for Result<T, E>
where E: Into<ErrorObject<'static>>, T: Serialize + Clone,

source§

type Output = T

source§

fn into_response( self, ) -> ResponsePayload<'static, <Result<T, E> as IntoResponse>::Output>

source§

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

Implementors§

source§

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