pub struct ElementNode<'a> {
pub element: Element<'a>,
pub next_sibling: Cell<Option<&'a ElementNode<'a>>>,
}Expand description
侵入式单向链表节点(分配在 ScratchArena 中,使用 Cell 提供安全的内部可变性)。
Fields§
§element: Element<'a>§next_sibling: Cell<Option<&'a ElementNode<'a>>>指向 ScratchArena 中的下一个同级兄弟节点(实现零 Vec 扩容的无限 .child() 追加)。
Auto Trait Implementations§
impl<'a> !Freeze for ElementNode<'a>
impl<'a> !RefUnwindSafe for ElementNode<'a>
impl<'a> !Send for ElementNode<'a>
impl<'a> !Sync for ElementNode<'a>
impl<'a> !UnwindSafe for ElementNode<'a>
impl<'a> Forget for ElementNode<'a>
impl<'a> Move for ElementNode<'a>
impl<'a> Unpin for ElementNode<'a>
impl<'a> UnsafeUnpin for ElementNode<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。