Skip to main content

StaticGraftCut

Struct StaticGraftCut 

Source
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

Source

pub const fn new( cut: &'static str, graft: &'static str, full: bool, ) -> StaticGraftCut

A single logical path replaced by a named external implementation. 用命名外部实现替换的单个逻辑路径。

Source

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. 用同一个外部实现替换的一段连续兄弟。

Source

pub const fn from_ids(cut: NodeId, graft: NodeId, full: bool) -> StaticGraftCut

A single slot addressed by compile-time identity on both sides. 两侧都用编译期身份寻址的单个槽位。

Source

pub const fn from_id_range( start: NodeId, end: NodeId, graft: NodeId, full: bool, ) -> StaticGraftCut

A contiguous sibling range addressed by compile-time identity. 用编译期身份寻址的一段连续兄弟。

Source

pub const fn cut(self) -> CutTarget

The selector for the slot this graft replaces; for a range, the first sibling. 该 graft 所替换槽位的选择器;区间时为起始兄弟。

Source

pub const fn cut_end(self) -> Option<CutTarget>

The last sibling of a range, or None when the cut is a single slot. 区间的最后一个兄弟;切口为单个槽位时为 None。

Source

pub const fn graft(self) -> CutTarget

The selector for the external implementation that replaces the cut. 替换该切口的外部实现选择器。

Source

pub const fn full(self) -> bool

Whether the whole subtree rooted at the cut is replaced. 是否替换切口根节点下的整棵子树。

Trait Implementations§

Source§

impl Clone for StaticGraftCut

Source§

fn clone(&self) -> StaticGraftCut

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StaticGraftCut

Source§

impl Debug for StaticGraftCut

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for StaticGraftCut

Source§

impl PartialEq for StaticGraftCut

Source§

fn eq(&self, other: &StaticGraftCut) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StaticGraftCut

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.