pub struct PrioritySet<I: Ord + Hash + Clone, P: Ord + Copy> { /* private fields */ }
Expand description
A set that offers efficient iteration over its elements in priority-ascending order.
Implementations§
Source§impl<I: Ord + Hash + Clone, P: Ord + Copy> PrioritySet<I, P>
impl<I: Ord + Hash + Clone, P: Ord + Copy> PrioritySet<I, P>
Sourcepub fn put(&mut self, item: I, priority: P)
pub fn put(&mut self, item: I, priority: P)
Insert an item with a priority, overwriting the previous priority if it exists.
Auto Trait Implementations§
impl<I, P> Freeze for PrioritySet<I, P>
impl<I, P> RefUnwindSafe for PrioritySet<I, P>where
I: RefUnwindSafe,
P: RefUnwindSafe,
impl<I, P> Send for PrioritySet<I, P>
impl<I, P> Sync for PrioritySet<I, P>
impl<I, P> Unpin for PrioritySet<I, P>
impl<I, P> UnwindSafe for PrioritySet<I, P>
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