pub trait LegacySerializable: Sized {
// Required methods
fn from_legacy_json(content: &str) -> Result<Self>;
fn to_legacy_json(&self) -> Result<String>;
fn from_legacy_yaml(content: &str) -> Result<Self>;
fn to_legacy_yaml(&self) -> Result<String>;
fn from_legacy_toml(content: &str) -> Result<Self>;
fn to_legacy_toml(&self) -> Result<String>;
}Expand description
Trait for types that can be converted from legacy formats
Required Methods§
Sourcefn from_legacy_json(content: &str) -> Result<Self>
fn from_legacy_json(content: &str) -> Result<Self>
Parse from JSON string
Sourcefn to_legacy_json(&self) -> Result<String>
fn to_legacy_json(&self) -> Result<String>
Serialize to JSON string
Sourcefn from_legacy_yaml(content: &str) -> Result<Self>
fn from_legacy_yaml(content: &str) -> Result<Self>
Parse from YAML string
Sourcefn to_legacy_yaml(&self) -> Result<String>
fn to_legacy_yaml(&self) -> Result<String>
Serialize to YAML string
Sourcefn from_legacy_toml(content: &str) -> Result<Self>
fn from_legacy_toml(content: &str) -> Result<Self>
Parse from TOML string
Sourcefn to_legacy_toml(&self) -> Result<String>
fn to_legacy_toml(&self) -> Result<String>
Serialize to TOML string
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".