pub struct ResolvedBoundaryConfig {
pub zones: Vec<ResolvedZone>,
pub rules: Vec<ResolvedBoundaryRule>,
}Expand description
Resolved boundary config with pre-compiled glob matchers.
Fields§
§zones: Vec<ResolvedZone>Zones with compiled glob matchers for fast file classification.
rules: Vec<ResolvedBoundaryRule>Rules indexed by source zone name.
Implementations§
Source§impl ResolvedBoundaryConfig
impl ResolvedBoundaryConfig
Sourcepub fn classify_zone(&self, relative_path: &str) -> Option<&str>
pub fn classify_zone(&self, relative_path: &str) -> Option<&str>
Classify a file path into a zone. Returns the first matching zone name. Path should be relative to the project root with forward slashes.
Sourcepub fn is_import_allowed(&self, from_zone: &str, to_zone: &str) -> bool
pub fn is_import_allowed(&self, from_zone: &str, to_zone: &str) -> bool
Check if an import from from_zone to to_zone is allowed.
Returns true if the import is permitted.
Trait Implementations§
Source§impl Debug for ResolvedBoundaryConfig
impl Debug for ResolvedBoundaryConfig
Source§impl Default for ResolvedBoundaryConfig
impl Default for ResolvedBoundaryConfig
Source§fn default() -> ResolvedBoundaryConfig
fn default() -> ResolvedBoundaryConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResolvedBoundaryConfig
impl RefUnwindSafe for ResolvedBoundaryConfig
impl Send for ResolvedBoundaryConfig
impl Sync for ResolvedBoundaryConfig
impl Unpin for ResolvedBoundaryConfig
impl UnsafeUnpin for ResolvedBoundaryConfig
impl UnwindSafe for ResolvedBoundaryConfig
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