pub struct Heap<T> { /* private fields */ }Implementations§
Source§impl<T> Heap<T>where
T: PartialOrd + Display,
impl<T> Heap<T>where
T: PartialOrd + Display,
pub fn new(heap_type: HeapType) -> Self
pub fn from_array(heap_type: HeapType, input: Vec<T>) -> Self
👎Deprecated
pub fn from_vec(heap_type: HeapType, input: Vec<T>) -> Self
pub fn insert(&mut self, value: T)
pub fn root(&self) -> Option<&T>
pub fn extract(&mut self) -> Option<T>
pub fn get(&self, index: usize) -> Option<&T>
pub fn raw(&self) -> &Vec<T>
pub fn collect(&mut self) -> Vec<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Heap<T>
impl<T> RefUnwindSafe for Heap<T>where
T: RefUnwindSafe,
impl<T> Send for Heap<T>where
T: Send,
impl<T> Sync for Heap<T>where
T: Sync,
impl<T> Unpin for Heap<T>where
T: Unpin,
impl<T> UnwindSafe for Heap<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