/// Create a new `DirectoryReporter` that places results in the given `root` directory.
Create a new `DirectoryReporter` that places results in the given `root` directory.
Create a new ` DirectoryReporter ` that places results in the given ` root ` directory .
pub(super) fn new(root: PathBuf) -> Result<Self, Error> {
        let artifact_dir = artifact_dir_name(&EntityId::TestRun);
        Self::ensure_directory_exists(root.as_path())?;
        let mut entries = HashMap::new();
        entries.insert(
            EntityId::TestRun,
            EntityEntry {
                name: "".to_string(),
                artifact_dir,
                artifacts: vec![],
                children: vec![],
                outcome: ReportedOutcome::Inconclusive,
                timer: MonotonicTimer::Unknown,
                approximate_host_start_time: None,
            },
        );
        let new_self = Self { root, entries: Mutex::new(entries), name_counter: AtomicU32::new(0) };
        new_self.persist_run_summary()?;
        Ok(new_self)
    }
pub ( super ) fn new ( root : PathBuf ) -> Result < Self , Error > { let artifact_dir = artifact_dir_name ( & EntityId :: TestRun ) ; Self :: ensure_directory_exists ( root . as_path ( ) ) ? ; let mut entries = HashMap :: new ( ) ; entries . insert ( EntityId :: TestRun , EntityEntry { name : " " . to_string ( ) , artifact_dir , artifacts : vec ! [ ] , children : vec ! [ ] , outcome : ReportedOutcome :: Inconclusive , timer : MonotonicTimer :: Unknown , approximate_host_start_time : None , } , ) ; let new_self = Self { root , entries : Mutex :: new ( entries ) , name_counter : AtomicU32 :: new ( 0 ) } ; new_self . persist_run_summary ( ) ? ; Ok ( new_self ) }
Create a new `DirectoryReporter` that places results in the given `root` directory.
Create a new ` DirectoryReporter ` that places results in the given ` root ` directory .
root
PathBuf