pub struct BoundaryRule {
pub from: String,
pub allow: Vec<String>,
pub allow_type_only: Vec<String>,
}Expand description
An import rule between zones.
Fields§
§from: StringThe zone this rule applies to (the importing side).
allow: Vec<String>Zones that from is allowed to import from. Self-imports are always allowed.
An empty list means the zone may not import from any other zone.
allow_type_only: Vec<String>Zones that from may type-only-import from even when not listed in
allow. Mirrors the allow shape: a list of target zone names. A
type-only import declaration (import type {...}, import type * as ns,
or a per-specifier inline type qualifier on every named specifier) to a
listed zone is not reported as a boundary violation. Mixed-specifier
imports (import { type Foo, Bar }) that carry at least one value
symbol still fire because the runtime dependency on Bar is real.
Type-only re-exports (export type { Foo } from "...") participate
in the same allowance because they surface as edges flagged
is_type_only: true and, like type-only imports, are erased at
compile time.
Trait Implementations§
Source§impl Clone for BoundaryRule
impl Clone for BoundaryRule
Source§fn clone(&self) -> BoundaryRule
fn clone(&self) -> BoundaryRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BoundaryRule
impl Debug for BoundaryRule
Source§impl<'de> Deserialize<'de> for BoundaryRule
impl<'de> Deserialize<'de> for BoundaryRule
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 BoundaryRule
impl JsonSchema for BoundaryRule
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