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
  2364e0a6_e483_920e_1924_cac7fdeeb1e5["new()"]
  714a3a15_03d5_1e35_b535_53da70bce8eb["gitignore.rs"]
  2364e0a6_e483_920e_1924_cac7fdeeb1e5 -->|defined in| 714a3a15_03d5_1e35_b535_53da70bce8eb
  aeb4abcb_3f26_f670_bc29_d72a919dc43b["add()"]
  2364e0a6_e483_920e_1924_cac7fdeeb1e5 -->|calls| aeb4abcb_3f26_f670_bc29_d72a919dc43b
  088ec752_002a_6e18_595e_6a8f31aa2bc5["build()"]
  2364e0a6_e483_920e_1924_cac7fdeeb1e5 -->|calls| 088ec752_002a_6e18_595e_6a8f31aa2bc5
  1eb25184_8c39_1e77_3541_7b736d612342["empty()"]
  2364e0a6_e483_920e_1924_cac7fdeeb1e5 -->|calls| 1eb25184_8c39_1e77_3541_7b736d612342
  style 2364e0a6_e483_920e_1924_cac7fdeeb1e5 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