pub trait Encode: Sized {
// Required method
fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>;
// Provided method
fn to_unified_string(&self) -> Result<String, Error> { ... }
}
Expand description
Diff-related types that can be encoded intro the unified diff format.
Required Methods§
Provided Methods§
Sourcefn to_unified_string(&self) -> Result<String, Error>
fn to_unified_string(&self) -> Result<String, Error>
Encode into unified diff 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.