Skip to main content

Module declaration

Module declaration 

Source
Expand description

Registration declarations and compile-time construction contracts. 注册声明与编译期构造合同。

The vocabulary is split by concept, and the file tree mirrors that split. Plugin records are defined in the plugin module and re-exported here, so a declaration still names them (declaration::PluginManifest) without this module owning a second copy. 词表按概念拆分,文件树与之一致。插件记录定义在 plugin 模块并在此再导出,因此声明 仍以原名引用它们(declaration::PluginManifest),而本模块不持有第二份副本。

Structs§

Admission
Dependency admission for objects produced outside the current registry tree. 当前注册树对外部注册机产物的依赖门禁。
CallEdge
One call edge that was observed while a CallTrace frame was active. CallTrace 中实际观察到的一条调用边。
CallSite
One call edge that was observed while a CallTrace frame was active. CallTrace 中实际观察到的一条调用边。
ContractId
A logical replacement slot. Concrete implementations keep their own node identity; the slot is the stable name that a graft targets. 逻辑替换插槽。具体实现保留各自 node identity;嫁接针对的是稳定插槽名。
Coordinates
UI coordinates with actual and expected coordinate spaces. 同时携带实际坐标系和预期坐标系的 UI 坐标。
FlowContract
The mechanically comparable part of a data-flow contract. 数据流合同中可以机械比较的部分。
FrameworkId
A stable host identity. Package names are not enough when several frameworks share one process. 稳定的宿主身份。同一进程存在多个框架时,crate 名称并不足以区分目标。
LocalizedText
Bilingual text kept on the registration face. 注册面上的双语文本。
LogicalCallEdge
A call edge with invocation IDs removed for topology queries. 去掉调用实例编号、用于拓扑查询的逻辑调用边。
NoParts
Marker parts for a face that supplies no parts. 不提供任何 part 的注册面所使用的标记类型。
NoPreset
Marker preset for a face that is constructed without a preset. 不需要 preset 即可构造的注册面所使用的标记类型。
ObjectContract
Runtime-readable form of the construction contract. 构造合同的运行时可读形式。
OwnedAdmission
Owned twin of Admission, the external-dependency gate. Admission 的 owned 孪生:外部依赖门禁。
OwnedFlowContract
Owned flow contract used by file-backed snapshots. 文件快照使用的拥有型数据流合同。
OwnedLocalizedText
Owned twin of LocalizedText for reloadable declarations. LocalizedText 的 owned 孪生,供可热重载声明使用。
OwnedObjectContract
Owned twin of ObjectContract, the construction contract. ObjectContract 的 owned 孪生:构造合同。
OwnedRegistrationRule
Owned twin of RegistrationRule, the structural entry rule. RegistrationRule 的 owned 孪生:注册面的结构入门规范。
OwnedRequirementSpec
Owned twin of RequirementSpec for reloadable declarations. RequirementSpec 的 owned 孪生,供可热重载声明使用。
OwnedSourceLocation
Owned declaration location used by reloadable registration faces. 可重载注册面使用的自有声明位置。
PluginManifest
Plugin manifest metadata. 插件 manifest 元数据。
Provenance
Ordered evidence explaining how a runtime value was produced. 说明某个运行期取值如何产生的有序证据。
ProvenanceStep
One observation in a provenance chain: which node, object, and operation produced a value. 来源链中的一条观测:记录哪个节点、对象与操作产出了某个取值。
RegistrationInfo
Declarative information for an ordinary object or a registry owner. 普通 object 或注册机拥有者的声明式注册信息。
RegistrationRule
Structural rule for faces entering a Registry. 注册面进入 Registry 时必须满足的结构规范。
RegistrationSnapshot
Owned registration metadata used by file-backed authoring and reloads. 文件创作与热刷新使用的拥有所有权注册元数据。
RequirementSpec
One capability requirement and the object expected to provide it. 一条能力需求,以及本应提供它的对象。
RuntimeCheckFailure
Evidence returned when a runtime check rejects a value. 运行期检查拒绝某个取值时返回的证据。
SourceLocation
File and line captured at the declaration site. 在声明点捕获的文件和行号。

Enums§

EvidenceKind
Provenance of a relationship across runtime, MIR, and source evidence. 运行时、MIR 与源码证据共用的关系来源。
FlowSemantic
Normalized semantic labels used by tooling when string contracts are too coarse to explain a mismatch (for example local vs absolute coordinates). 调试工具使用的规范化语义标签,避免仅凭字符串无法解释坐标域差异。
PluginMode
Whether a plugin adds a new capability or replaces an existing slot. 插件是增加能力还是替换已有插槽。
PluginSource
Where the plugin came from. Trust policy is deliberately separate from registration structure and flow compatibility. 插件来源。信任策略与注册结构、数据流兼容性刻意分离。
RuntimeCheckSpec
A named, parameterized check the host runs on produced values. 宿主对产出取值执行的具名参数化校验。
RuntimeValue
A value observed at runtime, tagged with the evidence that produced it. 运行期观测到的取值,并携带产出它的证据。
TraceMode
Runtime collection policy. 运行时追踪收集策略。

Constants§

COORDINATES_IN_VIEWPORT
The viewport-fitting check, for authoring code to name directly. 视口适配检查,供创作代码直接引用的常量。
FACE_FIELD_ORDER
The face fields in the order the authoring macros accept them. 作者侧宏接受的注册面字段顺序。
FINITE_NUMBER
The finite-number check, for authoring code to name directly. 有限数检查,供创作代码直接引用的常量。
NON_EMPTY_TEXT
The non-empty-text check, for authoring code to name directly. 非空文本检查,供创作代码直接引用的常量。

Traits§

FlowContractProvider
A handle can expose its data-flow contract once; registration faces then read it without repeating input/output strings. handle 只需声明一次数据流合同;注册面直接读取,不重复填写输入输出字符串。
PartsContract
Parts declare the construction shape an object supplies. parts 声明 object 实际提供的构造形状。
PresetContract
A preset declares the construction shape it expects. preset 声明它要求的构造形状。

Functions§

assert_contract
Force preset and parts output types to match during macro expansion. 在宏展开时强制 preset 与 parts 的输出类型相同。
portable_path
Render a source path with / separators on every platform. 在任何平台上都以 / 分隔符渲染源码路径。
source_file_matches
Whether a recorded source path matches a lowercase search needle. 记录的源码路径是否匹配一个小写的搜索关键词。