Trait ToFile

Source
pub trait ToFile: Sized {
    // Required method
    fn serialize(&self) -> Result<Vec<u8>, Error>;

    // Provided method
    fn to_file(&self, path: &Path) -> Result<(), Failure> { ... }
}

Required Methods§

Provided Methods§

Source

fn to_file(&self, path: &Path) -> Result<(), Failure>

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§