<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="Structure wrapping a mutable reference to the greatest item on a `BinaryHeap`."><title>PeekMut in heapless::binary_heap - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-cb6f1f67f1bcd037.css"id="mainThemeStyle"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="heapless"data-themes=""data-resource-suffix=""data-rustdoc-version="1.73.0-nightly (8131b9774 2023-08-02)"data-channel="nightly"data-search-js="search-6dfdfced5eff6596.js"data-settings-js="settings-de11bff964e9d4e5.js"data-settings-css="settings-8c76f75bfb6bd192.css"data-theme-light-css="light-6d2c9675f3d09c26.css"data-theme-dark-css="dark-45ceb8f2e522f4d1.css"data-theme-ayu-css="ayu-fd19013d6ce078bf.css"><scriptsrc="../../static.files/storage-db41da1a38ea3cb8.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-0795b7d26be81095.js"></script><noscript><linkrel="stylesheet"media="(prefers-color-scheme:light)"href="../../static.files/light-6d2c9675f3d09c26.css"><linkrel="stylesheet"media="(prefers-color-scheme:dark)"href="../../static.files/dark-45ceb8f2e522f4d1.css"><linkrel="stylesheet"href="../../static.files/noscript-cffde32267a19fd6.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="logo-container"href="../../heapless/index.html"><imgclass="rust-logo"src="../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2></h2></nav><navclass="sidebar"><aclass="logo-container"href="../../heapless/index.html"><imgclass="rust-logo"src="../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2class="location"><ahref="#">PeekMut</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block"><li><ahref="#method.pop">pop</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-Deref-for-PeekMut%3C'_,+T,+K,+N%3E">Deref</a></li><li><ahref="#impl-DerefMut-for-PeekMut%3C'_,+T,+K,+N%3E">DerefMut</a></li><li><ahref="#impl-Drop-for-PeekMut%3C'_,+T,+K,+N%3E">Drop</a></li></ul><h3><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-UnwindSafe-for-PeekMut%3C'a,+T,+K,+N%3E">!UnwindSafe</a></li><li><ahref="#impl-RefUnwindSafe-for-PeekMut%3C'a,+T,+K,+N%3E">RefUnwindSafe</a></li><li><ahref="#impl-Send-for-PeekMut%3C'a,+T,+K,+N%3E">Send</a></li><li><ahref="#impl-Sync-for-PeekM
K: <aclass="trait"href="trait.Kind.html"title="trait heapless::binary_heap::Kind">Kind</a>,</span>{ /* private fields */ }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Structure wrapping a mutable reference to the greatest item on a
<code>BinaryHeap</code>.</p>
<p>This <code>struct</code> is created by the <ahref="struct.BinaryHeap.html#method.peek_mut"><code>peek_mut</code></a> method on <ahref="struct.BinaryHeap.html"><code>BinaryHeap</code></a>. See
K: <aclass="trait"href="trait.Kind.html"title="trait heapless::binary_heap::Kind">Kind</a>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.pop"class="method"><aclass="src rightside"href="../../src/heapless/binary_heap.rs.html#504-508">source</a><h4class="code-header">pub fn <ahref="#method.pop"class="fn">pop</a>(this: <aclass="struct"href="struct.PeekMut.html"title="struct heapless::binary_heap::PeekMut">PeekMut</a><'a, T, K, N>) -> T</h4></section></summary><divclass="docblock"><p>Removes the peeked value from the heap and returns it.</p>
U: Into<T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = Infallible</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_from</a>(value: U) -> Result<T, <T as TryFrom<U>>::Error></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-PeekMut%3C'a,+T,+K,+N%3E"class="impl"><ahref="#impl-TryInto%3CU%3E-for-PeekMut%3C'a,+T,+K,+N%3E"class="anchor">§</a><h3class="code-header">impl<T, U> TryInto<U> for T<spanclass="where fmt-newline">where
U: TryFrom<T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = <U as TryFrom<T>>::Error</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_into</a>(self) -> Result<U, <U as TryFrom<T>>::Error></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>