pub struct InternalArrayStorage<'a, IT: Iterator> { /* private fields */ }Expand description
Internal representation of the ArrayStorage that’s actually used as the
MergeIter’s Storage backend.
Trait Implementations§
Source§impl<IT: Iterator> BaseStorage for InternalArrayStorage<'_, IT>
impl<IT: Iterator> BaseStorage for InternalArrayStorage<'_, IT>
Source§impl<IT: Iterator> Debug for InternalArrayStorage<'_, IT>
impl<IT: Iterator> Debug for InternalArrayStorage<'_, IT>
Source§impl<IT: Iterator> Drop for InternalArrayStorage<'_, IT>
impl<IT: Iterator> Drop for InternalArrayStorage<'_, IT>
impl<'a, IT> Send for InternalArrayStorage<'a, IT>
impl<'a, IT> Sync for InternalArrayStorage<'a, IT>
Auto Trait Implementations§
impl<'a, IT> Freeze for InternalArrayStorage<'a, IT>
impl<'a, IT> !RefUnwindSafe for InternalArrayStorage<'a, IT>
impl<'a, IT> Unpin for InternalArrayStorage<'a, IT>
impl<'a, IT> !UnwindSafe for InternalArrayStorage<'a, IT>
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
Source§impl<S> Storage for Swhere
S: StorageOps,
impl<S> Storage for Swhere
S: StorageOps,
Source§fn into_builder(self) -> DefaultBuilder<Self>
fn into_builder(self) -> DefaultBuilder<Self>
Create a new builder with default parameters for this storage
Source§impl<S> StorageOps for Swhere
S: BaseStorage,
impl<S> StorageOps for Swhere
S: BaseStorage,
Source§unsafe fn dec_len(&mut self) -> usize
unsafe fn dec_len(&mut self) -> usize
Decrements length by 1 and returns the new length.
Does nothing to the last item, so
self.heap().add(self.dec_len()) is still a valid pointer to a live item,
but you are guaranteed that this trait will never return it again (if safety contracts
are not broken) Read moreSource§unsafe fn first(&self) -> *mut *mut PeekIter<Self::IT>
unsafe fn first(&self) -> *mut *mut PeekIter<Self::IT>
Produces pointer to the first (smallest) item
Pointers are valid, initialized and unique
It’s valid to treat them as mut refs if no other
mut refs to the
first() exist. Read moreSource§unsafe fn second(&self) -> *mut *mut PeekIter<Self::IT>
unsafe fn second(&self) -> *mut *mut PeekIter<Self::IT>
Produces pointer to the second (second-smallest) item
which is also the root of the binary heap.
Pointers are valid, initialized and unique
It’s valid to treat them as mut refs if no other
mut refs to the
second() exist. Read moreSource§unsafe fn pop_last(&mut self) -> *mut PeekIter<Self::IT>
unsafe fn pop_last(&mut self) -> *mut PeekIter<Self::IT>
Produces pointer to the last item in the heap and decrements its length
by 1.
Pointers are valid, initialized and unique
It’s valid to treat them as mut refs. Read more
Source§fn clear(&mut self)
fn clear(&mut self)
Drops all remaining items in the storage and sets its length to 0.
It’s safe to call multiple times (repeated calls are no-ops)