Configure

Trait Configure 

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

Source

fn print_toml(&self)

👎Deprecated: plan to be removed

Print current configuration in toml format.

Source

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

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

Source

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

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

Source

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

Serialize it to a JSON string.

Source

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

Serialize self to a TOML string.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§