ToToml

Trait ToToml 

Source
pub trait ToToml {
Show 16 methods // Provided methods fn try_to_toml_value(&self) -> Result<TomlValue> where Self: Serialize { ... } fn try_from_toml_value(value: TomlValue) -> Result<Self> where Self: DeserializeOwned { ... } fn to_toml_value(&self) -> TomlValue where Self: Serialize { ... } fn from_toml_value(value: TomlValue) -> Self where Self: DeserializeOwned { ... } fn try_to_toml(&self) -> Result<String> where Self: Serialize { ... } fn try_to_toml_into(&self, writer: impl Write) -> Result<()> where Self: Serialize { ... } fn try_from_toml(toml: impl AsBytes) -> Result<Self> where Self: DeserializeOwned { ... } fn try_from_toml_from(reader: impl Read) -> Result<Self> where Self: DeserializeOwned { ... } fn to_toml(&self) -> String where Self: Serialize { ... } fn to_toml_into(&self, writer: impl Write) where Self: Serialize { ... } fn from_toml(toml: impl AsBytes) -> Self where Self: DeserializeOwned { ... } fn from_toml_from(reader: impl Read) -> Self where Self: DeserializeOwned { ... } fn try_to_toml_pretty(&self) -> Result<String> where Self: Serialize { ... } fn try_to_toml_pretty_into(&self, writer: impl Write) -> Result<()> where Self: Serialize { ... } fn to_toml_pretty(&self) -> String where Self: Serialize { ... } fn to_toml_pretty_into(&self, writer: impl Write) where Self: Serialize { ... }
}
Expand description

§A trait that can de/encode to/from toml.

Provided Methods§

Source

fn try_to_toml_value(&self) -> Result<TomlValue>
where Self: Serialize,

Source

fn try_from_toml_value(value: TomlValue) -> Result<Self>
where Self: DeserializeOwned,

Source

fn to_toml_value(&self) -> TomlValue
where Self: Serialize,

Source

fn from_toml_value(value: TomlValue) -> Self
where Self: DeserializeOwned,

Source

fn try_to_toml(&self) -> Result<String>
where Self: Serialize,

Source

fn try_to_toml_into(&self, writer: impl Write) -> Result<()>
where Self: Serialize,

§Optimized

This function is not well optimized yet.

Source

fn try_from_toml(toml: impl AsBytes) -> Result<Self>
where Self: DeserializeOwned,

Source

fn try_from_toml_from(reader: impl Read) -> Result<Self>
where Self: DeserializeOwned,

§Optimized

This function is not well optimized yet.

Source

fn to_toml(&self) -> String
where Self: Serialize,

Source

fn to_toml_into(&self, writer: impl Write)
where Self: Serialize,

Source

fn from_toml(toml: impl AsBytes) -> Self
where Self: DeserializeOwned,

Source

fn from_toml_from(reader: impl Read) -> Self
where Self: DeserializeOwned,

Source

fn try_to_toml_pretty(&self) -> Result<String>
where Self: Serialize,

Source

fn try_to_toml_pretty_into(&self, writer: impl Write) -> Result<()>
where Self: Serialize,

§Optimized

This function is not well optimized yet.

Source

fn to_toml_pretty(&self) -> String
where Self: Serialize,

Source

fn to_toml_pretty_into(&self, writer: impl Write)
where Self: Serialize,

§Optimized

This function is not well optimized yet.

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§