Home / Function/ add() — tailwindcss Function Reference

add() — tailwindcss Function Reference

Architecture documentation for the add() function in types.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  b32f1881_15aa_1bb9_8dca_d93a8f255f33["add()"]
  d51c6497_c250_cc24_5922_420f8b0354f8["types.rs"]
  b32f1881_15aa_1bb9_8dca_d93a8f255f33 -->|defined in| d51c6497_c250_cc24_5922_420f8b0354f8
  d5d48970_132e_17c0_2e93_0133c680620f["build()"]
  d5d48970_132e_17c0_2e93_0133c680620f -->|calls| b32f1881_15aa_1bb9_8dca_d93a8f255f33
  78a56902_4c73_8c79_670c_b0892220d8bf["add_def()"]
  78a56902_4c73_8c79_670c_b0892220d8bf -->|calls| b32f1881_15aa_1bb9_8dca_d93a8f255f33
  a371f6e5_533d_c77c_0845_0f266fd38469["add_defaults()"]
  a371f6e5_533d_c77c_0845_0f266fd38469 -->|calls| b32f1881_15aa_1bb9_8dca_d93a8f255f33
  style b32f1881_15aa_1bb9_8dca_d93a8f255f33 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/types.rs lines 417–431

    pub fn add(&mut self, name: &str, glob: &str) -> Result<(), Error> {
        if name == "all" || !name.chars().all(|c| c.is_alphanumeric()) {
            return Err(Error::InvalidDefinition);
        }
        let (key, glob) = (name.to_string(), glob.to_string());
        self.types
            .entry(key)
            .or_insert_with(|| FileTypeDef {
                name: name.to_string(),
                globs: vec![],
            })
            .globs
            .push(glob);
        Ok(())
    }

Domain

Subdomains

Frequently Asked Questions

What does add() do?
add() is a function in the tailwindcss codebase, defined in crates/ignore/src/types.rs.
Where is add() defined?
add() is defined in crates/ignore/src/types.rs at line 417.
What calls add()?
add() is called by 3 function(s): add_def, add_defaults, build.

Analyze Your Own Codebase

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

Try Supermodel Free