Compare commits

..

3 commits

Author SHA1 Message Date
Zach Dziura
f2eedbf37d Updated documentation for v1.0.1 2016-05-10 23:34:09 -04:00
Zach Dziura
b9a37705ff Update docs with latest information 2016-05-10 15:15:32 -04:00
Zach Dziura
45bffa358a Adding documentation for v0.3 2016-05-10 15:03:32 -04:00
723 changed files with 85086 additions and 897 deletions

3
.gitignore vendored
View file

@ -7,9 +7,6 @@
# Executables
*.exe
# Folders
.idea
# Generated by Cargo
/target/
Cargo.lock

View file

@ -1,18 +0,0 @@
language: rust
rust:
- nightly
before_script:
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
script:
- |
travis-cargo build &&
travis-cargo test &&
travis-cargo bench
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev

64
COPYRIGHT.txt Normal file
View file

@ -0,0 +1,64 @@
These documentation pages include resources by third parties. This copyright
file applies only to those resources. The following third party resources are
included, and carry their own copyright notices and license terms:
* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff):
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
with Reserved Font Name Fira Sans.
Copyright (c) 2014, Telefonica S.A.
Licensed under the SIL Open Font License, Version 1.1.
See FiraSans-LICENSE.txt.
* Heuristica (Heuristica-Italic.woff):
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
Utopia is either a registered trademark or trademark of Adobe Systems
Incorporated in the United States and/or other countries. Used under
license.
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
with Reserved Font Name Heuristica.
Licensed under the SIL Open Font License, Version 1.1.
See Heuristica-LICENSE.txt.
* jQuery (jquery-2.1.4.min.js):
Copyright 2005, 2015 jQuery Foundation, Inc.
Licensed under the MIT license (see LICENSE-MIT.txt).
* rustdoc.css, main.js, and playpen.js:
Copyright 2015 The Rust Developers.
Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
the MIT license (LICENSE-MIT.txt) at your option.
* normalize.css:
Copyright (c) Nicolas Gallagher and Jonathan Neal.
Licensed under the MIT license (see LICENSE-MIT.txt).
* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff):
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
of Adobe Systems Incorporated in the United States and/or other countries.
Licensed under the SIL Open Font License, Version 1.1.
See SourceCodePro-LICENSE.txt.
* Source Serif Pro (SourceSerifPro-Regular.woff, SourceSerifPro-Bold.woff):
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with
Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of
Adobe Systems Incorporated in the United States and/or other countries.
Licensed under the SIL Open Font License, Version 1.1.
See SourceSerifPro-LICENSE.txt.
This copyright file is intended to be distributed with rustdoc output.

View file

@ -1,26 +0,0 @@
[package]
name = "pumpkin"
version = "2.0.1"
authors = ["Zach Dziura <zcdziura@gmail.com>"]
description = "A cryptographically secure prime number generator"
repository = "https://github.com/zcdziura/pumpkin"
homepage = "https://zcdziura.github.io/pumpkin/pumpkin"
keywords = ["prime", "number", "cryptography", "generator"]
license = "Unlicense/MIT"
readme = "README.md"
[dependencies]
clippy = {version = "0.0.*", optional = true}
custom_derive = "0.1"
newtype_derive = "0.1"
ramp = "0.5"
rand = "0.6"
[lib]
name = "pumpkin"
path = "src/lib.rs"
doctest = false
[features]
dev = ["clippy"]
unstable = []

99
FiraSans-LICENSE.txt Normal file
View file

@ -0,0 +1,99 @@
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
with Reserved Font Name Fira Sans.
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
with Reserved Font Name Fira Mono.
Copyright (c) 2014, Telefonica S.A.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
FiraSans-Medium.woff Normal file

Binary file not shown.

BIN
FiraSans-Regular.woff Normal file

Binary file not shown.

BIN
Heuristica-Italic.woff Normal file

Binary file not shown.

101
Heuristica-LICENSE.txt Normal file
View file

@ -0,0 +1,101 @@
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
Utopia is either a registered trademark or trademark of Adobe Systems
Incorporated in the United States and/or other countries. Used under
license.
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
with Reserved Font Name Heuristica.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

28
LICENSE Normal file
View file

@ -0,0 +1,28 @@
Copyright (c) 2015, Zach Dziura
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of pumpkin nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

201
LICENSE-APACHE.txt Normal file
View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

23
LICENSE-MIT.txt Normal file
View file

@ -0,0 +1,23 @@
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View file

@ -1,25 +0,0 @@
The MIT License (MIT)
=====================
Copyright © `2015` `Zachary Dziura`
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

120
README.md
View file

