pub struct LayerClassifier { /* private fields */ }Expand description
Classifies file paths into architectural layers using glob patterns.
Implementations§
Source§impl LayerClassifier
impl LayerClassifier
pub fn new(config: &LayersConfig) -> Self
Sourcepub fn classify(&self, path: &str) -> Option<ArchLayer>
pub fn classify(&self, path: &str) -> Option<ArchLayer>
Classify a file path into an architectural layer.
Sourcepub fn architecture_mode(&self, path: &str) -> ArchitectureMode
pub fn architecture_mode(&self, path: &str) -> ArchitectureMode
Get the architecture mode for a given file path. Checks overrides first (first scope match wins), falls back to global default.
Sourcepub fn is_cross_cutting(&self, path: &str) -> bool
pub fn is_cross_cutting(&self, path: &str) -> bool
Check if a path matches cross-cutting concern patterns.
Sourcepub fn is_cross_cutting_import(&self, import_path: &str) -> bool
pub fn is_cross_cutting_import(&self, import_path: &str) -> bool
Check if an import path matches cross-cutting concern patterns. Generates candidate paths to bridge Go-style import paths with file-path-style globs.
Sourcepub fn classify_import(&self, import_path: &str) -> Option<ArchLayer>
pub fn classify_import(&self, import_path: &str) -> Option<ArchLayer>
Classify an import path string into an architectural layer.
Auto Trait Implementations§
impl Freeze for LayerClassifier
impl RefUnwindSafe for LayerClassifier
impl Send for LayerClassifier
impl Sync for LayerClassifier
impl Unpin for LayerClassifier
impl UnsafeUnpin for LayerClassifier
impl UnwindSafe for LayerClassifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more