pub fn new(root: PathBuf) -> Result<Self, Error> {
        let reporter: Arc<DirectoryReporter> = Arc::new(DirectoryReporter::new(root)?);
        let reporter_dyn = reporter.clone() as Arc<DynReporter>;
        let artifact_fn = Box::new(move |entity: &EntityId, artifact_type: &ArtifactType| {
            let inner = reporter.new_artifact(entity, artifact_type)?;
            Ok(Box::new(inner) as Box<DynArtifact>)
        });
        Ok(Self { reporter: reporter_dyn, artifact_fn })
    }
/// Create a `RunReporter` that saves artifacts and results to the given directory.
Create a `RunReporter` that saves artifacts and results to the given directory.
Create a ` RunReporter ` that saves artifacts and results to the given directory .
pub fn new(root: PathBuf) -> Result<Self, Error> {
        let reporter: Arc<DirectoryReporter> = Arc::new(DirectoryReporter::new(root)?);
        let reporter_dyn = reporter.clone() as Arc<DynReporter>;
        let artifact_fn = Box::new(move |entity: &EntityId, artifact_type: &ArtifactType| {
            let inner = reporter.new_artifact(entity, artifact_type)?;
            Ok(Box::new(inner) as Box<DynArtifact>)
        });
        Ok(Self { reporter: reporter_dyn, artifact_fn })
    }
pub fn new ( root : PathBuf ) -> Result < Self , Error > { let reporter : Arc < DirectoryReporter > = Arc :: new ( DirectoryReporter :: new ( root ) ? ) ; let reporter_dyn = reporter . clone ( ) as Arc < DynReporter > ; let artifact_fn = Box :: new ( move | entity : & EntityId , artifact_type : & ArtifactType | { let inner = reporter . new_artifact ( entity , artifact_type ) ? ; Ok ( Box :: new ( inner ) as Box < DynArtifact > ) } ) ; Ok ( Self { reporter : reporter_dyn , artifact_fn } ) }
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