pub struct OutputManager { /* private fields */ }Implementations§
Source§impl OutputManager
impl OutputManager
pub fn new<P: AsRef<Path>>(output_dir: P) -> Self
pub fn with_backup<P: AsRef<Path>>(output_dir: P, backup_dir: Option<P>) -> Self
Sourcepub fn prepare_output_directory(&self) -> Result<(), OutputError>
pub fn prepare_output_directory(&self) -> Result<(), OutputError>
Ensure the output directory exists and is writable
Sourcepub fn register_managed_file(&mut self, filename: &str)
pub fn register_managed_file(&mut self, filename: &str)
Register a file as managed by this generator
Sourcepub fn cleanup_old_files(
&self,
current_files: &[String],
) -> Result<Vec<String>, OutputError>
pub fn cleanup_old_files( &self, current_files: &[String], ) -> Result<Vec<String>, OutputError>
Clean up old generated files that are no longer needed
Sourcepub fn write_file(
&self,
filename: &str,
content: &str,
) -> Result<PathBuf, OutputError>
pub fn write_file( &self, filename: &str, content: &str, ) -> Result<PathBuf, OutputError>
Write a file to the output directory with proper error handling
Sourcepub fn verify_output(
&self,
expected_files: &[String],
) -> Result<Vec<String>, OutputError>
pub fn verify_output( &self, expected_files: &[String], ) -> Result<Vec<String>, OutputError>
Verify that all expected files were generated
Sourcepub fn get_generation_metadata(&self) -> Result<GenerationMetadata, OutputError>
pub fn get_generation_metadata(&self) -> Result<GenerationMetadata, OutputError>
Get metadata about generated files
Sourcepub fn finalize_generation(
&mut self,
generated_files: &[String],
) -> Result<(), OutputError>
pub fn finalize_generation( &mut self, generated_files: &[String], ) -> Result<(), OutputError>
Finalize the generation process
Sourcepub fn create_summary_report(&self) -> Result<String, OutputError>
pub fn create_summary_report(&self) -> Result<String, OutputError>
Create a summary report of the generation process
Auto Trait Implementations§
impl Freeze for OutputManager
impl RefUnwindSafe for OutputManager
impl Send for OutputManager
impl Sync for OutputManager
impl Unpin for OutputManager
impl UnwindSafe for OutputManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more