@ -1,120 +0,0 @@
# Pumpkin
A random number generator for generating large prime numbers, suitable for cryptography.
## What's up with the name?
Since I began writing this library around Halloween of 2015, I wanted to choose
a name that was vaguely related to the holiday. Because "pumpkin" and "prime"
both begin with the letter 'p', I decided to use that.
## Purpose
`pumpkin` is a cryptographically-secure, random number generator, useful for
generating large prime numbers (at least 512-bits long). On the back-end,
`pumpkin` uses the wonderful [ramp](https://crates.io/crates/ramp) library for
storing the large numbers. `pumpkin` generates primes very quickly. In our
testing, primes were generated anywhere between 1s and 5s on average, though
of course your mileage may vary.
## Installation
Add the following to your `Cargo.toml` file:
```
pumpkin = "2.0.*"
```
Note that `pumpkin` requires the `nightly` Rust compiler.
## Example
```rust
extern crate pumpkin;
use pumpkin::Prime;
fn main() {
let p = Prime::new(2048); // Generate a new 2048-bit prime number
let q = Prime::new(2048);
let e = p * q;
println!("{}", e);
/*
* 75222035638256552797269351238215022250546763213674706... Some massive
* 4096-bit number.
*/
}
```
You can also initialize your own `OsRng` and generate `Prime`s from that.
```rust
extern crate pumpkin;
extern crate rand;
use pumpkin::Prime;
use rand::OsRng;
fn main() {
let mut rngesus = match OsRng::new() {
Ok(rng) => rng,
Err(e) => panic!("Error trying to initializing RNG: {}", e)
};
let p = Prime::from_rng(2048, &mut rngesus);
let q = Prime::from_rng(2048, &mut rngesus);
let e = p * q;
println!("{}", e);
/*
* 75222035638256552797269351238215022250546763213674706... Some massive
* 4096-bit number.
*/
}
```
## Explanation
`Primes` are generated in much the same way as primes generated by `GnuPG`:
1) Create a large candidate number of a given bit-length. All `Primes` must
be at least 512-bits long.
2) Divide the candidate number by the first 1,000 prime numbers.
3) Test the candidate number with [Fermat's Little
Theorem](https://www.wikiwand.com/en/Fermat's_little_theorem).
4) Finally, run five iterations of the [Miller-Rabin Primality
Test](https://www.wikiwand.com/en/Miller%E2%80%93Rabin_primality_test).
`Primes` are seeded by `rand::OsRng`, which receives its entropy via the
operating system's entropy source (such as `/dev/urandom`). Thus, because we
can be confident that the generated candidate number is truly random (or as
close to truly random as the user can hope), we don't need to do more than five
iterations of the Miller-Rabin test to ensure primality.
`Primes` are simple "newtype" structs; that is, it is a tuple-like struct
surrounding `ramp's` `Int` type. `Primes` have all of the basic algebraic and logical
operators implemented, thus allowing you to do any operation that you would
require.
## Contributing
`pumpkin` is dual-licenced under the MIT and Unlicense. Should you wish to
contribute updates to the project, please consider signing the included `WAVER`
file with your cryptographic digital signature (as allowed by your country's
laws). Doing so will release your changes back into the public domain to be used
freely by all. I did so with this project, and it would mean a lot if you did
too!
To sign the `WAIVER`, execute the following commands:
```
$ gpg -sba -u $YOUR_SIGNING_KEY WAIVER
$ cat WAIVER.asc >> WAIVER.sigs && rm WAIVER.asc
```

93
SourceCodePro-LICENSE.txt Normal file
View file

@ -0,0 +1,93 @@
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
SourceCodePro-Regular.woff Normal file

Binary file not shown.

BIN
SourceCodePro-Semibold.woff Normal file

Binary file not shown.

BIN
SourceSerifPro-Bold.woff Normal file

Binary file not shown.

View file

@ -0,0 +1,93 @@
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
SourceSerifPro-Regular.woff Normal file

Binary file not shown.

View file

@ -1,27 +0,0 @@
Unlicense (Public Domain)
============================
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to &lt;<http://unlicense.org/>&gt;

5
WAIVER
View file

@ -1,5 +0,0 @@
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.

View file

@ -1,19 +0,0 @@
@zcdziura's signature
keyserver: sks-keyservers.net
fingerprint: 0xC936A812AF607321
-----BEGIN PGP SIGNATURE-----
iQIcBAABCgAGBQJXK3Z2AAoJENNfKjTk1jvtfTQP/0PnIWai7tpg+8YfTf+FTBjI
hH8X1KquM6Kt58m+9bSpJAyaA42MYRmPd0UlyKq0UfR9EV9Dyme72cQCUQlNEkuh
tXp1mqQ9wSTy7SGy43vGje2F76WPjGYR9zwrS/+EN771LbQEaYvsI75uIc5ynWnN
op6w9XA9jLDdLPiXb+lli/7uAiSOZgLBqj6M8nTs6ii94kkHgEgZyHpyYe8kJNRq
SUbldrJmH//vKbS7HSvgkPJ/ok2c04ZmZ7B3sa0997r36ubwM/SscqWTvZkGy3uj
PCJh4m+gcHLiNasWucSL/y2oym7Px7DzmCibvT2pA0wa7zcjhIRc5ksnSDXfYafe
XrTeuy/6cP5Trep9jzDf4wnAWhRzLZzy0LGHGYsSd5//6n3qFn2XFNyy769qYLu6
8anCbpk40XNDLyEDlHB+lFCCe0KG/K5sg49CoxTsdLoiwyKqGpC7cjEQ15RoFtRQ
JEvVJKs36fcAYalkfa4+OWt5TeoTAm/kg1erz6SwnNiL9n4MQ+0hLjm0WtpEpJqG
V2XYi7tSIpfVFi+lvtxfoOGL+9nZpd6s6JarhdBPFFFang70I9wpXwVZDbSML89q
KYnx3XVTxBhV6sumlJQ40wBGAisXLfJ4VpS1uj5JIx01d36Lgv6z80i6CiHTnIvz
HFbm9XcS6pooPZOOxTrp
=LwYG
-----END PGP SIGNATURE-----

179
custom_derive/index.html Normal file
View file

@ -0,0 +1,179 @@
<!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 `custom_derive` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, custom_derive">
<title>custom_derive - 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'></p><script>window.sidebarCurrent = {name: 'custom_derive', ty: 'mod', relpath: '../'};</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 mod">
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>custom_derive</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-0' class='srclink' href='../src/custom_derive/lib.rs.html#10-437' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>This crate provides a macro that enables the use of custom <code>derive</code> attributes.</p>
<p>To use it, make sure you link to the crate like so:</p>
<pre class='rust rust-example-rendered'>
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span> <span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>custom_derive</span>;</pre>
<blockquote>
<p><strong>Note</strong>: the <code>custom_derive!</code> macro itself is not documented, as the automatic documentation for it would be uselessly huge and incomprehensible.</p>
</blockquote>
<h1 id='usage' class='section-header'><a href='#usage'>Usage</a></h1>
<p>The macro should be used to wrap an entire <em>single</em> <code>enum</code> or <code>struct</code> declaration, including its attributes (both <code>derive</code> and others). All derivation attributes which the macro does <em>not</em> recognise will be assumed to be custom, and treated accordingly.</p>
<p><code>custom_derive!</code> assumes that custom derivations are implemented as macros (of the same name). For example, here is a simple derivation macro:</p>
<pre class='rust rust-example-rendered'>
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span> <span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>custom_derive</span>;
<span class='kw'>trait</span> <span class='ident'>TypeName</span> {
<span class='kw'>fn</span> <span class='ident'>type_name</span>() <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;static</span> <span class='ident'>str</span>;
}
<span class='kw'>trait</span> <span class='ident'>ReprType</span> {
<span class='kw'>type</span> <span class='ident'>Repr</span>;
}
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>TypeName</span> {
(() $(<span class='kw'>pub</span>)<span class='op'>*</span> <span class='kw'>enum</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>tail</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { <span class='macro'>TypeName</span><span class='macro'>!</span> { @<span class='kw'>impl</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span> } };
(() $(<span class='kw'>pub</span>)<span class='op'>*</span> <span class='kw'>struct</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>tail</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> { <span class='macro'>TypeName</span><span class='macro'>!</span> { @<span class='kw'>impl</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span> } };
(@<span class='kw'>impl</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span>) <span class='op'>=&gt;</span> {
<span class='kw'>impl</span> <span class='ident'>TypeName</span> <span class='kw'>for</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span> {
<span class='kw'>fn</span> <span class='ident'>type_name</span>() <span class='op'>-&gt;</span> <span class='kw-2'>&amp;</span><span class='lifetime'>&#39;static</span> <span class='ident'>str</span> { <span class='macro'>stringify</span><span class='macro'>!</span>(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>) }
}
};
}
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>TryFrom</span> {
((<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>repr</span>:<span class='ident'>ty</span>) $(<span class='kw'>pub</span>)<span class='op'>*</span> <span class='kw'>enum</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span>:<span class='ident'>ident</span> $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>tail</span>:<span class='ident'>tt</span>)<span class='op'>*</span>) <span class='op'>=&gt;</span> {
<span class='kw'>impl</span> <span class='ident'>ReprType</span> <span class='kw'>for</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>name</span> {
<span class='kw'>type</span> <span class='ident'>Repr</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>repr</span>;
}
};
}
<span class='macro'>custom_derive</span><span class='macro'>!</span> {
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>dead_code</span>)]</span>
<span class='attribute'>#[<span class='ident'>repr</span>(<span class='ident'>u8</span>)]</span>
<span class='attribute'>#[<span class='ident'>derive</span>(<span class='ident'>Clone</span>, <span class='ident'>Copy</span>, <span class='ident'>Debug</span>, <span class='ident'>TryFrom</span>(<span class='ident'>u8</span>), <span class='ident'>TypeName</span>)]</span>
<span class='kw'>enum</span> <span class='ident'>Foo</span> { <span class='ident'>A</span>, <span class='ident'>B</span> }
}
<span class='kw'>fn</span> <span class='ident'>main</span>() {
<span class='kw'>let</span> <span class='ident'>foo</span> <span class='op'>=</span> <span class='ident'>Foo</span>::<span class='ident'>B</span>;
<span class='kw'>let</span> <span class='ident'>v</span> <span class='op'>=</span> <span class='ident'>foo</span> <span class='kw'>as</span> <span class='op'>&lt;</span><span class='ident'>Foo</span> <span class='kw'>as</span> <span class='ident'>ReprType</span><span class='op'>&gt;</span>::<span class='ident'>Repr</span>;
<span class='kw'>let</span> <span class='ident'>msg</span> <span class='op'>=</span> <span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>&quot;{}: {:?} ({:?})&quot;</span>, <span class='ident'>Foo</span>::<span class='ident'>type_name</span>(), <span class='ident'>foo</span>, <span class='ident'>v</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>msg</span>, <span class='string'>&quot;Foo: B (1)&quot;</span>);
}</pre>
<p>First, note that <code>custom_derive!</code> passes any arguments on the derivation attribute to the macro. In the case of attributes <em>without</em> any arguments, <code>()</code> is passed instead.</p>
<p>Secondly, the macro is passed the entire item, <em>sans</em> attributes. It is the derivation macro&#39;s job to parse the item correctly.</p>
<p>Third, each derivation macro is expected to result in zero or more items, not including the item itself. As a result, it is <em>not</em> possible to mutate the item in any way, or attach additional attributes to it.</p>
<p>Finally, <code>@impl</code> is merely a trick to pack multiple, different functions into a single macro. The sequence has no special meaning; it is simply <em>distinct</em> from the usual invocation syntax.</p>
</div></table></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 = "custom_derive";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -0,0 +1 @@
initSidebarItems({});

