pub trait Configure: Default + DeserializeOwned + Serialize {
    // Provided methods
    fn print_toml(&self) { ... }
    fn from_json(s: &str) -> Result<Self, Error> { ... }
    fn from_toml(s: &str) -> Result<Self, Error> { ... }
    fn to_json(&self) -> Result<String, Error> { ... }
    fn to_toml(&self) -> Result<String, Error> { ... }
}

Provided Methods§

fn print_toml(&self)

👎Deprecated: plan to be removed

Print current configuration in toml format.

fn from_json(s: &str) -> Result<Self, Error>

Deserialize an instance of type T from a string of JSON text.

fn from_toml(s: &str) -> Result<Self, Error>

Deserialize an instance of type T from a string of TOML text.

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

Serialize it to a JSON string.

fn to_toml(&self) -> Result<String, Error>

Serialize self to a TOML string.

Implementors§

§

impl<T> Configure for Twhere
T: Default + DeserializeOwned + Serialize,