pub trait WriteTo {
    // Required method
    fn write_to(&self, path: &Path) -> Result<()>;
}
Expand description

Trait for types / structures that can be written to disk. All types in the library that write to files first check that the parent directories exist, so implementations of this that create the whole directory are not necessary (unless used empty children directories, in which case no directories will really be created).

Required Methods§

source

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

Writes the structure to the specified path.

Implementations on Foreign Types§

source§

impl WriteTo for str

source§

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

source§

impl WriteTo for String

source§

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

source§

impl WriteTo for Vec<u8>

source§

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

source§

impl WriteTo for [u8]

source§

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

source§

impl<'a> WriteTo for &'a str

source§

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

source§

impl<'a> WriteTo for &'a [u8]

source§

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

source§

impl<T> WriteTo for Option<T>where T: WriteTo,

source§

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

Implementors§