View file

@ -1,11 +0,0 @@
extern crate pumpkin;
use pumpkin::prime;
fn main() {
let p = prime::new(1024).unwrap();
let q = prime::new(1024).unwrap();
let n = p * q;
println!("The product of 'p' and 'q' is: {}", n);
}

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../hamming/fn.distance.html">
</head>
<body>
<p>Redirecting to <a href="../../hamming/fn.distance.html">../../hamming/fn.distance.html</a>...</p>
<script>location.replace("../../hamming/fn.distance.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../hamming/fn.distance_fast.html">
</head>
<body>
<p>Redirecting to <a href="../../hamming/fn.distance_fast.html">../../hamming/fn.distance_fast.html</a>...</p>
<script>location.replace("../../hamming/fn.distance_fast.html" + location.search + location.hash);</script>
</body>
</html>

View file

View file

@ -0,0 +1 @@
initSidebarItems({"fn":[["distance","Computes the bitwise Hamming distance between `x` and `y`, that is, the number of bits where `x` and `y` differ, or, the number of set bits in the xor of `x` and `y`."],["distance_fast","Computes the bitwise Hamming distance between `x` and `y`, that is, the number of bits where `x` and `y` differ, or, the number of set bits in the xor of `x` and `y`."]]});

200
hamming/fn.distance.html Normal file
View file

@ -0,0 +1,200 @@
<!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 `distance` fn in crate `hamming`.">
<meta name="keywords" content="rust, rustlang, rust-lang, distance">
<title>hamming::distance - 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'>hamming</a></p><script>window.sidebarCurrent = {name: 'distance', ty: 'fn', 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 fn">
<h1 class='fqn'><span class='in-band'>Function <a href='index.html'>hamming</a>::<wbr><a class='fn' href=''>distance</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-178' class='srclink' href='../src/hamming/distance_.rs.html#202-206' title='goto source code'>[src]</a></span></h1>
<pre class='rust fn'>pub fn distance(x: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</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.slice.html'>]</a>, y: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</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.slice.html'>]</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></pre><div class='docblock'><p>Computes the bitwise <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming
distance</a> between
<code>x</code> and <code>y</code>, that is, the number of bits where <code>x</code> and <code>y</code> differ,
or, the number of set bits in the xor of <code>x</code> and <code>y</code>.</p>
<p>When <code>x</code> and <code>y</code> have the same 8-byte alignment, this uses
<code>distance_fast</code>, a highly optimised version of the following naive
version:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>fn</span> <span class='ident'>naive</span>(<span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[<span class='ident'>u8</span>], <span class='ident'>y</span>: <span class='kw-2'>&amp;</span>[<span class='ident'>u8</span>]) <span class='op'>-&gt;</span> <span class='ident'>u64</span> {
<span class='ident'>x</span>.<span class='ident'>iter</span>().<span class='ident'>zip</span>(<span class='ident'>y</span>).<span class='ident'>fold</span>(<span class='number'>0</span>, <span class='op'>|</span><span class='ident'>a</span>, (<span class='ident'>b</span>, <span class='ident'>c</span>)<span class='op'>|</span> <span class='ident'>a</span> <span class='op'>+</span> (<span class='op'>*</span><span class='ident'>b</span> <span class='op'>^</span> <span class='op'>*</span><span class='ident'>c</span>).<span class='ident'>count_ones</span>() <span class='kw'>as</span> <span class='ident'>u64</span>)
}</pre>
<p>If alignments differ, a slower but less restrictive algorithm is
used.</p>
<p>It is essentially guaranteed that <code>x</code> and <code>y</code> will have the same
8-byte alignment if they are both just <code>Vec&lt;u8&gt;</code>s of non-trivial
length (e.g. larger than 8) as in the example below.</p>
<h1 id='panics' class='section-header'><a href='#panics'>Panics</a></h1>
<p><code>x</code> and <code>y</code> must have the same length, or else <code>distance</code> panics.</p>
<h1 id='performance-comparison' class='section-header'><a href='#performance-comparison'>Performance Comparison</a></h1>
<table>
<thead>
<tr>
<th style="text-align: right">length</th>
<th style="text-align: right"><code>naive</code> (ns)</th>
<th style="text-align: right"><code>distance</code> (ns)</th>
<th style="text-align: right"><code>naive</code>/<code>distance</code></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: right">1</td>
<td style="text-align: right">5</td>
<td style="text-align: right">6</td>
<td style="text-align: right">0.83</td>
</tr>
<tr>
<td style="text-align: right">10</td>
<td style="text-align: right">44</td>
<td style="text-align: right">45</td>
<td style="text-align: right">0.97</td>
</tr>
<tr>
<td style="text-align: right">100</td>
<td style="text-align: right">461</td>
<td style="text-align: right">473</td>
<td style="text-align: right">0.97</td>
</tr>
<tr>
<td style="text-align: right">1,000</td>
<td style="text-align: right">4,510</td>
<td style="text-align: right">397</td>
<td style="text-align: right">11</td>
</tr>
<tr>
<td style="text-align: right">10,000</td>
<td style="text-align: right">46,700</td>
<td style="text-align: right">2,740</td>
<td style="text-align: right">17</td>
</tr>
<tr>
<td style="text-align: right">100,000</td>
<td style="text-align: right">45,600</td>
<td style="text-align: right">20,400</td>
<td style="text-align: right">22</td>
</tr>
<tr>
<td style="text-align: right">1,000,000</td>
<td style="text-align: right">4,590,000</td>
<td style="text-align: right">196,000</td>
<td style="text-align: right">23</td>
</tr>
</tbody>
</table>
<p>The benchmarks ensured that <code>x</code> and <code>y</code> had the same alignment.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>x</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0xFF</span>; <span class='number'>1000</span>];
<span class='kw'>let</span> <span class='ident'>y</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>; <span class='number'>1000</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>distance</span>(<span class='kw-2'>&amp;</span><span class='ident'>x</span>, <span class='kw-2'>&amp;</span><span class='ident'>y</span>), <span class='number'>8</span> <span class='op'>*</span> <span class='number'>1000</span>);</pre>
</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 = "hamming";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -0,0 +1,207 @@
<!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 `distance_fast` fn in crate `hamming`.">
<meta name="keywords" content="rust, rustlang, rust-lang, distance_fast">
<title>hamming::distance_fast - 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'>hamming</a></p><script>window.sidebarCurrent = {name: 'distance_fast', ty: 'fn', 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 fn">
<h1 class='fqn'><span class='in-band'>Function <a href='index.html'>hamming</a>::<wbr><a class='fn' href=''>distance_fast</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-129' class='srclink' href='../src/hamming/distance_.rs.html#83-153' title='goto source code'>[src]</a></span></h1>
<pre class='rust fn'>pub fn distance_fast(x: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</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.slice.html'>]</a>, y: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</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.slice.html'>]</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, DistanceError&gt;</pre><div class='docblock'><p>Computes the bitwise <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming
distance</a> between
<code>x</code> and <code>y</code>, that is, the number of bits where <code>x</code> and <code>y</code> differ,
or, the number of set bits in the xor of <code>x</code> and <code>y</code>.</p>
<p>This is a highly optimised version of the following naive version:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>fn</span> <span class='ident'>naive</span>(<span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[<span class='ident'>u8</span>], <span class='ident'>y</span>: <span class='kw-2'>&amp;</span>[<span class='ident'>u8</span>]) <span class='op'>-&gt;</span> <span class='ident'>u64</span> {
<span class='ident'>x</span>.<span class='ident'>iter</span>().<span class='ident'>zip</span>(<span class='ident'>y</span>).<span class='ident'>fold</span>(<span class='number'>0</span>, <span class='op'>|</span><span class='ident'>a</span>, (<span class='ident'>b</span>, <span class='ident'>c</span>)<span class='op'>|</span> <span class='ident'>a</span> <span class='op'>+</span> (<span class='op'>*</span><span class='ident'>b</span> <span class='op'>^</span> <span class='op'>*</span><span class='ident'>c</span>).<span class='ident'>count_ones</span>() <span class='kw'>as</span> <span class='ident'>u64</span>)
}</pre>
<p>This function requires that <code>x</code> and <code>y</code> have the same 8-byte
alignment (that is, <code>x.as_ptr() as usize % 8 == y.as_ptr() as usize % 8</code>). If not, <code>Err</code> is returned. If sub-optimal performance
can be tolerated, consider using <code>distance</code> which incorporates a
fallback to a slower but less restrictive algorithm.</p>
<p>It is essentially guaranteed that <code>x</code> and <code>y</code> will have the same
8-byte alignment if they are both just <code>Vec&lt;u8&gt;</code>s of non-trivial
length (e.g. larger than 8) as in the example below.</p>
<p>This is implemented using the same tree-merging approach as
<code>weight</code>, see there for details.</p>
<h1 id='panics' class='section-header'><a href='#panics'>Panics</a></h1>
<p><code>x</code> and <code>y</code> must have the same length, or else <code>distance_fast</code> panics.</p>
<h1 id='performance-comparison' class='section-header'><a href='#performance-comparison'>Performance Comparison</a></h1>
<table>
<thead>
<tr>
<th style="text-align: right">length</th>
<th style="text-align: right"><code>naive</code> (ns)</th>
<th style="text-align: right"><code>distance_fast</code> (ns)</th>
<th style="text-align: right"><code>naive</code>/<code>distance_fast</code></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: right">1</td>
<td style="text-align: right">5</td>
<td style="text-align: right">6</td>
<td style="text-align: right">0.83</td>
</tr>
<tr>
<td style="text-align: right">10</td>
<td style="text-align: right">44</td>
<td style="text-align: right">45</td>
<td style="text-align: right">0.97</td>
</tr>
<tr>
<td style="text-align: right">100</td>
<td style="text-align: right">461</td>
<td style="text-align: right">473</td>
<td style="text-align: right">0.97</td>
</tr>
<tr>
<td style="text-align: right">1,000</td>
<td style="text-align: right">4,510</td>
<td style="text-align: right">397</td>
<td style="text-align: right">11</td>
</tr>
<tr>
<td style="text-align: right">10,000</td>
<td style="text-align: right">46,700</td>
<td style="text-align: right">2,740</td>
<td style="text-align: right">17</td>
</tr>
<tr>
<td style="text-align: right">100,000</td>
<td style="text-align: right">45,600</td>
<td style="text-align: right">20,400</td>
<td style="text-align: right">22</td>
</tr>
<tr>
<td style="text-align: right">1,000,000</td>
<td style="text-align: right">4,590,000</td>
<td style="text-align: right">196,000</td>
<td style="text-align: right">23</td>
</tr>
</tbody>
</table>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>x</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0xFF</span>; <span class='number'>1000</span>];
<span class='kw'>let</span> <span class='ident'>y</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0</span>; <span class='number'>1000</span>];
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>distance_fast</span>(<span class='kw-2'>&amp;</span><span class='ident'>x</span>, <span class='kw-2'>&amp;</span><span class='ident'>y</span>), <span class='prelude-val'>Ok</span>(<span class='number'>8</span> <span class='op'>*</span> <span class='number'>1000</span>));
<span class='comment'>// same alignment, but moderately complicated</span>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>distance_fast</span>(<span class='kw-2'>&amp;</span><span class='ident'>x</span>[<span class='number'>1</span>..<span class='number'>1000</span> <span class='op'>-</span> <span class='number'>8</span>], <span class='kw-2'>&amp;</span><span class='ident'>y</span>[<span class='number'>8</span> <span class='op'>+</span> <span class='number'>1</span>..]), <span class='prelude-val'>Ok</span>(<span class='number'>8</span> <span class='op'>*</span> (<span class='number'>1000</span> <span class='op'>-</span> <span class='number'>8</span> <span class='op'>-</span> <span class='number'>1</span>)));
<span class='comment'>// differing alignments</span>
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>distance_fast</span>(<span class='kw-2'>&amp;</span><span class='ident'>x</span>[<span class='number'>1</span>..], <span class='kw-2'>&amp;</span><span class='ident'>y</span>[..<span class='number'>999</span>]).<span class='ident'>is_err</span>());</pre>
</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 = "hamming";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

