new() — tailwindcss Function Reference
Architecture documentation for the new() function in lib.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD a0d22d8c_d803_8ef4_4fe0_b0e0e2d5c3f6["new()"] d51c8934_ce3d_f9d0_a14e_c9711e79f4e3["lib.rs"] a0d22d8c_d803_8ef4_4fe0_b0e0e2d5c3f6 -->|defined in| d51c8934_ce3d_f9d0_a14e_c9711e79f4e3 style a0d22d8c_d803_8ef4_4fe0_b0e0e2d5c3f6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/ignore/src/lib.rs lines 535–553
pub fn new() -> Result<TempDir> {
use std::sync::atomic::{AtomicUsize, Ordering};
static TRIES: usize = 100;
static COUNTER: AtomicUsize = AtomicUsize::new(0);
let tmpdir = env::temp_dir();
for _ in 0..TRIES {
let count = COUNTER.fetch_add(1, Ordering::Relaxed);
let path = tmpdir.join("rust-ignore").join(count.to_string());
if path.is_dir() {
continue;
}
fs::create_dir_all(&path)
.map_err(|e| err!("failed to create {}: {}", path.display(), e))?;
return Ok(TempDir(path));
}
Err(err!("failed to create temp dir after {} tries", TRIES))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does new() do?
new() is a function in the tailwindcss codebase, defined in crates/ignore/src/lib.rs.
Where is new() defined?
new() is defined in crates/ignore/src/lib.rs at line 535.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free