new() — tailwindcss Function Reference
Architecture documentation for the new() function in gitignore.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD bc289d7f_95ef_0ff2_e647_2bcb110d3196["new()"] e58274c7_3647_b80e_0fb2_dc3c49dd0e95["add()"] bc289d7f_95ef_0ff2_e647_2bcb110d3196 -->|calls| e58274c7_3647_b80e_0fb2_dc3c49dd0e95 68e416a6_57fe_bc5e_90c3_04138c3922d0["build()"] bc289d7f_95ef_0ff2_e647_2bcb110d3196 -->|calls| 68e416a6_57fe_bc5e_90c3_04138c3922d0 50f20e8a_eb44_5007_674d_776d3b0a5ef9["empty()"] bc289d7f_95ef_0ff2_e647_2bcb110d3196 -->|calls| 50f20e8a_eb44_5007_674d_776d3b0a5ef9 style bc289d7f_95ef_0ff2_e647_2bcb110d3196 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/ignore/src/gitignore.rs lines 105–118
pub fn new<P: AsRef<Path>>(gitignore_path: P) -> (Gitignore, Option<Error>) {
let path = gitignore_path.as_ref();
let parent = path.parent().unwrap_or(Path::new("/"));
let mut builder = GitignoreBuilder::new(parent);
let mut errs = PartialErrorBuilder::default();
errs.maybe_push_ignore_io(builder.add(path));
match builder.build() {
Ok(gi) => (gi, errs.into_error_option()),
Err(err) => {
errs.push(err);
(Gitignore::empty(), errs.into_error_option())
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does new() do?
new() is a function in the tailwindcss codebase.
What does new() call?
new() calls 3 function(s): add, build, empty.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free