Home / Function/ scan() — tailwindcss Function Reference

scan() — tailwindcss Function Reference

Architecture documentation for the scan() function in mod.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  38bee1fa_4e14_30fb_3457_939e60cb3dd2["scan()"]
  d865d4fd_bb15_6d9a_a900_10e82a6856fb["mod.rs"]
  38bee1fa_4e14_30fb_3457_939e60cb3dd2 -->|defined in| d865d4fd_bb15_6d9a_a900_10e82a6856fb
  98a265b3_e586_5ffa_483e_55b79182bfbc["scan_sources()"]
  38bee1fa_4e14_30fb_3457_939e60cb3dd2 -->|calls| 98a265b3_e586_5ffa_483e_55b79182bfbc
  71d580ee_7b1d_18a6_7e10_fcd29d80bbb7["extract_candidates()"]
  38bee1fa_4e14_30fb_3457_939e60cb3dd2 -->|calls| 71d580ee_7b1d_18a6_7e10_fcd29d80bbb7
  style 38bee1fa_4e14_30fb_3457_939e60cb3dd2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/scanner/mod.rs lines 181–197

    pub fn scan(&mut self) -> Vec<String> {
        self.scan_sources();

        // TODO: performance improvement, bail early if we don't have any changed content
        // if self.changed_content.is_empty() {
        //     return vec![];
        // }

        let _new_candidates = self.extract_candidates();

        // Make sure we have a sorted list of candidates
        let mut candidates = self.candidates.iter().cloned().collect::<Vec<_>>();
        candidates.par_sort_unstable();

        // Return all candidates instead of only the new ones
        candidates
    }

Domain

Subdomains

Frequently Asked Questions

What does scan() do?
scan() is a function in the tailwindcss codebase, defined in crates/oxide/src/scanner/mod.rs.
Where is scan() defined?
scan() is defined in crates/oxide/src/scanner/mod.rs at line 181.
What does scan() call?
scan() calls 2 function(s): extract_candidates, scan_sources.

Analyze Your Own Codebase

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

Try Supermodel Free