pub trait ExportObject<S = ()> {
// Required method
fn export_to_buffer(
&mut self,
world: &mut World,
buffer: &mut Vec<u8>,
input: S,
) -> Result<(), Box<dyn Error>>;
// Provided methods
fn export_to_file(
&mut self,
world: &mut World,
input: S,
) -> Result<(), Box<dyn Error>> { ... }
fn filename(&self) -> impl AsRef<str> { ... }
fn extension(&self) -> impl AsRef<str> { ... }
}Required Methods§
Provided Methods§
Sourcefn export_to_file(
&mut self,
world: &mut World,
input: S,
) -> Result<(), Box<dyn Error>>
fn export_to_file( &mut self, world: &mut World, input: S, ) -> Result<(), Box<dyn Error>>
Export contents and save them on disk, with optional parameters
fn filename(&self) -> impl AsRef<str>
fn extension(&self) -> impl AsRef<str>
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.