189
hamming/fn.weight.html Normal file
View file

@ -0,0 +1,189 @@
<!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 `weight` fn in crate `hamming`.">
<meta name="keywords" content="rust, rustlang, rust-lang, weight">
<title>hamming::weight - 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'>hamming</a></p><script>window.sidebarCurrent = {name: 'weight', ty: 'fn', 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 fn">
<h1 class='fqn'><span class='in-band'>Function <a href='index.html'>hamming</a>::<wbr><a class='fn' href=''>weight</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-12' class='srclink' href='../src/hamming/weight_.rs.html#41-94' title='goto source code'>[src]</a></span></h1>
<pre class='rust fn'>pub fn weight(x: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</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.slice.html'>]</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></pre><div class='docblock'><p>Computes the <a href="https://en.wikipedia.org/wiki/Hamming_weight">Hamming
weight</a> of <code>x</code>, that
is, the population count, or number of ones.</p>
<p>This is a highly optimised version of the following naive version:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>fn</span> <span class='ident'>naive</span>(<span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[<span class='ident'>u8</span>]) <span class='op'>-&gt;</span> <span class='ident'>u64</span> {
<span class='ident'>x</span>.<span class='ident'>iter</span>().<span class='ident'>fold</span>(<span class='number'>0</span>, <span class='op'>|</span><span class='ident'>a</span>, <span class='ident'>b</span><span class='op'>|</span> <span class='ident'>a</span> <span class='op'>+</span> <span class='ident'>b</span>.<span class='ident'>count_ones</span>() <span class='kw'>as</span> <span class='ident'>u64</span>)
}</pre>
<p>This uses Lauradoux Cédric&#39;s <a href="http://web.archive.org/web/20120411185540/http://perso.citi.insa-lyon.fr/claurado/hamming.html">tree-merging
approach</a>
(as implemented by Kim Walisch in
<a href="http://primesieve.org/">primesieve</a>) and achieves on the order of
1-2 cycles per byte.</p>
<h1 id='performance-comparison' class='section-header'><a href='#performance-comparison'>Performance Comparison</a></h1>
<table>
<thead>
<tr>
<th style="text-align: right">length</th>
<th style="text-align: right"><code>naive</code> (ns)</th>
<th style="text-align: right"><code>weight</code> (ns)</th>
<th style="text-align: right"><code>naive</code>/<code>weight</code></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: right">1</td>
<td style="text-align: right">5</td>
<td style="text-align: right">16</td>
<td style="text-align: right">0.31</td>
</tr>
<tr>
<td style="text-align: right">10</td>
<td style="text-align: right">29</td>
<td style="text-align: right">51</td>
<td style="text-align: right">0.56</td>
</tr>
<tr>
<td style="text-align: right">100</td>
<td style="text-align: right">284</td>
<td style="text-align: right">392</td>
<td style="text-align: right">0.72</td>
</tr>
<tr>
<td style="text-align: right">1,000</td>
<td style="text-align: right">2,780</td>
<td style="text-align: right">340</td>
<td style="text-align: right">8.2</td>
</tr>
<tr>
<td style="text-align: right">10,000</td>
<td style="text-align: right">27,700</td>
<td style="text-align: right">2,300</td>
<td style="text-align: right">12</td>
</tr>
<tr>
<td style="text-align: right">100,000</td>
<td style="text-align: right">276,000</td>
<td style="text-align: right">17,900</td>
<td style="text-align: right">15</td>
</tr>
<tr>
<td style="text-align: right">1,000,000</td>
<td style="text-align: right">2,770,000</td>
<td style="text-align: right">172,000</td>
<td style="text-align: right">16</td>
</tr>
</tbody>
</table>
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
<pre class='rust rust-example-rendered'>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>weight</span>(<span class='kw-2'>&amp;</span>[<span class='number'>1</span>, <span class='number'>0xFF</span>, <span class='number'>1</span>, <span class='number'>0xFF</span>]), <span class='number'>1</span> <span class='op'>+</span> <span class='number'>8</span> <span class='op'>+</span> <span class='number'>1</span> <span class='op'>+</span> <span class='number'>8</span>);</pre>
</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 = "hamming";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

