overrides.rs — tailwindcss Source File
Architecture documentation for overrides.rs, a rust file in the tailwindcss codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 52347134_96cd_d924_bf0e_ace2445ef938["overrides.rs"] 30bf0f52_0780_5ef3_aec5_213150847fc1["super::"] 52347134_96cd_d924_bf0e_ace2445ef938 --> 30bf0f52_0780_5ef3_aec5_213150847fc1 a6aeab6e_a19a_3d64_9b92_03c5c0f78918["std::path::Path"] 52347134_96cd_d924_bf0e_ace2445ef938 --> a6aeab6e_a19a_3d64_9b92_03c5c0f78918 81ece9c1_054c_504a_d7a0_4d0590ba157c["crate::"] 52347134_96cd_d924_bf0e_ace2445ef938 --> 81ece9c1_054c_504a_d7a0_4d0590ba157c style 52347134_96cd_d924_bf0e_ace2445ef938 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/*!
The overrides module provides a way to specify a set of override globs.
This provides functionality similar to `--include` or `--exclude` in command
line tools.
*/
use std::path::Path;
use crate::{
Error, Match,
gitignore::{self, Gitignore, GitignoreBuilder},
};
/// Glob represents a single glob in an override matcher.
///
/// This is used to report information about the highest precedent glob
/// that matched.
///
/// Note that not all matches necessarily correspond to a specific glob. For
/// example, if there are one or more whitelist globs and a file path doesn't
/// match any glob in the set, then the file path is considered to be ignored.
///
/// The lifetime `'a` refers to the lifetime of the matcher that produced
/// this glob.
#[derive(Clone, Debug)]
#[allow(dead_code)]
pub struct Glob<'a>(GlobInner<'a>);
#[derive(Clone, Debug)]
#[allow(dead_code)]
enum GlobInner<'a> {
/// No glob matched, but the file path should still be ignored.
UnmatchedIgnore,
/// A glob matched.
Matched(&'a gitignore::Glob),
}
impl<'a> Glob<'a> {
fn unmatched() -> Glob<'a> {
Glob(GlobInner::UnmatchedIgnore)
}
}
/// Manages a set of overrides provided explicitly by the end user.
#[derive(Clone, Debug)]
pub struct Override(Gitignore);
impl Override {
/// Returns an empty matcher that never matches any file path.
pub fn empty() -> Override {
Override(Gitignore::empty())
}
/// Returns the directory of this override set.
///
/// All matches are done relative to this path.
pub fn path(&self) -> &Path {
self.0.path()
}
// ... (230 more lines)
Domain
Subdomains
Functions
Dependencies
- crate::
- std::path::Path
- super::
Source
Frequently Asked Questions
What does overrides.rs do?
overrides.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the Oxide domain, Scanner subdomain.
What functions are defined in overrides.rs?
overrides.rs defines 20 function(s): absolute_path, add, allow_directories, allow_unclosed_class, build, case_insensitive, default_case_sensitive, empty, gitignore, is_empty, and 10 more.
What does overrides.rs depend on?
overrides.rs imports 3 module(s): crate::, std::path::Path, super::.
Where is overrides.rs in the architecture?
overrides.rs is located at crates/ignore/src/overrides.rs (domain: Oxide, subdomain: Scanner, directory: crates/ignore/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free