pub struct ChildList<Id>{ /* private fields */ }Expand description
子节点容器:≤3 个孩子零堆分配(AST 绝大多数节点—— Binary/Assign=2、Member/MethodRef=1、VarDecl≤1、Literal=0…… 大语料 malloc 采样的剩余大头是每节点一次 Vec 堆分配); ≥4 溢出到堆。Block/Call 大参数列表溢出属预期路径。
Id 需 Copy + Default(Default 作为空槽哨兵值;语言侧通常用
u32::MAX 之类的非法下标 newtype)。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Id> Freeze for ChildList<Id>
impl<Id> RefUnwindSafe for ChildList<Id>
impl<Id> Send for ChildList<Id>
impl<Id> Sync for ChildList<Id>
impl<Id> Unpin for ChildList<Id>
impl<Id> UnsafeUnpin for ChildList<Id>
impl<Id> UnwindSafe for ChildList<Id>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more