(function() {
    var type_impls = Object.fromEntries([["core",[["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Binary-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-Binary-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.Binary.html\" title=\"trait core::fmt::Binary\">Binary</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.Binary.html\" title=\"trait core::fmt::Binary\">Binary</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.Binary.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.Binary.html#tymethod.fmt\">Read more</a></div></details></div></details>","Binary","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-BitOr%3CT%3E-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.45.0, const unstable\">1.45.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#329-340\">Source</a></span><a href=\"#impl-BitOr%3CT%3E-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/ops/trait.BitOr.html\" title=\"trait core::ops::BitOr\">BitOr</a>&lt;T&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/ops/trait.BitOr.html\" title=\"trait core::ops::BitOr\">BitOr</a>&lt;Output = T&gt;,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#333\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.BitOr.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.bitor\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#336-339\">Source</a><a href=\"#method.bitor\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.BitOr.html#tymethod.bitor\" class=\"fn\">bitor</a>(self, rhs: T) -&gt; Self::<a class=\"associatedtype\" href=\"core/ops/trait.BitOr.html#associatedtype.Output\" title=\"type core::ops::BitOr::Output\">Output</a></h4></section></summary><div class='docblock'>Performs the <code>|</code> operation. <a href=\"core/ops/trait.BitOr.html#tymethod.bitor\">Read more</a></div></details></div></details>","BitOr<T>","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-BitOr-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.45.0, const unstable\">1.45.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#314-325\">Source</a></span><a href=\"#impl-BitOr-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/ops/trait.BitOr.html\" title=\"trait core::ops::BitOr\">BitOr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/ops/trait.BitOr.html\" title=\"trait core::ops::BitOr\">BitOr</a>&lt;Output = T&gt;,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#318\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.BitOr.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.bitor\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#321-324\">Source</a><a href=\"#method.bitor\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.BitOr.html#tymethod.bitor\" class=\"fn\">bitor</a>(self, rhs: Self) -&gt; Self::<a class=\"associatedtype\" href=\"core/ops/trait.BitOr.html#associatedtype.Output\" title=\"type core::ops::BitOr::Output\">Output</a></h4></section></summary><div class='docblock'>Performs the <code>|</code> operation. <a href=\"core/ops/trait.BitOr.html#tymethod.bitor\">Read more</a></div></details></div></details>","BitOr","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-BitOrAssign%3CT%3E-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.45.0, const unstable\">1.45.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#372-381\">Source</a></span><a href=\"#impl-BitOrAssign%3CT%3E-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/ops/trait.BitOrAssign.html\" title=\"trait core::ops::BitOrAssign\">BitOrAssign</a>&lt;T&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a>,\n    Self: <a class=\"trait\" href=\"core/ops/trait.BitOr.html\" title=\"trait core::ops::BitOr\">BitOr</a>&lt;T, Output = Self&gt;,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.bitor_assign\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#378-380\">Source</a><a href=\"#method.bitor_assign\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.BitOrAssign.html#tymethod.bitor_assign\" class=\"fn\">bitor_assign</a>(&amp;mut self, rhs: T)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a href=\"core/ops/trait.BitOrAssign.html#tymethod.bitor_assign\">Read more</a></div></details></div></details>","BitOrAssign<T>","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-BitOrAssign-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.45.0, const unstable\">1.45.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#359-368\">Source</a></span><a href=\"#impl-BitOrAssign-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/ops/trait.BitOrAssign.html\" title=\"trait core::ops::BitOrAssign\">BitOrAssign</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a>,\n    Self: <a class=\"trait\" href=\"core/ops/trait.BitOr.html\" title=\"trait core::ops::BitOr\">BitOr</a>&lt;Output = Self&gt;,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.bitor_assign\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#365-367\">Source</a><a href=\"#method.bitor_assign\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.BitOrAssign.html#tymethod.bitor_assign\" class=\"fn\">bitor_assign</a>(&amp;mut self, rhs: Self)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a href=\"core/ops/trait.BitOrAssign.html#tymethod.bitor_assign\">Read more</a></div></details></div></details>","BitOrAssign","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Clone-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#186-194\">Source</a></span><a href=\"#impl-Clone-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.clone\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#191-193\">Source</a><a href=\"#method.clone\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/clone/trait.Clone.html#tymethod.clone\" class=\"fn\">clone</a>(&amp;self) -&gt; Self</h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href=\"core/clone/trait.Clone.html#tymethod.clone\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.clone_from\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"src/core/clone.rs.html#246-251\">Source</a></span><a href=\"#method.clone_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/clone/trait.Clone.html#method.clone_from\" class=\"fn\">clone_from</a>(&amp;mut self, source: &amp;Self)<div class=\"where\">where\n    Self:,</div></h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href=\"core/clone/trait.Clone.html#method.clone_from\">Read more</a></div></details></div></details>","Clone","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Debug-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-Debug-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.Debug.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.Debug.html#tymethod.fmt\">Read more</a></div></details></div></details>","Debug","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Display-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-Display-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.Display.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.Display.html#tymethod.fmt\">Read more</a></div></details></div></details>","Display","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CAlignment%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/ptr/alignment.rs.html#195-200\">Source</a><a href=\"#impl-From%3CAlignment%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/ptr/struct.Alignment.html\" title=\"struct core::ptr::Alignment\">Alignment</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/ptr/alignment.rs.html#197-199\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(align: <a class=\"struct\" href=\"core/ptr/struct.Alignment.html\" title=\"struct core::ptr::Alignment\">Alignment</a>) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details>","From<Alignment>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#496\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#496\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i16>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#494\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#494\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i16>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#495\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#495\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i16>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#497\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#497\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i16>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#499\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#499\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i32>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#498\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#498\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i32>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#500\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#500\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i64>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#492\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#492\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i8>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#489\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#489\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i8>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#490\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#490\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i8>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#491\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#491\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i8>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#493\">Source</a></span><a href=\"#impl-From%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#493\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<i8>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#510\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#510\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#508\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#508\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#509\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#509\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#482\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#482\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#480\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#480\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#481\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#481\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#483\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#483\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u16>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#512\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#512\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u32>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#511\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#511\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u32>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#485\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#485\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u32>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#484\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#484\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u32>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#513\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#513\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u64>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#486\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#486\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u64>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#506\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#506\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#503\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#503\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#504\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#504\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#505\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#505\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#507\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#507\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#478\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#478\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#475\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#475\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#476\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#476\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#477\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#477\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0, const unstable\">1.41.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#479\">Source</a></span><a href=\"#impl-From%3CNonZero%3Cu8%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#479\">Source</a><a href=\"#method.from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.From.html#tymethod.from\" class=\"fn\">from</a>(small: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Converts <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code> losslessly.</p>\n</div></details></div></details>","From<NonZero<u8>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromStr-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.35.0\">1.35.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><a href=\"#impl-FromStr-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/str/trait.FromStr.html\" title=\"trait core::str::FromStr\">FromStr</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Err\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><a href=\"#associatedtype.Err\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/str/trait.FromStr.html#associatedtype.Err\" class=\"associatedtype\">Err</a> = <a class=\"struct\" href=\"core/num/struct.ParseIntError.html\" title=\"struct core::num::ParseIntError\">ParseIntError</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_str\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><a href=\"#method.from_str\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/str/trait.FromStr.html#tymethod.from_str\" class=\"fn\">from_str</a>(src: &amp;<a class=\"primitive\" href=\"core/primitive.str.html\">str</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/str/trait.FromStr.html#associatedtype.Err\" title=\"type core::str::FromStr::Err\">Err</a>&gt;</h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href=\"core/str/trait.FromStr.html#tymethod.from_str\">Read more</a></div></details></div></details>","FromStr","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Hash-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#286-297\">Source</a></span><a href=\"#impl-Hash-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.hash\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#291-296\">Source</a><a href=\"#method.hash\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/hash/trait.Hash.html#tymethod.hash\" class=\"fn\">hash</a>&lt;H&gt;(&amp;self, state: <a class=\"primitive\" href=\"core/primitive.reference.html\">&amp;mut H</a>)<div class=\"where\">where\n    H: <a class=\"trait\" href=\"core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href=\"core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\"><code>Hasher</code></a>. <a href=\"core/hash/trait.Hash.html#tymethod.hash\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.hash_slice\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.3.0\">1.3.0</span> · <a class=\"src\" href=\"src/core/hash/mod.rs.html#235-242\">Source</a></span><a href=\"#method.hash_slice\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/hash/trait.Hash.html#method.hash_slice\" class=\"fn\">hash_slice</a>&lt;H: <a class=\"trait\" href=\"core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\">Hasher</a>&gt;(data: &amp;[Self], state: <a class=\"primitive\" href=\"core/primitive.reference.html\">&amp;mut H</a>)<div class=\"where\">where\n    Self: <a class=\"trait\" href=\"core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href=\"core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\"><code>Hasher</code></a>. <a href=\"core/hash/trait.Hash.html#method.hash_slice\">Read more</a></div></details></div></details>","Hash","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-LowerExp-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0\">1.84.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-LowerExp-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.LowerExp.html\" title=\"trait core::fmt::LowerExp\">LowerExp</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.LowerExp.html\" title=\"trait core::fmt::LowerExp\">LowerExp</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.LowerExp.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.LowerExp.html#tymethod.fmt\">Read more</a></div></details></div></details>","LowerExp","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-LowerHex-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-LowerHex-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.LowerHex.html\" title=\"trait core::fmt::LowerHex\">LowerHex</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.LowerHex.html\" title=\"trait core::fmt::LowerHex\">LowerHex</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.LowerHex.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.LowerHex.html#tymethod.fmt\">Read more</a></div></details></div></details>","LowerHex","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Neg-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const unstable\">1.71.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><a href=\"#impl-Neg-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/ops/trait.Neg.html\" title=\"trait core::ops::Neg\">Neg</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.Neg.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.neg\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><a href=\"#method.neg\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.Neg.html#tymethod.neg\" class=\"fn\">neg</a>(self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href=\"core/ops/trait.Neg.html#tymethod.neg\">Read more</a></div></details></div></details>","Neg","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Neg-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const unstable\">1.71.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><a href=\"#impl-Neg-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/ops/trait.Neg.html\" title=\"trait core::ops::Neg\">Neg</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.Neg.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.neg\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><a href=\"#method.neg\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.Neg.html#tymethod.neg\" class=\"fn\">neg</a>(self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href=\"core/ops/trait.Neg.html#tymethod.neg\">Read more</a></div></details></div></details>","Neg","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Neg-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const unstable\">1.71.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><a href=\"#impl-Neg-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/ops/trait.Neg.html\" title=\"trait core::ops::Neg\">Neg</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.Neg.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.neg\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><a href=\"#method.neg\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.Neg.html#tymethod.neg\" class=\"fn\">neg</a>(self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href=\"core/ops/trait.Neg.html#tymethod.neg\">Read more</a></div></details></div></details>","Neg","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Neg-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const unstable\">1.71.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><a href=\"#impl-Neg-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/ops/trait.Neg.html\" title=\"trait core::ops::Neg\">Neg</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.Neg.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.neg\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><a href=\"#method.neg\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.Neg.html#tymethod.neg\" class=\"fn\">neg</a>(self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href=\"core/ops/trait.Neg.html#tymethod.neg\">Read more</a></div></details></div></details>","Neg","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Neg-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const unstable\">1.71.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><a href=\"#impl-Neg-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/ops/trait.Neg.html\" title=\"trait core::ops::Neg\">Neg</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.Neg.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.neg\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><a href=\"#method.neg\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.Neg.html#tymethod.neg\" class=\"fn\">neg</a>(self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href=\"core/ops/trait.Neg.html#tymethod.neg\">Read more</a></div></details></div></details>","Neg","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Neg-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const unstable\">1.71.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143802\" title=\"Tracking issue for const_ops\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><a href=\"#impl-Neg-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/ops/trait.Neg.html\" title=\"trait core::ops::Neg\">Neg</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/ops/trait.Neg.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.neg\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><a href=\"#method.neg\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/ops/trait.Neg.html#tymethod.neg\" class=\"fn\">neg</a>(self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href=\"core/ops/trait.Neg.html#tymethod.neg\">Read more</a></div></details></div></details>","Neg","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3CT%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#383-492\">Source</a><a href=\"#impl-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.new\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0, const since 1.47.0\">1.28.0 (const: 1.47.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#392-396\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.new\" class=\"fn\">new</a>(n: T) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Creates a non-zero if the given value is not zero.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.new_unchecked\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0, const since 1.28.0\">1.28.0 (const: 1.28.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#409-424\">Source</a></span><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.new_unchecked\" class=\"fn\">new_unchecked</a>(n: T) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Creates a non-zero without checking whether the value is non-zero.\nThis results in undefined behavior if the value is zero.</p>\n<h5 id=\"safety\"><a class=\"doc-anchor\" href=\"#safety\">§</a>Safety</h5>\n<p>The value must not be zero.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_mut\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#431-437\">Source</a><h4 class=\"code-header\">pub fn <a href=\"core/num/struct.NonZero.html#tymethod.from_mut\" class=\"fn\">from_mut</a>(n: <a class=\"primitive\" href=\"core/primitive.reference.html\">&amp;mut T</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;&amp;mut Self&gt;</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_from_mut</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/106290\">#106290</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts a reference to a non-zero mutable reference\nif the referenced value is not zero.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_mut_unchecked\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#450-465\">Source</a><h4 class=\"code-header\">pub unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.from_mut_unchecked\" class=\"fn\">from_mut_unchecked</a>(n: <a class=\"primitive\" href=\"core/primitive.reference.html\">&amp;mut T</a>) -&gt; &amp;mut Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_from_mut</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/106290\">#106290</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts a mutable reference to a non-zero mutable reference\nwithout checking whether the referenced value is non-zero.\nThis results in undefined behavior if the referenced value is zero.</p>\n<h5 id=\"safety-1\"><a class=\"doc-anchor\" href=\"#safety-1\">§</a>Safety</h5>\n<p>The referenced value must not be zero.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.get\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0, const since 1.34.0\">1.28.0 (const: 1.34.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#471-491\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.get\" class=\"fn\">get</a>(self) -&gt; T</h4></section></summary><div class=\"docblock\"><p>Returns the contained value as a primitive type.</p>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Ci128%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><a href=\"#impl-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 128u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.i128.html#associatedconstant.BITS\" title=\"associated constant i128::BITS\"><code>i128::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i128&gt;::BITS, i128::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci128%3E::BITS,+i128::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i128.html#associatedconstant.MIN\" title=\"associated constant i128::MIN\"><code>i128::MIN</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i128&gt;::MIN.get(), i128::MIN);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci128%3E::MIN.get(),+i128::MIN);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i128.html#associatedconstant.MAX\" title=\"associated constant i128::MAX\"><code>i128::MAX</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i128&gt;::MAX.get(), i128::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci128%3E::MAX.get(),+i128::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i128&gt;::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci128%3E::new(-1i128)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci128%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci128%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci128%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci128%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci128%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i128&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci128%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Ci128%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x13f40000000000000000000000004f76i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x4f7613f4</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">16</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x13f40000000000000000000000004f76i128)?;%0Alet+m+=+NonZero::new(0x4f7613f4)?;%0A%0Aassert_eq!(n.rotate_left(16),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x4f7613f4i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x13f40000000000000000000000004f76</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">16</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x4f7613f4i128)?;%0Alet+m+=+NonZero::new(0x13f40000000000000000000000004f76)?;%0A%0Aassert_eq!(n.rotate_right(16),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678901234567890123456789012i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x12907856341290785634129078563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678901234567890123456789012i128)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x12907856341290785634129078563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678901234567890123456789012i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x48091e6a2c48091e6a2c48091e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678901234567890123456789012i128)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x48091e6a2c48091e6a2c48091e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI128;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI128::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI128::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI128;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai128)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroI128::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI128::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI128;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI128::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI128::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI128;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai128)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroI128::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI128::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai128)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai128)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.abs\" class=\"fn\">abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self.\nSee <a href=\"core/primitive.i128.html#method.abs\" title=\"method i128::abs\"><code>i128::abs</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-2\"><a class=\"doc-anchor\" href=\"#example-2\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i128)?;%0Alet+neg+=+NonZero::new(-1i128)?;%0A%0Aassert_eq!(pos,+pos.abs());%0Aassert_eq!(pos,+neg.abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_abs\" class=\"fn\">checked_abs</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked absolute value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> if\n<code>self == NonZero::&lt;i128&gt;::MIN</code>.\nThe result cannot be zero.</p>\n<h5 id=\"example-3\"><a class=\"doc-anchor\" href=\"#example-3\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(pos), neg.checked_abs());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, min.checked_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i128)?;%0Alet+neg+=+NonZero::new(-1i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0A%0Aassert_eq!(Some(pos),+neg.checked_abs());%0Aassert_eq!(None,+min.checked_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_abs\" class=\"fn\">overflowing_abs</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self,\nwith overflow information, see\n<a href=\"core/primitive.i128.html#method.overflowing_abs\" title=\"method i128::overflowing_abs\"><code>i128::overflowing_abs</code></a>.</p>\n<h5 id=\"example-4\"><a class=\"doc-anchor\" href=\"#example-4\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), pos.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), neg.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((min, <span class=\"bool-val\">true</span>), min.overflowing_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i128)?;%0Alet+neg+=+NonZero::new(-1i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0A%0Aassert_eq!((pos,+false),+pos.overflowing_abs());%0Aassert_eq!((pos,+false),+neg.overflowing_abs());%0Aassert_eq!((min,+true),+min.overflowing_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_abs\" class=\"fn\">saturating_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating absolute value, see\n<a href=\"core/primitive.i128.html#method.saturating_abs\" title=\"method i128::saturating_abs\"><code>i128::saturating_abs</code></a>.</p>\n<h5 id=\"example-5\"><a class=\"doc-anchor\" href=\"#example-5\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus = NonZero::new(i128::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min_plus.saturating_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i128)?;%0Alet+neg+=+NonZero::new(-1i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0Alet+min_plus+=+NonZero::new(i128::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i128::MAX)?;%0A%0Aassert_eq!(pos,+pos.saturating_abs());%0Aassert_eq!(pos,+neg.saturating_abs());%0Aassert_eq!(max,+min.saturating_abs());%0Aassert_eq!(max,+min_plus.saturating_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_abs\" class=\"fn\">wrapping_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping absolute value, see\n<a href=\"core/primitive.i128.html#method.wrapping_abs\" title=\"method i128::wrapping_abs\"><code>i128::wrapping_abs</code></a>.</p>\n<h5 id=\"example-6\"><a class=\"doc-anchor\" href=\"#example-6\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(min, min.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(max, (-max).wrapping_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i128)?;%0Alet+neg+=+NonZero::new(-1i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0Alet+max+=+NonZero::new(i128::MAX)?;%0A%0Aassert_eq!(pos,+pos.wrapping_abs());%0Aassert_eq!(pos,+neg.wrapping_abs());%0Aassert_eq!(min,+min.wrapping_abs());%0Aassert_eq!(max,+(-max).wrapping_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unsigned_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.unsigned_abs\" class=\"fn\">unsigned_abs</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self\nwithout any wrapping or panicking.</p>\n<h5 id=\"example-7\"><a class=\"doc-anchor\" href=\"#example-7\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>u_pos = NonZero::new(<span class=\"number\">1u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_pos = NonZero::new(<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_neg = NonZero::new(-<span class=\"number\">1i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>u_max = NonZero::new(u128::MAX / <span class=\"number\">2 </span>+ <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(u_pos, i_pos.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_pos, i_neg.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_max, i_min.unsigned_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+u_pos+=+NonZero::new(1u128)?;%0Alet+i_pos+=+NonZero::new(1i128)?;%0Alet+i_neg+=+NonZero::new(-1i128)?;%0Alet+i_min+=+NonZero::new(i128::MIN)?;%0Alet+u_max+=+NonZero::new(u128::MAX+/+2+%2B+1)?;%0A%0Aassert_eq!(u_pos,+i_pos.unsigned_abs());%0Aassert_eq!(u_pos,+i_neg.unsigned_abs());%0Aassert_eq!(u_max,+i_min.unsigned_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_positive\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_positive\" class=\"fn\">is_positive</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is positive and <code>false</code> if the\nnumber is negative.</p>\n<h5 id=\"example-8\"><a class=\"doc-anchor\" href=\"#example-8\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(pos_five.is_positive());\n<span class=\"macro\">assert!</span>(!neg_five.is_positive());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i128)?;%0Alet+neg_five+=+NonZero::new(-5i128)?;%0A%0Aassert!(pos_five.is_positive());%0Aassert!(!neg_five.is_positive());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_negative\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_negative\" class=\"fn\">is_negative</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is negative and <code>false</code> if the\nnumber is positive.</p>\n<h5 id=\"example-9\"><a class=\"doc-anchor\" href=\"#example-9\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(neg_five.is_negative());\n<span class=\"macro\">assert!</span>(!pos_five.is_negative());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i128)?;%0Alet+neg_five+=+NonZero::new(-5i128)?;%0A%0Aassert!(neg_five.is_negative());%0Aassert!(!pos_five.is_negative());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_neg\" class=\"fn\">checked_neg</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked negation. Computes <code>-self</code>,\nreturning <code>None</code> if <code>self == NonZero::&lt;i128&gt;::MIN</code>.</p>\n<h5 id=\"example-10\"><a class=\"doc-anchor\" href=\"#example-10\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.checked_neg(), <span class=\"prelude-val\">Some</span>(neg_five));\n<span class=\"macro\">assert_eq!</span>(min.checked_neg(), <span class=\"prelude-val\">None</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i128)?;%0Alet+neg_five+=+NonZero::new(-5i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0A%0Aassert_eq!(pos_five.checked_neg(),+Some(neg_five));%0Aassert_eq!(min.checked_neg(),+None);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_neg\" class=\"fn\">overflowing_neg</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Negates self, overflowing if this is equal to the minimum value.</p>\n<p>See <a href=\"core/primitive.i128.html#method.overflowing_neg\" title=\"method i128::overflowing_neg\"><code>i128::overflowing_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-11\"><a class=\"doc-anchor\" href=\"#example-11\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.overflowing_neg(), (neg_five, <span class=\"bool-val\">false</span>));\n<span class=\"macro\">assert_eq!</span>(min.overflowing_neg(), (min, <span class=\"bool-val\">true</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i128)?;%0Alet+neg_five+=+NonZero::new(-5i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0A%0Aassert_eq!(pos_five.overflowing_neg(),+(neg_five,+false));%0Aassert_eq!(min.overflowing_neg(),+(min,+true));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_neg\" class=\"fn\">saturating_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating negation. Computes <code>-self</code>,\nreturning <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i128&gt;::MAX</code></a>\nif <code>self == NonZero::&lt;i128&gt;::MIN</code>\ninstead of overflowing.</p>\n<h5 id=\"example-12\"><a class=\"doc-anchor\" href=\"#example-12\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus_one = NonZero::new(i128::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.saturating_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.saturating_neg(), max);\n<span class=\"macro\">assert_eq!</span>(max.saturating_neg(), min_plus_one);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i128)?;%0Alet+neg_five+=+NonZero::new(-5i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0Alet+min_plus_one+=+NonZero::new(i128::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i128::MAX)?;%0A%0Aassert_eq!(pos_five.saturating_neg(),+neg_five);%0Aassert_eq!(min.saturating_neg(),+max);%0Aassert_eq!(max.saturating_neg(),+min_plus_one);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_neg\" class=\"fn\">wrapping_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping (modular) negation. Computes <code>-self</code>, wrapping around at the boundary\nof the type.</p>\n<p>See <a href=\"core/primitive.i128.html#method.wrapping_neg\" title=\"method i128::wrapping_neg\"><code>i128::wrapping_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-13\"><a class=\"doc-anchor\" href=\"#example-13\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i128::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.wrapping_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.wrapping_neg(), min);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i128)?;%0Alet+neg_five+=+NonZero::new(-5i128)?;%0Alet+min+=+NonZero::new(i128::MIN)?;%0A%0Aassert_eq!(pos_five.wrapping_neg(),+neg_five);%0Aassert_eq!(min.wrapping_neg(),+min);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_unsigned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_unsigned\" class=\"fn\">cast_unsigned</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as an unsigned integer of the same size.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">1i128</span>).unwrap();\n\n<span class=\"macro\">assert_eq!</span>(n.cast_unsigned(), NonZero::&lt;u128&gt;::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::new(-1i128).unwrap();%0A++++%0A++++assert_eq!(n.cast_unsigned(),+NonZero::%3Cu128%3E::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i128)?;%0Alet+four+=+NonZero::new(4i128)?;%0Alet+max+=+NonZero::new(i128::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i128&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i128)?;%0Alet+four+=+NonZero::new(4i128)?;%0Alet+max+=+NonZero::new(i128::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; i128::MAX</code>, or <code>self * rhs &lt; i128::MIN</code>.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i128)?;%0Alet+four+=+NonZero::new(4i128)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(i128::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i128)?;%0Alet+twenty_seven+=+NonZero::new(27i128)?;%0Alet+half_max+=+NonZero::new(i128::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2300-2310\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" title=\"associated constant core::num::NonZero::MIN\"><code>NonZero::&lt;i128&gt;::MIN</code></a> or <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i128&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i128)?;%0Alet+twenty_seven+=+NonZero::new(27i128)?;%0Alet+max+=+NonZero::new(i128::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Ci16%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><a href=\"#impl-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 16u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.i16.html#associatedconstant.BITS\" title=\"associated constant i16::BITS\"><code>i16::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i16&gt;::BITS, i16::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci16%3E::BITS,+i16::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i16.html#associatedconstant.MIN\" title=\"associated constant i16::MIN\"><code>i16::MIN</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i16&gt;::MIN.get(), i16::MIN);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci16%3E::MIN.get(),+i16::MIN);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i16.html#associatedconstant.MAX\" title=\"associated constant i16::MAX\"><code>i16::MAX</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i16&gt;::MAX.get(), i16::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci16%3E::MAX.get(),+i16::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i16&gt;::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci16%3E::new(-1i16)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci16%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci16%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci16%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci16%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci16%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i16&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci16%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Ci16%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">0x5ffdi16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x3a</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">4</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(-0x5ffdi16)?;%0Alet+m+=+NonZero::new(0x3a)?;%0A%0Aassert_eq!(n.rotate_left(4),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x3ai16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(-<span class=\"number\">0x5ffd</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">4</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x3ai16)?;%0Alet+m+=+NonZero::new(-0x5ffd)?;%0A%0Aassert_eq!(n.rotate_right(4),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x3412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234i16)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x3412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234i16)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI16;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI16::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI16::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI16;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai16)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroI16::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI16::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI16;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI16::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI16::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI16;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai16)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroI16::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI16::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai16)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai16)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.abs\" class=\"fn\">abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self.\nSee <a href=\"core/primitive.i16.html#method.abs\" title=\"method i16::abs\"><code>i16::abs</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-2\"><a class=\"doc-anchor\" href=\"#example-2\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i16)?;%0Alet+neg+=+NonZero::new(-1i16)?;%0A%0Aassert_eq!(pos,+pos.abs());%0Aassert_eq!(pos,+neg.abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_abs\" class=\"fn\">checked_abs</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked absolute value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> if\n<code>self == NonZero::&lt;i16&gt;::MIN</code>.\nThe result cannot be zero.</p>\n<h5 id=\"example-3\"><a class=\"doc-anchor\" href=\"#example-3\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(pos), neg.checked_abs());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, min.checked_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i16)?;%0Alet+neg+=+NonZero::new(-1i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0A%0Aassert_eq!(Some(pos),+neg.checked_abs());%0Aassert_eq!(None,+min.checked_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_abs\" class=\"fn\">overflowing_abs</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self,\nwith overflow information, see\n<a href=\"core/primitive.i16.html#method.overflowing_abs\" title=\"method i16::overflowing_abs\"><code>i16::overflowing_abs</code></a>.</p>\n<h5 id=\"example-4\"><a class=\"doc-anchor\" href=\"#example-4\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), pos.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), neg.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((min, <span class=\"bool-val\">true</span>), min.overflowing_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i16)?;%0Alet+neg+=+NonZero::new(-1i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0A%0Aassert_eq!((pos,+false),+pos.overflowing_abs());%0Aassert_eq!((pos,+false),+neg.overflowing_abs());%0Aassert_eq!((min,+true),+min.overflowing_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_abs\" class=\"fn\">saturating_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating absolute value, see\n<a href=\"core/primitive.i16.html#method.saturating_abs\" title=\"method i16::saturating_abs\"><code>i16::saturating_abs</code></a>.</p>\n<h5 id=\"example-5\"><a class=\"doc-anchor\" href=\"#example-5\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus = NonZero::new(i16::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min_plus.saturating_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i16)?;%0Alet+neg+=+NonZero::new(-1i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0Alet+min_plus+=+NonZero::new(i16::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i16::MAX)?;%0A%0Aassert_eq!(pos,+pos.saturating_abs());%0Aassert_eq!(pos,+neg.saturating_abs());%0Aassert_eq!(max,+min.saturating_abs());%0Aassert_eq!(max,+min_plus.saturating_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_abs\" class=\"fn\">wrapping_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping absolute value, see\n<a href=\"core/primitive.i16.html#method.wrapping_abs\" title=\"method i16::wrapping_abs\"><code>i16::wrapping_abs</code></a>.</p>\n<h5 id=\"example-6\"><a class=\"doc-anchor\" href=\"#example-6\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(min, min.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(max, (-max).wrapping_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i16)?;%0Alet+neg+=+NonZero::new(-1i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0Alet+max+=+NonZero::new(i16::MAX)?;%0A%0Aassert_eq!(pos,+pos.wrapping_abs());%0Aassert_eq!(pos,+neg.wrapping_abs());%0Aassert_eq!(min,+min.wrapping_abs());%0Aassert_eq!(max,+(-max).wrapping_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unsigned_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.unsigned_abs\" class=\"fn\">unsigned_abs</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self\nwithout any wrapping or panicking.</p>\n<h5 id=\"example-7\"><a class=\"doc-anchor\" href=\"#example-7\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>u_pos = NonZero::new(<span class=\"number\">1u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_pos = NonZero::new(<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_neg = NonZero::new(-<span class=\"number\">1i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>u_max = NonZero::new(u16::MAX / <span class=\"number\">2 </span>+ <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(u_pos, i_pos.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_pos, i_neg.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_max, i_min.unsigned_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+u_pos+=+NonZero::new(1u16)?;%0Alet+i_pos+=+NonZero::new(1i16)?;%0Alet+i_neg+=+NonZero::new(-1i16)?;%0Alet+i_min+=+NonZero::new(i16::MIN)?;%0Alet+u_max+=+NonZero::new(u16::MAX+/+2+%2B+1)?;%0A%0Aassert_eq!(u_pos,+i_pos.unsigned_abs());%0Aassert_eq!(u_pos,+i_neg.unsigned_abs());%0Aassert_eq!(u_max,+i_min.unsigned_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_positive\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_positive\" class=\"fn\">is_positive</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is positive and <code>false</code> if the\nnumber is negative.</p>\n<h5 id=\"example-8\"><a class=\"doc-anchor\" href=\"#example-8\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(pos_five.is_positive());\n<span class=\"macro\">assert!</span>(!neg_five.is_positive());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i16)?;%0Alet+neg_five+=+NonZero::new(-5i16)?;%0A%0Aassert!(pos_five.is_positive());%0Aassert!(!neg_five.is_positive());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_negative\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_negative\" class=\"fn\">is_negative</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is negative and <code>false</code> if the\nnumber is positive.</p>\n<h5 id=\"example-9\"><a class=\"doc-anchor\" href=\"#example-9\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(neg_five.is_negative());\n<span class=\"macro\">assert!</span>(!pos_five.is_negative());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i16)?;%0Alet+neg_five+=+NonZero::new(-5i16)?;%0A%0Aassert!(neg_five.is_negative());%0Aassert!(!pos_five.is_negative());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_neg\" class=\"fn\">checked_neg</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked negation. Computes <code>-self</code>,\nreturning <code>None</code> if <code>self == NonZero::&lt;i16&gt;::MIN</code>.</p>\n<h5 id=\"example-10\"><a class=\"doc-anchor\" href=\"#example-10\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.checked_neg(), <span class=\"prelude-val\">Some</span>(neg_five));\n<span class=\"macro\">assert_eq!</span>(min.checked_neg(), <span class=\"prelude-val\">None</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i16)?;%0Alet+neg_five+=+NonZero::new(-5i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0A%0Aassert_eq!(pos_five.checked_neg(),+Some(neg_five));%0Aassert_eq!(min.checked_neg(),+None);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_neg\" class=\"fn\">overflowing_neg</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Negates self, overflowing if this is equal to the minimum value.</p>\n<p>See <a href=\"core/primitive.i16.html#method.overflowing_neg\" title=\"method i16::overflowing_neg\"><code>i16::overflowing_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-11\"><a class=\"doc-anchor\" href=\"#example-11\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.overflowing_neg(), (neg_five, <span class=\"bool-val\">false</span>));\n<span class=\"macro\">assert_eq!</span>(min.overflowing_neg(), (min, <span class=\"bool-val\">true</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i16)?;%0Alet+neg_five+=+NonZero::new(-5i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0A%0Aassert_eq!(pos_five.overflowing_neg(),+(neg_five,+false));%0Aassert_eq!(min.overflowing_neg(),+(min,+true));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_neg\" class=\"fn\">saturating_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating negation. Computes <code>-self</code>,\nreturning <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i16&gt;::MAX</code></a>\nif <code>self == NonZero::&lt;i16&gt;::MIN</code>\ninstead of overflowing.</p>\n<h5 id=\"example-12\"><a class=\"doc-anchor\" href=\"#example-12\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus_one = NonZero::new(i16::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.saturating_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.saturating_neg(), max);\n<span class=\"macro\">assert_eq!</span>(max.saturating_neg(), min_plus_one);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i16)?;%0Alet+neg_five+=+NonZero::new(-5i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0Alet+min_plus_one+=+NonZero::new(i16::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i16::MAX)?;%0A%0Aassert_eq!(pos_five.saturating_neg(),+neg_five);%0Aassert_eq!(min.saturating_neg(),+max);%0Aassert_eq!(max.saturating_neg(),+min_plus_one);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_neg\" class=\"fn\">wrapping_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping (modular) negation. Computes <code>-self</code>, wrapping around at the boundary\nof the type.</p>\n<p>See <a href=\"core/primitive.i16.html#method.wrapping_neg\" title=\"method i16::wrapping_neg\"><code>i16::wrapping_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-13\"><a class=\"doc-anchor\" href=\"#example-13\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i16::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.wrapping_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.wrapping_neg(), min);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i16)?;%0Alet+neg_five+=+NonZero::new(-5i16)?;%0Alet+min+=+NonZero::new(i16::MIN)?;%0A%0Aassert_eq!(pos_five.wrapping_neg(),+neg_five);%0Aassert_eq!(min.wrapping_neg(),+min);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_unsigned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_unsigned\" class=\"fn\">cast_unsigned</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as an unsigned integer of the same size.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">1i16</span>).unwrap();\n\n<span class=\"macro\">assert_eq!</span>(n.cast_unsigned(), NonZero::&lt;u16&gt;::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::new(-1i16).unwrap();%0A++++%0A++++assert_eq!(n.cast_unsigned(),+NonZero::%3Cu16%3E::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i16)?;%0Alet+four+=+NonZero::new(4i16)?;%0Alet+max+=+NonZero::new(i16::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i16&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i16)?;%0Alet+four+=+NonZero::new(4i16)?;%0Alet+max+=+NonZero::new(i16::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; i16::MAX</code>, or <code>self * rhs &lt; i16::MIN</code>.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i16)?;%0Alet+four+=+NonZero::new(4i16)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(i16::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i16)?;%0Alet+twenty_seven+=+NonZero::new(27i16)?;%0Alet+half_max+=+NonZero::new(i16::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2264-2274\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" title=\"associated constant core::num::NonZero::MIN\"><code>NonZero::&lt;i16&gt;::MIN</code></a> or <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i16&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i16)?;%0Alet+twenty_seven+=+NonZero::new(27i16)?;%0Alet+max+=+NonZero::new(i16::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Ci32%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><a href=\"#impl-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 32u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.i32.html#associatedconstant.BITS\" title=\"associated constant i32::BITS\"><code>i32::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i32&gt;::BITS, i32::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci32%3E::BITS,+i32::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i32.html#associatedconstant.MIN\" title=\"associated constant i32::MIN\"><code>i32::MIN</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i32&gt;::MIN.get(), i32::MIN);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci32%3E::MIN.get(),+i32::MIN);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i32.html#associatedconstant.MAX\" title=\"associated constant i32::MAX\"><code>i32::MAX</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i32&gt;::MAX.get(), i32::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci32%3E::MAX.get(),+i32::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i32&gt;::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci32%3E::new(-1i32)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci32%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci32%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci32%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci32%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci32%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i32&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci32%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Ci32%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x10000b3i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xb301</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">8</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x10000b3i32)?;%0Alet+m+=+NonZero::new(0xb301)?;%0A%0Aassert_eq!(n.rotate_left(8),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xb301i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x10000b3</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">8</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xb301i32)?;%0Alet+m+=+NonZero::new(0x10000b3)?;%0A%0Aassert_eq!(n.rotate_right(8),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x78563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678i32)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x78563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x1e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678i32)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x1e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI32;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI32::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI32::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI32;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai32)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroI32::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI32::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI32;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI32::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI32::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI32;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai32)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroI32::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI32::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai32)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai32)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.abs\" class=\"fn\">abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self.\nSee <a href=\"core/primitive.i32.html#method.abs\" title=\"method i32::abs\"><code>i32::abs</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-2\"><a class=\"doc-anchor\" href=\"#example-2\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i32)?;%0Alet+neg+=+NonZero::new(-1i32)?;%0A%0Aassert_eq!(pos,+pos.abs());%0Aassert_eq!(pos,+neg.abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_abs\" class=\"fn\">checked_abs</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked absolute value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> if\n<code>self == NonZero::&lt;i32&gt;::MIN</code>.\nThe result cannot be zero.</p>\n<h5 id=\"example-3\"><a class=\"doc-anchor\" href=\"#example-3\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(pos), neg.checked_abs());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, min.checked_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i32)?;%0Alet+neg+=+NonZero::new(-1i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0A%0Aassert_eq!(Some(pos),+neg.checked_abs());%0Aassert_eq!(None,+min.checked_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_abs\" class=\"fn\">overflowing_abs</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self,\nwith overflow information, see\n<a href=\"core/primitive.i32.html#method.overflowing_abs\" title=\"method i32::overflowing_abs\"><code>i32::overflowing_abs</code></a>.</p>\n<h5 id=\"example-4\"><a class=\"doc-anchor\" href=\"#example-4\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), pos.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), neg.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((min, <span class=\"bool-val\">true</span>), min.overflowing_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i32)?;%0Alet+neg+=+NonZero::new(-1i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0A%0Aassert_eq!((pos,+false),+pos.overflowing_abs());%0Aassert_eq!((pos,+false),+neg.overflowing_abs());%0Aassert_eq!((min,+true),+min.overflowing_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_abs\" class=\"fn\">saturating_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating absolute value, see\n<a href=\"core/primitive.i32.html#method.saturating_abs\" title=\"method i32::saturating_abs\"><code>i32::saturating_abs</code></a>.</p>\n<h5 id=\"example-5\"><a class=\"doc-anchor\" href=\"#example-5\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus = NonZero::new(i32::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min_plus.saturating_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i32)?;%0Alet+neg+=+NonZero::new(-1i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0Alet+min_plus+=+NonZero::new(i32::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i32::MAX)?;%0A%0Aassert_eq!(pos,+pos.saturating_abs());%0Aassert_eq!(pos,+neg.saturating_abs());%0Aassert_eq!(max,+min.saturating_abs());%0Aassert_eq!(max,+min_plus.saturating_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_abs\" class=\"fn\">wrapping_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping absolute value, see\n<a href=\"core/primitive.i32.html#method.wrapping_abs\" title=\"method i32::wrapping_abs\"><code>i32::wrapping_abs</code></a>.</p>\n<h5 id=\"example-6\"><a class=\"doc-anchor\" href=\"#example-6\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(min, min.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(max, (-max).wrapping_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i32)?;%0Alet+neg+=+NonZero::new(-1i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0Alet+max+=+NonZero::new(i32::MAX)?;%0A%0Aassert_eq!(pos,+pos.wrapping_abs());%0Aassert_eq!(pos,+neg.wrapping_abs());%0Aassert_eq!(min,+min.wrapping_abs());%0Aassert_eq!(max,+(-max).wrapping_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unsigned_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.unsigned_abs\" class=\"fn\">unsigned_abs</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self\nwithout any wrapping or panicking.</p>\n<h5 id=\"example-7\"><a class=\"doc-anchor\" href=\"#example-7\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>u_pos = NonZero::new(<span class=\"number\">1u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_pos = NonZero::new(<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_neg = NonZero::new(-<span class=\"number\">1i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>u_max = NonZero::new(u32::MAX / <span class=\"number\">2 </span>+ <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(u_pos, i_pos.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_pos, i_neg.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_max, i_min.unsigned_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+u_pos+=+NonZero::new(1u32)?;%0Alet+i_pos+=+NonZero::new(1i32)?;%0Alet+i_neg+=+NonZero::new(-1i32)?;%0Alet+i_min+=+NonZero::new(i32::MIN)?;%0Alet+u_max+=+NonZero::new(u32::MAX+/+2+%2B+1)?;%0A%0Aassert_eq!(u_pos,+i_pos.unsigned_abs());%0Aassert_eq!(u_pos,+i_neg.unsigned_abs());%0Aassert_eq!(u_max,+i_min.unsigned_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_positive\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_positive\" class=\"fn\">is_positive</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is positive and <code>false</code> if the\nnumber is negative.</p>\n<h5 id=\"example-8\"><a class=\"doc-anchor\" href=\"#example-8\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(pos_five.is_positive());\n<span class=\"macro\">assert!</span>(!neg_five.is_positive());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i32)?;%0Alet+neg_five+=+NonZero::new(-5i32)?;%0A%0Aassert!(pos_five.is_positive());%0Aassert!(!neg_five.is_positive());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_negative\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_negative\" class=\"fn\">is_negative</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is negative and <code>false</code> if the\nnumber is positive.</p>\n<h5 id=\"example-9\"><a class=\"doc-anchor\" href=\"#example-9\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(neg_five.is_negative());\n<span class=\"macro\">assert!</span>(!pos_five.is_negative());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i32)?;%0Alet+neg_five+=+NonZero::new(-5i32)?;%0A%0Aassert!(neg_five.is_negative());%0Aassert!(!pos_five.is_negative());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_neg\" class=\"fn\">checked_neg</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked negation. Computes <code>-self</code>,\nreturning <code>None</code> if <code>self == NonZero::&lt;i32&gt;::MIN</code>.</p>\n<h5 id=\"example-10\"><a class=\"doc-anchor\" href=\"#example-10\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.checked_neg(), <span class=\"prelude-val\">Some</span>(neg_five));\n<span class=\"macro\">assert_eq!</span>(min.checked_neg(), <span class=\"prelude-val\">None</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i32)?;%0Alet+neg_five+=+NonZero::new(-5i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0A%0Aassert_eq!(pos_five.checked_neg(),+Some(neg_five));%0Aassert_eq!(min.checked_neg(),+None);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_neg\" class=\"fn\">overflowing_neg</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Negates self, overflowing if this is equal to the minimum value.</p>\n<p>See <a href=\"core/primitive.i32.html#method.overflowing_neg\" title=\"method i32::overflowing_neg\"><code>i32::overflowing_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-11\"><a class=\"doc-anchor\" href=\"#example-11\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.overflowing_neg(), (neg_five, <span class=\"bool-val\">false</span>));\n<span class=\"macro\">assert_eq!</span>(min.overflowing_neg(), (min, <span class=\"bool-val\">true</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i32)?;%0Alet+neg_five+=+NonZero::new(-5i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0A%0Aassert_eq!(pos_five.overflowing_neg(),+(neg_five,+false));%0Aassert_eq!(min.overflowing_neg(),+(min,+true));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_neg\" class=\"fn\">saturating_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating negation. Computes <code>-self</code>,\nreturning <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i32&gt;::MAX</code></a>\nif <code>self == NonZero::&lt;i32&gt;::MIN</code>\ninstead of overflowing.</p>\n<h5 id=\"example-12\"><a class=\"doc-anchor\" href=\"#example-12\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus_one = NonZero::new(i32::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.saturating_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.saturating_neg(), max);\n<span class=\"macro\">assert_eq!</span>(max.saturating_neg(), min_plus_one);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i32)?;%0Alet+neg_five+=+NonZero::new(-5i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0Alet+min_plus_one+=+NonZero::new(i32::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i32::MAX)?;%0A%0Aassert_eq!(pos_five.saturating_neg(),+neg_five);%0Aassert_eq!(min.saturating_neg(),+max);%0Aassert_eq!(max.saturating_neg(),+min_plus_one);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_neg\" class=\"fn\">wrapping_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping (modular) negation. Computes <code>-self</code>, wrapping around at the boundary\nof the type.</p>\n<p>See <a href=\"core/primitive.i32.html#method.wrapping_neg\" title=\"method i32::wrapping_neg\"><code>i32::wrapping_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-13\"><a class=\"doc-anchor\" href=\"#example-13\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i32::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.wrapping_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.wrapping_neg(), min);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i32)?;%0Alet+neg_five+=+NonZero::new(-5i32)?;%0Alet+min+=+NonZero::new(i32::MIN)?;%0A%0Aassert_eq!(pos_five.wrapping_neg(),+neg_five);%0Aassert_eq!(min.wrapping_neg(),+min);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_unsigned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_unsigned\" class=\"fn\">cast_unsigned</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as an unsigned integer of the same size.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">1i32</span>).unwrap();\n\n<span class=\"macro\">assert_eq!</span>(n.cast_unsigned(), NonZero::&lt;u32&gt;::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::new(-1i32).unwrap();%0A++++%0A++++assert_eq!(n.cast_unsigned(),+NonZero::%3Cu32%3E::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i32)?;%0Alet+four+=+NonZero::new(4i32)?;%0Alet+max+=+NonZero::new(i32::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i32&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i32)?;%0Alet+four+=+NonZero::new(4i32)?;%0Alet+max+=+NonZero::new(i32::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; i32::MAX</code>, or <code>self * rhs &lt; i32::MIN</code>.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i32)?;%0Alet+four+=+NonZero::new(4i32)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(i32::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i32)?;%0Alet+twenty_seven+=+NonZero::new(27i32)?;%0Alet+half_max+=+NonZero::new(i32::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2276-2286\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" title=\"associated constant core::num::NonZero::MIN\"><code>NonZero::&lt;i32&gt;::MIN</code></a> or <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i32&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i32)?;%0Alet+twenty_seven+=+NonZero::new(27i32)?;%0Alet+max+=+NonZero::new(i32::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Ci64%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><a href=\"#impl-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 64u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.i64.html#associatedconstant.BITS\" title=\"associated constant i64::BITS\"><code>i64::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i64&gt;::BITS, i64::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci64%3E::BITS,+i64::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i64.html#associatedconstant.MIN\" title=\"associated constant i64::MIN\"><code>i64::MIN</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i64&gt;::MIN.get(), i64::MIN);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci64%3E::MIN.get(),+i64::MIN);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i64.html#associatedconstant.MAX\" title=\"associated constant i64::MAX\"><code>i64::MAX</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i64&gt;::MAX.get(), i64::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci64%3E::MAX.get(),+i64::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i64&gt;::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci64%3E::new(-1i64)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci64%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci64%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci64%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci64%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci64%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i64&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci64%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Ci64%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xaa00000000006e1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x6e10aa</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xaa00000000006e1i64)?;%0Alet+m+=+NonZero::new(0x6e10aa)?;%0A%0Aassert_eq!(n.rotate_left(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x6e10aai64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xaa00000000006e1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x6e10aai64)?;%0Alet+m+=+NonZero::new(0xaa00000000006e1)?;%0A%0Aassert_eq!(n.rotate_right(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x5634129078563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456i64)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x5634129078563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x6a2c48091e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456i64)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x6a2c48091e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI64;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI64::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI64::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI64;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai64)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroI64::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI64::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI64;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI64::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI64::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI64;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai64)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroI64::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI64::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai64)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai64)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.abs\" class=\"fn\">abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self.\nSee <a href=\"core/primitive.i64.html#method.abs\" title=\"method i64::abs\"><code>i64::abs</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-2\"><a class=\"doc-anchor\" href=\"#example-2\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i64)?;%0Alet+neg+=+NonZero::new(-1i64)?;%0A%0Aassert_eq!(pos,+pos.abs());%0Aassert_eq!(pos,+neg.abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_abs\" class=\"fn\">checked_abs</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked absolute value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> if\n<code>self == NonZero::&lt;i64&gt;::MIN</code>.\nThe result cannot be zero.</p>\n<h5 id=\"example-3\"><a class=\"doc-anchor\" href=\"#example-3\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(pos), neg.checked_abs());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, min.checked_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i64)?;%0Alet+neg+=+NonZero::new(-1i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0A%0Aassert_eq!(Some(pos),+neg.checked_abs());%0Aassert_eq!(None,+min.checked_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_abs\" class=\"fn\">overflowing_abs</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self,\nwith overflow information, see\n<a href=\"core/primitive.i64.html#method.overflowing_abs\" title=\"method i64::overflowing_abs\"><code>i64::overflowing_abs</code></a>.</p>\n<h5 id=\"example-4\"><a class=\"doc-anchor\" href=\"#example-4\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), pos.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), neg.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((min, <span class=\"bool-val\">true</span>), min.overflowing_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i64)?;%0Alet+neg+=+NonZero::new(-1i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0A%0Aassert_eq!((pos,+false),+pos.overflowing_abs());%0Aassert_eq!((pos,+false),+neg.overflowing_abs());%0Aassert_eq!((min,+true),+min.overflowing_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_abs\" class=\"fn\">saturating_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating absolute value, see\n<a href=\"core/primitive.i64.html#method.saturating_abs\" title=\"method i64::saturating_abs\"><code>i64::saturating_abs</code></a>.</p>\n<h5 id=\"example-5\"><a class=\"doc-anchor\" href=\"#example-5\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus = NonZero::new(i64::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min_plus.saturating_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i64)?;%0Alet+neg+=+NonZero::new(-1i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0Alet+min_plus+=+NonZero::new(i64::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i64::MAX)?;%0A%0Aassert_eq!(pos,+pos.saturating_abs());%0Aassert_eq!(pos,+neg.saturating_abs());%0Aassert_eq!(max,+min.saturating_abs());%0Aassert_eq!(max,+min_plus.saturating_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_abs\" class=\"fn\">wrapping_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping absolute value, see\n<a href=\"core/primitive.i64.html#method.wrapping_abs\" title=\"method i64::wrapping_abs\"><code>i64::wrapping_abs</code></a>.</p>\n<h5 id=\"example-6\"><a class=\"doc-anchor\" href=\"#example-6\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(min, min.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(max, (-max).wrapping_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i64)?;%0Alet+neg+=+NonZero::new(-1i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0Alet+max+=+NonZero::new(i64::MAX)?;%0A%0Aassert_eq!(pos,+pos.wrapping_abs());%0Aassert_eq!(pos,+neg.wrapping_abs());%0Aassert_eq!(min,+min.wrapping_abs());%0Aassert_eq!(max,+(-max).wrapping_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unsigned_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.unsigned_abs\" class=\"fn\">unsigned_abs</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self\nwithout any wrapping or panicking.</p>\n<h5 id=\"example-7\"><a class=\"doc-anchor\" href=\"#example-7\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>u_pos = NonZero::new(<span class=\"number\">1u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_pos = NonZero::new(<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_neg = NonZero::new(-<span class=\"number\">1i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>u_max = NonZero::new(u64::MAX / <span class=\"number\">2 </span>+ <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(u_pos, i_pos.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_pos, i_neg.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_max, i_min.unsigned_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+u_pos+=+NonZero::new(1u64)?;%0Alet+i_pos+=+NonZero::new(1i64)?;%0Alet+i_neg+=+NonZero::new(-1i64)?;%0Alet+i_min+=+NonZero::new(i64::MIN)?;%0Alet+u_max+=+NonZero::new(u64::MAX+/+2+%2B+1)?;%0A%0Aassert_eq!(u_pos,+i_pos.unsigned_abs());%0Aassert_eq!(u_pos,+i_neg.unsigned_abs());%0Aassert_eq!(u_max,+i_min.unsigned_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_positive\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_positive\" class=\"fn\">is_positive</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is positive and <code>false</code> if the\nnumber is negative.</p>\n<h5 id=\"example-8\"><a class=\"doc-anchor\" href=\"#example-8\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(pos_five.is_positive());\n<span class=\"macro\">assert!</span>(!neg_five.is_positive());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i64)?;%0Alet+neg_five+=+NonZero::new(-5i64)?;%0A%0Aassert!(pos_five.is_positive());%0Aassert!(!neg_five.is_positive());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_negative\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_negative\" class=\"fn\">is_negative</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is negative and <code>false</code> if the\nnumber is positive.</p>\n<h5 id=\"example-9\"><a class=\"doc-anchor\" href=\"#example-9\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(neg_five.is_negative());\n<span class=\"macro\">assert!</span>(!pos_five.is_negative());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i64)?;%0Alet+neg_five+=+NonZero::new(-5i64)?;%0A%0Aassert!(neg_five.is_negative());%0Aassert!(!pos_five.is_negative());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_neg\" class=\"fn\">checked_neg</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked negation. Computes <code>-self</code>,\nreturning <code>None</code> if <code>self == NonZero::&lt;i64&gt;::MIN</code>.</p>\n<h5 id=\"example-10\"><a class=\"doc-anchor\" href=\"#example-10\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.checked_neg(), <span class=\"prelude-val\">Some</span>(neg_five));\n<span class=\"macro\">assert_eq!</span>(min.checked_neg(), <span class=\"prelude-val\">None</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i64)?;%0Alet+neg_five+=+NonZero::new(-5i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0A%0Aassert_eq!(pos_five.checked_neg(),+Some(neg_five));%0Aassert_eq!(min.checked_neg(),+None);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_neg\" class=\"fn\">overflowing_neg</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Negates self, overflowing if this is equal to the minimum value.</p>\n<p>See <a href=\"core/primitive.i64.html#method.overflowing_neg\" title=\"method i64::overflowing_neg\"><code>i64::overflowing_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-11\"><a class=\"doc-anchor\" href=\"#example-11\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.overflowing_neg(), (neg_five, <span class=\"bool-val\">false</span>));\n<span class=\"macro\">assert_eq!</span>(min.overflowing_neg(), (min, <span class=\"bool-val\">true</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i64)?;%0Alet+neg_five+=+NonZero::new(-5i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0A%0Aassert_eq!(pos_five.overflowing_neg(),+(neg_five,+false));%0Aassert_eq!(min.overflowing_neg(),+(min,+true));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_neg\" class=\"fn\">saturating_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating negation. Computes <code>-self</code>,\nreturning <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i64&gt;::MAX</code></a>\nif <code>self == NonZero::&lt;i64&gt;::MIN</code>\ninstead of overflowing.</p>\n<h5 id=\"example-12\"><a class=\"doc-anchor\" href=\"#example-12\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus_one = NonZero::new(i64::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.saturating_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.saturating_neg(), max);\n<span class=\"macro\">assert_eq!</span>(max.saturating_neg(), min_plus_one);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i64)?;%0Alet+neg_five+=+NonZero::new(-5i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0Alet+min_plus_one+=+NonZero::new(i64::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i64::MAX)?;%0A%0Aassert_eq!(pos_five.saturating_neg(),+neg_five);%0Aassert_eq!(min.saturating_neg(),+max);%0Aassert_eq!(max.saturating_neg(),+min_plus_one);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_neg\" class=\"fn\">wrapping_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping (modular) negation. Computes <code>-self</code>, wrapping around at the boundary\nof the type.</p>\n<p>See <a href=\"core/primitive.i64.html#method.wrapping_neg\" title=\"method i64::wrapping_neg\"><code>i64::wrapping_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-13\"><a class=\"doc-anchor\" href=\"#example-13\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i64::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.wrapping_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.wrapping_neg(), min);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i64)?;%0Alet+neg_five+=+NonZero::new(-5i64)?;%0Alet+min+=+NonZero::new(i64::MIN)?;%0A%0Aassert_eq!(pos_five.wrapping_neg(),+neg_five);%0Aassert_eq!(min.wrapping_neg(),+min);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_unsigned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_unsigned\" class=\"fn\">cast_unsigned</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as an unsigned integer of the same size.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">1i64</span>).unwrap();\n\n<span class=\"macro\">assert_eq!</span>(n.cast_unsigned(), NonZero::&lt;u64&gt;::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::new(-1i64).unwrap();%0A++++%0A++++assert_eq!(n.cast_unsigned(),+NonZero::%3Cu64%3E::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i64)?;%0Alet+four+=+NonZero::new(4i64)?;%0Alet+max+=+NonZero::new(i64::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i64&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i64)?;%0Alet+four+=+NonZero::new(4i64)?;%0Alet+max+=+NonZero::new(i64::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; i64::MAX</code>, or <code>self * rhs &lt; i64::MIN</code>.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i64)?;%0Alet+four+=+NonZero::new(4i64)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(i64::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i64)?;%0Alet+twenty_seven+=+NonZero::new(27i64)?;%0Alet+half_max+=+NonZero::new(i64::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2288-2298\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" title=\"associated constant core::num::NonZero::MIN\"><code>NonZero::&lt;i64&gt;::MIN</code></a> or <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i64&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i64)?;%0Alet+twenty_seven+=+NonZero::new(27i64)?;%0Alet+max+=+NonZero::new(i64::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Ci8%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><a href=\"#impl-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 8u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.i8.html#associatedconstant.BITS\" title=\"associated constant i8::BITS\"><code>i8::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i8&gt;::BITS, i8::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci8%3E::BITS,+i8::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i8.html#associatedconstant.MIN\" title=\"associated constant i8::MIN\"><code>i8::MIN</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i8&gt;::MIN.get(), i8::MIN);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci8%3E::MIN.get(),+i8::MIN);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.i8.html#associatedconstant.MAX\" title=\"associated constant i8::MAX\"><code>i8::MAX</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;i8&gt;::MAX.get(), i8::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Ci8%3E::MAX.get(),+i8::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i8&gt;::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci8%3E::new(-1i8)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Ci8%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci8%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci8%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci8%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Ci8%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;i8&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Ci8%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Ci8%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">0x7ei8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xa</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">2</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(-0x7ei8)?;%0Alet+m+=+NonZero::new(0xa)?;%0A%0Aassert_eq!(n.rotate_left(2),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xai8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(-<span class=\"number\">0x7e</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">2</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xai8)?;%0Alet+m+=+NonZero::new(-0x7e)?;%0A%0Aassert_eq!(n.rotate_right(2),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x12</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12i8)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x12)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12i8)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI8;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI8::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI8::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI8;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai8)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroI8::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI8::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroI8;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroI8::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroI8::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroI8;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai8)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroI8::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroI8::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai8)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ai8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ai8)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.abs\" class=\"fn\">abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self.\nSee <a href=\"core/primitive.i8.html#method.abs\" title=\"method i8::abs\"><code>i8::abs</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-2\"><a class=\"doc-anchor\" href=\"#example-2\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i8)?;%0Alet+neg+=+NonZero::new(-1i8)?;%0A%0Aassert_eq!(pos,+pos.abs());%0Aassert_eq!(pos,+neg.abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_abs\" class=\"fn\">checked_abs</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked absolute value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> if\n<code>self == NonZero::&lt;i8&gt;::MIN</code>.\nThe result cannot be zero.</p>\n<h5 id=\"example-3\"><a class=\"doc-anchor\" href=\"#example-3\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(pos), neg.checked_abs());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, min.checked_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i8)?;%0Alet+neg+=+NonZero::new(-1i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0A%0Aassert_eq!(Some(pos),+neg.checked_abs());%0Aassert_eq!(None,+min.checked_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_abs\" class=\"fn\">overflowing_abs</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self,\nwith overflow information, see\n<a href=\"core/primitive.i8.html#method.overflowing_abs\" title=\"method i8::overflowing_abs\"><code>i8::overflowing_abs</code></a>.</p>\n<h5 id=\"example-4\"><a class=\"doc-anchor\" href=\"#example-4\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), pos.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), neg.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((min, <span class=\"bool-val\">true</span>), min.overflowing_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i8)?;%0Alet+neg+=+NonZero::new(-1i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0A%0Aassert_eq!((pos,+false),+pos.overflowing_abs());%0Aassert_eq!((pos,+false),+neg.overflowing_abs());%0Aassert_eq!((min,+true),+min.overflowing_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_abs\" class=\"fn\">saturating_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating absolute value, see\n<a href=\"core/primitive.i8.html#method.saturating_abs\" title=\"method i8::saturating_abs\"><code>i8::saturating_abs</code></a>.</p>\n<h5 id=\"example-5\"><a class=\"doc-anchor\" href=\"#example-5\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus = NonZero::new(i8::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min_plus.saturating_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i8)?;%0Alet+neg+=+NonZero::new(-1i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0Alet+min_plus+=+NonZero::new(i8::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i8::MAX)?;%0A%0Aassert_eq!(pos,+pos.saturating_abs());%0Aassert_eq!(pos,+neg.saturating_abs());%0Aassert_eq!(max,+min.saturating_abs());%0Aassert_eq!(max,+min_plus.saturating_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_abs\" class=\"fn\">wrapping_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping absolute value, see\n<a href=\"core/primitive.i8.html#method.wrapping_abs\" title=\"method i8::wrapping_abs\"><code>i8::wrapping_abs</code></a>.</p>\n<h5 id=\"example-6\"><a class=\"doc-anchor\" href=\"#example-6\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(min, min.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(max, (-max).wrapping_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1i8)?;%0Alet+neg+=+NonZero::new(-1i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0Alet+max+=+NonZero::new(i8::MAX)?;%0A%0Aassert_eq!(pos,+pos.wrapping_abs());%0Aassert_eq!(pos,+neg.wrapping_abs());%0Aassert_eq!(min,+min.wrapping_abs());%0Aassert_eq!(max,+(-max).wrapping_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unsigned_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.unsigned_abs\" class=\"fn\">unsigned_abs</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self\nwithout any wrapping or panicking.</p>\n<h5 id=\"example-7\"><a class=\"doc-anchor\" href=\"#example-7\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>u_pos = NonZero::new(<span class=\"number\">1u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_pos = NonZero::new(<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_neg = NonZero::new(-<span class=\"number\">1i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>u_max = NonZero::new(u8::MAX / <span class=\"number\">2 </span>+ <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(u_pos, i_pos.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_pos, i_neg.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_max, i_min.unsigned_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+u_pos+=+NonZero::new(1u8)?;%0Alet+i_pos+=+NonZero::new(1i8)?;%0Alet+i_neg+=+NonZero::new(-1i8)?;%0Alet+i_min+=+NonZero::new(i8::MIN)?;%0Alet+u_max+=+NonZero::new(u8::MAX+/+2+%2B+1)?;%0A%0Aassert_eq!(u_pos,+i_pos.unsigned_abs());%0Aassert_eq!(u_pos,+i_neg.unsigned_abs());%0Aassert_eq!(u_max,+i_min.unsigned_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_positive\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_positive\" class=\"fn\">is_positive</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is positive and <code>false</code> if the\nnumber is negative.</p>\n<h5 id=\"example-8\"><a class=\"doc-anchor\" href=\"#example-8\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(pos_five.is_positive());\n<span class=\"macro\">assert!</span>(!neg_five.is_positive());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i8)?;%0Alet+neg_five+=+NonZero::new(-5i8)?;%0A%0Aassert!(pos_five.is_positive());%0Aassert!(!neg_five.is_positive());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_negative\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_negative\" class=\"fn\">is_negative</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is negative and <code>false</code> if the\nnumber is positive.</p>\n<h5 id=\"example-9\"><a class=\"doc-anchor\" href=\"#example-9\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(neg_five.is_negative());\n<span class=\"macro\">assert!</span>(!pos_five.is_negative());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i8)?;%0Alet+neg_five+=+NonZero::new(-5i8)?;%0A%0Aassert!(neg_five.is_negative());%0Aassert!(!pos_five.is_negative());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_neg\" class=\"fn\">checked_neg</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked negation. Computes <code>-self</code>,\nreturning <code>None</code> if <code>self == NonZero::&lt;i8&gt;::MIN</code>.</p>\n<h5 id=\"example-10\"><a class=\"doc-anchor\" href=\"#example-10\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.checked_neg(), <span class=\"prelude-val\">Some</span>(neg_five));\n<span class=\"macro\">assert_eq!</span>(min.checked_neg(), <span class=\"prelude-val\">None</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i8)?;%0Alet+neg_five+=+NonZero::new(-5i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0A%0Aassert_eq!(pos_five.checked_neg(),+Some(neg_five));%0Aassert_eq!(min.checked_neg(),+None);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_neg\" class=\"fn\">overflowing_neg</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Negates self, overflowing if this is equal to the minimum value.</p>\n<p>See <a href=\"core/primitive.i8.html#method.overflowing_neg\" title=\"method i8::overflowing_neg\"><code>i8::overflowing_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-11\"><a class=\"doc-anchor\" href=\"#example-11\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.overflowing_neg(), (neg_five, <span class=\"bool-val\">false</span>));\n<span class=\"macro\">assert_eq!</span>(min.overflowing_neg(), (min, <span class=\"bool-val\">true</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i8)?;%0Alet+neg_five+=+NonZero::new(-5i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0A%0Aassert_eq!(pos_five.overflowing_neg(),+(neg_five,+false));%0Aassert_eq!(min.overflowing_neg(),+(min,+true));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_neg\" class=\"fn\">saturating_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating negation. Computes <code>-self</code>,\nreturning <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i8&gt;::MAX</code></a>\nif <code>self == NonZero::&lt;i8&gt;::MIN</code>\ninstead of overflowing.</p>\n<h5 id=\"example-12\"><a class=\"doc-anchor\" href=\"#example-12\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus_one = NonZero::new(i8::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.saturating_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.saturating_neg(), max);\n<span class=\"macro\">assert_eq!</span>(max.saturating_neg(), min_plus_one);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i8)?;%0Alet+neg_five+=+NonZero::new(-5i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0Alet+min_plus_one+=+NonZero::new(i8::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(i8::MAX)?;%0A%0Aassert_eq!(pos_five.saturating_neg(),+neg_five);%0Aassert_eq!(min.saturating_neg(),+max);%0Aassert_eq!(max.saturating_neg(),+min_plus_one);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_neg\" class=\"fn\">wrapping_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping (modular) negation. Computes <code>-self</code>, wrapping around at the boundary\nof the type.</p>\n<p>See <a href=\"core/primitive.i8.html#method.wrapping_neg\" title=\"method i8::wrapping_neg\"><code>i8::wrapping_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-13\"><a class=\"doc-anchor\" href=\"#example-13\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(i8::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.wrapping_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.wrapping_neg(), min);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5i8)?;%0Alet+neg_five+=+NonZero::new(-5i8)?;%0Alet+min+=+NonZero::new(i8::MIN)?;%0A%0Aassert_eq!(pos_five.wrapping_neg(),+neg_five);%0Aassert_eq!(min.wrapping_neg(),+min);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_unsigned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_unsigned\" class=\"fn\">cast_unsigned</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as an unsigned integer of the same size.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">1i8</span>).unwrap();\n\n<span class=\"macro\">assert_eq!</span>(n.cast_unsigned(), NonZero::&lt;u8&gt;::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::new(-1i8).unwrap();%0A++++%0A++++assert_eq!(n.cast_unsigned(),+NonZero::%3Cu8%3E::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i8)?;%0Alet+four+=+NonZero::new(4i8)?;%0Alet+max+=+NonZero::new(i8::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i8&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i8)?;%0Alet+four+=+NonZero::new(4i8)?;%0Alet+max+=+NonZero::new(i8::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; i8::MAX</code>, or <code>self * rhs &lt; i8::MIN</code>.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4i8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2i8)?;%0Alet+four+=+NonZero::new(4i8)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(i8::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i8)?;%0Alet+twenty_seven+=+NonZero::new(27i8)?;%0Alet+half_max+=+NonZero::new(i8::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2252-2262\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" title=\"associated constant core::num::NonZero::MIN\"><code>NonZero::&lt;i8&gt;::MIN</code></a> or <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;i8&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27i8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(i8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3i8)?;%0Alet+twenty_seven+=+NonZero::new(27i8)?;%0Alet+max+=+NonZero::new(i8::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cisize%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><a href=\"#impl-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 64u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.isize.html#associatedconstant.BITS\" title=\"associated constant isize::BITS\"><code>isize::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;isize&gt;::BITS, isize::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cisize%3E::BITS,+isize::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.isize.html#associatedconstant.MIN\" title=\"associated constant isize::MIN\"><code>isize::MIN</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;isize&gt;::MIN.get(), isize::MIN);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cisize%3E::MIN.get(),+isize::MIN);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.isize.html#associatedconstant.MAX\" title=\"associated constant isize::MAX\"><code>isize::MAX</code></a>.</p>\n<p>Note: While most integer types are defined for every whole\nnumber between <code>MIN</code> and <code>MAX</code>, signed non-zero integers are\na special case. They have a “gap” at 0.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;isize&gt;::MAX.get(), isize::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cisize%3E::MAX.get(),+isize::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;isize&gt;::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cisize%3E::new(-1isize)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cisize%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cisize%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cisize%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cisize%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cisize%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;isize&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cisize%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cisize%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xaa00000000006e1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x6e10aa</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xaa00000000006e1isize)?;%0Alet+m+=+NonZero::new(0x6e10aa)?;%0A%0Aassert_eq!(n.rotate_left(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x6e10aaisize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xaa00000000006e1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x6e10aaisize)?;%0Alet+m+=+NonZero::new(0xaa00000000006e1)?;%0A%0Aassert_eq!(n.rotate_right(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x5634129078563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456isize)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x5634129078563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x6a2c48091e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456isize)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x6a2c48091e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroIsize;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Aisize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroIsize::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroIsize::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroIsize;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Aisize)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroIsize::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroIsize::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroIsize;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Aisize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroIsize::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroIsize::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroIsize;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Aisize)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroIsize::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroIsize::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Aisize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Aisize)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Aisize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Aisize)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.abs\" class=\"fn\">abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self.\nSee <a href=\"core/primitive.isize.html#method.abs\" title=\"method isize::abs\"><code>isize::abs</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-2\"><a class=\"doc-anchor\" href=\"#example-2\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1isize)?;%0Alet+neg+=+NonZero::new(-1isize)?;%0A%0Aassert_eq!(pos,+pos.abs());%0Aassert_eq!(pos,+neg.abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_abs\" class=\"fn\">checked_abs</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked absolute value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> if\n<code>self == NonZero::&lt;isize&gt;::MIN</code>.\nThe result cannot be zero.</p>\n<h5 id=\"example-3\"><a class=\"doc-anchor\" href=\"#example-3\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(pos), neg.checked_abs());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, min.checked_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1isize)?;%0Alet+neg+=+NonZero::new(-1isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0A%0Aassert_eq!(Some(pos),+neg.checked_abs());%0Aassert_eq!(None,+min.checked_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_abs\" class=\"fn\">overflowing_abs</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self,\nwith overflow information, see\n<a href=\"core/primitive.isize.html#method.overflowing_abs\" title=\"method isize::overflowing_abs\"><code>isize::overflowing_abs</code></a>.</p>\n<h5 id=\"example-4\"><a class=\"doc-anchor\" href=\"#example-4\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), pos.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((pos, <span class=\"bool-val\">false</span>), neg.overflowing_abs());\n<span class=\"macro\">assert_eq!</span>((min, <span class=\"bool-val\">true</span>), min.overflowing_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1isize)?;%0Alet+neg+=+NonZero::new(-1isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0A%0Aassert_eq!((pos,+false),+pos.overflowing_abs());%0Aassert_eq!((pos,+false),+neg.overflowing_abs());%0Aassert_eq!((min,+true),+min.overflowing_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_abs\" class=\"fn\">saturating_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating absolute value, see\n<a href=\"core/primitive.isize.html#method.saturating_abs\" title=\"method isize::saturating_abs\"><code>isize::saturating_abs</code></a>.</p>\n<h5 id=\"example-5\"><a class=\"doc-anchor\" href=\"#example-5\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus = NonZero::new(isize::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(isize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min.saturating_abs());\n<span class=\"macro\">assert_eq!</span>(max, min_plus.saturating_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1isize)?;%0Alet+neg+=+NonZero::new(-1isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0Alet+min_plus+=+NonZero::new(isize::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(isize::MAX)?;%0A%0Aassert_eq!(pos,+pos.saturating_abs());%0Aassert_eq!(pos,+neg.saturating_abs());%0Aassert_eq!(max,+min.saturating_abs());%0Aassert_eq!(max,+min_plus.saturating_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_abs\" class=\"fn\">wrapping_abs</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping absolute value, see\n<a href=\"core/primitive.isize.html#method.wrapping_abs\" title=\"method isize::wrapping_abs\"><code>isize::wrapping_abs</code></a>.</p>\n<h5 id=\"example-6\"><a class=\"doc-anchor\" href=\"#example-6\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos = NonZero::new(<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg = NonZero::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos, pos.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(pos, neg.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(min, min.wrapping_abs());\n<span class=\"macro\">assert_eq!</span>(max, (-max).wrapping_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos+=+NonZero::new(1isize)?;%0Alet+neg+=+NonZero::new(-1isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0Alet+max+=+NonZero::new(isize::MAX)?;%0A%0Aassert_eq!(pos,+pos.wrapping_abs());%0Aassert_eq!(pos,+neg.wrapping_abs());%0Aassert_eq!(min,+min.wrapping_abs());%0Aassert_eq!(max,+(-max).wrapping_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unsigned_abs\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.unsigned_abs\" class=\"fn\">unsigned_abs</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Computes the absolute value of self\nwithout any wrapping or panicking.</p>\n<h5 id=\"example-7\"><a class=\"doc-anchor\" href=\"#example-7\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>u_pos = NonZero::new(<span class=\"number\">1usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_pos = NonZero::new(<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_neg = NonZero::new(-<span class=\"number\">1isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>i_min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>u_max = NonZero::new(usize::MAX / <span class=\"number\">2 </span>+ <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(u_pos, i_pos.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_pos, i_neg.unsigned_abs());\n<span class=\"macro\">assert_eq!</span>(u_max, i_min.unsigned_abs());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+u_pos+=+NonZero::new(1usize)?;%0Alet+i_pos+=+NonZero::new(1isize)?;%0Alet+i_neg+=+NonZero::new(-1isize)?;%0Alet+i_min+=+NonZero::new(isize::MIN)?;%0Alet+u_max+=+NonZero::new(usize::MAX+/+2+%2B+1)?;%0A%0Aassert_eq!(u_pos,+i_pos.unsigned_abs());%0Aassert_eq!(u_pos,+i_neg.unsigned_abs());%0Aassert_eq!(u_max,+i_min.unsigned_abs());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_positive\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_positive\" class=\"fn\">is_positive</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is positive and <code>false</code> if the\nnumber is negative.</p>\n<h5 id=\"example-8\"><a class=\"doc-anchor\" href=\"#example-8\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(pos_five.is_positive());\n<span class=\"macro\">assert!</span>(!neg_five.is_positive());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5isize)?;%0Alet+neg_five+=+NonZero::new(-5isize)?;%0A%0Aassert!(pos_five.is_positive());%0Aassert!(!neg_five.is_positive());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_negative\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_negative\" class=\"fn\">is_negative</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if <code>self</code> is negative and <code>false</code> if the\nnumber is positive.</p>\n<h5 id=\"example-9\"><a class=\"doc-anchor\" href=\"#example-9\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert!</span>(neg_five.is_negative());\n<span class=\"macro\">assert!</span>(!pos_five.is_negative());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5isize)?;%0Alet+neg_five+=+NonZero::new(-5isize)?;%0A%0Aassert!(neg_five.is_negative());%0Aassert!(!pos_five.is_negative());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_neg\" class=\"fn\">checked_neg</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Checked negation. Computes <code>-self</code>,\nreturning <code>None</code> if <code>self == NonZero::&lt;isize&gt;::MIN</code>.</p>\n<h5 id=\"example-10\"><a class=\"doc-anchor\" href=\"#example-10\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.checked_neg(), <span class=\"prelude-val\">Some</span>(neg_five));\n<span class=\"macro\">assert_eq!</span>(min.checked_neg(), <span class=\"prelude-val\">None</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5isize)?;%0Alet+neg_five+=+NonZero::new(-5isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0A%0Aassert_eq!(pos_five.checked_neg(),+Some(neg_five));%0Aassert_eq!(min.checked_neg(),+None);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.overflowing_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.overflowing_neg\" class=\"fn\">overflowing_neg</a>(self) -&gt; (Self, <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a>)</h4></section></summary><div class=\"docblock\"><p>Negates self, overflowing if this is equal to the minimum value.</p>\n<p>See <a href=\"core/primitive.isize.html#method.overflowing_neg\" title=\"method isize::overflowing_neg\"><code>isize::overflowing_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-11\"><a class=\"doc-anchor\" href=\"#example-11\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.overflowing_neg(), (neg_five, <span class=\"bool-val\">false</span>));\n<span class=\"macro\">assert_eq!</span>(min.overflowing_neg(), (min, <span class=\"bool-val\">true</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5isize)?;%0Alet+neg_five+=+NonZero::new(-5isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0A%0Aassert_eq!(pos_five.overflowing_neg(),+(neg_five,+false));%0Aassert_eq!(min.overflowing_neg(),+(min,+true));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_neg\" class=\"fn\">saturating_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Saturating negation. Computes <code>-self</code>,\nreturning <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;isize&gt;::MAX</code></a>\nif <code>self == NonZero::&lt;isize&gt;::MIN</code>\ninstead of overflowing.</p>\n<h5 id=\"example-12\"><a class=\"doc-anchor\" href=\"#example-12\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min_plus_one = NonZero::new(isize::MIN + <span class=\"number\">1</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(isize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.saturating_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.saturating_neg(), max);\n<span class=\"macro\">assert_eq!</span>(max.saturating_neg(), min_plus_one);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5isize)?;%0Alet+neg_five+=+NonZero::new(-5isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0Alet+min_plus_one+=+NonZero::new(isize::MIN+%2B+1)?;%0Alet+max+=+NonZero::new(isize::MAX)?;%0A%0Aassert_eq!(pos_five.saturating_neg(),+neg_five);%0Aassert_eq!(min.saturating_neg(),+max);%0Aassert_eq!(max.saturating_neg(),+min_plus_one);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.wrapping_neg\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.71.0, const since 1.71.0\">1.71.0 (const: 1.71.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.wrapping_neg\" class=\"fn\">wrapping_neg</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Wrapping (modular) negation. Computes <code>-self</code>, wrapping around at the boundary\nof the type.</p>\n<p>See <a href=\"core/primitive.isize.html#method.wrapping_neg\" title=\"method isize::wrapping_neg\"><code>isize::wrapping_neg</code></a>\nfor documentation on overflow behavior.</p>\n<h5 id=\"example-13\"><a class=\"doc-anchor\" href=\"#example-13\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>pos_five = NonZero::new(<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>neg_five = NonZero::new(-<span class=\"number\">5isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>min = NonZero::new(isize::MIN)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(pos_five.wrapping_neg(), neg_five);\n<span class=\"macro\">assert_eq!</span>(min.wrapping_neg(), min);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+pos_five+=+NonZero::new(5isize)?;%0Alet+neg_five+=+NonZero::new(-5isize)?;%0Alet+min+=+NonZero::new(isize::MIN)?;%0A%0Aassert_eq!(pos_five.wrapping_neg(),+neg_five);%0Aassert_eq!(min.wrapping_neg(),+min);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_unsigned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_unsigned\" class=\"fn\">cast_unsigned</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as an unsigned integer of the same size.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::new(-<span class=\"number\">1isize</span>).unwrap();\n\n<span class=\"macro\">assert_eq!</span>(n.cast_unsigned(), NonZero::&lt;usize&gt;::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::new(-1isize).unwrap();%0A++++%0A++++assert_eq!(n.cast_unsigned(),+NonZero::%3Cusize%3E::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(isize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2isize)?;%0Alet+four+=+NonZero::new(4isize)?;%0Alet+max+=+NonZero::new(isize::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;isize&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(isize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2isize)?;%0Alet+four+=+NonZero::new(4isize)?;%0Alet+max+=+NonZero::new(isize::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; isize::MAX</code>, or <code>self * rhs &lt; isize::MIN</code>.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4isize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2isize)?;%0Alet+four+=+NonZero::new(4isize)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(isize::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3isize)?;%0Alet+twenty_seven+=+NonZero::new(27isize)?;%0Alet+half_max+=+NonZero::new(isize::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2339-2349\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" title=\"associated constant core::num::NonZero::MIN\"><code>NonZero::&lt;isize&gt;::MIN</code></a> or <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;isize&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27isize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(isize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3isize)?;%0Alet+twenty_seven+=+NonZero::new(27isize)?;%0Alet+max+=+NonZero::new(isize::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu128%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><a href=\"#impl-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.div_ceil\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.div_ceil\" class=\"fn\">div_ceil</a>(self, rhs: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unsigned_nonzero_div_ceil</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/132968\">#132968</a>)</span></div></span></summary><div class=\"docblock\"><p>Calculates the quotient of <code>self</code> and <code>rhs</code>, rounding the result towards positive infinity.</p>\n<p>The result is guaranteed to be non-zero.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u128</span>).unwrap();\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX).unwrap();\n<span class=\"macro\">assert_eq!</span>(one.div_ceil(max), one);\n\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>).unwrap();\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u128</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(three.div_ceil(two), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(unsigned_nonzero_div_ceil)%5D%0A%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++let+one+=+NonZero::new(1u128).unwrap();%0A++++let+max+=+NonZero::new(u128::MAX).unwrap();%0A++++assert_eq!(one.div_ceil(max),+one);%0A++++%0A++++let+two+=+NonZero::new(2u128).unwrap();%0A++++let+three+=+NonZero::new(3u128).unwrap();%0A++++assert_eq!(three.div_ceil(two),+two);%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu128%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><a href=\"#impl-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 128u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.u128.html#associatedconstant.BITS\" title=\"associated constant u128::BITS\"><code>u128::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u128&gt;::BITS, u128::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu128%3E::BITS,+u128::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type, 1.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u128&gt;::MIN.get(), <span class=\"number\">1u128</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu128%3E::MIN.get(),+1u128);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.u128.html#associatedconstant.MAX\" title=\"associated constant u128::MAX\"><code>u128::MAX</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u128&gt;::MAX.get(), u128::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu128%3E::MAX.get(),+u128::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u128&gt;::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu128%3E::new(u128::MAX)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu128%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu128%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu128%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu128%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu128%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u128&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu128%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cu128%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x13f40000000000000000000000004f76u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x4f7613f4</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">16</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x13f40000000000000000000000004f76u128)?;%0Alet+m+=+NonZero::new(0x4f7613f4)?;%0A%0Aassert_eq!(n.rotate_left(16),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x4f7613f4u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x13f40000000000000000000000004f76</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">16</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x4f7613f4u128)?;%0Alet+m+=+NonZero::new(0x13f40000000000000000000000004f76)?;%0A%0Aassert_eq!(n.rotate_right(16),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678901234567890123456789012u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x12907856341290785634129078563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678901234567890123456789012u128)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x12907856341290785634129078563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678901234567890123456789012u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x48091e6a2c48091e6a2c48091e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678901234567890123456789012u128)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x48091e6a2c48091e6a2c48091e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU128;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU128::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU128::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU128;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au128)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroU128::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU128::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU128;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU128::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU128::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU128;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au128)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroU128::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU128::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au128)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au128)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_add\" class=\"fn\">checked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), one.checked_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u128)?;%0Alet+two+=+NonZero::new(2u128)?;%0Alet+max+=+NonZero::new(u128::MAX)?;%0A%0Aassert_eq!(Some(two),+one.checked_add(1));%0Aassert_eq!(None,+max.checked_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_add\" class=\"fn\">saturating_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u128&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, one.saturating_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u128)?;%0Alet+two+=+NonZero::new(2u128)?;%0Alet+max+=+NonZero::new(u128::MAX)?;%0A%0Aassert_eq!(two,+one.saturating_add(1));%0Aassert_eq!(max,+max.saturating_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_add\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_add\" class=\"fn\">unchecked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self + rhs &gt; u128::MAX</code>.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, <span class=\"kw\">unsafe </span>{ one.unchecked_add(<span class=\"number\">1</span>) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u128)?;%0Alet+two+=+NonZero::new(2u128)?;%0A%0Aassert_eq!(two,+unsafe+%7B+one.unchecked_add(1)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_next_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_next_power_of_two\" class=\"fn\">checked_next_power_of_two</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the smallest power of two greater than or equal to <code>self</code>.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a>\nif the next power of two is greater than the type’s maximum value.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), two.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), three.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_next_power_of_two() );</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u128)?;%0Alet+three+=+NonZero::new(3u128)?;%0Alet+four+=+NonZero::new(4u128)?;%0Alet+max+=+NonZero::new(u128::MAX)?;%0A%0Aassert_eq!(Some(two),+two.checked_next_power_of_two()+);%0Aassert_eq!(Some(four),+three.checked_next_power_of_two()+);%0Aassert_eq!(None,+max.checked_next_power_of_two()+);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog2\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog2\" class=\"fn\">ilog2</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 2 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u128.html#method.ilog2\" title=\"method u128::ilog2\"><code>u128::ilog2</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">7u128</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">8u128</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">9u128</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(7u128)?.ilog2(),+2);%0Aassert_eq!(NonZero::new(8u128)?.ilog2(),+3);%0Aassert_eq!(NonZero::new(9u128)?.ilog2(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog10\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog10\" class=\"fn\">ilog10</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 10 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u128.html#method.ilog10\" title=\"method u128::ilog10\"><code>u128::ilog10</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">99u128</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">1</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">100u128</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">101u128</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(99u128)?.ilog10(),+1);%0Aassert_eq!(NonZero::new(100u128)?.ilog10(),+2);%0Aassert_eq!(NonZero::new(101u128)?.ilog10(),+2);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.midpoint\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.85.0, const since 1.85.0\">1.85.0 (const: 1.85.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.midpoint\" class=\"fn\">midpoint</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Calculates the midpoint (average) between <code>self</code> and <code>rhs</code>.</p>\n<p><code>midpoint(a, b)</code> is <code>(a + b) &gt;&gt; 1</code> as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards negative infinity and that no overflow will ever occur.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(one.midpoint(four), two);\n<span class=\"macro\">assert_eq!</span>(four.midpoint(one), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u128)?;%0Alet+two+=+NonZero::new(2u128)?;%0Alet+four+=+NonZero::new(4u128)?;%0A%0Aassert_eq!(one.midpoint(four),+two);%0Aassert_eq!(four.midpoint(one),+two);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0, const since 1.59.0\">1.59.0 (const: 1.59.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_power_of_two\" class=\"fn\">is_power_of_two</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if and only if <code>self == (1 &lt;&lt; k)</code> for some <code>k</code>.</p>\n<p>On many architectures, this function can perform better than <code>is_power_of_two()</code>\non the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>eight = NonZero::new(<span class=\"number\">8u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(eight.is_power_of_two());\n<span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(!ten.is_power_of_two());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+eight+=+NonZero::new(8u128)?;%0Aassert!(eight.is_power_of_two());%0Alet+ten+=+NonZero::new(10u128)?;%0Aassert!(!ten.is_power_of_two());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isqrt\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0, const since 1.84.0\">1.84.0 (const: 1.84.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isqrt\" class=\"fn\">isqrt</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Returns the square root of the number, rounded down.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(ten.isqrt(), three);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+ten+=+NonZero::new(10u128)?;%0Alet+three+=+NonZero::new(3u128)?;%0A%0Aassert_eq!(ten.isqrt(),+three);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_signed\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_signed\" class=\"fn\">cast_signed</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as a signed integer of the same size.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::&lt;u128&gt;::MAX;\n\n<span class=\"macro\">assert_eq!</span>(n.cast_signed(), NonZero::new(-<span class=\"number\">1i128</span>).unwrap());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::%3Cu128%3E::MAX;%0A++++%0A++++assert_eq!(n.cast_signed(),+NonZero::new(-1i128).unwrap());%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u128)?;%0Alet+four+=+NonZero::new(4u128)?;%0Alet+max+=+NonZero::new(u128::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u128&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u128)?;%0Alet+four+=+NonZero::new(4u128)?;%0Alet+max+=+NonZero::new(u128::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; u128::MAX</code>.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u128</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u128)?;%0Alet+four+=+NonZero::new(4u128)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(u128::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u128)?;%0Alet+twenty_seven+=+NonZero::new(27u128)?;%0Alet+half_max+=+NonZero::new(u128::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2201-2211\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u128&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u128</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u128::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u128)?;%0Alet+twenty_seven+=+NonZero::new(27u128)?;%0Alet+max+=+NonZero::new(u128::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu16%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><a href=\"#impl-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.div_ceil\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.div_ceil\" class=\"fn\">div_ceil</a>(self, rhs: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unsigned_nonzero_div_ceil</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/132968\">#132968</a>)</span></div></span></summary><div class=\"docblock\"><p>Calculates the quotient of <code>self</code> and <code>rhs</code>, rounding the result towards positive infinity.</p>\n<p>The result is guaranteed to be non-zero.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u16</span>).unwrap();\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX).unwrap();\n<span class=\"macro\">assert_eq!</span>(one.div_ceil(max), one);\n\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>).unwrap();\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u16</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(three.div_ceil(two), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(unsigned_nonzero_div_ceil)%5D%0A%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++let+one+=+NonZero::new(1u16).unwrap();%0A++++let+max+=+NonZero::new(u16::MAX).unwrap();%0A++++assert_eq!(one.div_ceil(max),+one);%0A++++%0A++++let+two+=+NonZero::new(2u16).unwrap();%0A++++let+three+=+NonZero::new(3u16).unwrap();%0A++++assert_eq!(three.div_ceil(two),+two);%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu16%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><a href=\"#impl-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 16u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.u16.html#associatedconstant.BITS\" title=\"associated constant u16::BITS\"><code>u16::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u16&gt;::BITS, u16::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu16%3E::BITS,+u16::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type, 1.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u16&gt;::MIN.get(), <span class=\"number\">1u16</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu16%3E::MIN.get(),+1u16);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.u16.html#associatedconstant.MAX\" title=\"associated constant u16::MAX\"><code>u16::MAX</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u16&gt;::MAX.get(), u16::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu16%3E::MAX.get(),+u16::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u16&gt;::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu16%3E::new(u16::MAX)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu16%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu16%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu16%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu16%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu16%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u16&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu16%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cu16%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xa003u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x3a</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">4</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xa003u16)?;%0Alet+m+=+NonZero::new(0x3a)?;%0A%0Aassert_eq!(n.rotate_left(4),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x3au16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xa003</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">4</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x3au16)?;%0Alet+m+=+NonZero::new(0xa003)?;%0A%0Aassert_eq!(n.rotate_right(4),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x3412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234u16)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x3412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234u16)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU16;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU16::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU16::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU16;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au16)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroU16::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU16::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU16;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU16::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU16::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU16;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au16)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroU16::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU16::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au16)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au16)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_add\" class=\"fn\">checked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), one.checked_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u16)?;%0Alet+two+=+NonZero::new(2u16)?;%0Alet+max+=+NonZero::new(u16::MAX)?;%0A%0Aassert_eq!(Some(two),+one.checked_add(1));%0Aassert_eq!(None,+max.checked_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_add\" class=\"fn\">saturating_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u16&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, one.saturating_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u16)?;%0Alet+two+=+NonZero::new(2u16)?;%0Alet+max+=+NonZero::new(u16::MAX)?;%0A%0Aassert_eq!(two,+one.saturating_add(1));%0Aassert_eq!(max,+max.saturating_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_add\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_add\" class=\"fn\">unchecked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self + rhs &gt; u16::MAX</code>.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, <span class=\"kw\">unsafe </span>{ one.unchecked_add(<span class=\"number\">1</span>) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u16)?;%0Alet+two+=+NonZero::new(2u16)?;%0A%0Aassert_eq!(two,+unsafe+%7B+one.unchecked_add(1)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_next_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_next_power_of_two\" class=\"fn\">checked_next_power_of_two</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the smallest power of two greater than or equal to <code>self</code>.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a>\nif the next power of two is greater than the type’s maximum value.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), two.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), three.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_next_power_of_two() );</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u16)?;%0Alet+three+=+NonZero::new(3u16)?;%0Alet+four+=+NonZero::new(4u16)?;%0Alet+max+=+NonZero::new(u16::MAX)?;%0A%0Aassert_eq!(Some(two),+two.checked_next_power_of_two()+);%0Aassert_eq!(Some(four),+three.checked_next_power_of_two()+);%0Aassert_eq!(None,+max.checked_next_power_of_two()+);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog2\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog2\" class=\"fn\">ilog2</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 2 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u16.html#method.ilog2\" title=\"method u16::ilog2\"><code>u16::ilog2</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">7u16</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">8u16</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">9u16</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(7u16)?.ilog2(),+2);%0Aassert_eq!(NonZero::new(8u16)?.ilog2(),+3);%0Aassert_eq!(NonZero::new(9u16)?.ilog2(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog10\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog10\" class=\"fn\">ilog10</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 10 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u16.html#method.ilog10\" title=\"method u16::ilog10\"><code>u16::ilog10</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">99u16</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">1</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">100u16</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">101u16</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(99u16)?.ilog10(),+1);%0Aassert_eq!(NonZero::new(100u16)?.ilog10(),+2);%0Aassert_eq!(NonZero::new(101u16)?.ilog10(),+2);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.midpoint\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.85.0, const since 1.85.0\">1.85.0 (const: 1.85.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.midpoint\" class=\"fn\">midpoint</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Calculates the midpoint (average) between <code>self</code> and <code>rhs</code>.</p>\n<p><code>midpoint(a, b)</code> is <code>(a + b) &gt;&gt; 1</code> as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards negative infinity and that no overflow will ever occur.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(one.midpoint(four), two);\n<span class=\"macro\">assert_eq!</span>(four.midpoint(one), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u16)?;%0Alet+two+=+NonZero::new(2u16)?;%0Alet+four+=+NonZero::new(4u16)?;%0A%0Aassert_eq!(one.midpoint(four),+two);%0Aassert_eq!(four.midpoint(one),+two);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0, const since 1.59.0\">1.59.0 (const: 1.59.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_power_of_two\" class=\"fn\">is_power_of_two</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if and only if <code>self == (1 &lt;&lt; k)</code> for some <code>k</code>.</p>\n<p>On many architectures, this function can perform better than <code>is_power_of_two()</code>\non the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>eight = NonZero::new(<span class=\"number\">8u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(eight.is_power_of_two());\n<span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(!ten.is_power_of_two());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+eight+=+NonZero::new(8u16)?;%0Aassert!(eight.is_power_of_two());%0Alet+ten+=+NonZero::new(10u16)?;%0Aassert!(!ten.is_power_of_two());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isqrt\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0, const since 1.84.0\">1.84.0 (const: 1.84.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isqrt\" class=\"fn\">isqrt</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Returns the square root of the number, rounded down.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(ten.isqrt(), three);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+ten+=+NonZero::new(10u16)?;%0Alet+three+=+NonZero::new(3u16)?;%0A%0Aassert_eq!(ten.isqrt(),+three);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_signed\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_signed\" class=\"fn\">cast_signed</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as a signed integer of the same size.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::&lt;u16&gt;::MAX;\n\n<span class=\"macro\">assert_eq!</span>(n.cast_signed(), NonZero::new(-<span class=\"number\">1i16</span>).unwrap());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::%3Cu16%3E::MAX;%0A++++%0A++++assert_eq!(n.cast_signed(),+NonZero::new(-1i16).unwrap());%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u16)?;%0Alet+four+=+NonZero::new(4u16)?;%0Alet+max+=+NonZero::new(u16::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u16&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u16)?;%0Alet+four+=+NonZero::new(4u16)?;%0Alet+max+=+NonZero::new(u16::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; u16::MAX</code>.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u16</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u16)?;%0Alet+four+=+NonZero::new(4u16)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(u16::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u16)?;%0Alet+twenty_seven+=+NonZero::new(27u16)?;%0Alet+half_max+=+NonZero::new(u16::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2165-2175\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u16&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u16</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u16::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u16)?;%0Alet+twenty_seven+=+NonZero::new(27u16)?;%0Alet+max+=+NonZero::new(u16::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu32%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><a href=\"#impl-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.div_ceil\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.div_ceil\" class=\"fn\">div_ceil</a>(self, rhs: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unsigned_nonzero_div_ceil</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/132968\">#132968</a>)</span></div></span></summary><div class=\"docblock\"><p>Calculates the quotient of <code>self</code> and <code>rhs</code>, rounding the result towards positive infinity.</p>\n<p>The result is guaranteed to be non-zero.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u32</span>).unwrap();\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX).unwrap();\n<span class=\"macro\">assert_eq!</span>(one.div_ceil(max), one);\n\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>).unwrap();\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u32</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(three.div_ceil(two), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(unsigned_nonzero_div_ceil)%5D%0A%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++let+one+=+NonZero::new(1u32).unwrap();%0A++++let+max+=+NonZero::new(u32::MAX).unwrap();%0A++++assert_eq!(one.div_ceil(max),+one);%0A++++%0A++++let+two+=+NonZero::new(2u32).unwrap();%0A++++let+three+=+NonZero::new(3u32).unwrap();%0A++++assert_eq!(three.div_ceil(two),+two);%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu32%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><a href=\"#impl-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 32u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.u32.html#associatedconstant.BITS\" title=\"associated constant u32::BITS\"><code>u32::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u32&gt;::BITS, u32::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu32%3E::BITS,+u32::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type, 1.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u32&gt;::MIN.get(), <span class=\"number\">1u32</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu32%3E::MIN.get(),+1u32);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.u32.html#associatedconstant.MAX\" title=\"associated constant u32::MAX\"><code>u32::MAX</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u32&gt;::MAX.get(), u32::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu32%3E::MAX.get(),+u32::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u32&gt;::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu32%3E::new(u32::MAX)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu32%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu32%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu32%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu32%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu32%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u32&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu32%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cu32%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x10000b3u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xb301</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">8</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x10000b3u32)?;%0Alet+m+=+NonZero::new(0xb301)?;%0A%0Aassert_eq!(n.rotate_left(8),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xb301u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x10000b3</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">8</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xb301u32)?;%0Alet+m+=+NonZero::new(0x10000b3)?;%0A%0Aassert_eq!(n.rotate_right(8),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x78563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678u32)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x78563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12345678u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x1e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12345678u32)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x1e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU32;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU32::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU32::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU32;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au32)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroU32::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU32::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU32;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU32::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU32::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU32;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au32)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroU32::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU32::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au32)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au32)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_add\" class=\"fn\">checked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), one.checked_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u32)?;%0Alet+two+=+NonZero::new(2u32)?;%0Alet+max+=+NonZero::new(u32::MAX)?;%0A%0Aassert_eq!(Some(two),+one.checked_add(1));%0Aassert_eq!(None,+max.checked_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_add\" class=\"fn\">saturating_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u32&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, one.saturating_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u32)?;%0Alet+two+=+NonZero::new(2u32)?;%0Alet+max+=+NonZero::new(u32::MAX)?;%0A%0Aassert_eq!(two,+one.saturating_add(1));%0Aassert_eq!(max,+max.saturating_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_add\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_add\" class=\"fn\">unchecked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self + rhs &gt; u32::MAX</code>.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, <span class=\"kw\">unsafe </span>{ one.unchecked_add(<span class=\"number\">1</span>) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u32)?;%0Alet+two+=+NonZero::new(2u32)?;%0A%0Aassert_eq!(two,+unsafe+%7B+one.unchecked_add(1)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_next_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_next_power_of_two\" class=\"fn\">checked_next_power_of_two</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the smallest power of two greater than or equal to <code>self</code>.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a>\nif the next power of two is greater than the type’s maximum value.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), two.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), three.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_next_power_of_two() );</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u32)?;%0Alet+three+=+NonZero::new(3u32)?;%0Alet+four+=+NonZero::new(4u32)?;%0Alet+max+=+NonZero::new(u32::MAX)?;%0A%0Aassert_eq!(Some(two),+two.checked_next_power_of_two()+);%0Aassert_eq!(Some(four),+three.checked_next_power_of_two()+);%0Aassert_eq!(None,+max.checked_next_power_of_two()+);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog2\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog2\" class=\"fn\">ilog2</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 2 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u32.html#method.ilog2\" title=\"method u32::ilog2\"><code>u32::ilog2</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">7u32</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">8u32</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">9u32</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(7u32)?.ilog2(),+2);%0Aassert_eq!(NonZero::new(8u32)?.ilog2(),+3);%0Aassert_eq!(NonZero::new(9u32)?.ilog2(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog10\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog10\" class=\"fn\">ilog10</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 10 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u32.html#method.ilog10\" title=\"method u32::ilog10\"><code>u32::ilog10</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">99u32</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">1</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">100u32</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">101u32</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(99u32)?.ilog10(),+1);%0Aassert_eq!(NonZero::new(100u32)?.ilog10(),+2);%0Aassert_eq!(NonZero::new(101u32)?.ilog10(),+2);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.midpoint\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.85.0, const since 1.85.0\">1.85.0 (const: 1.85.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.midpoint\" class=\"fn\">midpoint</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Calculates the midpoint (average) between <code>self</code> and <code>rhs</code>.</p>\n<p><code>midpoint(a, b)</code> is <code>(a + b) &gt;&gt; 1</code> as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards negative infinity and that no overflow will ever occur.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(one.midpoint(four), two);\n<span class=\"macro\">assert_eq!</span>(four.midpoint(one), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u32)?;%0Alet+two+=+NonZero::new(2u32)?;%0Alet+four+=+NonZero::new(4u32)?;%0A%0Aassert_eq!(one.midpoint(four),+two);%0Aassert_eq!(four.midpoint(one),+two);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0, const since 1.59.0\">1.59.0 (const: 1.59.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_power_of_two\" class=\"fn\">is_power_of_two</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if and only if <code>self == (1 &lt;&lt; k)</code> for some <code>k</code>.</p>\n<p>On many architectures, this function can perform better than <code>is_power_of_two()</code>\non the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>eight = NonZero::new(<span class=\"number\">8u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(eight.is_power_of_two());\n<span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(!ten.is_power_of_two());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+eight+=+NonZero::new(8u32)?;%0Aassert!(eight.is_power_of_two());%0Alet+ten+=+NonZero::new(10u32)?;%0Aassert!(!ten.is_power_of_two());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isqrt\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0, const since 1.84.0\">1.84.0 (const: 1.84.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isqrt\" class=\"fn\">isqrt</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Returns the square root of the number, rounded down.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(ten.isqrt(), three);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+ten+=+NonZero::new(10u32)?;%0Alet+three+=+NonZero::new(3u32)?;%0A%0Aassert_eq!(ten.isqrt(),+three);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_signed\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_signed\" class=\"fn\">cast_signed</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as a signed integer of the same size.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::&lt;u32&gt;::MAX;\n\n<span class=\"macro\">assert_eq!</span>(n.cast_signed(), NonZero::new(-<span class=\"number\">1i32</span>).unwrap());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::%3Cu32%3E::MAX;%0A++++%0A++++assert_eq!(n.cast_signed(),+NonZero::new(-1i32).unwrap());%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u32)?;%0Alet+four+=+NonZero::new(4u32)?;%0Alet+max+=+NonZero::new(u32::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u32&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u32)?;%0Alet+four+=+NonZero::new(4u32)?;%0Alet+max+=+NonZero::new(u32::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; u32::MAX</code>.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u32</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u32)?;%0Alet+four+=+NonZero::new(4u32)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(u32::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u32)?;%0Alet+twenty_seven+=+NonZero::new(27u32)?;%0Alet+half_max+=+NonZero::new(u32::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2177-2187\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u32&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u32</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u32::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u32)?;%0Alet+twenty_seven+=+NonZero::new(27u32)?;%0Alet+max+=+NonZero::new(u32::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu64%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><a href=\"#impl-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.div_ceil\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.div_ceil\" class=\"fn\">div_ceil</a>(self, rhs: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unsigned_nonzero_div_ceil</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/132968\">#132968</a>)</span></div></span></summary><div class=\"docblock\"><p>Calculates the quotient of <code>self</code> and <code>rhs</code>, rounding the result towards positive infinity.</p>\n<p>The result is guaranteed to be non-zero.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u64</span>).unwrap();\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX).unwrap();\n<span class=\"macro\">assert_eq!</span>(one.div_ceil(max), one);\n\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>).unwrap();\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u64</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(three.div_ceil(two), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(unsigned_nonzero_div_ceil)%5D%0A%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++let+one+=+NonZero::new(1u64).unwrap();%0A++++let+max+=+NonZero::new(u64::MAX).unwrap();%0A++++assert_eq!(one.div_ceil(max),+one);%0A++++%0A++++let+two+=+NonZero::new(2u64).unwrap();%0A++++let+three+=+NonZero::new(3u64).unwrap();%0A++++assert_eq!(three.div_ceil(two),+two);%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu64%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><a href=\"#impl-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 64u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.u64.html#associatedconstant.BITS\" title=\"associated constant u64::BITS\"><code>u64::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u64&gt;::BITS, u64::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu64%3E::BITS,+u64::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type, 1.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u64&gt;::MIN.get(), <span class=\"number\">1u64</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu64%3E::MIN.get(),+1u64);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.u64.html#associatedconstant.MAX\" title=\"associated constant u64::MAX\"><code>u64::MAX</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u64&gt;::MAX.get(), u64::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu64%3E::MAX.get(),+u64::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u64&gt;::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu64%3E::new(u64::MAX)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu64%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu64%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu64%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu64%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu64%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u64&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu64%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cu64%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xaa00000000006e1u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x6e10aa</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xaa00000000006e1u64)?;%0Alet+m+=+NonZero::new(0x6e10aa)?;%0A%0Aassert_eq!(n.rotate_left(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x6e10aau64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xaa00000000006e1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x6e10aau64)?;%0Alet+m+=+NonZero::new(0xaa00000000006e1)?;%0A%0Aassert_eq!(n.rotate_right(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x5634129078563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456u64)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x5634129078563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x6a2c48091e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456u64)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x6a2c48091e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU64;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU64::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU64::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU64;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au64)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroU64::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU64::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU64;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU64::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU64::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU64;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au64)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroU64::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU64::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au64)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au64)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_add\" class=\"fn\">checked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), one.checked_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u64)?;%0Alet+two+=+NonZero::new(2u64)?;%0Alet+max+=+NonZero::new(u64::MAX)?;%0A%0Aassert_eq!(Some(two),+one.checked_add(1));%0Aassert_eq!(None,+max.checked_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_add\" class=\"fn\">saturating_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u64&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, one.saturating_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u64)?;%0Alet+two+=+NonZero::new(2u64)?;%0Alet+max+=+NonZero::new(u64::MAX)?;%0A%0Aassert_eq!(two,+one.saturating_add(1));%0Aassert_eq!(max,+max.saturating_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_add\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_add\" class=\"fn\">unchecked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self + rhs &gt; u64::MAX</code>.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, <span class=\"kw\">unsafe </span>{ one.unchecked_add(<span class=\"number\">1</span>) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u64)?;%0Alet+two+=+NonZero::new(2u64)?;%0A%0Aassert_eq!(two,+unsafe+%7B+one.unchecked_add(1)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_next_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_next_power_of_two\" class=\"fn\">checked_next_power_of_two</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the smallest power of two greater than or equal to <code>self</code>.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a>\nif the next power of two is greater than the type’s maximum value.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), two.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), three.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_next_power_of_two() );</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u64)?;%0Alet+three+=+NonZero::new(3u64)?;%0Alet+four+=+NonZero::new(4u64)?;%0Alet+max+=+NonZero::new(u64::MAX)?;%0A%0Aassert_eq!(Some(two),+two.checked_next_power_of_two()+);%0Aassert_eq!(Some(four),+three.checked_next_power_of_two()+);%0Aassert_eq!(None,+max.checked_next_power_of_two()+);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog2\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog2\" class=\"fn\">ilog2</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 2 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u64.html#method.ilog2\" title=\"method u64::ilog2\"><code>u64::ilog2</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">7u64</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">8u64</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">9u64</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(7u64)?.ilog2(),+2);%0Aassert_eq!(NonZero::new(8u64)?.ilog2(),+3);%0Aassert_eq!(NonZero::new(9u64)?.ilog2(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog10\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog10\" class=\"fn\">ilog10</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 10 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u64.html#method.ilog10\" title=\"method u64::ilog10\"><code>u64::ilog10</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">99u64</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">1</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">100u64</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">101u64</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(99u64)?.ilog10(),+1);%0Aassert_eq!(NonZero::new(100u64)?.ilog10(),+2);%0Aassert_eq!(NonZero::new(101u64)?.ilog10(),+2);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.midpoint\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.85.0, const since 1.85.0\">1.85.0 (const: 1.85.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.midpoint\" class=\"fn\">midpoint</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Calculates the midpoint (average) between <code>self</code> and <code>rhs</code>.</p>\n<p><code>midpoint(a, b)</code> is <code>(a + b) &gt;&gt; 1</code> as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards negative infinity and that no overflow will ever occur.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(one.midpoint(four), two);\n<span class=\"macro\">assert_eq!</span>(four.midpoint(one), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u64)?;%0Alet+two+=+NonZero::new(2u64)?;%0Alet+four+=+NonZero::new(4u64)?;%0A%0Aassert_eq!(one.midpoint(four),+two);%0Aassert_eq!(four.midpoint(one),+two);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0, const since 1.59.0\">1.59.0 (const: 1.59.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_power_of_two\" class=\"fn\">is_power_of_two</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if and only if <code>self == (1 &lt;&lt; k)</code> for some <code>k</code>.</p>\n<p>On many architectures, this function can perform better than <code>is_power_of_two()</code>\non the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>eight = NonZero::new(<span class=\"number\">8u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(eight.is_power_of_two());\n<span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(!ten.is_power_of_two());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+eight+=+NonZero::new(8u64)?;%0Aassert!(eight.is_power_of_two());%0Alet+ten+=+NonZero::new(10u64)?;%0Aassert!(!ten.is_power_of_two());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isqrt\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0, const since 1.84.0\">1.84.0 (const: 1.84.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isqrt\" class=\"fn\">isqrt</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Returns the square root of the number, rounded down.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(ten.isqrt(), three);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+ten+=+NonZero::new(10u64)?;%0Alet+three+=+NonZero::new(3u64)?;%0A%0Aassert_eq!(ten.isqrt(),+three);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_signed\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_signed\" class=\"fn\">cast_signed</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as a signed integer of the same size.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::&lt;u64&gt;::MAX;\n\n<span class=\"macro\">assert_eq!</span>(n.cast_signed(), NonZero::new(-<span class=\"number\">1i64</span>).unwrap());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::%3Cu64%3E::MAX;%0A++++%0A++++assert_eq!(n.cast_signed(),+NonZero::new(-1i64).unwrap());%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u64)?;%0Alet+four+=+NonZero::new(4u64)?;%0Alet+max+=+NonZero::new(u64::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u64&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u64)?;%0Alet+four+=+NonZero::new(4u64)?;%0Alet+max+=+NonZero::new(u64::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; u64::MAX</code>.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u64</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u64)?;%0Alet+four+=+NonZero::new(4u64)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(u64::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u64)?;%0Alet+twenty_seven+=+NonZero::new(27u64)?;%0Alet+half_max+=+NonZero::new(u64::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2189-2199\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u64&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u64</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u64::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u64)?;%0Alet+twenty_seven+=+NonZero::new(27u64)?;%0Alet+max+=+NonZero::new(u64::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu8%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><a href=\"#impl-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.div_ceil\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.div_ceil\" class=\"fn\">div_ceil</a>(self, rhs: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unsigned_nonzero_div_ceil</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/132968\">#132968</a>)</span></div></span></summary><div class=\"docblock\"><p>Calculates the quotient of <code>self</code> and <code>rhs</code>, rounding the result towards positive infinity.</p>\n<p>The result is guaranteed to be non-zero.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u8</span>).unwrap();\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX).unwrap();\n<span class=\"macro\">assert_eq!</span>(one.div_ceil(max), one);\n\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>).unwrap();\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u8</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(three.div_ceil(two), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(unsigned_nonzero_div_ceil)%5D%0A%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++let+one+=+NonZero::new(1u8).unwrap();%0A++++let+max+=+NonZero::new(u8::MAX).unwrap();%0A++++assert_eq!(one.div_ceil(max),+one);%0A++++%0A++++let+two+=+NonZero::new(2u8).unwrap();%0A++++let+three+=+NonZero::new(3u8).unwrap();%0A++++assert_eq!(three.div_ceil(two),+two);%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cu8%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><a href=\"#impl-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 8u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.u8.html#associatedconstant.BITS\" title=\"associated constant u8::BITS\"><code>u8::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u8&gt;::BITS, u8::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu8%3E::BITS,+u8::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type, 1.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u8&gt;::MIN.get(), <span class=\"number\">1u8</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu8%3E::MIN.get(),+1u8);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.u8.html#associatedconstant.MAX\" title=\"associated constant u8::MAX\"><code>u8::MAX</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;u8&gt;::MAX.get(), u8::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cu8%3E::MAX.get(),+u8::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u8&gt;::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu8%3E::new(u8::MAX)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cu8%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu8%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu8%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu8%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cu8%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;u8&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cu8%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cu8%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x82u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xa</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">2</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x82u8)?;%0Alet+m+=+NonZero::new(0xa)?;%0A%0Aassert_eq!(n.rotate_left(2),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xau8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x82</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">2</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xau8)?;%0Alet+m+=+NonZero::new(0x82)?;%0A%0Aassert_eq!(n.rotate_right(2),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x12</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12u8)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x12)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x12u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x12u8)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU8;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU8::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU8::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU8;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au8)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroU8::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU8::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroU8;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroU8::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroU8::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroU8;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au8)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroU8::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroU8::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au8)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Au8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Au8)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_add\" class=\"fn\">checked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), one.checked_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u8)?;%0Alet+two+=+NonZero::new(2u8)?;%0Alet+max+=+NonZero::new(u8::MAX)?;%0A%0Aassert_eq!(Some(two),+one.checked_add(1));%0Aassert_eq!(None,+max.checked_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_add\" class=\"fn\">saturating_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u8&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, one.saturating_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u8)?;%0Alet+two+=+NonZero::new(2u8)?;%0Alet+max+=+NonZero::new(u8::MAX)?;%0A%0Aassert_eq!(two,+one.saturating_add(1));%0Aassert_eq!(max,+max.saturating_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_add\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_add\" class=\"fn\">unchecked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self + rhs &gt; u8::MAX</code>.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, <span class=\"kw\">unsafe </span>{ one.unchecked_add(<span class=\"number\">1</span>) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u8)?;%0Alet+two+=+NonZero::new(2u8)?;%0A%0Aassert_eq!(two,+unsafe+%7B+one.unchecked_add(1)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_next_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_next_power_of_two\" class=\"fn\">checked_next_power_of_two</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the smallest power of two greater than or equal to <code>self</code>.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a>\nif the next power of two is greater than the type’s maximum value.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), two.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), three.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_next_power_of_two() );</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u8)?;%0Alet+three+=+NonZero::new(3u8)?;%0Alet+four+=+NonZero::new(4u8)?;%0Alet+max+=+NonZero::new(u8::MAX)?;%0A%0Aassert_eq!(Some(two),+two.checked_next_power_of_two()+);%0Aassert_eq!(Some(four),+three.checked_next_power_of_two()+);%0Aassert_eq!(None,+max.checked_next_power_of_two()+);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog2\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog2\" class=\"fn\">ilog2</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 2 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u8.html#method.ilog2\" title=\"method u8::ilog2\"><code>u8::ilog2</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">7u8</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">8u8</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">9u8</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(7u8)?.ilog2(),+2);%0Aassert_eq!(NonZero::new(8u8)?.ilog2(),+3);%0Aassert_eq!(NonZero::new(9u8)?.ilog2(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog10\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog10\" class=\"fn\">ilog10</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 10 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.u8.html#method.ilog10\" title=\"method u8::ilog10\"><code>u8::ilog10</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">99u8</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">1</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">100u8</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">101u8</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(99u8)?.ilog10(),+1);%0Aassert_eq!(NonZero::new(100u8)?.ilog10(),+2);%0Aassert_eq!(NonZero::new(101u8)?.ilog10(),+2);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.midpoint\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.85.0, const since 1.85.0\">1.85.0 (const: 1.85.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.midpoint\" class=\"fn\">midpoint</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Calculates the midpoint (average) between <code>self</code> and <code>rhs</code>.</p>\n<p><code>midpoint(a, b)</code> is <code>(a + b) &gt;&gt; 1</code> as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards negative infinity and that no overflow will ever occur.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(one.midpoint(four), two);\n<span class=\"macro\">assert_eq!</span>(four.midpoint(one), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1u8)?;%0Alet+two+=+NonZero::new(2u8)?;%0Alet+four+=+NonZero::new(4u8)?;%0A%0Aassert_eq!(one.midpoint(four),+two);%0Aassert_eq!(four.midpoint(one),+two);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0, const since 1.59.0\">1.59.0 (const: 1.59.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_power_of_two\" class=\"fn\">is_power_of_two</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if and only if <code>self == (1 &lt;&lt; k)</code> for some <code>k</code>.</p>\n<p>On many architectures, this function can perform better than <code>is_power_of_two()</code>\non the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>eight = NonZero::new(<span class=\"number\">8u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(eight.is_power_of_two());\n<span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(!ten.is_power_of_two());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+eight+=+NonZero::new(8u8)?;%0Aassert!(eight.is_power_of_two());%0Alet+ten+=+NonZero::new(10u8)?;%0Aassert!(!ten.is_power_of_two());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isqrt\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0, const since 1.84.0\">1.84.0 (const: 1.84.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isqrt\" class=\"fn\">isqrt</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Returns the square root of the number, rounded down.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(ten.isqrt(), three);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+ten+=+NonZero::new(10u8)?;%0Alet+three+=+NonZero::new(3u8)?;%0A%0Aassert_eq!(ten.isqrt(),+three);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_signed\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_signed\" class=\"fn\">cast_signed</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as a signed integer of the same size.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::&lt;u8&gt;::MAX;\n\n<span class=\"macro\">assert_eq!</span>(n.cast_signed(), NonZero::new(-<span class=\"number\">1i8</span>).unwrap());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::%3Cu8%3E::MAX;%0A++++%0A++++assert_eq!(n.cast_signed(),+NonZero::new(-1i8).unwrap());%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u8)?;%0Alet+four+=+NonZero::new(4u8)?;%0Alet+max+=+NonZero::new(u8::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u8&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u8)?;%0Alet+four+=+NonZero::new(4u8)?;%0Alet+max+=+NonZero::new(u8::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; u8::MAX</code>.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4u8</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2u8)?;%0Alet+four+=+NonZero::new(4u8)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(u8::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u8)?;%0Alet+twenty_seven+=+NonZero::new(27u8)?;%0Alet+half_max+=+NonZero::new(u8::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2153-2163\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;u8&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27u8</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(u8::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3u8)?;%0Alet+twenty_seven+=+NonZero::new(27u8)?;%0Alet+max+=+NonZero::new(u8::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cusize%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><a href=\"#impl-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.div_ceil\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.div_ceil\" class=\"fn\">div_ceil</a>(self, rhs: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unsigned_nonzero_div_ceil</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/132968\">#132968</a>)</span></div></span></summary><div class=\"docblock\"><p>Calculates the quotient of <code>self</code> and <code>rhs</code>, rounding the result towards positive infinity.</p>\n<p>The result is guaranteed to be non-zero.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1usize</span>).unwrap();\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX).unwrap();\n<span class=\"macro\">assert_eq!</span>(one.div_ceil(max), one);\n\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>).unwrap();\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3usize</span>).unwrap();\n<span class=\"macro\">assert_eq!</span>(three.div_ceil(two), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(unsigned_nonzero_div_ceil)%5D%0A%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++let+one+=+NonZero::new(1usize).unwrap();%0A++++let+max+=+NonZero::new(usize::MAX).unwrap();%0A++++assert_eq!(one.div_ceil(max),+one);%0A++++%0A++++let+two+=+NonZero::new(2usize).unwrap();%0A++++let+three+=+NonZero::new(3usize).unwrap();%0A++++assert_eq!(three.div_ceil(two),+two);%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-NonZero%3Cusize%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><a href=\"#impl-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedconstant.BITS\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0\">1.67.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.BITS\" class=\"constant\">BITS</a>: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a> = 64u32</h4></section></summary><div class=\"docblock\"><p>The size of this non-zero integer type in bits.</p>\n<p>This value is equal to <a href=\"core/primitive.usize.html#associatedconstant.BITS\" title=\"associated constant usize::BITS\"><code>usize::BITS</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;usize&gt;::BITS, usize::BITS);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cusize%3E::BITS,+usize::BITS);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MIN\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MIN\" class=\"constant\">MIN</a>: Self</h4></section></summary><div class=\"docblock\"><p>The smallest value that can be represented by this non-zero\ninteger type, 1.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;usize&gt;::MIN.get(), <span class=\"number\">1usize</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cusize%3E::MIN.get(),+1usize);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedconstant.MAX\" class=\"associatedconstant\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" class=\"constant\">MAX</a>: Self</h4></section></summary><div class=\"docblock\"><p>The largest value that can be represented by this non-zero\ninteger type,\nequal to <a href=\"core/primitive.usize.html#associatedconstant.MAX\" title=\"associated constant usize::MAX\"><code>usize::MAX</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::&lt;usize&gt;::MAX.get(), usize::MAX);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++assert_eq!(NonZero::%3Cusize%3E::MAX.get(),+usize::MAX);%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.leading_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.leading_zeros\" class=\"fn\">leading_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of leading zeros in the binary representation of <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>leading_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;usize&gt;::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.leading_zeros(), <span class=\"number\">0</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cusize%3E::new(usize::MAX)?;%0A%0Aassert_eq!(n.leading_zeros(),+0);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.trailing_zeros\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.53.0, const since 1.53.0\">1.53.0 (const: 1.53.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.trailing_zeros\" class=\"fn\">trailing_zeros</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the number of trailing zeros in the binary representation\nof <code>self</code>.</p>\n<p>On many architectures, this function can perform better than <code>trailing_zeros()</code> on the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>n = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b0101000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.trailing_zeros(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::%3Cusize%3E::new(0b0101000)?;%0A%0Aassert_eq!(n.trailing_zeros(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_highest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_highest_one\" class=\"fn\">isolate_highest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the most significant bit set.</p>\n<h5 id=\"example\"><a class=\"doc-anchor\" href=\"#example\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b_01000000</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_highest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cusize%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cusize%3E::new(0b_01000000)?;%0A%0Aassert_eq!(a.isolate_highest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isolate_lowest_one\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isolate_lowest_one\" class=\"fn\">isolate_lowest_one</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>isolate_most_least_significant_one</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/136909\">#136909</a>)</span></div></span></summary><div class=\"docblock\"><p>Returns <code>self</code> with only the least significant bit set.</p>\n<h5 id=\"example-1\"><a class=\"doc-anchor\" href=\"#example-1\">§</a>Example</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(isolate_most_least_significant_one)]\n\n</span><span class=\"kw\">let </span>a = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b_01100100</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b_00000100</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.isolate_lowest_one(), b);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(isolate_most_least_significant_one)%5D%0A%0A%0A%23%5Ballow(unused_extern_crates)%5D%0Aextern+crate+r%23core;%0Ause+core::num::NonZero;%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cusize%3E::new(0b_01100100)?;%0Alet+b+=+NonZero::%3Cusize%3E::new(0b_00000100)?;%0A%0Aassert_eq!(a.isolate_lowest_one(),+b);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.count_ones\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.86.0, const since 1.86.0\">1.86.0 (const: 1.86.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.count_ones\" class=\"fn\">count_ones</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the number of ones in the binary representation of <code>self</code>.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>a = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b100_0000</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>b = NonZero::&lt;usize&gt;::new(<span class=\"number\">0b100_0011</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(a.count_ones(), NonZero::new(<span class=\"number\">1</span>)<span class=\"question-mark\">?</span>);\n<span class=\"macro\">assert_eq!</span>(b.count_ones(), NonZero::new(<span class=\"number\">3</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+a+=+NonZero::%3Cusize%3E::new(0b100_0000)?;%0Alet+b+=+NonZero::%3Cusize%3E::new(0b100_0011)?;%0A%0Aassert_eq!(a.count_ones(),+NonZero::new(1)?);%0Aassert_eq!(b.count_ones(),+NonZero::new(3)?);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_left\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_left\" class=\"fn\">rotate_left</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the left by a specified amount, <code>n</code>,\nwrapping the truncated bits to the end of the resulting integer.</p>\n<p>Please note this isn’t the same operation as the <code>&lt;&lt;</code> shifting operator!</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0xaa00000000006e1usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0x6e10aa</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_left(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0xaa00000000006e1usize)?;%0Alet+m+=+NonZero::new(0x6e10aa)?;%0A%0Aassert_eq!(n.rotate_left(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.rotate_right\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.rotate_right\" class=\"fn\">rotate_right</a>(self, n: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Shifts the bits to the right by a specified amount, <code>n</code>,\nwrapping the truncated bits to the beginning of the resulting\ninteger.</p>\n<p>Please note this isn’t the same operation as the <code>&gt;&gt;</code> shifting operator!</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x6e10aausize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = NonZero::new(<span class=\"number\">0xaa00000000006e1</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(n.rotate_right(<span class=\"number\">12</span>), m);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x6e10aausize)?;%0Alet+m+=+NonZero::new(0xaa00000000006e1)?;%0A%0Aassert_eq!(n.rotate_right(12),+m);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.swap_bytes\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.swap_bytes\" class=\"fn\">swap_bytes</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the byte order of the integer.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.swap_bytes();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x5634129078563412</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456usize)?;%0Alet+m+=+n.swap_bytes();%0A%0Aassert_eq!(m,+NonZero::new(0x5634129078563412)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.reverse_bits\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.reverse_bits\" class=\"fn\">reverse_bits</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\nsecond least-significant bit becomes second most-significant bit, etc.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1234567890123456usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>m = n.reverse_bits();\n\n<span class=\"macro\">assert_eq!</span>(m, NonZero::new(<span class=\"number\">0x6a2c48091e6a2c48</span>)<span class=\"question-mark\">?</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1234567890123456usize)?;%0Alet+m+=+n.reverse_bits();%0A%0Aassert_eq!(m,+NonZero::new(0x6a2c48091e6a2c48)?);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_be\" class=\"fn\">from_be</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from big endian to the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroUsize;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ausize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroUsize::from_be(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroUsize::from_be(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroUsize;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ausize)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(NonZeroUsize::from_be(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroUsize::from_be(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.from_le\" class=\"fn\">from_le</a>(x: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts an integer from little endian to the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">use </span>std::num::NonZeroUsize;\n<span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ausize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(NonZeroUsize::from_le(n), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(NonZeroUsize::from_le(n), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0Ause+std::num::NonZeroUsize;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ausize)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(NonZeroUsize::from_le(n),+n)%0A%7D+else+%7B%0A++++assert_eq!(NonZeroUsize::from_le(n),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_be\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_be\" class=\"fn\">to_be</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to big endian from the target’s endianness.</p>\n<p>On big endian this is a no-op. On little endian the bytes are\nswapped.</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ausize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"big\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_be(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ausize)?;%0A%0Aif+cfg!(target_endian+=+%22big%22)+%7B%0A++++assert_eq!(n.to_be(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_be(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.to_le\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.to_le\" class=\"fn\">to_le</a>(self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_bitwise</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/128281\">#128281</a>)</span></div></span></summary><div class=\"docblock\"><p>Converts <code>self</code> to little endian from the target’s endianness.</p>\n<p>On little endian this is a no-op. On big endian the bytes are\nswapped.</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_bitwise)]\n</span><span class=\"kw\">let </span>n = NonZero::new(<span class=\"number\">0x1Ausize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"kw\">if </span><span class=\"macro\">cfg!</span>(target_endian = <span class=\"string\">\"little\"</span>) {\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n)\n} <span class=\"kw\">else </span>{\n    <span class=\"macro\">assert_eq!</span>(n.to_le(), n.swap_bytes())\n}</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_bitwise)%5D%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+n+=+NonZero::new(0x1Ausize)?;%0A%0Aif+cfg!(target_endian+=+%22little%22)+%7B%0A++++assert_eq!(n.to_le(),+n)%0A%7D+else+%7B%0A++++assert_eq!(n.to_le(),+n.swap_bytes())%0A%7D%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_add\" class=\"fn\">checked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), one.checked_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1usize)?;%0Alet+two+=+NonZero::new(2usize)?;%0Alet+max+=+NonZero::new(usize::MAX)?;%0A%0Aassert_eq!(Some(two),+one.checked_add(1));%0Aassert_eq!(None,+max.checked_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_add\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_add\" class=\"fn\">saturating_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;usize&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, one.saturating_add(<span class=\"number\">1</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_add(<span class=\"number\">1</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1usize)?;%0Alet+two+=+NonZero::new(2usize)?;%0Alet+max+=+NonZero::new(usize::MAX)?;%0A%0Aassert_eq!(two,+one.saturating_add(1));%0Aassert_eq!(max,+max.saturating_add(1));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_add\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_add\" class=\"fn\">unchecked_add</a>(self, other: <a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Adds an unsigned integer to a non-zero value,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self + rhs &gt; usize::MAX</code>.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(two, <span class=\"kw\">unsafe </span>{ one.unchecked_add(<span class=\"number\">1</span>) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1usize)?;%0Alet+two+=+NonZero::new(2usize)?;%0A%0Aassert_eq!(two,+unsafe+%7B+one.unchecked_add(1)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_next_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_next_power_of_two\" class=\"fn\">checked_next_power_of_two</a>(self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the smallest power of two greater than or equal to <code>self</code>.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a>\nif the next power of two is greater than the type’s maximum value.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(two), two.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), three.checked_next_power_of_two() );\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_next_power_of_two() );</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2usize)?;%0Alet+three+=+NonZero::new(3usize)?;%0Alet+four+=+NonZero::new(4usize)?;%0Alet+max+=+NonZero::new(usize::MAX)?;%0A%0Aassert_eq!(Some(two),+two.checked_next_power_of_two()+);%0Aassert_eq!(Some(four),+three.checked_next_power_of_two()+);%0Aassert_eq!(None,+max.checked_next_power_of_two()+);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog2\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog2\" class=\"fn\">ilog2</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 2 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.usize.html#method.ilog2\" title=\"method usize::ilog2\"><code>usize::ilog2</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">7usize</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">8usize</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">9usize</span>)<span class=\"question-mark\">?</span>.ilog2(), <span class=\"number\">3</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(7usize)?.ilog2(),+2);%0Aassert_eq!(NonZero::new(8usize)?.ilog2(),+3);%0Aassert_eq!(NonZero::new(9usize)?.ilog2(),+3);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ilog10\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.67.0, const since 1.67.0\">1.67.0 (const: 1.67.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.ilog10\" class=\"fn\">ilog10</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a></h4></section></summary><div class=\"docblock\"><p>Returns the base 10 logarithm of the number, rounded down.</p>\n<p>This is the same operation as\n<a href=\"core/primitive.usize.html#method.ilog10\" title=\"method usize::ilog10\"><code>usize::ilog10</code></a>,\nexcept that it has no failure cases to worry about\nsince this value can never be zero.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">99usize</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">1</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">100usize</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(NonZero::new(<span class=\"number\">101usize</span>)<span class=\"question-mark\">?</span>.ilog10(), <span class=\"number\">2</span>);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Aassert_eq!(NonZero::new(99usize)?.ilog10(),+1);%0Aassert_eq!(NonZero::new(100usize)?.ilog10(),+2);%0Aassert_eq!(NonZero::new(101usize)?.ilog10(),+2);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.midpoint\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.85.0, const since 1.85.0\">1.85.0 (const: 1.85.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.midpoint\" class=\"fn\">midpoint</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Calculates the midpoint (average) between <code>self</code> and <code>rhs</code>.</p>\n<p><code>midpoint(a, b)</code> is <code>(a + b) &gt;&gt; 1</code> as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards negative infinity and that no overflow will ever occur.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>one = NonZero::new(<span class=\"number\">1usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4usize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(one.midpoint(four), two);\n<span class=\"macro\">assert_eq!</span>(four.midpoint(one), two);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+one+=+NonZero::new(1usize)?;%0Alet+two+=+NonZero::new(2usize)?;%0Alet+four+=+NonZero::new(4usize)?;%0A%0Aassert_eq!(one.midpoint(four),+two);%0Aassert_eq!(four.midpoint(one),+two);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_power_of_two\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0, const since 1.59.0\">1.59.0 (const: 1.59.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.is_power_of_two\" class=\"fn\">is_power_of_two</a>(self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if and only if <code>self == (1 &lt;&lt; k)</code> for some <code>k</code>.</p>\n<p>On many architectures, this function can perform better than <code>is_power_of_two()</code>\non the underlying integer type, as special handling of zero can be avoided.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>eight = NonZero::new(<span class=\"number\">8usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(eight.is_power_of_two());\n<span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"macro\">assert!</span>(!ten.is_power_of_two());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+eight+=+NonZero::new(8usize)?;%0Aassert!(eight.is_power_of_two());%0Alet+ten+=+NonZero::new(10usize)?;%0Aassert!(!ten.is_power_of_two());%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.isqrt\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0, const since 1.84.0\">1.84.0 (const: 1.84.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.isqrt\" class=\"fn\">isqrt</a>(self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Returns the square root of the number, rounded down.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>ten = NonZero::new(<span class=\"number\">10usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3usize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(ten.isqrt(), three);</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+ten+=+NonZero::new(10usize)?;%0Alet+three+=+NonZero::new(3usize)?;%0A%0Aassert_eq!(ten.isqrt(),+three);%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cast_signed\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.87.0, const since 1.87.0\">1.87.0 (const: 1.87.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.cast_signed\" class=\"fn\">cast_signed</a>(self) -&gt; <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Returns the bit pattern of <code>self</code> reinterpreted as a signed integer of the same size.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">let </span>n = NonZero::&lt;usize&gt;::MAX;\n\n<span class=\"macro\">assert_eq!</span>(n.cast_signed(), NonZero::new(-<span class=\"number\">1isize</span>).unwrap());</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn+main()+%7B%0A++++use+std::num::NonZero;%0A++++%0A++++let+n+=+NonZero::%3Cusize%3E::MAX;%0A++++%0A++++assert_eq!(n.cast_signed(),+NonZero::new(-1isize).unwrap());%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_mul\" class=\"fn\">checked_mul</a>(self, other: Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(four), two.checked_mul(two));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, max.checked_mul(two));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2usize)?;%0Alet+four+=+NonZero::new(4usize)?;%0Alet+max+=+NonZero::new(usize::MAX)?;%0A%0Aassert_eq!(Some(four),+two.checked_mul(two));%0Aassert_eq!(None,+max.checked_mul(two));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_mul\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_mul\" class=\"fn\">saturating_mul</a>(self, other: Self) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;usize&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, two.saturating_mul(two));\n<span class=\"macro\">assert_eq!</span>(max, four.saturating_mul(max));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2usize)?;%0Alet+four+=+NonZero::new(4usize)?;%0Alet+max+=+NonZero::new(usize::MAX)?;%0A%0Aassert_eq!(four,+two.saturating_mul(two));%0Aassert_eq!(max,+four.saturating_mul(max));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unchecked_mul\" class=\"method\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a><h4 class=\"code-header\">pub const unsafe fn <a href=\"core/num/struct.NonZero.html#tymethod.unchecked_mul\" class=\"fn\">unchecked_mul</a>(self, other: Self) -&gt; Self</h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>nonzero_ops</code>&nbsp;<a href=\"https://github.com/rust-lang/rust/issues/84186\">#84186</a>)</span></div></span></summary><div class=\"docblock\"><p>Multiplies two non-zero integers together,\nassuming overflow cannot occur.\nOverflow is unchecked, and it is undefined behavior to overflow\n<em>even if the result would wrap to a non-zero value</em>.\nThe behavior is undefined as soon as\n<code>self * rhs &gt; usize::MAX</code>.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(nonzero_ops)]\n\n</span><span class=\"kw\">let </span>two = NonZero::new(<span class=\"number\">2usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>four = NonZero::new(<span class=\"number\">4usize</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(four, <span class=\"kw\">unsafe </span>{ two.unchecked_mul(two) });</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(nonzero_ops)%5D%0A%0A%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+two+=+NonZero::new(2usize)?;%0Alet+four+=+NonZero::new(4usize)?;%0A%0Aassert_eq!(four,+unsafe+%7B+two.unchecked_mul(two)+%7D);%0ASome(())%0A%7D&amp;version=nightly&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.checked_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.checked_pow\" class=\"fn\">checked_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;Self&gt;</h4></section></summary><div class=\"docblock\"><p>Raises non-zero value to an integer power.\nChecks for overflow and returns <a href=\"core/option/enum.Option.html#variant.None\" title=\"variant core::option::Option::None\"><code>None</code></a> on overflow.\nAs a consequence, the result cannot wrap to zero.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>half_max = NonZero::new(usize::MAX / <span class=\"number\">2</span>)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Some</span>(twenty_seven), three.checked_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">None</span>, half_max.checked_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3usize)?;%0Alet+twenty_seven+=+NonZero::new(27usize)?;%0Alet+half_max+=+NonZero::new(usize::MAX+/+2)?;%0A%0Aassert_eq!(Some(twenty_seven),+three.checked_pow(3));%0Aassert_eq!(None,+half_max.checked_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.saturating_pow\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.64.0, const since 1.64.0\">1.64.0 (const: 1.64.0)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#2240-2250\">Source</a></span><h4 class=\"code-header\">pub const fn <a href=\"core/num/struct.NonZero.html#tymethod.saturating_pow\" class=\"fn\">saturating_pow</a>(self, other: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; Self</h4></section></summary><div class=\"docblock\"><p>Raise non-zero value to an integer power.\nReturn <a href=\"core/num/struct.NonZero.html#associatedconstant.MAX\" title=\"associated constant core::num::NonZero::MAX\"><code>NonZero::&lt;usize&gt;::MAX</code></a> on overflow.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>three = NonZero::new(<span class=\"number\">3usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>twenty_seven = NonZero::new(<span class=\"number\">27usize</span>)<span class=\"question-mark\">?</span>;\n<span class=\"kw\">let </span>max = NonZero::new(usize::MAX)<span class=\"question-mark\">?</span>;\n\n<span class=\"macro\">assert_eq!</span>(twenty_seven, three.saturating_pow(<span class=\"number\">3</span>));\n<span class=\"macro\">assert_eq!</span>(max, max.saturating_pow(<span class=\"number\">3</span>));</code></pre><a class=\"test-arrow\" target=\"_blank\" title=\"Run code\" href=\"https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Ause+std::num::NonZero;%0A%0Afn+main()+%7B+test().unwrap();+%7D%0Afn+test()+-%3E+Option%3C()%3E+%7B%0Alet+three+=+NonZero::new(3usize)?;%0Alet+twenty_seven+=+NonZero::new(27usize)?;%0Alet+max+=+NonZero::new(usize::MAX)?;%0A%0Aassert_eq!(twenty_seven,+three.saturating_pow(3));%0Aassert_eq!(max,+max.saturating_pow(3));%0ASome(())%0A%7D&amp;edition=2024\"></a></div>\n</div></details></div></details>",0,"core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Octal-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-Octal-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.Octal.html\" title=\"trait core::fmt::Octal\">Octal</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.Octal.html\" title=\"trait core::fmt::Octal\">Octal</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.Octal.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.Octal.html#tymethod.fmt\">Read more</a></div></details></div></details>","Octal","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Ord-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#257-283\">Source</a></span><a href=\"#impl-Ord-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.cmp\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#262-264\">Source</a><a href=\"#method.cmp\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.Ord.html#tymethod.cmp\" class=\"fn\">cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"enum\" href=\"core/cmp/enum.Ordering.html\" title=\"enum core::cmp::Ordering\">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href=\"core/cmp/enum.Ordering.html\" title=\"enum core::cmp::Ordering\"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href=\"core/cmp/trait.Ord.html#tymethod.cmp\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.max\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#267-270\">Source</a><a href=\"#method.max\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.Ord.html#method.max\" class=\"fn\">max</a>(self, other: Self) -&gt; Self</h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href=\"core/cmp/trait.Ord.html#method.max\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.min\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#273-276\">Source</a><a href=\"#method.min\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.Ord.html#method.min\" class=\"fn\">min</a>(self, other: Self) -&gt; Self</h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href=\"core/cmp/trait.Ord.html#method.min\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.clamp\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#279-282\">Source</a><a href=\"#method.clamp\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.Ord.html#method.clamp\" class=\"fn\">clamp</a>(self, min: Self, max: Self) -&gt; Self</h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href=\"core/cmp/trait.Ord.html#method.clamp\">Read more</a></div></details></div></details>","Ord","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-PartialEq-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0, const unstable\">1.28.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/143800\" title=\"Tracking issue for const_cmp\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#204-217\">Source</a></span><a href=\"#impl-PartialEq-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.eq\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#209-211\">Source</a><a href=\"#method.eq\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialEq.html#tymethod.eq\" class=\"fn\">eq</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ne\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#214-216\">Source</a><a href=\"#method.ne\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialEq.html#method.ne\" class=\"fn\">ne</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.</div></details></div></details>","PartialEq","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-PartialOrd-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#226-254\">Source</a></span><a href=\"#impl-PartialOrd-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.partial_cmp\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#231-233\">Source</a><a href=\"#method.partial_cmp\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialOrd.html#tymethod.partial_cmp\" class=\"fn\">partial_cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"enum\" href=\"core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a>&lt;<a class=\"enum\" href=\"core/cmp/enum.Ordering.html\" title=\"enum core::cmp::Ordering\">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href=\"core/cmp/trait.PartialOrd.html#tymethod.partial_cmp\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.lt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#236-238\">Source</a><a href=\"#method.lt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialOrd.html#method.lt\" class=\"fn\">lt</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href=\"core/cmp/trait.PartialOrd.html#method.lt\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.le\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#241-243\">Source</a><a href=\"#method.le\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialOrd.html#method.le\" class=\"fn\">le</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the\n<code>&lt;=</code> operator. <a href=\"core/cmp/trait.PartialOrd.html#method.le\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.gt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#246-248\">Source</a><a href=\"#method.gt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialOrd.html#method.gt\" class=\"fn\">gt</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code>\noperator. <a href=\"core/cmp/trait.PartialOrd.html#method.gt\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ge\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#251-253\">Source</a><a href=\"#method.ge\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/cmp/trait.PartialOrd.html#method.ge\" class=\"fn\">ge</a>(&amp;self, other: &amp;Self) -&gt; <a class=\"primitive\" href=\"core/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by\nthe <code>&gt;=</code> operator. <a href=\"core/cmp/trait.PartialOrd.html#method.ge\">Read more</a></div></details></div></details>","PartialOrd","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#578\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#578\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#578\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#578\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#578\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#578\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#594\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#594\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#594\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#594\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#594\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#594\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci128%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#594\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i128>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#575\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#575\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#575\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#591\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#591\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#591\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#591\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#591\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#591\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci16%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#591\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i16>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#576\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#576\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#576\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#576\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#576\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#576\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#576\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#576\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#576\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#592\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#592\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#592\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#592\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#592\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#592\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci32%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#592\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i32>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#577\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#577\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#577\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#577\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#577\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#593\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#593\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#593\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#593\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#593\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#593\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci64%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#593\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i64>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#590\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i8>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#590\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i8>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#590\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i8>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#590\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i8>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#590\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i8>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#590\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Ci8%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#590\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<i8>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#579\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#579\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#579\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#579\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#579\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#579\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#595\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#595\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#595\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#595\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#595\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#595\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cisize%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#595\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<isize>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#586\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#586\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#586\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#586\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#586\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#586\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#586\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#571\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#571\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#571\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#571\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#571\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu128%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#571\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u128>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#583\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#583\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#583\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u16>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#583\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#583\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#583\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u16>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#583\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#583\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#583\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u16>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#568\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu16%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#568\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#568\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u16>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#584\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#584\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#584\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#584\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#584\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#569\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#569\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#569\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#569\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#569\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#569\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#569\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu32%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#569\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#569\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u32>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#585\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#585\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#585\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#585\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#585\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#585\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#570\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#570\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#570\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#570\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu64%3E%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#570\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u64>>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#582\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cu8%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#582\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#582\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<u8>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#587\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#587\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#587\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#587\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#587\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#587\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#587\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#572\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#572\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#572\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#572\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.49.0, const unstable\">1.49.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/74935\" title=\"Tracking issue for const_try\">unstable</a>)</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#572\">Source</a></span><a href=\"#impl-TryFrom%3CNonZero%3Cusize%3E%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#572\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<NonZero<usize>>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Ci128%3E-for-NonZero%3Ci128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#544\">Source</a></span><a href=\"#impl-TryFrom%3Ci128%3E-for-NonZero%3Ci128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#544\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.i128.html\">i128</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.i128.html\" title=\"primitive i128\"><code>i128</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i128.html\" title=\"primitive i128\">i128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#544\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<i128>","core::num::nonzero::NonZeroI128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Ci16%3E-for-NonZero%3Ci16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#541\">Source</a></span><a href=\"#impl-TryFrom%3Ci16%3E-for-NonZero%3Ci16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#541\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.i16.html\">i16</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.i16.html\" title=\"primitive i16\"><code>i16</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i16.html\" title=\"primitive i16\">i16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#541\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<i16>","core::num::nonzero::NonZeroI16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Ci32%3E-for-NonZero%3Ci32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#542\">Source</a></span><a href=\"#impl-TryFrom%3Ci32%3E-for-NonZero%3Ci32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#542\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.i32.html\">i32</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.i32.html\" title=\"primitive i32\"><code>i32</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i32.html\" title=\"primitive i32\">i32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#542\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<i32>","core::num::nonzero::NonZeroI32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Ci64%3E-for-NonZero%3Ci64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#543\">Source</a></span><a href=\"#impl-TryFrom%3Ci64%3E-for-NonZero%3Ci64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#543\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.i64.html\">i64</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.i64.html\" title=\"primitive i64\"><code>i64</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i64.html\" title=\"primitive i64\">i64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#543\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<i64>","core::num::nonzero::NonZeroI64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Ci8%3E-for-NonZero%3Ci8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#540\">Source</a></span><a href=\"#impl-TryFrom%3Ci8%3E-for-NonZero%3Ci8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#540\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.i8.html\">i8</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.i8.html\" title=\"primitive i8\"><code>i8</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.i8.html\" title=\"primitive i8\">i8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#540\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<i8>","core::num::nonzero::NonZeroI8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cisize%3E-for-NonZero%3Cisize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#545\">Source</a></span><a href=\"#impl-TryFrom%3Cisize%3E-for-NonZero%3Cisize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#545\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.isize.html\">isize</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.isize.html\" title=\"primitive isize\"><code>isize</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.isize.html\" title=\"primitive isize\">isize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#545\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<isize>","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cu128%3E-for-NonZero%3Cu128%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#538\">Source</a></span><a href=\"#impl-TryFrom%3Cu128%3E-for-NonZero%3Cu128%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#538\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.u128.html\">u128</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.u128.html\" title=\"primitive u128\"><code>u128</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u128.html\" title=\"primitive u128\">u128</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#538\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<u128>","core::num::nonzero::NonZeroU128"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cu16%3E-for-NonZero%3Cu16%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#535\">Source</a></span><a href=\"#impl-TryFrom%3Cu16%3E-for-NonZero%3Cu16%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#535\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.u16.html\">u16</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.u16.html\" title=\"primitive u16\"><code>u16</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u16.html\" title=\"primitive u16\">u16</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#535\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<u16>","core::num::nonzero::NonZeroU16"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cu32%3E-for-NonZero%3Cu32%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#536\">Source</a></span><a href=\"#impl-TryFrom%3Cu32%3E-for-NonZero%3Cu32%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#536\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.u32.html\">u32</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.u32.html\" title=\"primitive u32\"><code>u32</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u32.html\" title=\"primitive u32\">u32</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#536\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<u32>","core::num::nonzero::NonZeroU32"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cu64%3E-for-NonZero%3Cu64%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#537\">Source</a></span><a href=\"#impl-TryFrom%3Cu64%3E-for-NonZero%3Cu64%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#537\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.u64.html\">u64</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.u64.html\" title=\"primitive u64\"><code>u64</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u64.html\" title=\"primitive u64\">u64</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#537\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<u64>","core::num::nonzero::NonZeroU64"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cu8%3E-for-NonZero%3Cu8%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#534\">Source</a></span><a href=\"#impl-TryFrom%3Cu8%3E-for-NonZero%3Cu8%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#534\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.u8.html\">u8</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.u8.html\" title=\"primitive u8\"><code>u8</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.u8.html\" title=\"primitive u8\">u8</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#534\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<u8>","core::num::nonzero::NonZeroU8"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-TryFrom%3Cusize%3E-for-NonZero%3Cusize%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.46.0\">1.46.0</span> · <a class=\"src\" href=\"src/core/convert/num.rs.html#539\">Source</a></span><a href=\"#impl-TryFrom%3Cusize%3E-for-NonZero%3Cusize%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl <a class=\"trait\" href=\"core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt; for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>&gt;</h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.try_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#539\">Source</a><a href=\"#method.try_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/convert/trait.TryFrom.html#tymethod.try_from\" class=\"fn\">try_from</a>(value: <a class=\"primitive\" href=\"core/primitive.usize.html\">usize</a>) -&gt; <a class=\"enum\" href=\"core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a>&lt;Self, Self::<a class=\"associatedtype\" href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" title=\"type core::convert::TryFrom::Error\">Error</a>&gt;</h4></section></summary><div class=\"docblock\"><p>Attempts to convert <a href=\"core/primitive.usize.html\" title=\"primitive usize\"><code>usize</code></a>\nto <code><a href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;<a href=\"core/primitive.usize.html\" title=\"primitive usize\">usize</a>&gt;</code>.</p>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Error\" class=\"associatedtype trait-impl\"><a class=\"src rightside\" href=\"src/core/convert/num.rs.html#539\">Source</a><a href=\"#associatedtype.Error\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"core/convert/trait.TryFrom.html#associatedtype.Error\" class=\"associatedtype\">Error</a> = <a class=\"struct\" href=\"core/num/struct.TryFromIntError.html\" title=\"struct core::num::TryFromIntError\">TryFromIntError</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details></div></details>","TryFrom<usize>","core::num::nonzero::NonZeroUsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-UpperExp-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.84.0\">1.84.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-UpperExp-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.UpperExp.html\" title=\"trait core::fmt::UpperExp\">UpperExp</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.UpperExp.html\" title=\"trait core::fmt::UpperExp\">UpperExp</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.UpperExp.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.UpperExp.html#tymethod.fmt\">Read more</a></div></details></div></details>","UpperExp","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-UpperHex-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a></span><a href=\"#impl-UpperHex-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/fmt/trait.UpperHex.html\" title=\"trait core::fmt::UpperHex\">UpperHex</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/fmt/trait.UpperHex.html\" title=\"trait core::fmt::UpperHex\">UpperHex</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#146-163\">Source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"core/fmt/trait.UpperHex.html#tymethod.fmt\" class=\"fn\">fmt</a>(&amp;self, f: &amp;mut <a class=\"struct\" href=\"core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a>&lt;'_&gt;) -&gt; <a class=\"type\" href=\"core/fmt/type.Result.html\" title=\"type core::fmt::Result\">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"core/fmt/trait.UpperHex.html#tymethod.fmt\">Read more</a></div></details></div></details>","UpperHex","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-Copy-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#200\">Source</a></span><a href=\"#impl-Copy-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a>,</div></h3></section>","Copy","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-Eq-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#223\">Source</a></span><a href=\"#impl-Eq-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a>,</div></h3></section>","Eq","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-Freeze-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#178\">Source</a></span><a href=\"#impl-Freeze-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a>,</div></h3></section>","Freeze","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-RefUnwindSafe-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#179\">Source</a></span><a href=\"#impl-RefUnwindSafe-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/panic/trait.RefUnwindSafe.html\" title=\"trait core::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/panic/trait.RefUnwindSafe.html\" title=\"trait core::panic::RefUnwindSafe\">RefUnwindSafe</a>,</div></h3></section>","RefUnwindSafe","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-Send-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#180\">Source</a></span><a href=\"#impl-Send-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,</div></h3></section>","Send","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-StructuralPartialEq-for-NonZero%3CT%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#220\">Source</a><a href=\"#impl-StructuralPartialEq-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a>,</div></h3></section>","StructuralPartialEq","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-Sync-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#181\">Source</a></span><a href=\"#impl-Sync-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,</div></h3></section>","Sync","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-Unpin-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#182\">Source</a></span><a href=\"#impl-Unpin-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,</div></h3></section>","Unpin","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-UnwindSafe-for-NonZero%3CT%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.28.0\">1.28.0</span> · <a class=\"src\" href=\"src/core/num/nonzero.rs.html#183\">Source</a></span><a href=\"#impl-UnwindSafe-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/panic/trait.UnwindSafe.html\" title=\"trait core::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a> + <a class=\"trait\" href=\"core/panic/trait.UnwindSafe.html\" title=\"trait core::panic::UnwindSafe\">UnwindSafe</a>,</div></h3></section>","UnwindSafe","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"],["<section id=\"impl-UseCloned-for-NonZero%3CT%3E\" class=\"impl\"><a class=\"src rightside\" href=\"src/core/num/nonzero.rs.html#197\">Source</a><a href=\"#impl-UseCloned-for-NonZero%3CT%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl&lt;T&gt; <a class=\"trait\" href=\"core/clone/trait.UseCloned.html\" title=\"trait core::clone::UseCloned\">UseCloned</a> for <a class=\"struct\" href=\"core/num/struct.NonZero.html\" title=\"struct core::num::NonZero\">NonZero</a>&lt;T&gt;<div class=\"where\">where\n    T: <a class=\"trait\" href=\"core/num/trait.ZeroablePrimitive.html\" title=\"trait core::num::ZeroablePrimitive\">ZeroablePrimitive</a>,</div></h3></section>","UseCloned","core::num::nonzero::NonZeroU8","core::num::nonzero::NonZeroU16","core::num::nonzero::NonZeroU32","core::num::nonzero::NonZeroU64","core::num::nonzero::NonZeroU128","core::num::nonzero::NonZeroUsize","core::num::nonzero::NonZeroI8","core::num::nonzero::NonZeroI16","core::num::nonzero::NonZeroI32","core::num::nonzero::NonZeroI64","core::num::nonzero::NonZeroI128","core::num::nonzero::NonZeroIsize"]]]]);
    if (window.register_type_impls) {
        window.register_type_impls(type_impls);
    } else {
        window.pending_type_impls = type_impls;
    }
})()
//{"start":55,"fragment_lengths":[1290653]}