usestd::{path::PathBuf,time::{SystemTime,UNIX_EPOCH},};// Build a unique temporary directory path for tests that create their own layout.
pubfntemp_dir(prefix:&str)-> PathBuf{std::env::temp_dir().join(unique_name(prefix))}// Build a unique temporary file path for tests that only need one artifact.
pubfntemp_path(prefix:&str)-> PathBuf{std::env::temp_dir().join(unique_name(prefix))}// Include process and timestamp data so parallel test runs do not collide.
fnunique_name(prefix:&str)-> String{let nanos =SystemTime::now().duration_since(UNIX_EPOCH).expect("system time after epoch").as_nanos();format!("{prefix}-{}-{nanos}",std::process::id())}