pub trait DxSerializable: Sized {
// Required methods
fn to_dx_llm(&self) -> Result<String>;
fn from_dx_llm(content: &str) -> Result<Self>;
fn to_dx_machine(&self) -> Result<Vec<u8>>;
fn from_dx_machine(data: &[u8]) -> Result<Self>;
}Expand description
Trait for types that can be serialized to/from DX formats
Required Methods§
Sourcefn from_dx_llm(content: &str) -> Result<Self>
fn from_dx_llm(content: &str) -> Result<Self>
Deserialize from DX LLM format
Sourcefn to_dx_machine(&self) -> Result<Vec<u8>>
fn to_dx_machine(&self) -> Result<Vec<u8>>
Serialize to DX Machine format (binary)
Sourcefn from_dx_machine(data: &[u8]) -> Result<Self>
fn from_dx_machine(data: &[u8]) -> Result<Self>
Deserialize from DX Machine format
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".