pub struct BinaryHeap<T: Ord> { /* private fields */ }Expand description
A binary min-heap backed by a Vec.
The smallest element is always at the root (index 0).
All operations maintain the heap property: parent ≤ children.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for BinaryHeap<T>
impl<T> RefUnwindSafe for BinaryHeap<T>where
T: RefUnwindSafe,
impl<T> Send for BinaryHeap<T>where
T: Send,
impl<T> Sync for BinaryHeap<T>where
T: Sync,
impl<T> Unpin for BinaryHeap<T>where
T: Unpin,
impl<T> UnsafeUnpin for BinaryHeap<T>
impl<T> UnwindSafe for BinaryHeap<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