Home / Function/ new() — tailwindcss Function Reference

new() — tailwindcss Function Reference

Architecture documentation for the new() function in gitignore.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  4070cc0c_7b7d_154a_4c5a_53a488f619d9["new()"]
  ae012ab6_9cfc_afd5_a99d_c076b3ac0f7c["add()"]
  4070cc0c_7b7d_154a_4c5a_53a488f619d9 -->|calls| ae012ab6_9cfc_afd5_a99d_c076b3ac0f7c
  7903e9fa_c4f3_6282_ebe5_eed525a2a2b0["build()"]
  4070cc0c_7b7d_154a_4c5a_53a488f619d9 -->|calls| 7903e9fa_c4f3_6282_ebe5_eed525a2a2b0
  add79117_bda9_cdfc_f444_050522373f88["empty()"]
  4070cc0c_7b7d_154a_4c5a_53a488f619d9 -->|calls| add79117_bda9_cdfc_f444_050522373f88
  style 4070cc0c_7b7d_154a_4c5a_53a488f619d9 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

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