from() — tailwindcss Function Reference
Architecture documentation for the from() function in sources.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 15113419_814d_14f1_3642_90be5e6abb1e["from()"] 036d66a2_233f_f820_cb3b_d6cf51bcd1a6["sources.rs"] 15113419_814d_14f1_3642_90be5e6abb1e -->|defined in| 036d66a2_233f_f820_cb3b_d6cf51bcd1a6 2f03410b_a280_9fc4_bc3b_cceef591e3f8["iter()"] 15113419_814d_14f1_3642_90be5e6abb1e -->|calls| 2f03410b_a280_9fc4_bc3b_cceef591e3f8 style 15113419_814d_14f1_3642_90be5e6abb1e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/scanner/sources.rs lines 230–261
fn from(value: PublicSourceEntry) -> Self {
let auto = value.pattern.ends_with("**/*")
|| PathBuf::from(&value.base).join(&value.pattern).is_dir();
let inside_ignored_content_dir = IGNORED_CONTENT_DIRS.iter().any(|dir| {
value.base.contains(&format!(
"{}{}{}",
std::path::MAIN_SEPARATOR,
dir,
std::path::MAIN_SEPARATOR
)) || value
.base
.ends_with(&format!("{}{}", std::path::MAIN_SEPARATOR, dir,))
});
match (value.negated, auto, inside_ignored_content_dir) {
(false, true, false) => SourceEntry::Auto {
base: value.base.into(),
},
(false, true, true) => SourceEntry::External {
base: value.base.into(),
},
(false, false, _) => SourceEntry::Pattern {
base: value.base.into(),
pattern: value.pattern,
},
(true, _, _) => SourceEntry::Ignored {
base: value.base.into(),
pattern: value.pattern,
},
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does from() do?
from() is a function in the tailwindcss codebase, defined in crates/oxide/src/scanner/sources.rs.
Where is from() defined?
from() is defined in crates/oxide/src/scanner/sources.rs at line 230.
What does from() call?
from() calls 1 function(s): iter.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free