pub trait ToJson {
    // Required method
    fn to_json(&self) -> Json;
}
Expand description

A trait for converting values to JSON

Required Methods§

source

fn to_json(&self) -> Json

Converts the value of self to an instance of JSON

Implementations on Foreign Types§

source§

impl ToJson for bool

source§

fn to_json(&self) -> Json

source§

impl ToJson for f32

source§

fn to_json(&self) -> Json

source§

impl ToJson for f64

source§

fn to_json(&self) -> Json

source§

impl ToJson for i8

source§

fn to_json(&self) -> Json

source§

impl ToJson for i16

source§

fn to_json(&self) -> Json

source§

impl ToJson for i32

source§

fn to_json(&self) -> Json

source§

impl ToJson for i64

source§

fn to_json(&self) -> Json

source§

impl ToJson for isize

source§

fn to_json(&self) -> Json

source§

impl ToJson for str

source§

fn to_json(&self) -> Json

source§

impl ToJson for u8

source§

fn to_json(&self) -> Json

source§

impl ToJson for u16

source§

fn to_json(&self) -> Json

source§

impl ToJson for u32

source§

fn to_json(&self) -> Json

source§

impl ToJson for u64

source§

fn to_json(&self) -> Json

source§

impl ToJson for ()

source§

fn to_json(&self) -> Json

source§

impl ToJson for usize

source§

fn to_json(&self) -> Json

source§

impl ToJson for String

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson> ToJson for Option<A>

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson> ToJson for [A]

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson> ToJson for (A,)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson> ToJson for BTreeMap<String, A>

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson> ToJson for Vec<A>

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson> ToJson for HashMap<String, A>

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson> ToJson for (A, B)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson> ToJson for (A, B, C)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson> ToJson for (A, B, C, D)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson> ToJson for (A, B, C, D, E)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson> ToJson for (A, B, C, D, E, F)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson> ToJson for (A, B, C, D, E, F, G)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson> ToJson for (A, B, C, D, E, F, G, H)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson> ToJson for (A, B, C, D, E, F, G, H, I)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson, J: ToJson> ToJson for (A, B, C, D, E, F, G, H, I, J)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson, J: ToJson, K: ToJson> ToJson for (A, B, C, D, E, F, G, H, I, J, K)

source§

fn to_json(&self) -> Json

source§

impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson, J: ToJson, K: ToJson, L: ToJson> ToJson for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

fn to_json(&self) -> Json

Implementors§