pub trait OutputHandler<'state> {
type FileHandle: Write;
// Required method
fn create_file<P: AsRef<Path>>(
&'state mut self,
path: P,
) -> Result<Self::FileHandle, GeneratorError>;
}
Expand description
Outputs files produced by the generator.
Allows for capturing the output without writing directly to the file system.
Required Associated Types§
type FileHandle: Write
Required Methods§
fn create_file<P: AsRef<Path>>( &'state mut self, path: P, ) -> Result<Self::FileHandle, GeneratorError>
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.