156
hamming/index.html Normal file
View file

@ -0,0 +1,156 @@
<!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 `hamming` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, hamming">
<title>hamming - 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'></p><script>window.sidebarCurrent = {name: 'hamming', ty: 'mod', relpath: '../'};</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 mod">
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>hamming</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-0' class='srclink' href='../src/hamming/lib.rs.html#1-29' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>A crate to count ones and xor bytes, fast (aka popcount, hamming
weight and hamming distance).</p>
<h1 id='installation' class='section-header'><a href='#installation'>Installation</a></h1>
<p>Add this to your <code>Cargo.toml</code>:</p>
<pre><code class="language-toml">[dependencies]
hamming = &quot;0.1&quot;
</code></pre>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>weight</span>(<span class='kw-2'>&amp;</span>[<span class='number'>1</span>, <span class='number'>0xFF</span>, <span class='number'>1</span>, <span class='number'>0xFF</span>]), <span class='number'>1</span> <span class='op'>+</span> <span class='number'>8</span> <span class='op'>+</span> <span class='number'>1</span> <span class='op'>+</span> <span class='number'>8</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>hamming</span>::<span class='ident'>distance</span>(<span class='kw-2'>&amp;</span>[<span class='number'>1</span>, <span class='number'>0xFF</span>], <span class='kw-2'>&amp;</span>[<span class='number'>0xFF</span>, <span class='number'>1</span>]), <span class='number'>7</span> <span class='op'>+</span> <span class='number'>7</span>);</pre>
</div><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table>
<tr class=' module-item'>
<td><a class='fn' href='fn.distance.html'
title='hamming::distance'>distance</a></td>
<td class='docblock short'>
<p>Computes the bitwise <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming
distance</a> between
<code>x</code> and <code>y</code>, that is, the number of bits where <code>x</code> and <code>y</code> differ,
or, the number of set bits in the xor of <code>x</code> and <code>y</code>.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='fn' href='fn.distance_fast.html'
title='hamming::distance_fast'>distance_fast</a></td>
<td class='docblock short'>
<p>Computes the bitwise <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming
distance</a> between
<code>x</code> and <code>y</code>, that is, the number of bits where <code>x</code> and <code>y</code> differ,
or, the number of set bits in the xor of <code>x</code> and <code>y</code>.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='fn' href='fn.weight.html'
title='hamming::weight'>weight</a></td>
<td class='docblock short'>
<p>Computes the <a href="https://en.wikipedia.org/wiki/Hamming_weight">Hamming
weight</a> of <code>x</code>, that
is, the population count, or number of ones.</p>
</td>
</tr></table></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 = "hamming";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

