pumpkin/ramp/ll/limb_ptr/struct.Limbs.html
2016-05-10 23:34:09 -04:00

169 lines
No EOL
20 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 `Limbs` struct in crate `ramp`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Limbs">
<title>ramp::ll::limb_ptr::Limbs - Rust</title>
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../../main.css">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'><a href='../../index.html'>ramp</a>::<wbr><a href='../index.html'>ll</a>::<wbr><a href='index.html'>limb_ptr</a></p><script>window.sidebarCurrent = {name: 'Limbs', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>ramp</a>::<wbr><a href='../index.html'>ll</a>::<wbr><a href='index.html'>limb_ptr</a>::<wbr><a class='struct' href=''>Limbs</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a id='src-1036' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#25-28' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Limbs {
// some fields omitted
}</pre><div class='docblock'><p>A version of <code>*const Limb</code> that is bounds-checked when debug assertions are on</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1061' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#39-60' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class='method'><code>unsafe fn <a href='#method.new' class='fnname'>new</a>(base: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.pointer.html'>*const </a><a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>, start: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>, end: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) -&gt; <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></h4>
<div class='docblock'><p>Create a new instance, pointing at <code>base</code> and valid
from <code>base.offset(start)</code> to <code>base.offset(end)</code>.</p>
</div><h4 id='method.offset' class='method'><code>unsafe fn <a href='#method.offset' class='fnname'>offset</a>(self, x: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.isize.html'>isize</a>) -&gt; <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></h4>
<div class='docblock'><p>Move <code>self</code> to point to the <code>x</code>th Limbs from the
current location.</p>
</div></div><h2 id='deref-methods'>Methods from <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a>&lt;Target=<a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt;</h2><div class='impl-items'><h4 id='associatedconstant.BITS' class='associatedconstant'><code>const <a href='#associatedconstant.BITS' class='constant'>BITS</a>: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a> = 64</code></h4>
<h4 id='associatedconstant.B' class='associatedconstant'><code>const <a href='#associatedconstant.B' class='constant'>B</a>: <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a> = Limb(1 &lt;&lt; Limb::BITS / 2)</code></h4>
<h4 id='method.high_part' class='method'><code>fn <a href='#method.high_part' class='fnname'>high_part</a>(self) -&gt; <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
<div class='docblock'><p>Returns the high half of the limb</p>
</div><h4 id='method.low_part' class='method'><code>fn <a href='#method.low_part' class='fnname'>low_part</a>(self) -&gt; <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
<div class='docblock'><p>Returns the low half of the limb</p>
</div><h4 id='method.add_overflow' class='method'><code>fn <a href='#method.add_overflow' class='fnname'>add_overflow</a>(self, other: <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<div class='docblock'><p>Performs <code>self + other</code>, returning the result and whether or not the addition overflowed</p>
</div><h4 id='method.sub_overflow' class='method'><code>fn <a href='#method.sub_overflow' class='fnname'>sub_overflow</a>(self, other: <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<div class='docblock'><p>Performs <code>self - other</code>, returning the result and whether or not the subtraction overflowed</p>
</div><h4 id='method.mul_lo' class='method'><code>fn <a href='#method.mul_lo' class='fnname'>mul_lo</a>(self, other: <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>) -&gt; <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
<div class='docblock'><p>Performs <code>self * other</code> returning the lower half of the product</p>
</div><h4 id='method.mul_hi' class='method'><code>fn <a href='#method.mul_hi' class='fnname'>mul_hi</a>(self, other: <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>) -&gt; <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
<div class='docblock'><p>Performs <code>self * other</code> returning the higher half of the product</p>
</div><h4 id='method.mul_hilo' class='method'><code>fn <a href='#method.mul_hilo' class='fnname'>mul_hilo</a>(self, other: <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>, <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<div class='docblock'><p>Performs <code>self * other</code> returning the two-limb result as (high, low).</p>
</div><h4 id='method.invert' class='method'><code>fn <a href='#method.invert' class='fnname'>invert</a>(self) -&gt; <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
<h4 id='method.high_bit_set' class='method'><code>fn <a href='#method.high_bit_set' class='fnname'>high_bit_set</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns whether or not the highest bit in the limb is set.</p>
<p>Division algorithms often require the highest limb of the divisor
to be <code>d &gt;= BASE/2</code>.</p>
</div><h4 id='method.leading_zeros' class='method'><code>fn <a href='#method.leading_zeros' class='fnname'>leading_zeros</a>(self) -&gt; <a class='type' href='../../../ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a></code></h4>
<div class='docblock'><p>Returns the number of leading zeros in the limb</p>
</div><h4 id='method.trailing_zeros' class='method'><code>fn <a href='#method.trailing_zeros' class='fnname'>trailing_zeros</a>(self) -&gt; <a class='type' href='../../../ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a></code></h4>
<div class='docblock'><p>Returns the number of trailing zeros in the limb</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1074' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#62-66' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class="since">1.0.0</div></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1078' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#67-71' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt;</code></h4>
<h4 id='method.lt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class="since">1.0.0</div></h4>
<h4 id='method.le' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class="since">1.0.0</div></h4>
<h4 id='method.gt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class="since">1.0.0</div></h4>
<h4 id='method.ge' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class="since">1.0.0</div></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1082' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#72' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1083' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#73-77' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;<a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></code></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1087' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#79-86' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Target' class='type'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html#associatedtype.Target' class='type'>Target</a> = <a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
<h4 id='method.deref' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;<a class='struct' href='../../../ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1039' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#24' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1046' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#24' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></h4>
<h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code><div class="since">1.0.0</div></h4>
</div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../../../ramp/ll/limb_ptr/struct.Limbs.html' title='ramp::ll::limb_ptr::Limbs'>Limbs</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-1051' class='srclink' href='../../../src/ramp/ll/limb_ptr.rs.html#24' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div></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>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</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>
</div>
</div>
</aside>
<script>
window.rootPath = "../../../";
window.currentCrate = "ramp";
window.playgroundUrl = "";
</script>
<script src="../../../jquery.js"></script>
<script src="../../../main.js"></script>
<script defer src="../../../search-index.js"></script>
</body>
</html>