rustc_serialize::json

Trait ToJson

Source
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§