Skip to main content

ToJson

Trait ToJson 

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

A trait for converting values to Hjson

Required Methods§

Source

fn to_json(&self) -> Value

Converts the value of self to an instance of Hjson

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ToJson for T
where T: Serialize + ?Sized,