pub struct BoundaryConfig {
pub preset: Option<BoundaryPreset>,
pub zones: Vec<BoundaryZone>,
pub rules: Vec<BoundaryRule>,
pub coverage: BoundaryCoverageConfig,
pub calls: BoundaryCallsConfig,
}Expand description
Architecture boundary configuration.
Fields§
§preset: Option<BoundaryPreset>Optional built-in preset.
zones: Vec<BoundaryZone>Zone definitions.
rules: Vec<BoundaryRule>Zone import rules.
coverage: BoundaryCoverageConfigOptional policy for files that match no zone.
calls: BoundaryCallsConfigOptional forbidden-call policy for zoned files.
Implementations§
Source§impl BoundaryConfig
impl BoundaryConfig
Sourcepub fn auto_discover_dirs(&self, project_root: &Path) -> Vec<PathBuf>
pub fn auto_discover_dirs(&self, project_root: &Path) -> Vec<PathBuf>
The directories whose child directories autoDiscover turns into
zones, as absolute paths under project_root, after the preset
expansion. A new or removed child directory changes the zones.
Invalid autoDiscover paths are left out.
Sourcepub fn expand_auto_discover(&mut self, project_root: &Path) -> Vec<LogicalGroup>
pub fn expand_auto_discover(&mut self, project_root: &Path) -> Vec<LogicalGroup>
Expand autoDiscover zones into concrete child zones.
Source§impl BoundaryConfig
impl BoundaryConfig
Sourcepub fn validate_root_prefixes(&self) -> Vec<RedundantRootPrefix>
pub fn validate_root_prefixes(&self) -> Vec<RedundantRootPrefix>
Validate that patterns do not repeat the zone root.
Sourcepub fn validate_zone_references(&self) -> Vec<UnknownZoneRef>
pub fn validate_zone_references(&self) -> Vec<UnknownZoneRef>
Validate that every zone reference points at a defined zone.
Sourcepub fn validate_call_rules(&self) -> Vec<InvalidForbiddenCallee>
pub fn validate_call_rules(&self) -> Vec<InvalidForbiddenCallee>
Validate boundaries.calls.forbidden[] callee patterns. Rejects
patterns that would parse but silently match nothing (empty or
whitespace-only patterns, a bare * with no callee segments, empty
dot-segments) and entries with an empty pattern list, so an inert rule
fails loudly at load time instead of reporting zero findings forever.
Sourcepub fn resolve(&self) -> ResolvedBoundaryConfig
pub fn resolve(&self) -> ResolvedBoundaryConfig
Resolve into compiled form with pre-built glob matchers.
Trait Implementations§
Source§impl Clone for BoundaryConfig
impl Clone for BoundaryConfig
Source§impl Debug for BoundaryConfig
impl Debug for BoundaryConfig
Source§impl Default for BoundaryConfig
impl Default for BoundaryConfig
Source§impl<'de> Deserialize<'de> for BoundaryConfig
impl<'de> Deserialize<'de> for BoundaryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for BoundaryConfig
impl JsonSchema for BoundaryConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more