Home / Function/ max_depth() — tailwindcss Function Reference

max_depth() — tailwindcss Function Reference

Architecture documentation for the max_depth() function in walk.rs from the tailwindcss codebase.

Function rust RustCore MachineExtractor calls 6 called by 1

Entity Profile

Dependency Diagram

graph TD
  95acd172_55a0_a922_90d4_b0e559ebbe4a["max_depth()"]
  401c5e00_2f82_6095_747e_21b71443ddb7["max_depth()"]
  401c5e00_2f82_6095_747e_21b71443ddb7 -->|calls| 95acd172_55a0_a922_90d4_b0e559ebbe4a
  401c5e00_2f82_6095_747e_21b71443ddb7["max_depth()"]
  95acd172_55a0_a922_90d4_b0e559ebbe4a -->|calls| 401c5e00_2f82_6095_747e_21b71443ddb7
  e8c725dd_a885_9529_0af1_4e4171753fc6["tmpdir()"]
  95acd172_55a0_a922_90d4_b0e559ebbe4a -->|calls| e8c725dd_a885_9529_0af1_4e4171753fc6
  a870695d_932a_bfd4_fe92_a94ee09973bb["mkdirp()"]
  95acd172_55a0_a922_90d4_b0e559ebbe4a -->|calls| a870695d_932a_bfd4_fe92_a94ee09973bb
  65b715d0_a042_86f6_24a2_ee2f89075c41["wfile()"]
  95acd172_55a0_a922_90d4_b0e559ebbe4a -->|calls| 65b715d0_a042_86f6_24a2_ee2f89075c41
  5fe9aa4d_d793_b1a2_d187_4991d92c8d6e["assert_paths()"]
  95acd172_55a0_a922_90d4_b0e559ebbe4a -->|calls| 5fe9aa4d_d793_b1a2_d187_4991d92c8d6e
  006bb599_d40b_f53b_44c7_57dfd4237729["path()"]
  95acd172_55a0_a922_90d4_b0e559ebbe4a -->|calls| 006bb599_d40b_f53b_44c7_57dfd4237729
  style 95acd172_55a0_a922_90d4_b0e559ebbe4a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/walk.rs lines 2258–2279

    fn max_depth() {
        let td = tmpdir();
        mkdirp(td.path().join("a/b/c"));
        wfile(td.path().join("foo"), "");
        wfile(td.path().join("a/foo"), "");
        wfile(td.path().join("a/b/foo"), "");
        wfile(td.path().join("a/b/c/foo"), "");

        let mut builder = WalkBuilder::new(td.path());
        assert_paths(
            td.path(),
            &builder,
            &["a", "a/b", "a/b/c", "foo", "a/foo", "a/b/foo", "a/b/c/foo"],
        );
        assert_paths(td.path(), builder.max_depth(Some(0)), &[]);
        assert_paths(td.path(), builder.max_depth(Some(1)), &["a", "foo"]);
        assert_paths(
            td.path(),
            builder.max_depth(Some(2)),
            &["a", "a/b", "foo", "a/foo"],
        );
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does max_depth() do?
max_depth() is a function in the tailwindcss codebase.
What does max_depth() call?
max_depth() calls 6 function(s): assert_paths, max_depth, mkdirp, path, tmpdir, wfile.
What calls max_depth()?
max_depth() is called by 1 function(s): max_depth.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free