pub struct SemanticBoundary { /* private fields */ }Expand description
A semantic boundary: the public API of a module must not expose any forbidden type. Declared in Rust (the single source of truth), alongside — and composed with — the static constitution at the gate. Each dimension owns its own declaration DSL and expresses findings in the shared 璇璣 model; the shell merges them into one reaction.
Implementations§
Source§impl SemanticBoundary
impl SemanticBoundary
Sourcepub fn in_crate(package: &str) -> SemanticCrateDraft
pub fn in_crate(package: &str) -> SemanticCrateDraft
Begin a semantic boundary in the crate named package.
Sourcepub fn crate_package(&self) -> &str
pub fn crate_package(&self) -> &str
The crate this boundary governs.
Sourcepub fn forbidden(&self) -> &[String]
pub fn forbidden(&self) -> &[String]
The forbidden type paths / module prefixes whose exposure is a violation.
Sourcepub fn reason(&self) -> &str
pub fn reason(&self) -> &str
The human-readable reason recorded with the boundary (the repair hint).
Sourcepub fn with_anchor(self, anchor: &str) -> Self
pub fn with_anchor(self, anchor: &str) -> Self
Attach a durable governance anchor (e.g. "ADR-014") — a stable pointer into the
project’s governance, distinct from the free-text reason. Optional; a boundary with
none projects and reacts exactly as before.
Sourcepub fn anchor(&self) -> Option<&str>
pub fn anchor(&self) -> Option<&str>
The durable governance anchor recorded with the boundary, if any.
Sourcepub fn including_trait_impls(&self) -> bool
pub fn including_trait_impls(&self) -> bool
Whether the boundary also observes trait impl blocks (the opt-in
semantic-trait-impl-exposure depth). false is the v1 signature-coupling surface.
Trait Implementations§
Source§impl Clone for SemanticBoundary
impl Clone for SemanticBoundary
Source§fn clone(&self) -> SemanticBoundary
fn clone(&self) -> SemanticBoundary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more