Trait opentitanlib::util::file::ToWriter
source · pub trait ToWriter: Sized {
// Required method
fn to_writer(&self, w: &mut impl Write) -> Result<()>;
// Provided method
fn write_to_file(self, path: &Path) -> Result<()> { ... }
}
Expand description
Trait for data types that can be written to a writer.
Required Methods§
Provided Methods§
sourcefn write_to_file(self, path: &Path) -> Result<()>
fn write_to_file(self, path: &Path) -> Result<()>
Writes self
to a file at path
in binary format.