1
hamming/sidebar-items.js Normal file
View file

@ -0,0 +1 @@
initSidebarItems({"fn":[["distance","Computes the bitwise Hamming distance between `x` and `y`, that is, the number of bits where `x` and `y` differ, or, the number of set bits in the xor of `x` and `y`."],["distance_fast","Computes the bitwise Hamming distance between `x` and `y`, that is, the number of bits where `x` and `y` differ, or, the number of set bits in the xor of `x` and `y`."],["weight","Computes the Hamming weight of `x`, that is, the population count, or number of ones."]]});

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../hamming/fn.weight.html">
</head>
<body>
<p>Redirecting to <a href="../../hamming/fn.weight.html">../../hamming/fn.weight.html</a>...</p>
<script>location.replace("../../hamming/fn.weight.html" + location.search + location.hash);</script>
</body>
</html>

View file

View file

@ -0,0 +1 @@
initSidebarItems({"fn":[["weight","Computes the Hamming weight of `x`, that is, the population count, or number of ones."]]});

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["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/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","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>","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.LimbsMut.html' title='ramp::ll::limb_ptr::LimbsMut'>LimbsMut</a>","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/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["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/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","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>","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.LimbsMut.html' title='ramp::ll::limb_ptr::LimbsMut'>LimbsMut</a>","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/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","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>","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.LimbsMut.html' title='ramp::ll::limb_ptr::LimbsMut'>LimbsMut</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["rand"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='rand/reseeding/struct.ReseedWithDefault.html' title='rand::reseeding::ReseedWithDefault'>ReseedWithDefault</a>",];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors['pumpkin'] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html' title='core::fmt::Binary'>Binary</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html' title='core::fmt::Binary'>Binary</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];implementors["pumpkin"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html' title='core::fmt::Binary'>Binary</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors['pumpkin'] = ["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='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];implementors["libc"] = [];implementors["ramp"] = ["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/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","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>","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/int/struct.Int.html' title='ramp::int::Int'>Int</a>","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/int/struct.ParseIntError.html' title='ramp::int::ParseIntError'>ParseIntError</a>",];implementors["pumpkin"] = ["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='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors['pumpkin'] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='ramp/int/struct.ParseIntError.html' title='ramp::int::ParseIntError'>ParseIntError</a>",];implementors["pumpkin"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors['pumpkin'] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html' title='core::fmt::LowerHex'>LowerHex</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html' title='core::fmt::LowerHex'>LowerHex</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];implementors["pumpkin"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html' title='core::fmt::LowerHex'>LowerHex</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors['pumpkin'] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html' title='core::fmt::Octal'>Octal</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html' title='core::fmt::Octal'>Octal</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];implementors["pumpkin"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html' title='core::fmt::Octal'>Octal</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors['pumpkin'] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html' title='core::fmt::UpperHex'>UpperHex</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html' title='core::fmt::UpperHex'>UpperHex</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];implementors["pumpkin"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html' title='core::fmt::UpperHex'>UpperHex</a> for <a class='struct' href='pumpkin/struct.Prime.html' title='pumpkin::Prime'>Prime</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["rand"] = ["impl&lt;'a, T: <a class='trait' href='rand/trait.Rand.html' title='rand::Rand'>Rand</a>, R: <a class='trait' href='rand/trait.Rng.html' title='rand::Rng'>Rng</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html' title='core::iter::iterator::Iterator'>Iterator</a> for <a class='struct' href='rand/struct.Generator.html' title='rand::Generator'>Generator</a>&lt;'a, T, R&gt;","impl&lt;'a, R: <a class='trait' href='rand/trait.Rng.html' title='rand::Rng'>Rng</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html' title='core::iter::iterator::Iterator'>Iterator</a> for <a class='struct' href='rand/struct.AsciiGenerator.html' title='rand::AsciiGenerator'>AsciiGenerator</a>&lt;'a, R&gt;",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/range/trait.Step.html' title='core::iter::range::Step'>Step</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;&amp;'a <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.AddAssign.html' title='core::ops::AddAssign'>AddAssign</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a>&lt;&amp;'a <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAndAssign.html' title='core::ops::BitAndAssign'>BitAndAssign</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a>&lt;&amp;'a <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOrAssign.html' title='core::ops::BitOrAssign'>BitOrAssign</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a>&lt;&amp;'a <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXorAssign.html' title='core::ops::BitXorAssign'>BitXorAssign</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["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>","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.LimbsMut.html' title='ramp::ll::limb_ptr::LimbsMut'>LimbsMut</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DerefMut.html' title='core::ops::DerefMut'>DerefMut</a> for <a class='struct' href='ramp/ll/limb_ptr/struct.LimbsMut.html' title='ramp::ll::limb_ptr::LimbsMut'>LimbsMut</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;&amp;'a <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.DivAssign.html' title='core::ops::DivAssign'>DivAssign</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
(function() {var implementors = {};
implementors["libc"] = [];implementors["ramp"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='struct' href='ramp/ll/limb/struct.Limb.html' title='ramp::ll::limb::Limb'>Limb</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl&lt;'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;&amp;'a <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.MulAssign.html' title='core::ops::MulAssign'>MulAssign</a>&lt;<a class='type' href='ramp/ll/limb/type.BaseInt.html' title='ramp::ll::limb::BaseInt'>BaseInt</a>&gt; for <a class='struct' href='ramp/int/struct.Int.html' title='ramp::int::Int'>Int</a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()

Some files were not shown because too many files have changed in this diff Show more