pub struct Sym(pub u32);Expand description
符号(intern 名字 id)。VarRef/Member/MethodRef 的名字字段—— 87% 重复率(实测 jdk-sources:4754 个名字节点仅 669 个唯一), String→Sym 后:构造去重、比较 u32、clone 零分配(copy_subtree/ clone_node 全线受益)。
Tuple Fields§
§0: u32Trait Implementations§
impl Copy for Sym
impl Eq for Sym
impl StructuralPartialEq for Sym
Auto Trait Implementations§
impl Freeze for Sym
impl RefUnwindSafe for Sym
impl Send for Sym
impl Sync for Sym
impl Unpin for Sym
impl UnsafeUnpin for Sym
impl UnwindSafe for Sym
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