pub struct Queue<H, Cost>where
H: Handle,
Cost: PartialOrd,{ /* private fields */ }Expand description
Priorty queue implementation for mesh elements.
When you pop an element, the one with the lowest cost is removed from the queue and returned.
Implementations§
Source§impl<H, Cost> Queue<H, Cost>where
H: Handle,
Cost: PartialOrd,
impl<H, Cost> Queue<H, Cost>where
H: Handle,
Cost: PartialOrd,
Sourcepub fn new(num_items: usize) -> Self
pub fn new(num_items: usize) -> Self
Create a new heap with the number of elements.
For example, if the heap is meant to be used to queue up vertices of a mesh, provide the number of vertices in that mesh.
Auto Trait Implementations§
impl<H, Cost> Freeze for Queue<H, Cost>
impl<H, Cost> RefUnwindSafe for Queue<H, Cost>where
H: RefUnwindSafe,
Cost: RefUnwindSafe,
impl<H, Cost> Send for Queue<H, Cost>
impl<H, Cost> Sync for Queue<H, Cost>
impl<H, Cost> Unpin for Queue<H, Cost>
impl<H, Cost> UnwindSafe for Queue<H, Cost>where
H: UnwindSafe,
Cost: 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