Skip to main content

ToDisk

Trait ToDisk 

Source
pub trait ToDisk: FromDisk {
    // Provided methods
    fn persist_if(&self, yes: bool) -> Result<()>
       where Self: Sized + Serialize { ... }
    fn persist(&self) -> Result<()>
       where Self: Sized + Serialize { ... }
}

Provided Methods§

Source

fn persist_if(&self, yes: bool) -> Result<()>
where Self: Sized + Serialize,

Persist to path only if yes is true

Source

fn persist(&self) -> Result<()>
where Self: Sized + Serialize,

Serializes itself to the given path

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§