Expand description
NichLink runtime: trace state, macros, and the authoring executor. The registry tree and plugin protocol live in the kernel; this crate is the run_method execution surface. NichLink 运行期:trace 状态、宏与 authoring 执行器。 注册树与插件协议在 kernel;本 crate 是 run_method 执行面。
Re-exports§
pub use authoring::*;pub use call_report::*;pub use runtime::*;
Modules§
- artifact
- Verified plugin artifacts and selection decisions. 已验证插件工件与筛选决策。
- authoring
- File-backed authoring for NichLink registration faces. NichLink 注册面的文件化创作支持。
- call_
report - Headless call reports shared by the core and the optional Studio. 注册核心与可选 Studio 共用的无终端调用报告。
- catalog
- Plugin lock records and catalog matching. 插件锁记录与清单匹配。
- contracts
- Flow contracts and plugin records carried by registration declarations. 注册声明携带的数据流合同与插件记录。
- declaration
- Registration declarations and compile-time construction contracts. 注册声明与编译期构造合同。
- diagnostic
- Shared structured diagnostics and terminal tree rendering. 共享结构化诊断与终端树形渲染。
- face_
field - Named indices of the registration-face authoring layout. 注册面创作布局的具名下标。
- graft
- Atomic graft commands and validation errors. 原子嫁接命令与校验错误。
- graft_
document - The document module’s historical path on this surface.
文档模块在本执行面上的历史路径。
The persisted
graft.plandocument. 持久化的graft.plan文档。 - identity
- Dependency-free, compile-time SHA-256 node identities. 零依赖、编译期计算的 SHA-256 节点身份。
- json
- JSON string encoding, shared by every artifact this workspace writes. 本工作区写出的每个 JSON 工件共用的 JSON 字符串编码。
- lexicon
- Text contracts shared by every NichLink surface. 每个 NichLink 执行面共享的文本契约。
- macros
- Registration-face macros. 注册面宏。
- mir
- Static MIR candidates and evidence-aware call relation merging.
Pure protocol logic: parsing rustc
-Zunpretty=mirtext and JSONL artifacts, and merging static candidates with live edges supplied by the caller. Never treats static candidates as live facts. 静态 MIR 候选与带证据等级的调用关系归并。 纯协议逻辑:解析 rustc-Zunpretty=mir文本与 JSONL artifact, 并把静态候选与调用方提供的 live 边归并;绝不把静态候选当成 live 事实。 - plugin
- Plugin protocol. The implementation lives in the kernel
pluginmodule; this shim keeps the historicalnichlink_run_method::pluginpath. 插件协议。实现本体在 kernel 的plugin模块; 本 shim 保留nichlink_run_method::plugin历史路径。 - plugin_
policy - Plugin execution policy and adapter contracts. 插件执行策略与适配器合同。
- registry
- Registry tree. The implementation lives in the kernel
treemodule; this shim keeps the historicalnichlink_run_method::registrypath. 注册树。实现本体在 kernel 的tree模块; 本 shim 保留nichlink_run_method::registry历史路径。 - registry_
core - Core registry modules. Concrete application faces live in the consuming crate. 内核注册模块。具体应用的注册面住在消费它的 crate 里。
- release
- Compact registration topology retained by release applications. 正式应用保留的紧凑注册拓扑。
- requirements
- Capability requirements analysis over a registration declaration set. Pure graph logic: the caller collects declarations and requirements from wherever they live (build scans files, tools read snapshots) and the kernel decides which requirements miss an ancestor provider. 对注册声明集合做能力需求分析。纯图逻辑:由调用方从任意来源收集 声明与需求(build 扫文件、工具读快照),kernel 判定哪些需求 在祖先链上找不到提供者。
- runtime
- Observed call edges and evidence shared by tracing and tooling. 追踪与工具共用的已观测调用边与证据。
- slot
- Runtime plugin-slot validation shared by every execution adapter. 各执行适配器共用的运行时插件槽校验。
- source
- Pure Rust-source lexer shared by search, callgraph, and indexing tools. 供搜索、调用图与索引工具共用的纯 Rust 源码词法器。
- syntax
- Parser shared by build-time checks and live authoring. 构建期检查与实时编辑共用的注册面解析器。
- tree
- Registry tree: the one
Registrytype plus the pure operations over it. 注册树:唯一的Registry类型与作用于其上的纯操作。 - trust
- Plugin trust policy and verification errors. 插件信任策略与验证错误。
Macros§
- __
face_ trait_ labels_ or - Labels for the traits a face declares, derived from the paths it wrote. 注册面声明实现的 trait 标签,从其写下的路径派生。
- __
registration_ face - Expand one fully normalized registration face into consts and submission. 把一个完整规范化的注册面展开为常量与提交调用。
- application
- Declare the single host entry used by source-scope discovery. 声明源码作用域发现使用的唯一宿主入口。
- external_
object kindis the handle-marker type this file declares (pub struct <Kind>;), so write that type first and reference it here: an editor cannot complete a name the author has not written yet, andkindis captured as an identifier rather than an expression, which is also why value completion does not fire there. Every other field completes normally.kind就是本文件声明的那个 handle 标记类型(pub struct <Kind>;):先写出该类型, 再在这里引用它。编辑器无法补全一个作者还没写下的名字,而且kind是以标识符而非 表达式捕获的——这也是它的值位不会弹候选的原因。其余字段的值都能正常补全。 Declare a registration face:kindis the only required field; every other field is optional and defaults the way the generated compact form defaults them —sourceto this file,preset/partstoNoPreset/NoParts,handleandparamstokind,nameto the kind’s spelling,summaryto empty,exports/requires/provides/runtime_checksto empty,needs_registrytofalse,registry_nameto the module’s last segment,parentto the package’s root,getting_from_other_registrytoNone,registry_rule_pathto this file, andregistry_ruletoRegistrationRule::ANY(see the comment in the expansion). 声明一个注册面:只有kind必填,其余字段都可省略,并按生成的紧凑形式取默认值——source取本文件、preset/parts取NoPreset/NoParts、handle取kind、handle/params取 kind、name取 kind 的拼写、summary取空、exports/requires/provides/runtime_checks取空、needs_registry取false、registry_name取模块名末段、parent取包根、getting_from_other_registry取None、registry_rule_path取 本文件、registry_rule取RegistrationRule::ANY(原因见展开处的注释)。 Declare a registration face owned by an external crate. 声明由外部 crate 所有的注册面。- face_
fields - The face field front end, re-exported so a host does not have to depend on the proc-macro crate itself. 注册面字段前端;再导出后宿主无需自己依赖 proc-macro crate。 Rewrite one face declaration’s field list into its accepted order, with tolerant separators and spanned diagnostics. 把一条注册面声明的字段列表改写成它接受的顺序,容忍分隔符差异并给出带 span 的诊断。
- face_
fields_ mirror - The editor-only field mirror used by generated aliases. 生成的别名使用的、仅供编辑器的字段镜像。 The editor-only field mirror for a declaration the caller already split. 为调用方已切分好的声明生成仅供编辑器的字段镜像。
- graft_
plan - Build a persistent external graft overlay without touching source files. 构造持久化外部 graft 覆盖计划,不移动或修改任何源码文件。
- host
- Pull the build-time registration plan into the crate root. 把构建期捕获的注册计划引入 crate 根。
- static_
graft_ plan - Declare graft selectors for build-time capture without constructing a
runtime
GraftPlan. 声明供构建阶段捕获的 graft selector,不构造运行时GraftPlan。 - trace_
call - Record one logical function invocation with its source location. 用一条宏调用记录一次逻辑函数调用,并保留源码位置。
- trace_
call_ result - Record a fallible invocation according to the trace policy. 按追踪策略记录一个可失败的函数调用。
- trace_
consume - Capture a value consumed by another function parameter. 记录值被另一个函数参数消费的位置。
- trace_
return - Capture a function return value and connect it to its input. 记录函数返回值,并把它连接到输入值。
- trace_
transform - Capture a transformed value and connect it to its producer. 记录转换后的值,并把它连接到生产者。
- trace_
value - Capture a function input or local value at the macro call site. 在宏调用位置记录函数输入或局部值。
Structs§
- Admission
- Dependency admission for objects produced outside the current registry tree. 当前注册树对外部注册机产物的依赖门禁。
- Build
Diagnostic - One declaration error before it is rendered for rustc or a terminal. 在输出给 rustc 或终端之前的一条声明错误。
- Build
Diagnostics - Sorted, deduplicated collection of
BuildDiagnostics. 排序去重后的BuildDiagnostic集合。 - Call
Edge - One call edge that was observed while a
CallTraceframe was active.CallTrace中实际观察到的一条调用边。 - Call
Relation - One call edge normalized across runtime, MIR, and source evidence. 跨运行时、MIR、源码证据统一表示的一条调用边。
- Call
Site - One call edge that was observed while a
CallTraceframe was active.CallTrace中实际观察到的一条调用边。 - Call
Tree - A focus and every symbol it reaches inside the budgets. 一个焦点,以及它在预算内能到达的全部符号。
- Call
Tree Edge - One call relation whose two ends are both placed in the tree. 一条两端都已放置在树中的调用关系。
- Call
Tree Node - One placed symbol in the call tree. 调用树中已放置的一个符号。
- Capability
Declaration - One registration declaration that may provide capabilities to its subtree. 一条可能向子树提供能力的注册声明。
- Capability
Requirement - One
requires = ...entry collected from a registration face. 从注册面收集到的一条requires = ...需求。 - Contract
Id - 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 坐标。
- CutGraft
Command - Parsed
cut [A/a1/b2] graft replacementcommand. 解析cut [A/a1/b2] graft replacement命令。 - Face
Field Presentation - Static presentation metadata for one registration-face field. 一个注册面字段的静态展示元数据。
- Face
Syntax - Parsed registration declaration, independent of the macro that consumes it. 已解析的注册声明,与消费它的宏实现无关。
- Face
Syntax Error - Why a declaration could not be parsed, and where when that is known. 声明为何解析不了;位置已知时一并给出。
- Flow
Contract - The mechanically comparable part of a data-flow contract. 数据流合同中可以机械比较的部分。
- Framework
Id - A stable host identity. Package names are not enough when several frameworks share one process. 稳定的宿主身份。同一进程存在多个框架时,crate 名称并不足以区分目标。
- Graft
Cut - One path cut and its external implementation selector. 一条路径切口及其外部实现选择器。
- Graft
Expressions - Rust expressions used by a typed graft cut, in source order. 类型化 graft 切口使用的 Rust 表达式,按源码顺序。
- Graft
Plan - A persistent overlay plan. It never moves or edits source files. 持久化覆盖计划;它永不移动或编辑源码文件。
- Graft
Plan Document - One external overlay declaration as written to
graft.plan. 写进graft.plan的一条外部覆盖声明。 - Graft
Syntax - A host-declared external graft cut discovered before code generation. 在代码生成前从宿主入口发现的一条外部 graft 切口。
- Localized
Text - Bilingual text kept on the registration face. 注册面上的双语文本。
- Logical
Call Edge - A call edge with invocation IDs removed for topology queries. 去掉调用实例编号、用于拓扑查询的逻辑调用边。
- MirCall
- One direct call sighting extracted from a MIR artifact. 从 MIR artifact 中提取到的一条直接调用观测。
- MirGraph
- Every candidate one MIR artifact offered, before any merge. 一份 MIR artifact 提供的全部候选,尚未归并。
- MirLocal
- One local binding sighting extracted from a MIR artifact. 从 MIR artifact 中提取到的一条局部绑定观测。
- MirParse
Error - Why one line of a MIR artifact could not be read. MIR artifact 某一行无法读取的原因。
- NoParts
- Marker parts for a face that supplies no parts. 不提供任何 part 的注册面所使用的标记类型。
- NoPreset
- Marker preset for a face that is constructed without a preset. 不需要 preset 即可构造的注册面所使用的标记类型。
- NodeId
- Stable source identity shared by registration, diagnostics, and pruning. 注册、诊断和修剪共用的稳定源码身份。
- Object
Contract - Runtime-readable form of the construction contract. 构造合同的运行时可读形式。
- Owned
Admission - Owned twin of
Admission, the external-dependency gate.Admission的 owned 孪生:外部依赖门禁。 - Owned
Flow Contract - Owned flow contract used by file-backed snapshots. 文件快照使用的拥有型数据流合同。
- Owned
Localized Text - Owned twin of
LocalizedTextfor reloadable declarations.LocalizedText的 owned 孪生,供可热重载声明使用。 - Owned
Object Contract - Owned twin of
ObjectContract, the construction contract.ObjectContract的 owned 孪生:构造合同。 - Owned
Registration Rule - Owned twin of
RegistrationRule, the structural entry rule.RegistrationRule的 owned 孪生:注册面的结构入门规范。 - Owned
Requirement Spec - Owned twin of
RequirementSpecfor reloadable declarations.RequirementSpec的 owned 孪生,供可热重载声明使用。 - Owned
Source Location - Owned declaration location used by reloadable registration faces. 可重载注册面使用的自有声明位置。
- Parse
Node IdError - The error
NodeId::from_strreturns for input that is not exactly 32 hexadecimal digits.NodeId::from_str对不是恰好 32 个十六进制数字的输入返回的错误。 - Plugin
Artifact - External registration data together with the bytes that produced it. 外部注册声明及其对应的插件字节。
- Plugin
Catalog - Parsed plugin selections kept separate from the Rust linking entries. 与 Rust 链接入口分离的插件选择记录。
- Plugin
Manifest - Plugin manifest metadata. 插件 manifest 元数据。
- Plugin
Policy - Host policy for selecting which linked plugin manifests may participate. 宿主选择已链接插件是否参与的策略。
- Plugin
Record - One parsed plugin lock line, kept as typed fields. 一条解析后的插件锁记录,保留为带类型的字段。
- Plugin
Revocation - A withdrawn package version, matched exactly by package and version. 已撤销的包版本,按包名与版本精确匹配。
- Plugin
Trust Policy - A small, dependency-free trust policy for plugin bytes. 一个零依赖的插件字节信任策略。
- Provenance
- Ordered evidence explaining how a runtime value was produced. 说明某个运行期取值如何产生的有序证据。
- Provenance
Step - One observation in a provenance chain: which node, object, and operation produced a value. 来源链中的一条观测:记录哪个节点、对象与操作产出了某个取值。
- Registration
Info - Declarative information for an ordinary object or a registry owner. 普通 object 或注册机拥有者的声明式注册信息。
- Registration
Rule - Structural rule for faces entering a Registry. 注册面进入 Registry 时必须满足的结构规范。
- Registration
Snapshot - Owned registration metadata used by file-backed authoring and reloads. 文件创作与热刷新使用的拥有所有权注册元数据。
- Registration
State - One hop of the registration chain that reached the failing face. 抵达失败注册面所经注册链上的一跳。
- Registry
- Parent and child levels use this exact type. 父级和子级使用完全相同的类型。
- Registry
Error - One structured registration failure, with the evidence that produced it. 一条结构化注册失败,以及产生它的证据。
- Registry
Index - A flattened lookup index built from one registry subtree. 由一棵注册子树构建的扁平查找索引。
- Registry
Storage Stats - How much storage one registry tree occupies, as page and entry counts. 一棵注册树占用的存储规模,以页与条目计数表示。
- Requirement
Spec - One capability requirement and the object expected to provide it. 一条能力需求,以及本应提供它的对象。
- Runtime
Check Failure - Evidence returned when a runtime check rejects a value. 运行期检查拒绝某个取值时返回的证据。
- Source
Function - One Rust function discovered in a source file. 在源码文件中发现的一个 Rust 函数。
- Source
Location - File and line captured at the declaration site. 在声明点捕获的文件和行号。
- Source
References - Paths one file’s executable expressions mention, and how much the scan could actually see. 一个文件的可执行表达式提到的路径,以及这次扫描实际能看到多少。
- Source
Walk - Which subtrees a source walk never enters. 源码遍历永不进入的子树。
- Stable
Face Id - A logical face identity that can survive a source-file move. 可跨源码文件移动保持不变的逻辑注册面身份。
- Static
Face - One built-in face after registration checks have passed. 通过注册检查后的一个内置注册面。
- Static
Graft Cut - One host-declared external graft cut retained in release metadata. 正式构建保留的一条宿主外部 graft 切口元数据。
- Static
Plan - A zero-allocation view of the built-in registration tree. 内置注册树的零分配视图。
- Syntax
Location - A position inside a parsed source file, one-based in both axes. 已解析源文件里的位置,两个轴都从 1 开始。
- Topology
Record - One registration face participating in a topology check. 参与拓扑校验的一个注册面。
- Verified
Plugin Artifact - Plugin bytes that passed the configured trust policy. 已通过宿主信任策略的插件字节。
Enums§
- CutTarget
- How a release-time graft selector addresses a face. 发布态 graft 选择器如何寻址一个注册面。
- Diagnostic
Source - Source data shared by compiled declarations and reloadable snapshots. 编译期声明与可重载快照共用的源码位置。
- Evidence
Kind - Provenance of a relationship across runtime, MIR, and source evidence. 运行时、MIR 与源码证据共用的关系来源。
- Face
Field Role - Field role shown next to each label in the field guide. 字段指南中标签旁展示的角色。
- Flow
Semantic - Normalized semantic labels used by tooling when string contracts are too coarse to explain a mismatch (for example local vs absolute coordinates). 调试工具使用的规范化语义标签,避免仅凭字符串无法解释坐标域差异。
- Graft
Error - Reasons a graft was rejected before the live tree was touched. 嫁接在修改线上树之前被拒绝的原因。
- Graft
Plan Document Error - Why a
graft.plandocument was refused.graft.plan文档被拒绝的原因。 - Keep
- What a walk should do with one
.rsfile it found. 遍历发现一个.rs文件后应当做什么。 - Parent
Syntax - How a declaration names its parent, kept as written rather than resolved. 声明如何命名其父级,按原文保留而不在此解析。
- Plugin
Adapter - Where plugin code executes. Native code is trusted process code; the other two modes are explicit isolation choices for untrusted extensions. 插件代码的执行隔离方式。Native 与宿主同进程;另外两种是明确的隔离选项。
- Plugin
Assurance - The strongest check actually performed on an artifact. 插件工件实际完成的最高校验等级。
- Plugin
Channel - Trust lane enabled for one runtime plugin slot. 运行时插件槽允许使用的信任通道。
- Plugin
Decision - One auditable plugin-selection result. 一条可审计的插件筛选结果。
- Plugin
Mode - Whether a plugin adds a new capability or replaces an existing slot. 插件是增加能力还是替换已有插槽。
- Plugin
Reject Reason - Why a plugin-selection decision refused a manifest. 插件筛选决策拒绝某个 manifest 的原因。
- Plugin
Source - Where the plugin came from. Trust policy is deliberately separate from registration structure and flow compatibility. 插件来源。信任策略与注册结构、数据流兼容性刻意分离。
- Plugin
Trust Error - Why plugin trust verification refused an artifact. 插件信任校验拒绝某个工件的原因。
- Runtime
Check Spec - A named, parameterized check the host runs on produced values. 宿主对产出取值执行的具名参数化校验。
- Runtime
Value - A value observed at runtime, tagged with the evidence that produced it. 运行期观测到的取值,并携带产出它的证据。
- Slot
Validation Error - Why a plugin artifact was rejected for one slot. 插件工件被某个插件槽拒绝的原因。
- Trace
Mode - Runtime collection policy. 运行时追踪收集策略。
Constants§
- BUILD_
VERBOSE_ ENV - The environment variable that asks the build step for a verbose status line. 向构建步骤索取详细状态行的环境变量。
- COORDINATES_
IN_ VIEWPORT - The viewport-fitting check, for authoring code to name directly. 视口适配检查,供创作代码直接引用的常量。
- DEFAULT_
NAMESPACE - The namespace a face lands under when nothing selects one. 没有任何东西选择时,注册面所属的命名空间。
- ENTRY_
ENV - The environment variable that pins the host entry file. 固定宿主入口文件的环境变量。
- EXTERNAL_
GRAFT_ DIR - Directory name, under
NICHLINK_DIR, holding external graft plans.NICHLINK_DIR下存放外部 graft 计划的目录名。 - FACE_
FIELD_ COLLECTOR - The front-end marker that selects the collector adapter. 选择 collector 适配层的前端标记。
- FACE_
FIELD_ COUNT - Number of slots in the authoring layout. 创作布局的槽位数量。
- FACE_
FIELD_ ORDER - The face fields in the order the authoring macros accept them. 作者侧宏接受的注册面字段顺序。
- FACE_
FIELD_ PLUGIN - The face field that marks replaceable plugin surface. 标记可替换插件面的注册面字段。
- FINITE_
NUMBER - The finite-number check, for authoring code to name directly. 有限数检查,供创作代码直接引用的常量。
- GENERATED_
LIB_ FILE - The generated crate entry the build step writes and the host includes. 构建步骤写盘、宿主 crate include 的生成入口文件名。
- GRAFT_
PLAN_ FILE - File name of one external graft plan. 单个外部 graft 计划的文件名。
- GRAFT_
PLAN_ VERSION - The only
graft.planlayout this build understands. 本版本唯一能读懂的graft.plan版式。 - IDENTITY_
SCHEMA - Version of the identity input and persisted catalog formats. 身份输入与持久化目录格式的版本。
- MAX_
DEPTH - How deep the walk nests before it assumes the tree is cyclic. 遍历在假定树存在环之前允许达到的深度。
- NAMESPACE_
ENV - The environment variable that pins the namespace authored faces land under. 固定创作的注册面所属命名空间的环境变量。
- NICHLINK_
DIR - Package-level directory holding NichLink’s authoring records. 存放 NichLink 创作记录的包级目录。
- NON_
EMPTY_ TEXT - The non-empty-text check, for authoring code to name directly. 非空文本检查,供创作代码直接引用的常量。
- PACKAGE_
ROOT_ ENV - The environment variable that pins the package a surface works on. 固定执行面所工作的包的环境变量。
- PLUGIN_
ABI_ VERSION - Version of the host/plugin execution ABI. 宿主与插件执行 ABI 的版本。
- ROOT_
NODE_ ID - The only node not registered through an object declaration. 唯一不通过对象声明注册的节点。
- RUN_
METHOD_ CRATE - The runtime crate’s name, as generated code and the face front end address it. 运行期 crate 的名字——生成代码与宏前端这样寻址它。
- SCOPE_
ALWAYS_ INCLUDED - Module names the first-pass source scope never prunes. 第一次源码范围永不修剪的模块名。
- SCOPE_
ENV - The environment variable that pins the first-pass source scope. 固定第一次源码范围的环境变量。
- SCOPE_
REGISTRATION_ MODULE - The module whose whole subtree carries the registration machinery, and is therefore never pruned by the first-pass scope. 整棵子树都承载注册机制的模块,因此第一次源码范围修剪永不剪掉它。
Traits§
- Flow
Contract Provider - A handle can expose its data-flow contract once; registration faces then read it without repeating input/output strings. handle 只需声明一次数据流合同;注册面直接读取,不重复填写输入输出字符串。
- Parts
Contract - Parts declare the construction shape an object supplies. parts 声明 object 实际提供的构造形状。
- Plugin
Runtime - Generic execution backend for a plugin artifact. 插件工件的泛型执行后端。
- Plugin
Signature Verifier - Host-provided cryptographic verifier for official plugin signatures. 由宿主提供的官方插件签名密码学验证器。
- Preset
Contract - A preset declares the construction shape it expects. preset 声明它要求的构造形状。
- Source
Tree - The filesystem facts a recursive source walk needs. 递归源码遍历所需的文件系统事实。
Functions§
- application_
entries - Return the host entry paths declared with
application!(entry = ...). 返回通过application!(entry = ...)声明的宿主入口路径。 - assert_
contract - Force preset and parts output types to match during macro expansion. 在宏展开时强制 preset 与 parts 的输出类型相同。
- body_
calls - Match a real function call in a body, ignoring comments, strings and macros. 只匹配函数体里的真实调用,跳过注释、字符串和宏调用。
- call_
tree - Build the layered tree a focus reaches inside a hop and node budget. 构建焦点在跳数与节点预算内到达的分层树。
- collect_
rust_ sources - Every
.rsfile underroot, depth-first, in directory order.root下每个.rs文件,深度优先,按目录顺序。 - compact_
tokens - Render a token stream as compact Rust source text. 把 token 流渲染成紧凑的 Rust 源码文本。
- direct_
calls - List the distinct direct callees of one function body, in sorted order. 列出函数体内的直接调用目标(去重并排序)。
- face_
field_ default - Effective default shown for one field, derived from the sibling values. 按同排其他取值推导某个字段的默认展示值。
- face_
field_ presentation - Presentation metadata for the authoring layout, by slot index. 按槽位下标返回创作布局的展示元数据。
- function_
source_ range - Find the 0-based inclusive line range of a function by name. 按名称查找函数的 0 起始闭区间行范围。
- function_
symbols - Index function bodies without treating comments, strings, or macro text as Rust. 扫描函数体时屏蔽注释、字符串和宏文本,避免把它们误认成 Rust 函数。
- graft_
entries - Parse static and dynamic graft declarations without executing them. 解析静态和动态 graft 声明,不执行宏。
- guard_
nesting - Refuse a source whose nesting would overflow
syn, for callers that parse text themselves. 对自行解析文本的调用方:拒绝一份嵌套会让syn栈溢出的源码。 - hex_
decode - Decode a whole even-length hexadecimal string. 解码完整偶数长度的十六进制字符串。
- is_
face_ source - Whether
sourcedeclares a registration face. 源码是否声明了注册面。 - is_
registration_ path - Whether a package-relative source path lives under the registration module. 包内相对源码路径是否位于注册模块之下。
- json_
string - Encode
valueas a complete JSON string, quotation marks included. 把value编码为完整的 JSON 字符串,含两侧引号。 - last_
path_ segment - Last
::-separated segment of a module path. 模块路径中最后一段::分隔的分量。 - manifest_
relative_ source - Derive a declaration’s
sourceidentity input fromfile!(). 从file!()推导声明的source身份输入。 - mask_
literals - Replace quoted literals with spaces while preserving offsets, keeping comments. 用空格替换引号字面量,同时保留原始偏移量,并保留注释。
- mask_
non_ code - Replace comments and quoted literals with spaces while preserving offsets. 用空格替换注释和引号字面量,同时保留原始偏移量。 Blank the contents of comments, string literals and character literals. 把注释、字符串字面量与字符字面量的内容抹成空白。
- merge_
call_ relations - Merge static MIR candidates with live edges into one evidence-aware relation list. 将静态 MIR 候选与 live 边归并为一份带证据等级的关系列表。
- missing_
capabilities - Every requirement whose ancestor chain offers no matching provider. 祖先链上找不到匹配提供者的全部需求,逐条生成诊断。
- parse_
face - Parse exactly one face, returning
Nonewhen the file has no declaration. 解析唯一注册面;文件没有声明时返回None。 - parse_
faces - Parse every NichLink face declaration in one Rust source file. 解析一个 Rust 源文件中的全部 NichLink 注册面声明。
- pascal_
case - Convert a snake_case module name into its derived PascalCase type name. 将 snake_case 模块名转换为派生的 PascalCase 类型名。
- portable_
path - Render a source path with
/separators on every platform. 在任何平台上都以/分隔符渲染源码路径。 - push_
json_ string - Append
valuetooutputas one quoted JSON string literal. 把value作为一个带引号的 JSON 字符串字面量追加到output。 - registration_
kinds - Collect the deduplicated
kind:values used in registration declarations. 收集注册声明中出现过的kind:取值,去重并排序。 - replace_
face_ macro - Replace only the registration macro, preserving the surrounding Rust code. 只替换注册宏,保留同一文件里的其余 Rust 实现。
- resolve_
namespace - Resolve the namespace authoring lands in, from the configured value. 从配置值解析创作所属的命名空间。
- resolve_
package_ root - Resolve which package a surface is working on, from values only it can read. 从只有执行面才能读取的取值,解析它正在处理哪一个包。
- root_
node_ id - Return the root identity for one isolated package namespace. 返回某个隔离包命名空间的根身份。
- same_
symbol - Whether two logical symbols name the same function. 两个逻辑符号是否指向同一个函数。
- same_
text - Whether two strings are the same text, usable in a const context. 两个字符串文本是否相同,可在 const 语境中使用。
- sha256_
hex - Dependency-free SHA-256, hex-encoded. Shares the digest core with
sha256_prefix; do not add a second implementation. 零依赖 SHA-256,输出十六进制。与sha256_prefix共用同一个摘要核心, 不要再写第二份实现。 - source_
file_ matches - Whether a recorded source path matches a lowercase search needle. 记录的源码路径是否匹配一个小写的搜索关键词。
- source_
references - Collect paths used by executable expressions, excluding imports, comments, strings, and registration-macro metadata. 收集可执行表达式使用的路径,排除导入、注释、字符串和注册宏元数据。
- strip_
path_ prefix - Like
strip_prefix, but/and\count as the same separator. 与strip_prefix相同,但/与\视为同一分隔符。 - validate_
artifact - Validate one verified artifact against a runtime slot definition. 按运行时插件槽定义校验一个已验证工件。
- validate_
face_ topology - Sort
recordsby identity, then check missing parents, parents that do not own a registry, and parent cycles. Returns the collected diagnostics. 将records按身份排序,然后检查缺失的父节点、父节点不持有注册表、 以及父链成环;返回收集到的诊断。 - validate_
graft_ selector - Check one external implementation selector against the plan format. 按计划格式校验一个外部实现选择器。
- validate_
operation_ name - Check the operation name shared by every plugin adapter. 校验各插件适配器共用的操作名。
Type Aliases§
- Call
Evidence - Unified evidence attached to one logical call relation. 一条逻辑调用关系携带的统一证据等级。
- Registry
Result - Heap-backed result for the comparatively rich structured error. 对字段较多的结构化错误使用堆分配的返回结果。