pub enum ChildList {
Empty,
One([DagNodeId; 1]),
Two([DagNodeId; 2]),
Three([DagNodeId; 3]),
Four([DagNodeId; 4]),
Many(Vec<DagNodeId>),
}Expand description
A compact child list that stores up to INLINE_CHILDREN IDs inline.
For nodes with more children (e.g. variadic + or * chains),
the list spills to a heap-allocated Vec.
Variants§
Empty
Zero children (leaf node).
One([DagNodeId; 1])
One child (unary operator).
Two([DagNodeId; 2])
Two children (binary operator — the most common case).
Three([DagNodeId; 3])
Three children.
Four([DagNodeId; 4])
Four children (inline limit).
Many(Vec<DagNodeId>)
More than INLINE_CHILDREN children (heap-allocated).
Implementations§
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ChildList
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ChildList
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given [
BorrowDecode]. Read moreimpl Eq for ChildList
impl StructuralPartialEq for ChildList
Auto Trait Implementations§
impl Freeze for ChildList
impl RefUnwindSafe for ChildList
impl Send for ChildList
impl Sync for ChildList
impl Unpin for ChildList
impl UnsafeUnpin for ChildList
impl UnwindSafe for ChildList
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.