Struct alloc::collections::binary_heap::Hole   
source · struct Hole<'a, T: 'a> {
    data: &'a mut [T],
    elt: ManuallyDrop<T>,
    pos: usize,
}Expand description
Hole represents a hole in a slice i.e., an index without valid value
(because it was moved from or duplicated).
In drop, Hole will restore the slice by filling the hole
position with the value that was originally removed.
Fields§
§data: &'a mut [T]§elt: ManuallyDrop<T>§pos: usizeImplementations§
source§impl<'a, T> Hole<'a, T>
 
impl<'a, T> Hole<'a, T>
sourceunsafe fn new(data: &'a mut [T], pos: usize) -> Self
 
unsafe fn new(data: &'a mut [T], pos: usize) -> Self
Create a new Hole at index pos.
Unsafe because pos must be within the data slice.
fn pos(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for Hole<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for Hole<'a, T>where T: Send,
impl<'a, T> Sync for Hole<'a, T>where T: Sync,
impl<'a, T> Unpin for Hole<'a, T>where T: Unpin,
impl<'a, T> !UnwindSafe for Hole<'a, T>
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