pub enum NodeState<T> {
Free,
Allocated,
Valued(T),
}
Expand description
State of interval tree node.
Valid state transitions:
- None -> Free: IntervalTree::insert()
- None -> Valued: IntervalTree::insert()
- Free -> Allocated: IntervalTree::allocate()
- Allocated -> Valued(T): IntervalTree::update()
- Valued -> Valued(T): IntervalTree::update()
- Allocated -> Free: IntervalTree::free()
- Valued(T) -> Free: IntervalTree::free()
-
- -> None: IntervalTree::delete()
Variants§
Free
Node is free
Allocated
Node is allocated but without associated data
Valued(T)
Node is allocated with associated data.
Trait Implementations§
Source§impl<T: Ord> Ord for NodeState<T>
impl<T: Ord> Ord for NodeState<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for NodeState<T>
impl<T: PartialOrd> PartialOrd for NodeState<T>
impl<T: Eq> Eq for NodeState<T>
impl<T> StructuralPartialEq for NodeState<T>
Auto Trait Implementations§
impl<T> Freeze for NodeState<T>where
T: Freeze,
impl<T> RefUnwindSafe for NodeState<T>where
T: RefUnwindSafe,
impl<T> Send for NodeState<T>where
T: Send,
impl<T> Sync for NodeState<T>where
T: Sync,
impl<T> Unpin for NodeState<T>where
T: Unpin,
impl<T> UnwindSafe for NodeState<T>where
T: UnwindSafe,
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