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
  cb2f2846_8ee9_4e71_0e41_554bf62917ad["new()"]
  61377720_4557_3c63_7653_b6ed73e2face["gitignore.rs"]
  cb2f2846_8ee9_4e71_0e41_554bf62917ad -->|defined in| 61377720_4557_3c63_7653_b6ed73e2face
  f95b3cad_268d_6201_5f31_b8ae0f47ef4a["add()"]
  cb2f2846_8ee9_4e71_0e41_554bf62917ad -->|calls| f95b3cad_268d_6201_5f31_b8ae0f47ef4a
  80a773f9_5f57_2f17_0199_9d45d676f37b["build()"]
  cb2f2846_8ee9_4e71_0e41_554bf62917ad -->|calls| 80a773f9_5f57_2f17_0199_9d45d676f37b
  7fb7392f_63e5_8cf1_5936_83492336182d["empty()"]
  cb2f2846_8ee9_4e71_0e41_554bf62917ad -->|calls| 7fb7392f_63e5_8cf1_5936_83492336182d
  style cb2f2846_8ee9_4e71_0e41_554bf62917ad 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, defined in crates/ignore/src/gitignore.rs.
Where is new() defined?
new() is defined in crates/ignore/src/gitignore.rs at line 105.
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