pub fn new_ansi_filtered(root: PathBuf) -> Result<Self, Error> {
        let reporter = Box::new(DirectoryReporter::new(root)?);
        let artifact_wrapper =
            Box::new(|artifact_type: &ArtifactType, artifact: Box<DynArtifact>| {
                match artifact_type {
                    // All the artifact types are enumerated here as we expect future artifacts
                    // should not be filtered.
                    ArtifactType::Stdout | ArtifactType::Stderr | ArtifactType::Syslog => {
                        Box::new(AnsiFilterWriter::new(artifact)) as Box<DynArtifact>
                    }
                }
            });
        Ok(Self { reporter, artifact_wrapper })
    }
/// Create a `RunReporter` that saves artifacts and results to the given directory.
/// Any stdout artifacts are filtered for ANSI escape sequences before saving.
Create a `RunReporter` that saves artifacts and results to the given directory.
Any stdout artifacts are filtered for ANSI escape sequences before saving.
Create a ` RunReporter ` that saves artifacts and results to the given directory . Any stdout artifacts are filtered for ANSI escape sequences before saving .
pub fn new_ansi_filtered(root: PathBuf) -> Result<Self, Error> {
        let reporter = Box::new(DirectoryReporter::new(root)?);
        let artifact_wrapper =
            Box::new(|artifact_type: &ArtifactType, artifact: Box<DynArtifact>| {
                match artifact_type {
                    // All the artifact types are enumerated here as we expect future artifacts
                    // should not be filtered.
                    ArtifactType::Stdout | ArtifactType::Stderr | ArtifactType::Syslog => {
                        Box::new(AnsiFilterWriter::new(artifact)) as Box<DynArtifact>
                    }
                }
            });
        Ok(Self { reporter, artifact_wrapper })
    }
pub fn new_ansi_filtered ( root : PathBuf ) -> Result < Self , Error > { let reporter = Box :: new ( DirectoryReporter :: new ( root ) ? ) ; let artifact_wrapper = Box :: new ( | artifact_type : & ArtifactType , artifact : Box < DynArtifact > | { match artifact_type { // All the artifact types are enumerated here as we expect future artifacts // should not be filtered. ArtifactType :: Stdout | ArtifactType :: Stderr | ArtifactType :: Syslog => { Box :: new ( AnsiFilterWriter :: new ( artifact ) ) as Box < DynArtifact > } } } ) ; Ok ( Self { reporter , artifact_wrapper } ) }
Create a `RunReporter` that saves artifacts and results to the given directory.
Create a ` RunReporter ` that saves artifacts and results to the given directory .
root
PathBuf
root
PathBuf