Compare commits

...

848 commits

Author SHA1 Message Date
dependabot[bot]
0466546981
chore(deps): bump the rust-dependencies group with 2 updates (#818)
Some checks failed
docker / build (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 17:18:56 +00:00
Alejandro González
4e80dd009a
ci: cherry-pick changes from PR #815
That PR got hard to review and confidently merge, so I'm cherry-picking
some of the good ideas from it in a format that feels more comfortable
to me. Thanks @vlakoff for the original PR!

Co-authored-by: vlakoff <544424+vlakoff@users.noreply.github.com>
2026-05-08 23:37:53 +02:00
dependabot[bot]
028294cc8c
chore(deps): bump dawidd6/action-download-artifact from 20 to 21 (#816)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-08 20:25:30 +00:00
andrews05
628e241e23
v10.1.1 (#813)
Some checks failed
docker / build (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
deploy / Deploy release (push) Has been cancelled
2026-04-22 20:29:48 +00:00
vlakoff
e167b04b85
Warn when Zopfli --ziwi exceeds --zi (#812) 2026-04-20 02:48:32 +00:00
dependabot[bot]
fbae35922d
chore(deps): bump dawidd6/action-download-artifact from 19 to 20 (#808)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 18:49:43 +00:00
dependabot[bot]
55b9758575
chore(deps): bump indexmap from 2.13.0 to 2.13.1 in the rust-dependencies group (#809)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 18:49:21 +00:00
dependabot[bot]
010b76eada
chore(deps): bump softprops/action-gh-release from 2 to 3 (#811)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 18:48:59 +00:00
AFCMS
d239592b58
Migrate Docker CI to newer docker/github-builder (#810) 2026-04-15 18:46:51 +00:00
andrews05
0cf8b782ff
Use build-std to reduce binary size (#807) 2026-04-06 21:18:00 +00:00
andrews05
25e147f6a0
Prevent conversion to indexed when palette reduction is off (#802) 2026-04-06 21:14:22 +00:00
andrews05
a75343800c
Increase icc decompression buffer size (#803) 2026-04-06 20:50:47 +00:00
andrews05
7d52fd66d0
Improve bigrams performance (#804) 2026-03-31 15:57:18 +00:00
dependabot[bot]
5bbd826ae3
chore(deps): bump the rust-dependencies group with 2 updates (#805)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 12:39:01 +00:00
dependabot[bot]
e4a7d0fd99
chore(deps): bump clap from 4.5.60 to 4.6.0 in the rust-dependencies group (#797)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 15:56:34 +00:00
dependabot[bot]
a1a18ffd21
chore(deps): bump dawidd6/action-download-artifact from 16 to 19 (#800)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 11:13:31 +00:00
dependabot[bot]
587fd03d0e
chore(deps): bump docker/setup-buildx-action from 3 to 4 (#795)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 23:42:42 +00:00
dependabot[bot]
ce52ab8748
chore(deps): bump docker/metadata-action from 5 to 6 (#794)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 23:42:28 +00:00
dependabot[bot]
494edba245
chore(deps): bump docker/login-action from 3 to 4 (#793)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 23:42:18 +00:00
dependabot[bot]
2e861b95db
chore(deps): bump docker/setup-qemu-action from 3 to 4 (#792)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 23:42:08 +00:00
dependabot[bot]
7834e4709e
chore(deps): bump docker/build-push-action from 6 to 7 (#791)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 23:41:42 +00:00
dependabot[bot]
8284676f50
chore(deps): bump rgb from 0.8.52 to 0.8.53 in the rust-dependencies group (#789)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandro González <me@alegon.dev>
2026-03-03 20:33:52 +00:00
dependabot[bot]
2a79fa4c6c
chore(deps): bump dawidd6/action-download-artifact from 15 to 16 (#788)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 19:19:33 +00:00
dependabot[bot]
00b9e33508
chore(deps): bump actions/upload-artifact from 6 to 7 (#787)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 16:15:36 +00:00
dependabot[bot]
2585529089
chore(deps): bump actions/attest-build-provenance from 3 to 4 (#786)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 16:14:54 +00:00
Demetris
6a99181fec
Make five small changes to the updated README.md (#785) 2026-02-26 20:59:09 +00:00
dependabot[bot]
ea9caac249
chore(deps): bump dawidd6/action-download-artifact from 14 to 15 (#779)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 16:51:30 +00:00
dependabot[bot]
764d057c32
chore(deps): bump clap from 4.5.58 to 4.5.60 in the rust-dependencies group (#780)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 16:51:09 +00:00
andrews05
4a537c087d
Update Readme (#767) 2026-02-22 13:39:54 +00:00
Jakub Onderka
015d31e6a1
Remove crossbeam-channel dependency (#777) 2026-02-22 13:37:38 +00:00
dependabot[bot]
854510a864
chore(deps): bump the rust-dependencies group with 2 updates (#776)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 15:27:09 +00:00
dependabot[bot]
8466e390b8
chore(deps): bump the rust-dependencies group with 2 updates (#774)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 23:10:41 +00:00
dependabot[bot]
baaafee4e4
chore(deps): bump clap from 4.5.54 to 4.5.56 in the rust-dependencies group (#772)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 13:04:45 +00:00
dependabot[bot]
9169f99674
chore(deps): bump dawidd6/action-download-artifact from 12 to 14 (#771)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 13:04:16 +00:00
dependabot[bot]
47d5628a68
chore(deps): bump serde_json from 1.0.147 to 1.0.149 in the rust-dependencies group (#770)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 21:15:59 +00:00
andrews05
d54e7c04ea
v10.1 (#769)
Some checks failed
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
docker / build (push) Has been cancelled
deploy / Deploy release (push) Has been cancelled
2026-01-25 21:45:00 +00:00
andrews05
ff168f5d2d
Add json output option (#761) 2026-01-24 11:35:55 +00:00
andrews05
a8edb2871c
Show summary of results (#758) 2026-01-20 20:55:26 +00:00
andrews05
d48b147b3d
Tweak output when not optimised (#765) 2026-01-12 18:48:10 +00:00
dependabot[bot]
155eeb3637
chore(deps): bump dawidd6/action-download-artifact from 11 to 12 (#760)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 18:41:12 +00:00
dependabot[bot]
8665b2da8c
chore(deps): bump the rust-dependencies group across 1 directory with 2 updates (#768)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 18:40:20 +00:00
andrews05
e5e1568196
Rework preserving attributes (#759) 2026-01-12 19:11:45 +01:00
dependabot[bot]
8754013cbc
chore(deps): bump actions/upload-artifact from 5 to 6 (#756)
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>v6 - What's new</h2>
<blockquote>
<p>[!IMPORTANT]
actions/upload-artifact@v6 now runs on Node.js 24 (<code>runs.using:
node24</code>) and requires a minimum Actions Runner version of 2.327.1.
If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<h3>Node.js 24</h3>
<p>This release updates the runtime to Node.js 24. v5 had preliminary
support for Node.js 24, however this action was by default still running
on Node.js 20. Now this action by default will run on Node.js 24.</p>
<h2>What's Changed</h2>
<ul>
<li>Upload Artifact Node 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/719">actions/upload-artifact#719</a></li>
<li>fix: update <code>@​actions/artifact</code> for Node.js 24 punycode
deprecation by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/744">actions/upload-artifact#744</a></li>
<li>prepare release v6.0.0 for Node.js 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/745">actions/upload-artifact#745</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0">https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b7c566a772"><code>b7c566a</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/745">#745</a>
from actions/upload-artifact-v6-release</li>
<li><a
href="e516bc8500"><code>e516bc8</code></a>
docs: correct description of Node.js 24 support in README</li>
<li><a
href="ddc45ed9bc"><code>ddc45ed</code></a>
docs: update README to correct action name for Node.js 24 support</li>
<li><a
href="615b319bd2"><code>615b319</code></a>
chore: release v6.0.0 for Node.js 24 support</li>
<li><a
href="017748b48f"><code>017748b</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/744">#744</a>
from actions/fix-storage-blob</li>
<li><a
href="38d4c7997f"><code>38d4c79</code></a>
chore: rebuild dist</li>
<li><a
href="7d27270e0c"><code>7d27270</code></a>
chore: add missing license cache files for <code>@​actions/core</code>,
<code>@​actions/io</code>, and mi...</li>
<li><a
href="5f643d3c94"><code>5f643d3</code></a>
chore: update license files for <code>@​actions/artifact</code><a
href="https://github.com/5"><code>@​5</code></a>.0.1 dependencies</li>
<li><a
href="1df1684032"><code>1df1684</code></a>
chore: update package-lock.json with <code>@​actions/artifact</code><a
href="https://github.com/5"><code>@​5</code></a>.0.1</li>
<li><a
href="b5b1a91840"><code>b5b1a91</code></a>
fix: update <code>@​actions/artifact</code> to ^5.0.0 for Node.js 24
punycode fix</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 00:58:13 +01:00
dependabot[bot]
a0f4e751bf
chore(deps): bump log from 0.4.28 to 0.4.29 in the rust-dependencies group (#751)
Bumps the rust-dependencies group with 1 update:
[log](https://github.com/rust-lang/log).

Updates `log` from 0.4.28 to 0.4.29
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/log/releases">log's
releases</a>.</em></p>
<blockquote>
<h2>0.4.29</h2>
<h2>MSRV</h2>
<p>This release increases <code>log</code>'s MSRV from
<code>1.61.0</code> to <code>1.68.0</code>.</p>
<h2>What's Changed</h2>
<ul>
<li>docs: Add missing impls from README.md by <a
href="https://github.com/AldaronLau"><code>@​AldaronLau</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/703">rust-lang/log#703</a></li>
<li>Point to new URLs for favicon and logo by <a
href="https://github.com/AldaronLau"><code>@​AldaronLau</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/704">rust-lang/log#704</a></li>
<li>perf: reduce llvm-lines of FromStr for <code>Level</code> and
<code>LevelFilter</code> by <a
href="https://github.com/dishmaker"><code>@​dishmaker</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/709">rust-lang/log#709</a></li>
<li>Replace serde with serde_core by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/712">rust-lang/log#712</a></li>
<li>Fix clippy lints by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/713">rust-lang/log#713</a></li>
<li>Use GitHub Actions to install Rust and cargo-hack by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/715">rust-lang/log#715</a></li>
<li>Exclude old unstable_kv features from testing matrix by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/716">rust-lang/log#716</a></li>
<li>Fix up CI by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/718">rust-lang/log#718</a></li>
<li>Prepare for 0.4.29 release by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/719">rust-lang/log#719</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/AldaronLau"><code>@​AldaronLau</code></a> made
their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/703">rust-lang/log#703</a></li>
<li><a href="https://github.com/dishmaker"><code>@​dishmaker</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/709">rust-lang/log#709</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rust-lang/log/compare/0.4.28...0.4.29">https://github.com/rust-lang/log/compare/0.4.28...0.4.29</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/log/blob/master/CHANGELOG.md">log's
changelog</a>.</em></p>
<blockquote>
<h2>[0.4.29] - 2025-12-02</h2>
<h2>What's Changed</h2>
<ul>
<li>perf: reduce llvm-lines of FromStr for <code>Level</code> and
<code>LevelFilter</code> by <a
href="https://github.com/dishmaker"><code>@​dishmaker</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/709">rust-lang/log#709</a></li>
<li>Replace serde with serde_core by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/712">rust-lang/log#712</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/AldaronLau"><code>@​AldaronLau</code></a> made
their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/703">rust-lang/log#703</a></li>
<li><a href="https://github.com/dishmaker"><code>@​dishmaker</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/709">rust-lang/log#709</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rust-lang/log/compare/0.4.28...0.4.29">https://github.com/rust-lang/log/compare/0.4.28...0.4.29</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1e2df7bce"><code>b1e2df7</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/719">#719</a>
from rust-lang/cargo/0.4.29</li>
<li><a
href="3fe1a546dc"><code>3fe1a54</code></a>
prepare for 0.4.29 release</li>
<li><a
href="7a432d9ab5"><code>7a432d9</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/718">#718</a>
from rust-lang/ci/msrv</li>
<li><a
href="0689d56847"><code>0689d56</code></a>
rebump msrv to 1.68.0</li>
<li><a
href="46b448e2a7"><code>46b448e</code></a>
try drop msrv back to 1.61.0</li>
<li><a
href="929ab3812e"><code>929ab38</code></a>
fix up doc test feature gate</li>
<li><a
href="957cece478"><code>957cece</code></a>
bump serde-dependent crates</li>
<li><a
href="bea40c847c"><code>bea40c8</code></a>
bump msrv to 1.68.0</li>
<li><a
href="c540184ee9"><code>c540184</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/716">#716</a>
from rust-lang/ci-smaller-matrix2</li>
<li><a
href="c971e636c4"><code>c971e63</code></a>
Merge branch 'master' into ci-smaller-matrix2</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/log/compare/0.4.28...0.4.29">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=log&package-manager=cargo&previous-version=0.4.28&new-version=0.4.29)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 00:50:59 +01:00
andrews05
fa2c69071c
Ensure evaluator returns no result when all candidates are too large (#754)
There was a small crack in the fast evaluation logic where a phase 2
candidate's IDAT could be compressed below the best size from phase 1,
but the estimated output size (which includes chunks like PLTE) was
above. This candidate could end up getting returned from the evaluator
if no other filter actually did compress better, and would then be used
for the final compression even though the phase 1 candidate was actually
better.

The issue could potentially affect small, indexed images in `--fast`
mode (o2 and below).

Fixes #753.
2025-12-18 00:22:36 +01:00
Luracasmus
f99ce277da
Use PngResult where applicable (#752) 2025-12-11 11:34:46 +13:00
Luracasmus
0b68c08852
Use extend_from_slice in fctl_data & output 2025-12-11 10:52:10 +13:00
andrews05
58eec39cc8
v10 (#748)
Some checks failed
deploy / Deploy release (push) Has been cancelled
docker / build (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
2025-12-06 23:04:29 +01:00
Filip Czaplicki
6a2379ce78
Add colors to --help/-h (#745)
~I used [clap-cargo](https://github.com/crate-ci/clap-cargo) as it's
easy to use and provides sensible default styles.~
User can disable colors via `NO_COLOR=1` environment variable

Output of `oxipng --help`:
| before | after | `NO_COLOR=1` |
| - | - | - |
| <img width="1836" height="3667" alt="oxipng-before"
src="https://github.com/user-attachments/assets/c23ac0ac-6333-4944-8f8f-9e3ae05d6c4c"
/> | <img width="1836" height="3667" alt="oxipng-colors"
src="https://github.com/user-attachments/assets/a4ee13d1-5920-4253-acf6-23481ac1c80f"
/> | <img width="1836" height="3667" alt="oxipng-no-color"
src="https://github.com/user-attachments/assets/4143bdd5-019f-4b2e-b93a-a176b58f3f54"
/> |
2025-12-06 16:42:41 +01:00
Luracasmus
33cea5603e
Apply some Clippy lints (#744)
Let me know if I should add these to the `Cargo.toml`.

All `cargo test` tests pass on the latest x86_64-unknown-linux-gnu
nightly.

---------

Co-authored-by: Alejandro González <me@alegon.dev>
2025-12-06 16:06:35 +01:00
dependabot[bot]
285b0aae10 chore(deps): bump the rust-dependencies group with 2 updates
Bumps the rust-dependencies group with 2 updates: [indexmap](https://github.com/indexmap-rs/indexmap) and [clap](https://github.com/clap-rs/clap).


Updates `indexmap` from 2.12.0 to 2.12.1
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.12.0...2.12.1)

Updates `clap` from 4.5.51 to 4.5.53
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.51...clap_complete-v4.5.53)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-version: 2.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: clap
  dependency-version: 4.5.53
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 21:10:35 +13:00
dependabot[bot]
e868af9106 chore(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 20:57:40 +13:00
dependabot[bot]
1a9e0d79e5
chore(deps): bump image from 0.25.8 to 0.25.9 in the rust-dependencies group (#743)
Bumps the rust-dependencies group with 1 update:
[image](https://github.com/image-rs/image).

Updates `image` from 0.25.8 to 0.25.9
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/image-rs/image/blob/main/CHANGES.md">image's
changelog</a>.</em></p>
<blockquote>
<h3>Version 0.25.9</h3>
<p>Features:</p>
<ul>
<li>Support extracting XMP metadata from PNG, JPEG, GIF, WebP and TIFF
files (<a
href="https://redirect.github.com/image-rs/image/issues/2567">#2567</a>,
<a
href="https://redirect.github.com/image-rs/image/issues/2634">#2634</a>,
<a
href="https://redirect.github.com/image-rs/image/issues/2644">#2644</a>)</li>
<li>Support reading IPTC metadata from PNG and JPG files (<a
href="https://redirect.github.com/image-rs/image/issues/2611">#2611</a>)</li>
<li>Support reading ICC profile from GIF files (<a
href="https://redirect.github.com/image-rs/image/issues/2644">#2644</a>)</li>
<li>Allow setting a specific DEFLATE compression level when writing PNG
(<a
href="https://redirect.github.com/image-rs/image/issues/2583">#2583</a>)</li>
<li>Initial support for 16-bit CMYK TIFF files (<a
href="https://redirect.github.com/image-rs/image/issues/2588">#2588</a>)</li>
<li>Allow extracting the alpha channel of a <code>Pixel</code> in a
generic way (<a
href="https://redirect.github.com/image-rs/image/issues/2638">#2638</a>)</li>
</ul>
<p>Structural changes:</p>
<ul>
<li>EXR format decoding now only uses multi-threading via Rayon when the
<code>rayon</code> feature is enabled (<a
href="https://redirect.github.com/image-rs/image/issues/2643">#2643</a>)</li>
<li>Upgraded zune-jpeg to 0.5.x, ravif to 0.12.x, gif to 0.14.x</li>
<li>pnm: parse integers in PBM/PGM/PPM headers without allocations (<a
href="https://redirect.github.com/image-rs/image/issues/2620">#2620</a>)</li>
<li>Replace <code>doc_auto_cfg</code> with <code>doc_cfg</code> (<a
href="https://redirect.github.com/image-rs/image/issues/2637">#2637</a>)</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li>Do not encode empty JPEG images (<a
href="https://redirect.github.com/image-rs/image/issues/2624">#2624</a>)</li>
<li>tga: reject empty images (<a
href="https://redirect.github.com/image-rs/image/issues/2614">#2614</a>)</li>
<li>tga: fix orientation flip for color mapped images (<a
href="https://redirect.github.com/image-rs/image/issues/2607">#2607</a>)</li>
<li>tga: adjust colormap lookup to match tga 2.0 spec (<a
href="https://redirect.github.com/image-rs/image/issues/2608">#2608</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5ceb6af6c2"><code>5ceb6af</code></a>
Merge pull request <a
href="https://redirect.github.com/image-rs/image/issues/2640">#2640</a>
from Shnatsel/release-v0.25.9</li>
<li><a
href="282d7b345c"><code>282d7b3</code></a>
Merge pull request <a
href="https://redirect.github.com/image-rs/image/issues/2646">#2646</a>
from oligamiq/main</li>
<li><a
href="5412aeee5a"><code>5412aee</code></a>
Amend the note in accordance with the advice of 197g.</li>
<li><a
href="4e8a4ed2e8"><code>4e8a4ed</code></a>
Clarify default features in README and add usage note</li>
<li><a
href="ca8fa528ff"><code>ca8fa52</code></a>
Merge pull request <a
href="https://redirect.github.com/image-rs/image/issues/2644">#2644</a>
from image-rs/gif-0.14</li>
<li><a
href="d9bc8fe790"><code>d9bc8fe</code></a>
mention GIF 0.14 changes</li>
<li><a
href="053220a0b1"><code>053220a</code></a>
Provide gif's XMP and ICC metadata</li>
<li><a
href="2ec20b3b3b"><code>2ec20b3</code></a>
Prepare codec with gif@0.14</li>
<li><a
href="31939facce"><code>31939fa</code></a>
Mention EXR rayon change</li>
<li><a
href="c7f68be265"><code>c7f68be</code></a>
Merge pull request <a
href="https://redirect.github.com/image-rs/image/issues/2643">#2643</a>
from Shnatsel/really-optional-rayon</li>
<li>Additional commits viewable in <a
href="https://github.com/image-rs/image/compare/v0.25.8...v0.25.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=image&package-manager=cargo&previous-version=0.25.8&new-version=0.25.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 20:25:40 +01:00
andrews05
cb132b1cc4
Always remove iDOT (#741)
Closes #740
2025-11-20 20:04:58 +01:00
dependabot[bot]
99eccf3f30
chore(deps): bump actions/upload-artifact from 4 to 5 (#737)
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<p><strong>BREAKING CHANGE:</strong> this update supports Node
<code>v24.x</code>. This is not a breaking change per-se but we're
treating it as such.</p>
<ul>
<li>Update README.md by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/712">actions/upload-artifact#712</a></li>
<li>Readme: spell out the first use of GHES by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/727">actions/upload-artifact#727</a></li>
<li>Update GHES guidance to include reference to Node 20 version by <a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
in <a
href="https://redirect.github.com/actions/upload-artifact/pull/725">actions/upload-artifact#725</a></li>
<li>Bump <code>@actions/artifact</code> to <code>v4.0.0</code></li>
<li>Prepare <code>v5.0.0</code> by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/734">actions/upload-artifact#734</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/712">actions/upload-artifact#712</a></li>
<li><a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/727">actions/upload-artifact#727</a></li>
<li><a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/725">actions/upload-artifact#725</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v5.0.0">https://github.com/actions/upload-artifact/compare/v4...v5.0.0</a></p>
<h2>v4.6.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use artifact 2.3.2 package &amp; prepare for new
upload-artifact release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/685">actions/upload-artifact#685</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/685">actions/upload-artifact#685</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.2">https://github.com/actions/upload-artifact/compare/v4...v4.6.2</a></p>
<h2>v4.6.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use artifact 2.2.2 package by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/673">actions/upload-artifact#673</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.1">https://github.com/actions/upload-artifact/compare/v4...v4.6.1</a></p>
<h2>v4.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Expose env vars to control concurrency and timeout by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/662">actions/upload-artifact#662</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.0">https://github.com/actions/upload-artifact/compare/v4...v4.6.0</a></p>
<h2>v4.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: deprecated <code>Node.js</code> version in action by <a
href="https://github.com/hamirmahal"><code>@​hamirmahal</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/578">actions/upload-artifact#578</a></li>
<li>Add new <code>artifact-digest</code> output by <a
href="https://github.com/bdehamer"><code>@​bdehamer</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/656">actions/upload-artifact#656</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/hamirmahal"><code>@​hamirmahal</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/578">actions/upload-artifact#578</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="330a01c490"><code>330a01c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/734">#734</a>
from actions/danwkennedy/prepare-5.0.0</li>
<li><a
href="03f2824452"><code>03f2824</code></a>
Update <code>github.dep.yml</code></li>
<li><a
href="905a1ecb59"><code>905a1ec</code></a>
Prepare <code>v5.0.0</code></li>
<li><a
href="2d9f9cdfa9"><code>2d9f9cd</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/725">#725</a>
from patrikpolyak/patch-1</li>
<li><a
href="9687587dec"><code>9687587</code></a>
Merge branch 'main' into patch-1</li>
<li><a
href="2848b2cda0"><code>2848b2c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/727">#727</a>
from danwkennedy/patch-1</li>
<li><a
href="9b511775fd"><code>9b51177</code></a>
Spell out the first use of GHES</li>
<li><a
href="cd231ca1ed"><code>cd231ca</code></a>
Update GHES guidance to include reference to Node 20 version</li>
<li><a
href="de65e23aa2"><code>de65e23</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/712">#712</a>
from actions/nebuk89-patch-1</li>
<li><a
href="8747d8cd76"><code>8747d8c</code></a>
Update README.md</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 18:16:12 +01:00
dependabot[bot]
fb9be2f5d2
chore(deps): bump the rust-dependencies group across 1 directory with 4 updates (#738)
Bumps the rust-dependencies group with 4 updates in the / directory:
[zopfli](https://github.com/zopfli-rs/zopfli),
[indexmap](https://github.com/indexmap-rs/indexmap),
[libdeflater](https://github.com/libdeflater/libdeflater) and
[clap](https://github.com/clap-rs/clap).

Updates `zopfli` from 0.8.2 to 0.8.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zopfli-rs/zopfli/releases">zopfli's
releases</a>.</em></p>
<blockquote>
<h2>v0.8.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Add DeflateEncoder::get_ref/get_mut by <a
href="https://github.com/roblabla"><code>@​roblabla</code></a> in <a
href="https://redirect.github.com/zopfli-rs/zopfli/pull/69">zopfli-rs/zopfli#69</a>.</li>
<li>Updated dependencies.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/roblabla"><code>@​roblabla</code></a>
made their first contribution in <a
href="https://redirect.github.com/zopfli-rs/zopfli/pull/69">zopfli-rs/zopfli#69</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/zopfli-rs/zopfli/compare/v0.8.2...v0.8.3">https://github.com/zopfli-rs/zopfli/compare/v0.8.2...v0.8.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="91a34e5d2c"><code>91a34e5</code></a>
Bump Zopfli version to 0.8.3 🎉</li>
<li><a
href="684d9da6bd"><code>684d9da</code></a>
docs: better describe what the nightly feature does</li>
<li><a
href="5b539d0df1"><code>5b539d0</code></a>
chore: update dependencies</li>
<li><a
href="8106f7e415"><code>8106f7e</code></a>
Add DeflateEncoder::get_ref/get_mut (<a
href="https://redirect.github.com/zopfli-rs/zopfli/issues/69">#69</a>)</li>
<li><a
href="c6c7a42fc3"><code>c6c7a42</code></a>
chore(deps): update actions/checkout action to v5 (<a
href="https://redirect.github.com/zopfli-rs/zopfli/issues/68">#68</a>)</li>
<li><a
href="0b5a4c92de"><code>0b5a4c9</code></a>
chore: remove dependency on removed nightly feature</li>
<li><a
href="aacd1aabf8"><code>aacd1aa</code></a>
chore: fix new Clippy lint</li>
<li><a
href="1652084abb"><code>1652084</code></a>
chore: update dependencies</li>
<li><a
href="b8d149ab75"><code>b8d149a</code></a>
ci: drop usage of <code>cargo nono</code></li>
<li><a
href="812da6d545"><code>812da6d</code></a>
chore(deps): update rust crate proptest-derive to 0.6.0 (<a
href="https://redirect.github.com/zopfli-rs/zopfli/issues/66">#66</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/zopfli-rs/zopfli/compare/v0.8.2...v0.8.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `indexmap` from 2.11.4 to 2.12.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md">indexmap's
changelog</a>.</em></p>
<blockquote>
<h2>2.12.0 (2025-10-17)</h2>
<ul>
<li><strong>MSRV</strong>: Rust 1.82.0 or later is now required.</li>
<li>Updated the <code>hashbrown</code> dependency to 0.16 alone.</li>
<li>Error types now implement <code>core::error::Error</code>.</li>
<li>Added <code>pop_if</code> methods to <code>IndexMap</code> and
<code>IndexSet</code>, similar to the
method for <code>Vec</code> added in Rust 1.86.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0e68f8a360"><code>0e68f8a</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/422">#422</a>
from cuviper/msrv-1.82</li>
<li><a
href="61c9c94672"><code>61c9c94</code></a>
ci: only run full miri in the merge queue</li>
<li><a
href="db43f1945a"><code>db43f19</code></a>
Release 2.12.0</li>
<li><a
href="b46a32a585"><code>b46a32a</code></a>
Move more to the lints table</li>
<li><a
href="4849b1679f"><code>4849b16</code></a>
Make use of RFC2145 type privacy for sealed traits</li>
<li><a
href="cfff4b7d03"><code>cfff4b7</code></a>
Use bounds in associated type position</li>
<li><a
href="c7178d73c4"><code>c7178d7</code></a>
Use <code>core::error::Error</code></li>
<li><a
href="76b459b82c"><code>76b459b</code></a>
Use more precise capturing for some <code>impl Trait</code></li>
<li><a
href="b3d9cc355e"><code>b3d9cc3</code></a>
Use the primitive slice's <code>is_sorted</code> methods</li>
<li><a
href="09db3cce19"><code>09db3cc</code></a>
Use inherent <code>usize::div_ceil</code></li>
<li>Additional commits viewable in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.11.4...2.12.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `libdeflater` from 1.24.0 to 1.25.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/libdeflater/libdeflater/blob/master/CHANGELOG.md">libdeflater's
changelog</a>.</em></p>
<blockquote>
<h2>[1.25.0]</h2>
<ul>
<li>Updated libdeflate to v1.25 (<a
href="https://redirect.github.com/libdeflater/libdeflater/issues/50">#50</a>,
thanks <a
href="https://github.com/musicinmybrain"><code>@​musicinmybrain</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2acaaa9afa"><code>2acaaa9</code></a>
Link v1.25.0 to <a
href="https://redirect.github.com/libdeflater/libdeflater/issues/50">#50</a>,
credit <a
href="https://github.com/musicinmybrain"><code>@​musicinmybrain</code></a></li>
<li><a
href="429baa4557"><code>429baa4</code></a>
Merge pull request <a
href="https://redirect.github.com/libdeflater/libdeflater/issues/50">#50</a>
from musicinmybrain/v1.25.0</li>
<li><a
href="96156b7cd4"><code>96156b7</code></a>
Fix unnecessary parentheses that produced a warning</li>
<li><a
href="36e84d153a"><code>36e84d1</code></a>
Update libdeflate to v1.25</li>
<li><a
href="0dccb7831c"><code>0dccb78</code></a>
Replace mentions of adamkewley/lideflater with libdeflater/libdeflater
(<a
href="https://redirect.github.com/libdeflater/libdeflater/issues/48">#48</a>)</li>
<li>See full diff in <a
href="https://github.com/libdeflater/libdeflater/compare/1.24.0...1.25.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `clap` from 4.5.48 to 4.5.51
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.51</h2>
<h2>[4.5.51] - 2025-10-29</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Correctly calculate padding for short flags that
take a value</li>
<li><em>(help)</em> Don't panic on short flags using
<code>ArgAction::Count</code></li>
</ul>
<h2>v4.5.50</h2>
<h2>[4.5.50] - 2025-10-20</h2>
<h3>Features</h3>
<ul>
<li>Accept <code>Cow</code> where <code>String</code> and
<code>&amp;str</code> are accepted</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.51] - 2025-10-29</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Correctly calculate padding for short flags that
take a value</li>
<li><em>(help)</em> Don't panic on short flags using
<code>ArgAction::Count</code></li>
</ul>
<h2>[4.5.50] - 2025-10-20</h2>
<h3>Features</h3>
<ul>
<li>Accept <code>Cow</code> where <code>String</code> and
<code>&amp;str</code> are accepted</li>
</ul>
<h2>[4.5.49] - 2025-10-13</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Correctly wrap when ANSI escape codes are
present</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b49dae25ec"><code>b49dae2</code></a>
chore: Release</li>
<li><a
href="d37b0b57ab"><code>d37b0b5</code></a>
docs: Update changelog</li>
<li><a
href="3398b6ab10"><code>3398b6a</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/6009">#6009</a>
from gtema/complete_try_generate</li>
<li><a
href="21fc9e46d4"><code>21fc9e4</code></a>
feat(clap-complete): Introduce fallible generator</li>
<li><a
href="bd01bdc0ff"><code>bd01bdc</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/6012">#6012</a>
from epage/sub</li>
<li><a
href="ed0c63deba"><code>ed0c63d</code></a>
docs(derive): Specify arg_required_else_help is set for users</li>
<li><a
href="e2188d9af3"><code>e2188d9</code></a>
chore(deps): Update Rust Stable to v1.87 (<a
href="https://redirect.github.com/clap-rs/clap/issues/6004">#6004</a>)</li>
<li><a
href="e01f2b7640"><code>e01f2b7</code></a>
docs: Cleanup unused links</li>
<li><a
href="6b12a81baf"><code>6b12a81</code></a>
chore: Release</li>
<li><a
href="8dd92a792d"><code>8dd92a7</code></a>
docs: Update changelog</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.48...clap_complete-v4.5.51">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 18:05:10 +01:00
dependabot[bot]
779336f60c
chore(deps): bump github/codeql-action from 3 to 4 (#735)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.30.8</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.30.8 - 10 Oct 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.30.8/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.30.7</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.30.7 - 06 Oct 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.30.7/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.30.6</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.30.6 - 02 Oct 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.2. <a
href="https://redirect.github.com/github/codeql-action/pull/3168">#3168</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.30.6/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.30.5</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.30.5 - 26 Sep 2025</h2>
<ul>
<li>We fixed a bug that was introduced in <code>3.30.4</code> with
<code>upload-sarif</code> which resulted in files without a
<code>.sarif</code> extension not getting uploaded. <a
href="https://redirect.github.com/github/codeql-action/pull/3160">#3160</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.30.5/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.30.4</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.30.4 - 25 Sep 2025</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h2>3.29.4 - 23 Jul 2025</h2>
<p>No user facing changes.</p>
<h2>3.29.3 - 21 Jul 2025</h2>
<p>No user facing changes.</p>
<h2>3.29.2 - 30 Jun 2025</h2>
<ul>
<li>Experimental: When the <code>quality-queries</code> input for the
<code>init</code> action is provided with an argument, separate
<code>.quality.sarif</code> files are produced and uploaded for each
language with the results of the specified queries. Do not use this in
production as it is part of an internal experiment and subject to change
at any time. <a
href="https://redirect.github.com/github/codeql-action/pull/2935">#2935</a></li>
</ul>
<h2>3.29.1 - 27 Jun 2025</h2>
<ul>
<li>Fix bug in PR analysis where user-provided <code>include</code>
query filter fails to exclude non-included queries. <a
href="https://redirect.github.com/github/codeql-action/pull/2938">#2938</a></li>
<li>Update default CodeQL bundle version to 2.22.1. <a
href="https://redirect.github.com/github/codeql-action/pull/2950">#2950</a></li>
</ul>
<h2>3.29.0 - 11 Jun 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.22.0. <a
href="https://redirect.github.com/github/codeql-action/pull/2925">#2925</a></li>
<li>Bump minimum CodeQL bundle version to 2.16.6. <a
href="https://redirect.github.com/github/codeql-action/pull/2912">#2912</a></li>
</ul>
<h2>3.28.21 - 28 July 2025</h2>
<p>No user facing changes.</p>
<h2>3.28.20 - 21 July 2025</h2>
<ul>
<li>Remove support for combining SARIF files from a single upload for
GHES 3.18, see <a
href="https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload/">the
changelog post</a>. <a
href="https://redirect.github.com/github/codeql-action/pull/2959">#2959</a></li>
</ul>
<h2>3.28.19 - 03 Jun 2025</h2>
<ul>
<li>The CodeQL Action no longer includes its own copy of the extractor
for the <code>actions</code> language, which is currently in public
preview.
The <code>actions</code> extractor has been included in the CodeQL CLI
since v2.20.6. If your workflow has enabled the <code>actions</code>
language <em>and</em> you have pinned
your <code>tools:</code> property to a specific version of the CodeQL
CLI earlier than v2.20.6, you will need to update to at least CodeQL
v2.20.6 or disable
<code>actions</code> analysis.</li>
<li>Update default CodeQL bundle version to 2.21.4. <a
href="https://redirect.github.com/github/codeql-action/pull/2910">#2910</a></li>
</ul>
<h2>3.28.18 - 16 May 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.21.3. <a
href="https://redirect.github.com/github/codeql-action/pull/2893">#2893</a></li>
<li>Skip validating SARIF produced by CodeQL for improved performance.
<a
href="https://redirect.github.com/github/codeql-action/pull/2894">#2894</a></li>
<li>The number of threads and amount of RAM used by CodeQL can now be
set via the <code>CODEQL_THREADS</code> and <code>CODEQL_RAM</code>
runner environment variables. If set, these environment variables
override the <code>threads</code> and <code>ram</code> inputs
respectively. <a
href="https://redirect.github.com/github/codeql-action/pull/2891">#2891</a></li>
</ul>
<h2>3.28.17 - 02 May 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.21.2. <a
href="https://redirect.github.com/github/codeql-action/pull/2872">#2872</a></li>
</ul>
<h2>3.28.16 - 23 Apr 2025</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a841c540b7"><code>a841c54</code></a>
Scratch <code>uploadSpecifiedFiles</code> tests, make
<code>uploadPayload</code> tests instead</li>
<li><a
href="aeb12f6eaa"><code>aeb12f6</code></a>
Merge branch 'main' into redsun82/skip-sarif-upload-tests</li>
<li><a
href="6fd4ceb7bb"><code>6fd4ceb</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3189">#3189</a>
from github/henrymercer/download-codeql-rate-limit</li>
<li><a
href="196a3e577b"><code>196a3e5</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3188">#3188</a>
from github/mbg/telemetry/partial-config</li>
<li><a
href="98abb870dc"><code>98abb87</code></a>
Add configuration error for rate limited CodeQL download</li>
<li><a
href="bdd2cdf891"><code>bdd2cdf</code></a>
Also include <code>language</code> in error status report for
<code>start-proxy</code>, if available</li>
<li><a
href="fb148789ab"><code>fb14878</code></a>
Include <code>languages</code> in <code>start-proxy</code>
telemetry</li>
<li><a
href="2ff418f28a"><code>2ff418f</code></a>
Parse <code>language</code> before calling
<code>getCredentials</code></li>
<li>See full diff in <a
href="https://github.com/github/codeql-action/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-23 18:40:01 +02:00
andrews05
e091767278
Small tweaks (#734)
- Fix docs for entropy filter (fixes #733)
- Improve docs for `--fix` (fixes #728)
- Add tests for alpha optimisation
- Following a recent change to the code here, I realised we don't
actually have any tests covering alpha optimisation. I've adjusted some
of the test images to include lines with both leading transparent and
all transparent pixels, and added dedicated tests for them.
- Change x86_64 macOS build to use the macos-15 runner
- There is a new macos-15-intel runner available but we don't actually
need an intel runner to build x86_64. (As support for x86_64 winds down,
we can probably drop these builds eventually - homebrew is the preferred
installation method for macOS anyway)
2025-10-04 11:46:47 +02:00
andrews05
aebddf443a
Allow brute filter configuration (#720)
This PR allows the Brute filter parameters to be configured rather than
using fixed constants. It also tweaks the presets to take advantage of
these new options:
o3: level=1, lines=3 (fractionally worse/faster)
o4: level=1, lines=4 (same as before)
o5: level=4, lines=4 (fractionally better/slower)
o6: level=5, lines=8 (slightly better/slower)

The parameters can be explicitly set in both the API and the CLI.
2025-09-25 23:20:29 +02:00
andrews05
7cc91b1308
Add max_uncompressed_size (#732)
Adds an option to skip files when the uncompressed IDAT (or the file
size itself) exceeds a certain size. This provides an effective way to
limit resource usage in constrained environments.

Closes #411.
2025-09-25 22:46:35 +02:00
andrews05
14532e8bf5
BC breaks for v10 (#715)
This is a collection of all the BC breaks mentioned in #714, except for
11 which I'm not including for now.

Fixes #658.
Fixes #660.

It might be best to review each commit individually, referencing the
notes in #714 and #660 (I just didn't want to create a dozen separate
PRs).
2025-09-20 17:16:22 +02:00
Alejandro González
2a3aa83928
chore: fix Clippy lint, very slightly optimize optimize_alpha function 2025-09-20 13:35:13 +02:00
Alejandro González
82cae58794
chore: update dependencies 2025-09-20 13:35:13 +02:00
andrews05
71290acc62
Reduce memory usage of fast evaluation (#713)
This is an experiment I started a while ago before life happened. It
reduces memory usage of fast evaluation (-o2 and lower), bringing it
inline with normal (slow) evaluation. It does this by not retaining the
filtered image data of the evaluations, but instead retaining the row
filters that were used in each line so it can be quickly re-filtered
when required. This does incur a tiny performance penalty, but it's
negligible even at `-o0`.
Although this is fully functional, there are a few rough spots in the
code so I'm just opening it as a draft for now.

```
PR -sao6
       70.08 real       614.36 user         2.66 sys
          2024243200  maximum resident set size
          1839339520  peak memory footprint

PR -sao2
       11.16 real        60.85 user         1.33 sys
          1982562304  maximum resident set size
          1842173824  peak memory footprint

PR -sao2 -t1
       55.11 real        53.85 user         0.76 sys
           429457408  maximum resident set size
           245008064  peak memory footprint

master -sao6
       67.70 real       616.07 user         2.72 sys
          2043379712  maximum resident set size
          1838340416  peak memory footprint

master -sao2
       11.53 real        60.63 user         1.25 sys
          2753396736  maximum resident set size
          2283741440  peak memory footprint

master -sao2 -t1
       54.29 real        53.55 user         0.72 sys
           626311168  maximum resident set size
           305252544  peak memory footprint
```

Note that this involves some refactoring of `RowFilter` and the new
`FilterStrategy`. These are breaking changes so it will ultimately be
destined for v10. One advantage to this new structure is it opens the
door for future changes such as allowing the Brute strategy to take a
parameter for the number of lines.
2025-09-19 20:36:17 +02:00
dependabot[bot]
ff9beb00fe chore(deps): bump actions/attest-build-provenance from 2 to 3
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2 to 3.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 18:47:53 +12:00
andrews05
c60dbd12a5
Update runners, rust, and dependencies (#724)
#719 is failing tests due to requiring a newer version of rust than we
currently specify. This PR updates to 1.85.1 and sets the edition to
2024.
I've also updated dependencies and runner images, using the ubuntu arm
runner which removes the need for qemu and other hacks.

Closes #719.
2025-08-25 14:49:59 +02:00
dependabot[bot]
54c49a1644 chore(deps): bump the rust-dependencies group with 2 updates
Bumps the rust-dependencies group with 2 updates: [clap](https://github.com/clap-rs/clap) and [glob](https://github.com/rust-lang/glob).


Updates `clap` from 4.5.41 to 4.5.43
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.41...clap_complete-v4.5.43)

Updates `glob` from 0.3.2 to 0.3.3
- [Release notes](https://github.com/rust-lang/glob/releases)
- [Changelog](https://github.com/rust-lang/glob/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/glob/compare/v0.3.2...v0.3.3)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.43
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: glob
  dependency-version: 0.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-14 12:49:04 +12:00
dependabot[bot]
9d3e6e6f33 chore(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-14 12:37:46 +12:00
dependabot[bot]
5ee3c2afa0 chore(deps): bump the rust-dependencies group with 2 updates
Bumps the rust-dependencies group with 2 updates: [rgb](https://github.com/kornelski/rust-rgb) and [clap](https://github.com/clap-rs/clap).


Updates `rgb` from 0.8.51 to 0.8.52
- [Changelog](https://github.com/kornelski/rust-rgb/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Updates `clap` from 4.5.40 to 4.5.41
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.40...clap_complete-v4.5.41)

---
updated-dependencies:
- dependency-name: rgb
  dependency-version: 0.8.52
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: clap
  dependency-version: 4.5.41
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-09 11:42:08 +12:00
John Bampton
1c02ee9299
README: use version v9.1.5 for the pre-commit config example (#711)
Use latest version
2025-07-09 20:42:03 +02:00
dependabot[bot]
0ff97448c2
chore(deps): bump rgb from 0.8.50 to 0.8.51 in the rust-dependencies group (#710)
Bumps the rust-dependencies group with 1 update:
[rgb](https://github.com/kornelski/rust-rgb).

Updates `rgb` from 0.8.50 to 0.8.51
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/kornelski/rust-rgb/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rgb&package-manager=cargo&previous-version=0.8.50&new-version=0.8.51)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 17:48:17 +02:00
dependabot[bot]
420ea940bc
chore(deps): bump indexmap from 2.9.0 to 2.10.0 in the rust-dependencies group (#709)
Bumps the rust-dependencies group with 1 update:
[indexmap](https://github.com/indexmap-rs/indexmap).

Updates `indexmap` from 2.9.0 to 2.10.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md">indexmap's
changelog</a>.</em></p>
<blockquote>
<h2>2.10.0 (2025-06-26)</h2>
<ul>
<li>Added <code>extract_if</code> methods to <code>IndexMap</code> and
<code>IndexSet</code>, similar to the
methods for <code>HashMap</code> and <code>HashSet</code> with ranges
like <code>Vec::extract_if</code>.</li>
<li>Added more <code>#[track_caller]</code> annotations to functions
that may panic.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="91dbcc55d2"><code>91dbcc5</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/399">#399</a>
from cuviper/release-2.10.0</li>
<li><a
href="67a5a712fc"><code>67a5a71</code></a>
Release 2.10.0</li>
<li><a
href="37e519a3be"><code>37e519a</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/308">#308</a>
from cuviper/extract_if</li>
<li><a
href="4d7618fbc9"><code>4d7618f</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/398">#398</a>
from cuviper/bench-deps</li>
<li><a
href="68201eb0a3"><code>68201eb</code></a>
Drop lazy_static for LazyLock</li>
<li><a
href="eaaaa56e71"><code>eaaaa56</code></a>
Switch to fastrand for bench shuffling</li>
<li><a
href="b19d84edaf"><code>b19d84e</code></a>
Fix <code>clippy::needless_lifetimes</code></li>
<li><a
href="4f62778c86"><code>4f62778</code></a>
<code>impl FusedIterator for ExtractIf</code></li>
<li><a
href="e09eaaf8e5"><code>e09eaaf</code></a>
Document and track <code>extract_if</code> panics</li>
<li><a
href="a8d7dc50a2"><code>a8d7dc5</code></a>
Add range support to <code>extract_if</code></li>
<li>Additional commits viewable in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.9.0...2.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=indexmap&package-manager=cargo&previous-version=2.9.0&new-version=2.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-30 20:39:02 +02:00
AFCMS
fe1f5a0889
Change repository name reference + Docker registry URL 2025-06-23 19:38:43 -04:00
dependabot[bot]
fd5b7a4aa8
chore(deps): bump dawidd6/action-download-artifact from 10 to 11 (#705)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 10 to 11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v11</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v10...v11">https://github.com/dawidd6/action-download-artifact/compare/v10...v11</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ac66b43f0e"><code>ac66b43</code></a>
node_modules: upgrade</li>
<li><a
href="9b54a0a70c"><code>9b54a0a</code></a>
Update README.md</li>
<li>See full diff in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v10...v11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=10&new-version=11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-24 00:42:19 +02:00
dependabot[bot]
8631eb1c79
chore(deps): bump clap from 4.5.39 to 4.5.40 in the rust-dependencies group (#706)
Bumps the rust-dependencies group with 1 update:
[clap](https://github.com/clap-rs/clap).

Updates `clap` from 4.5.39 to 4.5.40
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.40] - 2025-06-09</h2>
<h3>Features</h3>
<ul>
<li>Support quoted ids in <code>arg!()</code> macro (e.g.
<code>arg!(&quot;check-config&quot;: ...)</code>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cff27dbf57"><code>cff27db</code></a>
chore: Release</li>
<li><a
href="4ef41249f1"><code>4ef4124</code></a>
docs: Update changelog</li>
<li><a
href="ca896175c1"><code>ca89617</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5848">#5848</a>
from jennings/jennings/push-xolwzyoornps</li>
<li><a
href="99b6391ee9"><code>99b6391</code></a>
fix(complete): Fix PowerShell dynamic completion</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.39...clap_complete-v4.5.40">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.39&new-version=4.5.40)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 17:38:20 +02:00
dependabot[bot]
d57d880770 chore(deps): bump the rust-dependencies group with 2 updates
Bumps the rust-dependencies group with 2 updates: [libdeflater](https://github.com/adamkewley/libdeflater) and [clap](https://github.com/clap-rs/clap).


Updates `libdeflater` from 1.23.1 to 1.24.0
- [Changelog](https://github.com/libdeflater/libdeflater/blob/master/CHANGELOG.md)
- [Commits](https://github.com/adamkewley/libdeflater/compare/1.23.1...1.24.0)

Updates `clap` from 4.5.36 to 4.5.39
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.36...clap_complete-v4.5.39)

---
updated-dependencies:
- dependency-name: libdeflater
  dependency-version: 1.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: clap
  dependency-version: 4.5.39
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-05 11:02:11 -04:00
Josh Holmer
bf276f29b8
Include Cargo deps in Dependabot checks 2025-06-05 10:09:52 -04:00
dependabot[bot]
54a31a65a7 Bump dawidd6/action-download-artifact from 9 to 10
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 9 to 10.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v9...v10)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 13:30:35 -04:00
Demetris Kikizas
788997c437 Fix letter transposition in README.md 2025-05-05 17:20:16 +12:00
Alejandro González
a451711e96
Fix ARM64 Debian packages lacking dependencies
It looks like cargo-deb v2.5.0 silently broke this for our use case, and
other use cases which have been reported upstream: https://github.com/kornelski/cargo-deb/issues/21

To make dpkg-shlibdeps work more reliably until this inconsistent choice
of multiarch and cross-build lib directories is sorted out, let's pass
the documented `LD_LIBRARY_PATH` environment variable to ensure such
libraries are always found. Interestingly, setting `DEB_HOST_ARCH` to a
different value did not have any effect.
2025-04-26 16:29:22 +02:00
Alejandro González
ef1d87427d
Simplify and optimize CI workflows 2025-04-26 16:29:22 +02:00
Alejandro González
fa7d3d9067
Tentative fix for deploy job flakiness
The failure described in #967 is suspected to stem from race conditions
with the GH API, as described in
https://github.com/softprops/action-gh-release/issues/445#issuecomment-2407940052.
2025-04-26 13:47:25 +02:00
Alejandro González
8c6532ca1b
Reformat deploy.yml file 2025-04-26 13:47:04 +02:00
andrews05
c7d462f909
Bump version to 9.1.5 (#697)
Some checks failed
deploy / Deploy release (push) Has been cancelled
docker / build (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
2025-04-26 01:19:57 +02:00
andrews05
a44ba5f88b
Add option to disable parallel file processing (#695)
Fixes #685.
Fixes #572.
Also fixes #690 by using "logical CPUs".
2025-04-23 11:09:15 +02:00
Josh Holmer
d168fffb12 Create security policies document
Github recommends to create a SECURITY.md file containing security policies for the project. I've also enabled in-project vulnerability reporting, and linked to it in this file.
2025-04-22 01:07:32 -04:00
Alejandro González
748d5987a5 Noteworthy dependency updates, including zopfli 2025-04-19 08:44:46 +12:00
AFCMS
26b084c161
Switch Docker image from alpine to scratch (#692)
Following https://github.com/shssoichiro/oxipng/pull/642

- [x] Fail to build on linting errors
- [x] Switch Docker image from `alpine` to `scratch`

Reduce the image size roughly from 15Mb to 2Mb.


![image](https://github.com/user-attachments/assets/a0fee179-42d4-4558-b5f6-e469a769959a)

It doesn't break the usecase mentioned in the README, as well as people
copying the binary in a Docker step.

I have considered making the image rootless but since it's doing file
modifications it requires overwriting the user to bring back root in the
README's usecase. The image would benefit of if using it only with
stdin/stdout. Not sure it's worth it.

I have been working on enabling cross compilation for non-Tier 1
platforms, but no ETA yet.
2025-04-15 22:17:46 +02:00
dependabot[bot]
f7a66f2075 Bump crossbeam-channel from 0.5.14 to 0.5.15
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.14 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 14:35:53 -04:00
andrews05
7650953faf
Improve memory usage of evaluator (#688)
This adds a new `final_round` parameter to the evaluator, which allows
us to determine when to keep the `filtered` data and when to keep the
compressed `idat_data`. By only keeping one of these we can
significantly improve memory usage.

Ref #683
2025-03-08 12:01:02 +01:00
dependabot[bot]
6cf42fbefa
Bump dawidd6/action-download-artifact from 8 to 9 (#686)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 8 to 9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v9</h2>
<h2>What's Changed</h2>
<ul>
<li>add merge_multiple option by <a
href="https://github.com/timostroehlein"><code>@​timostroehlein</code></a>
in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/327">dawidd6/action-download-artifact#327</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/timostroehlein"><code>@​timostroehlein</code></a>
made their first contribution in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/327">dawidd6/action-download-artifact#327</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v8...v9">https://github.com/dawidd6/action-download-artifact/compare/v8...v9</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="07ab29fd4a"><code>07ab29f</code></a>
add merge_multiple option (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/327">#327</a>)</li>
<li>See full diff in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v8...v9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=8&new-version=9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-01 16:14:09 +01:00
andrews05
1e3f4520ef
Disallow grayscale transformation if non-sRGB profile (#682)
Fixes #677
2025-02-26 22:39:20 +01:00
Jakub Marcowski
d649beacac
Use current version in pre-commit example (#681)
Simple enough change, use the current version in the `README.md`'s
`pre-commit` example.
2025-02-14 22:39:47 +01:00
andrews05
bc8c364568
Bump version to 9.1.4 (#680)
Some checks failed
docker / build (push) Has been cancelled
oxipng / CI (push) Has been cancelled
deploy / Deploy release (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
2025-02-14 19:11:32 +01:00
andrews05
30387b26d9
Bump dependencies (#679) 2025-02-14 11:51:36 +01:00
andrews05
1188b9a91e
Reduction performance tweaks (#676)
Two key changes here:
- Removed some defunct reduction benches and added some more alpha
reduction benches.
- Changed use of `chunks()` to `chunks_exact()` where appropriate to
improve performance. (As a byproduct, this also fixes a potential crash
if a malformed file has a PLTE chunk that isn't a multiple of 3.)
2025-02-08 18:49:04 +01:00
Alejandro González
5a4cfa9505
Exclude system-libdeflate feature from Clippy feature combinations 2025-02-02 18:31:20 +01:00
andrews05
174f36ad8f
Improve indexed to grayscale conversion (#674)
If no palette reduction occurred (or palette reductions were off), a
fully transparent palette entry may not have been zeroed to black. By
ensuring this gets cleaned in the `indexed_to_channels` transformation,
we may able to achieve a grayscale conversion that would otherwise have
been RGB.

This is the final piece of the puzzle in #649 to achieve better file
sizes on the first run and avoid further changes on a second run.

Results from the images in #649 (combining this PR and #673):
9.1.3 1st run: 2,191,773
9.1.3 2nd run: 2,191,629
PR 1st run: 2,191,380
PR 2nd run: 2,191,380
2025-02-02 18:26:18 +01:00
andrews05
e6f84264e5
Don't use most popular edge colour if tied (#673)
If multiple edge colours were tied for most popular, the one chosen
would depend on the current palette order, which could cause it to
change if run a second time.

This further improves determinism for #649. There is still one more
issue I've found affecting the images there which I'll try to address in
another PR.
2025-02-02 18:15:55 +01:00
dependabot[bot]
8f298be7fb
Bump dawidd6/action-download-artifact from 7 to 8 (#675)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 7 to 8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v8</h2>
<h2>New features</h2>
<ul>
<li><code>use_unzip</code> boolean input (defaulting to false) - if set
to true, the action will use system provided <code>unzip</code> utility
for unpacking downloaded artifact(s) (note that the action will first
download the .zip artifact file, then unpack it and remove the .zip
file)</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>README: v7 by <a
href="https://github.com/haines"><code>@​haines</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/318">dawidd6/action-download-artifact#318</a></li>
<li>Unzip by <a
href="https://github.com/dawidd6"><code>@​dawidd6</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/325">dawidd6/action-download-artifact#325</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/haines"><code>@​haines</code></a> made
their first contribution in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/318">dawidd6/action-download-artifact#318</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v7...v8">https://github.com/dawidd6/action-download-artifact/compare/v7...v8</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="20319c5641"><code>20319c5</code></a>
README: v8</li>
<li><a
href="e58a9e5d14"><code>e58a9e5</code></a>
Unzip (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/325">#325</a>)</li>
<li><a
href="6d05268723"><code>6d05268</code></a>
node_modules: update</li>
<li><a
href="c03fb0c928"><code>c03fb0c</code></a>
README: v7 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/318">#318</a>)</li>
<li>See full diff in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v7...v8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 18:07:51 +01:00
Alejandro González
5f0a0d6938
Fix new Clippy lints 2025-01-30 18:39:23 +01:00
andrews05
2632be2034
Fix size passed to fast filter evaluator (#672)
The evaluator uses the `estimated_output_size` internally but we were
passing only the idat size in the fast filter evaluator. At level `o2`,
or higher levels when using `--fast`, this could cause a slight bias
towards the None and Bigrams filters for indexed images. The actual
impact to results is incredibly minor but it's definitely incorrect so
we should fix it.
2025-01-30 18:28:42 +01:00
andrews05
bbde68ddce
Refactor optimize_raw (#670)
Code always tends to get messy over time. I've found the `optimize_raw`
function increasingly harder to read, particularly after the addition of
fast mode, so I've taken some time to refactor and simplify it.

One change of note here is the main compression trials now use the
Evaluator. This means verbose output is a little different which is
shown below.

There is no change to performance or output size.

`-vvo2`: master
```
Processing: tests/files/rgba_8_should_be_palette_4.png
    500x400 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 2757 bytes
    File size = 18109 bytes
Eval: 4-bit Indexed (5 colors)      None       1837 bytes
Eval: 8-bit Indexed (5 colors)      None       1988 bytes
Eval: 4-bit Indexed (5 colors)      Bigrams   >1837 bytes
Eval: 8-bit Indexed (5 colors)      Bigrams   >1837 bytes
Transformed image to 4-bit Indexed (5 colors), non-interlaced
Evaluating: 2 filters
Eval: 4-bit Indexed (5 colors)      Sub       >1810 bytes
Eval: 4-bit Indexed (5 colors)      Entropy   >1810 bytes
Trying: None
    zc = 11  f = None      1583 bytes
Found better combination:
    zc = 11  f = None      1583 bytes
    IDAT size = 1583 bytes (1174 bytes decrease)
    file size = 16962 bytes (1147 bytes = 6.33% decrease)
16962 bytes (6.33% smaller): Running in pretend mode, no output
```

`-vvo2`: PR
```
Processing: tests/files/rgba_8_should_be_palette_4.png
    500x400 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 2757 bytes
    File size = 18109 bytes
Eval: 4-bit Indexed (5 colors)      None       1837 bytes
Eval: 8-bit Indexed (5 colors)      None       1988 bytes
Eval: 4-bit Indexed (5 colors)      Bigrams   >1837 bytes
Eval: 8-bit Indexed (5 colors)      Bigrams   >1837 bytes
Transformed image to 4-bit Indexed (5 colors), non-interlaced
Evaluating 2 filters
Eval: 4-bit Indexed (5 colors)      Sub       >1810 bytes
Eval: 4-bit Indexed (5 colors)      Entropy   >1810 bytes
Trying filter None with zc = 11
1610 bytes
Found better result:
    zc = 11, f = None
    IDAT size = 1583 bytes (1174 bytes decrease)
    file size = 16962 bytes (1147 bytes = 6.33% decrease)
16962 bytes (6.33% smaller): Running in pretend mode, no output
```

`-vvZo5`: master
```
Processing: tests/files/rgba_8_should_be_palette_4.png
    500x400 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 2757 bytes
    File size = 18109 bytes
Eval: 8-bit Indexed (battiato sort) None       1821 bytes
Eval: 4-bit Indexed (5 colors)      None       1657 bytes
Eval: 8-bit Indexed (mzeng sort)    None       1821 bytes
Eval: 8-bit Indexed (5 colors)      None       1821 bytes
Eval: 8-bit Indexed (battiato sort) Bigrams   >1821 bytes
Eval: 4-bit Indexed (5 colors)      Bigrams   >1657 bytes
Eval: 8-bit Indexed (mzeng sort)    Bigrams   >1657 bytes
Eval: 8-bit Indexed (5 colors)      Bigrams   >1657 bytes
Transformed image to 4-bit Indexed (5 colors), non-interlaced
Trying: 8 filters
    zc = zopfli  f = Brute     1562 bytes
    zc = zopfli  f = Sub      >1562 bytes
    zc = zopfli  f = Bigrams  >1562 bytes
    zc = zopfli  f = None      1407 bytes
    zc = zopfli  f = Up       >1407 bytes
    zc = zopfli  f = MinSum   >1407 bytes
    zc = zopfli  f = BigEnt   >1407 bytes
    zc = zopfli  f = Entropy  >1407 bytes
Found better combination:
    zc = zopfli  f = None      1407 bytes
    IDAT size = 1407 bytes (1350 bytes decrease)
    file size = 16786 bytes (1323 bytes = 7.31% decrease)
16786 bytes (7.31% smaller): Running in pretend mode, no output
```

`-vvZo5`: PR
```
Processing: tests/files/rgba_8_should_be_palette_4.png
    500x400 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 2757 bytes
    File size = 18109 bytes
Eval: 8-bit Indexed (battiato sort) None       1821 bytes
Eval: 4-bit Indexed (5 colors)      None       1657 bytes
Eval: 8-bit Indexed (mzeng sort)    None       1821 bytes
Eval: 8-bit Indexed (5 colors)      None       1821 bytes
Eval: 8-bit Indexed (battiato sort) Bigrams   >1657 bytes
Eval: 4-bit Indexed (5 colors)      Bigrams   >1657 bytes
Eval: 8-bit Indexed (mzeng sort)    Bigrams   >1657 bytes
Eval: 8-bit Indexed (5 colors)      Bigrams   >1657 bytes
Transformed image to 4-bit Indexed (5 colors), non-interlaced
Trying 8 filters with zopfli, zi = 15
Eval: 4-bit Indexed (5 colors)      Brute      1589 bytes
Eval: 4-bit Indexed (5 colors)      Bigrams    1641 bytes
Eval: 4-bit Indexed (5 colors)      Sub        1711 bytes
Eval: 4-bit Indexed (5 colors)      None       1434 bytes
Eval: 4-bit Indexed (5 colors)      Up         1764 bytes
Eval: 4-bit Indexed (5 colors)      MinSum     1760 bytes
Eval: 4-bit Indexed (5 colors)      BigEnt     1742 bytes
Eval: 4-bit Indexed (5 colors)      Entropy    1748 bytes
Found better result:
    zopfli, zi = 15, f = None
    IDAT size = 1407 bytes (1350 bytes decrease)
    file size = 16786 bytes (1323 bytes = 7.31% decrease)
16786 bytes (7.31% smaller): Running in pretend mode, no output
```
2025-01-29 20:53:11 +01:00
andrews05
8a44cdbc84
Tweak eval cmp key for more consistent results (#671)
This changes the evaluator to prefer a later image instead of an earlier
one in the case of a tie. This gives more consistent results since the
baseline is always added last.

I also removed bit depth from the key since the uncompressed size should
cover that.

Fixes #649.
(Mostly. I did discover another possible but very rare issue: if
multiple colours tie for "most popular edge colour" in the luma sort,
the sort may affect which one is actually picked and multiple runs may
flip-flop back and forth)
2025-01-29 19:56:27 +01:00
Andrew
14b8b0e93a Error if fdAT invalid 2025-01-26 00:16:24 +01:00
Andrew
cca23b5479 Refilter frames 2025-01-26 00:16:24 +01:00
Andrew
09c4851118 Retain filter applied 2025-01-26 00:16:24 +01:00
Andrew
5fdaa12c96 Recompress frames 2025-01-26 00:16:24 +01:00
Andrew
fec6b2b9f3 Parse fcTL/fdAT into frames 2025-01-26 00:16:24 +01:00
Andrew
60911977f6 Add read_be_u16 and tidy parse_next_chunk 2025-01-26 00:16:24 +01:00
Andrew
6c7ab5d79f Add warning when interlacing was not enabled as requested 2025-01-16 12:37:33 +01:00
dependabot[bot]
3a6b792ca1 Bump actions/attest-build-provenance from 1 to 2
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 1 to 2.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 00:28:34 +01:00
Kornel
ffbd927d82 Remove obsolete flag warning 2025-01-02 09:40:52 +13:00
Kornel
a72bc945fc Clippy 2025-01-02 09:15:24 +13:00
Kornel
8270c6a034 Skip signed files or remove C2PA metadata 2024-12-26 19:03:03 +01:00
Kornel
910e779b09 Use ExitCode in main 2024-12-26 19:03:03 +01:00
Frank Elsinga
8740f475d7
docs: added the defaults for some Options (#661)
There are some parts of the `Options`-struct that miss the defaults.
I also made sure that `Interlacing` is a link
2024-12-20 17:08:13 +01:00
Josh Holmer
4df1464f39
Add feature flag to use system libdeflate (#659)
This need was raised in https://bugs.gentoo.org/944285. Can be enabled
with `--features system-libdeflate` to use the libdeflate located on the
user's system instead of building our own.
2024-12-03 20:02:03 +01:00
andrews05
8ebb5e6dfd
Cleanup tests (#656)
I've replaced a few tests with synthetic images and removed a number
that I don't believe are relevant anymore.

I've also removed the #553 test without replacement as I don't know how
to synthesise a replacement and the issue is still open anyway.

Going forward I think we should avoid adding any new "issue" tests and
instead synthesise something suitable in one of the other collections.

Closes #655.
2024-12-02 20:58:01 +01:00
dependabot[bot]
3b7467a5da
Bump dawidd6/action-download-artifact from 6 to 7 (#657)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v7</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump fast-xml-parser from 4.4.0 to 4.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/299">dawidd6/action-download-artifact#299</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.7 to
2.1.9 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/300">dawidd6/action-download-artifact#300</a></li>
<li>build(deps): bump adm-zip from 0.5.14 to 0.5.15 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/301">dawidd6/action-download-artifact#301</a></li>
<li>build(deps): bump adm-zip from 0.5.15 to 0.5.16 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/306">dawidd6/action-download-artifact#306</a></li>
<li>build(deps): bump path-to-regexp from 6.2.2 to 6.3.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/307">dawidd6/action-download-artifact#307</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.9 to
2.1.10 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/311">dawidd6/action-download-artifact#311</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.10.1 to 1.11.0
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/310">dawidd6/action-download-artifact#310</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.11.0 to 1.11.1
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/312">dawidd6/action-download-artifact#312</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.10 to
2.1.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/313">dawidd6/action-download-artifact#313</a></li>
<li>build(deps): Fix cross-spawn &gt;=7.0.0 &lt;= 7.0.5 vulnerability by
<a href="https://github.com/alexcouret"><code>@​alexcouret</code></a> in
<a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/317">dawidd6/action-download-artifact#317</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/alexcouret"><code>@​alexcouret</code></a> made
their first contribution in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/317">dawidd6/action-download-artifact#317</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v6...v7">https://github.com/dawidd6/action-download-artifact/compare/v6...v7</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="80620a5d27"><code>80620a5</code></a>
node_modules: update</li>
<li><a
href="b15e003f46"><code>b15e003</code></a>
node_modules: install</li>
<li><a
href="1ee9a455fd"><code>1ee9a45</code></a>
build(deps): Fix cross-spawn &gt;=7.0.0 &lt;= 7.0.5 vulnerability (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/317">#317</a>)</li>
<li><a
href="b2f2706ac4"><code>b2f2706</code></a>
build(deps): bump <code>@​actions/artifact</code> from 2.1.10 to 2.1.11
(<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/313">#313</a>)</li>
<li><a
href="fdbeba027c"><code>fdbeba0</code></a>
build(deps): bump <code>@​actions/core</code> from 1.11.0 to 1.11.1 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/312">#312</a>)</li>
<li><a
href="a74b42987a"><code>a74b429</code></a>
build(deps): bump <code>@​actions/core</code> from 1.10.1 to 1.11.0 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/310">#310</a>)</li>
<li><a
href="24e807a70c"><code>24e807a</code></a>
build(deps): bump <code>@​actions/artifact</code> from 2.1.9 to 2.1.10
(<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/311">#311</a>)</li>
<li><a
href="9592e3c4ab"><code>9592e3c</code></a>
build(deps): bump path-to-regexp from 6.2.2 to 6.3.0 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/307">#307</a>)</li>
<li><a
href="5f966b63eb"><code>5f966b6</code></a>
build(deps): bump adm-zip from 0.5.15 to 0.5.16 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/306">#306</a>)</li>
<li><a
href="db9477a3eb"><code>db9477a</code></a>
build(deps): bump adm-zip from 0.5.14 to 0.5.15 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/301">#301</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-02 20:32:44 +01:00
andrews05
262082f546
Fix manpage for --zi (#653)
I don't know if this is a bug in the mangen but it seems to require
explicitly setting the value name to display correctly.
Before:
```
       --zi [default: 15]
              Set the number of iterations to use for Zopfli compression.
```

After:
```
       --zi=iterations [default: 15]
              Set the number of iterations to use for Zopfli compression.
```

This does not affect MANUAL.txt or the built-in help.
2024-12-02 12:34:52 +01:00
Kornel
f8c84c258d API docs 2024-11-30 13:28:05 +13:00
andrews05
e8e8309c2d
Bump version to 9.1.3 (#647)
Some checks failed
deploy / Deploy release (push) Has been cancelled
docker / build (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
Just as a point of interest, I observed a 3-4% performance improvement
from the BigEnt strategy benchmark as a result of the upgrade to
rustc-hash 2.0. This has zero impact on overall performance.
2024-11-29 17:36:50 +01:00
Alejandro González
e638807d33
Add keywords to Cargo package manifest
This was recommended by `lib.rs`'s maintainer dashboard, and it's
actually a good idea for making the crate more discoverable, I think.
2024-11-28 21:33:37 +01:00
andrews05
ca05d99be4
Assume None if the line is all zeros (#650)
#648 may have been a bit hasty - I realised afterward that there's a
simpler way to achieve the same thing, and include the Brute filter as
well.

This reverts #648 and instead just picks None up front if the line is
all zeros. This is guaranteed to be the chosen filter for MinSum,
Entropy, Bigrams and BigEnt. It's almost certainly true for Brute as
well but this is harder to prove. I've tested this across hundreds of
images and found no change in output.
2024-11-28 17:21:10 +01:00
andrews05
1efacace9f
Break when best possible filter result found 2024-11-27 00:52:21 +13:00
andrews05
1936861b91
Workaround weird regression with &[u8] and zopfli (#595)
Fixes #579. In lack of a proper understanding of what's going on here
and why the issue is happening, this workaround will do for now.
2024-11-26 12:41:18 +01:00
Alejandro González
f602e84fa6
Remove obsolete extern crate oxipng advice in lib usage instructions
This syntax hasn't been required since at least Rust's 2018 edition,
except in very specialized scenarios where you want to convince the
compiler that a crate is actually used to guarantee that the
side-effects of its build script (e.g., library linking) are visible,
which do not apply to Oxipng in any case.
2024-11-25 18:59:38 +01:00
Alejandro González
e367f23c01
Upgrade x64 macOS CI workflows from macOS 12 to macOS 13
macOS 12 runners are scheduled for removal by GitHub: https://github.com/actions/runner-images/issues/10721
2024-11-25 18:56:31 +01:00
andrews05
cb97e69074
Add list of software using oxipng (#646)
This adds a short list of software using Oxipng to the read me. It's not
intended to be an exhaustive list, just some ones that I'm aware of that
may have broad general interest.

I've also removed the long section about Trunk which I'm not sure is
appropriate to include in this read me. Trunk users can find
documentation on this from Trunk directly.

Lastly, I've removed the older benchmark which I'm sure has no relevance
any more.
2024-11-25 18:42:48 +01:00
Karl Horky
490a4691cb
Fix name capitalization (#630)
Hi, thanks for Oxipng!

I saw further down in the readme that Oxipng was being used in the
middle of a sentence with a capital O, so I adjusted the other lowercase
usages (other than the usages in backticks, which may instead refer to
the command line program itself) from "oxipng" to also use "Oxipng"
2024-11-24 14:17:53 +01:00
AFCMS
ef64dd0768
Improved Docker image + publish on ghcr.io (#642)
Fix #610

- [x] Native cross-compilation support in Dockerfile. Only `linux/amd64`
and `linux/arm64` supported and tested (Tier 1 platform support from
Rust)
- [x] Cache support for cargo downloads and compilation results in
Dockerfile
- [x] Open Container's
[annotations](https://github.com/opencontainers/image-spec/blob/main/annotations.md)
in Dockerfile
- [x] GitHub Actions workflow to build the image for both platforms,
publishing to ghcr.io on tags and master branch pushes.
- [x] Disable use of GitHub Actions cache for tags build, allow manually
triggering the workflow with or without cache.
- [x] [Attestation
artifacts](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds)
for builds
- [x] Add basic informations about the use of the Docker image in README

I also changed the WORKDIR from `/src` to `/work`, because if got me
confused with the use of the src folder for the project source in the
first stage of the Dockerfile. It doesn't impact anything anyways since
you can mount the file where you want and have the program options point
to it.

**How to test?**
_After checking out the branch and making sure you have QEMU installed
to build/test_
```shell
# Docker sadly doesn't have yet the way to have locally a tag with multiple platforms
# despite being able to pass multiple platforms to the build command, so we have to use two distinct tags.
docker build --platform=linux/amd64 --tag test-oxipng-amd:latest --load .
docker build --platform=linux/arm64 --tag test-oxipng-arm:latest --load .

docker run --rm test-oxipng-amd:latest --version
docker run --rm test-oxipng-arm:latest --version

# Run on some files
docker run --rm -it -v $(pwd):/work test-oxipng-amd:latest -a /work/tests/files/apng_file.png
docker run --rm -it -v $(pwd):/work test-oxipng-arm:latest -a /work/tests/files/apng_file.png

# Remove the images
docker image rm test-oxipng-amd:latest
docker image rm test-oxipng-arm:latest
```

For the workflow, see the GitHub Actions logs. If you want to test the
ghcr.io publishing you can merge the branch into a fork and see the
result.

---------

Co-authored-by: Alejandro González <me@alegon.dev>
2024-11-24 14:08:11 +01:00
Alejandro González
c81a863e69
Move manpages generation to an xtask (#645)
PR #596 brought forward automatic generation of Linux manual pages for
Oxipng, which is executed every time Oxipng is built. However, while
building manpages on every build is convenient for Oxipng development
and doing so didn't catch my attention initially, it introduces
noticeable inefficiencies for crates using Oxipng as a library: during
their build, Oxipng manpages are also built, even though most dependent
crates won't use such artifacts, as they are not considered part of the
public Oxipng crate API or even appropriate for non-human consumption.

Moreover, generating manpages depends on `clap`, which is a heavyweight
dependency: according to a fresh `cargo build --timings --release` on my
development workstation, its `clap_builder` dependency is the third most
time consuming unit to build, totalling 1.5 s (out of 11.7 s, or 12.8%).
And there is no way for dependent crates to turn this off:
[`build-dependencies` cannot be conditional on crate
features](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies).
Potentially using other `cfg` hacks to either enable or disable manpage
generation is unergonomic, if not outright disallowed. Besides reducing
their compilation time cost, dependent crates may also want to trim the
size of their dependency tree, avoiding unnecessary dependency downloads
in the process.

Therefore, a better solution to conditionally build manpages in a way
convenient for both Oxipng maintainers and downstream consumers is
needed. My proposal implemented in this PR is to leverage the
[`cargo-xtask`](https://github.com/matklad/cargo-xtask) convention to
define an auxiliary crate to move the manpage generation logic and
dependencies to, which is not part of the `oxipng` crate published on
`crates.io`. That way Oxipng maintainers and packagers can still
generate manpages at request with ease, without any automation being
noticeable to uninterested crate consumers. And as a side benefit,
Oxipng maintainers can also benefit from slightly faster iteration times
due to the lack of a build script for the main crate.

The new `mangen` xtask can be run at any time with `cargo xtask mangen`.
The generated manpages are now available at
`target/xtask/mangen/manpages`. Existing deployment scripts were updated
accordingly.
2024-11-24 13:57:29 +01:00
Alejandro González
e7f1c04488
Update dependency declarations and lockfile to the latest versions 2024-11-19 22:46:00 +01:00
Alejandro González
e83c6725dc
Tweak Cargo config comment placement 2024-11-19 22:40:26 +01:00
Alejandro González
95eea28c82
Tweak README wording on installer to mention Windows package managers 2024-11-19 22:03:27 +01:00
Alejandro González
ac943da875
Remove unused build dependency
It's been like that for a while!
2024-11-19 21:36:06 +01:00
Alejandro González
59e0509a58
Fix new Clippy lint 2024-11-19 21:36:06 +01:00
Alejandro González
44619fd24d
Fix new Clippy lint about manual div_ceil implementation
This numeric method was added on Rust 1.73, which is below our MSRV.
2024-09-28 15:42:02 +02:00
Alejandro González
7a29741f18
Run cargo fmt 2024-09-28 15:41:54 +02:00
Galaxy4594
0d60e8b7c6
Expose zc level 0 (uncompressed) 🚀 (#641)
Allow the creation of PNGs with uncompressed deflate streams via level 0
of libdeflate. If you want a glorified BMP with delta filters, this
change will make your dreams come true 🙂.
2024-09-05 00:32:28 +02:00
Matthew House
0f24120c9a
Add option for Zopfli iteration count (#640)
This PR extends the `--zopfli` argument with an optional iteration
count. In my case, I have a bunch of very small images (a few kB or
less), and I often like to use hundreds of iterations to squeeze off the
last several bytes. (I know that this crate isn't intended for
brute-force optimization, but I've found that some of its
transformations and filter strategies can be more creative than
`zopflipng`.) But this is also useful in the opposite direction, for
allowing Zopfli compression on large images where 15 iterations would be
prohibitive.
2024-08-07 21:09:47 +02:00
Alejandro González
1bb7109804
Another AArch64 Linux musl build fix attempt
After testing more thoroughly on my box, it turned out that the libgcc
linking workaround should indeed fix our build errors, but on CI that
did not happen because the `RUSTFLAGS` environment variable is set,
which takes precedence over any configuration at `.cargo/config.toml`.
Therefore, let's also add the workaround to `RUSTFLAGS` on the CI
workflow definition.

This should be a satisfactory enough stopgap solution that does not
require ourselves to be pinned to a specific nightly or drop these
builds until https://github.com/rust-lang/rust/issues/128401 is sorted
out.
2024-08-07 20:54:30 +02:00
Alejandro González
e2d58c112b
Fix CI AArch64 Linux musl builds
This is required to get PR #640 and further work on the repository
moving.
2024-08-07 16:12:06 +02:00
Alejandro González
61deab369b
Fix Clippy lints not causing CI workflow failure
It's easy to miss them out if CI is not aborted on a Clippy lint, and
this behavior change was an unintended regression when CodeQL
integration was added, so let's change it back.
2024-07-28 16:11:36 +02:00
andrews05
d30da6e8a0
Note that higher levels are not guaranteed to be better (#639)
Closes #638
2024-07-22 11:50:15 +02:00
Andrew
e8366882ad Bump version to 9.1.2
Some checks failed
oxipng / CI (push) Has been cancelled
deploy / Deploy release (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
2024-07-13 09:39:25 +12:00
Alejandro González
664b27c4ca Do not fail workflow on static analysis results upload failures
When Clippy finds lints, it already aborts the workflow. No double
failure is needed.
2024-07-11 15:20:53 +12:00
Alejandro González
0506418157 Remove some now unnecessary Clippy lints allowances 2024-07-11 15:20:53 +12:00
Alejandro González
a8846b897d Make CI Clippy static analysis checks more robust
I have identified two potential improvements for how we perform static analysis
on our code in our CI pipeline:

- The `giraffate/clippy-action` we currently use has not been updated to Node
  20, and GitHub has repeatedly indicated that they will phase out actions that
  do not support the latest Node versions. Despite my efforts to help with the
  update by submitting a pull request upstream, it has been ignored for months
  despite its perceived ease of review, raising concerns about the ongoing
  maintenance of the action. This situation suggests we should explore
  alternative methods for integrating Clippy with GitHub's UI.
- As evidenced by PR 632, thoroughly testing Rust crates for every possible
  feature combination is often overlooked due to the tedious nature of the task.
  Our current CI setup only checks two feature combinations, which is far from
  comprehensive.

To address the first improvement, these changes drop `clippy-action` entirely in
favor of utilizing GitHub's native CodeQL SARIF (Static Analysis Results
Interchange Format) file integration. Since Clippy cannot directly output lints
in SARIF, `clippy-sarif` is used to convert Clippy's JSON output to SARIF.
Additionally, `sarif-fmt` is added to turn SARIF into a human-friendly display
format in the workflow run logs.

For the second improvement, let's use `cargo hack` with the `--feature-powerset`
flag to run Clippy for every possible feature combination. This approach strikes
a good balance between CI runtime and thoroughness, as the number of feature
combinations grows superlinearly with the number of features: running `cargo
nextest` for every powerset element would lead to excessively long CI times.
2024-07-11 15:20:53 +12:00
andrews05
f7b837af69
Allow sanity-checks without parallel (#634)
This adds the use of the rayon shim when parallel is not enabled. See
#632.
2024-07-10 21:38:34 +02:00
Kornel
f6e3614fe9 Use Rust 1.60 feature syntax 2024-07-10 12:47:26 +12:00
dependabot[bot]
f70fe61e05 Bump dawidd6/action-download-artifact from 3 to 6
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 08:39:30 +12:00
Kornel
a2dedcfed2 Bump RGB crate 2024-07-10 08:31:47 +12:00
andrews05
3759ca85ec
Keep fcTL after PLTE (#626)
Fixes #625

---------

Co-authored-by: Alejandro González <me@alegon.dev>
2024-06-23 01:38:02 +02:00
andrews05
90ceef9796
Use MatchOptions::default() to disable case-sensitivity (#622)
Fixes #621
2024-06-04 18:08:07 +02:00
andrews05
e2c5b45f4b
Remove default value for interlace to ensure it is kept when nx is used (#620)
Fixes #619.

Interlacing still defaults to 0 when `--nx` is not specified and can
still be explicitly set even if it is (e.g. `-i 0 --nx` will still
deinterlace).
2024-06-02 18:46:44 +02:00
Andrew
290bf9d11f Regenerate manual
Some checks failed
deploy / Deploy release (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
2024-04-23 17:32:04 +12:00
Andrew
e7dbe8f3b0 Add release notes for version 9.1.1 2024-04-23 17:32:04 +12:00
Andrew
b5b1233901 Bump version to 9.1.1 2024-04-23 17:32:04 +12:00
Andrew
ca1f423323 Update rust version in docker file 2024-04-23 17:32:04 +12:00
Andrew
dd94bbef37 Fix release notes deploy step 2024-04-23 14:55:18 +12:00
Andrew
1ad90b389f Create assets dir relative to OUT_DIR 2024-04-23 14:55:18 +12:00
Andrew
c00cfc601d Update MSRV in read me 2024-04-22 10:09:34 +12:00
Andrew
13d37a0ef3 Regenerate manual
Some checks failed
deploy / Deploy release (push) Has been cancelled
oxipng / CI (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
2024-04-22 08:16:33 +12:00
Andrew
8161b628dd Ensure consistent width in manual generation 2024-04-22 08:16:33 +12:00
Andrew
ea5f0bb731 Add release notes for version 9.1.0 2024-04-22 08:16:33 +12:00
Andrew
48c496af1e Bump version to 9.1.0 2024-04-22 08:16:33 +12:00
Alejandro González
8086867055
Do not install unnecessary cross-compilation toolchain for cargo deb 2024-04-21 20:18:12 +02:00
Torbjörn Lönnemark
a70e523241 Document that no metadata is stripped by default 2024-04-18 08:18:01 +12:00
Andrew
375013f60f Don't rebuild the binary for deb archives 2024-04-14 08:49:12 +12:00
Andrew
4302ae2367 Add deb archive step to deploy workflow 2024-04-14 08:49:12 +12:00
andrews05
5a66e77581
Update dependencies and bump MSRV (#606)
Updates all dependencies to latest versions and bumps MSRV to 1.74 (to
match clap).
Some changes required for `env_logger` and `image`.
2024-04-13 14:58:19 +02:00
Andrew
8a59f5aa1a Change 'Reducing' to 'Transformed' 2024-04-13 08:12:16 +12:00
Andrew
268499b0db Allow passing a format description to the evaluator 2024-04-13 08:12:16 +12:00
andrews05
2d3555fe0f
Add modified zeng palette sorting method (#602)
This PR adds the modified zeng ("mzeng") palette sorting method, in
addition to the existing luma and battiato methods. Speed is very
similar to the battiato method with slightly better results on average.

Resulting sizes from two different image sets (all indexed or able to be
indexed):
| | master | PR |
|-|-|-|
| Set 1 | 29,647,156 | 29,555,697 |
| Set 2 | 23,732,133 | 23,570,862 |

Additionally, I've added a new "first colour" heuristic for both the
mzeng and battiato methods: We use the most popular colour overall, but
only if it covers at least 15% of the image. This provided 13k savings
on Set 2 vs the edge colour heuristic (which is still used in the luma
sort).
2024-04-06 01:16:29 +02:00
dependabot[bot]
fd96c47e09 Bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 08:52:26 +13:00
Alejandro González
05c8c4e261
Add OxiPNG packaging status infographic powered by Repology
Repology is a free service that monitors the packaging status of
projects in lots of package repositories, and offers a nice API to
generate badges with a summary of what OxiPNG versions are available in
what repositories. Let's introduce that to our README to make it easier
for users to decide whether to use a package manager of their
convenience, and visibilize the work package maintainers do with OxiPNG.
2024-03-29 09:30:38 +13:00
Alejandro González
db7da039fa Use GitHub macOS ARM runners for building ARM macOS binaries
GitHub introduced free macOS ARM runners on January, and my experience
using them in other projects to improve CI times and be able to actually
run tests on Apple Silicon Macs has been positive. Let's use them in
OxiPNG to hopefully speed up CI a bit, and finally be able to run the
test suite on AArch64 macOS.
2024-03-29 09:22:20 +13:00
Andrew
fca76a7afb Always run palette reduction even if there's only one entry 2024-03-29 09:15:27 +13:00
Andrew
1ddab42edb Always fix palette even if it would be larger 2024-03-29 09:15:27 +13:00
Andrew
a30ee05ca8 Add test for image with truncated palette 2024-03-29 09:15:27 +13:00
andrews05
eae53362b2 Add comment regarding avoiding panics 2024-03-29 09:07:24 +13:00
Kornel
a3590df20c Optimize co-occurence matrix 2024-03-29 09:07:24 +13:00
Kornel
36de54318d Faster, garbage-resilient most_popular_edge_color 2024-03-29 09:07:24 +13:00
Kornel
d063119d9c Avoid split_at panic in ScanLines 2024-03-29 09:07:24 +13:00
andrews05
f4e631bce7
Feature/manpage (#596)
This PR adds a build script to generate a man page using clap_mangen, as
per this example:
https://github.com/sondr3/clap-man-example/blob/main/build.rs

I'm not sure what to actually do with the man file from here, I guess
it's up to the packaging process to do something with it?
See
https://github.com/shssoichiro/oxipng/issues/69#issuecomment-1963352536

Note I couldn't see a way to include the `DISPLAY` chunk names from the
constant as we did before. They're now just hardcoded into the help and
will require manually updating if the list changes.

Closes #526

---------

Co-authored-by: Alejandro González <me@alegon.dev>
2024-03-18 12:28:52 +01:00
Andrew
2c3321b68a
Fix clippy lints 2024-03-18 12:15:02 +01:00
Andrew
3e3c027cd0 Skip extra evaluation when identical 2024-03-11 17:38:48 +13:00
Andrew
e503a5c8f9 Replace grayscale test file 2024-03-11 17:38:48 +13:00
Andrew
703ebb4813 Try both gray and indexed low depths 2024-03-11 17:38:48 +13:00
Andrew
a426fabe13 Fix secondary palette sort
This was only working if the input image was already indexed
2024-02-21 08:13:03 +13:00
Alejandro González
0608ab9cab
Fix some new nightly Clippy lints and run rustfmt with prettier config 2024-02-20 19:12:35 +01:00
andrews05
98fd4de30a
Reduce size of release binary (#592)
This PR makes 3 changes that together reduce binary size by around 25%:
- Sets lto="fat" in cargo.toml
- Sets panic="abort" in cargo.toml
- Sets location-detail=none in RUSTFLAGS

Closes #571

An unrelated change: I've replaced the zopfli test file with a smaller
one that runs much faster, as well as removing the slow test for
issue-133 which was related to an older alpha optimisation that is no
longer relevant.
2024-02-20 19:02:12 +01:00
Ben Beasley
4cb8296b02
Exclude more files from the published crate (#591)
There was an incorrect glob `bench/*` that was doing nothing, since the
benchmarks are in `benches/`; when I corrected it to `benches/*`, `cargo
publish --dry-run` failed:

```
error: failed to verify package tarball

Caused by:
  failed to parse manifest at `/home/ben/src/forks/oxipng/target/package/oxipng-9.0.0/Cargo.toml`

Caused by:
  can't find `zopfli` bench at `benches/zopfli.rs` or `benches/zopfli/main.rs`. Please specify bench.path if you want to use a non-default path.
```

…so I stopped trying to exclude the benchmarks from published crates at
all.

-----

Then, I added `Dockerfile`, `index.html`, and `scripts/` to the list of
paths to exclude from published crates.

Finally, I added some unnecessary “dotfiles” to the list of paths to
exclude from published crates.

-----

Some of this was suggested in a [package review for Fedora
Linux](https://bugzilla.redhat.com/show_bug.cgi?id=2259760).

After the PR:

```
$ cargo package --list
.cargo/config.toml
.cargo_vcs_info.json
CHANGELOG.md
Cargo.lock
Cargo.toml
Cargo.toml.orig
LICENSE
MANUAL.txt
README.md
benches/deflate.rs
[…]
benches/zopfli.rs
src/atomicmin.rs
[…]
src/sanity_checks.rs
$ cargo publish --dry-run
[…]
   Compiling oxipng v9.0.0 (/home/ben/src/forks/oxipng/target/package/oxipng-9.0.0)
    Finished dev [optimized + debuginfo] target(s) in 15.76s
    Packaged 37 files, 255.4KiB (61.6KiB compressed)
   Uploading oxipng v9.0.0 (/home/ben/src/forks/oxipng)
warning: aborting upload due to dry run
```
2024-02-17 21:20:17 +01:00
Alejandro González
1b500da585
Fix new Clippy lint 2024-01-22 13:40:53 +01:00
Alejandro González
7818599de1
Tweak pre-commit integration README wording 2024-01-22 13:39:17 +01:00
Thibaut Decombe
19ad37073b
Add pre-commit integration docs (#589)
Hey !

Following the addition of [pre-commit
support](https://github.com/shssoichiro/oxipng/issues/429), I've updated
the docs with a small section to reflect that.

I've added this just above the [trunk
integration](https://github.com/shssoichiro/oxipng/pull/486) section.
Because pre-commit is open source while trunk is proprietary, it felt
more appropriate to promote this option.

Let me know if you want me to make any changes.

Cheers
2024-01-22 13:04:13 +01:00
dependabot[bot]
cd5f9f8cc0
Bump actions/upload-artifact from 3 to 4 (#587)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<p>The release of upload-artifact@v4 and download-artifact@v4 are major
changes to the backend architecture of Artifacts. They have numerous
performance and behavioral improvements.</p>
<p>For more information, see the <a
href="https://github.com/actions/toolkit/tree/main/packages/artifact"><code>@​actions/artifact</code></a>
documentation.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/vmjoseph"><code>@​vmjoseph</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/464">actions/upload-artifact#464</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v3...v4.0.0">https://github.com/actions/upload-artifact/compare/v3...v4.0.0</a></p>
<h2>v3.1.3</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(github): remove trailing whitespaces by <a
href="https://github.com/ljmf00"><code>@​ljmf00</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/313">actions/upload-artifact#313</a></li>
<li>Bump <code>@​actions/artifact</code> version to v1.1.2 by <a
href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/436">actions/upload-artifact#436</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v3...v3.1.3">https://github.com/actions/upload-artifact/compare/v3...v3.1.3</a></p>
<h2>v3.1.2</h2>
<ul>
<li>Update all <code>@actions/*</code> NPM packages to their latest
versions- <a
href="https://redirect.github.com/actions/upload-artifact/issues/374">#374</a></li>
<li>Update all dev dependencies to their most recent versions - <a
href="https://redirect.github.com/actions/upload-artifact/issues/375">#375</a></li>
</ul>
<h2>v3.1.1</h2>
<ul>
<li>Update actions/core package to latest version to remove
<code>set-output</code> deprecation warning <a
href="https://redirect.github.com/actions/upload-artifact/issues/351">#351</a></li>
</ul>
<h2>v3.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump <code>@​actions/artifact</code> to v1.1.0 (<a
href="https://redirect.github.com/actions/upload-artifact/pull/327">actions/upload-artifact#327</a>)
<ul>
<li>Adds checksum headers on artifact upload (<a
href="https://redirect.github.com/actions/toolkit/pull/1095">actions/toolkit#1095</a>)
(<a
href="https://redirect.github.com/actions/toolkit/pull/1063">actions/toolkit#1063</a>)</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c7d193f32e"><code>c7d193f</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/466">#466</a>
from actions/v4-beta</li>
<li><a
href="13131bb095"><code>13131bb</code></a>
licensed cache</li>
<li><a
href="4a6c273b98"><code>4a6c273</code></a>
Merge branch 'main' into v4-beta</li>
<li><a
href="f391bb91a3"><code>f391bb9</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/465">#465</a>
from actions/robherley/v4-documentation</li>
<li><a
href="9653d03c4b"><code>9653d03</code></a>
Apply suggestions from code review</li>
<li><a
href="875b630764"><code>875b630</code></a>
add limitations section</li>
<li><a
href="ecb21463e9"><code>ecb2146</code></a>
add compression example</li>
<li><a
href="5e7604f84a"><code>5e7604f</code></a>
trim some repeated info</li>
<li><a
href="d6437d0758"><code>d6437d0</code></a>
naming</li>
<li><a
href="1b56155703"><code>1b56155</code></a>
s/v4-beta/v4/g</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 22:08:00 +01:00
dependabot[bot]
87d5c2441b
Bump dawidd6/action-download-artifact from 2 to 3 (#588)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<p>Node was updated from 16 to 20.
Node 20 requires <code>glibc&gt;=2.28</code>.</p>
<h2>v2.28.0</h2>
<p>No release notes provided.</p>
<h2>v2.27.0</h2>
<p>No release notes provided.</p>
<h2>v2.26.1</h2>
<p>No release notes provided.</p>
<h2>v2.26.0</h2>
<p>No release notes provided.</p>
<h2>v2.25.0</h2>
<p>No release notes provided.</p>
<h2>v2.24.4</h2>
<p>No release notes provided.</p>
<h2>v2.24.3</h2>
<p>No release notes provided.</p>
<h2>v2.24.2</h2>
<p>No release notes provided.</p>
<h2>v2.24.0</h2>
<p>No release notes provided.</p>
<h2>v2.23.0</h2>
<p>No release notes provided.</p>
<h2>v2.22.0</h2>
<p>No release notes provided.</p>
<h2>v2.21.1</h2>
<p>No release notes provided.</p>
<h2>v2.21.0</h2>
<p>No release notes provided.</p>
<h2>v2.20.0</h2>
<p>No release notes provided.</p>
<h2>v2.19.0</h2>
<p>No release notes provided.</p>
<h2>v2.18.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e7466d1a75"><code>e7466d1</code></a>
build(deps): bump <code>@​actions/artifact</code> from 1.1.2 to 2.0.0
(<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/260">#260</a>)</li>
<li><a
href="f29d1b6a89"><code>f29d1b6</code></a>
node_modules: upgrade</li>
<li><a
href="587cee61f5"><code>587cee6</code></a>
action: node16 -&gt; node20 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/259">#259</a>)</li>
<li><a
href="1cf761fba6"><code>1cf761f</code></a>
build(deps): bump undici from 5.25.4 to 5.28.2 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/258">#258</a>)</li>
<li><a
href="d44631c448"><code>d44631c</code></a>
build(deps): bump <code>@​actions/github</code> from 5.1.1 to 6.0.0 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/252">#252</a>)</li>
<li>See full diff in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 21:33:16 +01:00
andrews05
63efc76f3e
Add --keep display equivalent to --strip safe (#584)
This PR reverts #580 and introduces `--keep display` instead.

See discussion in #581.
2023-12-13 10:47:29 +01:00
andrews05
f6c24409f1
If only one filter selected use it for evaluations (#582)
The filters used during reduction evaluations are normally set to None &
Bigrams, regardless of any options. This PR makes a slight change so
that if only one filter is specified in the options, this filter will be
used for reduction evaluations too.

This resolves an odd situation affecting lower levels (when --fast is
enabled) where you may try to force the filter to a specific value but
it actually ends up different because a reduction evaluation was
smaller. It's particularly helpful if you're wanting it to be as fast as
possible by using `-o0 -f0` which will now exclusively use None instead
of trying the slower Bigrams as well.

As another use, you could try to brute force oxipng by iterating each
filter separately, though this may not actually achieve anything 😂

[edit] I also pulled the options out into a separate file, though this
wasn't relevant to the filter change.
2023-12-10 13:15:45 +01:00
andrews05
97af04a539
Allow strip and keep to be used together (#580)
This is a minor change that allows using both `--strip` and `--keep` at
the same time.

E.g. `--strip safe --keep eXIf` will strip chunks while preserving both
the ones that aren't "safe" to remove *and* eXIf. Essentially it's a
convenience to allow extending the default list used by `--strip safe`.

Specifying chunk names for both options is not permitted, e.g. `--strip
eXIf --keep eXIf` will error.

Use of `--strip all` with `--keep` is redundant, but is permitted.
2023-11-18 13:06:49 +01:00
Alejandro González
0a988768ab
Restore executable permissions on Unix release tarball binaries (#577)
These changes resolve #575 by setting the OxiPNG binary that's about to
be put in a release tarball to be world-executable during the release
workflow, as such permissions are lost when fetching them from
artifacts.
2023-11-16 00:24:04 +01:00
Alejandro González
a6152b06c4
Fix and simplify output file permission copying code (#578)
A detailed read to the [Rust documentation for the `fs::Permissions`
struct](https://doc.rust-lang.org/stable/std/fs/struct.Permissions.html)
and a little digging into its implementation in the standard library
have shown that this code didn't work as expected in any platform, and
was a bit weird to begin with:

- It first read the permissions from the input file metadata.
- Then it fetched the output file metadata.
- After that, it changed the permissions for that output file metadata.
- It then performed a sanity check that the output file had the expected
permissions.

Barring the fact that the sanity check in step 4 is not needed, the
overall approach is wrong because setting the permissions in a file
metadata struct does not actually persist those changes anywere; it's
just an in-memory change only, so these operations were useless. The
Rust documentation explicitly mentions that the `set_readonly` method
"does not modify the files attributes" [sic], but it's easy to miss that
warning and not realize that it also applies to the methods offered by
the `PermissionsExt` trait. The code only appeared to work because in
most cases the default permissions for new files happen to match the
input file permissions, so the sanity check passed.

To fix this, use the `set_permissions` method on `File` to actually set
the output file permissions to be the same as the input file
permissions, which is both much simpler and robust.

These changes were tested in the context of issue #576, and fix #576.
2023-11-16 00:15:36 +01:00
dependabot[bot]
e8f4ca88a3 Bump rustix from 0.37.20 to 0.37.25
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.20 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.20...v0.37.25)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 08:03:40 +13:00
andrews05
e1db84fd97
V9 Change log and read me (#559)
Some checks failed
deploy / Deploy release (push) Has been cancelled
oxipng / MSRV check (push) Has been cancelled
oxipng / CI (push) Has been cancelled
Co-authored-by: Alejandro González <me@alegon.dev>
2023-10-11 08:17:58 +13:00
andrews05
93c3e7dfae
Overhaul help (#563)
This PR brings a big overhaul to oxipng's help, with new long form
descriptions of many options.

The full output (--help) is added as a text file MANUAL.txt. Critiques
welcome.

The short output (-h) is simplified and appears as follows:
```
Losslessly improve compression of PNG files

Usage: oxipng [OPTIONS] <files>...

Arguments:
  <files>...  File(s) to compress (use '-' for stdin)

Options:
  -o, --opt <level>       Optimization level (0-6, or max) [default: 2]
  -r, --recursive         Recurse input directories, optimizing all PNG files
      --dir <directory>   Write output file(s) to <directory>
      --out <file>        Write output file to <file>
      --stdout            Write output to stdout
  -p, --preserve          Preserve file permissions and timestamps if possible
  -P, --pretend           Do not write any files, only show compression results
  -s                      Strip safely-removable chunks, same as '--strip safe'
      --strip <mode>      Strip metadata (safe, all, or comma-separated list)
                          CAUTION: 'all' will convert APNGs to standard PNGs
      --keep <list>       Strip all metadata except in the comma-separated list
  -a, --alpha             Perform additional alpha channel optimization
  -i, --interlace <type>  Set PNG interlacing type (0, 1, keep) [default: 0]
      --scale16           Forcibly reduce 16-bit images to 8-bit (lossy)
  -v, --verbose...        Run in verbose mode (use twice to increase verbosity)
  -q, --quiet             Run in quiet mode
  -f, --filters <list>    Filters to try (0-9; see '--help' for details)
      --fast              Use fast filter evaluation
      --zc <level>        Deflate compression level (1-12)
      --nb                Do not change bit depth
      --nc                Do not change color type
      --np                Do not change color palette
      --ng                Do not change to or from grayscale
      --nx                Do not perform any transformations
      --nz                Do not recompress unless transformations occur
      --fix               Disable checksum validation
      --force             Write the output even if it is larger than the input
  -Z, --zopfli            Use the much slower but stronger Zopfli compressor
      --timeout <secs>    Maximum amount of time to spend on optimizations
  -t, --threads <num>     Set number of threads to use [default: num CPU cores]
  -h, --help              Print help (see more with '--help')
  -V, --version           Print version

Run `oxipng --help` to see full details of all options
```

---------

Co-authored-by: Alejandro González <me@alegon.dev>
2023-10-10 00:39:37 +02:00
Andrew
0b3302316b Tidy some issue tests 2023-10-10 11:03:08 +13:00
Andrew
b808807198 Add test 2023-10-10 11:03:08 +13:00
Andrew
6763eea1e3 Combine palette reduction and sorting 2023-10-10 11:03:08 +13:00
Alejandro González
904beeec6b
Update zopfli to v0.8.0 (#560)
This update brings several parameterization and usage flexibility
improvements on Zopfli, allowing users to choose to limit execution time
by a number of iterations without improvement, and exposing a more
advanced `ZlibEncoder` struct to tune compression block sizes and
DEFLATE block types. Some minor microoptimizations were also made.

For now, I don't expect this PR to substantially affect how OxiPNG
compresses images using its Zopfli mode, but the additional parameter
customization may come in handy for future work improving how Zopfli is
used in OxiPNG.
2023-10-09 23:14:22 +02:00
dependabot[bot]
c16519b38b
Bump actions/checkout from 3 to 4 (#562)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to
4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node20 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li>Support fetching without the --progress option by <a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
<li>Release 4.0.0 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>@​takost</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li><a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p>
<h2>v3.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Mark test scripts with Bash'isms to be run via Bash by <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li>
<li>Add option to fetch tags even if fetch-depth &gt; 0 by <a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li>Release 3.6.0 by <a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li><a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p>
<h2>v3.5.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Checkout Issue in self hosted runner due to faulty submodule
check-ins by <a
href="https://github.com/megamanics"><code>@​megamanics</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li>Fix typos found by codespell by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li>Add support for sparse checkouts by <a
href="https://github.com/dscho"><code>@​dscho</code></a> and <a
href="https://github.com/dfdez"><code>@​dfdez</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
<li>Release v3.5.3 by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1376">actions/checkout#1376</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/megamanics"><code>@​megamanics</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li><a href="https://github.com/dfdez"><code>@​dfdez</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v3.5.3">https://github.com/actions/checkout/compare/v3...v3.5.3</a></p>
<h2>v3.5.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Use correct API url / endpoint in GHES by <a
href="https://github.com/fhammerl"><code>@​fhammerl</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1289">actions/checkout#1289</a>
based on <a
href="https://redirect.github.com/actions/checkout/issues/1286">#1286</a>
by <a href="https://github.com/1newsr"><code>@​1newsr</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.1...v3.5.2">https://github.com/actions/checkout/compare/v3.5.1...v3.5.2</a></p>
<h2>v3.5.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve checkout performance on Windows runners by upgrading
<code>@​actions/github</code> dependency by <a
href="https://github.com/BrettDong"><code>@​BrettDong</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/BrettDong"><code>@​BrettDong</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v4.1.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1396">Add
support for partial checkout filters</a></li>
</ul>
<h2>v4.0.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1067">Support
fetching without the --progress option</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1436">Update to
node20</a></li>
</ul>
<h2>v3.6.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark
test scripts with Bash'isms to be run via Bash</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/579">Add
option to fetch tags even if fetch-depth &gt; 0</a></li>
</ul>
<h2>v3.5.3</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1196">Fix:
Checkout fail in self-hosted runners when faulty submodule are
checked-in</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix
typos found by codespell</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1369">Add
support for sparse checkouts</a></li>
</ul>
<h2>v3.5.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1289">Fix
api endpoint for GHES</a></li>
</ul>
<h2>v3.5.1</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1246">Fix
slow checkout on Windows</a></li>
</ul>
<h2>v3.5.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1237">Add
new public key for known_hosts</a></li>
</ul>
<h2>v3.4.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1209">Upgrade
codeql actions to v2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1210">Upgrade
dependencies</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1225">Upgrade
<code>@​actions/io</code></a></li>
</ul>
<h2>v3.3.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1045">Implement
branch list using callbacks from exec function</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1050">Add
in explicit reference to private checkout options</a></li>
<li>[Fix comment typos (that got added in <a
href="https://redirect.github.com/actions/checkout/issues/770">#770</a>)](<a
href="https://redirect.github.com/actions/checkout/pull/1057">actions/checkout#1057</a>)</li>
</ul>
<h2>v3.2.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/942">Add
GitHub Action to perform release</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/967">Fix
status badge</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1002">Replace
datadog/squid with ubuntu/squid Docker image</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/964">Wrap
pipeline commands for submoduleForeach in quotes</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1029">Update
<code>@​actions/io</code> to 1.1.2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1039">Upgrading
version to 3.2.0</a></li>
</ul>
<h2>v3.1.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/939">Use
<code>@​actions/core</code> <code>saveState</code> and
<code>getState</code></a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/922">Add
<code>github-server-url</code> input</a></li>
</ul>
<h2>v3.0.2</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8ade135a41"><code>8ade135</code></a>
Prepare 4.1.0 release (<a
href="https://redirect.github.com/actions/checkout/issues/1496">#1496</a>)</li>
<li><a
href="c533a0a4cf"><code>c533a0a</code></a>
Add support for partial checkout filters (<a
href="https://redirect.github.com/actions/checkout/issues/1396">#1396</a>)</li>
<li><a
href="72f2cec99f"><code>72f2cec</code></a>
Update README.md for V4 (<a
href="https://redirect.github.com/actions/checkout/issues/1452">#1452</a>)</li>
<li><a
href="3df4ab11eb"><code>3df4ab1</code></a>
Release 4.0.0 (<a
href="https://redirect.github.com/actions/checkout/issues/1447">#1447</a>)</li>
<li><a
href="8b5e8b7687"><code>8b5e8b7</code></a>
Support fetching without the --progress option (<a
href="https://redirect.github.com/actions/checkout/issues/1067">#1067</a>)</li>
<li><a
href="97a652b800"><code>97a652b</code></a>
Update default runtime to node20 (<a
href="https://redirect.github.com/actions/checkout/issues/1436">#1436</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 11:03:01 +02:00
Andrew
8eb5a3f419 Remove libdeflate slack space no longer needed 2023-09-27 09:16:24 +13:00
Andrew
2293b32cce Update libdeflater 2023-09-27 09:16:24 +13:00
andrews05
25d0685bdf
Remove backup and check options (#546)
Tidy up the API by removing a couple of options we don't really need.
Backup was discussed in #542
Check was discussed in  #439

@shssoichiro Just say if you prefer to keep either of these 🙂
2023-09-26 09:52:51 +02:00
Winterhuman
fa47c82617
Add --timeout notice (#557)
Closes: https://github.com/shssoichiro/oxipng/issues/556

Adds a statement saying that `--timeout` isn't as useful for compression
algorithms which use fewer and slower rounds, which OxiPNG tends to use
nowadays.

---------

Co-authored-by: andrews05 <andrew@digerati.co.nz>
2023-09-26 09:43:38 +13:00
LuckyTurtleDev
b6a238c67a
skip non png files, if --recursive is used (#548)
Fix #547
2023-09-26 09:28:22 +13:00
andrews05
462e982784
Move file-specific options under OutFile (#529)
This PR is addressing #220. It's not super important but it's a breaking
change, so if it's something we want to do then I thought I should get
it in now before the next release.

- [x] pretend can become another variant of OutFile, probably
OutFile::None, as that's what it essentially is - just another output
destination and not a separate option
- [x] ~~backup and~~ preserve_attrs should become properties of
OutFile::Path variant (so that it would contain Path { path, ~~backup,~~
preserve_attrs }) as they don't have any effect on any other output and
so semantically belong there best

Closes #220
2023-09-25 11:15:13 +02:00
Alejandro González
b8ec65b3ca
Fix AArch64 CI builds 2023-09-02 19:25:24 +02:00
Alejandro González
1f2e0f336a
Revamp CI workflow to upload artifacts, cross-compile ARM64 binaries, and more (#534)
As commented in issues https://github.com/shssoichiro/oxipng/issues/444
and https://github.com/shssoichiro/oxipng/issues/518, there is some user
interest for distributing binaries for each unstable commit, and target
ARM64 platforms. Personally, I think both suggestions are useful for the
project, as uploading binary artifacts for each commit might help
interested users to catch regressions and give feedback earlier, and
powerful ARM64 platforms are becoming increasingly popular due to some
cloud services (e.g., Amazon EC2, Azure VMs, Oracle Cloud) offering
cheaper plans for this hardware, in addition to the well-known push for
ARM by Apple with their custom M1 chips.

These changes make the CI target ARM64 as a first-class citizen. Because
the public GitHub actions runners can only be hosted on x64 for now, I
resorted to cross-compilation, [Debian's
multiarch](https://elinux.org/images/d/d8/Multiarch_and_Why_You_Should_Care-_Running%2C_Installing_and_Crossbuilding_With_Multiple_Architectures.pdf),
and QEMU to build, get ARM64 C library dependencies, and run tests,
respectively.

When the CI workflow finishes, a release CLI binary artifact is now
uploaded, which can be downloaded from the workflow run page on the
GitHub web interface.

In addition, these changes also introduce some cleanup and miscellaneous
improvements and changes to the CI workflow:

- Tests are run using [`nextest`](https://nexte.st/) instead of `cargo
test`, which substantially speeds up their execution. (On my development
workstation, `cargo test --release` takes around 10.67 s, while `cargo
nextest run --release` takes around 6.02 s.)
- The dependencies on unmaintained `actions-rs` actions were dropped in
favor of running Cargo commands directly, or using
`giraffate/clippy-action` for pretty inline annotations for Clippy. This
gets rid of the deprecation warnings for each workflow run.
- Most CI steps are run with a nightly Rust toolchain now, which allows
to take advantage of the latest Clippy lints and codegen improvements.
In my experience, when not relying on specific nightly features or
compiler internals, Rust does a pretty good job at making it possible to
rely on a rolling-release compiler for CI, as breakage is extremely rare
and thus offset by the improved features.
- The MSRV check was moved to a separate job with less steps, so that it
takes less of a toll on total workflow run minutes.

## Pending tasks

- [x] Generate universal macOS binaries with `lipo` (i.e., containing
both `aarch64` and `x64` code)
- [x] Tirelessly fix the stupid errors that tend to happen when
deploying a new CI workflow for the first time
- [x] Think what to do with the `deploy.yml` workflow. Should it fetch
artifacts from the CI job instead of building them again?
- [x] Maybe bring back 32-bit Windows binaries. Are they actually useful
for somebody, or just a way to remember the good old days?

---------

Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
2023-09-02 11:09:20 -04:00
andrews05
aa956fbc47
Ensure --nx --nz disables all optimisations (#543)
This PR makes two changes:
- `--nz` (`idat_recoding`) now disables all zlib recompression,
including iCCP and fDAT chunks. (Perhaps we should rename the option to
`zlib_recompression`?)
- `--nx` now also disables the default deinterlacing, though it can
still be overridden with `-i`.

`--nx --nz` does disable all optimisations in the v8 release and we
should ensure it continues to do so in the next release. (This is
related to discussions around removing the `--check` option.)
2023-09-02 09:00:09 -04:00
Andrew
02bd47ba29 Don't style debug and trace output 2023-07-31 11:55:10 -04:00
Vladyslav Vladinov
708a019ce2
Added support for glob patterns in quotes (#536)
Added support for glob patterns in windows paths with spaces that
surrounded with quotes

closes #373
2023-07-31 11:35:00 -04:00
Andrew
0288cc38fc Don't fail recursion on read_dir error 2023-07-31 11:05:25 -04:00
Andrew
b4e98a4dd1 Switch from stderrlog to env_logger 2023-07-14 14:11:07 -04:00
andrews05
b883c660fc
Additional palette sorting algorithm (#514)
This adds a new palette sorting algorithm that attempts to minimise
entropy by an approximate solution to the Traveling Salesman Problem.
The algorithm comes from "An efficient Re-indexing algorithm for
color-mapped images" by Battiato et al
(https://ieeexplore.ieee.org/document/1344033).
It's fast and effective and works in addition to the luma sort (which
remains the single most effective sort). In order to keep lower presets
fast though, I've only enabled this for o3 and higher.

Results on a set of 190 indexed images at `-o5`:
18,932,727 bytes - master
18,578,306 bytes - PR
18,559,863 bytes - PR + #509
(These images may be particularly suited to alternative sorting methods
- the gains here are not necessarily what should be expected on average)

Note I looked into the 120 different palette sorting methods from
TruePNG, as mentioned in #74 (and seen in action in the Zopfli KrzYmod
fork). They're... largely ineffective. The combination of all 120
methods are outperformed by just the existing luma sort plus this new
one. That's not to say there's nothing further to be gained from them,
but trying to brute force all the combinations definitely seems like a
bad idea. There are other algorithms I hope to explore in future...

@ace-dent Thought this might interest you


UPDATE: I realised a quick tweak to alpha values in the luma sort can
provide a great improvement on images with transparency. The following
numbers were taken with PR #509 as base.
`-o2`:
19,065,549 bytes - base (luma sort)
18,949,747 bytes - modified luma sort

`-o5`:
18,922,165 bytes - base (luma sort)
18,559,863 bytes - new sorting algorithm + luma sort
18,544,813 bytes - new sorting algorithm + modified luma sort
2023-07-11 12:33:57 -04:00
andrews05
4ae64c568b
Process files in parallel (#531)
This PR makes the oxipng binary process multiple files in parallel,
finally fulfilling #275. There seemed to be some debate about whether
oxipng _should_ do this or not but there's a couple of reasons I think
it makes sense:
1. The concern seemed mostly around the complexity of such a feature.
Not to worry, it was trivial* 🙂
2. Since then, oxipng has dropped from a max of something like 180
simultaneous compression trials down to 10, which is very much a good
thing but it does mean it's not utilising any more cores than that.

Some benchmarks on around 100 files on a machine with 8 cores:
Level | Master time | PR time
-|-|-
2 | 28.303 | 19.005
3 | 36.507 | 23.089
5 | 1:10.86 | 1:16.01

*Some additional changes were required in order to make sure sensible
output is printed to the terminal, since things won't be in order
anymore. Here's some example output from before:
```
Processing: tests/files/fully_optimized.png
    file size = 67 bytes (0 bytes = 0.00% decrease)
File already optimized
Processing: tests/files/corrupted_header.png
Invalid PNG header detected
Processing: tests/files/verbose_mode.png
    file size = 102480 bytes (12228 bytes = 10.66% decrease)
Output: tests/files/verbose_mode.png
```
And after:
```
Processing: tests/files/verbose_mode.png
Processing: tests/files/fully_optimized.png
Processing: tests/files/corrupted_header.png
tests/files/corrupted_header.png: Invalid PNG header detected
tests/files/fully_optimized.png: Could not optimize further, no change written
102480 bytes (10.66% smaller): tests/files/verbose_mode.png
```

Closes #275, #84, #169, #196 and #419.

[edit] This is the last thing I wanted to land before the next release 🥳
2023-07-11 03:45:10 -04:00
Josh Holmer
31e796c4e8 Revert "Provide BufferedZopfliDeflater and allow user to pass in a custom Deflater (#530)"
This reverts commit 2a59419bdf.
2023-07-09 13:40:20 -04:00
Andrew
775e718dff Stop yielding once evaluations are done 2023-07-08 18:57:15 -04:00
andrews05
39b00910ae
Use stronger compression in eval (#509) 2023-07-08 18:54:58 -04:00
Josh Holmer
2a59419bdf
Provide BufferedZopfliDeflater and allow user to pass in a custom Deflater (#530)
* Add .whitesource configuration file

* Experimental: allow Zopfli to use any size BufWriter

* Allow user to specify the output buffer size as well

* Allow user to specify maximum block splits

* Reformat and fix warnings

* Use deflater on iCCP chunk as well

* Bug fix: need to implement Zlib format

* Make functions const when possible

* Switch to using zopfli::Options in prep for https://github.com/zopfli-rs/zopfli/pull/21

* Switch to using zopfli::Options in prep for https://github.com/zopfli-rs/zopfli/pull/21

* Cargo fmt

* Fix compilation

* Fix tests

* Fix more lints

* Fix more lints

* Fix compilation more

---------

Co-authored-by: mend-bolt-for-github[bot] <42819689+mend-bolt-for-github[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennick <hennickc@amazon.com>
Co-authored-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
2023-07-07 22:35:01 -04:00
andrews05
b846a2e909
Try to pick tRNS value that's valid at low depth (#520) 2023-07-07 20:56:15 -04:00
andrews05
75a0f0de95
Allow APNG with reductions disabled (#511) 2023-07-05 00:47:43 -04:00
Josh Holmer
d81236f71e
Add default features note to readme (#528) 2023-07-05 00:44:06 -04:00
Andrew
129f1e6f76 Try to fix deadlock in parallel mode 2023-06-25 14:36:23 -04:00
andrews05
798fdfe24c
Update rust and dependencies (#525)
* Bump rust version

* Update Clap to v4

* Update other dependencies
2023-06-25 14:24:23 -04:00
andrews05
96122fa45a
Expand low depths to 8-bit (#516)
* Keep track of number of pixels in each scanline

* Expand depth to 8-bit

* Attempt expand bit depth

* Simplify tracking of reduction_occurred

* Fix test

* Simplify depth handling in reductions

* Add tests for disabled reductions
2023-06-18 01:32:47 -04:00
Andrew
c71fd44454 Prevent conversion from grayscale when disabled 2023-06-18 01:02:11 -04:00
Andrew
86fccf082a Fix grayscale_reduction option 2023-05-28 16:11:41 -04:00
Alejandro González
12761bbfb1
Update Zopfli and several other depenencies (#512)
* Update Zopfli and several other depenencies

I've just published a new Zopfli release, v0.7.3, which includes several
new features and internal refactors. Performance should be a tad bit
better, but I didn't test it throughly, so YMMV. Perhaps more
importantly for OxiPNG, its dependency tree is smaller, and
Gzip-exclusive compression code can be excluded at compile time thanks
to new feature switches. As I mentioned on
https://github.com/shssoichiro/oxipng/pull/495#issuecomment-1552669505,
I plan on delivering more significant Zopfli performance improvements at
some point, but for now I think it's good to give the new release more
real-world usage and testing 😄

While at it, I've upgraded other dependencies that are not
performance-critical to their latest semver-compatible versions. This
excludes `libdeflater` on purpose, as its performance characteristics
are said to be somewhat different.

* Update Zopfli to v0.7.4

v0.7.3 was superseeded shortly after v0.7.3 was released to address a
last minute change to the new API it introduced. OxiPNG is not affected
by this, but I think it's good practice to update Zopfli anyway.
2023-05-28 13:45:46 -04:00
Andrew
88b930b5b1 Add scale16 option to force 16-bit reduction 2023-05-24 10:21:42 -04:00
Andrew
c1222368b4 Deinterlace by default 2023-05-24 10:13:40 -04:00
andrews05
ea5f1884be
Refactor aux chunk handling (#505) 2023-05-21 15:34:23 -04:00
XhmikosR
a5832706bd Create dependabot.yml for action updates 2023-05-19 18:03:24 -04:00
andrews05
d8b7ebaf47
Further small reduction improvements (#504) 2023-05-16 20:53:05 -04:00
andrews05
9a500941d8
Raw API (#482) 2023-05-15 08:37:49 -04:00
Andrew
a7be8751dc Don't force output due to interlacing flag 2023-05-09 09:59:45 -04:00
andrews05
2f622fc7bd
Minor reduction improvements (#502)
* Fix bKGD conversion from gray to palette

* Allow grayscale reduction from 16 to 4 or less

* Refactor reduction evaluation sequence

* Separate palette into new file
2023-05-07 17:46:58 -04:00
andrews05
a26d225d81
More flexible verbosity, improve verbose test (#501)
* More flexible verbosity, improve verbose test

* Tweak reporting format

* Add evaluation reporting at trace level
2023-05-06 10:45:31 -04:00
Andrew
798a120926 Include PLTE/tRNS size in evaluations 2023-04-29 01:20:22 -04:00
andrews05
c97572be3e
ColorType Refactor (#500)
* Refactor ColorType
Move transparency and palette data into the ColorType

* Fixup tests

* Make more use of helper functions

* Change BitDepth to u8 representation with TryFrom

* Fix clippy lints

* Don't use unstable language features

* Restore documentation on transparency/palette
2023-04-27 19:49:54 -04:00
XhmikosR
36af4198ed Enforce LF
On Windows `autocrlf` is `true` by default. This makes sure LF is used everywhere.
2023-04-27 19:44:05 -04:00
XhmikosR
e88b9be12b Update CI
* add `workflow_dispatch` for manual running
* add `fail-fast` false in matrix
* specify `persist-credentials: false` for actions/checkout
* update actions to the latest versions
* move cache before installing the toolchain
* cache more stuff
* limit deploy to shssoichiro/oxipng repository
* reindent
2023-04-24 20:22:25 -04:00
Alejandro González
be19ed592d
Make dependency on image optional (#498)
* Make dependency on `image` optional

After PR https://github.com/shssoichiro/oxipng/pull/481 was merged, the
`image` dependency became unused when building with debug assertions
disabled, as it is only used to implement output sanity checks when such
assertions are enabled.

The `image` crate transitively pulls a significant amount of
dependencies, so it's useful for OxiPNG users to get rid of them when
not needed.

[Cargo does not allow specifying dependencies that are only pulled when
debug assertions are
enabled](https://github.com/rust-lang/cargo/issues/7634), so the next
best way to give users some flexibility is to gate those debug
assertions behind a feature flag.

These changes add a `sanity-checks` feature flag that controls whether
the `image` crate and the related sanity checks are compiled in. This
feature is enabled by default to keep debug builds useful to catch
problems during development.

* Fix Clippy lints

* Run tests with new sanity-checks feature enabled
2023-04-24 13:24:23 -04:00
XhmikosR
110eae7c19 Update .editorconfig 2023-04-22 23:37:16 -04:00
Josh Holmer
a234c39e41 Fix new annoyingly pedantic clippy warnings 2023-04-22 22:25:59 -04:00
Alejandro González
0ff1049eb7 Gate dependency on crossbeam-channel behind the parallel feature
`crossbeam-channel` is only used if the `parallel` flag is enabled, so
it can be gated behind that feature flag to potentially reduce the size
of the build dependency tree for dependent projects.

While at it, I've fixed several warnings emmitted in tests/flags.rs.
2023-04-16 20:05:38 -04:00
Alejandro González
f78586ff7b Remove now unused itertools dependency
The `itertools` dependency became unused at a3b104a2ed, so there is no point in declaring it as a dependency any longer.

This was detected with the help of the
[`cargo-udeps`](https://github.com/est31/cargo-udeps) tool. I then
verified that it was not a false positive.
2023-04-16 20:03:32 -04:00
Douman
cc37f645ba
Refactoring to use appropriate log level for debug logs (#489) 2023-04-04 00:48:01 -04:00
Josh Holmer
5341de2163 Fix new clippy lints 2023-04-03 23:50:03 -04:00
David Apirian
fd5027a017 Add docs for usage via trunk.io 2023-03-19 13:52:48 -04:00
Andrew
d43e63f562 Remove test 167 which is no longer relevant 2023-01-06 15:35:05 -05:00
Andrew
a874fe9cb7 Remove incorrect comment 2023-01-06 15:35:05 -05:00
Andrew
87ba51c936 Fix reduction reporting when no reduction occured 2023-01-06 15:35:05 -05:00
Josh Holmer
95d521c81b Version 8.0.0
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2022-12-24 09:19:15 -05:00
andrews05
91e29144b0
Change validation to a debug assert (#481) 2022-12-22 17:05:38 -05:00
andrews05
a3b104a2ed
Faster reductions (#479)
* Add grayscale depth tests and benches

* Don't include filter byte in PngImage.data

* Simplify reductions by not using scan lines

* Faster grayscale reduction

* Simplify reduce_color_type

* Faster depth reduction
2022-12-22 16:56:36 -05:00
andrews05
2008d09915
Reduce alpha to tRNS (#477) 2022-12-13 15:18:19 -05:00
andrews05
2599b9fe82
Tweaks to interlacing and format display (#476) 2022-12-12 09:54:35 -05:00
Andrew
815f12df46 Fix fast with zopfli 2022-12-10 21:47:49 -05:00
andrews05
131a3c6af7
🚀 Revamp alpha optimisation (#475) 2022-12-10 21:14:50 -05:00
andrews05
54ee621e41
Fix Grayscale depth reduction with tRNS (#470) 2022-12-08 06:11:26 -05:00
Josh Holmer
19be14021b Version 7.0.0
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2022-12-07 14:17:15 -05:00
andrews05
bd5a0b526b
More Reductions (#468)
* Add test for issue 195

* Reduce grayscale alpha to palette

* Black alpha before color type reductions
2022-12-07 13:22:13 -05:00
andrews05
1934587253
Rebalance presets (#467)
* Add --fast option

* Rebalance presets

* Retain filtered idat
2022-12-07 08:09:19 -05:00
andrews05
3365aca12f
Palette reduction fixes (#466)
* Verify bKGD in tests

* Don't truncate bKGD on output

* Make sure correct bKGD is retained

* Update safe chunk list

* Perform strip first

* Check entire palette map
2022-12-07 07:49:52 -05:00
Mihai Galos
bab00cb961
Dockerize Oxipng (#462) 2022-12-02 05:35:14 -05:00
andrews05
6022fc2aa1
Refactor use_heuristics for fast filter evaluation (#463) 2022-12-02 05:34:38 -05:00
Andrew
15a9b4a3e7 Fast deinterlace for 8-bit+ 2022-11-25 04:23:38 -05:00
andrews05
a41d7de348
New filter strategies (#461)
* Refactor filters as enum

* Include filter byte in filter output

* Add entropy filter

* Add bigrams filter

* Add bigram entropy filter

* Add brute filter

* Replace bit-vec

* Add tests and benches

* Show filters in help

* Use FxHasher in color to palette

* Use windows function for minor improvement
2022-11-19 08:49:25 -05:00
andrews05
420d904ba9
Strengthen alpha reductions (#460)
* Improve up and left alpha reductions

* Disable alpha down and right by default

* Improve performance of up
2022-11-01 19:13:24 -04:00
andrews05
446c788eb3
Full switch to Libdeflater (#457)
* Switch main compressor to libdeflate

* Use libdeflater in evaluate

* Use libdeflater to inflate

* Use libdeflater crc

* Tidy up

* Fix benches

* Allow libdeflater/freestanding feature

* Fix building without zopfli
2022-11-01 09:02:08 -04:00
andrews05
f688d20fe6
Allow setting libdeflate compression level (#455)
* Allow --zc with libdeflater

* Update libdeflater

* Allocate sufficient space for libdefate
2022-10-28 21:54:04 -04:00
andrews05
a02d4ff0dd
Fix directional alpha reductions (#458)
* Fix alpha up and down

* Fix alpha left and right
2022-10-28 19:41:44 -04:00
Andrew
8396a262c3 Fix level 0 2022-10-28 15:40:58 -04:00
Tristan
86a72ea127 Avoid printing output bytes on decompress error
Instead, print the number of bytes decompressed so far

Fixes #452
2022-10-07 14:47:34 -04:00
Alejandro González
9479f5f4f5 Version 6.0.1
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2022-09-07 11:50:33 -04:00
Alejandro González
9aa27a75bd Bump dependencies. Fix Zopfli mode generating corrupt images sometimes 2022-09-07 11:50:33 -04:00
Josh Holmer
5fe6350c68
Update CHANGELOG.md 2022-09-05 13:07:05 -04:00
Josh Holmer
5810ae4f49
Version 6.0.0 (#448)
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2022-09-05 13:05:52 -04:00
Alejandro González
84bbec0666
Add initial support for changing Zopfli iterations (#446)
* Update and optimize dependencies

These changes update the dependencies to their latest versions, fixing
some known issues that prevented doing so in the first place.

In addition, the direct dependency on byteorder was dropped in favor
of stdlib functions that have been stabilized for some time in Rust, and
the transitive dependency on chrono, pulled by stderrlog, was also
dropped, which had been affected by security issues and improperly
maintained in the past:

- https://github.com/cardoe/stderrlog-rs/issues/31
- https://www.reddit.com/r/rust/comments/ts84n4/chrono_or_time_03/

* Run rustfmt

* Bump MSRV to 1.56.1

Updating to this patch version should not be cumbersome for end-users,
and it is required by a transitive dependency.

* Bump MSRV to 1.57.0

os_str_bytes requires it.

* Add initial support for changing Zopfli iterations

PR https://github.com/shssoichiro/oxipng/pull/445 did some dependency
updates, which included using the latest zopfli version. The latest
version of this crate exposes new options in its API that allow users to
choose the desired number of Zopfli compression iterations, which
may greatly affect execution time. In fact, other optimizers such as
zopflipng dynamically select this number depending on the input file
size (see: https://github.com/shssoichiro/oxipng/issues/414).

As a first step towards making OxiPNG deal with Zopfli better, let's add
the necessary options for libraries to be able to choose the number of
iterations. This number is still fixed to 15 as before when using the
CLI.

* Fix Clippy lint

Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
2022-09-05 12:50:13 -04:00
Alejandro González
94ba8b70b3
Update and optimize dependencies (#445)
* Update and optimize dependencies

These changes update the dependencies to their latest versions, fixing
some known issues that prevented doing so in the first place.

In addition, the direct dependency on byteorder was dropped in favor
of stdlib functions that have been stabilized for some time in Rust, and
the transitive dependency on chrono, pulled by stderrlog, was also
dropped, which had been affected by security issues and improperly
maintained in the past:

- https://github.com/cardoe/stderrlog-rs/issues/31
- https://www.reddit.com/r/rust/comments/ts84n4/chrono_or_time_03/

* Run rustfmt

* Bump MSRV to 1.56.1

Updating to this patch version should not be cumbersome for end-users,
and it is required by a transitive dependency.

* Bump MSRV to 1.57.0

os_str_bytes requires it.
2022-09-05 12:37:47 -04:00
dependabot[bot]
e5d1c7dbaa Bump thread_local from 1.0.1 to 1.1.4
Bumps [thread_local](https://github.com/Amanieu/thread_local-rs) from 1.0.1 to 1.1.4.
- [Release notes](https://github.com/Amanieu/thread_local-rs/releases)
- [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.0.1...1.1.4)

---
updated-dependencies:
- dependency-name: thread_local
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 08:56:21 +00:00
dependabot[bot]
9b14628364 Bump ansi-regex from 6.0.0 to 6.0.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 08:41:53 +00:00
Matt Riggott
703a25efad Update stderrlog dependency to v0.5.1
Oxipng has an optional dependency on stderrlog, which itself has a
dependency on thread_local. Versions of thread_local < 1.1.4 have a
vulnerability caused by a data race in Iter and IterMut. Updating to
stderrlog v0.5.1 ensures that Oxipng uses a patched version of
thread_local.

https://rustsec.org/advisories/RUSTSEC-2022-0006.html
2022-07-05 10:28:12 -04:00
Josh Holmer
17f5cc36ca Fix clippy lints 2022-07-05 10:05:06 -04:00
carbotaniuman
9054b2d947 Add check option 2022-05-07 23:48:06 -04:00
Rémi Lauzier
7ffbe1fb78 Update dependency and replace deprecated function 2022-03-14 09:21:22 -04:00
Adam Johnson
acdd66b4c5
Add pre-commit hook declaration (#431)
Fixes #429.
2022-01-14 21:55:48 -05:00
Josh Holmer
faf10c64a9 Bump edition to 2021, along with min rust version 2022-01-12 11:50:33 -05:00
Josh Holmer
ece9787822 Bump all dependencies 2022-01-12 02:47:59 -05:00
Josh Holmer
7f6fe08b06 Format cargo.toml using prettier 2022-01-12 02:41:13 -05:00
Josh Holmer
f5053f65bb Add min rust version to Cargo.toml 2022-01-12 02:40:51 -05:00
Josh Holmer
c888142bcb Version 5.0.1
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2021-11-15 11:42:06 -05:00
Josh Holmer
bc0d673af0 Fix a hard error in clippy 2021-11-15 11:41:40 -05:00
Nino Burini
2d16819cbf
apply_preset_5 and apply_preset_6 to set correct compression levels. (#425)
The for loop in apply_preset_5 was not including 9.
apply_preset_6 now builds now calls apply_preset_4 instead of
apply_preset_5, and adds all compression levels from 1 to 9.

Co-authored-by: Nino Burini <nburini@jabra.com>
2021-11-15 11:17:52 -05:00
Josh Holmer
8053211bf4 Version 5.0.0
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2021-07-12 00:06:19 -04:00
Josh Holmer
bd432c470d Bump minimum rustc to 1.46, required by crc 2.0 2021-07-11 23:54:29 -04:00
Josh Holmer
44d89ecff4 Fix clippy lints 2021-07-11 23:42:37 -04:00
Josh Holmer
d089176030 Bump dependencies 2021-07-11 23:42:12 -04:00
Moe
40a88f57f7
initial implementation of timestamp preservation #166 (#360)
Closes #166
2021-07-11 23:34:10 -04:00
Alejandro González
491d753edc
Add option to skip grayscale reduction of RGB(A) images (#409)
For RGB(A) images that contain gray colors, this reduction can achieve
significant space savings. However, in the absence of gamma correction
data, some PNG decoders assume more exotic color spaces for grayscale
images instead of the ubiquitous sRGB. This results in gamma
miscorrection, and for the end user this means that colors will look
wrong, like "washed-out". Java's ImageIO class, which is popular in the
JVM world to read PNG files, uses rather unconventional defaults, as
explained in this StackOverflow question: https://stackoverflow.com/questions/31312645/java-imageio-grayscale-png-issue

Gamma miscorrection problems aside, OxiPNG currently tries hard to
reduce RGB(A) images to grayscale, because it expects that reduction to
be quite effective. However, in some cases, OxiPNG generates smaller
PNG files when reducing grasycale RGB(A) images to paletted color than
actual grayscale color. For example, let's say that "~/gray.png" is a
256x256 RGBA image entirely filled with (119, 119, 119, 255) pixels.
OxiPNG, by default, reduces this image to grayscale and achieves a
68.23% decrease:

$ cargo build --release && target/release/oxipng -omax --out ~/out.png ~/gray.png
Processing: /home/user/gray.png
    256x256 pixels, PNG format
    4x8 bits/pixel, RGBA
    IDAT size = 604 bytes
    File size = 661 bytes
Reducing image to 1x4 bits/pixel, Grayscale
Trying: 144 combinations
Found better combination:
    zc = 6  zs = 0  f = 0        153 bytes
    IDAT size = 153 bytes (451 bytes decrease)
    file size = 210 bytes (451 bytes = 68.23% decrease)
Output: /home/user/out.png

However, if the --ng option that this commit adds is used to skip the
grayscale reduction step, OxiPNG reduces to a single color palette
instead, which is much more efficient, achieving a 84.42% decrease:

$ cargo build --release && target/release/oxipng -omax --ng --out ~/out.png ~/gray.png
Processing: /home/alejandro/gray.png
    256x256 pixels, PNG format
    4x8 bits/pixel, RGBA
    IDAT size = 604 bytes
    File size = 661 bytes
Reducing image to 1 bits/pixel, 1 colors in palette
Trying: 144 combinations
Found better combination:
    zc = 3  zs = 3  f = 0        31 bytes
    IDAT size = 31 bytes (573 bytes decrease)
    file size = 103 bytes (558 bytes = 84.42% decrease)
Output: /home/alejandro/out.png

While OxiPNG should arguably be made smarter to better handle these
cases, in the meantime, adding an option to manually skip that grayscale
reduction can't hurt. In fact, it may even help users achieving the most
out of current versions of OxiPNG, and developers reasoning about what
makes a grayscale-like RGB(A) image compress better with a color
palette.

Due to the reasons stated above, this adds a simple "grayscale_reduction"
option to the Options struct, and a "no-grayscale-reduction" command
line switch, that makes OxiPNG not try this problematic grayscale
reduction on RGB(A) images.
2021-07-11 23:21:38 -04:00
Josh Holmer
c4e46b2f3e Update npm packages (used for the benchmark script) 2021-07-11 23:12:32 -04:00
Josh Holmer
06e3feeee1 Use separate file for issue_182 test
Closes #412
2021-07-11 23:10:57 -04:00
Kornel
ea75f6ccc1
Handle files with invalid filters (#410)
The bad filter case is reachable, and can happen when the PNG file is corrupted.
2021-07-11 23:07:18 -04:00
Rémi Lauzier
286aaffa31 small fix 2021-06-24 19:47:21 -04:00
Rémi Lauzier
91a18ebe97 Fix some clippy warnings 2021-06-24 15:57:41 -04:00
Kornel
c4910709d9 Assertions 2021-06-16 19:39:05 -04:00
Kornel
3e996a0f82 Make sure passes clear last line 2021-06-16 19:39:05 -04:00
Kornel
dac408627b bit-vec is too slow for debug mode 2021-06-16 17:37:33 -04:00
Kornel
f8bb4fa637 Fix tests without default features 2021-06-16 17:37:33 -04:00
Kornel
d2cebc3c2d Don't allocate reduced buffer until needed 2021-06-16 17:37:33 -04:00
dependabot[bot]
a38b2fd943
Bump hosted-git-info from 2.5.0 to 2.8.9 (#402)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.5.0 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-20 03:45:08 -04:00
Kornel
b6cc8e2414
Optimize unfiltering (#400)
* Clippy lints

* Fewer pushes

* Remove special case for empty last line

* Zip with last line

* Combine bound checks
2021-05-19 15:16:14 -04:00
Kornel
14867c7abc
Clippy lints (#401) 2021-05-19 10:04:31 -04:00
dependabot-preview[bot]
ef3bb7444b Bump image from 0.23.13 to 0.23.14
Bumps [image](https://github.com/image-rs/image) from 0.23.13 to 0.23.14.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.13...v0.23.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-03 10:45:52 +00:00
dependabot-preview[bot]
6c7c067662 Bump libc from 0.2.86 to 0.2.87
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.86 to 0.2.87.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.86...0.2.87)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-02 10:49:32 +00:00
dependabot-preview[bot]
19eff4755b Bump adler from 1.0.1 to 1.0.2
Bumps [adler](https://github.com/jonas-schievink/adler) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/jonas-schievink/adler/releases)
- [Changelog](https://github.com/jonas-schievink/adler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonas-schievink/adler/compare/v1.0.1...v1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-01 15:48:51 +00:00
dependabot-preview[bot]
eb7c5be7cc Bump crossbeam-epoch from 0.9.2 to 0.9.3
Bumps [crossbeam-epoch](https://github.com/crossbeam-rs/crossbeam) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-epoch-0.9.2...crossbeam-epoch-0.9.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-01 15:31:13 +00:00
dependabot-preview[bot]
6fe1fb39fb Bump crossbeam-utils from 0.8.2 to 0.8.3
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.2...crossbeam-utils-0.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 11:05:09 +00:00
dependabot-preview[bot]
0be3631788 Bump miniz_oxide from 0.4.3 to 0.4.4
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 10:53:40 +00:00
Kornel
f2e89140ed
Prevent panics in parse_ihdr_header (#392) 2021-02-24 15:48:30 -05:00
dependabot-preview[bot]
f44b5aa2d0 Bump bytemuck from 1.5.0 to 1.5.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-24 20:00:55 +00:00
dependabot-preview[bot]
c6337398df Bump cc from 1.0.66 to 1.0.67
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.66 to 1.0.67.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.66...1.0.67)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-24 19:47:22 +00:00
dependabot-preview[bot]
b0c6c4195e Bump crossbeam-utils from 0.8.1 to 0.8.2
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.1...crossbeam-utils-0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-24 19:30:15 +00:00
dependabot-preview[bot]
5c1e2636c2 Bump crossbeam-epoch from 0.9.1 to 0.9.2
Bumps [crossbeam-epoch](https://github.com/crossbeam-rs/crossbeam) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-epoch-0.9.1...crossbeam-epoch-0.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-24 19:08:21 +00:00
Josh Holmer
76da6b5468 Fix Rust 1.50 clippy error 2021-02-24 13:51:47 -05:00
dependabot-preview[bot]
f8e4a8b170 Bump libc from 0.2.85 to 0.2.86
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.85 to 0.2.86.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.85...0.2.86)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-09 10:55:52 +00:00
dependabot-preview[bot]
aaee0a6a2e Bump image from 0.23.12 to 0.23.13
Bumps [image](https://github.com/image-rs/image) from 0.23.12 to 0.23.13.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.12...v0.23.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-05 10:49:02 +00:00
dependabot-preview[bot]
9abb757c31 Bump libc from 0.2.84 to 0.2.85
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.84 to 0.2.85.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.84...0.2.85)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-02 10:46:31 +00:00
dependabot-preview[bot]
da78af20ac Bump libc from 0.2.83 to 0.2.84
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.83 to 0.2.84.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-29 10:30:31 +00:00
dependabot-preview[bot]
dddcffb633 Bump libc from 0.2.82 to 0.2.83
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.82 to 0.2.83.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.82...0.2.83)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-28 10:45:08 +00:00
dependabot-preview[bot]
c73a6b4a83 Bump log from 0.4.13 to 0.4.14
Bumps [log](https://github.com/rust-lang/log) from 0.4.13 to 0.4.14.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.13...0.4.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-27 10:31:40 +00:00
Kornel
04010978a0 Use optimized copy 2021-01-20 14:33:27 -05:00
Kornel
3163a92594 Ignore broken tRNS 2021-01-20 14:33:27 -05:00
Kornel
53ddd721a7 Reject truncated image data instead of panicking 2021-01-20 14:33:27 -05:00
Kornel
17212477c5 Avoid asserts panicking on broken files 2021-01-20 14:33:27 -05:00
dependabot-preview[bot]
db289689b8 Bump hermit-abi from 0.1.17 to 0.1.18
Bumps [hermit-abi](https://github.com/hermitcore/libhermit-rs) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/hermitcore/libhermit-rs/releases)
- [Commits](https://github.com/hermitcore/libhermit-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-18 11:29:28 +00:00
dependabot-preview[bot]
b2bb4e1888 Bump rustc_version from 0.3.2 to 0.3.3
Bumps [rustc_version](https://github.com/Kimundi/rustc-version-rs) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/Kimundi/rustc-version-rs/releases)
- [Commits](https://github.com/Kimundi/rustc-version-rs/compare/v0.3.2...v0.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-18 11:16:13 +00:00
dependabot-preview[bot]
618da006a5 Bump bytemuck from 1.4.1 to 1.5.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.4.1...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-14 11:03:21 +00:00
dependabot-preview[bot]
228c43890f Bump rustc_version from 0.3.0 to 0.3.2
Bumps [rustc_version](https://github.com/Kimundi/rustc-version-rs) from 0.3.0 to 0.3.2.
- [Release notes](https://github.com/Kimundi/rustc-version-rs/releases)
- [Commits](https://github.com/Kimundi/rustc-version-rs/compare/v0.3.0...v0.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-12 11:04:13 +00:00
dependabot-preview[bot]
f71ed29e96 Bump log from 0.4.11 to 0.4.13
Bumps [log](https://github.com/rust-lang/log) from 0.4.11 to 0.4.13.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.11...0.4.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-11 11:54:45 +00:00
dependabot-preview[bot]
9d55331980 Bump byteorder from 1.3.4 to 1.4.2
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.3.4 to 1.4.2.
- [Release notes](https://github.com/BurntSushi/byteorder/releases)
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.4...1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-11 11:41:50 +00:00
dependabot-preview[bot]
0b4221d7f3 Bump stderrlog from 0.5.0 to 0.5.1
Bumps [stderrlog](https://github.com/cardoe/stderrlog-rs) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/cardoe/stderrlog-rs/releases)
- [Changelog](https://github.com/cardoe/stderrlog-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cardoe/stderrlog-rs/compare/v0.5.0...v0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-11 11:26:03 +00:00
dependabot-preview[bot]
12f412d915 Bump libc from 0.2.81 to 0.2.82
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.81 to 0.2.82.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.81...0.2.82)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-08 11:08:15 +00:00
dependabot-preview[bot]
7ea5c4d38c Bump const_fn from 0.4.4 to 0.4.5
Bumps [const_fn](https://github.com/taiki-e/const_fn) from 0.4.4 to 0.4.5.
- [Release notes](https://github.com/taiki-e/const_fn/releases)
- [Changelog](https://github.com/taiki-e/const_fn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/const_fn/compare/v0.4.4...v0.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-06 12:52:24 +00:00
dependabot-preview[bot]
b45ab40b21 Bump semver-parser from 0.10.1 to 0.10.2
Bumps [semver-parser](https://github.com/steveklabnik/semver-parser) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/steveklabnik/semver-parser/releases)
- [Commits](https://github.com/steveklabnik/semver-parser/commits/v0.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-06 12:40:52 +00:00
Josh Holmer
dea23211ae Version 4.0.3
Some checks failed
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2021-01-04 16:12:57 -05:00
Josh Holmer
9b5cd9a1a4 Fix a new clippy lint 2021-01-04 16:12:46 -05:00
Josh Holmer
1ebe7b01bc Temporarily disable i686 binaries so that amd64 binaries at least will get published 2021-01-04 16:00:31 -05:00
dependabot-preview[bot]
17a8c79e21 Bump itertools from 0.9.0 to 0.10.0
Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/bluss/rust-itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bluss/rust-itertools/compare/v0.9.0...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-29 08:10:23 -05:00
dependabot-preview[bot]
9c55fcfcbf Bump indexmap from 1.6.0 to 1.6.1
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.6.0...1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-15 10:46:41 +00:00
dependabot-preview[bot]
7744335020 Bump const_fn from 0.4.3 to 0.4.4
Bumps [const_fn](https://github.com/taiki-e/const_fn) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/taiki-e/const_fn/releases)
- [Changelog](https://github.com/taiki-e/const_fn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/const_fn/compare/v0.4.3...v0.4.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-10 10:44:16 +00:00
dependabot-preview[bot]
a9651788b2 Bump png from 0.16.7 to 0.16.8
Bumps [png](https://github.com/image-rs/image-png) from 0.16.7 to 0.16.8.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-09 10:59:31 +00:00
dependabot-preview[bot]
9c2b9dc40f Bump libc from 0.2.80 to 0.2.81
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.80 to 0.2.81.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.80...0.2.81)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 10:36:25 +00:00
dependabot-preview[bot]
257390e78c Bump bit-vec from 0.6.2 to 0.6.3
Bumps [bit-vec](https://github.com/contain-rs/bit-vec) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/contain-rs/bit-vec/releases)
- [Commits](https://github.com/contain-rs/bit-vec/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-04 15:57:50 +00:00
dependabot-preview[bot]
f1675828d9 Bump cc from 1.0.65 to 1.0.66
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.65 to 1.0.66.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.65...1.0.66)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-04 10:50:47 +00:00
Josh Holmer
ff3787781e Version 4.0.2
Some checks failed
deploy / create-windows-binaries (i686) (push) Has been cancelled
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2020-11-27 13:18:48 -05:00
dependabot-preview[bot]
3460116d3b Bump libdeflater from 0.6.0 to 0.7.1
Bumps [libdeflater](https://github.com/adamkewley/libdeflater) from 0.6.0 to 0.7.1.
- [Release notes](https://github.com/adamkewley/libdeflater/releases)
- [Commits](https://github.com/adamkewley/libdeflater/compare/0.6.0...0.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-26 08:50:21 -05:00
dependabot-preview[bot]
194e82433a Bump crossbeam-epoch from 0.9.0 to 0.9.1
Bumps [crossbeam-epoch](https://github.com/crossbeam-rs/crossbeam) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-epoch-0.9.0...crossbeam-epoch-0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-26 11:12:57 +00:00
dependabot-preview[bot]
4de40cfa9b Bump crossbeam-utils from 0.8.0 to 0.8.1
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.0...crossbeam-utils-0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-26 10:56:54 +00:00
dependabot-preview[bot]
6f6740ecee Bump cc from 1.0.63 to 1.0.65
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.63 to 1.0.65.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.63...1.0.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 10:45:43 +00:00
dependabot-preview[bot]
c1e6e16e49 Bump termcolor from 1.1.1 to 1.1.2
Bumps [termcolor](https://github.com/BurntSushi/termcolor) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/BurntSushi/termcolor/releases)
- [Commits](https://github.com/BurntSushi/termcolor/compare/1.1.1...1.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-20 12:52:32 +00:00
dependabot-preview[bot]
3ca13fe6a5 Bump cc from 1.0.62 to 1.0.63
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.62 to 1.0.63.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.62...1.0.63)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-19 10:56:59 +00:00
Josh Holmer
4fb262c477 Version 4.0.1
Some checks failed
deploy / create-windows-binaries (i686) (push) Has been cancelled
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2020-11-18 16:47:28 -05:00
dependabot-preview[bot]
77fbebf893 Bump libdeflater from 0.5.0 to 0.6.0
Bumps [libdeflater](https://github.com/adamkewley/libdeflater) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/adamkewley/libdeflater/releases)
- [Commits](https://github.com/adamkewley/libdeflater/compare/0.5.0...0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-17 08:48:56 -05:00
Josh Holmer
9ccf39b49a Version 4.0.0
Some checks failed
deploy / create-windows-binaries (i686) (push) Has been cancelled
deploy / create-windows-binaries (x86_64) (push) Has been cancelled
deploy / create-unix-binaries (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-unix-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2020-11-11 14:43:42 -05:00
Ingvar Stepanyan
e38c759563
Switch to crossbeam-channel + rayon::spawn (#327)
* Switch to crossbeam-channel + rayon::spawn

* Remove thread_spawn for evaluation altogether

This allows to avoid a deadlock when there is only one Rayon thread, and doesn't sacrifice performance, since the caller of .get_result() had to always block on the iterator to be finished anyway, and all the messages are already sent from separate threads.

* Fix `verbose_mode` test

This one is easier to "fix", since we're in control of the rayon pool - just adding one extra thread to the default number to make sure we always can one root "spawn" call without stealing from the actual pool.
2020-11-11 12:01:13 -05:00
dependabot-preview[bot]
c612166c73 Bump num-rational from 0.3.1 to 0.3.2
Bumps [num-rational](https://github.com/rust-num/num-rational) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/rust-num/num-rational/releases)
- [Changelog](https://github.com/rust-num/num-rational/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-rational/compare/num-rational-0.3.1...num-rational-0.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 15:59:04 +00:00
dependabot-preview[bot]
08fb044086 Bump cc from 1.0.61 to 1.0.62
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.61...1.0.62)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 15:46:49 +00:00
Anhil
adcc64c1b1
Make rayon truly optional (#318) 2020-11-06 18:48:52 -05:00
Luni-4
9d67d9d4bd Split windows and unix deploy action 2020-11-06 18:02:16 -05:00
dependabot-preview[bot]
1c386b2bd2 Bump const_fn from 0.4.2 to 0.4.3
Bumps [const_fn](https://github.com/taiki-e/const_fn) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/taiki-e/const_fn/releases)
- [Changelog](https://github.com/taiki-e/const_fn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/const_fn/compare/v0.4.2...v0.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-03 10:35:36 +00:00
Anhil
70f911fa3e
Make libdeflater and zopfli optional (#319)
* Make `libdeflater` and `zopfli` optional
2020-11-01 20:18:15 -05:00
Josh Holmer
17cd51259e Bump minimum version in readme 2020-11-01 20:12:53 -05:00
dependabot-preview[bot]
c21739c9e4 Bump num-integer from 0.1.43 to 0.1.44
Bumps [num-integer](https://github.com/rust-num/num-integer) from 0.1.43 to 0.1.44.
- [Release notes](https://github.com/rust-num/num-integer/releases)
- [Changelog](https://github.com/rust-num/num-integer/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-integer/compare/num-integer-0.1.43...num-integer-0.1.44)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-30 11:17:14 +00:00
dependabot-preview[bot]
07ef6c84d1 Bump num-iter from 0.1.41 to 0.1.42
Bumps [num-iter](https://github.com/rust-num/num-iter) from 0.1.41 to 0.1.42.
- [Release notes](https://github.com/rust-num/num-iter/releases)
- [Changelog](https://github.com/rust-num/num-iter/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-iter/compare/num-iter-0.1.41...num-iter-0.1.42)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-30 11:05:18 +00:00
dependabot-preview[bot]
922483bb45 Bump num-rational from 0.3.0 to 0.3.1
Bumps [num-rational](https://github.com/rust-num/num-rational) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/rust-num/num-rational/releases)
- [Changelog](https://github.com/rust-num/num-rational/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-rational/compare/num-rational-0.3.0...num-rational-0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-30 10:48:35 +00:00
dependabot-preview[bot]
c99f92f782 Bump num-traits from 0.2.12 to 0.2.14
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.12 to 0.2.14.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.12...num-traits-0.2.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-30 10:32:53 +00:00
dependabot-preview[bot]
b848423346 Bump rustc_version from 0.2.3 to 0.3.0
Bumps [rustc_version](https://github.com/Kimundi/rustc-version-rs) from 0.2.3 to 0.3.0.
- [Release notes](https://github.com/Kimundi/rustc-version-rs/releases)
- [Commits](https://github.com/Kimundi/rustc-version-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-29 06:57:44 -04:00
dependabot-preview[bot]
4a865430b0 Bump libc from 0.2.79 to 0.2.80
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.79 to 0.2.80.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.79...0.2.80)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 10:45:53 +00:00
dependabot-preview[bot]
bb94e3b228 Bump image from 0.23.10 to 0.23.11
Bumps [image](https://github.com/image-rs/image) from 0.23.10 to 0.23.11.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 10:34:01 +00:00
Josh Holmer
b446a8a92e Optimize reading in files 2020-10-22 09:51:25 -04:00
dependabot-preview[bot]
bd0c4061bd Bump crc32fast from 1.2.0 to 1.2.1
Bumps [crc32fast](https://github.com/srijs/rust-crc32fast) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/srijs/rust-crc32fast/releases)
- [Commits](https://github.com/srijs/rust-crc32fast/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-22 10:59:44 +00:00
dependabot-preview[bot]
147e0fbf5b Bump rayon from 1.4.1 to 1.5.0
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.4.1...rayon-core-v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-22 10:47:39 +00:00
dependabot-preview[bot]
39978b475d Bump rayon-core from 1.8.1 to 1.9.0
Bumps [rayon-core](https://github.com/rayon-rs/rayon) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.1...rayon-core-v1.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-22 10:33:25 +00:00
Josh Holmer
5e7c4bc702
Remove autosquash
It's broken and not worth the hassle
2020-10-11 18:53:29 -04:00
Ingvar Stepanyan
7167a5e44d
Use the new stabilised fetch_min (#328)
A minor simplification using the corresponding new standard library function.

Bumps minimum Rust version to 1.45.0
2020-10-11 18:53:00 -04:00
dependabot-preview[bot]
460aeb32e2 Bump cc from 1.0.60 to 1.0.61
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.60...1.0.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-11 16:55:54 +00:00
Josh Holmer
0d9c23f4ce Fix new clippy lints from Rust 1.47 2020-10-09 20:20:52 -04:00
dependabot-preview[bot]
0ff9edd605 Bump miniz_oxide from 0.4.2 to 0.4.3
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.4.2...0.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-08 10:35:34 +00:00
dependabot-preview[bot]
f5e2de6795 Bump hermit-abi from 0.1.16 to 0.1.17
Bumps [hermit-abi](https://github.com/hermitcore/libhermit-rs) from 0.1.16 to 0.1.17.
- [Release notes](https://github.com/hermitcore/libhermit-rs/releases)
- [Commits](https://github.com/hermitcore/libhermit-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-06 10:47:15 +00:00
dependabot-preview[bot]
c84009e9f9 Bump libc from 0.2.78 to 0.2.79
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.78 to 0.2.79.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.78...0.2.79)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-05 10:35:06 +00:00
dependabot-preview[bot]
cfcda58ba7 Bump libc from 0.2.77 to 0.2.78
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.77 to 0.2.78.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.77...0.2.78)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 10:47:04 +00:00
dependabot-preview[bot]
c4d1f3d354 Bump chrono from 0.4.18 to 0.4.19
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.18...v0.4.19)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 10:35:17 +00:00
dependabot-preview[bot]
38e62f7ce5 Bump rayon from 1.4.0 to 1.4.1
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.4.0...rayon-core-v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-30 10:59:33 +00:00
dependabot-preview[bot]
fba3ee23ea Bump hashbrown from 0.9.0 to 0.9.1
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-29 10:51:10 +00:00
dependabot-preview[bot]
a6fa079e64 Bump image from 0.23.9 to 0.23.10
Bumps [image](https://github.com/image-rs/image) from 0.23.9 to 0.23.10.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 10:46:08 +00:00
dependabot-preview[bot]
cb88641d5a Bump chrono from 0.4.15 to 0.4.18
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.15 to 0.4.18.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.15...v0.4.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 10:34:06 +00:00
dependabot-preview[bot]
badc90bae1 Bump hermit-abi from 0.1.15 to 0.1.16
Bumps [hermit-abi](https://github.com/hermitcore/libhermit-rs) from 0.1.15 to 0.1.16.
- [Release notes](https://github.com/hermitcore/libhermit-rs/releases)
- [Commits](https://github.com/hermitcore/libhermit-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-22 10:45:12 +00:00
dependabot-preview[bot]
2458b981f8 Bump memoffset from 0.5.5 to 0.5.6
Bumps [memoffset](https://github.com/Gilnaa/memoffset) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/Gilnaa/memoffset/releases)
- [Commits](https://github.com/Gilnaa/memoffset/compare/v0.5.5...v0.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 10:36:26 +00:00
dependabot-preview[bot]
fba35861b3 Bump rayon-core from 1.8.0 to 1.8.1
Bumps [rayon-core](https://github.com/rayon-rs/rayon) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-18 10:35:40 +00:00
dependabot-preview[bot]
186ab3945f Bump cc from 1.0.59 to 1.0.60
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.59...1.0.60)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-17 11:08:06 +00:00
dependabot-preview[bot]
ec1c398243 Bump either from 1.6.0 to 1.6.1
Bumps [either](https://github.com/bluss/either) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/bluss/either/releases)
- [Commits](https://github.com/bluss/either/compare/1.6.0...1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-17 10:53:56 +00:00
dependabot-preview[bot]
17cb82c393 Bump atty from 0.2.11 to 0.2.14
Bumps [atty](https://github.com/softprops/atty) from 0.2.11 to 0.2.14.
- [Release notes](https://github.com/softprops/atty/releases)
- [Changelog](https://github.com/softprops/atty/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/atty/compare/0.2.11...0.2.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 10:59:58 +00:00
dependabot-preview[bot]
d1e6264059 Bump stderrlog from 0.4.3 to 0.5.0
Bumps [stderrlog](https://github.com/cardoe/stderrlog-rs) from 0.4.3 to 0.5.0.
- [Release notes](https://github.com/cardoe/stderrlog-rs/releases)
- [Changelog](https://github.com/cardoe/stderrlog-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cardoe/stderrlog-rs/compare/v0.4.3...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 10:51:41 -04:00
dependabot-preview[bot]
4478b7cd71 Bump miniz_oxide from 0.4.1 to 0.4.2
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.4.1...0.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 10:33:54 +00:00
dependabot-preview[bot]
9fcc055dc5 Bump libc from 0.2.76 to 0.2.77
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.76 to 0.2.77.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.76...0.2.77)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-10 10:53:18 +00:00
dependabot-preview[bot]
bb44fa84b2 Bump bytemuck from 1.4.0 to 1.4.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.4.0...v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-09 10:50:15 +00:00
dependabot-preview[bot]
4878540fb0 Bump crossbeam-channel from 0.4.3 to 0.4.4
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.4.3...crossbeam-channel-0.4.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 10:48:00 +00:00
dependabot-preview[bot]
99af96f74d Bump indexmap from 1.5.2 to 1.6.0
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.5.2...1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 10:34:25 +00:00
dependabot-preview[bot]
1f7b493e6c Bump indexmap from 1.5.1 to 1.5.2
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.5.1...1.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 10:52:36 +00:00
dependabot-preview[bot]
b69554b493 Bump image from 0.23.8 to 0.23.9
Bumps [image](https://github.com/image-rs/image) from 0.23.8 to 0.23.9.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.8...v0.23.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 11:08:16 +00:00
dependabot-preview[bot]
7bddeb1b57 Bump rgb from 0.8.24 to 0.8.25
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.24 to 0.8.25.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 10:52:43 +00:00
dependabot-preview[bot]
b71dac0128 Bump bytemuck from 1.3.1 to 1.4.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.3.1...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 10:35:22 +00:00
dependabot-preview[bot]
d5bf3bbb59 Bump time from 0.1.43 to 0.1.44
Bumps [time](https://github.com/time-rs/time) from 0.1.43 to 0.1.44.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.1.43...v0.1.44)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-27 10:46:05 +00:00
dependabot-preview[bot]
983f70dc0d Bump rayon from 1.3.1 to 1.4.0
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.3.1...rayon-core-v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-25 10:50:16 +00:00
dependabot-preview[bot]
6c4e1d431b Bump miniz_oxide from 0.4.0 to 0.4.1
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.4.0...0.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 10:34:18 +00:00
dependabot-preview[bot]
afe6806da2 Bump libc from 0.2.74 to 0.2.76
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.74 to 0.2.76.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.74...0.2.76)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-21 11:00:10 +00:00
dependabot-preview[bot]
b47fec5f33 Bump autocfg from 1.0.0 to 1.0.1
Bumps [autocfg](https://github.com/cuviper/autocfg) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/cuviper/autocfg/releases)
- [Commits](https://github.com/cuviper/autocfg/compare/1.0.0...1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-21 10:48:15 +00:00
dependabot-preview[bot]
e9873f83ec Bump cc from 1.0.58 to 1.0.59
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.58...1.0.59)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-19 10:39:12 +00:00
dependabot-preview[bot]
c4cddbe60a Bump rgb from 0.8.23 to 0.8.24
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.23 to 0.8.24.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 11:02:41 +00:00
dependabot-preview[bot]
744f576ba7 Bump chrono from 0.4.13 to 0.4.15
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.13 to 0.4.15.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.13...v0.4.15)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 10:51:04 +00:00
dependabot-preview[bot]
f821060197 Bump clap from 2.33.2 to 2.33.3
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.2 to 2.33.3.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v2.33.3/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.33.2...v2.33.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-14 11:09:23 +00:00
dependabot-preview[bot]
bff5109144 Bump rgb from 0.8.22 to 0.8.23
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.22 to 0.8.23.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-14 10:46:12 +00:00
Josh Holmer
90c99e4509 Do not exit on first non-PNG file found in recursion
Closes #170
2020-08-12 10:59:43 -04:00
dependabot-preview[bot]
3202c36846 Bump rgb from 0.8.20 to 0.8.22
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.20 to 0.8.22.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 10:40:33 +00:00
dependabot-preview[bot]
aeedcaa750 Bump either from 1.5.3 to 1.6.0
Bumps [either](https://github.com/bluss/either) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/bluss/either/releases)
- [Commits](https://github.com/bluss/either/compare/1.5.3...1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-11 10:38:36 +00:00
dependabot-preview[bot]
594bf7af05 Bump indexmap from 1.5.0 to 1.5.1
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.5.0...1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 10:48:42 +00:00
dependabot-preview[bot]
a2f9578859 Bump hashbrown from 0.8.1 to 0.8.2
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.8.1...v0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 10:37:46 +00:00
dependabot-preview[bot]
74e3bc7c2e Bump clap from 2.33.1 to 2.33.2
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.1 to 2.33.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-06 10:43:09 +00:00
Josh Holmer
c335250f35
Add autosquash integration
Because Github can't have their Update Branch button just do rebases
2020-08-04 10:49:06 -04:00
Misty De Meo
1d05a8a224
Cargo.toml: set arm-always for cloudflare-zlib (#277)
Without this, cloudflare-zlib currently fails on all aarch64 CPUs.
This is one of the two solutions I proposed in #276, and it's the
option I prefer out of the two.

Fixes #276.
2020-08-04 10:48:27 -04:00
dependabot-preview[bot]
8cff959878 Bump adler32 from 1.1.0 to 1.2.0
Bumps [adler32](https://github.com/remram44/adler32-rs) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/remram44/adler32-rs/releases)
- [Commits](https://github.com/remram44/adler32-rs/compare/1.1.0...1.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-31 10:50:19 +00:00
dependabot-preview[bot]
cecfaaf440 Bump libc from 0.2.73 to 0.2.74
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.73 to 0.2.74.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.73...0.2.74)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-29 10:41:40 +00:00
dependabot-preview[bot]
9cf8c84b07 Bump bytemuck from 1.2.0 to 1.3.1
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.2.0 to 1.3.1.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.2.0...v1.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 10:58:56 +00:00
dependabot-preview[bot]
43dd0fe5be Bump image from 0.23.7 to 0.23.8
Bumps [image](https://github.com/image-rs/image) from 0.23.7 to 0.23.8.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.7...v0.23.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 10:44:38 +00:00
Josh Holmer
9dfea8dde0 Version 3.0.1
Some checks failed
deploy / create-binaries (windows-latest, i686-pc-windows-msvc) (push) Has been cancelled
deploy / create-binaries (macOS-latest, x86_64-apple-darwin) (push) Has been cancelled
deploy / create-binaries (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2020-07-21 11:15:15 -04:00
Josh Holmer
9d8028e044 Switch to thin LTO
This has about a 25% improvement on release compilation times,
at the cost of a <1% runtime performance impact.
2020-07-21 11:14:21 -04:00
dependabot-preview[bot]
3797df0b1d Bump libc from 0.2.72 to 0.2.73
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.72 to 0.2.73.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.72...0.2.73)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-21 15:01:38 +00:00
dependabot-preview[bot]
12e1863a54 Bump indexmap from 1.4.0 to 1.5.0
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.4.0...1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-21 01:21:26 +00:00
dependabot-preview[bot]
23c0a948d2 Bump png from 0.16.6 to 0.16.7
Bumps [png](https://github.com/image-rs/image-png) from 0.16.6 to 0.16.7.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.6...v0.16.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-21 00:57:30 +00:00
Josh Holmer
ad054cadb5 Fix new clippy lint 2020-07-20 20:23:04 -04:00
dependabot-preview[bot]
6d2756dc49 Bump log from 0.4.8 to 0.4.11
Bumps [log](https://github.com/rust-lang/log) from 0.4.8 to 0.4.11.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.8...0.4.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 10:41:22 +00:00
dependabot-preview[bot]
a3579a9ecf Bump memoffset from 0.5.4 to 0.5.5
Bumps [memoffset](https://github.com/Gilnaa/memoffset) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/Gilnaa/memoffset/releases)
- [Commits](https://github.com/Gilnaa/memoffset/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-14 01:20:34 +00:00
Jake Archibald
71fa08b13a
Update readme for latest version (#258) 2020-07-13 21:07:25 -04:00
dependabot-preview[bot]
3d6229c697 Bump num-traits from 0.2.11 to 0.2.12
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.11 to 0.2.12.
- [Release notes](https://github.com/rust-num/num-traits/releases)
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.11...num-traits-0.2.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 13:09:15 +00:00
dependabot-preview[bot]
b20448b19c Bump png from 0.16.5 to 0.16.6
Bumps [png](https://github.com/image-rs/image-png) from 0.16.5 to 0.16.6.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.5...v0.16.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 12:53:06 +00:00
dependabot-preview[bot]
29b2c91626 Bump deflate from 0.8.4 to 0.8.6
Bumps [deflate](https://github.com/image-rs/deflate-rs) from 0.8.4 to 0.8.6.
- [Release notes](https://github.com/image-rs/deflate-rs/releases)
- [Changelog](https://github.com/image-rs/deflate-rs/blob/dev/changelog.md)
- [Commits](https://github.com/image-rs/deflate-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 12:37:48 +00:00
dependabot-preview[bot]
ae1403edb9 Bump image from 0.23.6 to 0.23.7
Bumps [image](https://github.com/image-rs/image) from 0.23.6 to 0.23.7.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.6...v0.23.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 12:14:02 +00:00
dependabot-preview[bot]
0edec4d945 Bump redox_syscall from 0.1.56 to 0.1.57
Bumps redox_syscall from 0.1.56 to 0.1.57.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 11:46:46 +00:00
dependabot-preview[bot]
57e8236ef7 Bump libc from 0.2.69 to 0.2.72
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.69 to 0.2.72.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.69...0.2.72)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 11:16:05 +00:00
dependabot-preview[bot]
3b337ac908 Bump adler from 0.2.2 to 0.2.3
Bumps [adler](https://github.com/jonas-schievink/adler) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/jonas-schievink/adler/releases)
- [Changelog](https://github.com/jonas-schievink/adler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonas-schievink/adler/compare/v0.2.2...v0.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 10:44:22 +00:00
Josh Holmer
ea746da96c Readd the --force flag to the CLI
This was still present in the lib and options parsing,
but was not in the Clap args list for some reason.
2020-07-13 04:36:27 -04:00
dependabot-preview[bot]
0f516c68eb Bump winapi from 0.3.8 to 0.3.9
Bumps [winapi](https://github.com/retep998/winapi-rs) from 0.3.8 to 0.3.9.
- [Release notes](https://github.com/retep998/winapi-rs/releases)
- [Commits](https://github.com/retep998/winapi-rs/compare/0.3.8...0.3.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 14:33:19 +00:00
dependabot-preview[bot]
c1e7ec54f6 Bump hermit-abi from 0.1.12 to 0.1.15
Bumps [hermit-abi](https://github.com/hermitcore/libhermit-rs) from 0.1.12 to 0.1.15.
- [Release notes](https://github.com/hermitcore/libhermit-rs/releases)
- [Commits](https://github.com/hermitcore/libhermit-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 14:20:53 +00:00
dependabot-preview[bot]
46a3dbe84b Bump chrono from 0.4.11 to 0.4.13
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.11 to 0.4.13.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.11...v0.4.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 14:02:38 +00:00
dependabot-preview[bot]
876e1c51fb Bump crossbeam-queue from 0.2.1 to 0.2.3
Bumps [crossbeam-queue](https://github.com/crossbeam-rs/crossbeam) from 0.2.1 to 0.2.3.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-queue-0.2.1...crossbeam-queue-0.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 13:45:28 +00:00
dependabot-preview[bot]
c9dd553941 Bump cc from 1.0.52 to 1.0.58
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.52 to 1.0.58.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.52...1.0.58)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 13:23:24 +00:00
dependabot-preview[bot]
a49b06f2f4 Bump num-iter from 0.1.40 to 0.1.41
Bumps [num-iter](https://github.com/rust-num/num-iter) from 0.1.40 to 0.1.41.
- [Release notes](https://github.com/rust-num/num-iter/releases)
- [Changelog](https://github.com/rust-num/num-iter/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-iter/compare/num-iter-0.1.40...num-iter-0.1.41)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 12:57:51 +00:00
dependabot-preview[bot]
6a06117f75 Bump num-integer from 0.1.42 to 0.1.43
Bumps [num-integer](https://github.com/rust-num/num-integer) from 0.1.42 to 0.1.43.
- [Release notes](https://github.com/rust-num/num-integer/releases)
- [Changelog](https://github.com/rust-num/num-integer/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-integer/compare/num-integer-0.1.42...num-integer-0.1.43)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 12:29:05 +00:00
dependabot-preview[bot]
9e84ed336c Bump unicode-width from 0.1.7 to 0.1.8
Bumps [unicode-width](https://github.com/unicode-rs/unicode-width) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/unicode-rs/unicode-width/releases)
- [Commits](https://github.com/unicode-rs/unicode-width/commits/v0.1.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 11:57:00 +00:00
dependabot-preview[bot]
d7dac92d5f Bump adler32 from 1.0.4 to 1.1.0
Bumps [adler32](https://github.com/remram44/adler32-rs) from 1.0.4 to 1.1.0.
- [Release notes](https://github.com/remram44/adler32-rs/releases)
- [Commits](https://github.com/remram44/adler32-rs/compare/1.0.4...1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 11:20:59 +00:00
dependabot-preview[bot]
8ca39923dd Bump vec_map from 0.8.1 to 0.8.2
Bumps [vec_map](https://github.com/contain-rs/vec-map) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/contain-rs/vec-map/releases)
- [Changelog](https://github.com/contain-rs/vec-map/blob/master/CHANGELOG.md)
- [Commits](https://github.com/contain-rs/vec-map/compare/v0.8.1...v0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 10:41:39 +00:00
dependabot-preview[bot]
328e82f630 Bump miniz_oxide from 0.3.7 to 0.4.0
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.3.7 to 0.4.0.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.3.7...0.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-09 11:49:39 -04:00
dependabot-preview[bot]
cea75d6aa2 Bump rgb from 0.8.18 to 0.8.20
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.18 to 0.8.20.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-09 11:04:24 -04:00
dependabot-preview[bot]
db3cd3589b Bump image from 0.23.5 to 0.23.6
Bumps [image](https://github.com/image-rs/image) from 0.23.5 to 0.23.6.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.5...v0.23.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-22 17:33:09 +00:00
dependabot-preview[bot]
506e733049 Bump rayon from 1.3.0 to 1.3.1
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.3.0...v1.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-16 10:45:14 +00:00
dependabot-preview[bot]
d7ca5e9549 Bump image from 0.23.4 to 0.23.5
Bumps [image](https://github.com/image-rs/image) from 0.23.4 to 0.23.5.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.4...v0.23.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-11 07:45:29 -04:00
dependabot-preview[bot]
d70fd3bfcc Bump miniz_oxide from 0.3.6 to 0.3.7
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.3.6...0.3.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-11 07:44:30 -04:00
dependabot-preview[bot]
528f17eb6a Bump libdeflater from 0.3.0 to 0.5.0
Bumps [libdeflater](https://github.com/adamkewley/libdeflater) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/adamkewley/libdeflater/releases)
- [Commits](https://github.com/adamkewley/libdeflater/compare/0.3.0...0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-10 10:43:22 -04:00
dependabot-preview[bot]
c444e29cbb Bump libdeflater from 0.2.0 to 0.3.0
Bumps [libdeflater](https://github.com/adamkewley/libdeflater) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/adamkewley/libdeflater/releases)
- [Commits](https://github.com/adamkewley/libdeflater/compare/0.2.0...0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 14:49:00 -04:00
dependabot-preview[bot]
4ad586e427 Bump wild from 2.0.3 to 2.0.4
Bumps [wild](https://gitlab.com/kornelski/wild) from 2.0.3 to 2.0.4.
- [Release notes](https://gitlab.com/kornelski/wild/tags)
- [Commits](https://gitlab.com/kornelski/wild/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-05 10:48:51 +00:00
dependabot-preview[bot]
403c80d7ca Bump rgb from 0.8.17 to 0.8.18
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.17 to 0.8.18.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-04 09:46:08 -04:00
dependabot-preview[bot]
50de0a6fa4 Bump indexmap from 1.3.2 to 1.4.0
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.3.2...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-02 14:29:48 +00:00
lunaryorn
f5d8aa0249
Build more release binaries (#233)
* Build more release binaries

Include a static Linux binary with musl and a macOS build.  Also add
readme, license and changelog to the release archives.

Fixes GH-134

* Merge windows and linux builds

* Test musl and darwin targets

* Fix matrix exclude key
2020-06-02 09:35:49 -04:00
Josh Holmer
974dfcfeac More readme updates 2020-05-24 20:05:04 -04:00
Josh Holmer
65e4d57e88 Remove statement from Readme which is no longer true 2020-05-24 20:02:10 -04:00
Josh Holmer
9a3a402be0 Display more useful error if Rust version too old
Closes #232
2020-05-24 20:00:01 -04:00
dependabot-preview[bot]
3038fd8c7d Bump wild from 2.0.2 to 2.0.3
Bumps [wild](https://gitlab.com/kornelski/wild) from 2.0.2 to 2.0.3.
- [Release notes](https://gitlab.com/kornelski/wild/tags)
- [Commits](https://gitlab.com/kornelski/wild/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 15:09:45 +00:00
Luni-4
e4d4c93d9c
Add release description (#230)
* Add description to a release

* Fix typo
2020-05-15 15:07:03 -04:00
Luni-4
0a51fb06ea
Update deploy script (#229) 2020-05-14 22:14:16 -04:00
dependabot-preview[bot]
9849adcbd1 Bump clap from 2.33.0 to 2.33.1
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.0 to 2.33.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v2.33.1/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.33.0...v2.33.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 12:51:14 +00:00
Josh Holmer
48b3c3ba61 Fix deploy prefix
Some checks failed
deploy / create-binaries-windows (i686-pc-windows-msvc, i686-pc-windows-msvc) (push) Has been cancelled
deploy / create-binaries-windows (x86_64-pc-windows-msvc, x86_64-pc-windows-msvc) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2020-05-11 12:35:23 -04:00
Josh Holmer
971fd5aaed Try correcting artifact path 2020-05-11 11:41:56 -04:00
Josh Holmer
ef33e11a62 More release deploy fixes 2020-05-11 10:11:38 -04:00
Josh Holmer
ba36c4b046 Fix the last CI change 2020-05-11 09:38:11 -04:00
Josh Holmer
f9bb89481b Attempt i686 cross compilation on Github Actions release 2020-05-11 09:26:40 -04:00
Josh Holmer
50d5ec48cf Fix getting tag name on Windows deploy 2020-05-11 09:14:12 -04:00
Josh Holmer
820667c608 Remove unnecessary steps from deploy 2020-05-11 09:05:00 -04:00
Josh Holmer
9d156723c0
Use msvc toolchain for creating release binaries
The GNU toolchain seems to fail on compiling cloudflare-zlib-sys
2020-05-11 08:41:51 -04:00
dependabot-preview[bot]
2f791fe909
Bump bit-vec from 0.6.1 to 0.6.2 (#227)
Bumps [bit-vec](https://github.com/contain-rs/bit-vec) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/contain-rs/bit-vec/releases)
- [Commits](https://github.com/contain-rs/bit-vec/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-07 11:16:02 -04:00
Josh Holmer
fa11401eb1 Version 3.0.0 2020-05-06 10:11:47 -04:00
Ingvar Stepanyan
b06e077f8d
Add "max" level alias; various level-related warnings (#224)
* Update --help to exclude -a

* Add a deprecation warning to level 4 constructor

* Initialise logger earlier

* Add warning for level > 3 for non-zlib

It's not obvious immediately that these levels don't have any effect on libdeflater and Zopfli, since they don't iterate over zlib-specific fine-tuned options.

Hence, show warning so that user knows they're getting "downgraded" to level 3.

* Add "max" level alias; more level warnings

* Update --help trial numbers for non-zlib

* Fix incorrect trial numbers
2020-04-22 13:34:59 -04:00
Ingvar Stepanyan
fee76ca44f
Remove doc-hidden recursive option (#225)
As the comment mentions, this is used only in CLI interface, so there's no reason for it not to live directly in CLI code.

Ref: #220.
2020-04-20 08:51:18 -04:00
dependabot-preview[bot]
b2725d5149 Bump image from 0.23.3 to 0.23.4
Bumps [image](https://github.com/image-rs/image) from 0.23.3 to 0.23.4.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.3...v0.23.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 12:22:42 +00:00
dependabot-preview[bot]
ec8ecf5a80 Bump rgb from 0.8.16 to 0.8.17
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.16 to 0.8.17.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 11:16:34 +00:00
Josh Holmer
0a4bde1ade Add docs.rs badge to readme 2020-04-18 19:17:00 -04:00
Josh Holmer
b55eced0ed Update build status badge in readme 2020-04-18 19:06:41 -04:00
Ingvar Stepanyan
23ae9c302f
Switch to standard logging library (#218)
This allows to configure or compile away logging in the library from a single place in Rust apps.

For the CLI side, the usage and output remained the same, except it's now colour-coded.

Fixes #217.
2020-04-18 18:33:48 -04:00
Ingvar Stepanyan
3b754bfa09
Use clap conflict argument checks (#219)
Follow-up to #210.

I haven't noticed / forgotten that clap has own mechanism for conflicts between arguments, and it's probably best to use it instead of custom checks.
2020-04-18 12:20:28 -04:00
Ingvar Stepanyan
a497513d89
Move Zlib-specific options under Zlib compressor (#210)
Make it statically obvious that they're not compatible with other compressors.
2020-04-17 10:05:13 -04:00
Josh Holmer
380c21ea97 Use checkout v2 2020-04-17 07:13:35 -04:00
Ingvar Stepanyan
e8ff6f7526
Remove unused (outdated?) options (#212)
Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
2020-04-17 05:16:18 -04:00
Ingvar Stepanyan
bb332fa6d7
Don't override global rayon pool (#211)
Rayon uses a singleton global pool.

By default it's set to a regular spawn handler with number of logical CPU cores, but it can be overridden by Rust applications to customize number of threads, spawn handlers, exit handlers and other options.

Such customization should be usually done at the app level, because if a single library initialises the global pool, then Rayon will prevent any further overrides and they will error out. This can cause conflicts between libraries or library and user code and make them impossible to use together.

Hence, I've removed the `threads` option from the `Options` struct and instead moved initialisation to the CLI part of the codebase (main.rs).

Users of the library that didn't depend on custom `threads` number can keep using it as before - they'll still get same number of threads as number of logical CPU cores, while users who need fine-tuning, can do that by customizing rayon pool themselves at the top level of the app.

Note: another alternative to keep the option could've been to use `ThreadPoolBuilder::build` + `ThreadPool::install` to use a local pool just within OxiPNG, but that would ignore any customizations made by users in top-level pool and would prevent usage on targets that require custom spawn handlers like WebAssembly. As such, I've decided to avoid it.

Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
2020-04-17 04:49:40 -04:00
Ingvar Stepanyan
4fd9203800 Bring back RefCell
It was accidentally removed as part of #208.
Fixes #214.
2020-04-16 18:31:24 -04:00
Ingvar Stepanyan
9b8361171f Revert "Unbreak no-default-features"
This reverts commit 4ef92089d5.
2020-04-16 18:31:24 -04:00
dependabot-preview[bot]
11a7b68c4f Bump num_cpus from 1.12.0 to 1.13.0
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.12.0...v1.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 10:54:52 +00:00
dependabot-preview[bot]
9098de22c1 Bump image from 0.23.2 to 0.23.3
Bumps [image](https://github.com/image-rs/image) from 0.23.2 to 0.23.3.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.2...v0.23.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 09:55:56 +00:00
Josh Holmer
139b2878d0 Fix benchmark compilation
Closes #197
2020-04-15 13:26:28 -04:00
Josh Holmer
53368fcbbf Reexport indexmap structs 2020-04-15 13:26:28 -04:00
Josh Holmer
4ef92089d5 Unbreak no-default-features
In order to avoid problems with mutable references,
the approach is to use the eval sender for non-parallel.
Computations will still be done synchronously
with the fake synchronous rayon module.
2020-04-15 13:26:28 -04:00
Josh Holmer
43735086d1 Migrate to Github Actions
Closes #206
2020-04-15 13:26:28 -04:00
Ingvar Stepanyan
63e36ed43f
Simplify comparer (#208)
* Skip baselines earlier in the evaluator

We know that we'll throw them away anyway, so there is no point in even sending them to Sender and comparing them with others once we used them for the best candidate size.

* Simplify comparison logic
2020-04-14 17:09:52 -04:00
Ingvar Stepanyan
f747269151
Respect deadline in miniz (#200) 2020-03-31 23:31:17 -04:00
Ingvar Stepanyan
878bbedb37
Improve performance consistency (#202)
* Improve performance consistency

Switch from HashMap / HashSet to IndexMap / IndexSet for consistent iteration order of various options and, as a result, more predictable performance.
2020-03-31 21:54:05 -04:00
Josh Holmer
4b1a47e902 Bump minimum rust version to 1.41 2020-03-31 20:57:50 -04:00
Ingvar Stepanyan
121558bf5c
Add libdeflater as an option (#203)
libdeflater is a Rust wrapper around
[libdeflate](https://github.com/ebiggers/libdeflate) - an alternative
heavily optimised library for deflate/zlib/gzip compression and
decompression that is intended for situations where upper bounds of the
output are well-known.

In my benchmarks on test files in the repo it has shown to be usually
both slightly faster and providing better compressed output than
cloudflare-zlib, but in some cases showing the opposite, so rather
than swapping defaults, it's currently provided as another option,
similarly to zopfli.

Since it's not strictly better in all cases, I'm not providing median
numbers, but you can check distribution histograms for time and size
differences here (all using `oxipng -o 6 -t 6 -P`):
https://docs.google.com/spreadsheets/d/1WOKgeYZBhLkQvMGAC36snN4azilElzOFhx63RJu0EZY/edit?usp=sharing
2020-03-31 20:24:57 -04:00
Kornel
681089f8c7
Remove the concept of size bias (#199)
Closes #198
2020-03-31 19:28:22 -04:00
dependabot-preview[bot]
d417a712d3 Bump image from 0.23.0 to 0.23.2
Bumps [image](https://github.com/image-rs/image) from 0.23.0 to 0.23.2.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.0...v0.23.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 04:40:46 +00:00
dependabot-preview[bot]
6593a5f6fe Bump itertools from 0.8.2 to 0.9.0
Bumps [itertools](https://github.com/bluss/rust-itertools) from 0.8.2 to 0.9.0.
- [Release notes](https://github.com/bluss/rust-itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bluss/rust-itertools/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 04:03:14 +00:00
dependabot[bot]
e33d120481
Bump minimist from 1.2.0 to 1.2.5 (#201)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.0 to 1.2.5.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.0...1.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-18 14:07:48 -04:00
Josh Holmer
39ff7cfd5c Bump all dependency patch versions 2020-03-02 01:50:10 -05:00
Josh Holmer
bded03908f Silence cognitive complexity warnings 2020-03-02 01:45:04 -05:00
Josh Holmer
b9dc9e72bb Update image crate to 0.23 2020-03-02 01:44:53 -05:00
Josh Holmer
0e3c0b922d Enable more clippy lints and fix some clippy issues 2020-01-19 05:22:14 -05:00
Josh Holmer
139d29cc9b Version 2.3.0 2019-10-07 23:34:23 -04:00
Ingvar Stepanyan
659717cb1f Allow usage on wasm32-unknown-unknown target (#194)
* Avoid using time API when we don't need it

This avoids a syscall to the time API when the result is ignored later anyway.

This allows to use the library with default options on wasm32-unknown-unknown, where the unimplemented syscall would panic otherwise.

* eval_send doesn't need to be an Option

We can drop the value manually, thus avoiding unwrap on each access.

* Keep single `use rayon::prelude::*`

If either `rayon` is already imported, then `rayon::prelude::*` should always resolve.

* Extract comparator

* Fully enable non-parallel mode
2019-09-25 13:01:53 -04:00
Kamal Ahmad
68db304a2a Don't apply alpha optimizations unless --alpha is paseed (#187)
Closes #164
2019-09-24 11:33:50 -04:00
Kornel
e473958377 Palette sorting (#193)
* Implement alpha and luminosity palette sorting

* Also sort when reducing to palette

* Bump Rust version

* Color comparison
2019-09-10 18:13:05 -04:00
Kamal Ahmad
68b763bcdd Reduce alloc in filtering/unfiltering by reusing buffers (#191) 2019-09-04 11:09:54 -04:00
Kornel
239ca81db7 Update dependencies (#186)
* Update dependencies

* Bump Rust to 1.34
2019-08-04 12:12:08 -04:00
Felix Hanau
4adcc5e14a Interlacing fixes (#182)
* Fix decoding interlaced images with height or width <= 2

* Add Issue 175 test case

* Deinterlace tiny images correctly
2019-07-24 09:16:13 -04:00
Daniel Wong
4cb26d462e Allow disabling all alpha optimizations (#181)
Fixes a bug where oxipng would crash if alpha optimizations were all disabled.
2019-07-23 14:21:46 -04:00
Josh Holmer
9408a50b1b Version 2.2.2 2019-07-03 19:21:21 -04:00
Josh Holmer
b2364d2398 Update dependencies 2019-07-03 19:14:42 -04:00
Kamal Ahmad
34ee78dbbc Preallocate memory in reduced_alpha_to_up (#180) 2019-06-27 13:44:49 -04:00
Felix Hanau
56b94542a6 Fix decoding interlaced images with height or width <= 2 (#175) 2019-06-27 13:44:34 -04:00
Felix Hanau
c09e8f6d12 Make filter, zlib level and strategy deterministic (#179) 2019-06-27 10:05:35 -04:00
Hugo Locurcio
5b5aeaa683 Enable link-time optimization for release builds (#177)
This creates faster and smaller binaries, at the cost of longer
build times.
2019-06-26 09:09:26 -04:00
Josh Holmer
c60bd82da7 Add test case for #171 2019-06-20 14:07:47 -04:00
Josh Holmer
9d8ce5e4ee Disable large image test for 32-bit systems
Closes #176
2019-06-20 13:38:59 -04:00
Josh Holmer
458e9f64a7 Fix --strip safe which was broken in 5b1121c9d 2019-06-19 15:27:43 -04:00
Josh Holmer
3809421de7 Use image 0.21.2 with bugfixes from crates.io 2019-06-19 15:21:41 -04:00
Josh Holmer
5b1121c9dd Make order of chunks deterministic by sorting chunks
Closes #174
2019-06-18 13:29:17 -04:00
Felix Hanau
5dcfe44ccd Fix info message and typos (#172) 2019-06-18 13:06:37 -04:00
Felix Hanau
cc290c0bdb Fixes for grey scale reduction (#171) 2019-06-18 13:04:26 -04:00
Josh Holmer
9c6190c1ff Version 2.2.1 2019-03-26 14:19:34 -04:00
Josh Holmer
7bd7c0cfc9 Bump image crate to handle large images
Closes #167 and #168
2019-03-26 14:14:01 -04:00
Josh Holmer
b18414ba8c
Fix display of benchmarks in README (#165) 2019-02-04 10:03:58 -05:00
Josh Holmer
6430166ec9 Add to changelog as well [ci skip] 2019-02-01 17:59:15 -05:00
Josh Holmer
c7da7f2073 Bump minimum supported Rust version 2019-02-01 17:58:24 -05:00
Josh Holmer
bd6e7dbbb1 Version 2.2.0 2019-02-01 17:30:16 -05:00
Josh Holmer
d86bc80f43 Prepare for next release 2019-02-01 17:27:03 -05:00
Kornel
485a127cf6 Remove Mutex from evaluation loop (#163) 2019-02-01 17:03:25 -05:00
Josh Holmer
c92b03d908 Remove unused features 2019-02-01 16:42:00 -05:00
Kornel
dad6230cf1 Check timeout more often during compression (#160) 2019-02-01 16:30:47 -05:00
Kornel
33890cf0fd Fake Rayon (#162)
Dummy implementation of Rayon's traits to avoid `#[cfg()]` and duplicated non-parallel code.
2019-01-28 13:35:42 -05:00
Kornel
0d4a9e06d6 Avoid using excessive number of threads (#161) 2019-01-27 04:15:41 -05:00
Kornel
9af874d21b Make reductions return a new uncompressed image (#158)
* Fix verbose message

* No cloning when restoring original data

* Make reductions return a new uncompressed image

Partially fixes #145

* Async reduction evaluator

* Assert

* Faster bit depth check

* Also try 4-bit depth for small-depth images

* Skip test when using miniz

* Ensure palette is trimmed after depth reduction

Fixes #159

* Fudge factor for reductions to prefer better reductions even if gzip estimation says otherwise
2019-01-27 03:22:49 -05:00
Kornel
55d85df9fc Non-self-mutable reductions (#154)
* Move reductions to a module. Make copy instead of changing in-place.

* Alpha reductions

* Immutable color reductions

* Immutable interlace reductions
2019-01-12 05:07:57 -05:00
Josh Holmer
d91fc890cd 2.1.8 2018-12-02 00:14:43 -05:00
Josh Holmer
918c52eed8 Fix more nonstandard sBIT headers
Closes #153
2018-12-02 00:13:30 -05:00
Josh Holmer
7594ec632b Add test file 2018-12-01 22:32:29 -05:00
Josh Holmer
565d08ed72 Version 2.1.7 2018-11-27 22:34:58 -05:00
Joshua Holmer
1305b5cf17 Fix clippy lints and run rustfmt 2018-11-26 13:41:14 -05:00
Joshua Holmer
041c433ccb Handle non-standard sBIT headers
Closes #141
2018-11-26 13:10:21 -05:00
Kornel
ff7a9547c3 Nicer wrapper for cfzlib (#149) 2018-11-25 03:29:30 -05:00
Kornel
602cd6991e 80× faster palette reduction (#150)
* Faster palette reduction

* Simplified iterator

* Mutable scanline iterator
2018-11-25 01:31:43 -05:00
Kornel
686adcdebd Optimize RGB/A to palette conversion (#148) 2018-11-22 21:52:02 -05:00
Kornel
588d5bd52b Tweaks and Microoptimizations (#146)
* Fixed alpha benchmark

* Dedupe function

* Use integer math when rounding

* Fewer temporaries when slicing palette

* Filtering microoptimizations
2018-11-20 08:39:46 -05:00
Josh Holmer
d82406a959 Version 2.1.6 2018-11-17 18:02:16 -05:00
Kornel
4765eaa7f3 Alpha heuristic improvements (#144)
* Compress alpha with strategy sensitive to repetitions

* Update reductions flag when alpha changed

* Avoid needlessly cloning out-of-date idat_data and temp raw_data
2018-11-14 08:30:15 -05:00
Kornel
96eda85806 Identify and drop useless sRGB profiles (#143) 2018-11-13 14:37:02 -05:00
Joshua Holmer
88035ccbae Version 2.1.5 2018-10-11 08:41:11 -04:00
Joshua Holmer
87e738dda2 Fix incorrect detection of images that can reduce bit depth
Closes #140
2018-10-11 08:29:48 -04:00
Josh Holmer
903f962f29 Version 2.1.4 2018-09-28 21:05:58 -04:00
Josh Holmer
a4e0a34357 Bump version to 2.1.3 2018-09-16 23:21:51 -04:00
Kornel
3c466df80e Chunk name as 4 bytes (#135) 2018-09-16 16:09:55 -04:00
Josh Holmer
edd4966cea
Fix compilation error on i686 due to cfzlib incompat (#138)
Closes #137
2018-09-16 14:43:08 -04:00
Kornel
72393d06c9 Parallel loading (#136)
* Parallel loading

* Avoid vec allocation per pixel
2018-09-15 17:30:53 -04:00
Josh Holmer
df07d10a5c Version 2.1.2 2018-08-11 23:35:57 -04:00
Josh Holmer
bb1737928e Fix RGB to Indexed reduction if transparency pixel exists
Closes #129
2018-08-11 23:33:55 -04:00
Josh Holmer
7895e42687 Version 2.1.1 2018-08-11 20:34:04 -04:00
Josh Holmer
71d0f6fa31 Fix more issues with alpha optim on interlaced images
Closes #133
2018-08-11 20:27:45 -04:00
Josh Holmer
4ea310fa68 Version 2.1.0 2018-08-04 23:28:14 -04:00
Josh Holmer
3b42f42491 Revert "Revert "Make cfzlib the default on platforms that support it""
This reverts commit ff0e3df948.
2018-08-04 23:08:30 -04:00
Kornel
1322416ba4 Cleanup on error (#132)
Closes #126
2018-08-04 23:02:56 -04:00
Matthias Krüger
947ccaad04 fix more clippy warnings found by "cargo clippy --all-targets --all-features" (#130) 2018-08-02 23:19:42 -04:00
Josh Holmer
f862a0df24 Apply clippy fixes 2018-07-28 16:51:54 -04:00
Matthias Krüger
868fd502b9 reduce_alpha_to_up(): simplify code, don't convert Vec -> iter -> Vec in order to reverse elts, just vec.reverse(). (#127) 2018-07-28 11:19:56 -04:00
Josh Holmer
a8ef802c78 Add line to changelog [skip ci] 2018-07-27 23:15:07 -04:00
Josh Holmer
2241fd2c3b Version 2.0.2 2018-07-27 23:07:05 -04:00
Josh Holmer
7303b94afc Fix issue with alpha optim on interlaced images
Closes #113
2018-07-27 23:03:36 -04:00
Josh Holmer
b948264c32 Version 2.0.1 2018-07-21 00:40:48 -04:00
Josh Holmer
ff0e3df948 Revert "Make cfzlib the default on platforms that support it"
This reverts commit 2702145f3f.

cfzlib seems to have a MASSIVE memory leak in it. Trying to use it
when processing many files at once will cause your system to run out
of memory.

Closes #125
2018-07-21 00:37:57 -04:00
Josh Holmer
d110949d2a Version 2.0.0 2018-07-20 19:19:20 -04:00
Josh Holmer
879ca01042 Remove nonexistent feature 2018-07-20 19:04:12 -04:00
Josh Holmer
2702145f3f Make cfzlib the default on platforms that support it
Raises the minimum Rust version to 1.27.0
2018-07-20 19:03:17 -04:00
Josh Holmer
2f619f214b Bump patch versions of all dependencies 2018-07-20 18:58:40 -04:00
Josh Holmer
b235e5601f Remove deprecated clippy plugin, use rustup clippy now 2018-07-20 18:50:27 -04:00
Kornel
76a2e51c15 Reduce allocations (#122)
* Iterate with fewer temp allocations

* Avoid allocation when not reducing

* Avoid slow modulo
2018-07-20 18:40:51 -04:00
Kornel
c530bba261 --keep option (#121) 2018-07-17 23:55:21 -04:00
Kornel
c99b3778b2 Expose only one internal module specifically for tests (#123)
Closes #98
2018-07-17 23:38:11 -04:00
Kornel
efde5747c4 Parse without temporary allocation (#119) 2018-07-15 09:11:26 -04:00
Josh Holmer
ebd94934a5 Make PngError non-exhaustive for forward compatibility 2018-07-14 15:45:25 -04:00
Kornel
e1cf3bf54b Display options together, in source order (#120) 2018-07-14 15:28:47 -04:00
Kornel
cb52d8466a Reading from stdin (#118) 2018-07-12 07:54:06 -04:00
Kornel
24735b6ab3 Option to limit wall clock time spent on optimization trials (#115) 2018-07-12 07:40:11 -04:00
Kornel
ebf541219c DRYyer tests (#117) 2018-07-10 22:38:49 -04:00
Kornel
d2b1d56e8b Improved limiting of max gzip size (#116) 2018-07-10 22:36:43 -04:00
Kornel
67fd229f20 CLI args value names (#114) 2018-07-10 18:42:55 -04:00
Kornel
55a095d536 Enum for stdout writing flag (#110) 2018-07-10 18:41:06 -04:00
myfreeweb
ae65e4be8d Make Rayon an optional dependency (#112)
On WebAssembly, Rayon does not work (thread pool fails to initialize since threads are stubbed out).
2018-07-06 10:50:36 -04:00
Kornel
2d303f5dc2 Avoid double glob processing on unix (#111) 2018-07-06 08:11:42 -04:00
Kornel
e83762d3b1 Remove deprecated Error::description (#109) 2018-07-06 07:26:49 -04:00
Kornel
442eaf766c Bail early (#104) 2018-06-08 00:09:22 -04:00
Kornel
3e5b61e0c8 Compare images without allocating memory (#107) 2018-06-06 21:59:43 -04:00
magicgoose
5570a24781 allow listing more than 2 filters (#105)
Closes #101
2018-06-06 21:10:20 -04:00
Kornel
e472c82876 Option to use Cloudflare's zlib for compression (#103)
Behind the nightly feature flag for now--stable ASM is coming in Rust 1.27
2018-06-04 15:39:51 -04:00
Josh Holmer
a857cfcc1e
Merge pull request #102 from kornelski/bintest
Small tweaks
2018-06-01 08:34:24 -04:00
Kornel Lesiński
ef763a8550 Return result from bench iter to avoid unused results 2018-06-01 12:18:39 +01:00
Kornel Lesiński
a846f9da53 Disallow building of broken binary 2018-05-31 15:18:04 +01:00
Josh Holmer
cff34358d7 Bump dependencies for 1.0.4 2018-05-01 20:52:32 -04:00
Josh Holmer
8a2bdcd133 Version 1.0.3 2018-04-03 19:03:15 -04:00
Josh Holmer
4e6188919f Bump dependencies 2018-04-03 18:56:43 -04:00
Josh Holmer
d7369707ba Fix a change that breaks itertools with newer versions of Rust nightly 2018-03-04 23:47:06 -05:00
Josh Holmer
88636d269d Actually these need to be under the badges section 2018-02-23 21:45:01 -05:00
Josh Holmer
4a0445b663 Add a couple of new Cargo tags 2018-02-23 20:56:00 -05:00
Josh Holmer
10123daad2 Version 1.0.1 2018-02-21 18:36:56 -05:00
Josh Holmer
c5b08c225c
Merge pull request #99 from cuviper/rayon1
Update to rayon 1.0
2018-02-21 10:30:06 -05:00
Josh Stone
6f123c6382 Update to rayon 1.0 2018-02-20 14:14:45 -08:00
Josh Holmer
27e6dfeaab Version 1!
There should not be any more breaking changes for a long time.
2018-01-31 18:57:52 -05:00
Josh Holmer
3d643b16b2 Adjust spacing in help command 2018-01-31 14:10:03 -05:00
Josh Holmer
d614bba3ac Adjust command line presets to take advantage of the 50% speedup gained by removing memory options 2018-01-31 14:07:03 -05:00
Josh Holmer
66c1662537 Remove unused libc dependency 2018-01-30 23:54:30 -05:00
Josh Holmer
fe9cd01b82 Replace miniz_sys with miniz_oxide, a Rust implementation of miniz
This also improves decompression performance by 15%, and obsoletes the
`--zm` parameter.

Closes #57
2018-01-30 23:52:37 -05:00
Josh Holmer
0c2e3777b1 Refactor an if statement 2018-01-30 22:27:34 -05:00
Josh Holmer
348c7dbc56 Extract a function into a submodule 2018-01-30 22:21:31 -05:00
Josh Holmer
3497040b78 Remove useless annotation 2018-01-30 22:18:22 -05:00
Josh Holmer
cf5b90b444 Preallocate vector on reading in file
Provides 1.5% overall speedup on -o4
2018-01-30 22:15:03 -05:00
Josh Holmer
eb739c9ff9 Implement unix-specific permissions copying
Closes #4
2018-01-30 10:13:29 -05:00
Josh Holmer
b971b362c2 Bump clippy 2018-01-30 09:38:03 -05:00
Josh Holmer
ece85e6d15 Refactoring of internal code into smaller chunks.
There is still more to be done.
2018-01-30 09:35:03 -05:00
Josh Holmer
4d81e23542 Fix the benchmarking script to not overwrite the test file 2018-01-19 18:29:41 -05:00
Josh Holmer
aa8b58628e Fix spacing of line breaks in the rendered documentation
Closes #94
2018-01-18 17:30:51 -05:00
Josh Holmer
9de0eeaf51 Compare performance of oxipng vs optipng
This adds a script to automate this process and add it to the README.
I'll just run it manually after a version release, for now.

Closes #81
2018-01-18 13:58:05 -05:00
Josh Holmer
8270254823 Version 0.19.0 2018-01-10 20:56:23 -05:00
Josh Holmer
e3ba535a79 Add some changes and fixes around how the output file is handled
See changelog for details
2018-01-10 20:54:15 -05:00
Josh Holmer
d204427f73 Refactor options presets 2018-01-10 11:22:52 -05:00
Josh Holmer
88f5bb0931 Hide modules from documentation, and only export structs used in options or return types 2018-01-10 10:37:01 -05:00
Josh Holmer
fe9fd95b21 Update some old documentation 2018-01-10 10:26:12 -05:00
Josh Holmer
4016202806 Bump clippy again 2018-01-10 09:57:27 -05:00
Josh Holmer
215b3d3d59 Bump dependencies 2018-01-09 23:30:56 -05:00
Josh Holmer
9bb60794da Release version 0.18.3 2017-12-27 17:23:28 -05:00
Josh Holmer
32e3d245f9 Run latest rustfmt 2017-12-27 17:21:21 -05:00
Josh Holmer
bb6a2513eb Return exit code of 1 if error occurs while processing a file using the CLI
Closes #93
2017-12-27 17:20:12 -05:00
Josh Holmer
30ecc0cc05 Version 0.18.2 2017-12-23 00:43:23 -05:00
Josh Holmer
f8c62de6c0 Fix unfiltering of first scan line in each pass of an interlaced input file
Closes #92
2017-12-23 00:36:41 -05:00
Josh Holmer
833611ba2f Bump image 2017-12-22 23:22:25 -05:00
Josh Holmer
ce5f83ac6c Version 0.18.1 2017-11-21 12:58:43 -05:00
Josh Holmer
4d62f9f7f9 Fix failure to optimize on certain grayscale images
Closes #89
2017-11-21 12:38:33 -05:00
Josh Holmer
c36cc240e2 Upgrade dependencies 2017-11-21 12:37:06 -05:00
Josh Holmer
91b3772e7d Version 0.18.0 2017-11-08 14:06:10 -05:00
Josh Holmer
47af54fb3e
Merge pull request #91 from shssoichiro/90-Glob-Windows
Fix parsing of glob paths on Windows
2017-11-07 17:17:42 -05:00
Josh Holmer
9c7fdfd9d1 Fix parsing of glob paths on Windows
Closes #90
2017-11-06 19:01:18 -05:00
Josh Holmer
fa334e0750 Update dependencies 2017-11-06 18:50:10 -05:00
Josh Holmer
55a147143b Version 0.17.2 2017-09-30 22:52:18 -04:00
Josh Holmer
de7f93d98b Bump dependencies 2017-09-30 22:46:07 -04:00
Josh Holmer
7822d89d65 Merge pull request #88 from emielbeinema/79-error-for-apng
Return an error when an APNG header is encountered
2017-09-30 22:32:50 -04:00
Emiel Beinema
b417e2bde7 Return an error when an APNG header is encountered 2017-09-30 23:50:52 +02:00
Josh Holmer
2b60d3a78c Merge pull request #87 from emielbeinema/85-read-only-header-for-check
Check header of file before loading it into memory
2017-09-27 09:58:38 -04:00
Emiel Beinema
4711cd6620 Check header of file before loading it in memory 2017-09-27 14:22:33 +02:00
Josh Holmer
37deccd8d3 Version 0.17.1 2017-09-12 18:06:26 -04:00
Josh Holmer
ddd1921deb Add crt-static to rustflags to remove need for VC++ runtime for Windows
users
2017-09-11 20:08:52 -04:00
Josh Holmer
c084a94138 Release version 0.17.0 2017-09-11 18:28:51 -04:00
Josh Holmer
e17f911334 Fix a bug in palette reduction at less than 8 bits per pixel
Closes #82
2017-09-11 18:27:28 -04:00
Josh Holmer
6d1005d199 Update dependencies 2017-09-10 23:32:26 -04:00
Josh Holmer
e3a26b77a4 Fix a bug in reducing palettes with a bit depth of two
Closes #80
2017-09-10 23:26:39 -04:00
Josh Holmer
0db03c6faf Fix new clippy lints 2017-09-03 23:36:38 -04:00
Josh Holmer
ec65bf7676 Code cleanup 2017-07-26 07:57:13 -04:00
Josh Holmer
f7dd2f0323 Merge pull request #78 from shssoichiro/23-Lossy-Reductions
Enable lossy alpha reductions
2017-07-26 07:35:16 -04:00
Josh Holmer
f41ef551d3 Enable option for multiple alpha transformations 2017-07-26 00:37:55 -04:00
Josh Holmer
413f1aac7c Automatically change transparent pixels to black 2017-07-24 08:47:27 -04:00
Josh Holmer
ca657150ec Update dependencies 2017-07-23 16:42:09 -04:00
Josh Holmer
d0c167347d Version 0.16.3 2017-07-01 10:12:43 -04:00
Josh Holmer
270b3fbe61 Update dependencies in lock file 2017-07-01 10:10:47 -04:00
Josh Holmer
19405cabd6 Fix help text
Closes #70
2017-07-01 10:10:26 -04:00
Josh Holmer
55154564df Version 0.16.2 2017-06-20 07:19:42 -04:00
Josh Holmer
f255fea57e Merge pull request #68 from SethDusek/master
Make error module public
2017-06-19 16:27:24 -04:00
SethDusek
cf3789564e Make error module public 2017-06-19 07:21:43 +05:00
Josh Holmer
aa240f1f7b Rayon broke stuff in a point release. Seriously... 2017-06-15 08:01:32 -04:00
Josh Holmer
83a09c4bc1 Merge pull request #66 from shssoichiro/upgrade-deps-20170614
Upgrade dependencies
2017-06-14 18:42:07 -04:00
Josh Holmer
5f4ddbb8f4 Upgrade dependencies 2017-06-14 18:28:07 -04:00
Josh Holmer
2925358856 Release version 0.15.2 2017-05-02 19:32:06 -04:00
Josh Holmer
ed3b843dd2 Update rayon and itertools dependencies 2017-05-02 19:29:20 -04:00
Greg V
8118a29493 Upgrade image to 0.13 2017-05-02 14:18:45 -04:00
Josh Holmer
3833ee6dfe Merge pull request #64 from shssoichiro/fix-ci-build
Upgrade CI scripts to be compatible with Travis update
2017-03-28 09:35:48 -04:00
Josh Holmer
96d76545bd Upgrade CI scripts to be compatible with Travis update 2017-03-28 08:44:06 -04:00
Josh Holmer
84cf6b09c2 Run rustfmt since it updated to v0.8.0.
I don't really like the new changes, but we might as well follow along.
2017-03-08 11:14:33 -05:00
Josh Holmer
d665c61645 Version 0.15.1 2017-03-08 10:14:54 -05:00
Josh Holmer
d18850ebab Ignore color reductions that would increase file size
Closes #61
2017-03-08 10:11:13 -05:00
Josh Holmer
a7c2c9d9df Release version 0.15.0 2017-03-07 11:03:54 -05:00
Josh Holmer
6499933eab Don't write larger file if moving from interlaced to non-interlaced
Closes #62
2017-03-07 09:58:23 -05:00
Josh Holmer
848a73723e Minor changes from last commit 2017-03-06 22:20:11 -05:00
Josh Holmer
6c8e7d253d Verify images are correct before outputting them, and fix a bug in certain images
Closes #60
2017-03-06 20:16:28 -05:00
Josh Holmer
c79ba3ab8a Version 0.14.4 2017-02-26 22:53:23 -05:00
Josh Holmer
87810829ce Fix issues in transparency palette reduction and release version 0.14.3 2017-02-25 23:33:55 -05:00
Josh Holmer
44818a854b Fix two bugs in reducing palette and release version 0.14.2 2017-02-22 15:45:46 -05:00
Josh Holmer
a5e34cce52 Merge pull request #55 from shssoichiro/54-Fix-Broken-zlib
Remove zlib dependency, which broke with the new version of zlib
2017-02-21 23:16:51 -05:00
Joshua Holmer
8e02aa8294 Remove zlib dependency, which broke with the new version of zlib 2017-02-21 21:45:53 -05:00
Josh Holmer
705d280f8b Fix warning when clippy not enabled 2017-02-19 10:43:46 -05:00
Josh Holmer
ce2d166de2 Allow cyclomatic complexity on parse_opts function, there's no reasonable way to split this up
Closes #26
2017-02-15 13:01:17 -05:00
Josh Holmer
af76f11f36 Bump dependencies 2017-02-13 08:51:00 -05:00
Josh Holmer
fd23d27239 Bump dependencies 2017-01-29 17:41:42 -05:00
Josh Holmer
f5ab197b4f Release 0.14.0 2017-01-20 13:32:31 -05:00
Josh Holmer
427803d644 Update changelog again [ci skip] 2017-01-10 08:46:09 -05:00
Josh Holmer
21cdc5579e Merge branch 'update-image-dep' 2017-01-10 08:44:37 -05:00
Josh Holmer
1b315b5eb5 Update dependencies 2017-01-10 08:39:33 -05:00
Josh Holmer
b82c043d65 Update changelog 2017-01-10 08:19:42 -05:00
Josh Holmer
8116d69c3c Minor optimizations 2017-01-10 08:11:10 -05:00
Josh Holmer
b95c562651 Bump version 2017-01-02 13:22:18 -05:00
Josh Holmer
ac1620c072 Update dependencies 2017-01-01 23:42:48 -05:00
Josh Holmer
3f60848122 Fix readme
Oops
2016-12-21 06:17:16 -05:00
Josh Holmer
784cd4bab3 Fix doc links in readme 2016-12-21 00:02:02 -05:00
Josh Holmer
f4b643d54b Fix clippy lints, now that clippy is working again. Hooray! 2016-12-16 21:24:47 -05:00
Josh Holmer
dbe82c077a [ci skip] Fix changelog 2016-12-12 13:56:48 -05:00
Josh Holmer
95c9a373bf Bump rustc to 1.12.0 2016-12-12 13:55:09 -05:00
Josh Holmer
7261fa3398 Release 0.13.0 2016-12-12 13:54:18 -05:00
Josh Holmer
bfdb36d674 Update dependencies 2016-12-12 13:51:31 -05:00
Josh Holmer
e779ddaaea Merge pull request #53 from shssoichiro/52-invalid-chunk-warnings
Reduce certain headers when reducing color type
2016-12-12 10:57:11 -05:00
Josh Holmer
2810316f4e Reduce certain headers when reducing color type
Fixes #52
2016-12-12 09:57:18 -05:00
Josh Holmer
33f1fad711 Minor refactoring 2016-12-03 15:18:11 -05:00
Joshua Holmer
8286c3ab85 Bump to 0.12.0 2016-12-01 22:51:43 -05:00
Joshua Holmer
bf341dd20f Fix clippy warnings 2016-12-01 22:33:38 -05:00
Josh Holmer
5958efe958 Merge pull request #51 from shssoichiro/feature/18-Zopfli-Compression
Implement zopfli compression, available as a CLI flag (-Z)
2016-12-01 13:18:48 -05:00
Josh Holmer
6d49d7b8f9 Implement zopfli compression, available as a CLI flag (-Z)
Improves compression by about 10% over DEFLATE, but takes a very long
time at the moment, so it is off by default.
2016-12-01 12:51:30 -05:00
Josh Holmer
af45b45afe Update readme and appveyor.yml 2016-11-11 12:48:35 -05:00
Josh Holmer
00d2359308 Update CHANGELOG.md 2016-09-19 19:44:23 -04:00
Josh Holmer
645baf61de Merge pull request #50 from aliceatlas/fix-cli-parsing
Fix for passing in filenames that contain commas
2016-09-19 19:42:41 -04:00
Alice Atlas
7460ffac73 Fix for passing in filenames that contain commas
The versions of clap supported by oxipng default to allowing commas to be used as a delimiter for passing a series of values in a single physical command line argument, when parsing for a parameter that accepts multiple values. This prevents oxipng from accepting filenames containing commas (it splits them into segments separated by commas and treats each one as a separate path to a file to process, generally not finding any); this patch fixes this by disabling the delimiter behavior for the 'files' argument.
2016-09-19 18:13:24 -04:00
Josh Holmer
4977dd0948 Replace current Mutex-based threading with Rayon 2016-09-17 18:16:26 -04:00
Josh Holmer
ce971cc665 Add appveyor.yml
See #49
2016-09-14 10:10:46 -04:00
Josh Holmer
03c5098730 Version 0.11.0 2016-09-13 07:44:05 -04:00
Josh Holmer
6d24cbfb3c Downgrade clap for compatibility with rustc 1.9 2016-09-12 17:55:41 -04:00
Josh Holmer
77d3191170 Use docs.rs for documentation 2016-09-09 22:10:11 -04:00
Josh Holmer
f654cbeac4 Various minor changes 2016-09-09 21:55:47 -04:00
Josh Holmer
4da65aef3f Add clone derive for PngError 2016-09-09 08:05:24 -04:00
Josh Holmer
e0dfbf3533 Enable clippy with dev feature, and fix several clippy lints 2016-08-20 20:47:26 -04:00
Josh Holmer
9ebd652a32 Allow travis failures on beta 2016-08-20 20:32:14 -04:00
Josh Holmer
dbc3d97513 Eliminate many clones 2016-08-19 23:42:04 -04:00
Josh Holmer
9d018a3f3b Move clippy to a new "dev" feature 2016-08-19 22:48:23 -04:00
Josh Holmer
fad74c8c98 Merge pull request #48 from shssoichiro/techdebt/44-Use-Error-Types-In-Results
Convert results to return a PngError
2016-08-16 13:25:25 -04:00
Josh Holmer
d99db3ad23 Convert results to return a PngError
Closes #44
2016-08-16 12:38:09 -04:00
Josh Holmer
723c0c29fb Merge pull request #47 from shssoichiro/feature/43-Extract-Presets
Allow using optimization presets from crate
2016-08-14 12:00:54 -04:00
Josh Holmer
3166285150 Allow using optimization presets from crate
Closes #43
2016-08-14 11:31:46 -04:00
Joshua Holmer
e41586ecd3 Provide binary builds on GitHub through rust-everywhere
Closes #34
2016-08-03 14:46:53 -04:00
Josh Holmer
d095cc1684 Bump minimum rust version to 1.8 2016-08-03 08:40:56 -04:00
Josh Holmer
58a36902f6 Fix tests 2016-08-03 08:27:45 -04:00
Josh Holmer
37c32b80ef Remove quickcheck, as it breaks tests against 1.6.0 2016-08-03 08:15:01 -04:00
Josh Holmer
64edc9110e Start using quickcheck and add inline hints 2016-07-30 23:14:36 -04:00
Josh Holmer
c950a68bfe Update dependencies 2016-07-30 21:50:33 -04:00
Josh Holmer
99da13bd8e Version 0.10.0 [ci skip] 2016-07-26 12:59:28 -04:00
Josh Holmer
742b89f756 Merge pull request #46 from shssoichiro/bug/45-Indexed-Crash
Remove conversion from palette to grayscale
2016-07-26 12:57:00 -04:00
Josh Holmer
fa2b5c4ae5 Remove conversion from palette to grayscale
Closes #45
2016-07-26 12:32:43 -04:00
Josh Holmer
f6bb5ab28a Make clap and regex dependencies optional 2016-07-14 22:34:31 -04:00
Josh Holmer
04f8e23e0f Update readme [ci skip] 2016-07-14 21:58:54 -04:00
Josh Holmer
0cb052fbff Remove documentation from master branch [ci skip] 2016-07-14 20:09:21 -04:00
Josh Holmer
7f68fd56fb Fix publishing to crates.io [ci skip] 2016-07-14 20:07:29 -04:00
Josh Holmer
29557a18e8 Version 0.9.0 2016-07-14 20:00:59 -04:00
Josh Holmer
7734a9ffff Use multiple threads to filter 2016-07-14 19:47:47 -04:00
Josh Holmer
7f9ad263ec Refactor code into modules 2016-07-14 11:10:10 -04:00
Josh Holmer
332c27c7d0 Significant refactoring using itertools 2016-07-14 08:10:25 -04:00
Josh Holmer
0f790a1604 Update dependencies 2016-07-13 18:59:20 -04:00
Joshua Holmer
40dff6d0cf Add cargo caching to travis 2016-06-15 13:09:01 -04:00
Joshua Holmer
d359fed17a Update dependencies 2016-06-14 11:41:48 -04:00
Joshua Holmer
2659776bd5 Fix issue for interlacing images smaller than 4px
Fixes #42
2016-05-25 23:10:44 -04:00
Joshua Holmer
aff99f2f7c Merge branch 'master' of github.com:shssoichiro/oxipng 2016-05-13 22:12:43 -04:00
Joshua Holmer
223995b551 Version 0.8.1 [ci skip] 2016-05-13 22:12:27 -04:00
Joshua Holmer
ecc19ad5cd Fix bug where interlaced images with certain widths would fail to optimize 2016-05-13 22:11:45 -04:00
Joshua Holmer
5031f236c8 Revert image crate to 0.8.0 to fix compatibility with rustc 1.6.0 2016-05-13 20:30:06 -04:00
Joshua Holmer
1d39714b0f Fix several new clippy lints 2016-05-13 10:46:16 -04:00
Joshua Holmer
0ddd875c84 Document default values for Options struct [ci skip] 2016-05-06 10:10:34 -04:00
Joshua Holmer
8358f4f72d Version 0.8.0 [ci skip] 2016-05-06 10:00:02 -04:00
Joshua Holmer
566675f0b6 Improve documentation of private API [ci skip] 2016-05-05 15:44:03 -04:00
Joshua Holmer
0fa9cefb7d Check-in the Cargo.lock file to ensure build reproducibility 2016-05-05 13:52:25 -04:00
Joshua Holmer
042e3e2563 Fix new warnings from clippy 2016-05-05 13:40:24 -04:00
Josh Holmer
283589ec8e Merge pull request #41 from tobz/documentation/optimize-in-memory
Add documentation to new public methods for optimizing in-memory.
2016-05-05 13:39:51 -04:00
Toby Lawrence
bc7de9b734 Add documentation to new public methods for optimizing in-memory. 2016-05-05 12:21:31 -04:00
Josh Holmer
def47c9c96 Update Changelog [ci skip] 2016-05-05 08:14:34 -04:00
Josh Holmer
f92986123c Merge pull request #40 from tobz/feature/support-in-memory-optimization
Add support for optimizing in-memory PNGs.
2016-05-05 08:13:12 -04:00
Toby Lawrence
2573b20966 Add support for optimizing PNGs loaded in-memory.
In keeping with being able to use oxipng as a library, this adds a way
for developers to optimize a PNG already in memory, instead of requiring
  it to exist on disk first.
2016-05-05 07:54:52 -04:00
Joshua Holmer
193e6496bd Version 0.7.0 2016-05-04 10:41:29 -04:00
Joshua Holmer
3a39b13acf Add option for changing number of threads at runtime
Closes #39
2016-05-04 10:37:45 -04:00
Joshua Holmer
e4cd9b85e7 Move default Options into impl Default in library 2016-05-04 10:09:26 -04:00
Joshua Holmer
05f0e69e98 Add information about library usage to README [ci skip] 2016-05-04 09:58:29 -04:00
Joshua Holmer
a84611c9ae Replace appropriate uses of assert! with assert_eq! in test suite 2016-05-03 08:03:25 -04:00
Joshua Holmer
aaf443fca7 Similarly optimize unfilter mode 2
Unfilter mode 1 can't benefit from this optimization
because it modifies and reads from the same line of data
2016-05-02 15:58:45 -04:00
Joshua Holmer
3652a69255 Optimize filter mode 1 2016-05-02 15:48:21 -04:00
Joshua Holmer
32c35596ea 25% speed improvement in filter mode 2 by using iter instead of for 2016-05-02 14:49:30 -04:00
Joshua Holmer
c0fddfe4e6 Minor compression improvement in interlaced images 2016-05-02 13:54:04 -04:00
Joshua Holmer
15e41c9c6d Fix benchmarks broken by adding --fix 2016-05-02 13:20:27 -04:00
Joshua Holmer
b8116dd3dd Version 0.6.0 [ci skip] 2016-05-02 09:40:37 -04:00
Joshua Holmer
a4a5953786 Implement --fix to fix CRC errors in PNG block headers
Closes #5
2016-05-02 09:25:48 -04:00
Joshua Holmer
08eb44ec1a Partially implement --preserve
Needs better implementation once stable Rust improves,
or perhaps see if there's a crate for this

Reference #4 but keep open
2016-04-29 23:37:27 -04:00
Joshua Holmer
73d477924e Merge branch 'master' of github.com:shssoichiro/oxipng 2016-04-22 13:37:41 -04:00
Joshua Holmer
2c3e35d8bb Moderately improve cyclomatic complexity 2016-04-22 13:31:59 -04:00
Joshua Holmer
fac83c023d Fix issue where output directory would not be created if it did not exist 2016-04-22 13:31:33 -04:00
Joshua Holmer
f3b8665278 Use miniz for compression strategies 0 and 1
Worst case (RGB/A images) it performs similarly to zlib
Best case (Indexed images) it performs 1-2 orders of magnitude better

Zlib is kept for strategies 2 and 3, where it performs an order of
magnitude better than miniz
2016-04-20 23:14:41 -04:00
Joshua Holmer
1089754436 Add inflate bench for testing different implementations [ci skip] 2016-04-20 22:49:47 -04:00
Joshua Holmer
f8deac1cea Update generated documentation [ci skip] 2016-04-20 15:59:23 -04:00
Joshua Holmer
11308959fa Version 0.5.0 [ci skip] 2016-04-20 15:51:14 -04:00
Joshua Holmer
b67083da0c Revise benchmarks to be more direct [ci skip]
Now actually runs through the whole suite without file locking issues.

Initial results:

     Running target/release/deflate-032c8bb6310daa8e

running 20 tests
test bench_deflate_16_bits_strategy_0 ... bench:  34,772,065 ns/iter (+/- 3,927,686)
test bench_deflate_16_bits_strategy_1 ... bench:  35,829,570 ns/iter (+/- 1,683,748)
test bench_deflate_16_bits_strategy_2 ... bench:  12,428,913 ns/iter (+/- 1,005,308)
test bench_deflate_16_bits_strategy_3 ... bench:  13,247,589 ns/iter (+/- 1,026,688)
test bench_deflate_1_bits_strategy_0  ... bench:     232,037 ns/iter (+/- 5,818)
test bench_deflate_1_bits_strategy_1  ... bench:     235,463 ns/iter (+/- 25,972)
test bench_deflate_1_bits_strategy_2  ... bench:     168,770 ns/iter (+/- 20,463)
test bench_deflate_1_bits_strategy_3  ... bench:      32,254 ns/iter (+/- 1,034)
test bench_deflate_2_bits_strategy_0  ... bench:     537,638 ns/iter (+/- 27,704)
test bench_deflate_2_bits_strategy_1  ... bench:     532,766 ns/iter (+/- 26,777)
test bench_deflate_2_bits_strategy_2  ... bench:     313,566 ns/iter (+/- 29,872)
test bench_deflate_2_bits_strategy_3  ... bench:      44,436 ns/iter (+/- 3,554)
test bench_deflate_4_bits_strategy_0  ... bench:   2,259,173 ns/iter (+/- 236,430)
test bench_deflate_4_bits_strategy_1  ... bench:   2,259,694 ns/iter (+/- 254,753)
test bench_deflate_4_bits_strategy_2  ... bench:     731,383 ns/iter (+/- 21,518)
test bench_deflate_4_bits_strategy_3  ... bench:     193,049 ns/iter (+/- 24,552)
test bench_deflate_8_bits_strategy_0  ... bench:  26,799,023 ns/iter (+/- 2,322,131)
test bench_deflate_8_bits_strategy_1  ... bench:  26,986,947 ns/iter (+/- 3,026,671)
test bench_deflate_8_bits_strategy_2  ... bench:   5,844,986 ns/iter (+/- 547,120)
test bench_deflate_8_bits_strategy_3  ... bench:   5,401,345 ns/iter (+/- 592,391)

test result: ok. 0 passed; 0 failed; 0 ignored; 20 measured

     Running target/release/filters-4cdef7ed188d5a43

running 30 tests
test bench_16_bits_filter_0 ... bench:   1,201,636 ns/iter (+/- 122,922)
test bench_16_bits_filter_1 ... bench:   2,515,136 ns/iter (+/- 351,661)
test bench_16_bits_filter_2 ... bench:   2,536,454 ns/iter (+/- 595,207)
test bench_16_bits_filter_3 ... bench:   2,555,551 ns/iter (+/- 519,059)
test bench_16_bits_filter_4 ... bench:   6,413,073 ns/iter (+/- 505,450)
test bench_16_bits_filter_5 ... bench:  27,124,584 ns/iter (+/- 3,171,162)
test bench_1_bits_filter_0  ... bench:      55,761 ns/iter (+/- 19,412)
test bench_1_bits_filter_1  ... bench:      80,915 ns/iter (+/- 13,928)
test bench_1_bits_filter_2  ... bench:      80,479 ns/iter (+/- 9,268)
test bench_1_bits_filter_3  ... bench:      86,080 ns/iter (+/- 47,504)
test bench_1_bits_filter_4  ... bench:     154,723 ns/iter (+/- 3,932)
test bench_1_bits_filter_5  ... bench:     805,938 ns/iter (+/- 118,853)
test bench_2_bits_filter_0  ... bench:      74,940 ns/iter (+/- 14,205)
test bench_2_bits_filter_1  ... bench:     126,821 ns/iter (+/- 22,497)
test bench_2_bits_filter_2  ... bench:     126,445 ns/iter (+/- 17,852)
test bench_2_bits_filter_3  ... bench:     129,264 ns/iter (+/- 52,772)
test bench_2_bits_filter_4  ... bench:     267,978 ns/iter (+/- 7,064)
test bench_2_bits_filter_5  ... bench:   1,354,604 ns/iter (+/- 206,764)
test bench_4_bits_filter_0  ... bench:     119,468 ns/iter (+/- 13,806)
test bench_4_bits_filter_1  ... bench:     219,357 ns/iter (+/- 34,642)
test bench_4_bits_filter_2  ... bench:     218,588 ns/iter (+/- 11,280)
test bench_4_bits_filter_3  ... bench:     222,955 ns/iter (+/- 60,112)
test bench_4_bits_filter_4  ... bench:     516,987 ns/iter (+/- 33,155)
test bench_4_bits_filter_5  ... bench:   2,424,414 ns/iter (+/- 244,989)
test bench_8_bits_filter_0  ... bench:     551,986 ns/iter (+/- 89,602)
test bench_8_bits_filter_1  ... bench:   1,234,364 ns/iter (+/- 307,291)
test bench_8_bits_filter_2  ... bench:   1,150,679 ns/iter (+/- 35,718)
test bench_8_bits_filter_3  ... bench:   1,161,331 ns/iter (+/- 124,379)
test bench_8_bits_filter_4  ... bench:   3,704,653 ns/iter (+/- 659,212)
test bench_8_bits_filter_5  ... bench:  13,863,376 ns/iter (+/- 2,134,142)

test result: ok. 0 passed; 0 failed; 0 ignored; 30 measured

     Running target/release/interlacing-3a5b64514b03c920

running 10 tests
test bench_deinterlace_16_bits ... bench: 144,075,159 ns/iter (+/- 3,388,596)
test bench_deinterlace_1_bits  ... bench:   2,848,418 ns/iter (+/- 480,685)
test bench_deinterlace_2_bits  ... bench:   5,608,614 ns/iter (+/- 224,235)
test bench_deinterlace_4_bits  ... bench:  11,114,761 ns/iter (+/- 943,506)
test bench_deinterlace_8_bits  ... bench:  71,918,245 ns/iter (+/- 5,374,438)
test bench_interlace_16_bits   ... bench: 186,786,301 ns/iter (+/- 108,170,992)
test bench_interlace_1_bits    ... bench:   3,298,814 ns/iter (+/- 299,550)
test bench_interlace_2_bits    ... bench:   6,615,721 ns/iter (+/- 886,353)
test bench_interlace_4_bits    ... bench:  13,148,900 ns/iter (+/- 1,015,178)
test bench_interlace_8_bits    ... bench:  86,973,845 ns/iter (+/- 2,876,862)

test result: ok. 0 passed; 0 failed; 0 ignored; 10 measured

     Running target/release/oxipng-0aa81de33b66b9ba

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

     Running target/release/oxipng-8dc3c38a24f45aca

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

     Running target/release/reductions-706f4e9274315f2d

running 20 tests
test bench_16_to_8_bits                ... bench:   1,462,010 ns/iter (+/- 245,041)
test bench_2_to_1_bits                 ... bench:   9,090,966 ns/iter (+/- 949,980)
test bench_4_to_1_bits                 ... bench:  17,291,283 ns/iter (+/- 2,295,195)
test bench_4_to_2_bits                 ... bench:  18,106,877 ns/iter (+/- 3,257,698)
test bench_8_to_1_bits                 ... bench:  33,967,094 ns/iter (+/- 1,963,155)
test bench_8_to_2_bits                 ... bench:  34,834,040 ns/iter (+/- 2,992,472)
test bench_8_to_4_bits                 ... bench:  36,904,665 ns/iter (+/- 2,767,626)
test bench_palette_duplicate_reduction ... bench:   5,113,086 ns/iter (+/- 449,931)
test bench_palette_full_reduction      ... bench:  14,751,743 ns/iter (+/- 1,412,029)
test bench_palette_unused_reduction    ... bench:   9,639,936 ns/iter (+/- 462,188)
test bench_rgb_to_grayscale_16         ... bench:  29,428,159 ns/iter (+/- 3,303,357)
test bench_rgb_to_grayscale_8          ... bench:   7,224,088 ns/iter (+/- 951,724)
test bench_rgb_to_palette_8            ... bench:  34,767,333 ns/iter (+/- 1,765,318)
test bench_rgba_to_grayscale_16        ... bench:  28,374,910 ns/iter (+/- 1,495,313)
test bench_rgba_to_grayscale_8         ... bench:  14,288,546 ns/iter (+/- 1,106,506)
test bench_rgba_to_grayscale_alpha_16  ... bench:  20,908,298 ns/iter (+/- 1,351,356)
test bench_rgba_to_grayscale_alpha_8   ... bench:  10,504,579 ns/iter (+/- 1,093,582)
test bench_rgba_to_palette_8           ... bench:  42,195,599 ns/iter (+/- 1,868,201)
test bench_rgba_to_rgb_16              ... bench:  15,955,026 ns/iter (+/- 2,242,433)
test bench_rgba_to_rgb_8               ... bench:   8,185,576 ns/iter (+/- 1,116,708)

test result: ok. 0 passed; 0 failed; 0 ignored; 20 measured
2016-04-20 11:30:08 -04:00
Joshua Holmer
f2c16696a5 Add benchmark suite using cargo
Closes #7
2016-04-19 23:26:05 -04:00
Joshua Holmer
3f3fbb6f60 Don't report pretend mode if verbosity is set to none 2016-04-19 22:38:34 -04:00
Josh Holmer
234ef975f3 Merge pull request #37 from shssoichiro/palette-redux
Add palette reduction
2016-04-13 23:41:26 -04:00
Joshua Holmer
2e7bfa4ebc Add palette reduction
Closes #11
2016-04-13 23:16:32 -04:00
Joshua Holmer
ea484a8978 Version 0.4.0 2016-04-08 13:52:15 -04:00
Joshua Holmer
c78e3213d6 Update crates and fix interlacing issue 2016-04-08 13:37:00 -04:00
Joshua Holmer
8439fcf21d Merge branch 'new-master' 2016-04-08 11:57:15 -04:00
Josh Holmer
e9c44cbc0b Add -s as alias for --strip safe
Fixes #31
2016-04-08 11:56:51 -04:00
Josh Holmer
5316d2ab43 Update README [ci skip]
It seems optipng is no longer dead--although they seem to be in bugfix only mode.
I wouldn't expect multithreading there any time soon.
2016-04-08 09:01:32 -04:00
Joshua Holmer
cf9fc98047 Play around with codeclimate [ci skip] 2016-04-07 09:42:29 -04:00
Josh Holmer
ad494e5a71 Merge pull request #36 from shssoichiro/optimizations
Optimizations
2016-04-05 12:34:46 -04:00
Joshua Holmer
1d0ce6fca8 Performance optimizations
Interlacing performance increased by about 50%
Various other minor optimizations throughout the program
2016-04-05 12:08:47 -04:00
Joshua Holmer
9302caed59 Optimize filter mode 5 SAD loop 2016-04-05 10:52:02 -04:00
Joshua Holmer
548c69cad7 Version 0.3.0 [ci skip] 2016-04-04 20:23:24 -04:00
Joshua Holmer
0b7f40afd1 Merge branch 'master' of github.com:shssoichiro/oxipng 2016-04-04 16:25:58 -04:00
Joshua Holmer
dbae0f7cb6 Update README [ci skip] 2016-04-04 16:25:37 -04:00
Josh Holmer
1d87140b11 Merge pull request #35 from shssoichiro/interlacing
Interlacing
2016-04-04 16:23:54 -04:00
Joshua Holmer
19bcc67668 Update changelog and remove one-time script [ci skip] 2016-04-04 16:12:37 -04:00
Joshua Holmer
1fc81ef683 Support interlaced files and allow conversion between interlaced and progressive files
Closes #3
2016-04-04 16:07:46 -04:00
Joshua Holmer
2974bbbee3 Fix issue with very small images [ci skip] 2016-04-04 11:06:00 -04:00
Josh Holmer
a4ce71247f Show build status for master branch in README [ci skip] 2016-03-31 23:44:23 -04:00
Joshua Holmer
7280ca80ce Fix issues with 2-bit and 1-bit per pixel interlaced images [ci skip] 2016-03-30 21:42:33 -04:00
Joshua Holmer
5740867be5 Work on implementing interlacing [ci skip] 2016-03-29 22:44:21 -04:00
Josh Holmer
6e0a3c8300 Fix grammar [ci skip] 2016-03-22 23:50:12 -04:00
7338 changed files with 12842 additions and 291455 deletions

2
.cargo/config.toml Normal file
View file

@ -0,0 +1,2 @@
[alias]
xtask = "run --manifest-path xtask/Cargo.toml --"

7
.dockerignore Normal file
View file

@ -0,0 +1,7 @@
.editorconfig
.gitignore
/.git/
/.github/
/.pre-commit-hooks.yaml
/scripts/
/target/

11
.editorconfig Normal file
View file

@ -0,0 +1,11 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.rs]
indent_size = 4

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Enforce Unix newlines
* text=auto eol=lf

24
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
commit-message:
prefix: "chore"
include: "scope"
labels:
- "dependencies"
- "rust"
groups:
rust-dependencies:
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

138
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,138 @@
name: deploy
on:
push:
tags:
- v*.*.*
concurrency:
# If we ever end up with two concurrent jobs for releasing the same tag, the former should be cancelled
group: release-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: write
jobs:
deploy:
name: Deploy release
runs-on: ubuntu-latest
timeout-minutes: 30
# Prevent job from running on forks
if: ${{ !github.event.repository.fork }}
strategy:
# Execute one job at a time to avoid potential race conditions in the
# GitHub release management APIs. See:
# https://github.com/softprops/action-gh-release/issues/445#issuecomment-2407940052
max-parallel: 1
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
cache-bin: false
cache-shared-key: cache
- name: Install cargo-deb
if: endsWith(matrix.target, '-linux-gnu')
uses: taiki-e/install-action@v2
with:
tool: cargo-deb
- name: Get the Oxipng version
id: oxipngMeta
run: >
echo "version=$(cargo metadata --format-version 1 --no-deps |
jq -r '.packages[] | select(.name == "oxipng").version')" >> "$GITHUB_OUTPUT"
- name: Retrieve ${{ matrix.target }} binary
uses: dawidd6/action-download-artifact@v21
with:
workflow: oxipng.yml
commit: ${{ github.sha }}
name: Oxipng binary (${{ matrix.target }})
path: target
- name: Generate up to date manual
run: scripts/manual.sh
- name: Build archives
working-directory: target
run: |
ARCHIVE_NAME="oxipng-${{ steps.oxipngMeta.outputs.version }}-${{ matrix.target }}"
mkdir "$ARCHIVE_NAME"
cp ../CHANGELOG.md ../README.md ../MANUAL.txt "$ARCHIVE_NAME"
case '${{ matrix.target }}' in
*-windows-*)
cp ../LICENSE "$ARCHIVE_NAME/LICENSE.txt"
cp oxipng.exe "$ARCHIVE_NAME"
zip "${ARCHIVE_NAME}.zip" "$ARCHIVE_NAME"/*;;
*)
cp ../LICENSE "$ARCHIVE_NAME"
cp oxipng "$ARCHIVE_NAME"
# Execute permissions are not stored in artifact files,
# so make the binary world-executable to meet user
# expectations set by preceding releases.
# Related issue:
# https://github.com/oxipng/oxipng/issues/575
chmod ugo+x "$ARCHIVE_NAME"/oxipng
tar -vczf "${ARCHIVE_NAME}.tar.gz" "$ARCHIVE_NAME"/*;;
esac
- name: Install AArch64 libc components
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get -yq update
# The shared libc AArch64 libraries are needed for cargo deb below
# to be able to infer package requirements with dpkg-shlibdeps
# properly
sudo apt-get -yq install libc6-arm64-cross libgcc-s1-arm64-cross
- name: Build Debian packages
if: endsWith(matrix.target, '-linux-gnu')
env:
# The *-arm64-cross packages above install AArch64 libraries in
# /usr/<arch>/lib instead of /usr/lib/<arch>, as expected by
# cargo-deb and dpkg-shlibdeps to find such shared libraries.
# Make both of them visible to such commands by adding that directory
# to the dynamic linker's library search path. See:
# - <https://man7.org/linux/man-pages/man1/dpkg-shlibdeps.1.html> ("Errors" section)
# - <https://github.com/kornelski/cargo-deb/issues/21>
LD_LIBRARY_PATH: /usr/aarch64-linux-gnu/lib
run: |
mkdir -p "target/${{ matrix.target }}/release"
mv target/oxipng "target/${{ matrix.target }}/release"
cargo deb --target "${{ matrix.target }}" --no-build --no-strip
- name: Create release notes
run: tail -n +3 CHANGELOG.md | sed -e '/^$/,$d' > RELEASE_NOTES.txt
- name: Create release
uses: softprops/action-gh-release@v3
with:
name: v${{ steps.oxipngMeta.outputs.version }}
body_path: RELEASE_NOTES.txt
files: |
target/*.zip
target/*.tar.gz
target/${{ matrix.target }}/debian/*.deb

60
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,60 @@
name: docker
on:
push:
branches:
- master
tags:
- v*.*.*
pull_request:
types:
- opened
- synchronize
workflow_dispatch:
inputs:
use_cache:
description: "Use build cache"
required: true
type: boolean
default: true
concurrency:
# If we ever end up with two concurrent Docker build jobs for the same commit
# and same versioning context, the former should be cancelled
group: docker-${{ github.sha }}-${{ github.ref_type }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
uses: docker/github-builder/.github/workflows/build.yml@v1
permissions:
contents: read
packages: write
id-token: write
attestations: write
with:
output: image
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
cache: ${{ github.event_name != 'workflow_dispatch' || inputs.use_cache }}
# We don't sign the image because ghcr.io doesn't support OCI Referrers API yet, and the fallback relies on pushing new tags on each build
# https://github.com/docker/github-builder/issues/109#issuecomment-3885082486
# https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#backwards-compatibility
sign: false
sbom: true
meta-images: ghcr.io/${{ github.repository }}
meta-tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{raw}}
set-meta-annotations: true
set-meta-labels: true
labels: |
org.opencontainers.image.title=Oxipng
annotations: |
org.opencontainers.image.title=Oxipng
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

180
.github/workflows/oxipng.yml vendored Normal file
View file

@ -0,0 +1,180 @@
name: oxipng
on:
push:
pull_request:
types:
- opened
- synchronize
workflow_dispatch:
concurrency:
# If we ever end up with two concurrent CI jobs for the same commit, the former should be cancelled
group: ci-${{ github.sha }}
cancel-in-progress: true
jobs:
ci:
name: CI
runs-on: ${{ matrix.os }}
timeout-minutes: 60
# Prevent tags and in-repo PRs from triggering this workflow more than once for a commit
if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork)
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc
- x86_64-apple-darwin
- aarch64-apple-darwin
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-24.04
target-apt-arch: amd64
- target: x86_64-unknown-linux-musl
os: ubuntu-24.04
target-apt-arch: amd64
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
target-apt-arch: arm64
- target: aarch64-unknown-linux-musl
os: ubuntu-24.04-arm
target-apt-arch: arm64
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: i686-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-15
- target: aarch64-apple-darwin
os: macos-15
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install musl development files
if: endsWith(matrix.target, '-musl')
run: |
sudo apt-get -yq update
sudo apt-get -yq install musl-tools musl-dev:${{ matrix.target-apt-arch }}
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
target: ${{ env.CARGO_BUILD_TARGET }}
components: clippy, rustfmt, rust-src
cache-bin: false
cache-shared-key: cache
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install cargo-hack
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: taiki-e/install-action@cargo-hack
- name: Install clippy-sarif
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: taiki-e/install-action@v2
with:
tool: clippy-sarif
- name: Install sarif-fmt
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: taiki-e/install-action@v2
with:
tool: sarif-fmt
- name: Run rustfmt
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo fmt --check
- name: Run Clippy for all feature combinations
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: >
set -o pipefail;
cargo hack clippy --no-deps --all-targets --feature-powerset \
--exclude-features sanity-checks,system-libdeflate \
--message-format=json -- -D warnings \
| clippy-sarif
| tee clippy-results.sarif
| sarif-fmt
- name: Run tests
run: |
cargo nextest run --release --features sanity-checks
cargo test --doc --release --features sanity-checks
- name: Build benchmarks
run: cargo bench --no-run
- name: Build docs
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo doc --release --no-deps
- name: Build CLI binary
run: cargo build --release -Zbuild-std
env:
RUSTFLAGS: "-Zlocation-detail=none -Zunstable-options -Cpanic=immediate-abort"
- name: Upload CLI binary as artifact
uses: actions/upload-artifact@v7
with:
name: Oxipng binary (${{ matrix.target }})
path: |
target/${{ env.CARGO_BUILD_TARGET }}/release/oxipng
target/${{ env.CARGO_BUILD_TARGET }}/release/oxipng.exe
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v4
if: always() && matrix.target == 'x86_64-unknown-linux-gnu'
continue-on-error: true
with:
sarif_file: clippy-results.sarif
category: clippy
msrv-check:
name: MSRV check
runs-on: ubuntu-latest
timeout-minutes: 30
# Prevent tags and in-repo PRs from triggering this workflow more than once for a commit
if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork)
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install MSRV Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.85.1
cache-bin: false
cache-shared-key: cache
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run tests
run: |
cargo nextest run --release --features sanity-checks
cargo test --doc --release --features sanity-checks

7
.gitignore vendored
View file

@ -1,5 +1,6 @@
target
Cargo.lock
*.bk
.DS_Store
*.bk
*.out.png
/.idea/
/node_modules/
/target/

7
.pre-commit-hooks.yaml Normal file
View file

@ -0,0 +1,7 @@
- id: oxipng
name: oxipng
description: 'Multithreaded PNG optimizer written in Rust.'
entry: oxipng
language: rust
types: [png]
require_serial: true

View file

@ -1,6 +0,0 @@
language: rust
rust:
- 1.6.0
- stable
- beta
- nightly

View file

@ -1,29 +1,587 @@
**Version 0.2.2**
- Limit number of threads to 1.5x number of cores
- Significantly improve memory usage, especially with high optimization levels. ([#32](https://github.com/shssoichiro/oxipng/issues/32))
- Refactor output code ([#19](https://github.com/shssoichiro/oxipng/issues/19))
## Version 10.1.1
**Version 0.2.1**
- Add rustdoc for public methods and structs
- Improve filter mode 5 heuristic ([#16](https://github.com/shssoichiro/oxipng/issues/16))
- Add tests for edge-case images with subtitles ([#29](https://github.com/shssoichiro/oxipng/issues/29))
- [Performance] Improve Bigrams performance, giving notably faster results at lower levels.
- [Improvement] Change `--np` flag to also prevent conversion to indexed from other color types.
- [Improvement] Improve support for recompressing ICC profiles with high compression ratios.
- [Misc] Add warning when `--ziwi` exceeds `--zi`.
- [Build] Further reduce size of binaries.
**Version 0.2.0**
- Fix program version that is displayed when running `oxipng -V`
- Ensure `--quiet` mode is actually quiet (@SethDusek [#20](https://github.com/shssoichiro/oxipng/pull/20))
- Write status/debug information to stderr instead of stdout
- Use heuristics to determine best combination for `-o1` ([#21](https://github.com/shssoichiro/oxipng/issues/21))
- [SEMVER_MAJOR] Allow 'safe', 'all', or comma-separated list as options for `--strip`
- [SEMVER_MINOR] Add `-s` alias for `--strip`
## Version 10.1.0
**Version 0.1.1**
- Fix `oxipng *` writing all input files to one output file ([#15](https://github.com/shssoichiro/oxipng/issues/15))
- [Feature] Add `--json` option for machine-readable output.
- [Improvement] New default output with file counter and summary. (Use an extra `-v` flag to get the same output as before.)
- [Bugfix] Fix fast mode sometimes giving suboptimal results for small, indexed images.
**Version 0.1.0**
- Initial beta release
- Reduce color type and bit depth
- Recompress with zlib
- Multithreading
- Strip headers option
- Backup file before writing option
- Write to stdout option
## Version 10.0.0
- [Breaking] CLI: Change short zopfli flag from `-Z` to `-z`.
- [Breaking] CLI: Change `--pretend`/`-P` to `--dry-run`/`-d`.
- [Breaking] CLI: Change `--interlace` options from `1`/`0` to `on`/`off`.
- [Breaking] API: Change `Options.interlace: Option<Interlacing>` to `Options.interlace: Option<bool>`.
- [Breaking] API: Change `Options.filter: IndexSet<RowFilter>` to `Options.filters: IndexSet<FilterStrategy>`.
- [Breaking] API: Change `Options.deflate: Deflaters` to `Options.deflater: Deflater`.
- [Breaking] API: Change `Deflaters::Zopfli { .. }` to `Deflater::Zopfli(ZopfliOptions { .. })`.
- [Breaking] API: Change `optimize()` to return `(usize, usize)`, with original and optimized sizes.
- [Feature] Allow zopfli iterations higher than 255.
- [Feature] Add `--ziwi` option for zopfli iterations without improvement.
- [Feature] Add `--max-raw-size` option to skip images that are too large.
- [Feature] Add `--brute-level` and `--brute-lines` options for advanced control of Brute filter.
- [Improvement] Reduce memory usage for `fast` mode.
- [Improvement] Slightly improve compression with Brute filter at levels 5 and 6.
- [Misc] Change `--preserve` option to no longer preserve last access time.
- [Misc] Make help output colored.
## Version 9.1.5
- [Feature] Add `--sequential` option to process files sequentially rather than in parallel.
- [Performance] Update to latest Zopfli with greatly improved performance.
- [Improvement] Reduce memory usage.
- [Bugfix] Correct handling of grayscale conversion when ICC profile is present.
## Version 9.1.4
- [Improvement] Improve optimization of APNG files (reductions still not supported yet).
- [Improvement] Improve reductions for small images and ensure consistent results for repeat runs.
- [Build] Add feature `system-libdeflate` to use the system-installed version of libdeflate.
- [Misc] Strip C2PA metadata by default.
## Version 9.1.3
- [Feature] Add `--zi` option to control the number of Zopfli iterations.
- [Improvement] Allow setting compression level to 0.
- [Performance] Improve filtering performance for some images.
- [Build] Move man page generation to an xtask.
## Version 9.1.2
- [Bugfix] Fix `--nx` still applying deinterlacing by default.
- [Bugfix] Fix wildcard matching being case-sensitive on Windows.
- [Bugfix] Fix optimized APNGs not being compatible with some programs.
- [Build] Fix feature `sanity-checks` not working without `parallel`.
- [Misc] Resolve ambiguity between optional dependencies and crate features.
## Version 9.1.1
- [Build] Change man page generation path to resolve issue with cargo publish.
## Version 9.1.0
- [Improvement] Add `--keep display` equivalent to `--strip safe`.
- [Improvement] Add modified zeng palette sorting method, improving optimization of indexed images.
- [Improvement] If only one filter is specified, guarantee to only use this one.
- [Improvement] Evaluate low-depth indexed even if low-depth grayscale was already achieved.
- [Bugfix] Fix battiato palette sorting method not being used if the input was not already indexed.
- [Bugfix] Fix rare crash caused by a truncated palette.
- [Build] Reduce size of binaries.
- [Build] Add man page generation.
- [Build] Publish deb archives for Linux.
- [Misc] Bump minimum Rust version to 1.74.0.
## Version 9.0.0
- [Breaking] Remove `--backup` option. Use `--out` or `--dir` to preserve existing files.
- [Breaking] Remove `--check` option. Use `--nx --nz` to perform a non-optimizing run.
- [Breaking] API: Replace `pretend` option with `OutFile::None`.
- [Breaking] API: Move `preserve_attrs` into `OutFile::Path`.
- [Breaking] Default to removing interlacing. Use `-i keep` to retain existing interlacing.
- [Feature] Add Raw API for creating optimised PNGs from raw image data.
- [Feature] Add basic support for APNG files.
- [Feature] Add `--scale16` option to forcibly reduce 16-bit images to 8-bit.
- [Improvement] Process multiple files in parallel.
- [Improvement] Improve reductions, particularly for indexed or very small images.
- [Improvement] Improve compression with latest version of libdeflate.
- [Improvement] Recompress iCCP chunks.
- [Improvement] Change recursive mode to only process .png/.apng files.
- [Improvement] Add support for glob patterns in quotes on Windows.
- [Improvement] Quieter default output logging, with multiple levels of verbosity.
- [Bugfix] Fix deadlock when using oxipng within an existing Rayon thread pool.
- [Bugfix] Fix early abort in recursive mode when a read error occurred.
- [Bugfix] Fix losing aux chunks when there's more than one of the same type.
- [Bugfix] Fix sometimes writing output even when it was larger.
- [Misc] Revamp CI workflow to upload artifacts and generate binaries for additional architectures.
- [Misc] Bump minimum Rust version to 1.66.0.
## Version 8.0.0
- [Breaking] Revamp alpha optimization
- [Bugfix] Fix grayscale depth reduction with tRNS pixel
- [Bugfix] Fix fast mode with zopfli
- [Improvement] Tweaks to interlacing and format display
- [Improvement] Ability to reduce alpha channel to tRNS pixel
- [Improvement] Performance improvements to colorspace reduction
- [Misc] Disable image validation in release mode, as it is deemed no longer necessary
## Version 7.0.0
- [Breaking] Switch to libdeflater as the default
- [Breaking] Rebalance presets
- [Breaking] Update safe headers to remove
- [Breaking] Bump minimum Rust version to 1.61.0
- [Feature] Introduce new filter strategies
- [Feature] Allow setting libdeflate compression level
- [Feature] Add optional dockerization
- [Improvement] Improve alpha reductions
- [Improvement] Fast deinterlace for 8-bit
- [Improvement] Refactor heuristics for fast filter evaluation
- [Improvement] Improve file size reduction further
- [Bugfix] Avoid printing output bytes on decompress error
- [Bugfix] Fix compression level 0
- [Bugfix] Fix directional alpha reductions
- [Bugfix] Fix edge cases in palette reduction
### Version 6.0.1
- [Bugfix] Fix an issue where Zopfli mode could generate corrupt images
### Version 6.0.0
- [Breaking] Bump minimum Rust version to 1.57.0
- [Feature] Add `--check`/`-c` CLI option
- [Security] Update stderrlog to 0.5.2 (Fixes RUSTSEC-2022-0006)
- [Security] Remove chrono as a transitive dependency (Fixes RUSTSEC-2020-0159)
- [Misc] Bump `clap` to 3.2
- [Misc] Bump `zopfli` to 0.7
- [Misc] Bump `libdeflater` to 0.10
- [Misc] Remove `byteorder` dependency in favor of stdlib functions
- [Misc] Bump `image` to 0.24
- [Misc] Bump `crc` to 3.0
- [Misc] Bump `miniz_oxide` to 0.6
- [Misc] Update to Rust edition 2021
- [Misc] Various internal improvements
### Version 5.0.1
- [Bugfix] Fix an issue where -o5 and -o6 were not testing all options
- [Misc] Bump miniz_oxide to 0.5
### Version 5.0.0
- [Breaking] Bump minimum Rust version to 1.46.0
- [Bugfix] Avoid many panics that may occur on broken files
- [Bugfix] Fix race condition that may cause tests to fail
- [Performance] Optimizations to unfiltering and copying
- [Feature] Add `--ng` option to skip grayscale reduction
- [Feature] Also preserve timestamps when using `--preserve`
- [Misc] Bump `crc` to 2.x
### Version 4.0.3
- Bump itertools to 0.10.x
- Temporarily disable i686 releases, which were failing due to an odd linker issue,
so that at least amd64 builds will publish successfully
- This only relates to the releases published on Github. You can still manually compile oxipng for any platform.
### Version 4.0.2
- Includes another update to libdeflater that improves support for targets
without a C stdlib, like wasm32.
### Version 4.0.1
- Includes an update to libdeflater that improves support for targets
without a C stdlib, like wasm32.
### Version 4.0.0
- [Breaking] Bump minimum Rust version to 1.45.0
- [Feature] Make `libdeflater` and `zopfli` optional for API users
- [Bugfix] Fix cloudflare-zlib on aarch64 CPUs
- [Bugfix] Don't exit on finding a non-PNG file when crawling recursively
- [Bugfix] Make `rayon` truly optional
- Various internal improvements
### Version 3.0.1
- [Bugfix] Re-add `--force` flag to CLI
- This was accidentally removed somehow
- Many non-breaking dependency version bumps
### Version 3.0.0
- [Breaking] Bump minimum Rust version to 1.41.0
- [Breaking] Use IndexMap/IndexSet to provide more consistent performance ([#202](https://github.com/oxipng/oxipng/pull/202))
- This changes some public-facing types.
`IndexMap` and `IndexSet` are reexported
at the crate root to aid migration.
- [Breaking] Remove fields from the `Options` struct which were never used ([#211](https://github.com/oxipng/oxipng/pull/211/files#diff-b4aea3e418ccdb71239b96952d9cddb6L217), [#212](https://github.com/oxipng/oxipng/pull/212/files#diff-b4aea3e418ccdb71239b96952d9cddb6L134))
- [Breaking] Refactor zlib-specific options in the `Options` struct ([#210](https://github.com/oxipng/oxipng/pull/210/files))
- [Feature] Add libdeflater as an option ([#203](https://github.com/oxipng/oxipng/pull/203))
- [Feature] Use standard `log` library ([#218](https://github.com/oxipng/oxipng/pull/218))
- [Feature] Add `-o max` setting which will always reference the highest compression preset ([#224](https://github.com/oxipng/oxipng/pull/224))
- [Deprecated] `-o 4` was found to be equivalent to `-o 3` and is deprecated.
It will likely be removed in a future release.
For now it remains equivalent to `-o 3`. ([#224](https://github.com/oxipng/oxipng/pull/224))
- [Bugfix] Ensure output is deterministic ([#199](https://github.com/oxipng/oxipng/pull/199))
- Update `image` crate to 0.23
- Update `itertools` crate to 0.9
- Various performance and internal improvements
### Version 2.3.0
- Allow disabling all alpha optimizations ([#181](https://github.com/oxipng/oxipng/pull/181))
- Fix interlacing issues on tiny images ([#182](https://github.com/oxipng/oxipng/pull/182))
- Reduce memory usage in filtering ([#191](https://github.com/oxipng/oxipng/pull/191))
- Implement palette sorting to improve compression ([#193](https://github.com/oxipng/oxipng/pull/193))
- Disable alpha optimizations by default ([#187](https://github.com/oxipng/oxipng/pull/187))
- Add support for WASM ([#194](https://github.com/oxipng/oxipng/pull/194))
### Version 2.2.2
- Fix grayscale bit-depth reduction ([#171](https://github.com/oxipng/oxipng/pull/171))
- Fix typos and incorrect log message ([#172](https://github.com/oxipng/oxipng/pull/172))
- Make metadata order deterministic ([#174](https://github.com/oxipng/oxipng/pull/174))
- Fix 32-bit builds ([#176](https://github.com/oxipng/oxipng/pull/176))
- Enable LTO in release builds ([#177](https://github.com/oxipng/oxipng/pull/177))
- Use deterministic compression strategy ([#179](https://github.com/oxipng/oxipng/pull/179))
- Fix decoding interlaced images with height or width <= 2 ([#175](https://github.com/oxipng/oxipng/pull/175))
- Preallocate memory in reduced_alpha_to_up ([#180](https://github.com/oxipng/oxipng/pull/180))
- Update `bit-vec` crate to 0.6
### Version 2.2.1
- Fix compression of very large files ([#167](https://github.com/oxipng/oxipng/pull/167)) ([#168](https://github.com/oxipng/oxipng/pull/168))
### Version 2.2.0
- Various internal improvements ([#154](https://github.com/oxipng/oxipng/pull/154)) ([#158](https://github.com/oxipng/oxipng/pull/158)) ([#160](https://github.com/oxipng/oxipng/pull/160)) ([#161](https://github.com/oxipng/oxipng/pull/161)) ([#162](https://github.com/oxipng/oxipng/pull/162)) ([#163](https://github.com/oxipng/oxipng/pull/163))
- Update `image` crate to 0.21.0
- Update `itertools` crate to 0.8.0
- Update `zopfli` crate to 0.4.0
- Use Rust edition 2018
- Bump minimum required Rust version to 1.31.0
### Version 2.1.8
- Fix non-standard sBIT headers in other code locations ([#153](https://github.com/oxipng/oxipng/issues/153))
### Version 2.1.7
- 80x faster palette reduction ([#150](https://github.com/oxipng/oxipng/pull/150))
- Optimize RGB to palette conversion ([#148](https://github.com/oxipng/oxipng/pull/148))
- Various microoptimizations ([#146](https://github.com/oxipng/oxipng/pull/146))
- Introduce third-party safe wrapper around cloudflare-zlib ([#149](https://github.com/oxipng/oxipng/pull/149))
### Version 2.1.6
- Identify and drop useless sRGB profiles ([#143](https://github.com/oxipng/oxipng/pull/143))
- Alpha heuristic improvements ([#144](https://github.com/oxipng/oxipng/pull/144))
- Bump `miniz_oxide` and `cloudflare-zlib-sys` to 0.2.0
### Version 2.1.5
- Fix issue where some images will incorrectly reduce bit depth ([#140](https://github.com/oxipng/oxipng/issues/140))
### Version 2.1.4
- Bump `image` crate to 0.20.0
### Version 2.1.3
- Fix i686 builds
- Performance improvements
### Version 2.1.2
- Fix issue with PNG to Indexed reduction on images with transparency pixel ([#129](https://github.com/oxipng/oxipng/issues/129))
### Version 2.1.1
- More fixes for alpha optimization on interlaced images ([#133](https://github.com/oxipng/oxipng/issues/133))
### Version 2.1.0
- [SEMVER_MINOR] Bump minimum Rust version to 1.27.0
- [SEMVER_MINOR] Reenable faster Cloudflare zlib compression on platforms that support it
- Fix memory leak with Cloudflare zlib ([#126](https://github.com/oxipng/oxipng/issues/126))
- Minor fixes and cleanup
### Version 2.0.2
- Fix an issue in alpha optimization on interlaced images ([#113](https://github.com/oxipng/oxipng/issues/113))
### Version 2.0.1
- Revert making Cloudflare zlib the default, as it introduced a major memory leak. It will be put back behind a feature flag, and reenabled when the issue is fixed.
- Revert minimum Rust version to 1.24.0
### Version 2.0.0
- [SEMVER_MAJOR] Make PngError a proper Error enum
- [SEMVER_MINOR] Bump minimum Rust version to 1.27.0
- [SEMVER_MINOR] Make Rayon an optional dependency (enabled by default)
- [SEMVER_MINOR] Option to limit wall clock time spent in optimization trials
- [SEMVER_MINOR] `--keep` option (works similar to `--strip`, but takes a comma-separated list of headers to keep, and removes all other non-critical headers)
- Use faster Cloudflare zlib compression on platforms that support it
- Allow specifying more than 2 filter types via the CLI
- Avoid double glob processing on unix
- Fix reading from stdin
- Cleanup help text
- Various performance improvements
### Version 1.0.4
- Bump `image` to 0.19.0
- Bump `bit-vec` to 0.5.0
- Bump `regex` to 1.0.0
### Version 1.0.3
- Bump dependencies
### Version 1.0.2
- Fix a change that breaks Itertools::flatten with recent Rust nightlies
### Version 1.0.1
- Bump rayon to 1.0 ([#99](https://github.com/oxipng/oxipng/pull/99) @cuviper)
- Bump minor versions of other dependencies for binary distribution
### Version 1.0.0
- Remove the C dependency on miniz, and replace it with a Rust version ([#57](https://github.com/oxipng/oxipng/issues/57))
- This improves decompression speed by 15%. Compression speed is not affected.
- [SEMVER_MAJOR] This also obsoletes the `-zm` command line option and the `memory` key on the `Options` struct.
- Presets will be updated automatically. This means that presets 3 and higher will run significantly more quickly.
- [SEMVER_MAJOR] Adjust the presets, now that `-zm` is no longer an option.
- `-o3` now tests all filter types. This will result in 50% more trials than before, but may give up to 10% more compression gain.
- `-o4` and higher now test all alpha optimization types. This adds 5 trials specific to the alpha channel. Only transparent images are affected.
- Implement unix-specific permissions copying for `-p` option
- Performance optimizations
- Refactor of internal code
### Version 0.19.0
- [SEMVER_MAJOR] Default to overwriting the input file if `out_file` is not set.
This does not affect the CLI, but with the library, it was easy to forget to set the `out_file`,
and there was no warning that no output file would be written.
- Bump dependencies, reduces binary size by a considerable amount
- Hide all modules from documentation, and only export the specific structures that should be public.
Previously there were too many implementation details made public. The modules are still public for the purposes of our integration tests,
but we strongly advise against using undocumented modules. These may become private in the future.
- Internal refactoring and code cleanup
- Fix an error message that was displaying the wrong file path
- Fix an issue where the output file would not be written if the input was already optimized,
even if the output path was different from the input path
### Version 0.18.3
- Return exit code of 1 if an error occurred while processing a file using the CLI app ([#93](https://github.com/oxipng/oxipng/issues/93))
### Version 0.18.2
- Bump `image` to 0.18
- Fix unfiltering of scan lines in interlaced images ([#92](https://github.com/oxipng/oxipng/issues/92))
### Version 0.18.1
- Bump `rayon` to 0.9
- Fix failure to optimize on certain grayscale images ([#89](https://github.com/oxipng/oxipng/issues/89))
### Version 0.18.0
- Bump `itertools` to 0.7
- Bump `image` to 0.17
- [SEMVER_MAJOR] Bump minimum rustc version to 1.20.0
- Fix parsing of glob paths on Windows ([#90](https://github.com/oxipng/oxipng/issues/90))
### Version 0.17.2
- Bump `image` to 0.16
- Quickly pass over files that do not have a PNG header ([#85](https://github.com/oxipng/oxipng/issues/85) @emielbeinema)
- Return an error instead of crashing on APNG files ([#83](https://github.com/oxipng/oxipng/issues/83) @emielbeinema)
### Version 0.17.1
- Remove VC++ download requirement for Windows users
### Version 0.17.0
- [SEMVER_MAJOR] Bump minimum required rustc version to 1.19.0
- [SEMVER_MINOR] Oxipng will now, by default, attempt to change all transparent pixels to `rgba(0, 0, 0, 0)` to improve compression.
It does fast trials with filters 0 and 5 to see if this is an improvement over
the existing alpha channel.
- [SEMVER_MINOR] Add a `-a` option to the command line (`alphas` in the struct) which enables 6 different
trials for optimizing the alpha channel, using the previously mentioned fast heuristic.
This option will make optimization of images with transparency somewhat slower,
but may improve compression.
- Fixed a bug in reducing palettes for images with bit depth of two ([#80](https://github.com/oxipng/oxipng/issues/80))
- Fixed another bug in reducing palettes for images with bit depth less than eight ([#82](https://github.com/oxipng/oxipng/issues/82))
- Code cleanup
- Bump `image` to 0.15
### Version 0.16.3
- Fix command-line help text ([#70](https://github.com/oxipng/oxipng/issues/70))
### Version 0.16.2
- Publicly export `error` module
### Version 0.16.1
- Fix rayon's breaking changes that they made in a point release
### Version 0.16.0
- [SEMVER_MAJOR] Bump minimum rustc version to 1.17.0
- Bump `image` to 0.14
- Bump `rayon` to 0.8
### Version 0.15.2
- Bump `image` to 0.13 ([#65](https://github.com/oxipng/oxipng/pull/65))
- Bump `rayon` to 0.7
- Bump `itertools` to 0.6
### Version 0.15.1
- Ignore color reductions that would increase file size ([#61](https://github.com/oxipng/oxipng/issues/61))
### Version 0.15.0
- [SEMVER_MINOR] Check images for correctness before writing result ([#60](https://github.com/oxipng/oxipng/issues/60))
- Fix invalid output when reducing image to a different color type but file size does not improve ([#60](https://github.com/oxipng/oxipng/issues/60))
- Don't write new file if moving from interlaced to non-interlaced if new file would be larger
### Version 0.14.4
- Fix bug when reducing RGBA to Indexed if image has 256 colors plus a background color
### Version 0.14.3
- Fix multiple bugs when reducing transparency palettes
### Version 0.14.2
- Fix a bug when reducing palette in images with bit depth less than 8
- Fix a bug when reducing palette in images with transparency
### Version 0.14.1
- Remove zlib dependency and switch entirely to miniz, since zlib 1.2.11 was not working with oxipng. This costs some performance, but is better than having a broken application.
### Version 0.14.0
- Performance optimizations
- [SEMVER_MAJOR] Bump minimum rustc version to 1.13.0
- Add categories on crates.io
### Version 0.13.1
- Bump regex dependency to 0.2
- Bump byteorder dependency to 1.0
- Bump rayon dependency to 0.6
### Version 0.13.0
- Fix bug in certain PNG headers when reducing color type ([#52](https://github.com/oxipng/oxipng/issues/52))
- [SEMVER_MAJOR] Reduction functions now take `&mut PngData` and return a `bool` indicating whether the image was reduced
- [SMEVER_MAJOR] Bump minimum required rustc version to 1.12.0
### Version 0.12.0
- Performance optimizations
- Fix processing filenames that contain commas (@aliceatlas [#50](https://github.com/oxipng/oxipng/pull/50))
- [SEMVER_MINOR] Add zopfli option (-Z), disabled by default. Gives about 10% better compression, but is currently 50-100x slower.
### Version 0.11.0
- [SEMVER_MAJOR] Bump minimum rustc version to 1.9.0, required by dependencies
- [SEMVER_MINOR] Allow calling optimization presets via crate using `Options::from_preset`
- [SEMVER_MAJOR] Return proper `PngError` type which implements `std::error::Error` from `Result`s
- [SEMVER_MAJOR] Rename module `deflate::deflate` to `deflate`
- Performance optimizations
### Version 0.10.0
- [SEMVER_MINOR] Make clap and regex dependencies optional
- Enabled by default, needed for executable build; can be disabled for use in crates
- Remove reduction from palette to grayscale, which was not working and provided minimal benefit
### Version 0.9.0
- [SEMVER_MAJOR] Significant refactoring of modules
- Use `itertools` to cleanup areas of code
- Use multiple threads for filtering trials
### Version 0.8.2
- Fix issue where images smaller than 4px width would crash on interlacing ([#42](https://github.com/oxipng/oxipng/issues/42))
### Version 0.8.1
- Minor optimizations
- Fix issue where interlaced images with certain widths would fail to optimize
### Version 0.8.0
- [SEMVER_MINOR] Add support for optimizing PNGs already loaded into memory via library function
### Version 0.7.0
- Minor compression improvement on interlaced images
- Performance optimizations
- [SEMVER_MINOR] Move default Options into a Default impl
- [SEMVER_MINOR] Add option for setting number of threads ([#39](https://github.com/oxipng/oxipng/issues/39))
### Version 0.6.0
- Fix issue where output directory would not be created if it did not exist
- Use miniz for compression strategies where it outperforms zlib
- [SEMVER_MINOR] Partially implement -p / --preserve, as far as stable Rust will allow for now
- [SEMVER_MINOR] Implement --fix to ignore CRC errors and recalculate correct CRC in output
### Version 0.5.0
- [SEMVER_MINOR] Palette entries can now reduced, on by default ([#11](https://github.com/oxipng/oxipng/issues/11))
- Don't report that we are in pretend mode if verbosity is set to none
- Add cargo bench suite ([#7](https://github.com/oxipng/oxipng/issues/7))
### Version 0.4.0
- Performance optimizations
- [SEMVER_MAJOR] `-s` automatically infers `--strip safe` ([#31](https://github.com/oxipng/oxipng/issues/31))
- Update byteorder and clap crates
- Fix issue where interlaced images incorrectly applied filters on the first line of a pass
### Version 0.3.0
- Properly decode interlaced images
- [SEMVER_MINOR] Allow converting between progressive and interlaced images ([#3](https://github.com/oxipng/oxipng/issues/3))
- Fix a bug that would cause oxipng to crash on very small images
### Version 0.2.2
- Limit number of threads to 1.5x number of cores
- Significantly improve memory usage, especially with high optimization levels. ([#32](https://github.com/oxipng/oxipng/issues/32))
- Refactor output code ([#19](https://github.com/oxipng/oxipng/issues/19))
### Version 0.2.1
- Add rustdoc for public methods and structs
- Improve filter mode 5 heuristic ([#16](https://github.com/oxipng/oxipng/issues/16))
- Add tests for edge-case images with subtitles ([#29](https://github.com/oxipng/oxipng/issues/29))
### Version 0.2.0
- Fix program version that is displayed when running `oxipng -V`
- Ensure `--quiet` mode is actually quiet (@SethDusek [#20](https://github.com/oxipng/oxipng/pull/20))
- Write status/debug information to stderr instead of stdout
- Use heuristics to determine best combination for `-o1` ([#21](https://github.com/oxipng/oxipng/issues/21))
- [SEMVER_MAJOR] Allow 'safe', 'all', or comma-separated list as options for `--strip`
- [SEMVER_MINOR] Add `-s` alias for `--strip`
### Version 0.1.1
- Fix `oxipng *` writing all input files to one output file ([#15](https://github.com/oxipng/oxipng/issues/15))
### Version 0.1.0
- Initial beta release
- Reduce color type and bit depth
- Recompress with zlib
- Multithreading
- Strip headers option
- Backup file before writing option
- Write to stdout option

649
Cargo.lock generated Normal file
View file

@ -0,0 +1,649 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "adler2"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "anstream"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
[[package]]
name = "anstyle-parse"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys",
]
[[package]]
name = "autocfg"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "bitflags"
version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
[[package]]
name = "bitvec"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
dependencies = [
"funty",
"radium",
"tap",
"wyz",
]
[[package]]
name = "bumpalo"
version = "3.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
[[package]]
name = "bytemuck"
version = "1.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
[[package]]
name = "byteorder-lite"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "cc"
version = "1.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20"
dependencies = [
"find-msvc-tools",
"shlex",
]
[[package]]
name = "cfg-if"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "clap"
version = "4.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
"terminal_size",
]
[[package]]
name = "clap_lex"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
[[package]]
name = "colorchoice"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
[[package]]
name = "crc32fast"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "either"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "env_filter"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef"
dependencies = [
"log",
]
[[package]]
name = "env_logger"
version = "0.11.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
dependencies = [
"anstream",
"anstyle",
"env_filter",
"log",
]
[[package]]
name = "equivalent"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "fdeflate"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
dependencies = [
"simd-adler32",
]
[[package]]
name = "find-msvc-tools"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
[[package]]
name = "flate2"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
]
[[package]]
name = "funty"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
[[package]]
name = "glob"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
[[package]]
name = "hashbrown"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
[[package]]
name = "image"
version = "0.25.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a"
dependencies = [
"bytemuck",
"byteorder-lite",
"moxcms",
"num-traits",
"png",
]
[[package]]
name = "indexmap"
version = "2.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
dependencies = [
"equivalent",
"hashbrown",
"rayon",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
name = "itoa"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
[[package]]
name = "libc"
version = "0.2.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
[[package]]
name = "libdeflate-sys"
version = "1.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72753e0008ea87963d2f0770042d0df7abe51fafbb8dcaf618ac440f2f1fec0a"
dependencies = [
"cc",
"pkg-config",
]
[[package]]
name = "libdeflater"
version = "1.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1ee41cf6fb1bb6030dfb59ffb7bc01ab26aade44142084c87f0fc7a1658fe71"
dependencies = [
"libdeflate-sys",
]
[[package]]
name = "linux-raw-sys"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "log"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5"
[[package]]
name = "memchr"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "miniz_oxide"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
"adler2",
"simd-adler32",
]
[[package]]
name = "moxcms"
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97"
dependencies = [
"num-traits",
"pxfm",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "oxipng"
version = "10.1.1"
dependencies = [
"bitvec",
"clap",
"env_logger",
"glob",
"image",
"indexmap",
"libdeflater",
"log",
"parse-size",
"rayon",
"rgb",
"rustc-hash",
"serde_json",
"zopfli",
]
[[package]]
name = "parse-size"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487f2ccd1e17ce8c1bfab3a65c89525af41cfad4c8659021a1e9a2aacd73b89b"
[[package]]
name = "pkg-config"
version = "0.3.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
[[package]]
name = "png"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
dependencies = [
"bitflags",
"crc32fast",
"fdeflate",
"flate2",
"miniz_oxide",
]
[[package]]
name = "proc-macro2"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "pxfm"
version = "0.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f"
[[package]]
name = "quote"
version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [
"proc-macro2",
]
[[package]]
name = "radium"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
[[package]]
name = "rayon"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "rgb"
version = "0.8.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
dependencies = [
"bytemuck",
]
[[package]]
name = "rustc-hash"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
[[package]]
name = "rustix"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "simd-adler32"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tap"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "terminal_size"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874"
dependencies = [
"rustix",
"windows-sys",
]
[[package]]
name = "unicode-ident"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]
[[package]]
name = "wyz"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
dependencies = [
"tap",
]
[[package]]
name = "zmij"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
[[package]]
name = "zopfli"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
dependencies = [
"bumpalo",
"crc32fast",
"log",
"simd-adler32",
]

View file

@ -1,35 +1,121 @@
[package]
name = "oxipng"
version = "0.2.2"
authors = ["Joshua Holmer <jholmer.in@gmail.com>"]
categories = ["command-line-utilities", "compression"]
description = "A lossless PNG compression optimizer"
license = "MIT"
documentation = "https://shssoichiro.github.io/oxipng/"
homepage = "https://github.com/shssoichiro/oxipng"
repository = "https://github.com/shssoichiro/oxipng"
keywords = ["png", "image-compression", "optimization", "multi-threading", "lossless"]
documentation = "https://docs.rs/oxipng"
edition = "2024"
exclude = [
".editorconfig",
".gitattributes",
".github/*",
".gitignore",
".pre-commit-hooks.yaml",
"Dockerfile",
"scripts/*",
"tests/*",
"xtask/*",
]
homepage = "https://github.com/oxipng/oxipng"
license = "MIT"
name = "oxipng"
repository = "https://github.com/oxipng/oxipng"
version = "10.1.1"
rust-version = "1.85.1"
[badges]
travis-ci = { repository = "oxipng/oxipng", branch = "master" }
maintenance = { status = "actively-developed" }
[[bin]]
doc = false
name = "oxipng"
path = "src/main.rs"
required-features = ["binary"]
[[bench]]
name = "zopfli"
required-features = ["zopfli"]
[dependencies]
bitvec = "1.0.1"
clap = { version = "4.6.0", optional = true, features = ["wrap_help"] }
env_logger = { version = "0.11.10", optional = true, default-features = false, features = ["auto-color"] }
image = { version = "0.25.9", optional = true, default-features = false, features = ["png"] }
indexmap = "2.14.0"
libdeflater = "1.25.2"
log = "0.4.30"
parse-size = { version = "1.1.0", optional = true }
rayon = { version = "1.11.0", optional = true }
rgb = "0.8.53"
rustc-hash = "2.1.2"
zopfli = { version = "0.8.3", optional = true, default-features = false, features = ["std", "zlib"] }
[target.'cfg(windows)'.dependencies]
glob = { version = "0.3.3", optional = true }
[dev-dependencies]
serde_json = "1.0.150"
[features]
binary = ["dep:clap", "dep:glob", "dep:env_logger", "dep:parse-size"]
default = ["binary", "parallel", "zopfli"]
parallel = ["dep:rayon", "indexmap/rayon"]
freestanding = ["libdeflater/freestanding"]
sanity-checks = ["dep:image"]
zopfli = ["dep:zopfli"]
system-libdeflate = ["libdeflater/dynamic"]
[lib]
name = "oxipng"
path = "src/lib.rs"
[[bin]]
name = "oxipng"
path = "src/main.rs"
doc = false
[profile.dev]
opt-level = 2
[dependencies]
bit-vec = "^0.4.2"
byteorder = "^0.4.0"
clap = "^1.5.4"
crc = "^1.0.0"
libc = "^0.2.4"
libz-sys = "^1.0.0"
num_cpus = "^0.2.11"
regex = "^0.1.8"
scoped-pool = "^0.1.8"
[profile.release]
lto = "fat"
strip = "symbols"
panic = "abort"
[dev-dependencies]
image = "^0.6.1"
[package.metadata.deb]
assets = [
["target/release/oxipng", "usr/bin/", "755"],
["target/xtask/mangen/manpages/oxipng.1", "usr/share/man/man1/", "644"],
["README.md", "usr/share/doc/oxipng/", "644"],
["CHANGELOG.md", "usr/share/doc/oxipng/", "644"],
]
[lints.rust]
missing_copy_implementations = "deny"
missing_debug_implementations = "deny"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_import_braces = "warn"
[lints.clippy]
cloned_instead_of_copied = "warn"
expl_impl_clone_on_copy = "warn"
float_cmp_const = "warn"
if_not_else = "warn"
ignored_unit_patterns = "warn"
linkedlist = "warn"
manual_let_else = "warn"
map_flatten = "warn"
map_unwrap_or = "warn"
match_same_arms = "warn"
mem_forget = "warn"
missing_const_for_fn = "warn"
mut_mut = "warn"
mutex_integer = "warn"
needless_continue = "warn"
option_if_let_else = "warn"
path_buf_push_overwrite = "warn"
range_plus_one = "warn"
redundant_clone = "warn"
redundant_closure_for_method_calls = "warn"
semicolon_if_nothing_returned = "warn"
unnecessary_semicolon = "warn"
unseparated_literal_suffix = "warn"
use_self = "warn"
useless_let_if_seq = "warn"

46
Dockerfile Normal file
View file

@ -0,0 +1,46 @@
# syntax=docker/dockerfile:1
# check=error=true
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM rust:1.85.1-alpine AS base
RUN apk update && \
apk add \
gcc \
g++ \
clang
COPY --from=xx / /
ARG TARGETPLATFORM
RUN xx-info env
RUN xx-apk add \
gcc \
musl-dev \
libdeflate
WORKDIR /src
COPY . .
RUN --mount=type=cache,target=/root/.cargo/git/db \
--mount=type=cache,target=/root/.cargo/registry/cache \
--mount=type=cache,target=/root/.cargo/registry/index \
xx-cargo build --release && \
xx-verify /src/target/$(xx-cargo --print-target-triple)/release/oxipng && \
cp /src/target/$(xx-cargo --print-target-triple)/release/oxipng /src/target/oxipng
FROM scratch AS tool
LABEL org.opencontainers.image.title="Oxipng"
LABEL org.opencontainers.image.description="Multithreaded PNG optimizer written in Rust"
LABEL org.opencontainers.image.authors="Joshua Holmer <jholmer.in@gmail.com>"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/oxipng/oxipng"
COPY --from=base /src/target/oxipng /usr/local/bin/oxipng
WORKDIR /work
ENTRYPOINT [ "oxipng" ]
CMD [ "--help" ]

227
MANUAL.txt Normal file
View file

@ -0,0 +1,227 @@
oxipng 10.1.0
Losslessly improve compression of PNG files
Usage: oxipng [OPTIONS] <files>...
Arguments:
<files>...
File(s) to compress (use '-' for stdin)
Options:
-o, --opt <level>
Set the optimization level preset. The default level 2 is quite fast and provides good
compression. Lower levels are faster, higher levels provide better compression, though
with increasingly diminishing returns.
0 => --zc 5 --fast (filter chosen heuristically)
1 => --zc 10 --fast (filter chosen heuristically)
2 => --zc 11 -f 0,1,6,7 --fast
3 => --zc 11 -f 0,7,8,9 --brute-level 1 --brute-lines 3
4 => --zc 12 -f 0,7,8,9 --brute-level 1 --brute-lines 4
5 => --zc 12 -f 0,1,2,5,6,7,8,9 --brute-level 4 --brute-lines 4
6 => --zc 12 -f 0-9 --brute-level 5 --brute-lines 8
max => (stable alias for the maximum level)
Manually specifying a compression option (zc, f, etc.) will override the optimization
preset, regardless of the order you write the arguments.
[default: 2]
-r, --recursive
When directories are given as input, traverse the directory trees and optimize all PNG
files found (files with “.png” or “.apng” extension).
--dir <directory>
Write output file(s) to <directory>. If the directory does not exist, it will be created.
Note that this will not preserve the directory structure of the input files when used with
'--recursive'.
--out <file>
Write output file to <file>
--stdout
Write output to stdout
-p, --preserve
Preserve file permissions and timestamps if possible
-d, --dry-run
Do not write any files, only show compression results
-s
Strip safely-removable chunks, same as '--strip safe'
--strip <mode>
Strip metadata chunks, where <mode> is one of:
safe => Strip all non-critical chunks, except for the following:
cICP, iCCP, sRGB, pHYs, acTL, fcTL, fdAT
all => Strip all non-critical chunks
<list> => Strip chunks in the comma-separated list, e.g. 'bKGD,cHRM'
CAUTION: 'all' will convert APNGs to standard PNGs.
Please note that regardless of any options set, some chunks will necessarily be stripped
when invalidated by the optimization:
bKGD, sBIT, hIST: Stripped if the color type or bit depth changes.
iDOT: Always stripped.
caBX: Stripped if it contains C2PA metadata. If explicitly retained by `--keep`,
optimization will be aborted.
The default when --strip is not passed is to keep all chunks that remain valid.
--keep <list>
Strip all metadata chunks except those in the comma-separated list. The special value
'display' includes chunks that affect the image appearance, equivalent to '--strip safe'.
E.g. '--keep eXIf,display' will strip chunks, keeping only eXIf and those that affect the
image appearance.
-a, --alpha
Perform additional optimization on images with an alpha channel, by altering the color
values of fully transparent pixels. This is generally recommended for better compression,
but take care as while this is “visually lossless”, it is technically a lossy
transformation and may be unsuitable for some applications.
-i, --interlace <mode>
Set the PNG interlacing mode, where <mode> is one of:
off => Remove interlacing from all images that are processed
on => Apply Adam7 interlacing on all images that are processed
keep => Keep the existing interlacing mode of each image
Note that interlacing can add 25-50% to the size of an optimized image. Only use it if you
believe the benefits outweigh the costs for your use case.
[default: off]
--scale16
Forcibly reduce images with 16 bits per channel to 8 bits per channel. This is a lossy
operation but can provide significant savings when you have no need for higher depth.
Reduction is performed by scaling the values such that, e.g. 0x00FF is reduced to 0x01
rather than 0x00.
Without this flag, 16-bit images will only be reduced in depth if it can be done
losslessly.
-v, --verbose...
Show per-file info (use multiple times for more detail)
-q, --quiet
Suppress all output messages
-j, --json
Print results as JSON
-f, --filters <list>
Perform compression trials with each of the given filter types. You can specify a
comma-separated list, or a range of values. E.g. '-f 0-3' is the same as '-f 0,1,2,3'.
PNG delta filters (apply the same filter to every line)
0 => None (recommended to always include this filter)
1 => Sub
2 => Up
3 => Average
4 => Paeth
Heuristic strategies (try to find the best delta filter for each line)
5 => MinSum Minimum sum of absolute differences
6 => Entropy Smallest Shannon entropy
7 => Bigrams Lowest count of distinct bigrams
8 => BigEnt Smallest Shannon entropy of bigrams
9 => Brute Smallest compressed size (slow)
The default value depends on the optimization level preset.
--fast
Perform a fast compression evaluation of each enabled filter, followed by a single main
compression trial of the best result. Recommended if you have more filters enabled than
CPU cores.
--zc <level>
Deflate compression level (0-12) for main compression trials. The levels here are defined
by the libdeflate compression library.
The default value depends on the optimization level preset.
--nb
Do not change bit depth
--nc
Do not change color type
--np
Do not change color palette
--ng
Do not change to or from grayscale
--nx
Do not perform any transformations and do not deinterlace by default.
--nz
Do not recompress IDAT unless required due to transformations. Recompression of other
compressed chunks (such as iCCP) will also be disabled. Note that the combination of
'--nx' and '--nz' will fully disable all optimization.
--fix
Do not perform checksum validation of PNG chunks. This may allow some files with errors to
be processed successfully. The output will always have correct checksums.
--force
Write the output even if it is larger than the input
-z, --zopfli
Use the much slower but stronger Zopfli compressor for main compression trials.
Recommended use is with '-o max' and '--fast'.
--zi <iterations>
Set the number of iterations to use for Zopfli compression. Using fewer iterations may
speed up compression for large files. This option requires '--zopfli' to be set.
[default: 15]
--ziwi <iterations>
Stop Zopfli compression after this number of iterations without improvement. Use this in
conjunction with a high value for '--zi' to achieve better compression in reasonable time.
--brute-level <level>
Set the libdeflate compression level to use with the Brute filter strategy. Sane values
are 1-5. Higher values are not necessarily better.
--brute-lines <lines>
Set the number of lines to compress at once with the Brute filter strategy. Sane values
are 2-16. Higher values are not necessarily better.
--timeout <secs>
Maximum amount of time, in seconds, to spend on optimizations. Oxipng will check the
timeout before each transformation or compression trial, and will stop trying to optimize
the file if the timeout is exceeded. Note that this does not cut short any operations that
are already in progress, so it is currently of limited effectiveness for large files with
high compression levels.
--max-raw-size <bytes>
Maximum size to allow for the input image. If the raw, decompressed image data (or the
file size) of the image exceeds this size, it will be skipped. This is useful for limiting
memory usage or avoiding long processing times on large images. The value may be specified
with a unit suffix such as k, KB, m, MB, etc.
The decompressed size of an image is roughly equal to width * height * bit-depth / 8. E.g.
a 1920x1080 image with 24-bit color depth would be roughly 6MB.
-t, --threads <num>
Set the maximum number of threads to use. Oxipng uses multithreading to evaluate multiple
optimizations on the same file in parallel as well as process multiple files in parallel.
You can set this to a lower value if you need to limit memory or CPU usage.
[default: num logical CPUs]
--sequential
Process multiple files sequentially rather than in parallel. Use this if you need
determinism in the processing order. Note this is not necessary if using '--threads 1'.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version

167
README.md
View file

@ -1,86 +1,163 @@
# Oxipng
[![Build Status](https://travis-ci.org/shssoichiro/oxipng.svg)](https://travis-ci.org/shssoichiro/oxipng)
[![Build Status](https://github.com/oxipng/oxipng/workflows/oxipng/badge.svg)](https://github.com/oxipng/oxipng/actions?query=branch%3Amaster)
[![Version](https://img.shields.io/crates/v/oxipng.svg)](https://crates.io/crates/oxipng)
[![License](https://img.shields.io/crates/l/oxipng.svg)](https://github.com/shssoichiro/oxipng/blob/master/LICENSE)
[![License](https://img.shields.io/crates/l/oxipng.svg)](https://github.com/oxipng/oxipng/blob/master/LICENSE)
[![Docs](https://docs.rs/oxipng/badge.svg)](https://docs.rs/oxipng)
## Overview
Oxipng is a lossless PNG compression optimizer.
**Note:** This package should be considered a beta. Although there are many tests in place,
there is still a chance of data loss or corruption. You should backup your files before
using this tool, unless you are very brave.
If you encounter an issue, please report it via the GitHub issues tab. Include as many details
as possible.
Oxipng is a multithreaded lossless PNG/APNG compression optimizer. It can be used via a command-line
interface or as a library in other Rust programs. It is fast and highly effective.
## Installing
Oxipng can be installed from Cargo, via the following command:
Oxipng for Windows can be downloaded via the
[Releases](https://github.com/oxipng/oxipng/releases) section on its GitHub page. Recently,
however, Oxipng has also been made available through package managers. Check the list below for
up-to-date options.
For MacOS or Linux, it is recommended to install from your distro's package repository, provided
Oxipng is available there in a not too outdated version for your use case.
Oxipng is known to be packaged for the environments listed below.
[![Packaging status](https://repology.org/badge/vertical-allrepos/oxipng.svg?exclude_unsupported=1&columns=3&exclude_sources=modules,site)](https://repology.org/project/oxipng/versions)
Alternatively, Oxipng can be installed from Cargo, via the following command:
```
cargo install oxipng
```
Alternatively, oxipng can be built from source using the latest stable or nightly Rust:
Oxipng can also be built from source using the latest stable or nightly Rust.
This is primarily useful for developing on Oxipng.
```
git clone https://github.com/shssoichiro/oxipng.git
git clone https://github.com/oxipng/oxipng.git
cd oxipng
cargo build --release
cp target/release/oxipng /usr/local/bin
```
Please note that zlib is a required build dependency. Oxipng should work with any 1.x version of zlib,
but you are advised to use the latest version (currently 1.2.8) for security and bug fixes.
The current minimum supported Rust version is **1.6.0**. Oxipng may compile on earlier versions of Rust,
but there is no guarantee.
The current minimum supported Rust version is **1.85.1**.
Oxipng follows Semantic Versioning.
## Usage
Oxipng is a command-line utility. Basic usage looks similar to the following:
Oxipng is a command-line utility. An example usage, suitable for web, may be the following:
```
oxipng -o 4 -i 1 --strip safe *.png
oxipng -o 4 --strip safe --alpha *.png
```
The most commonly used options are as follows:
* Optimization: `-o 1` through `-o 6`, lower is faster, higher is better compression.
The default (`-o 2`) is sufficiently fast on a modern CPU and provides 30-50% compression
gains over an unoptimized PNG. `-o 4` is 6 times slower than `-o 2` but can provide 5-10%
extra compression over `-o 2`. Using any setting higher than `-o 4` is unlikely
to give any extra compression gains and is not recommended.
* Interlacing: `-i 1` will enable [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm)
PNG interlacing on any images that are processed. `-i 0` will remove interlacing from all
processed images. Not specifying either will keep the same interlacing state as the
input image. Note: Interlacing can add 25-50% to the size of an optimized image. Only use
it if you have a good reason. (*Not Yet Implemented*)
* Strip: Used to remove metadata info from processed images. Used via `--strip [safe,all]`.
Can save a few kilobytes if you don't need the metadata. "Safe" removes only metadata that
will never affect rendering of the image. "All" removes all metadata that is not critical
to the image. You can also pass a comma-separated list of specific metadata chunks to remove.
More advanced options can be found by running `oxipng -h`.
- Optimization: `-o 0` through `-o 6` (or `-o max`), lower is faster, higher is better compression.
The default (`-o 2`) is quite fast and provides good compression. Higher levels can be notably
better* but generally have increasingly diminishing returns.
- Strip: Used to remove metadata info from processed images. Used via `--strip [safe,all]`.
Can save a few kilobytes if you don't need the metadata. "Safe" removes only metadata that
will never affect rendering of the image. "All" removes all metadata that is not critical
to the image. You can also pass a comma-separated list of specific metadata chunks to remove.
`-s` can be used as a shorthand for `--strip safe`.
- Alpha: `--alpha` can improve compression of images with transparency, by altering the color
values of fully transparent pixels. This is generally recommended, but take care as this is
technically a lossy transformation and may be unsuitable for some specific applications.
More advanced options can be found by running `oxipng --help`, or viewed [here](MANUAL.txt).
Some options have both short (`-a`) and long (`--alpha`) forms. Which form you use is just a
matter of preference. Multiple short options can be combined together, e.g.:
`-savvo6` is equivalent to to `--strip safe --alpha --verbose --verbose --opt 6`.
All options are case-sensitive.
\* Note that oxipng is not a brute-force optimizer. This means that while higher optimization levels
are almost always better or equal to lower levels, this is not guaranteed and it is possible in
rare circumstances that a lower level may give a marginally smaller output. Similarly, using Zopfli
compression (`-z`) is not guaranteed to always be better than default compression.
## APNG support
Oxipng currently only supports limited optimization of animated PNGs (APNGs). It can perform
alpha-optimization, refiltering and recompression of all frames, but all transformations will be
disabled. For best results, it is recommended to use another tool such as
[apngopt](https://sourceforge.net/projects/apng/files/APNG_Optimizer/) before running Oxipng.
## Git integration via [pre-commit]
Create a `.pre-commit-config.yaml` file like this, or add the lines after the `repos` map
preamble to an already existing one:
```yaml
repos:
- repo: https://github.com/oxipng/oxipng
rev: v10.0.0
hooks:
- id: oxipng
args: ["-o", "4", "--strip", "safe", "--alpha"]
```
[pre-commit]: https://pre-commit.com/
## Docker
A Docker image is availlable at [`ghcr.io/oxipng/oxipng`](https://github.com/oxipng/oxipng/pkgs/container/oxipng) for `linux/amd64` and `linux/arm64`.
You can use it the following way:
```bash
docker run --rm -v $(pwd):/work ghcr.io/oxipng/oxipng -o 4 /work/file.png
```
Some older images are also available at [`ghcr.io/shssoichiro/oxipng`](https://github.com/users/shssoichiro/packages/container/package/oxipng).
## Library Usage
Although originally intended to be used as an executable, Oxipng can also be used as a library in
other Rust projects. To do so, simply add Oxipng as a dependency in your Cargo.toml. You should then
have access to all of the library functions [documented here](https://docs.rs/oxipng). The simplest
method of usage involves creating an [Options
struct](https://docs.rs/oxipng/latest/oxipng/struct.Options.html) and passing it, along with an
input filename, into the [optimize function](https://docs.rs/oxipng/latest/oxipng/fn.optimize.html).
It is recommended to disable the "binary" feature when including Oxipng as a library. Currently, there is
no simple way to just disable one feature in Cargo, it has to be done by disabling default features
and specifying the desired ones, for example:
`oxipng = { version = "10.0", features = ["parallel", "zopfli", "filetime"], default-features = false }`
## Software using Oxipng
- [ImageOptim](https://imageoptim.com): Mac app and web service for optimizing images
- [Squoosh](https://squoosh.app): Web app for optimizing images
- [FileOptimizer](https://nikkhokkho.sourceforge.io/?page=FileOptimizer): Windows app for optimizing files
- [Curtail](https://github.com/Huluti/Curtail): Linux app for optimizing images
- [pyoxipng](https://pypi.org/project/pyoxipng/): Python wrapper for Oxipng
- [jSquash](https://github.com/jamsinclair/jSquash): Collection of WebAssembly image codecs
- [Trunk](https://trunk.io): Developer experience toolkit for managing code
## History
Oxipng began as a completely rewrite of the OptiPNG project,
which is assumed to be dead as no commit has been made to it since March 2014.
The name has been changed to avoid confusion and potential legal issues.
The core goal of rewriting OptiPNG was to implement multithreading,
which would be very difficult to do within the existing C codebase of OptiPNG.
Oxipng began in 2015 as a rewrite of the OptiPNG project. The core goal was to implement
multithreading, which would have been very difficult to do within the existing C codebase of OptiPNG.
This also served as an opportunity to choose a more modern, safer language (Rust).
However, Oxipng has evolved considerably since then. While some of the options remain similar to
OptiPNG, the architecture and capabilities are now quite different. It is not a drop-in
replacement - if you are migrating from OptiPNG, please check the [help](MANUAL.txt) before use.
## Contributing
Any contributions are welcome and will be accepted via pull request on GitHub. Bug reports can be
filed via GitHub issues. If you have the capability to submit a fix with the bug report, it is
preferred that you do so via pull request, however you do not need to be a Rust programmer to
contribute. Other contributions (such as improving documentation or translations) are also
welcome via GitHub.
filed via GitHub issues. Please include as many details as possible. If you have the capability
to submit a fix with the bug report, it is preferred that you do so via pull request,
however you do not need to be a Rust developer to contribute.
Other contributions (such as improving documentation or translations) are also welcome via GitHub.
## Benchmarks
An independent benchmark is linked here with permission by the author:\
[oxipng and friends: A comparison of PNG optimization tools](https://op111.net/posts/2025/09/png-compression-oxipng-optipng-fileoptimizer-cwebp/)
## License

13
SECURITY.md Normal file
View file

@ -0,0 +1,13 @@
# Security Policy
## Supported Versions
Only the latest version will be supported with security updates. We will not maintain old branches.
For this reason, you should attempt to always use the latest released version.
## Reporting a Vulnerability
To privately report a vulnerability in oxipng, please visit [our advisories page](https://github.com/oxipng/oxipng/security/advisories) and use the button to report a vulnerability.
We will review it as soon as possible.
For vulnerabilities in dependencies, please open a pull request updating the dependency to a patched version.

63
benches/deflate.rs Normal file
View file

@ -0,0 +1,63 @@
#![feature(test)]
extern crate oxipng;
extern crate test;
use std::path::PathBuf;
use oxipng::{internal_tests::*, *};
use test::Bencher;
#[bench]
fn deflate_16_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
}
#[bench]
fn deflate_8_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
}
#[bench]
fn deflate_4_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
}
#[bench]
fn deflate_2_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
}
#[bench]
fn deflate_1_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| deflate(png.raw.data.as_ref(), 12, None));
}
#[bench]
fn inflate_generic(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| inflate(png.idat_data.as_ref(), png.raw.ihdr.raw_data_size()));
}

285
benches/filters.rs Normal file
View file

@ -0,0 +1,285 @@
#![feature(test)]
extern crate oxipng;
extern crate test;
use std::path::PathBuf;
use oxipng::{internal_tests::*, *};
use test::Bencher;
#[bench]
fn filters_16_bits_filter_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
}
#[bench]
fn filters_8_bits_filter_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
}
#[bench]
fn filters_4_bits_filter_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
}
#[bench]
fn filters_2_bits_filter_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
}
#[bench]
fn filters_1_bits_filter_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::NONE, false));
}
#[bench]
fn filters_16_bits_filter_1(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
}
#[bench]
fn filters_8_bits_filter_1(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
}
#[bench]
fn filters_4_bits_filter_1(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
}
#[bench]
fn filters_2_bits_filter_1(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
}
#[bench]
fn filters_1_bits_filter_1(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::SUB, false));
}
#[bench]
fn filters_16_bits_filter_2(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
}
#[bench]
fn filters_8_bits_filter_2(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
}
#[bench]
fn filters_4_bits_filter_2(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
}
#[bench]
fn filters_2_bits_filter_2(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
}
#[bench]
fn filters_1_bits_filter_2(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::UP, false));
}
#[bench]
fn filters_16_bits_filter_3(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
}
#[bench]
fn filters_8_bits_filter_3(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
}
#[bench]
fn filters_4_bits_filter_3(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
}
#[bench]
fn filters_2_bits_filter_3(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
}
#[bench]
fn filters_1_bits_filter_3(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::AVERAGE, false));
}
#[bench]
fn filters_16_bits_filter_4(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
}
#[bench]
fn filters_8_bits_filter_4(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
}
#[bench]
fn filters_4_bits_filter_4(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
}
#[bench]
fn filters_2_bits_filter_4(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
}
#[bench]
fn filters_1_bits_filter_4(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::PAETH, false));
}
#[bench]
fn filters_16_bits_filter_5(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
}
#[bench]
fn filters_8_bits_filter_5(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
}
#[bench]
fn filters_4_bits_filter_5(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
}
#[bench]
fn filters_2_bits_filter_5(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
}
#[bench]
fn filters_1_bits_filter_5(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
}

105
benches/interlacing.rs Normal file
View file

@ -0,0 +1,105 @@
#![feature(test)]
extern crate oxipng;
extern crate test;
use std::path::PathBuf;
use oxipng::{internal_tests::*, *};
use test::Bencher;
#[bench]
fn interlacing_16_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(true));
}
#[bench]
fn interlacing_8_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(true));
}
#[bench]
fn interlacing_4_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(true));
}
#[bench]
fn interlacing_2_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(true));
}
#[bench]
fn interlacing_1_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(true));
}
#[bench]
fn deinterlacing_16_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/interlaced_rgb_16_should_be_rgb_16.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(false));
}
#[bench]
fn deinterlacing_8_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/interlaced_rgb_8_should_be_rgb_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(false));
}
#[bench]
fn deinterlacing_4_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/interlaced_palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(false));
}
#[bench]
fn deinterlacing_2_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/interlaced_palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(false));
}
#[bench]
fn deinterlacing_1_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/interlaced_palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.change_interlacing(false));
}

281
benches/reductions.rs Normal file
View file

@ -0,0 +1,281 @@
#![feature(test)]
extern crate oxipng;
extern crate test;
use std::path::PathBuf;
use oxipng::{internal_tests::*, *};
use test::Bencher;
#[bench]
fn reductions_16_to_8_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_16_to_8(&png.raw, false));
}
#[bench]
fn reductions_16_to_8_bits_scaled(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_16_to_8(&png.raw, true));
}
#[bench]
fn reductions_8_to_4_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
}
#[bench]
fn reductions_8_to_2_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
}
#[bench]
fn reductions_8_to_1_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
}
#[bench]
fn reductions_grayscale_8_to_4_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_8_should_be_grayscale_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
}
#[bench]
fn reductions_grayscale_8_to_2_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_8_should_be_grayscale_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
}
#[bench]
fn reductions_grayscale_8_to_1_bits(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_8_should_be_grayscale_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| bit_depth::reduced_bit_depth_8_or_less(&png.raw));
}
#[bench]
fn reductions_rgba_to_rgb_16(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgba_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
}
#[bench]
fn reductions_rgba_to_rgb_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgba_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
}
#[bench]
fn reductions_rgba_to_rgb_trns_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgba_8_should_be_rgb_trns_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
}
#[bench]
fn reductions_rgba_to_grayscale_alpha_16(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/rgba_16_should_be_grayscale_alpha_16.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
}
#[bench]
fn reductions_rgba_to_grayscale_alpha_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/rgba_8_should_be_grayscale_alpha_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
}
#[bench]
fn reductions_rgb_to_grayscale_16(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/rgb_16_should_be_grayscale_16.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
}
#[bench]
fn reductions_rgb_to_grayscale_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_grayscale_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_rgb_to_grayscale(&png.raw));
}
#[bench]
fn reductions_rgba_to_palette_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgba_8_should_be_palette_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_to_indexed(&png.raw, true));
}
#[bench]
fn reductions_rgb_to_palette_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_palette_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_to_indexed(&png.raw, true));
}
#[bench]
fn reductions_grayscale_alpha_to_grayscale_16(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_alpha_16_should_be_grayscale_16.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
}
#[bench]
fn reductions_grayscale_alpha_to_grayscale_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_alpha_8_should_be_grayscale_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
}
#[bench]
fn reductions_grayscale_alpha_to_grayscale_trns_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::reduced_alpha_channel(&png.raw, true));
}
#[bench]
fn reductions_grayscale_8_to_palette_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/grayscale_8_should_be_palette_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::reduced_to_indexed(&png.raw, true));
}
#[bench]
fn reductions_palette_8_to_grayscale_8(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_grayscale_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| color::indexed_to_channels(&png.raw, true, false));
}
#[bench]
fn reductions_palette_duplicate_reduction(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_should_be_reduced_with_dupes.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| palette::reduced_palette(&png.raw, false));
}
#[bench]
fn reductions_palette_unused_reduction(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_should_be_reduced_with_unused.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| palette::reduced_palette(&png.raw, false));
}
#[bench]
fn reductions_palette_full_reduction(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_should_be_reduced_with_both.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| palette::reduced_palette(&png.raw, false));
}
#[bench]
fn reductions_palette_sort(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_palette_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| palette::sorted_palette(&png.raw));
}
#[bench]
fn reductions_palette_sort_mzeng(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_palette_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| palette::sorted_palette_mzeng(&png.raw));
}
#[bench]
fn reductions_palette_sort_battiato(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_8_should_be_palette_8.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| palette::sorted_palette_battiato(&png.raw));
}
#[bench]
fn reductions_alpha(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgba_8_reduce_alpha.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| alpha::cleaned_alpha_channel(&png.raw));
}

57
benches/strategies.rs Normal file
View file

@ -0,0 +1,57 @@
#![feature(test)]
extern crate oxipng;
extern crate test;
use std::path::PathBuf;
use oxipng::{internal_tests::*, *};
use test::Bencher;
#[bench]
fn filters_minsum(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::MinSum, false));
}
#[bench]
fn filters_entropy(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::Entropy, false));
}
#[bench]
fn filters_bigrams(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::Bigrams, false));
}
#[bench]
fn filters_bigent(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| png.raw.filter_image(FilterStrategy::BigEnt, false));
}
#[bench]
fn filters_brute(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| {
png.raw.filter_image(
FilterStrategy::Brute {
num_lines: 4,
level: 1,
},
false,
)
});
}

65
benches/zopfli.rs Normal file
View file

@ -0,0 +1,65 @@
#![feature(test)]
extern crate oxipng;
extern crate test;
use std::path::PathBuf;
use oxipng::{internal_tests::*, *};
use test::Bencher;
#[bench]
fn zopfli_16_bits_strategy_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_16_should_be_rgb_16.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| {
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
});
}
#[bench]
fn zopfli_8_bits_strategy_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from("tests/files/rgb_8_should_be_rgb_8.png"));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| {
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
});
}
#[bench]
fn zopfli_4_bits_strategy_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_4_should_be_palette_4.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| {
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
});
}
#[bench]
fn zopfli_2_bits_strategy_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_2_should_be_palette_2.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| {
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
});
}
#[bench]
fn zopfli_1_bits_strategy_0(b: &mut Bencher) {
let input = test::black_box(PathBuf::from(
"tests/files/palette_1_should_be_palette_1.png",
));
let png = PngData::new(&input, &Options::default()).unwrap();
b.iter(|| {
zopfli_deflate(png.raw.data.as_ref(), ZopfliOptions::default()).ok();
});
}

View file

View file

@ -1,64 +0,0 @@
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,99 +0,0 @@
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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,101 +0,0 @@
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.

View file

@ -1,201 +0,0 @@
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.

View file

@ -1,23 +0,0 @@
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,93 +0,0 @@
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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,93 +0,0 @@
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.

Binary file not shown.

View file

@ -1 +0,0 @@
initSidebarItems({"struct":[["Match","Records a match in the search text."],["Matches","An iterator of non-overlapping matches for in-memory text."],["MatchesOverlapping","An iterator of overlapping matches for in-memory text."],["StreamMatches","An iterator of non-overlapping matches for streaming text."],["StreamMatchesOverlapping","An iterator of overlapping matches for streaming text."]],"trait":[["Automaton","An abstraction over automatons and their corresponding iterators. The type parameter `P` is the type of the pattern that was used to construct this Automaton."]]});

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +0,0 @@
initSidebarItems({"struct":[["FullAcAutomaton","A complete Aho-Corasick automaton."]]});

View file

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

View file

@ -1,322 +0,0 @@
<!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 `aho_corasick` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, aho_corasick">
<title>aho_corasick - 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: 'aho_corasick', 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=''>aho_corasick</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/aho_corasick/lib.rs.html.html#1-919' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>An implementation of the
<a href="https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm">Aho-Corasick string search algorithm</a>.</p>
<p>The Aho-Corasick algorithm is principally useful when you need to search many
large texts for a fixed (possibly large) set of keywords. In particular, the
Aho-Corasick algorithm preprocesses the set of keywords by constructing a
finite state machine. The search phase is then a quick linear scan through the
text. Each character in the search text causes a state transition in the
automaton. Matches are reported when the automaton enters a match state.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>The main type exposed by this crate is <code>AcAutomaton</code>, which can be constructed
from an iterator of pattern strings:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>};
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;apple&quot;</span>, <span class='string'>&quot;maple&quot;</span>]);
<span class='comment'>// AcAutomaton also implements `FromIterator`:</span>
<span class='kw'>let</span> <span class='ident'>aut</span>: <span class='ident'>AcAutomaton</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> [<span class='string'>&quot;apple&quot;</span>, <span class='string'>&quot;maple&quot;</span>].<span class='ident'>iter</span>().<span class='ident'>cloned</span>().<span class='ident'>collect</span>();</pre>
<p>Finding matches can be done with <code>find</code>:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>, <span class='ident'>Match</span>};
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;apple&quot;</span>, <span class='string'>&quot;maple&quot;</span>]);
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>it</span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find</span>(<span class='string'>&quot;I like maple apples.&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>it</span>.<span class='ident'>next</span>(), <span class='prelude-val'>Some</span>(<span class='ident'>Match</span> {
<span class='ident'>pati</span>: <span class='number'>1</span>,
<span class='ident'>start</span>: <span class='number'>7</span>,
<span class='ident'>end</span>: <span class='number'>12</span>,
}));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>it</span>.<span class='ident'>next</span>(), <span class='prelude-val'>Some</span>(<span class='ident'>Match</span> {
<span class='ident'>pati</span>: <span class='number'>0</span>,
<span class='ident'>start</span>: <span class='number'>13</span>,
<span class='ident'>end</span>: <span class='number'>18</span>,
}));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>it</span>.<span class='ident'>next</span>(), <span class='prelude-val'>None</span>);</pre>
<p>Use <code>find_overlapping</code> if you want to report all matches, even if they
overlap with each other.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>, <span class='ident'>Match</span>};
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;a&quot;</span>]);
<span class='kw'>let</span> <span class='ident'>matches</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find_overlapping</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>matches</span>, <span class='macro'>vec</span><span class='macro'>!</span>[
<span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>1</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>1</span>}, <span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>0</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>3</span> },
]);
<span class='comment'>// Regular `find` will report only one match:</span>
<span class='kw'>let</span> <span class='ident'>matches</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>matches</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>1</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>1</span>}]);</pre>
<p>Finally, there are also methods for finding matches on <em>streams</em>. Namely, the
search text does not have to live in memory. It&#39;s useful to run this on files
that can&#39;t fit into memory:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>fs</span>::<span class='ident'>File</span>;
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>};
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;baz&quot;</span>]);
<span class='kw'>let</span> <span class='ident'>rdr</span> <span class='op'>=</span> <span class='ident'>File</span>::<span class='ident'>open</span>(<span class='string'>&quot;search.txt&quot;</span>).<span class='ident'>unwrap</span>();
<span class='kw'>for</span> <span class='ident'>m</span> <span class='kw'>in</span> <span class='ident'>aut</span>.<span class='ident'>stream_find</span>(<span class='ident'>rdr</span>) {
<span class='kw'>let</span> <span class='ident'>m</span> <span class='op'>=</span> <span class='ident'>m</span>.<span class='ident'>unwrap</span>(); <span class='comment'>// could be an IO error</span>
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Pattern &#39;{}&#39; matched at: ({}, {})&quot;</span>,
<span class='ident'>aut</span>.<span class='ident'>pattern</span>(<span class='ident'>m</span>.<span class='ident'>pati</span>), <span class='ident'>m</span>.<span class='ident'>start</span>, <span class='ident'>m</span>.<span class='ident'>end</span>);
}</pre>
<p>There is also <code>stream_find_overlapping</code>, which is just like <code>find_overlapping</code>,
but it operates on streams.</p>
<p>Please see <code>dict-search.rs</code> in this crate&#39;s <code>examples</code> directory for a more
complete example. It creates a large automaton from a dictionary and can do a
streaming match over arbitrarily large data.</p>
<h1 id='memory-usage' class='section-header'><a href='#memory-usage'>Memory usage</a></h1>
<p>A key aspect of an Aho-Corasick implementation is how the state transitions
are represented. The easiest way to make the automaton fast is to store a
sparse 256-slot map in each state. It maps an input byte to a state index.
This makes the matching loop extremely fast, since it translates to a simple
pointer read.</p>
<p>The problem is that as the automaton accumulates more states, you end up paying
a <code>256 * 4</code> (<code>4</code> is for the <code>u32</code> state index) byte penalty for every state
regardless of how many transitions it has.</p>
<p>To solve this, only states near the root of the automaton have this sparse
map representation. States near the leaves of the automaton use a dense mapping
that requires a linear scan.</p>
<p>(The specific limit currently set is <code>3</code>, so that states with a depth less than
or equal to <code>3</code> are less memory efficient. The result is that the memory usage
of the automaton stops growing rapidly past ~60MB, even for automatons with
thousands of patterns.)</p>
<p>If you&#39;d like to opt for the less-memory-efficient-but-faster version, then
you can construct an <code>AcAutomaton</code> with a <code>Sparse</code> transition strategy:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>aho_corasick</span>::{<span class='ident'>Automaton</span>, <span class='ident'>AcAutomaton</span>, <span class='ident'>Match</span>, <span class='ident'>Sparse</span>};
<span class='kw'>let</span> <span class='ident'>aut</span> <span class='op'>=</span> <span class='ident'>AcAutomaton</span>::<span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span>, <span class='ident'>Sparse</span><span class='op'>&gt;</span>::<span class='ident'>with_transitions</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;a&quot;</span>]);
<span class='kw'>let</span> <span class='ident'>matches</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>aut</span>.<span class='ident'>find</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>matches</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>Match</span> { <span class='ident'>pati</span>: <span class='number'>1</span>, <span class='ident'>start</span>: <span class='number'>0</span>, <span class='ident'>end</span>: <span class='number'>1</span>}]);</pre>
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
<td><a class='struct' href='struct.AcAutomaton.html'
title='aho_corasick::AcAutomaton'>AcAutomaton</a></td>
<td class='docblock short'>
<p>An Aho-Corasick finite automaton.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Dense.html'
title='aho_corasick::Dense'>Dense</a></td>
<td class='docblock short'>
<p>State transitions that can be stored either sparsely or densely.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.FullAcAutomaton.html'
title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a></td>
<td class='docblock short'>
<p>A complete Aho-Corasick automaton.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Match.html'
title='aho_corasick::Match'>Match</a></td>
<td class='docblock short'>
<p>Records a match in the search text.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Matches.html'
title='aho_corasick::Matches'>Matches</a></td>
<td class='docblock short'>
<p>An iterator of non-overlapping matches for in-memory text.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.MatchesOverlapping.html'
title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a></td>
<td class='docblock short'>
<p>An iterator of overlapping matches for in-memory text.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Sparse.html'
title='aho_corasick::Sparse'>Sparse</a></td>
<td class='docblock short'>
<p>State transitions that are always sparse.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.StreamMatches.html'
title='aho_corasick::StreamMatches'>StreamMatches</a></td>
<td class='docblock short'>
<p>An iterator of non-overlapping matches for streaming text.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.StreamMatchesOverlapping.html'
title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a></td>
<td class='docblock short'>
<p>An iterator of overlapping matches for streaming text.</p>
</td>
</tr>
</table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class='trait' href='trait.Automaton.html'
title='aho_corasick::Automaton'>Automaton</a></td>
<td class='docblock short'>
<p>An abstraction over automatons and their corresponding iterators.
The type parameter <code>P</code> is the type of the pattern that was used to
construct this Automaton.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='trait' href='trait.Transitions.html'
title='aho_corasick::Transitions'>Transitions</a></td>
<td class='docblock short'>
<p>An abstraction over state transition strategies.</p>
</td>
</tr>
</table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
<table>
<tr class=' module-item'>
<td><a class='type' href='type.StateIdx.html'
title='aho_corasick::StateIdx'>StateIdx</a></td>
<td class='docblock short'>
<p>The integer type used for the state index.</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1 +0,0 @@
initSidebarItems({"struct":[["AcAutomaton","An Aho-Corasick finite automaton."],["Dense","State transitions that can be stored either sparsely or densely."],["FullAcAutomaton","A complete Aho-Corasick automaton."],["Match","Records a match in the search text."],["Matches","An iterator of non-overlapping matches for in-memory text."],["MatchesOverlapping","An iterator of overlapping matches for in-memory text."],["Sparse","State transitions that are always sparse."],["StreamMatches","An iterator of non-overlapping matches for streaming text."],["StreamMatchesOverlapping","An iterator of overlapping matches for streaming text."]],"trait":[["Automaton","An abstraction over automatons and their corresponding iterators. The type parameter `P` is the type of the pattern that was used to construct this Automaton."],["Transitions","An abstraction over state transition strategies."]],"type":[["StateIdx","The integer type used for the state index."]]});

View file

@ -1,150 +0,0 @@
<!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 `AcAutomaton` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, AcAutomaton">
<title>aho_corasick::AcAutomaton - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'AcAutomaton', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>AcAutomaton</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-480' class='srclink' href='../src/aho_corasick/lib.rs.html.html#186-190' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct AcAutomaton&lt;P, T = <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An Aho-Corasick finite automaton.</p>
<p>The type parameter <code>P</code> is the type of the pattern that was used to
construct this AcAutomaton.</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt; <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P&gt;</code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>&lt;I&gt;(pats: I) -&gt; <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=P&gt;</span></code></h4>
<div class='docblock'><p>Create a new automaton from an iterator of patterns.</p>
<p>The patterns must be convertible to bytes (<code>&amp;[u8]</code>) via the <code>AsRef</code>
trait.</p>
</div></div><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>&gt; <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;</code></h3><div class='impl-items'><h4 id='method.with_transitions' class='method'><code>fn <a href='#method.with_transitions' class='fnname'>with_transitions</a>&lt;I&gt;(pats: I) -&gt; <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=P&gt;</span></code></h4>
<div class='docblock'><p>Create a new automaton from an iterator of patterns.</p>
<p>This constructor allows one to choose the transition representation.</p>
<p>The patterns must be convertible to bytes (<code>&amp;[u8]</code>) via the <code>AsRef</code>
trait.</p>
</div><h4 id='method.into_full' class='method'><code>fn <a href='#method.into_full' class='fnname'>into_full</a>(self) -&gt; <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h4>
<div class='docblock'><p>Build out the entire automaton into a single matrix.</p>
<p>This will make searching as fast as possible at the expense of using
at least <code>4 * 256 * #states</code> bytes of memory.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>&gt; <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;</code></h3><div class='impl-items'><h4 id='method.next_state' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.next_state' class='fnname'>next_state</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
<h4 id='method.get_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.get_match' class='fnname'>get_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
<h4 id='method.has_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.has_match' class='fnname'>has_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.start_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.start_bytes' class='fnname'>start_bytes</a>(&amp;self) -&gt; <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></code></h4>
<h4 id='method.patterns' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.patterns' class='fnname'>patterns</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
<h4 id='method.pattern' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.pattern' class='fnname'>pattern</a>(&amp;self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;P</code></h4>
<h4 id='method.len' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.is_empty' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find' class='fnname'>find</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
<h4 id='method.find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find_overlapping' class='fnname'>find_overlapping</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
<h4 id='method.stream_find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find' class='fnname'>stream_find</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
<h4 id='method.stream_find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
</div><h3 class='impl'><code>impl&lt;S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;S&gt; for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;S&gt;</code></h3><div class='impl-items'><h4 id='method.from_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html#method.from_iter' class='fnname'>from_iter</a>&lt;T&gt;(it: T) -&gt; <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;S&gt; <span class='where'>where T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=S&gt;</span></code></h4>
</div><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>&gt; <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='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;</code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,121 +0,0 @@
<!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 `Dense` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Dense">
<title>aho_corasick::Dense - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Dense', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Dense</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-631' class='srclink' href='../src/aho_corasick/lib.rs.html.html#418' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Dense(_);</pre><div class='docblock'><p>State transitions that can be stored either sparsely or densely.</p>
<p>This uses less space but at the expense of slower matching.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.new' class='fnname'>new</a>(depth: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -&gt; <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h4>
<h4 id='method.goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.goto' class='fnname'>goto</a>(&amp;self, b1: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
<h4 id='method.set_goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.set_goto' class='fnname'>set_goto</a>(&amp;mut self, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>)</code></h4>
<h4 id='method.heap_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.heap_bytes' class='fnname'>heap_bytes</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,139 +0,0 @@
<!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 `FullAcAutomaton` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, FullAcAutomaton">
<title>aho_corasick::FullAcAutomaton - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'FullAcAutomaton', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>FullAcAutomaton</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-374' class='srclink' href='../src/aho_corasick/full.rs.html.html#20-25' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct FullAcAutomaton&lt;P&gt; {
// some fields omitted
}</pre><div class='docblock'><p>A complete Aho-Corasick automaton.</p>
<p>This uses a single transition matrix that permits each input character
to move to the next state with a single lookup in the matrix.</p>
<p>This is as fast as it gets, but it is guaranteed to use a lot of memory.
Namely, it will use at least <code>4 * 256 * #states</code>, where the number of
states is capped at length of all patterns concatenated.</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt; <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>&lt;T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>&gt;(ac: <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;) -&gt; <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h4>
<div class='docblock'><p>Build a new expanded Aho-Corasick automaton from an existing
Aho-Corasick automaton.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt; <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h3><div class='impl-items'><h4 id='method.next_state' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.next_state' class='fnname'>next_state</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
<h4 id='method.get_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.get_match' class='fnname'>get_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
<h4 id='method.has_match' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.has_match' class='fnname'>has_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.start_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.start_bytes' class='fnname'>start_bytes</a>(&amp;self) -&gt; <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></code></h4>
<h4 id='method.patterns' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.patterns' class='fnname'>patterns</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
<h4 id='method.pattern' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.pattern' class='fnname'>pattern</a>(&amp;self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;P</code></h4>
<h4 id='method.len' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.is_empty' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find' class='fnname'>find</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
<h4 id='method.find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.find_overlapping' class='fnname'>find_overlapping</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
<h4 id='method.stream_find' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find' class='fnname'>stream_find</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
<h4 id='method.stream_find_overlapping' class='method'><code>fn <a href='../aho_corasick/trait.Automaton.html#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h4>
</div><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>&gt; <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='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,136 +0,0 @@
<!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 `Match` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Match">
<title>aho_corasick::Match - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Match', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Match</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-89' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#140-153' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Match {
pub pati: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
pub start: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
pub end: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
}</pre><div class='docblock'><p>Records a match in the search text.</p>
</div><h2 class='fields'>Fields</h2>
<table><tr class='stab '>
<td id='structfield.pati'><code>pati</code></td><td><div class='docblock'><p>The pattern index.</p>
<p>This corresponds to the ordering in which the matched pattern was
added to the automaton, starting at <code>0</code>.</p>
</div></td></tr><tr class='stab '>
<td id='structfield.start'><code>start</code></td><td><div class='docblock'><p>The starting byte offset of the match in the search text.</p>
</div></td></tr><tr class='stab '>
<td id='structfield.end'><code>end</code></td><td><div class='docblock'><p>The ending byte offset of the match in the search text.</p>
<p>(This can be re-captiulated with <code>pati</code> and adding the pattern&#39;s
length to <code>start</code>, but it is convenient to have it here.)</p>
</div></td></tr></table><h2 id='implementations'>Trait Implementations</h2><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>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='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.hash' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash' class='fnname'>hash</a>&lt;__H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>&gt;(&amp;self, __arg_0: &amp;mut __H)</code></h4>
<h4 id='method.hash_slice' class='method'><span class="since">1.3.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[Self]</a>, state: &amp;mut H) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='impl-items'></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,170 +0,0 @@
<!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 `Matches` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Matches">
<title>aho_corasick::Matches - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Matches', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Matches</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-141' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#162-168' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Matches&lt;'a, 's, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An iterator of non-overlapping matches for in-memory text.</p>
<p>This iterator yields <code>Match</code> values.</p>
<p><code>&#39;a</code> is the lifetime of the automaton, <code>&#39;s</code> is the lifetime of the
search text, and <code>P</code> is the type of the Automaton&#39;s pattern.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a, 's, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a>&lt;'a, 's, P, A&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>&gt;</code></h4>
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a, 's, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <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='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a>&lt;'a, 's, P, A&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,170 +0,0 @@
<!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 `MatchesOverlapping` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, MatchesOverlapping">
<title>aho_corasick::MatchesOverlapping - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'MatchesOverlapping', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>MatchesOverlapping</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-276' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#357-364' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct MatchesOverlapping&lt;'a, 's, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An iterator of overlapping matches for in-memory text.</p>
<p>This iterator yields <code>Match</code> values.</p>
<p><code>&#39;a</code> is the lifetime of the automaton, <code>&#39;s</code> is the lifetime of the
search text, and <code>P</code> is the type of the Automaton&#39;s pattern.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a, 's, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a>&lt;'a, 's, P, A&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>&gt;</code></h4>
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a, 's, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <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='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a>&lt;'a, 's, P, A&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,122 +0,0 @@
<!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 `Sparse` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Sparse">
<title>aho_corasick::Sparse - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Sparse', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>Sparse</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-684' class='srclink' href='../src/aho_corasick/lib.rs.html.html#469' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Sparse(_);</pre><div class='docblock'><p>State transitions that are always sparse.</p>
<p>This can use enormous amounts of memory when there are many patterns,
but matching is very fast.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.new' class='fnname'>new</a>(_: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -&gt; <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h4>
<h4 id='method.goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.goto' class='fnname'>goto</a>(&amp;self, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h4>
<h4 id='method.set_goto' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.set_goto' class='fnname'>set_goto</a>(&amp;mut self, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>)</code></h4>
<h4 id='method.heap_bytes' class='method'><code>fn <a href='../aho_corasick/trait.Transitions.html#method.heap_bytes' class='fnname'>heap_bytes</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,170 +0,0 @@
<!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 `StreamMatches` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, StreamMatches">
<title>aho_corasick::StreamMatches - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'StreamMatches', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>StreamMatches</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-234' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#310-316' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct StreamMatches&lt;'a, R, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An iterator of non-overlapping matches for streaming text.</p>
<p>This iterator yields <code>io::Result&lt;Match&gt;</code> values.</p>
<p><code>&#39;a</code> is the lifetime of the automaton, <code>R</code> is the type of the underlying
<code>io::Read</code>er, and P is the type of the Automaton&#39;s pattern.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt;&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a>&lt;'a, R, P, A&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>&gt;</code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>&gt;&gt;</code></h4>
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <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='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a>&lt;'a, R, P, A&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,170 +0,0 @@
<!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 `StreamMatchesOverlapping` struct in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, StreamMatchesOverlapping">
<title>aho_corasick::StreamMatchesOverlapping - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'StreamMatchesOverlapping', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>aho_corasick</a>::<wbr><a class='struct' href=''>StreamMatchesOverlapping</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-323' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#424-431' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct StreamMatchesOverlapping&lt;'a, R, P, A: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An iterator of overlapping matches for streaming text.</p>
<p>This iterator yields <code>io::Result&lt;Match&gt;</code> values.</p>
<p><code>&#39;a</code> is the lifetime of the automaton, <code>R</code> is the type of the underlying
<code>io::Read</code>er, and P is the type of the Automaton&#39;s pattern.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>, P, A: <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a>&lt;'a, R, P, A&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>&gt;</code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a>&lt;<a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>&gt;&gt;</code></h4>
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;, T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>, A: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <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='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a>&lt;'a, R, P, A&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,160 +0,0 @@
<!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 `Automaton` trait in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Automaton">
<title>aho_corasick::Automaton - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Automaton', ty: 'trait', 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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>aho_corasick</a>::<wbr><a class='trait' href=''>Automaton</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-17' class='srclink' href='../src/aho_corasick/autiter.rs.html.html#11-109' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Automaton&lt;P&gt; {
fn <a href='#tymethod.next_state' class='fnname'>next_state</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>;
fn <a href='#tymethod.has_match' class='fnname'>has_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>;
fn <a href='#tymethod.get_match' class='fnname'>get_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a>;
fn <a href='#tymethod.start_bytes' class='fnname'>start_bytes</a>(&amp;self) -&gt; <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>;
fn <a href='#tymethod.patterns' class='fnname'>patterns</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>;
fn <a href='#tymethod.pattern' class='fnname'>pattern</a>(&amp;self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;P;
fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a> { ... }
fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> { ... }
fn <a href='#method.find' class='fnname'>find</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
fn <a href='#method.find_overlapping' class='fnname'>find_overlapping</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
fn <a href='#method.stream_find' class='fnname'>stream_find</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
fn <a href='#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span> { ... }
}</pre><div class='docblock'><p>An abstraction over automatons and their corresponding iterators.
The type parameter <code>P</code> is the type of the pattern that was used to
construct this Automaton.</p>
</div>
<h2 id='required-methods'>Required Methods</h2>
<div class='methods'>
<h3 id='tymethod.next_state' class='method stab '><code>fn <a href='#tymethod.next_state' class='fnname'>next_state</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, b: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h3><div class='docblock'><p>Return the next state given the current state and next character.</p>
</div><h3 id='tymethod.has_match' class='method stab '><code>fn <a href='#tymethod.has_match' class='fnname'>has_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h3><div class='docblock'><p>Return true if and only if the given state and current pattern index
indicate a match.</p>
</div><h3 id='tymethod.get_match' class='method stab '><code>fn <a href='#tymethod.get_match' class='fnname'>get_match</a>(&amp;self, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>, outi: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, texti: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='../aho_corasick/struct.Match.html' title='aho_corasick::Match'>Match</a></code></h3><div class='docblock'><p>Build a match given the current state, pattern index and input index.</p>
</div><h3 id='tymethod.start_bytes' class='method stab '><code>fn <a href='#tymethod.start_bytes' class='fnname'>start_bytes</a>(&amp;self) -&gt; <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></code></h3><div class='docblock'><p>Return the set of bytes that have transitions in the root state.</p>
</div><h3 id='tymethod.patterns' class='method stab '><code>fn <a href='#tymethod.patterns' class='fnname'>patterns</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a>P<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h3><div class='docblock'><p>Returns all of the patterns matched by this automaton.</p>
<p>The order of the patterns is the order in which they were added.</p>
</div><h3 id='tymethod.pattern' class='method stab '><code>fn <a href='#tymethod.pattern' class='fnname'>pattern</a>(&amp;self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;P</code></h3><div class='docblock'><p>Returns the pattern indexed at <code>i</code>.</p>
<p>The index corresponds to the position at which the pattern was added
to the automaton, starting at <code>0</code>.</p>
</div></div>
<h2 id='provided-methods'>Provided Methods</h2>
<div class='methods'>
<h3 id='method.len' class='method stab '><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>Return the number of patterns in the automaton.</p>
</div><h3 id='method.is_empty' class='method stab '><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h3><div class='docblock'><p>Returns true if the automaton has no patterns.</p>
</div><h3 id='method.find' class='method stab '><code>fn <a href='#method.find' class='fnname'>find</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.Matches.html' title='aho_corasick::Matches'>Matches</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of non-overlapping matches in <code>s</code>.</p>
</div><h3 id='method.find_overlapping' class='method stab '><code>fn <a href='#method.find_overlapping' class='fnname'>find_overlapping</a>&lt;'a, 's, Q: ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt;(&amp;'a self, s: &amp;'s Q) -&gt; <a class='struct' href='../aho_corasick/struct.MatchesOverlapping.html' title='aho_corasick::MatchesOverlapping'>MatchesOverlapping</a>&lt;'a, 's, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of overlapping matches in <code>s</code>.</p>
</div><h3 id='method.stream_find' class='method stab '><code>fn <a href='#method.stream_find' class='fnname'>stream_find</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatches.html' title='aho_corasick::StreamMatches'>StreamMatches</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of non-overlapping matches in the given reader.</p>
</div><h3 id='method.stream_find_overlapping' class='method stab '><code>fn <a href='#method.stream_find_overlapping' class='fnname'>stream_find_overlapping</a>&lt;'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>&gt;(&amp;'a self, rdr: R) -&gt; <a class='struct' href='../aho_corasick/struct.StreamMatchesOverlapping.html' title='aho_corasick::StreamMatchesOverlapping'>StreamMatchesOverlapping</a>&lt;'a, R, P, Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a></span></code></h3><div class='docblock'><p>Returns an iterator of overlapping matches in the given reader.</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl&lt;'a, P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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: 'a + <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; + ?<a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html' title='core::marker::Sized'>Sized</a>&gt; <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; for &amp;'a A</code></li>
<li><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;&gt; <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; for <a class='struct' href='../aho_corasick/struct.FullAcAutomaton.html' title='aho_corasick::FullAcAutomaton'>FullAcAutomaton</a>&lt;P&gt;</code></li>
<li><code>impl&lt;P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html' title='core::convert::AsRef'>AsRef</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>[</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;, T: <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a>&gt; <a class='trait' href='../aho_corasick/trait.Automaton.html' title='aho_corasick::Automaton'>Automaton</a>&lt;P&gt; for <a class='struct' href='../aho_corasick/struct.AcAutomaton.html' title='aho_corasick::AcAutomaton'>AcAutomaton</a>&lt;P, T&gt;</code></li>
</ul><script type="text/javascript" async
src="../implementors/aho_corasick/trait.Automaton.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,137 +0,0 @@
<!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 `Transitions` trait in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Transitions">
<title>aho_corasick::Transitions - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'Transitions', ty: 'trait', 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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>aho_corasick</a>::<wbr><a class='trait' href=''>Transitions</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-619' class='srclink' href='../src/aho_corasick/lib.rs.html.html#403-412' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Transitions {
fn <a href='#tymethod.new' class='fnname'>new</a>(depth: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -&gt; Self;
fn <a href='#tymethod.goto' class='fnname'>goto</a>(&amp;self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>;
fn <a href='#tymethod.set_goto' class='fnname'>set_goto</a>(&amp;mut self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>);
fn <a href='#tymethod.heap_bytes' class='fnname'>heap_bytes</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>;
}</pre><div class='docblock'><p>An abstraction over state transition strategies.</p>
<p>This is an attempt to let the caller choose the space/time trade offs
used for state transitions.</p>
<p>(It&#39;s possible that this interface is merely good enough for just the two
implementations in this crate.)</p>
</div>
<h2 id='required-methods'>Required Methods</h2>
<div class='methods'>
<h3 id='tymethod.new' class='method stab '><code>fn <a href='#tymethod.new' class='fnname'>new</a>(depth: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -&gt; Self</code></h3><div class='docblock'><p>Return a new state at the given depth.</p>
</div><h3 id='tymethod.goto' class='method stab '><code>fn <a href='#tymethod.goto' class='fnname'>goto</a>(&amp;self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a></code></h3><div class='docblock'><p>Return the next state index given the next character.</p>
</div><h3 id='tymethod.set_goto' class='method stab '><code>fn <a href='#tymethod.set_goto' class='fnname'>set_goto</a>(&amp;mut self, alpha: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>, si: <a class='type' href='../aho_corasick/type.StateIdx.html' title='aho_corasick::StateIdx'>StateIdx</a>)</code></h3><div class='docblock'><p>Set the next state index for the character given.</p>
</div><h3 id='tymethod.heap_bytes' class='method stab '><code>fn <a href='#tymethod.heap_bytes' class='fnname'>heap_bytes</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>The memory use in bytes (on the heap) of this set of transitions.</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Dense.html' title='aho_corasick::Dense'>Dense</a></code></li>
<li><code>impl <a class='trait' href='../aho_corasick/trait.Transitions.html' title='aho_corasick::Transitions'>Transitions</a> for <a class='struct' href='../aho_corasick/struct.Sparse.html' title='aho_corasick::Sparse'>Sparse</a></code></li>
</ul><script type="text/javascript" async
src="../implementors/aho_corasick/trait.Transitions.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,115 +0,0 @@
<!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 `StateIdx` type in crate `aho_corasick`.">
<meta name="keywords" content="rust, rustlang, rust-lang, StateIdx">
<title>aho_corasick::StateIdx - 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'>aho_corasick</a></p><script>window.sidebarCurrent = {name: 'StateIdx', ty: 'type', 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 type">
<h1 class='fqn'><span class='in-band'><a href='index.html'>aho_corasick</a>::<wbr><a class='type' href=''>StateIdx</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-476' class='srclink' href='../src/aho_corasick/lib.rs.html.html#150' title='goto source code'>[src]</a></span></h1>
<pre class='rust typedef'>type StateIdx = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>;</pre><div class='docblock'><p>The integer type used for the state index.</p>
<p>Limiting this to 32 bit integers can have a big impact on memory usage
when using the <code>Sparse</code> transition representation.</p>
</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 = "aho_corasick";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,184 +0,0 @@
<!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 `Colour` enum in crate `ansi_term`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Colour">
<title>ansi_term::Colour - 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'>ansi_term</a></p><script>window.sidebarCurrent = {name: 'Colour', ty: 'enum', 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 enum">
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>ansi_term</a>::<wbr><a class='enum' href=''>Colour</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-65' class='srclink' href='../src/ansi_term/lib.rs.html.html#212-260' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum Colour {
Black,
Red,
Green,
Yellow,
Blue,
Purple,
Cyan,
White,
Fixed(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>),
}</pre><div class='docblock'><p>A colour is one specific type of ANSI escape code, and can refer
to either the foreground or background colour.</p>
<p>These use the standard numeric sequences.
See <a href="http://invisible-island.net/xterm/ctlseqs/ctlseqs.html">http://invisible-island.net/xterm/ctlseqs/ctlseqs.html</a></p>
</div><h2 class='variants'>Variants</h2>
<table class='variants_table'><tr><td id='variant.Black'><code>Black</code></td><td><div class='docblock'><p>Colour #0 (foreground code <code>30</code>, background code <code>40</code>).</p>
<p>This is not necessarily the background colour, and using it as one may
render the text hard to read on terminals with dark backgrounds.</p>
</div></td><td></td></tr><tr><td id='variant.Red'><code>Red</code></td><td><div class='docblock'><p>Colour #1 (foreground code <code>31</code>, background code <code>41</code>).</p>
</div></td><td></td></tr><tr><td id='variant.Green'><code>Green</code></td><td><div class='docblock'><p>Colour #2 (foreground code <code>32</code>, background code <code>42</code>).</p>
</div></td><td></td></tr><tr><td id='variant.Yellow'><code>Yellow</code></td><td><div class='docblock'><p>Colour #3 (foreground code <code>33</code>, background code <code>43</code>).</p>
</div></td><td></td></tr><tr><td id='variant.Blue'><code>Blue</code></td><td><div class='docblock'><p>Colour #4 (foreground code <code>34</code>, background code <code>44</code>).</p>
</div></td><td></td></tr><tr><td id='variant.Purple'><code>Purple</code></td><td><div class='docblock'><p>Colour #5 (foreground code <code>35</code>, background code <code>45</code>).</p>
</div></td><td></td></tr><tr><td id='variant.Cyan'><code>Cyan</code></td><td><div class='docblock'><p>Colour #6 (foreground code <code>36</code>, background code <code>46</code>).</p>
</div></td><td></td></tr><tr><td id='variant.White'><code>White</code></td><td><div class='docblock'><p>Colour #7 (foreground code <code>37</code>, background code <code>47</code>).</p>
<p>As above, this is not necessarily the foreground colour, and may be
hard to read on terminals with light backgrounds.</p>
</div></td><td></td></tr><tr><td id='variant.Fixed'><code>Fixed</code></td><td><div class='docblock'><p>A colour number from 0 to 255, for use in 256-colour terminal
environments.</p>
<ul>
<li>Colours 0 to 7 are the <code>Black</code> to <code>White</code> variants respectively.
These colours can usually be changed in the terminal emulator.</li>
<li>Colours 8 to 15 are brighter versions of the eight colours above.
These can also usually be changed in the terminal emulator, or it
could be configured to use the original colours and show the text in
bold instead. It varies depending on the program.</li>
<li>Colours 16 to 231 contain several palettes of bright colours,
arranged in six squares measuring six by six each.</li>
<li>Colours 232 to 255 are shades of grey from black to white.</li>
</ul>
<p>It might make more sense to look at a <a href="%5Ecc">colour chart</a>.</p>
</div></td><td></td></tr></table><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.normal' class='method'><code>fn <a href='#method.normal' class='fnname'>normal</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Return a Style with the foreground colour set to this colour.</p>
</div><h4 id='method.paint' class='method'><code>fn <a href='#method.paint' class='fnname'>paint</a>&lt;'a, S&gt;(self, input: S) -&gt; <a class='struct' href='../ansi_term/struct.ANSIString.html' title='ansi_term::ANSIString'>ANSIString</a>&lt;'a&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a>&lt;'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;</span></code></h4>
<div class='docblock'><p>Paints the given text with this colour, returning an ANSI string.
This is a short-cut so you don&#39;t have to use Blue.normal() just
to get blue text.</p>
</div><h4 id='method.bold' class='method'><code>fn <a href='#method.bold' class='fnname'>bold</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the bold property set.</p>
</div><h4 id='method.dimmed' class='method'><code>fn <a href='#method.dimmed' class='fnname'>dimmed</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the dimmed property set.</p>
</div><h4 id='method.italic' class='method'><code>fn <a href='#method.italic' class='fnname'>italic</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the italic property set.</p>
</div><h4 id='method.underline' class='method'><code>fn <a href='#method.underline' class='fnname'>underline</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the underline property set.</p>
</div><h4 id='method.blink' class='method'><code>fn <a href='#method.blink' class='fnname'>blink</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the blink property set.</p>
</div><h4 id='method.reverse' class='method'><code>fn <a href='#method.reverse' class='fnname'>reverse</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the reverse property set.</p>
</div><h4 id='method.hidden' class='method'><code>fn <a href='#method.hidden' class='fnname'>hidden</a>(self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the hidden property set.</p>
</div><h4 id='method.on' class='method'><code>fn <a href='#method.on' class='fnname'>on</a>(self, background: <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the background colour property set.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</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 = "ansi_term";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,277 +0,0 @@
<!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 `ansi_term` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, ansi_term">
<title>ansi_term - 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: 'ansi_term', 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=''>ansi_term</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/ansi_term/lib.rs.html.html#1-823' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>This is a library for controlling colours and formatting, such as
red bold text or blue underlined text, on ANSI terminals.</p>
<h2 id='basic-usage' class='section-header'><a href='#basic-usage'>Basic usage</a></h2>
<p>There are two main data structures in this crate that you need to be
concerned with: <code>ANSIString</code> and <code>Style</code>. A <code>Style</code> holds stylistic
information: colours, whether the text should be bold, or blinking, or
whatever. There are also <code>Colour</code> variants that represent simple foreground
colour styles. An <code>ANSIString</code> is a string paired with a <code>Style</code>.</p>
<p>(Yes, its British English, but you wont have to write “colour” very often.
<code>Style</code> is used the majority of the time.)</p>
<p>To format a string, call the <code>paint</code> method on a <code>Style</code> or a <code>Colour</code>,
passing in the string you want to format as the argument. For example,
heres how to get some red text:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;This is in red: {}&quot;</span>, <span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>&quot;a red string&quot;</span>));</pre>
<p>Its important to note that the <code>paint</code> method does <em>not</em> actually return a
string with the ANSI control characters surrounding it. Instead, it returns
an <code>ANSIString</code> value that has a <code>Display</code> implementation that, when
formatted, returns the characters. This allows strings to be printed with a
minimum of <code>String</code> allocations being performed behind the scenes.</p>
<p>If you <em>do</em> want to get at the escape codes, then you can convert the
<code>ANSIString</code> to a string as you would any other <code>Display</code> value:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>string</span>::<span class='ident'>ToString</span>;
<span class='kw'>let</span> <span class='ident'>red_string</span> <span class='op'>=</span> <span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>&quot;a red string&quot;</span>).<span class='ident'>to_string</span>();</pre>
<h2 id='bold-underline-background-and-other-styles' class='section-header'><a href='#bold-underline-background-and-other-styles'>Bold, underline, background, and other styles</a></h2>
<p>For anything more complex than plain foreground colour changes, you need to
construct <code>Style</code> objects themselves, rather than beginning with a <code>Colour</code>.
You can do this by chaining methods based on a new <code>Style</code>, created with
<code>Style::new()</code>. Each method creates a new style that has that specific
property set. For example:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Style</span>;
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;How about some {} and {}?&quot;</span>,
<span class='ident'>Style</span>::<span class='ident'>new</span>().<span class='ident'>bold</span>().<span class='ident'>paint</span>(<span class='string'>&quot;bold&quot;</span>),
<span class='ident'>Style</span>::<span class='ident'>new</span>().<span class='ident'>underline</span>().<span class='ident'>paint</span>(<span class='string'>&quot;underline&quot;</span>));</pre>
<p>For brevity, these methods have also been implemented for <code>Colour</code> values,
so you can give your styles a foreground colour without having to begin with
an empty <code>Style</code> value:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::{<span class='ident'>Blue</span>, <span class='ident'>Yellow</span>};
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Demonstrating {} and {}!&quot;</span>,
<span class='ident'>Blue</span>.<span class='ident'>bold</span>().<span class='ident'>paint</span>(<span class='string'>&quot;blue bold&quot;</span>),
<span class='ident'>Yellow</span>.<span class='ident'>underline</span>().<span class='ident'>paint</span>(<span class='string'>&quot;yellow underline&quot;</span>));
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Yellow on blue: {}&quot;</span>, <span class='ident'>Yellow</span>.<span class='ident'>on</span>(<span class='ident'>Blue</span>).<span class='ident'>paint</span>(<span class='string'>&quot;wow!&quot;</span>));</pre>
<p>The complete list of styles you can use are: <code>bold</code>, <code>dimmed</code>, <code>italic</code>,
<code>underline</code>, <code>blink</code>, <code>reverse</code>, <code>hidden</code>, and <code>on</code> for background colours.</p>
<p>Finally, you can turn a <code>Colour</code> into a <code>Style</code> with the <code>normal</code> method.
This will produce the exact same <code>ANSIString</code> as if you just used the
<code>paint</code> method on the <code>Colour</code> directly, but its useful in certain cases:
for example, you may have a method that returns <code>Styles</code>, and need to
represent both the “red bold” and “red, but not bold” styles with values of
the same type. The <code>Style</code> struct also has a <code>Default</code> implementation if you
want to have a style with <em>nothing</em> set.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Style</span>;
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
<span class='ident'>Red</span>.<span class='ident'>normal</span>().<span class='ident'>paint</span>(<span class='string'>&quot;yet another red string&quot;</span>);
<span class='ident'>Style</span>::<span class='ident'>default</span>().<span class='ident'>paint</span>(<span class='string'>&quot;a completely regular string&quot;</span>);</pre>
<h2 id='extended-colours' class='section-header'><a href='#extended-colours'>Extended colours</a></h2>
<p>You can access the extended range of 256 colours by using the <code>Fixed</code> colour
variant, which takes an argument of the colour number to use. This can be
included wherever you would use a <code>Colour</code>:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Fixed</span>;
<span class='ident'>Fixed</span>(<span class='number'>134</span>).<span class='ident'>paint</span>(<span class='string'>&quot;A sort of light purple&quot;</span>);
<span class='ident'>Fixed</span>(<span class='number'>221</span>).<span class='ident'>on</span>(<span class='ident'>Fixed</span>(<span class='number'>124</span>)).<span class='ident'>paint</span>(<span class='string'>&quot;Mustard in the ketchup&quot;</span>);</pre>
<p>The first sixteen of these values are the same as the normal and bold
standard colour variants. Theres nothing stopping you from using these as
<code>Fixed</code> colours instead, but theres nothing to be gained by doing so
either.</p>
<h2 id='combining-successive-coloured-strings' class='section-header'><a href='#combining-successive-coloured-strings'>Combining successive coloured strings</a></h2>
<p>The benefit of writing ANSI escape codes to the terminal is that they
<em>stack</em>: you do not need to end every coloured string with a reset code if
the text that follows it is of a similar style. For example, if you want to
have some blue text followed by some blue bold text, its possible to send
the ANSI code for blue, followed by the ANSI code for bold, and finishing
with a reset code without having to have an extra one between the two
strings.</p>
<p>This crate can optimise the ANSI codes that get printed in situations like
this, making life easier for your terminal renderer. The <code>ANSIStrings</code>
struct takes a slice of several <code>ANSIString</code> values, and will iterate over
each of them, printing only the codes for the styles that need to be updated
as part of its formatting routine.</p>
<p>The following code snippet uses this to enclose a binary number displayed in
red bold text inside some red, but not bold, brackets:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::<span class='ident'>Colour</span>::<span class='ident'>Red</span>;
<span class='kw'>use</span> <span class='ident'>ansi_term</span>::{<span class='ident'>ANSIString</span>, <span class='ident'>ANSIStrings</span>};
<span class='kw'>let</span> <span class='ident'>some_value</span> <span class='op'>=</span> <span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>&quot;{:b}&quot;</span>, <span class='number'>42</span>);
<span class='kw'>let</span> <span class='ident'>strings</span>: <span class='kw-2'>&amp;</span>[<span class='ident'>ANSIString</span><span class='op'>&lt;</span><span class='lifetime'>&#39;static</span><span class='op'>&gt;</span>] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[
<span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>&quot;[&quot;</span>),
<span class='ident'>Red</span>.<span class='ident'>bold</span>().<span class='ident'>paint</span>(<span class='ident'>some_value</span>),
<span class='ident'>Red</span>.<span class='ident'>paint</span>(<span class='string'>&quot;]&quot;</span>),
];
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;Value: {}&quot;</span>, <span class='ident'>ANSIStrings</span>(<span class='ident'>strings</span>));</pre>
<p>There are several things to note here. Firstly, the <code>paint</code> method can take
<em>either</em> an owned <code>String</code> or a borrowed <code>&amp;str</code>. Internally, an <code>ANSIString</code>
holds a copy-on-write (<code>Cow</code>) string value to deal with both owned and
borrowed strings at the same time. This is used here to display a <code>String</code>,
the result of the <code>format!</code> call, using the same mechanism as some
statically-available <code>&amp;str</code> slices. Secondly, that the <code>ANSIStrings</code> value
works in the same way as its singular counterpart, with a <code>Display</code>
implementation that only performs the formatting when required.</p>
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
<td><a class='struct' href='struct.ANSIString.html'
title='ansi_term::ANSIString'>ANSIString</a></td>
<td class='docblock short'>
<p>An ANSI String is a string coupled with the Style to display it
in a terminal.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.ANSIStrings.html'
title='ansi_term::ANSIStrings'>ANSIStrings</a></td>
<td class='docblock short'>
<p>A set of <code>ANSIString</code>s collected together, in order to be written with a
minimum of control characters.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Style.html'
title='ansi_term::Style'>Style</a></td>
<td class='docblock short'>
<p>A style is a collection of properties that can format a string
using ANSI escape codes.</p>
</td>
</tr>
</table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table>
<tr class=' module-item'>
<td><a class='enum' href='enum.Colour.html'
title='ansi_term::Colour'>Colour</a></td>
<td class='docblock short'>
<p>A colour is one specific type of ANSI escape code, and can refer
to either the foreground or background colour.</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 = "ansi_term";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1 +0,0 @@
initSidebarItems({"enum":[["Colour","A colour is one specific type of ANSI escape code, and can refer to either the foreground or background colour."]],"struct":[["ANSIString","An ANSI String is a string coupled with the Style to display it in a terminal."],["ANSIStrings","A set of `ANSIString`s collected together, in order to be written with a minimum of control characters."],["Style","A style is a collection of properties that can format a string using ANSI escape codes."]]});

File diff suppressed because it is too large Load diff

View file

@ -1,114 +0,0 @@
<!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 `ANSIStrings` struct in crate `ansi_term`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ANSIStrings">
<title>ansi_term::ANSIStrings - 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'>ansi_term</a></p><script>window.sidebarCurrent = {name: 'ANSIStrings', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>ansi_term</a>::<wbr><a class='struct' href=''>ANSIStrings</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-369' class='srclink' href='../src/ansi_term/lib.rs.html.html#637' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct ANSIStrings&lt;'a&gt;(pub <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;'a [</a><a class='struct' href='../ansi_term/struct.ANSIString.html' title='ansi_term::ANSIString'>ANSIString</a>&lt;'a&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>);</pre><div class='docblock'><p>A set of <code>ANSIString</code>s collected together, in order to be written with a
minimum of control characters.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a&gt; <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='../ansi_term/struct.ANSIStrings.html' title='ansi_term::ANSIStrings'>ANSIStrings</a>&lt;'a&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#method.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></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 = "ansi_term";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,141 +0,0 @@
<!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 `Style` struct in crate `ansi_term`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Style">
<title>ansi_term::Style - 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'>ansi_term</a></p><script>window.sidebarCurrent = {name: 'Style', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>ansi_term</a>::<wbr><a class='struct' href=''>Style</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-179' class='srclink' href='../src/ansi_term/lib.rs.html.html#357-367' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Style {
// some fields omitted
}</pre><div class='docblock'><p>A style is a collection of properties that can format a string
using ANSI escape codes.</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Creates a new Style with no differences.</p>
</div><h4 id='method.paint' class='method'><code>fn <a href='#method.paint' class='fnname'>paint</a>&lt;'a, S&gt;(self, input: S) -&gt; <a class='struct' href='../ansi_term/struct.ANSIString.html' title='ansi_term::ANSIString'>ANSIString</a>&lt;'a&gt; <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a>&lt;'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;&gt;</span></code></h4>
<div class='docblock'><p>Paints the given text with this colour, returning an ANSI string.</p>
</div><h4 id='method.bold' class='method'><code>fn <a href='#method.bold' class='fnname'>bold</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the bold property set.</p>
</div><h4 id='method.dimmed' class='method'><code>fn <a href='#method.dimmed' class='fnname'>dimmed</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the dimmed property set.</p>
</div><h4 id='method.italic' class='method'><code>fn <a href='#method.italic' class='fnname'>italic</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the italic property set.</p>
</div><h4 id='method.underline' class='method'><code>fn <a href='#method.underline' class='fnname'>underline</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the underline property set.</p>
</div><h4 id='method.blink' class='method'><code>fn <a href='#method.blink' class='fnname'>blink</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the blink property set.</p>
</div><h4 id='method.reverse' class='method'><code>fn <a href='#method.reverse' class='fnname'>reverse</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the reverse property set.</p>
</div><h4 id='method.hidden' class='method'><code>fn <a href='#method.hidden' class='fnname'>hidden</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the hidden property set.</p>
</div><h4 id='method.on' class='method'><code>fn <a href='#method.on' class='fnname'>on</a>(&amp;self, background: <a class='enum' href='../ansi_term/enum.Colour.html' title='ansi_term::Colour'>Colour</a>) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<div class='docblock'><p>Returns a Style with the background colour property set.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>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='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#method.default' class='fnname'>default</a>() -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../ansi_term/struct.Style.html' title='ansi_term::Style'>Style</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</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 = "ansi_term";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,203 +0,0 @@
<!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 `bit_vec` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, bit_vec">
<title>bit_vec - 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: 'bit_vec', 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=''>bit_vec</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/bit_vec/lib.rs.html.html#31-2088' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>Collections implemented with bit vectors.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>This is a simple example of the <a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">Sieve of Eratosthenes</a>
which calculates prime numbers up to a given limit.</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>max_prime</span> <span class='op'>=</span> <span class='number'>10000</span>;
<span class='comment'>// Store the primes as a BitVec</span>
<span class='kw'>let</span> <span class='ident'>primes</span> <span class='op'>=</span> {
<span class='comment'>// Assume all numbers are prime to begin, and then we</span>
<span class='comment'>// cross off non-primes progressively</span>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='ident'>max_prime</span>, <span class='boolval'>true</span>);
<span class='comment'>// Neither 0 nor 1 are prime</span>
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>0</span>, <span class='boolval'>false</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>1</span>, <span class='boolval'>false</span>);
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> <span class='number'>2</span>.. <span class='number'>1</span> <span class='op'>+</span> (<span class='ident'>max_prime</span> <span class='kw'>as</span> <span class='ident'>f64</span>).<span class='ident'>sqrt</span>() <span class='kw'>as</span> <span class='ident'>usize</span> {
<span class='comment'>// if i is a prime</span>
<span class='kw'>if</span> <span class='ident'>bv</span>[<span class='ident'>i</span>] {
<span class='comment'>// Mark all multiples of i as non-prime (any multiples below i * i</span>
<span class='comment'>// will have been marked as non-prime previously)</span>
<span class='kw'>for</span> <span class='ident'>j</span> <span class='kw'>in</span> <span class='ident'>i</span>.. {
<span class='kw'>if</span> <span class='ident'>i</span> <span class='op'>*</span> <span class='ident'>j</span> <span class='op'>&gt;=</span> <span class='ident'>max_prime</span> {
<span class='kw'>break</span>;
}
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='ident'>i</span> <span class='op'>*</span> <span class='ident'>j</span>, <span class='boolval'>false</span>)
}
}
}
<span class='ident'>bv</span>
};
<span class='comment'>// Simple primality tests below our max bound</span>
<span class='kw'>let</span> <span class='ident'>print_primes</span> <span class='op'>=</span> <span class='number'>20</span>;
<span class='macro'>print</span><span class='macro'>!</span>(<span class='string'>&quot;The primes below {} are: &quot;</span>, <span class='ident'>print_primes</span>);
<span class='kw'>for</span> <span class='ident'>x</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='ident'>print_primes</span> {
<span class='kw'>if</span> <span class='ident'>primes</span>.<span class='ident'>get</span>(<span class='ident'>x</span>).<span class='ident'>unwrap_or</span>(<span class='boolval'>false</span>) {
<span class='macro'>print</span><span class='macro'>!</span>(<span class='string'>&quot;{} &quot;</span>, <span class='ident'>x</span>);
}
}
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;&quot;</span>);
<span class='kw'>let</span> <span class='ident'>num_primes</span> <span class='op'>=</span> <span class='ident'>primes</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>();
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;There are {} primes below {}&quot;</span>, <span class='ident'>num_primes</span>, <span class='ident'>max_prime</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>num_primes</span>, <span class='number'>1_229</span>);</pre>
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
<td><a class='struct' href='struct.BitVec.html'
title='bit_vec::BitVec'>BitVec</a></td>
<td class='docblock short'>
<p>The bitvector type.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Blocks.html'
title='bit_vec::Blocks'>Blocks</a></td>
<td class='docblock short'>
<p>An iterator over the blocks of a <code>BitVec</code>.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.IntoIter.html'
title='bit_vec::IntoIter'>IntoIter</a></td>
<td class='docblock short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Iter.html'
title='bit_vec::Iter'>Iter</a></td>
<td class='docblock short'>
<p>An iterator for <code>BitVec</code>.</p>
</td>
</tr>
</table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class='trait' href='trait.BitBlock.html'
title='bit_vec::BitBlock'>BitBlock</a></td>
<td class='docblock short'>
<p>Abstracts over a pile of bits (basically unsigned primitives)</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 = "bit_vec";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1 +0,0 @@
initSidebarItems({"struct":[["BitVec","The bitvector type."],["Blocks","An iterator over the blocks of a `BitVec`."],["IntoIter",""],["Iter","An iterator for `BitVec`."]],"trait":[["BitBlock","Abstracts over a pile of bits (basically unsigned primitives)"]]});

View file

@ -1,537 +0,0 @@
<!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 `BitVec` struct in crate `bit_vec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, BitVec">
<title>bit_vec::BitVec - 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'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'BitVec', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>BitVec</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-76' class='srclink' href='../src/bit_vec/lib.rs.html.html#199-204' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct BitVec&lt;B = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>The bitvector type.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
<span class='comment'>// insert all primes less than 10</span>
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>2</span>, <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>5</span>, <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>7</span>, <span class='boolval'>true</span>);
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{:?}&quot;</span>, <span class='ident'>bv</span>);
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;total bits set to true: {}&quot;</span>, <span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>());
<span class='comment'>// flip all values in bitvector, producing non-primes less than 10</span>
<span class='ident'>bv</span>.<span class='ident'>negate</span>();
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{:?}&quot;</span>, <span class='ident'>bv</span>);
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;total bits set to true: {}&quot;</span>, <span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>());
<span class='comment'>// reset bitvector to empty</span>
<span class='ident'>bv</span>.<span class='ident'>clear</span>();
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{:?}&quot;</span>, <span class='ident'>bv</span>);
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;total bits set to true: {}&quot;</span>, <span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>());</pre>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt;</code></h3><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -&gt; Self</code></h4>
<div class='docblock'><p>Creates an empty <code>BitVec</code>.</p>
<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>new</span>();</pre>
</div><h4 id='method.from_elem' class='method'><code>fn <a href='#method.from_elem' class='fnname'>from_elem</a>(nbits: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, bit: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>) -&gt; Self</code></h4>
<div class='docblock'><p>Creates a <code>BitVec</code> that holds <code>nbits</code> elements, setting each element
to <code>bit</code>.</p>
<h1 id='examples-2' class='section-header'><a href='#examples-2'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>10</span>);
<span class='kw'>for</span> <span class='ident'>x</span> <span class='kw'>in</span> <span class='ident'>bv</span>.<span class='ident'>iter</span>() {
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>x</span>, <span class='boolval'>false</span>);
}</pre>
</div><h4 id='method.with_capacity' class='method'><code>fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(nbits: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; Self</code></h4>
<div class='docblock'><p>Constructs a new, empty <code>BitVec</code> with the specified capacity.</p>
<p>The bitvector will be able to hold at least <code>capacity</code> bits without
reallocating. If <code>capacity</code> is 0, it will not allocate.</p>
<p>It is important to note that this function does not specify the
<em>length</em> of the returned bitvector, but only the <em>capacity</em>.</p>
</div><h4 id='method.from_bytes' class='method'><code>fn <a href='#method.from_bytes' class='fnname'>from_bytes</a>(bytes: <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; Self</code></h4>
<div class='docblock'><p>Transforms a byte-vector into a <code>BitVec</code>. Each byte becomes eight bits,
with the most significant bits of each byte coming first. Each
bit becomes <code>true</code> if equal to 1 or <code>false</code> if equal to 0.</p>
<h1 id='examples-3' class='section-header'><a href='#examples-3'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b10100000</span>, <span class='number'>0b00010010</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&amp;</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>,
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>,
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>,
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>]));</pre>
</div><h4 id='method.from_fn' class='method'><code>fn <a href='#method.from_fn' class='fnname'>from_fn</a>&lt;F&gt;(len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, f: F) -&gt; Self <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<div class='docblock'><p>Creates a <code>BitVec</code> of the specified length where the value at each index
is <code>f(index)</code>.</p>
<h1 id='examples-4' class='section-header'><a href='#examples-4'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_fn</span>(<span class='number'>5</span>, <span class='op'>|</span><span class='ident'>i</span><span class='op'>|</span> { <span class='ident'>i</span> <span class='op'>%</span> <span class='number'>2</span> <span class='op'>==</span> <span class='number'>0</span> });
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&amp;</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>]));</pre>
</div></div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.blocks' class='method'><code>fn <a href='#method.blocks' class='fnname'>blocks</a>(&amp;self) -&gt; <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a>&lt;B&gt;</code></h4>
<div class='docblock'><p>Iterator over the underlying blocks of data</p>
</div><h4 id='method.storage' class='method'><code>fn <a href='#method.storage' class='fnname'>storage</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a>B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
<div class='docblock'><p>Exposes the raw block storage of this BitVec</p>
<p>Only really intended for BitSet.</p>
</div><h4 id='method.storage_mut' class='method'><code>unsafe fn <a href='#method.storage_mut' class='fnname'>storage_mut</a>(&amp;mut self) -&gt; &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;B&gt;</code></h4>
<div class='docblock'><p>Exposes the raw block storage of this BitVec</p>
<p>Can probably cause unsafety. Only really intended for BitSet.</p>
</div><h4 id='method.get' class='method'><code>fn <a href='#method.get' class='fnname'>get</a>(&amp;self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;</code></h4>
<div class='docblock'><p>Retrieves the value at index <code>i</code>, or <code>None</code> if the index is out of bounds.</p>
<h1 id='examples-5' class='section-header'><a href='#examples-5'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b01100000</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>get</span>(<span class='number'>0</span>), <span class='prelude-val'>Some</span>(<span class='boolval'>false</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>get</span>(<span class='number'>1</span>), <span class='prelude-val'>Some</span>(<span class='boolval'>true</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>get</span>(<span class='number'>100</span>), <span class='prelude-val'>None</span>);
<span class='comment'>// Can also use array indexing</span>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>[<span class='number'>1</span>], <span class='boolval'>true</span>);</pre>
</div><h4 id='method.set' class='method'><code>fn <a href='#method.set' class='fnname'>set</a>(&amp;mut self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, x: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
<div class='docblock'><p>Sets the value of a bit at an index <code>i</code>.</p>
<h1 id='panics' class='section-header'><a href='#panics'>Panics</a></h1>
<p>Panics if <code>i</code> is out of bounds.</p>
<h1 id='examples-6' class='section-header'><a href='#examples-6'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>5</span>, <span class='boolval'>false</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>[<span class='number'>3</span>], <span class='boolval'>true</span>);</pre>
</div><h4 id='method.set_all' class='method'><code>fn <a href='#method.set_all' class='fnname'>set_all</a>(&amp;mut self)</code></h4>
<div class='docblock'><p>Sets all bits to 1.</p>
<h1 id='examples-7' class='section-header'><a href='#examples-7'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>before</span> <span class='op'>=</span> <span class='number'>0b01100000</span>;
<span class='kw'>let</span> <span class='ident'>after</span> <span class='op'>=</span> <span class='number'>0b11111111</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>before</span>]);
<span class='ident'>bv</span>.<span class='ident'>set_all</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>after</span>]));</pre>
</div><h4 id='method.negate' class='method'><code>fn <a href='#method.negate' class='fnname'>negate</a>(&amp;mut self)</code></h4>
<div class='docblock'><p>Flips all bits.</p>
<h1 id='examples-8' class='section-header'><a href='#examples-8'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>before</span> <span class='op'>=</span> <span class='number'>0b01100000</span>;
<span class='kw'>let</span> <span class='ident'>after</span> <span class='op'>=</span> <span class='number'>0b10011111</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>before</span>]);
<span class='ident'>bv</span>.<span class='ident'>negate</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>after</span>]));</pre>
</div><h4 id='method.union' class='method'><code>fn <a href='#method.union' class='fnname'>union</a>(&amp;mut self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Calculates the union of two bitvectors. This acts like the bitwise <code>or</code>
function.</p>
<p>Sets <code>self</code> to the union of <code>self</code> and <code>other</code>. Both bitvectors must be
the same length. Returns <code>true</code> if <code>self</code> changed.</p>
<h1 id='panics-1' class='section-header'><a href='#panics-1'>Panics</a></h1>
<p>Panics if the bitvectors are of different lengths.</p>
<h1 id='examples-9' class='section-header'><a href='#examples-9'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='number'>0b01100100</span>;
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='number'>0b01011010</span>;
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='number'>0b01111110</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>a</span>]);
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>b</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>union</span>(<span class='kw-2'>&amp;</span><span class='ident'>b</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>res</span>]));</pre>
</div><h4 id='method.intersect' class='method'><code>fn <a href='#method.intersect' class='fnname'>intersect</a>(&amp;mut self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Calculates the intersection of two bitvectors. This acts like the
bitwise <code>and</code> function.</p>
<p>Sets <code>self</code> to the intersection of <code>self</code> and <code>other</code>. Both bitvectors
must be the same length. Returns <code>true</code> if <code>self</code> changed.</p>
<h1 id='panics-2' class='section-header'><a href='#panics-2'>Panics</a></h1>
<p>Panics if the bitvectors are of different lengths.</p>
<h1 id='examples-10' class='section-header'><a href='#examples-10'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='number'>0b01100100</span>;
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='number'>0b01011010</span>;
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='number'>0b01000000</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>a</span>]);
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>b</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>a</span>.<span class='ident'>intersect</span>(<span class='kw-2'>&amp;</span><span class='ident'>b</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>res</span>]));</pre>
</div><h4 id='method.difference' class='method'><code>fn <a href='#method.difference' class='fnname'>difference</a>(&amp;mut self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Calculates the difference between two bitvectors.</p>
<p>Sets each element of <code>self</code> to the value of that element minus the
element of <code>other</code> at the same index. Both bitvectors must be the same
length. Returns <code>true</code> if <code>self</code> changed.</p>
<h1 id='panics-3' class='section-header'><a href='#panics-3'>Panics</a></h1>
<p>Panics if the bitvectors are of different length.</p>
<h1 id='examples-11' class='section-header'><a href='#examples-11'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>a</span> <span class='op'>=</span> <span class='number'>0b01100100</span>;
<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='number'>0b01011010</span>;
<span class='kw'>let</span> <span class='ident'>a_b</span> <span class='op'>=</span> <span class='number'>0b00100100</span>; <span class='comment'>// a - b</span>
<span class='kw'>let</span> <span class='ident'>b_a</span> <span class='op'>=</span> <span class='number'>0b00011010</span>; <span class='comment'>// b - a</span>
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bva</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>a</span>]);
<span class='kw'>let</span> <span class='ident'>bvb</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>b</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bva</span>.<span class='ident'>difference</span>(<span class='kw-2'>&amp;</span><span class='ident'>bvb</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bva</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>a_b</span>]));
<span class='kw'>let</span> <span class='ident'>bva</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>a</span>]);
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bvb</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>b</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bvb</span>.<span class='ident'>difference</span>(<span class='kw-2'>&amp;</span><span class='ident'>bva</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bvb</span>, <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='ident'>b_a</span>]));</pre>
</div><h4 id='method.all' class='method'><code>fn <a href='#method.all' class='fnname'>all</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns <code>true</code> if all bits are 1.</p>
<h1 id='examples-12' class='section-header'><a href='#examples-12'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>5</span>, <span class='boolval'>true</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>all</span>(), <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>1</span>, <span class='boolval'>false</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>all</span>(), <span class='boolval'>false</span>);</pre>
</div><h4 id='method.iter' class='method'><code>fn <a href='#method.iter' class='fnname'>iter</a>(&amp;self) -&gt; <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;B&gt;</code></h4>
<div class='docblock'><p>Returns an iterator over the elements of the vector in order.</p>
<h1 id='examples-13' class='section-header'><a href='#examples-13'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b01110100</span>, <span class='number'>0b10010010</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>iter</span>().<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='op'>*</span><span class='ident'>x</span>).<span class='ident'>count</span>(), <span class='number'>7</span>);</pre>
</div><h4 id='method.none' class='method'><code>fn <a href='#method.none' class='fnname'>none</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns <code>true</code> if all bits are 0.</p>
<h1 id='examples-14' class='section-header'><a href='#examples-14'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>none</span>(), <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>none</span>(), <span class='boolval'>false</span>);</pre>
</div><h4 id='method.any' class='method'><code>fn <a href='#method.any' class='fnname'>any</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns <code>true</code> if any bit is 1.</p>
<h1 id='examples-15' class='section-header'><a href='#examples-15'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>10</span>, <span class='boolval'>false</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>any</span>(), <span class='boolval'>false</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>any</span>(), <span class='boolval'>true</span>);</pre>
</div><h4 id='method.to_bytes' class='method'><code>fn <a href='#method.to_bytes' class='fnname'>to_bytes</a>(&amp;self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>&gt;</code></h4>
<div class='docblock'><p>Organises the bits into bytes, such that the first bit in the
<code>BitVec</code> becomes the high-order bit of the first byte. If the
size of the <code>BitVec</code> is not a multiple of eight then trailing bits
will be filled-in with <code>false</code>.</p>
<h1 id='examples-16' class='section-header'><a href='#examples-16'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>3</span>, <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>1</span>, <span class='boolval'>false</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>to_bytes</span>(), [<span class='number'>0b10100000</span>]);
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>9</span>, <span class='boolval'>false</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>2</span>, <span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>set</span>(<span class='number'>8</span>, <span class='boolval'>true</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>to_bytes</span>(), [<span class='number'>0b00100000</span>, <span class='number'>0b10000000</span>]);</pre>
</div><h4 id='method.eq_vec' class='method'><code>fn <a href='#method.eq_vec' class='fnname'>eq_vec</a>(&amp;self, v: <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.bool.html'>bool</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.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Compares a <code>BitVec</code> to a slice of <code>bool</code>s.
Both the <code>BitVec</code> and slice must have the same length.</p>
<h1 id='panics-4' class='section-header'><a href='#panics-4'>Panics</a></h1>
<p>Panics if the <code>BitVec</code> and slice are of different length.</p>
<h1 id='examples-17' class='section-header'><a href='#examples-17'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b10100000</span>]);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&amp;</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>, <span class='boolval'>true</span>, <span class='boolval'>false</span>,
<span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>, <span class='boolval'>false</span>]));</pre>
</div><h4 id='method.truncate' class='method'><code>fn <a href='#method.truncate' class='fnname'>truncate</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Shortens a <code>BitVec</code>, dropping excess elements.</p>
<p>If <code>len</code> is greater than the vector&#39;s current length, this has no
effect.</p>
<h1 id='examples-18' class='section-header'><a href='#examples-18'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b01001011</span>]);
<span class='ident'>bv</span>.<span class='ident'>truncate</span>(<span class='number'>2</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&amp;</span>[<span class='boolval'>false</span>, <span class='boolval'>true</span>]));</pre>
</div><h4 id='method.reserve' class='method'><code>fn <a href='#method.reserve' class='fnname'>reserve</a>(&amp;mut self, additional: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Reserves capacity for at least <code>additional</code> more bits to be inserted in the given
<code>BitVec</code>. The collection may reserve more space to avoid frequent reallocations.</p>
<h1 id='panics-5' class='section-header'><a href='#panics-5'>Panics</a></h1>
<p>Panics if the new capacity overflows <code>usize</code>.</p>
<h1 id='examples-19' class='section-header'><a href='#examples-19'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>3</span>, <span class='boolval'>false</span>);
<span class='ident'>bv</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>capacity</span>() <span class='op'>&gt;=</span> <span class='number'>13</span>);</pre>
</div><h4 id='method.reserve_exact' class='method'><code>fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&amp;mut self, additional: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more bits to be inserted in the
given <code>BitVec</code>. Does nothing if the capacity is already sufficient.</p>
<p>Note that the allocator may give the collection more space than it requests. Therefore
capacity can not be relied upon to be precisely minimal. Prefer <code>reserve</code> if future
insertions are expected.</p>
<h1 id='panics-6' class='section-header'><a href='#panics-6'>Panics</a></h1>
<p>Panics if the new capacity overflows <code>usize</code>.</p>
<h1 id='examples-20' class='section-header'><a href='#examples-20'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_elem</span>(<span class='number'>3</span>, <span class='boolval'>false</span>);
<span class='ident'>bv</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>capacity</span>() <span class='op'>&gt;=</span> <span class='number'>13</span>);</pre>
</div><h4 id='method.capacity' class='method'><code>fn <a href='#method.capacity' class='fnname'>capacity</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the capacity in bits for this bit vector. Inserting any
element less than this amount will not trigger a resizing.</p>
<h1 id='examples-21' class='section-header'><a href='#examples-21'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>new</span>();
<span class='ident'>bv</span>.<span class='ident'>reserve</span>(<span class='number'>10</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>capacity</span>() <span class='op'>&gt;=</span> <span class='number'>10</span>);</pre>
</div><h4 id='method.grow' class='method'><code>fn <a href='#method.grow' class='fnname'>grow</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, value: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
<div class='docblock'><p>Grows the <code>BitVec</code> in-place, adding <code>n</code> copies of <code>value</code> to the <code>BitVec</code>.</p>
<h1 id='panics-7' class='section-header'><a href='#panics-7'>Panics</a></h1>
<p>Panics if the new len overflows a <code>usize</code>.</p>
<h1 id='examples-22' class='section-header'><a href='#examples-22'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b01001011</span>]);
<span class='ident'>bv</span>.<span class='ident'>grow</span>(<span class='number'>2</span>, <span class='boolval'>true</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>10</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>to_bytes</span>(), [<span class='number'>0b01001011</span>, <span class='number'>0b11000000</span>]);</pre>
</div><h4 id='method.pop' class='method'><code>fn <a href='#method.pop' class='fnname'>pop</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;</code></h4>
<div class='docblock'><p>Removes the last bit from the BitVec, and returns it. Returns None if the BitVec is empty.</p>
<h1 id='examples-23' class='section-header'><a href='#examples-23'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>from_bytes</span>(<span class='kw-2'>&amp;</span>[<span class='number'>0b01001001</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='boolval'>true</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>pop</span>(), <span class='prelude-val'>Some</span>(<span class='boolval'>false</span>));
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>len</span>(), <span class='number'>6</span>);</pre>
</div><h4 id='method.push' class='method'><code>fn <a href='#method.push' class='fnname'>push</a>(&amp;mut self, elem: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
<div class='docblock'><p>Pushes a <code>bool</code> onto the end.</p>
<h1 id='examples-24' class='section-header'><a href='#examples-24'>Examples</a></h1>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>bit_vec</span>::<span class='ident'>BitVec</span>;
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>bv</span> <span class='op'>=</span> <span class='ident'>BitVec</span>::<span class='ident'>new</span>();
<span class='ident'>bv</span>.<span class='ident'>push</span>(<span class='boolval'>true</span>);
<span class='ident'>bv</span>.<span class='ident'>push</span>(<span class='boolval'>false</span>);
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>bv</span>.<span class='ident'>eq_vec</span>(<span class='kw-2'>&amp;</span>[<span class='boolval'>true</span>, <span class='boolval'>false</span>]));</pre>
</div><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the total number of bits in this vector</p>
</div><h4 id='method.set_len' class='method'><code>unsafe fn <a href='#method.set_len' class='fnname'>set_len</a>(&amp;mut self, len: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<div class='docblock'><p>Sets the number of bits that this BitVec considers initialized.</p>
<p>Almost certainly can cause bad stuff. Only really intended for BitSet.</p>
</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<div class='docblock'><p>Returns true if there are no bits in this vector</p>
</div><h4 id='method.clear' class='method'><code>fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code></h4>
<div class='docblock'><p>Clears all bits in this vector.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Index.html' title='core::ops::Index'>Index</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Output' class='type'><code>type Output = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.index' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Index.html#method.index' class='fnname'>index</a>(&amp;self, i: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <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='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#method.default' class='fnname'>default</a>() -&gt; Self</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt; for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.from_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html#method.from_iter' class='fnname'>from_iter</a>&lt;I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;&gt;(iter: I) -&gt; Self</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt; for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.extend' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html#method.extend' class='fnname'>extend</a>&lt;I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;&gt;(&amp;mut self, iterable: I)</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; Self</code></h4>
<h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <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='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.partial_cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt;</code></h4>
<h4 id='method.lt' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.le' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <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='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.cmp' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;Self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <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='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, fmt: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <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='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.hash' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash' class='fnname'>hash</a>&lt;H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>&gt;(&amp;self, state: &amp;mut H)</code></h4>
<h4 id='method.hash_slice' class='method'><span class="since">1.3.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[Self]</a>, state: &amp;mut H) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&amp;self, other: &amp;Self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;Rhs) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <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='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'></div><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for &amp;'a <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='associatedtype.IntoIter' class='type'><code>type IntoIter = <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h4>
<h4 id='method.into_iter' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -&gt; <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a> for <a class='struct' href='../bit_vec/struct.BitVec.html' title='bit_vec::BitVec'>BitVec</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item-1' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='associatedtype.IntoIter-1' class='type'><code>type IntoIter = <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a>&lt;B&gt;</code></h4>
<h4 id='method.into_iter-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#method.into_iter' class='fnname'>into_iter</a>(self) -&gt; <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a>&lt;B&gt;</code></h4>
</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 = "bit_vec";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,168 +0,0 @@
<!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 `Blocks` struct in crate `bit_vec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Blocks">
<title>bit_vec::Blocks - 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'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'Blocks', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>Blocks</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-443' class='srclink' href='../src/bit_vec/lib.rs.html.html#1250-1252' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Blocks&lt;'a, B: 'a&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An iterator over the blocks of a <code>BitVec</code>.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = B</code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</code></h4>
<h4 id='method.size_hint' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;</span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='method.next_back' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html#method.next_back' class='fnname'>next_back</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</code></h4>
</div><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='method.len' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> + 'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../bit_vec/struct.Blocks.html' title='bit_vec::Blocks'>Blocks</a>&lt;'a, B&gt;</code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</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 = "bit_vec";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,165 +0,0 @@
<!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 `IntoIter` struct in crate `bit_vec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, IntoIter">
<title>bit_vec::IntoIter - 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'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'IntoIter', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>IntoIter</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-417' class='srclink' href='../src/bit_vec/lib.rs.html.html#1215-1218' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct IntoIter&lt;B = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; {
// some fields omitted
}</pre><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;</code></h4>
<h4 id='method.size_hint' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;</span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a> for <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.next_back' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html#method.next_back' class='fnname'>next_back</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;</code></h4>
</div><h3 class='impl'><code>impl&lt;B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> for <a class='struct' href='../bit_vec/struct.IntoIter.html' title='bit_vec::IntoIter'>IntoIter</a>&lt;B&gt;</code></h3><div class='impl-items'><h4 id='method.len' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
</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 = "bit_vec";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,168 +0,0 @@
<!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 `Iter` struct in crate `bit_vec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Iter">
<title>bit_vec::Iter - 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'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'Iter', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>bit_vec</a>::<wbr><a class='struct' href=''>Iter</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-378' class='srclink' href='../src/bit_vec/lib.rs.html.html#1175-1178' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Iter&lt;'a, B: 'a = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; {
// some fields omitted
}</pre><div class='docblock'><p>An iterator for <code>BitVec</code>.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='associatedtype.Item' class='type'><code>type Item = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.next' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.next' class='fnname'>next</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;</code></h4>
<h4 id='method.size_hint' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.size_hint' class='fnname'>size_hint</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a></code></h4>
<h4 id='method.count' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.count' class='fnname'>count</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<h4 id='method.last' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.last' class='fnname'>last</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.nth' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.nth' class='fnname'>nth</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</code></h4>
<h4 id='method.chain' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.chain' class='fnname'>chain</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Chain.html' title='core::iter::Chain'>Chain</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.zip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.zip' class='fnname'>zip</a>&lt;U&gt;(self, other: U) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Zip.html' title='core::iter::Zip'>Zip</a>&lt;Self, U::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIter</a>&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a></span></code></h4>
<h4 id='method.map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.map' class='fnname'>map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Map.html' title='core::iter::Map'>Map</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.filter' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter' class='fnname'>filter</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Filter.html' title='core::iter::Filter'>Filter</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.filter_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.filter_map' class='fnname'>filter_map</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FilterMap.html' title='core::iter::FilterMap'>FilterMap</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.enumerate' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.enumerate' class='fnname'>enumerate</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Enumerate.html' title='core::iter::Enumerate'>Enumerate</a>&lt;Self&gt;</code></h4>
<h4 id='method.peekable' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.peekable' class='fnname'>peekable</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Peekable.html' title='core::iter::Peekable'>Peekable</a>&lt;Self&gt;</code></h4>
<h4 id='method.skip_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip_while' class='fnname'>skip_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.SkipWhile.html' title='core::iter::SkipWhile'>SkipWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.take_while' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take_while' class='fnname'>take_while</a>&lt;P&gt;(self, predicate: P) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.TakeWhile.html' title='core::iter::TakeWhile'>TakeWhile</a>&lt;Self, P&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.skip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.skip' class='fnname'>skip</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Skip.html' title='core::iter::Skip'>Skip</a>&lt;Self&gt;</code></h4>
<h4 id='method.take' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.take' class='fnname'>take</a>(self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Take.html' title='core::iter::Take'>Take</a>&lt;Self&gt;</code></h4>
<h4 id='method.scan' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.scan' class='fnname'>scan</a>&lt;St, B, F&gt;(self, initial_state: St, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Scan.html' title='core::iter::Scan'>Scan</a>&lt;Self, St, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;mut St, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;B&gt;</span></code></h4>
<h4 id='method.flat_map' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.flat_map' class='fnname'>flat_map</a>&lt;U, F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.FlatMap.html' title='core::iter::FlatMap'>FlatMap</a>&lt;Self, U, F&gt; <span class='where'>where U: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; U</span></code></h4>
<h4 id='method.fuse' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fuse' class='fnname'>fuse</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Fuse.html' title='core::iter::Fuse'>Fuse</a>&lt;Self&gt;</code></h4>
<h4 id='method.inspect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.inspect' class='fnname'>inspect</a>&lt;F&gt;(self, f: F) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Inspect.html' title='core::iter::Inspect'>Inspect</a>&lt;Self, F&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></span></code></h4>
<h4 id='method.by_ref' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h4>
<h4 id='method.collect' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.collect' class='fnname'>collect</a>&lt;B&gt;(self) -&gt; B <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.FromIterator.html' title='core::iter::FromIterator'>FromIterator</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.partition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partition' class='fnname'>partition</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>B, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.fold' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.fold' class='fnname'>fold</a>&lt;B, F&gt;(self, init: B, f: F) -&gt; B <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(B, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.all' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.all' class='fnname'>all</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.any' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.any' class='fnname'>any</a>&lt;F&gt;(&amp;mut self, f: F) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.find' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.find' class='fnname'>find</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.position' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.position' class='fnname'>position</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></span></code></h4>
<h4 id='method.rposition' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rposition' class='fnname'>rposition</a>&lt;P&gt;(&amp;mut self, predicate: P) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.max' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max' class='fnname'>max</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min' class='fnname'>min</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by' class='fnname'>max_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.max_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.max_by_key' class='fnname'>max_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.min_by' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by' class='fnname'>min_by</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.min_by_key' class='method'><span class="since">1.6.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.min_by_key' class='fnname'>min_by_key</a>&lt;B, F&gt;(self, f: F) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt; <span class='where'>where B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a>, F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.FnMut.html' title='core::ops::FnMut'>FnMut</a>(&amp;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>) -&gt; B</span></code></h4>
<h4 id='method.rev' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.rev' class='fnname'>rev</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Rev.html' title='core::iter::Rev'>Rev</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a></span></code></h4>
<h4 id='method.unzip' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.unzip' class='fnname'>unzip</a>&lt;A, B, FromA, FromB&gt;(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>FromA, FromB<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a> <span class='where'>where FromB: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;B&gt;, FromA: <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Extend.html' title='core::iter::Extend'>Extend</a>&lt;A&gt;, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a>A, B<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>&gt;</span></code></h4>
<h4 id='method.cloned' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned' class='fnname'>cloned</a>&lt;'a, T&gt;(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cloned.html' title='core::iter::Cloned'>Cloned</a>&lt;Self&gt; <span class='where'>where T: 'a + <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>, Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>&lt;Item=&amp;'a T&gt;</span></code></h4>
<h4 id='method.cycle' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cycle' class='fnname'>cycle</a>(self) -&gt; <a class='struct' href='https://doc.rust-lang.org/nightly/core/iter/struct.Cycle.html' title='core::iter::Cycle'>Cycle</a>&lt;Self&gt; <span class='where'>where Self: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a></span></code></h4>
<h4 id='method.sum' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.sum' class='fnname'>sum</a>&lt;S&gt;(self) -&gt; S <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=S&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.Zero.html' title='core::num::Zero'>Zero</a></span></code></h4>
<h4 id='method.product' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.product' class='fnname'>product</a>&lt;P&gt;(self) -&gt; P <span class='where'>where P: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>, Output=P&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/num/trait.One.html' title='core::num::One'>One</a></span></code></h4>
<h4 id='method.cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp' class='fnname'>cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>&lt;Item=Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>&gt;, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a></span></code></h4>
<h4 id='method.partial_cmp' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp' class='fnname'>partial_cmp</a>&lt;I&gt;(self, other: I) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html' title='core::cmp::Ordering'>Ordering</a>&gt; <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.eq' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq' class='fnname'>eq</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ne' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne' class='fnname'>ne</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.lt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt' class='fnname'>lt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.le' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le' class='fnname'>le</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.gt' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt' class='fnname'>gt</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
<h4 id='method.ge' class='method'><span class="since">1.5.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge' class='fnname'>ge</a>&lt;I&gt;(self, other: I) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>IntoIterator</a>, Self::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Item</a>: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html' title='core::cmp::PartialOrd'>PartialOrd</a>&lt;I::<a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html' title='core::iter::IntoIterator'>Item</a>&gt;</span></code></h4>
</div><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html' title='core::iter::DoubleEndedIterator'>DoubleEndedIterator</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='method.next_back' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.DoubleEndedIterator.html#method.next_back' class='fnname'>next_back</a>(&amp;mut self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>&gt;</code></h4>
</div><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a>&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html' title='core::iter::ExactSizeIterator'>ExactSizeIterator</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='method.len' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/trait.ExactSizeIterator.html#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl&lt;'a, B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> + 'a&gt; <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../bit_vec/struct.Iter.html' title='bit_vec::Iter'>Iter</a>&lt;'a, B&gt;</code></h4>
<h4 id='method.clone_from' class='method'><span class="since">1.0.0</span><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</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 = "bit_vec";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,142 +0,0 @@
<!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 `BitBlock` trait in crate `bit_vec`.">
<meta name="keywords" content="rust, rustlang, rust-lang, BitBlock">
<title>bit_vec::BitBlock - 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'>bit_vec</a></p><script>window.sidebarCurrent = {name: 'BitBlock', ty: 'trait', 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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>bit_vec</a>::<wbr><a class='trait' href=''>BitBlock</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-19' class='srclink' href='../src/bit_vec/lib.rs.html.html#105-133' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait BitBlock: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;Self, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Sub.html' title='core::ops::Sub'>Sub</a>&lt;Self, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shl.html' title='core::ops::Shl'>Shl</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Shr.html' title='core::ops::Shr'>Shr</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Not.html' title='core::ops::Not'>Not</a>&lt;Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitAnd.html' title='core::ops::BitAnd'>BitAnd</a>&lt;Self, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitOr.html' title='core::ops::BitOr'>BitOr</a>&lt;Self, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.BitXor.html' title='core::ops::BitXor'>BitXor</a>&lt;Self, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Rem.html' title='core::ops::Rem'>Rem</a>&lt;Self, Output=Self&gt; + <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html' title='core::cmp::Ord'>Ord</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> {
fn <a href='#tymethod.bits' class='fnname'>bits</a>() -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>;
fn <a href='#tymethod.from_byte' class='fnname'>from_byte</a>(byte: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; Self;
fn <a href='#tymethod.count_ones' class='fnname'>count_ones</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>;
fn <a href='#tymethod.zero' class='fnname'>zero</a>() -&gt; Self;
fn <a href='#tymethod.one' class='fnname'>one</a>() -&gt; Self;
fn <a href='#method.bytes' class='fnname'>bytes</a>() -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a> { ... }
}</pre><div class='docblock'><p>Abstracts over a pile of bits (basically unsigned primitives)</p>
</div>
<h2 id='required-methods'>Required Methods</h2>
<div class='methods'>
<h3 id='tymethod.bits' class='method stab '><code>fn <a href='#tymethod.bits' class='fnname'>bits</a>() -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>How many bits it has</p>
</div><h3 id='tymethod.from_byte' class='method stab '><code>fn <a href='#tymethod.from_byte' class='fnname'>from_byte</a>(byte: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; Self</code></h3><div class='docblock'><p>Convert a byte into this type (lowest-order bits set)</p>
</div><h3 id='tymethod.count_ones' class='method stab '><code>fn <a href='#tymethod.count_ones' class='fnname'>count_ones</a>(self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>Count the number of 1&#39;s in the bitwise repr</p>
</div><h3 id='tymethod.zero' class='method stab '><code>fn <a href='#tymethod.zero' class='fnname'>zero</a>() -&gt; Self</code></h3><div class='docblock'><p>Get <code>0</code></p>
</div><h3 id='tymethod.one' class='method stab '><code>fn <a href='#tymethod.one' class='fnname'>one</a>() -&gt; Self</code></h3><div class='docblock'><p>Get <code>1</code></p>
</div></div>
<h2 id='provided-methods'>Provided Methods</h2>
<div class='methods'>
<h3 id='method.bytes' class='method stab '><code>fn <a href='#method.bytes' class='fnname'>bytes</a>() -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h3><div class='docblock'><p>How many bytes it has</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a></code></li>
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a></code></li>
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a></code></li>
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></li>
<li><code>impl <a class='trait' href='../bit_vec/trait.BitBlock.html' title='bit_vec::BitBlock'>BitBlock</a> for <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></li>
</ul><script type="text/javascript" async
src="../implementors/bit_vec/trait.BitBlock.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</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 = "bit_vec";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,122 +0,0 @@
<!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 `bitflags` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, bitflags">
<title>bitflags - 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: 'bitflags', 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=''>bitflags</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/bitflags/lib.rs.html.html#11-582' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>A typesafe bitmask flag generator.</p>
</div><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
<table>
<tr class=' module-item'>
<td><a class='macro' href='macro.bitflags!.html'
title='bitflags::bitflags!'>bitflags!</a></td>
<td class='docblock short'>
<p>The <code>bitflags!</code> macro generates a <code>struct</code> that holds a set of C-style
bitmask flags. It is useful for creating typesafe wrappers for C APIs.</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 = "bitflags";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,236 +0,0 @@
<!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 `bitflags!` macro in crate `bitflags`.">
<meta name="keywords" content="rust, rustlang, rust-lang, bitflags!">
<title>bitflags::bitflags! - 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'>bitflags</a></p><script>window.sidebarCurrent = {name: 'bitflags!', ty: 'macro', 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 macro">
<h1 class='fqn'><span class='in-band'><a href='index.html'>bitflags</a>::<wbr><a class='macro' href=''>bitflags!</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-4' class='srclink' href='../src/bitflags/lib.rs.html.html#133-349' title='goto source code'>[src]</a></span></h1>
<pre class='rust macro'>
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>bitflags</span> {
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>
}) <span class='op'>=&gt;</span> { ... };
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>,
}) <span class='op'>=&gt;</span> { ... };
}</pre>
<div class='docblock'><p>The <code>bitflags!</code> macro generates a <code>struct</code> that holds a set of C-style
bitmask flags. It is useful for creating typesafe wrappers for C APIs.</p>
<p>The flags should only be defined for integer types, otherwise unexpected
type errors may occur at compile time.</p>
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
<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'>bitflags</span>;
<span class='macro'>bitflags</span><span class='macro'>!</span> {
<span class='ident'>flags</span> <span class='ident'>Flags</span>: <span class='ident'>u32</span> {
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
<span class='kw'>const</span> <span class='ident'>FLAG_C</span> <span class='op'>=</span> <span class='number'>0b00000100</span>,
<span class='kw'>const</span> <span class='ident'>FLAG_ABC</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span>.<span class='ident'>bits</span>
<span class='op'>|</span> <span class='ident'>FLAG_B</span>.<span class='ident'>bits</span>
<span class='op'>|</span> <span class='ident'>FLAG_C</span>.<span class='ident'>bits</span>,
}
}
<span class='kw'>fn</span> <span class='ident'>main</span>() {
<span class='kw'>let</span> <span class='ident'>e1</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_C</span>;
<span class='kw'>let</span> <span class='ident'>e2</span> <span class='op'>=</span> <span class='ident'>FLAG_B</span> <span class='op'>|</span> <span class='ident'>FLAG_C</span>;
<span class='macro'>assert</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='op'>|</span> <span class='ident'>e2</span>) <span class='op'>==</span> <span class='ident'>FLAG_ABC</span>); <span class='comment'>// union</span>
<span class='macro'>assert</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='kw-2'>&amp;</span> <span class='ident'>e2</span>) <span class='op'>==</span> <span class='ident'>FLAG_C</span>); <span class='comment'>// intersection</span>
<span class='macro'>assert</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='op'>-</span> <span class='ident'>e2</span>) <span class='op'>==</span> <span class='ident'>FLAG_A</span>); <span class='comment'>// set difference</span>
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>e2</span> <span class='op'>==</span> <span class='ident'>FLAG_A</span>); <span class='comment'>// set complement</span>
}</pre>
<p>The generated <code>struct</code>s can also be extended with type and trait
implementations:</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'>bitflags</span>;
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>fmt</span>;
<span class='macro'>bitflags</span><span class='macro'>!</span> {
<span class='ident'>flags</span> <span class='ident'>Flags</span>: <span class='ident'>u32</span> {
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
}
}
<span class='kw'>impl</span> <span class='ident'>Flags</span> {
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>clear</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='self'>self</span>) {
<span class='self'>self</span>.<span class='ident'>bits</span> <span class='op'>=</span> <span class='number'>0</span>; <span class='comment'>// The `bits` field can be accessed from within the</span>
<span class='comment'>// same module where the `bitflags!` macro was invoked.</span>
}
}
<span class='kw'>impl</span> <span class='ident'>fmt</span>::<span class='ident'>Display</span> <span class='kw'>for</span> <span class='ident'>Flags</span> {
<span class='kw'>fn</span> <span class='ident'>fmt</span>(<span class='kw-2'>&amp;</span><span class='self'>self</span>, <span class='ident'>f</span>: <span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>fmt</span>::<span class='ident'>Formatter</span>) <span class='op'>-&gt;</span> <span class='ident'>fmt</span>::<span class='prelude-ty'>Result</span> {
<span class='macro'>write</span><span class='macro'>!</span>(<span class='ident'>f</span>, <span class='string'>&quot;hi!&quot;</span>)
}
}
<span class='kw'>fn</span> <span class='ident'>main</span>() {
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>flags</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_B</span>;
<span class='ident'>flags</span>.<span class='ident'>clear</span>();
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>flags</span>.<span class='ident'>is_empty</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>flags</span>), <span class='string'>&quot;hi!&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>&quot;{:?}&quot;</span>, <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_B</span>), <span class='string'>&quot;FLAG_A | FLAG_B&quot;</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>&quot;{:?}&quot;</span>, <span class='ident'>FLAG_B</span>), <span class='string'>&quot;FLAG_B&quot;</span>);
}</pre>
<h1 id='attributes' class='section-header'><a href='#attributes'>Attributes</a></h1>
<p>Attributes can be attached to the generated <code>struct</code> by placing them
before the <code>flags</code> keyword.</p>
<h1 id='trait-implementations' class='section-header'><a href='#trait-implementations'>Trait implementations</a></h1>
<p>The <code>Copy</code>, <code>Clone</code>, <code>PartialEq</code>, <code>Eq</code>, <code>PartialOrd</code>, <code>Ord</code> and <code>Hash</code>
traits automatically derived for the <code>struct</code> using the <code>derive</code> attribute.
Additional traits can be derived by providing an explicit <code>derive</code>
attribute on <code>flags</code>.</p>
<p>The <code>FromIterator</code> trait is implemented for the <code>struct</code>, too, calculating
the union of the instances of the <code>struct</code> iterated over.</p>
<p>The <code>Debug</code> trait is also implemented by displaying the bits value of the
internal struct.</p>
<h2 id='operators' class='section-header'><a href='#operators'>Operators</a></h2>
<p>The following operator traits are implemented for the generated <code>struct</code>:</p>
<ul>
<li><code>BitOr</code>: union</li>
<li><code>BitAnd</code>: intersection</li>
<li><code>BitXor</code>: toggle</li>
<li><code>Sub</code>: set difference</li>
<li><code>Not</code>: set complement</li>
</ul>
<h1 id='methods-1' class='section-header'><a href='#methods-1'>Methods</a></h1>
<p>The following methods are defined for the generated <code>struct</code>:</p>
<ul>
<li><code>empty</code>: an empty set of flags</li>
<li><code>all</code>: the set of all flags</li>
<li><code>bits</code>: the raw value of the flags currently stored</li>
<li><code>from_bits</code>: convert from underlying bit representation, unless that
representation contains bits that do not correspond to a flag</li>
<li><code>from_bits_truncate</code>: convert from underlying bit representation, dropping
any bits that do not correspond to flags</li>
<li><code>is_empty</code>: <code>true</code> if no flags are currently stored</li>
<li><code>is_all</code>: <code>true</code> if all flags are currently set</li>
<li><code>intersects</code>: <code>true</code> if there are flags common to both <code>self</code> and <code>other</code></li>
<li><code>contains</code>: <code>true</code> all of the flags in <code>other</code> are contained within <code>self</code></li>
<li><code>insert</code>: inserts the specified flags in-place</li>
<li><code>remove</code>: removes the specified flags in-place</li>
<li><code>toggle</code>: the specified flags will be inserted if not present, and removed
if they are.</li>
</ul>
</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 = "bitflags";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1 +0,0 @@
initSidebarItems({"macro":[["bitflags!","The `bitflags!` macro generates a `struct` that holds a set of C-style bitmask flags. It is useful for creating typesafe wrappers for C APIs."]]});

View file

@ -1,135 +0,0 @@
<!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 `BigEndian` enum in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, BigEndian">
<title>byteorder::BigEndian - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'BigEndian', ty: 'enum', 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 enum">
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>byteorder</a>::<wbr><a class='enum' href=''>BigEndian</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-260' class='srclink' href='../src/byteorder/lib.rs.html.html#262' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum BigEndian {}</pre><div class='docblock'><p>Defines big-endian serialization.</p>
<p>Note that this type has no value constructor. It is used purely at the
type level.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.BigEndian.html' title='byteorder::BigEndian'>BigEndian</a></code></h3><div class='impl-items'><h4 id='method.read_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u16' class='fnname'>read_u16</a>(buf: <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.u16.html'>u16</a></code></h4>
<h4 id='method.read_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u32' class='fnname'>read_u32</a>(buf: <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.u32.html'>u32</a></code></h4>
<h4 id='method.read_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u64' class='fnname'>read_u64</a>(buf: <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></code></h4>
<h4 id='method.read_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_uint' class='fnname'>read_uint</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
<h4 id='method.write_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>)</code></h4>
<h4 id='method.write_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>)</code></h4>
<h4 id='method.write_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></h4>
<h4 id='method.write_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<h4 id='method.read_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i16' class='fnname'>read_i16</a>(buf: <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.i16.html'>i16</a></code></h4>
<h4 id='method.read_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i32' class='fnname'>read_i32</a>(buf: <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.i32.html'>i32</a></code></h4>
<h4 id='method.read_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i64' class='fnname'>read_i64</a>(buf: <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.i64.html'>i64</a></code></h4>
<h4 id='method.read_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_int' class='fnname'>read_int</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h4>
<h4 id='method.read_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f32' class='fnname'>read_f32</a>(buf: <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.f32.html'>f32</a></code></h4>
<h4 id='method.read_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f64' class='fnname'>read_f64</a>(buf: <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.f64.html'>f64</a></code></h4>
<h4 id='method.write_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>)</code></h4>
<h4 id='method.write_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>)</code></h4>
<h4 id='method.write_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>)</code></h4>
<h4 id='method.write_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<h4 id='method.write_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>)</code></h4>
<h4 id='method.write_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>)</code></h4>
</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,132 +0,0 @@
<!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 `Error` enum in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Error">
<title>byteorder::Error - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'Error', ty: 'enum', 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 enum">
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>byteorder</a>::<wbr><a class='enum' href=''>Error</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-16' class='srclink' href='../src/byteorder/new.rs.html.html#19-27' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum Error {
UnexpectedEOF,
Io(<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>),
}</pre><div class='docblock'><p>An error type for reading bytes.</p>
<p>This is a thin wrapper over the standard <code>io::Error</code> type. Namely, it
adds one additional error case: an unexpected EOF.</p>
<p>Note that this error is also used for the <code>write</code> methods to keep things
consistent.</p>
</div><h2 class='variants'>Variants</h2>
<table class='variants_table'><tr><td id='variant.UnexpectedEOF'><code>UnexpectedEOF</code></td><td><div class='docblock'><p>An unexpected EOF.</p>
<p>This occurs when a call to the underlying reader returns <code>0</code> bytes,
but more bytes are required to decode a meaningful value.</p>
</div></td><td></td></tr><tr><td id='variant.Io'><code>Io</code></td><td><div class='docblock'><p>Any underlying IO error that occurs while reading bytes.</p>
</div></td><td></td></tr></table><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>&gt; for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#method.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>) -&gt; <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h4>
</div><h3 class='impl'><code>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='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#method.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>Error</a> for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description' class='fnname'>description</a>(&amp;self) -&gt; &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;&amp;<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>Error</a>&gt;</code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a></code></h3><div class='impl-items'><h4 id='method.fmt-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div></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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,135 +0,0 @@
<!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 `LittleEndian` enum in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, LittleEndian">
<title>byteorder::LittleEndian - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'LittleEndian', ty: 'enum', 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 enum">
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>byteorder</a>::<wbr><a class='enum' href=''>LittleEndian</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-261' class='srclink' href='../src/byteorder/lib.rs.html.html#268' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum LittleEndian {}</pre><div class='docblock'><p>Defines little-endian serialization.</p>
<p>Note that this type has no value constructor. It is used purely at the
type level.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.LittleEndian.html' title='byteorder::LittleEndian'>LittleEndian</a></code></h3><div class='impl-items'><h4 id='method.read_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u16' class='fnname'>read_u16</a>(buf: <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.u16.html'>u16</a></code></h4>
<h4 id='method.read_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u32' class='fnname'>read_u32</a>(buf: <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.u32.html'>u32</a></code></h4>
<h4 id='method.read_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_u64' class='fnname'>read_u64</a>(buf: <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></code></h4>
<h4 id='method.read_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_uint' class='fnname'>read_uint</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h4>
<h4 id='method.write_u16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>)</code></h4>
<h4 id='method.write_u32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>)</code></h4>
<h4 id='method.write_u64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></h4>
<h4 id='method.write_uint' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<h4 id='method.read_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i16' class='fnname'>read_i16</a>(buf: <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.i16.html'>i16</a></code></h4>
<h4 id='method.read_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i32' class='fnname'>read_i32</a>(buf: <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.i32.html'>i32</a></code></h4>
<h4 id='method.read_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_i64' class='fnname'>read_i64</a>(buf: <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.i64.html'>i64</a></code></h4>
<h4 id='method.read_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_int' class='fnname'>read_int</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h4>
<h4 id='method.read_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f32' class='fnname'>read_f32</a>(buf: <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.f32.html'>f32</a></code></h4>
<h4 id='method.read_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.read_f64' class='fnname'>read_f64</a>(buf: <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.f64.html'>f64</a></code></h4>
<h4 id='method.write_i16' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>)</code></h4>
<h4 id='method.write_i32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>)</code></h4>
<h4 id='method.write_i64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>)</code></h4>
<h4 id='method.write_int' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
<h4 id='method.write_f32' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>)</code></h4>
<h4 id='method.write_f64' class='method'><code>fn <a href='../byteorder/trait.ByteOrder.html#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>)</code></h4>
</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,210 +0,0 @@
<!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 `byteorder` crate.">
<meta name="keywords" content="rust, rustlang, rust-lang, byteorder">
<title>byteorder - 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: 'byteorder', 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=''>byteorder</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/byteorder/lib.rs.html.html#1-779' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>This crate provides convenience methods for encoding and decoding numbers
in either big-endian or little-endian order.</p>
<p>The organization of the crate is pretty simple. A trait, <code>ByteOrder</code>, specifies
byte conversion methods for each type of number in Rust (sans numbers that have
a platform dependent size like <code>usize</code> and <code>isize</code>). Two types, <code>BigEndian</code>
and <code>LittleEndian</code> implement these methods. Finally, <code>ReadBytesExt</code> and
<code>WriteBytesExt</code> provide convenience methods available to all types that
implement <code>Read</code> and <code>Write</code>.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>Read unsigned 16 bit big-endian integers from a <code>Read</code> type:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::<span class='ident'>Cursor</span>;
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>BigEndian</span>, <span class='ident'>ReadBytesExt</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>rdr</span> <span class='op'>=</span> <span class='ident'>Cursor</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span>, <span class='number'>5</span>, <span class='number'>3</span>, <span class='number'>0</span>]);
<span class='comment'>// Note that we use type parameters to indicate which kind of byte order</span>
<span class='comment'>// we want!</span>
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>517</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'>&lt;</span><span class='ident'>BigEndian</span><span class='op'>&gt;</span>().<span class='ident'>unwrap</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>768</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'>&lt;</span><span class='ident'>BigEndian</span><span class='op'>&gt;</span>().<span class='ident'>unwrap</span>());</pre>
<p>Write unsigned 16 bit little-endian integers to a <code>Write</code> type:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>LittleEndian</span>, <span class='ident'>WriteBytesExt</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>wtr</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[];
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'>&lt;</span><span class='ident'>LittleEndian</span><span class='op'>&gt;</span>(<span class='number'>517</span>).<span class='ident'>unwrap</span>();
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'>&lt;</span><span class='ident'>LittleEndian</span><span class='op'>&gt;</span>(<span class='number'>768</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>wtr</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>5</span>, <span class='number'>2</span>, <span class='number'>0</span>, <span class='number'>3</span>]);</pre>
</div><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table>
<tr class=' module-item'>
<td><a class='enum' href='enum.BigEndian.html'
title='byteorder::BigEndian'>BigEndian</a></td>
<td class='docblock short'>
<p>Defines big-endian serialization.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='enum' href='enum.Error.html'
title='byteorder::Error'>Error</a></td>
<td class='docblock short'>
<p>An error type for reading bytes.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='enum' href='enum.LittleEndian.html'
title='byteorder::LittleEndian'>LittleEndian</a></td>
<td class='docblock short'>
<p>Defines little-endian serialization.</p>
</td>
</tr>
</table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class='trait' href='trait.ByteOrder.html'
title='byteorder::ByteOrder'>ByteOrder</a></td>
<td class='docblock short'>
<p>ByteOrder describes types that can serialize integers as bytes.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='trait' href='trait.ReadBytesExt.html'
title='byteorder::ReadBytesExt'>ReadBytesExt</a></td>
<td class='docblock short'>
<p>Extends <code>Read</code> with methods for reading numbers. (For <code>std::io</code>.)</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='trait' href='trait.WriteBytesExt.html'
title='byteorder::WriteBytesExt'>WriteBytesExt</a></td>
<td class='docblock short'>
<p>Extends <code>Write</code> with methods for writing numbers. (For <code>std::io</code>.)</p>
</td>
</tr>
</table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
<table>
<tr class=' module-item'>
<td><a class='type' href='type.NativeEndian.html'
title='byteorder::NativeEndian'>NativeEndian</a></td>
<td class='docblock short'>
<p>Defines system native-endian serialization.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='type' href='type.Result.html'
title='byteorder::Result'>Result</a></td>
<td class='docblock short'>
<p>A short-hand for <code>result::Result&lt;T, byteorder::Error&gt;</code>.</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

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

View file

@ -1 +0,0 @@
initSidebarItems({"enum":[["Error","An error type for reading bytes."]],"trait":[["ReadBytesExt","Extends `Read` with methods for reading numbers. (For `std::io`.)"],["WriteBytesExt","Extends `Write` with methods for writing numbers. (For `std::io`.)"]],"type":[["Result","A short-hand for `result::Result<T, byteorder::Error>`."]]});

View file

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

View file

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

View file

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

View file

@ -1 +0,0 @@
initSidebarItems({"enum":[["BigEndian","Defines big-endian serialization."],["Error","An error type for reading bytes."],["LittleEndian","Defines little-endian serialization."]],"trait":[["ByteOrder","ByteOrder describes types that can serialize integers as bytes."],["ReadBytesExt","Extends `Read` with methods for reading numbers. (For `std::io`.)"],["WriteBytesExt","Extends `Write` with methods for writing numbers. (For `std::io`.)"]],"type":[["NativeEndian","Defines system native-endian serialization."],["Result","A short-hand for `result::Result<T, byteorder::Error>`."]]});

View file

@ -1,237 +0,0 @@
<!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 `ByteOrder` trait in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ByteOrder">
<title>byteorder::ByteOrder - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'ByteOrder', ty: 'trait', 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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>byteorder</a>::<wbr><a class='trait' href=''>ByteOrder</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-205' class='srclink' href='../src/byteorder/lib.rs.html.html#116-256' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait ByteOrder {
fn <a href='#tymethod.read_u16' class='fnname'>read_u16</a>(buf: <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.u16.html'>u16</a>;
fn <a href='#tymethod.read_u32' class='fnname'>read_u32</a>(buf: <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.u32.html'>u32</a>;
fn <a href='#tymethod.read_u64' class='fnname'>read_u64</a>(buf: <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>;
fn <a href='#tymethod.read_uint' class='fnname'>read_uint</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>;
fn <a href='#tymethod.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>);
fn <a href='#tymethod.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>);
fn <a href='#tymethod.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>);
fn <a href='#tymethod.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>);
fn <a href='#method.read_i16' class='fnname'>read_i16</a>(buf: <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.i16.html'>i16</a> { ... }
fn <a href='#method.read_i32' class='fnname'>read_i32</a>(buf: <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.i32.html'>i32</a> { ... }
fn <a href='#method.read_i64' class='fnname'>read_i64</a>(buf: <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.i64.html'>i64</a> { ... }
fn <a href='#method.read_int' class='fnname'>read_int</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a> { ... }
fn <a href='#method.read_f32' class='fnname'>read_f32</a>(buf: <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.f32.html'>f32</a> { ... }
fn <a href='#method.read_f64' class='fnname'>read_f64</a>(buf: <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.f64.html'>f64</a> { ... }
fn <a href='#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>) { ... }
fn <a href='#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) { ... }
fn <a href='#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>) { ... }
fn <a href='#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) { ... }
fn <a href='#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) { ... }
fn <a href='#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>) { ... }
}</pre><div class='docblock'><p>ByteOrder describes types that can serialize integers as bytes.</p>
<p>Note that <code>Self</code> does not appear anywhere in this trait&#39;s definition!
Therefore, in order to use it, you&#39;ll need to use syntax like
<code>T::read_u16(&amp;[0, 1])</code> where <code>T</code> implements <code>ByteOrder</code>.</p>
<p>This crate provides two types that implement <code>ByteOrder</code>: <code>BigEndian</code>
and <code>LittleEndian</code>.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>Write and read <code>u32</code> numbers in little endian order:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>ByteOrder</span>, <span class='ident'>LittleEndian</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buf</span> <span class='op'>=</span> [<span class='number'>0</span>; <span class='number'>4</span>];
<span class='ident'>LittleEndian</span>::<span class='ident'>write_u32</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>buf</span>, <span class='number'>1_000_000</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>1_000_000</span>, <span class='ident'>LittleEndian</span>::<span class='ident'>read_u32</span>(<span class='kw-2'>&amp;</span><span class='ident'>buf</span>));</pre>
<p>Write and read <code>i16</code> numbers in big endian order:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>ByteOrder</span>, <span class='ident'>BigEndian</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buf</span> <span class='op'>=</span> [<span class='number'>0</span>; <span class='number'>2</span>];
<span class='ident'>BigEndian</span>::<span class='ident'>write_i16</span>(<span class='kw-2'>&amp;</span><span class='kw-2'>mut</span> <span class='ident'>buf</span>, <span class='op'>-</span><span class='number'>50_000</span>);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='op'>-</span><span class='number'>50_000</span>, <span class='ident'>BigEndian</span>::<span class='ident'>read_i16</span>(<span class='kw-2'>&amp;</span><span class='ident'>buf</span>));</pre>
</div>
<h2 id='required-methods'>Required Methods</h2>
<div class='methods'>
<h3 id='tymethod.read_u16' class='method stab '><code>fn <a href='#tymethod.read_u16' class='fnname'>read_u16</a>(buf: <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.u16.html'>u16</a></code></h3><div class='docblock'><p>Reads an unsigned 16 bit integer from <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 2</code>.</p>
</div><h3 id='tymethod.read_u32' class='method stab '><code>fn <a href='#tymethod.read_u32' class='fnname'>read_u32</a>(buf: <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.u32.html'>u32</a></code></h3><div class='docblock'><p>Reads an unsigned 32 bit integer from <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 4</code>.</p>
</div><h3 id='tymethod.read_u64' class='method stab '><code>fn <a href='#tymethod.read_u64' class='fnname'>read_u64</a>(buf: <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></code></h3><div class='docblock'><p>Reads an unsigned 64 bit integer from <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 8</code>.</p>
</div><h3 id='tymethod.read_uint' class='method stab '><code>fn <a href='#tymethod.read_uint' class='fnname'>read_uint</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></h3><div class='docblock'><p>Reads an unsigned n-bytes integer from <code>buf</code>.</p>
<p>Panics when <code>nbytes &lt; 1</code> or <code>nbytes &gt; 8</code> or
<code>buf.len() &lt; nbytes</code></p>
</div><h3 id='tymethod.write_u16' class='method stab '><code>fn <a href='#tymethod.write_u16' class='fnname'>write_u16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>)</code></h3><div class='docblock'><p>Writes an unsigned 16 bit integer <code>n</code> to <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 2</code>.</p>
</div><h3 id='tymethod.write_u32' class='method stab '><code>fn <a href='#tymethod.write_u32' class='fnname'>write_u32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>)</code></h3><div class='docblock'><p>Writes an unsigned 32 bit integer <code>n</code> to <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 4</code>.</p>
</div><h3 id='tymethod.write_u64' class='method stab '><code>fn <a href='#tymethod.write_u64' class='fnname'>write_u64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></h3><div class='docblock'><p>Writes an unsigned 64 bit integer <code>n</code> to <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 8</code>.</p>
</div><h3 id='tymethod.write_uint' class='method stab '><code>fn <a href='#tymethod.write_uint' class='fnname'>write_uint</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h3><div class='docblock'><p>Writes an unsigned integer <code>n</code> to <code>buf</code> using only <code>nbytes</code>.</p>
<p>If <code>n</code> is not representable in <code>nbytes</code>, or if <code>nbytes</code> is <code>&gt; 8</code>, then
this method panics.</p>
</div></div>
<h2 id='provided-methods'>Provided Methods</h2>
<div class='methods'>
<h3 id='method.read_i16' class='method stab '><code>fn <a href='#method.read_i16' class='fnname'>read_i16</a>(buf: <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.i16.html'>i16</a></code></h3><div class='docblock'><p>Reads a signed 16 bit integer from <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 2</code>.</p>
</div><h3 id='method.read_i32' class='method stab '><code>fn <a href='#method.read_i32' class='fnname'>read_i32</a>(buf: <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.i32.html'>i32</a></code></h3><div class='docblock'><p>Reads a signed 32 bit integer from <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 4</code>.</p>
</div><h3 id='method.read_i64' class='method stab '><code>fn <a href='#method.read_i64' class='fnname'>read_i64</a>(buf: <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.i64.html'>i64</a></code></h3><div class='docblock'><p>Reads a signed 64 bit integer from <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 8</code>.</p>
</div><h3 id='method.read_int' class='method stab '><code>fn <a href='#method.read_int' class='fnname'>read_int</a>(buf: <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>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a></code></h3><div class='docblock'><p>Reads a signed n-bytes integer from <code>buf</code>.</p>
<p>Panics when <code>nbytes &lt; 1</code> or <code>nbytes &gt; 8</code> or
<code>buf.len() &lt; nbytes</code></p>
</div><h3 id='method.read_f32' class='method stab '><code>fn <a href='#method.read_f32' class='fnname'>read_f32</a>(buf: <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.f32.html'>f32</a></code></h3><div class='docblock'><p>Reads a IEEE754 single-precision (4 bytes) floating point number.</p>
<p>Panics when <code>buf.len() &lt; 4</code>.</p>
</div><h3 id='method.read_f64' class='method stab '><code>fn <a href='#method.read_f64' class='fnname'>read_f64</a>(buf: <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.f64.html'>f64</a></code></h3><div class='docblock'><p>Reads a IEEE754 double-precision (8 bytes) floating point number.</p>
<p>Panics when <code>buf.len() &lt; 8</code>.</p>
</div><h3 id='method.write_i16' class='method stab '><code>fn <a href='#method.write_i16' class='fnname'>write_i16</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>)</code></h3><div class='docblock'><p>Writes a signed 16 bit integer <code>n</code> to <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 2</code>.</p>
</div><h3 id='method.write_i32' class='method stab '><code>fn <a href='#method.write_i32' class='fnname'>write_i32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>)</code></h3><div class='docblock'><p>Writes a signed 32 bit integer <code>n</code> to <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 4</code>.</p>
</div><h3 id='method.write_i64' class='method stab '><code>fn <a href='#method.write_i64' class='fnname'>write_i64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>)</code></h3><div class='docblock'><p>Writes a signed 64 bit integer <code>n</code> to <code>buf</code>.</p>
<p>Panics when <code>buf.len() &lt; 8</code>.</p>
</div><h3 id='method.write_int' class='method stab '><code>fn <a href='#method.write_int' class='fnname'>write_int</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h3><div class='docblock'><p>Writes a signed integer <code>n</code> to <code>buf</code> using only <code>nbytes</code>.</p>
<p>If <code>n</code> is not representable in <code>nbytes</code>, or if <code>nbytes</code> is <code>&gt; 8</code>, then
this method panics.</p>
</div><h3 id='method.write_f32' class='method stab '><code>fn <a href='#method.write_f32' class='fnname'>write_f32</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>)</code></h3><div class='docblock'><p>Writes a IEEE754 single-precision (4 bytes) floating point number.</p>
<p>Panics when <code>buf.len() &lt; 4</code>.</p>
</div><h3 id='method.write_f64' class='method stab '><code>fn <a href='#method.write_f64' class='fnname'>write_f64</a>(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;mut [</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>, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>)</code></h3><div class='docblock'><p>Writes a IEEE754 double-precision (8 bytes) floating point number.</p>
<p>Panics when <code>buf.len() &lt; 8</code>.</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.BigEndian.html' title='byteorder::BigEndian'>BigEndian</a></code></li>
<li><code>impl <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a> for <a class='enum' href='../byteorder/enum.LittleEndian.html' title='byteorder::LittleEndian'>LittleEndian</a></code></li>
</ul><script type="text/javascript" async
src="../implementors/byteorder/trait.ByteOrder.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,168 +0,0 @@
<!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 `ReadBytesExt` trait in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ReadBytesExt">
<title>byteorder::ReadBytesExt - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'ReadBytesExt', ty: 'trait', 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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>byteorder</a>::<wbr><a class='trait' href=''>ReadBytesExt</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-47' class='srclink' href='../src/byteorder/new.rs.html.html#86-190' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait ReadBytesExt: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> {
fn <a href='#method.read_u8' class='fnname'>read_u8</a>(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>&gt; { ... }
fn <a href='#method.read_i8' class='fnname'>read_i8</a>(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>&gt; { ... }
fn <a href='#method.read_u16' class='fnname'>read_u16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>&gt; { ... }
fn <a href='#method.read_i16' class='fnname'>read_i16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>&gt; { ... }
fn <a href='#method.read_u32' class='fnname'>read_u32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt; { ... }
fn <a href='#method.read_i32' class='fnname'>read_i32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt; { ... }
fn <a href='#method.read_u64' class='fnname'>read_u64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt; { ... }
fn <a href='#method.read_i64' class='fnname'>read_i64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>&gt; { ... }
fn <a href='#method.read_uint' class='fnname'>read_uint</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt; { ... }
fn <a href='#method.read_int' class='fnname'>read_int</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>&gt; { ... }
fn <a href='#method.read_f32' class='fnname'>read_f32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>&gt; { ... }
fn <a href='#method.read_f64' class='fnname'>read_f64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>&gt; { ... }
}</pre><div class='docblock'><p>Extends <code>Read</code> with methods for reading numbers. (For <code>std::io</code>.)</p>
<p>Most of the methods defined here have an unconstrained type parameter that
must be explicitly instantiated. Typically, it is instantiated with either
the <code>BigEndian</code> or <code>LittleEndian</code> types defined in this crate.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>Read unsigned 16 bit big-endian integers from a <code>Read</code>:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>io</span>::<span class='ident'>Cursor</span>;
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>BigEndian</span>, <span class='ident'>ReadBytesExt</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>rdr</span> <span class='op'>=</span> <span class='ident'>Cursor</span>::<span class='ident'>new</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span>, <span class='number'>5</span>, <span class='number'>3</span>, <span class='number'>0</span>]);
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>517</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'>&lt;</span><span class='ident'>BigEndian</span><span class='op'>&gt;</span>().<span class='ident'>unwrap</span>());
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>768</span>, <span class='ident'>rdr</span>.<span class='ident'>read_u16</span>::<span class='op'>&lt;</span><span class='ident'>BigEndian</span><span class='op'>&gt;</span>().<span class='ident'>unwrap</span>());</pre>
</div>
<h2 id='provided-methods'>Provided Methods</h2>
<div class='methods'>
<h3 id='method.read_u8' class='method stab '><code>fn <a href='#method.read_u8' class='fnname'>read_u8</a>(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>&gt;</code></h3><div class='docblock'><p>Reads an unsigned 8 bit integer from the underlying reader.</p>
<p>Note that since this reads a single byte, no byte order conversions
are used. It is included for completeness.</p>
</div><h3 id='method.read_i8' class='method stab '><code>fn <a href='#method.read_i8' class='fnname'>read_i8</a>(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>&gt;</code></h3><div class='docblock'><p>Reads a signed 8 bit integer from the underlying reader.</p>
<p>Note that since this reads a single byte, no byte order conversions
are used. It is included for completeness.</p>
</div><h3 id='method.read_u16' class='method stab '><code>fn <a href='#method.read_u16' class='fnname'>read_u16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>&gt;</code></h3><div class='docblock'><p>Reads an unsigned 16 bit integer from the underlying reader.</p>
</div><h3 id='method.read_i16' class='method stab '><code>fn <a href='#method.read_i16' class='fnname'>read_i16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>&gt;</code></h3><div class='docblock'><p>Reads a signed 16 bit integer from the underlying reader.</p>
</div><h3 id='method.read_u32' class='method stab '><code>fn <a href='#method.read_u32' class='fnname'>read_u32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>&gt;</code></h3><div class='docblock'><p>Reads an unsigned 32 bit integer from the underlying reader.</p>
</div><h3 id='method.read_i32' class='method stab '><code>fn <a href='#method.read_i32' class='fnname'>read_i32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>&gt;</code></h3><div class='docblock'><p>Reads a signed 32 bit integer from the underlying reader.</p>
</div><h3 id='method.read_u64' class='method stab '><code>fn <a href='#method.read_u64' class='fnname'>read_u64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt;</code></h3><div class='docblock'><p>Reads an unsigned 64 bit integer from the underlying reader.</p>
</div><h3 id='method.read_i64' class='method stab '><code>fn <a href='#method.read_i64' class='fnname'>read_i64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>&gt;</code></h3><div class='docblock'><p>Reads a signed 64 bit integer from the underlying reader.</p>
</div><h3 id='method.read_uint' class='method stab '><code>fn <a href='#method.read_uint' class='fnname'>read_uint</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>&gt;</code></h3><div class='docblock'><p>Reads an unsigned n-bytes integer from the underlying reader.</p>
</div><h3 id='method.read_int' class='method stab '><code>fn <a href='#method.read_int' class='fnname'>read_int</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>&gt;</code></h3><div class='docblock'><p>Reads a signed n-bytes integer from the underlying reader.</p>
</div><h3 id='method.read_f32' class='method stab '><code>fn <a href='#method.read_f32' class='fnname'>read_f32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>&gt;</code></h3><div class='docblock'><p>Reads a IEEE754 single-precision (4 bytes) floating point number from
the underlying reader.</p>
</div><h3 id='method.read_f64' class='method stab '><code>fn <a href='#method.read_f64' class='fnname'>read_f64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>&gt;</code></h3><div class='docblock'><p>Reads a IEEE754 double-precision (8 bytes) floating point number from
the underlying reader.</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
</ul><script type="text/javascript" async
src="../implementors/byteorder/trait.ReadBytesExt.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,174 +0,0 @@
<!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 `WriteBytesExt` trait in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, WriteBytesExt">
<title>byteorder::WriteBytesExt - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'WriteBytesExt', ty: 'trait', 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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>byteorder</a>::<wbr><a class='trait' href=''>WriteBytesExt</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-134' class='srclink' href='../src/byteorder/new.rs.html.html#231-345' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait WriteBytesExt: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html' title='std::io::Write'>Write</a> {
fn <a href='#method.write_u8' class='fnname'>write_u8</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_i8' class='fnname'>write_i8</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_u16' class='fnname'>write_u16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_i16' class='fnname'>write_i16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_u32' class='fnname'>write_u32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_i32' class='fnname'>write_i32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_u64' class='fnname'>write_u64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_i64' class='fnname'>write_i64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_uint' class='fnname'>write_uint</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_int' class='fnname'>write_int</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_f32' class='fnname'>write_f32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
fn <a href='#method.write_f64' class='fnname'>write_f64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt; { ... }
}</pre><div class='docblock'><p>Extends <code>Write</code> with methods for writing numbers. (For <code>std::io</code>.)</p>
<p>Most of the methods defined here have an unconstrained type parameter that
must be explicitly instantiated. Typically, it is instantiated with either
the <code>BigEndian</code> or <code>LittleEndian</code> types defined in this crate.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>Write unsigned 16 bit big-endian integers to a <code>Write</code>:</p>
<pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>byteorder</span>::{<span class='ident'>BigEndian</span>, <span class='ident'>WriteBytesExt</span>};
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>wtr</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[];
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'>&lt;</span><span class='ident'>BigEndian</span><span class='op'>&gt;</span>(<span class='number'>517</span>).<span class='ident'>unwrap</span>();
<span class='ident'>wtr</span>.<span class='ident'>write_u16</span>::<span class='op'>&lt;</span><span class='ident'>BigEndian</span><span class='op'>&gt;</span>(<span class='number'>768</span>).<span class='ident'>unwrap</span>();
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>wtr</span>, <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span>, <span class='number'>5</span>, <span class='number'>3</span>, <span class='number'>0</span>]);</pre>
</div>
<h2 id='provided-methods'>Provided Methods</h2>
<div class='methods'>
<h3 id='method.write_u8' class='method stab '><code>fn <a href='#method.write_u8' class='fnname'>write_u8</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes an unsigned 8 bit integer to the underlying writer.</p>
<p>Note that since this writes a single byte, no byte order conversions
are used. It is included for completeness.</p>
</div><h3 id='method.write_i8' class='method stab '><code>fn <a href='#method.write_i8' class='fnname'>write_i8</a>(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i8.html'>i8</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a signed 8 bit integer to the underlying writer.</p>
<p>Note that since this writes a single byte, no byte order conversions
are used. It is included for completeness.</p>
</div><h3 id='method.write_u16' class='method stab '><code>fn <a href='#method.write_u16' class='fnname'>write_u16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes an unsigned 16 bit integer to the underlying writer.</p>
</div><h3 id='method.write_i16' class='method stab '><code>fn <a href='#method.write_i16' class='fnname'>write_i16</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i16.html'>i16</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a signed 16 bit integer to the underlying writer.</p>
</div><h3 id='method.write_u32' class='method stab '><code>fn <a href='#method.write_u32' class='fnname'>write_u32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes an unsigned 32 bit integer to the underlying writer.</p>
</div><h3 id='method.write_i32' class='method stab '><code>fn <a href='#method.write_i32' class='fnname'>write_i32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i32.html'>i32</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a signed 32 bit integer to the underlying writer.</p>
</div><h3 id='method.write_u64' class='method stab '><code>fn <a href='#method.write_u64' class='fnname'>write_u64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes an unsigned 64 bit integer to the underlying writer.</p>
</div><h3 id='method.write_i64' class='method stab '><code>fn <a href='#method.write_i64' class='fnname'>write_i64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a signed 64 bit integer to the underlying writer.</p>
</div><h3 id='method.write_uint' class='method stab '><code>fn <a href='#method.write_uint' class='fnname'>write_uint</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes an unsigned n-bytes integer to the underlying writer.</p>
<p>If the given integer is not representable in the given number of bytes,
this method panics. If <code>nbytes &gt; 8</code>, this method panics.</p>
</div><h3 id='method.write_int' class='method stab '><code>fn <a href='#method.write_int' class='fnname'>write_int</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.i64.html'>i64</a>, nbytes: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a signed n-bytes integer to the underlying writer.</p>
<p>If the given integer is not representable in the given number of bytes,
this method panics. If <code>nbytes &gt; 8</code>, this method panics.</p>
</div><h3 id='method.write_f32' class='method stab '><code>fn <a href='#method.write_f32' class='fnname'>write_f32</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a IEEE754 single-precision (4 bytes) floating point number to
the underlying writer.</p>
</div><h3 id='method.write_f64' class='method stab '><code>fn <a href='#method.write_f64' class='fnname'>write_f64</a>&lt;T: <a class='trait' href='../byteorder/trait.ByteOrder.html' title='byteorder::ByteOrder'>ByteOrder</a>&gt;(&amp;mut self, n: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.f64.html'>f64</a>) -&gt; <a class='type' href='../byteorder/type.Result.html' title='byteorder::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>&gt;</code></h3><div class='docblock'><p>Writes a IEEE754 double-precision (8 bytes) floating point number to
the underlying writer.</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
</ul><script type="text/javascript" async
src="../implementors/byteorder/trait.WriteBytesExt.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,115 +0,0 @@
<!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 `NativeEndian` type in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, NativeEndian">
<title>byteorder::NativeEndian - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'NativeEndian', ty: 'type', 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 type">
<h1 class='fqn'><span class='in-band'><a href='index.html'>byteorder</a>::<wbr><a class='type' href=''>NativeEndian</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-262' class='srclink' href='../src/byteorder/lib.rs.html.html#275' title='goto source code'>[src]</a></span></h1>
<pre class='rust typedef'>type NativeEndian = <a class='enum' href='../byteorder/enum.LittleEndian.html' title='byteorder::LittleEndian'>LittleEndian</a>;</pre><div class='docblock'><p>Defines system native-endian serialization.</p>
<p>Note that this type has no value constructor. It is used purely at the
type level.</p>
</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

@ -1,112 +0,0 @@
<!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 `Result` type in crate `byteorder`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Result">
<title>byteorder::Result - 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'>byteorder</a></p><script>window.sidebarCurrent = {name: 'Result', ty: 'type', 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 type">
<h1 class='fqn'><span class='in-band'><a href='index.html'>byteorder</a>::<wbr><a class='type' href=''>Result</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-14' class='srclink' href='../src/byteorder/new.rs.html.html#9' title='goto source code'>[src]</a></span></h1>
<pre class='rust typedef'>type Result&lt;T&gt; = <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;T, <a class='enum' href='../byteorder/enum.Error.html' title='byteorder::Error'>Error</a>&gt;;</pre><div class='docblock'><p>A short-hand for <code>result::Result&lt;T, byteorder::Error&gt;</code>.</p>
</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 = "byteorder";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>

View file

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

View file

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

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