Trait ToJson

Source
pub trait ToJson {
    // Required method
    fn to_json(&self) -> Result<Box<RawValue>, Error>;
}
Expand description

Interface for types that can be serialized into JSON.

Required Methods§

Source

fn to_json(&self) -> Result<Box<RawValue>, Error>

Convert the type into a JSON value.

Implementations on Foreign Types§

Source§

impl<T: Serialize> ToJson for Result<T, Error>

Available on crate feature client only.

Implementors§

Source§

impl ToJson for RawResponse<'_>

Available on crate feature client only.
Source§

impl ToJson for MethodResponse

Available on crate feature server only.