Struct std::collections::binary_heap::PeekMut
pub struct PeekMut<'a, T> where T: 'a + Ord, { /* fields omitted */ }
Structure wrapping a mutable reference to the greatest item on a BinaryHeap
.
This struct
is created by the peek_mut
method on BinaryHeap
. See its documentation for more.
Implementations
pub fn pop(this: PeekMut<'a, T>) -> T
Removes the peeked value from the heap and returns it.
Trait Implementations
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the given formatter. Read more
type Target = T
The resulting type after dereferencing.
pub fn deref(&self) -> &T
Dereferences the value.
pub fn deref_mut(&mut self) -> &mut T
Mutably dereferences the value.
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for PeekMut<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for PeekMut<'a, T> where
T: Send,
impl<'a, T> Sync for PeekMut<'a, T> where
T: Sync,
impl<'a, T> Unpin for PeekMut<'a, T>
impl<'a, T> !UnwindSafe for PeekMut<'a, T>
Blanket Implementations
impl<T> From<T> for T
pub fn from(t: T) -> T
Performs the conversion.
pub fn into(self) -> U
Performs the conversion.
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
Performs the conversion.
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
Performs the conversion.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html