pub struct OccupiedEntry<'a, TKey, TPriority, S = RandomState>{ /* private fields */ }
Expand description
A view into an occupied entry in a KeyedPriorityQueue
.
It is part of the Entry
enum.
Implementations§
Source§impl<'a, TKey, TPriority, S> OccupiedEntry<'a, TKey, TPriority, S>
impl<'a, TKey, TPriority, S> OccupiedEntry<'a, TKey, TPriority, S>
Sourcepub fn get_priority(&self) -> &TPriority
pub fn get_priority(&self) -> &TPriority
Sourcepub fn set_priority(self, priority: TPriority) -> TPriority
pub fn set_priority(self, priority: TPriority) -> TPriority
Changes priority of key and returns old priority
§Time complexity
Up to O(log n) operations in worst case O(1) in best case
Sourcepub fn remove(self) -> (TKey, TPriority)
pub fn remove(self) -> (TKey, TPriority)
Auto Trait Implementations§
impl<'a, TKey, TPriority, S> Freeze for OccupiedEntry<'a, TKey, TPriority, S>where
TKey: Freeze,
impl<'a, TKey, TPriority, S> RefUnwindSafe for OccupiedEntry<'a, TKey, TPriority, S>
impl<'a, TKey, TPriority, S = RandomState> !Send for OccupiedEntry<'a, TKey, TPriority, S>
impl<'a, TKey, TPriority, S = RandomState> !Sync for OccupiedEntry<'a, TKey, TPriority, S>
impl<'a, TKey, TPriority, S> Unpin for OccupiedEntry<'a, TKey, TPriority, S>where
TKey: Unpin,
impl<'a, TKey, TPriority, S = RandomState> !UnwindSafe for OccupiedEntry<'a, TKey, TPriority, S>
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