pub struct StaticGraftCut { /* private fields */ }Expand description
One host-declared external graft cut retained in release metadata. 正式构建保留的一条宿主外部 graft 切口元数据。
The table stores selectors only; it never pulls implementation code into the binary. The host resolves these selectors against an external Registry when it chooses to enable an overlay. 表中只保存选择器,不会把实现代码拉进二进制。宿主启用覆盖层时,再将选择器 解析到外部 Registry。
Implementations§
Source§impl StaticGraftCut
impl StaticGraftCut
Sourcepub const fn new(
cut: &'static str,
graft: &'static str,
full: bool,
) -> StaticGraftCut
pub const fn new( cut: &'static str, graft: &'static str, full: bool, ) -> StaticGraftCut
A single logical path replaced by a named external implementation. 用命名外部实现替换的单个逻辑路径。
Sourcepub const fn new_range(
start: &'static str,
end: &'static str,
graft: &'static str,
full: bool,
) -> StaticGraftCut
pub const fn new_range( start: &'static str, end: &'static str, graft: &'static str, full: bool, ) -> StaticGraftCut
A contiguous sibling range replaced by one external implementation. 用同一个外部实现替换的一段连续兄弟。
Sourcepub const fn from_ids(cut: NodeId, graft: NodeId, full: bool) -> StaticGraftCut
pub const fn from_ids(cut: NodeId, graft: NodeId, full: bool) -> StaticGraftCut
A single slot addressed by compile-time identity on both sides. 两侧都用编译期身份寻址的单个槽位。
Sourcepub const fn from_id_range(
start: NodeId,
end: NodeId,
graft: NodeId,
full: bool,
) -> StaticGraftCut
pub const fn from_id_range( start: NodeId, end: NodeId, graft: NodeId, full: bool, ) -> StaticGraftCut
A contiguous sibling range addressed by compile-time identity. 用编译期身份寻址的一段连续兄弟。
Sourcepub const fn cut(self) -> CutTarget
pub const fn cut(self) -> CutTarget
The selector for the slot this graft replaces; for a range, the first sibling. 该 graft 所替换槽位的选择器;区间时为起始兄弟。
Sourcepub const fn cut_end(self) -> Option<CutTarget>
pub const fn cut_end(self) -> Option<CutTarget>
The last sibling of a range, or None when the cut is a single slot.
区间的最后一个兄弟;切口为单个槽位时为 None。
Trait Implementations§
Source§impl Clone for StaticGraftCut
impl Clone for StaticGraftCut
Source§fn clone(&self) -> StaticGraftCut
fn clone(&self) -> StaticGraftCut
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more