17 lines
499 KiB
HTML
17 lines
499 KiB
HTML
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Pow` trait in crate `num_traits`."><meta name="keywords" content="rust, rustlang, rust-lang, Pow"><title>num_traits::pow::Pow - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../num_traits/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Pow</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Output">Output</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.pow">pow</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Pow%3C%26%27a%20f32%3E-for-%26%27b%20f32">&'b f32</a><a href="#impl-Pow%3C%26%27a%20f32%3E-for-%26%27b%20f64">&'b f64</a><a href="#impl-Pow%3C%26%27a%20f32%3E-for-f32">f32</a><a href="#impl-Pow%3C%26%27a%20f32%3E-for-f64">f64</a><a href="#impl-Pow%3C%26%27a%20f64%3E-for-%26%27b%20f64">&'b f64</a><a href="#impl-Pow%3C%26%27a%20f64%3E-for-f64">f64</a><a href="#impl-Pow%3C%26%27a%20i16%3E-for-%26%27b%20f32">&'b f32</a><a href="#impl-Pow%3C%26%27a%20i16%3E-for-%26%27b%20f64">&'b f64</a><a href="#impl-Pow%3C%26%27a%20i16%3E-for-f32">f32</a><a href="#impl-Pow%3C%26%27a%20i16%3E-for-f64">f64</a><a href="#impl-Pow%3C%26%27a%20i32%3E-for-%26%27b%20f32">&'b f32</a><a href="#impl-Pow%3C%26%27a%20i32%3E-for-%26%27b%20f64">&'b f64</a><a href="#impl-Pow%3C%26%27a%20i32%3E-for-f32">f32</a><a href="#impl-Pow%3C%26%27a%20i32%3E-for-f64">f64</a><a href="#impl-Pow%3C%26%27a%20i8%3E-for-%26%27b%20f32">&'b f32</a><a href="#impl-Pow%3C%26%27a%20i8%3E-for-%26%27b%20f64">&'b f64</a><a href="#impl-Pow%3C%26%27a%20i8%3E-for-f32">f32</a><a href="#impl-Pow%3C%26%27a%20i8%3E-for-f64">f64</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20f32">&'b f32</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20f64">&'b f64</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20i128">&'b i128</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20i16">&'b i16</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20i32">&'b i32</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20i64">&'b i64</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20i8">&'b i8</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20isize">&'b isize</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20u128">&'b u128</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20u16">&'b u16</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20u32">&'b u32</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20u64">&'b u64</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20u8">&'b u8</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-%26%27b%20usize">&'b usize</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-f32">f32</a><a href="#impl-Pow%3C%26%27a%20u16%3E-for-f64">f64</a><a href="#imp
|
||
|
type <a href='#associatedtype.Output' class="type">Output</a>;
|
||
|
fn <a href='#tymethod.pow' class='fnname'>pow</a>(self, rhs: RHS) -> Self::<a class="type" href="../../num_traits/pow/trait.Pow.html#associatedtype.Output" title="type num_traits::pow::Pow::Output">Output</a>;
|
||
|
}</pre></div><div class='docblock'><p>Binary operator for raising a value to a power.</p>
|
||
|
</div>
|
||
|
<h2 id='associated-types' class='small-section-header'>Associated Types<a href='#associated-types' class='anchor'></a></h2><div class='methods'><h3 id='associatedtype.Output' class='method'><code id='Output.t'>type <a href='#associatedtype.Output' class="type">Output</a></code></h3><div class='docblock'><p>The result after applying the operator.</p>
|
||
|
</div></div><span class='loading-content'>Loading content...</span>
|
||
|
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.pow' class='method'><code id='pow.v'>fn <a href='#tymethod.pow' class='fnname'>pow</a>(self, rhs: RHS) -> Self::<a class="type" href="../../num_traits/pow/trait.Pow.html#associatedtype.Output" title="type num_traits::pow::Pow::Output">Output</a></code></h3><div class='docblock'><p>Returns <code>self</code> to the power <code>rhs</code>.</p>
|
||
|
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
|
<span class="kw">use</span> <span class="ident">num_traits</span>::<span class="ident">Pow</span>;
|
||
|
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Pow</span>::<span class="ident">pow</span>(<span class="number">10u32</span>, <span class="number">2u32</span>), <span class="number">100</span>);</pre></div>
|
||
|
</div></div><span class='loading-content'>Loading content...</span>
|
||
|
<h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-Pow%3Cu8%3E-for-u8' class='impl'><code class='in-band'>impl <a class="trait" href="../../num_traits/pow/trait.Pow.html" title="trait num_traits::pow::Pow">Pow</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a href='#impl-Pow%3Cu8%3E-for-u8' class='anchor'></a><a class='srclink' href='../../src/num_traits/pow.rs.html#35-41' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Output-1' class="type"><code id='Output.t-1'>type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h4><h4 id='method.pow' class="method hidden"><code id='pow.v-1'>fn <a href='#method.pow' class='fnname'>pow</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a class='srclink' href='../../src/num_traits/pow.rs.html#38-40' title='goto source code'>[src]</a></h4></div><h3 id='impl-Pow%3C%26%27a%20u8%3E-for-u8' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="../../num_traits/pow/trait.Pow.html" title="trait num_traits::pow::Pow">Pow</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a href='#impl-Pow%3C%26%27a%20u8%3E-for-u8' class='anchor'></a><a class='srclink' href='../../src/num_traits/pow.rs.html#43-49' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Output-2' class="type"><code id='Output.t-2'>type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h4><h4 id='method.pow-1' class="method hidden"><code id='pow.v-2'>fn <a href='#method.pow' class='fnname'>pow</a>(self, rhs: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a class='srclink' href='../../src/num_traits/pow.rs.html#46-48' title='goto source code'>[src]</a></h4></div><h3 id='impl-Pow%3Cu8%3E-for-%26%27a%20u8' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="../../num_traits/pow/trait.Pow.html" title="trait num_traits::pow::Pow">Pow</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a href='#impl-Pow%3Cu8%3E-for-%26%27a%20u8' class='anchor'></a><a class='srclink' href='../../src/num_traits/pow.rs.html#51-57' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Output-3' class="type"><code id='Output.t-3'>type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h4><h4 id='method.pow-2' class="method hidden"><code id='pow.v-3'>fn <a href='#method.pow' class='fnname'>pow</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a class='srclink' href='../../src/num_traits/pow.rs.html#54-56' title='goto source code'>[src]</a></h4></div><h3 id='impl-Pow%3C%26%27a%20u8%3E-for-%26%27b%20u8' class='impl'><code class='in-band'>impl<'a, 'b> <a class="trait" href="../../num_traits/pow/trait.Pow.html" title="trait num_traits::pow::Pow">Pow</a><&
|
||
|
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
|
||
|
src="../../implementors/num_traits/pow/trait.Pow.js">
|
||
|
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "num_traits";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|