diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d330888..82aa2f9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,7 +19,7 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Install latest uses: actions-rs/toolchain@v1 with: @@ -31,7 +31,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Install latest uses: actions-rs/toolchain@v1 with: @@ -45,7 +45,7 @@ jobs: clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Install latest uses: actions-rs/toolchain@v1 with: @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: ref: refs/heads/${{ github.head_ref }} persist-credentials: false @@ -98,7 +98,7 @@ jobs: - test - clippy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -124,7 +124,7 @@ jobs: - test - clippy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/docs/.rustc_info.json b/docs/.rustc_info.json index 2421181..427b7e4 100644 --- a/docs/.rustc_info.json +++ b/docs/.rustc_info.json @@ -1 +1 @@ -{"rustc_fingerprint":13690027882614928059,"outputs":{"17598535894874457435":{"success":true,"status":"","code":0,"stdout":"rustc 1.60.0 (7737e0b5c 2022-04-04)\nbinary: rustc\ncommit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\ncommit-date: 2022-04-04\nhost: x86_64-unknown-linux-gnu\nrelease: 1.60.0\nLLVM version: 14.0.0\n","stderr":""},"2797684049618456168":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"},"5309432699494263626":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"931469667778813386":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file +{"rustc_fingerprint":1195818914113442546,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.91.1 (ed61e7d7e 2025-11-07)\nbinary: rustc\ncommit-hash: ed61e7d7e242494fb7057f2657300d9e77bb4fcb\ncommit-date: 2025-11-07\nhost: x86_64-unknown-linux-gnu\nrelease: 1.91.1\nLLVM version: 21.1.2\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/docs/.rustdoc_fingerprint.json b/docs/.rustdoc_fingerprint.json index 39f4ce4..45fa64e 100644 --- a/docs/.rustdoc_fingerprint.json +++ b/docs/.rustdoc_fingerprint.json @@ -1 +1 @@ -{"rustc_vv":"rustc 1.60.0 (7737e0b5c 2022-04-04)\nbinary: rustc\ncommit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\ncommit-date: 2022-04-04\nhost: x86_64-unknown-linux-gnu\nrelease: 1.60.0\nLLVM version: 14.0.0\n"} \ No newline at end of file +{"rustc_vv":"rustc 1.91.1 (ed61e7d7e 2025-11-07)\nbinary: rustc\ncommit-hash: ed61e7d7e242494fb7057f2657300d9e77bb4fcb\ncommit-date: 2025-11-07\nhost: x86_64-unknown-linux-gnu\nrelease: 1.91.1\nLLVM version: 21.1.2\n"} \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/build-script-build-script-build b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/build-script-build-script-build new file mode 100644 index 0000000..50ef9aa --- /dev/null +++ b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/build-script-build-script-build @@ -0,0 +1 @@ +cfb34e5ef1ed884e \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/build-script-build-script-build.json b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/build-script-build-script-build.json new file mode 100644 index 0000000..bc94539 --- /dev/null +++ b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"[]","declared_features":"[\"no_core\", \"old_macros\"]","target":12318548087768197662,"profile":2225463790103693989,"path":15706683084274424270,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/doc-comment-16a6f021619eaad7/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/dep-build-script-build-script-build b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/dep-build-script-build-script-build new file mode 100644 index 0000000..ec3cb8b Binary files /dev/null and b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/dep-build-script-build-script-build differ diff --git a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/invoked.timestamp b/docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/invoked.timestamp similarity index 100% rename from docs/debug/.fingerprint/doc-comment-ab83651059ca7977/invoked.timestamp rename to docs/debug/.fingerprint/doc-comment-16a6f021619eaad7/invoked.timestamp diff --git a/docs/debug/.fingerprint/doc-comment-1b06897278944c90/run-build-script-build-script-build b/docs/debug/.fingerprint/doc-comment-1b06897278944c90/run-build-script-build-script-build deleted file mode 100644 index 4322295..0000000 --- a/docs/debug/.fingerprint/doc-comment-1b06897278944c90/run-build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -4d6870b2301f6e96 \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-1b06897278944c90/run-build-script-build-script-build.json b/docs/debug/.fingerprint/doc-comment-1b06897278944c90/run-build-script-build-script-build.json deleted file mode 100644 index db005a1..0000000 --- a/docs/debug/.fingerprint/doc-comment-1b06897278944c90/run-build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":6064785002308032717,"features":"","target":0,"profile":0,"path":0,"deps":[[3604316984868239912,"build_script_build",false,11046353864905882589]],"local":[{"Precalculated":"0.3.3"}],"rustflags":[],"metadata":0,"config":0,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-87fa1f73bab2947c/run-build-script-build-script-build b/docs/debug/.fingerprint/doc-comment-87fa1f73bab2947c/run-build-script-build-script-build new file mode 100644 index 0000000..adfffa2 --- /dev/null +++ b/docs/debug/.fingerprint/doc-comment-87fa1f73bab2947c/run-build-script-build-script-build @@ -0,0 +1 @@ +86aea2787ce3c0c3 \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-87fa1f73bab2947c/run-build-script-build-script-build.json b/docs/debug/.fingerprint/doc-comment-87fa1f73bab2947c/run-build-script-build-script-build.json new file mode 100644 index 0000000..759b23e --- /dev/null +++ b/docs/debug/.fingerprint/doc-comment-87fa1f73bab2947c/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[4722856061491664201,"build_script_build",false,5659034552716145615]],"local":[{"Precalculated":"0.3.4"}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/build-script-build-script-build b/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/build-script-build-script-build deleted file mode 100644 index 1d7c0b0..0000000 --- a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/build-script-build-script-build +++ /dev/null @@ -1 +0,0 @@ -dd7bfa6450884c99 \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/build-script-build-script-build.json b/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/build-script-build-script-build.json deleted file mode 100644 index 88c66cc..0000000 --- a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/build-script-build-script-build.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":6064785002308032717,"features":"[]","target":2709041430195671023,"profile":12637318739757120569,"path":6418153070291560974,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/doc-comment-ab83651059ca7977/dep-build-script-build-script-build"}}],"rustflags":[],"metadata":2009847191618272438,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/dep-build-script-build-script-build b/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/dep-build-script-build-script-build deleted file mode 100644 index 1b1cb4d..0000000 Binary files a/docs/debug/.fingerprint/doc-comment-ab83651059ca7977/dep-build-script-build-script-build and /dev/null differ diff --git a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/dep-lib-doc_comment b/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/dep-lib-doc_comment deleted file mode 100644 index 1b1cb4d..0000000 Binary files a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/dep-lib-doc_comment and /dev/null differ diff --git a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/lib-doc_comment b/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/lib-doc_comment deleted file mode 100644 index 7df5a2d..0000000 --- a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/lib-doc_comment +++ /dev/null @@ -1 +0,0 @@ -29b51fa956307754 \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/lib-doc_comment.json b/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/lib-doc_comment.json deleted file mode 100644 index b8e3148..0000000 --- a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/lib-doc_comment.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":6064785002308032717,"features":"[]","target":3927201586341892043,"profile":3735503092003429423,"path":9436458717181895228,"deps":[[3604316984868239912,"build_script_build",false,10839635647139965005]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/doc-comment-bda2383960759dfa/dep-lib-doc_comment"}}],"rustflags":[],"metadata":2009847191618272438,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/dep-lib-doc_comment b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/dep-lib-doc_comment new file mode 100644 index 0000000..ec3cb8b Binary files /dev/null and b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/dep-lib-doc_comment differ diff --git a/docs/debug/.fingerprint/doc-comment-bda2383960759dfa/invoked.timestamp b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/invoked.timestamp similarity index 100% rename from docs/debug/.fingerprint/doc-comment-bda2383960759dfa/invoked.timestamp rename to docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/invoked.timestamp diff --git a/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/lib-doc_comment b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/lib-doc_comment new file mode 100644 index 0000000..becad7a --- /dev/null +++ b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/lib-doc_comment @@ -0,0 +1 @@ +eb903067ca5ee000 \ No newline at end of file diff --git a/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/lib-doc_comment.json b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/lib-doc_comment.json new file mode 100644 index 0000000..6173c77 --- /dev/null +++ b/docs/debug/.fingerprint/doc-comment-db0e63784ee930b3/lib-doc_comment.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"[]","declared_features":"[\"no_core\", \"old_macros\"]","target":919102347318276249,"profile":2241668132362809309,"path":5501992716707089722,"deps":[[4722856061491664201,"build_script_build",false,14105524156663770758]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/doc-comment-db0e63784ee930b3/dep-lib-doc_comment","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/dep-lib-paste b/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/dep-lib-paste deleted file mode 100644 index 1b1cb4d..0000000 Binary files a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/dep-lib-paste and /dev/null differ diff --git a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/lib-paste b/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/lib-paste deleted file mode 100644 index a8289e9..0000000 --- a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/lib-paste +++ /dev/null @@ -1 +0,0 @@ -5190ddf878d108e5 \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/lib-paste.json b/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/lib-paste.json deleted file mode 100644 index 8e08d12..0000000 --- a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/lib-paste.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":6064785002308032717,"features":"[]","target":11680813067107455742,"profile":12637318739757120569,"path":6270110714609130184,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/paste-20ebc6fd9e2b3438/dep-lib-paste"}}],"rustflags":[],"metadata":13015013502493569352,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-220e914fdb601d92/build-script-build-script-build b/docs/debug/.fingerprint/paste-220e914fdb601d92/build-script-build-script-build new file mode 100644 index 0000000..f5dc107 --- /dev/null +++ b/docs/debug/.fingerprint/paste-220e914fdb601d92/build-script-build-script-build @@ -0,0 +1 @@ +ccc98c366f3f219f \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-220e914fdb601d92/build-script-build-script-build.json b/docs/debug/.fingerprint/paste-220e914fdb601d92/build-script-build-script-build.json new file mode 100644 index 0000000..3f88d0c --- /dev/null +++ b/docs/debug/.fingerprint/paste-220e914fdb601d92/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"[]","declared_features":"[]","target":17883862002600103897,"profile":2225463790103693989,"path":7755287703248029529,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/paste-220e914fdb601d92/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-220e914fdb601d92/dep-build-script-build-script-build b/docs/debug/.fingerprint/paste-220e914fdb601d92/dep-build-script-build-script-build new file mode 100644 index 0000000..ec3cb8b Binary files /dev/null and b/docs/debug/.fingerprint/paste-220e914fdb601d92/dep-build-script-build-script-build differ diff --git a/docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/invoked.timestamp b/docs/debug/.fingerprint/paste-220e914fdb601d92/invoked.timestamp similarity index 100% rename from docs/debug/.fingerprint/paste-20ebc6fd9e2b3438/invoked.timestamp rename to docs/debug/.fingerprint/paste-220e914fdb601d92/invoked.timestamp diff --git a/docs/debug/.fingerprint/paste-45ae09343cbe966a/dep-lib-paste b/docs/debug/.fingerprint/paste-45ae09343cbe966a/dep-lib-paste new file mode 100644 index 0000000..ec3cb8b Binary files /dev/null and b/docs/debug/.fingerprint/paste-45ae09343cbe966a/dep-lib-paste differ diff --git a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/invoked.timestamp b/docs/debug/.fingerprint/paste-45ae09343cbe966a/invoked.timestamp similarity index 100% rename from docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/invoked.timestamp rename to docs/debug/.fingerprint/paste-45ae09343cbe966a/invoked.timestamp diff --git a/docs/debug/.fingerprint/paste-45ae09343cbe966a/lib-paste b/docs/debug/.fingerprint/paste-45ae09343cbe966a/lib-paste new file mode 100644 index 0000000..cd01095 --- /dev/null +++ b/docs/debug/.fingerprint/paste-45ae09343cbe966a/lib-paste @@ -0,0 +1 @@ +fae8371381ea471c \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-45ae09343cbe966a/lib-paste.json b/docs/debug/.fingerprint/paste-45ae09343cbe966a/lib-paste.json new file mode 100644 index 0000000..d863045 --- /dev/null +++ b/docs/debug/.fingerprint/paste-45ae09343cbe966a/lib-paste.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"[]","declared_features":"[]","target":13051495773103412369,"profile":2225463790103693989,"path":14344750008970667249,"deps":[[17605717126308396068,"build_script_build",false,18219006255417299869]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/paste-45ae09343cbe966a/dep-lib-paste","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-5e5c6d03f89d0c51/run-build-script-build-script-build b/docs/debug/.fingerprint/paste-5e5c6d03f89d0c51/run-build-script-build-script-build new file mode 100644 index 0000000..c7de2bb --- /dev/null +++ b/docs/debug/.fingerprint/paste-5e5c6d03f89d0c51/run-build-script-build-script-build @@ -0,0 +1 @@ +9d93c42ea9e9d6fc \ No newline at end of file diff --git a/docs/debug/.fingerprint/paste-5e5c6d03f89d0c51/run-build-script-build-script-build.json b/docs/debug/.fingerprint/paste-5e5c6d03f89d0c51/run-build-script-build-script-build.json new file mode 100644 index 0000000..e91c6f3 --- /dev/null +++ b/docs/debug/.fingerprint/paste-5e5c6d03f89d0c51/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[17605717126308396068,"build_script_build",false,11466515873151109580]],"local":[{"RerunIfChanged":{"output":"debug/build/paste-5e5c6d03f89d0c51/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/dep-lib-safe-transmute b/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/dep-lib-safe-transmute deleted file mode 100644 index 1b1cb4d..0000000 Binary files a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/dep-lib-safe-transmute and /dev/null differ diff --git a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/lib-safe-transmute b/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/lib-safe-transmute deleted file mode 100644 index 4ae79fd..0000000 --- a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/lib-safe-transmute +++ /dev/null @@ -1 +0,0 @@ -20d79b6bd636334e \ No newline at end of file diff --git a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/lib-safe-transmute.json b/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/lib-safe-transmute.json deleted file mode 100644 index 79adf8a..0000000 --- a/docs/debug/.fingerprint/safe-transmute-08de2e97acce0a0b/lib-safe-transmute.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":6064785002308032717,"features":"[\"alloc\", \"default\", \"std\"]","target":53543228631905795,"profile":3735503092003429423,"path":3574858853815873827,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/safe-transmute-08de2e97acce0a0b/dep-lib-safe-transmute"}}],"rustflags":[],"metadata":1405137643048346262,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/safe-transmute-323d820241496e09/dep-lib-safe_transmute b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/dep-lib-safe_transmute new file mode 100644 index 0000000..ec3cb8b Binary files /dev/null and b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/dep-lib-safe_transmute differ diff --git a/docs/debug/build/doc-comment-1b06897278944c90/invoked.timestamp b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/invoked.timestamp similarity index 100% rename from docs/debug/build/doc-comment-1b06897278944c90/invoked.timestamp rename to docs/debug/.fingerprint/safe-transmute-323d820241496e09/invoked.timestamp diff --git a/docs/debug/.fingerprint/safe-transmute-323d820241496e09/lib-safe_transmute b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/lib-safe_transmute new file mode 100644 index 0000000..a65e806 --- /dev/null +++ b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/lib-safe_transmute @@ -0,0 +1 @@ +6c7805651e976316 \ No newline at end of file diff --git a/docs/debug/.fingerprint/safe-transmute-323d820241496e09/lib-safe_transmute.json b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/lib-safe_transmute.json new file mode 100644 index 0000000..ba324bf --- /dev/null +++ b/docs/debug/.fingerprint/safe-transmute-323d820241496e09/lib-safe_transmute.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"const_generics\", \"default\", \"std\"]","target":18003846427605080374,"profile":2241668132362809309,"path":3381536200770839992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/safe-transmute-323d820241496e09/dep-lib-safe_transmute","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/ubits-5cb737df32df7532/doc-lib-ubits b/docs/debug/.fingerprint/ubits-5cb737df32df7532/doc-lib-ubits deleted file mode 100644 index c71b050..0000000 --- a/docs/debug/.fingerprint/ubits-5cb737df32df7532/doc-lib-ubits +++ /dev/null @@ -1 +0,0 @@ -0557fa1f5a0f2882 \ No newline at end of file diff --git a/docs/debug/.fingerprint/ubits-5cb737df32df7532/doc-lib-ubits.json b/docs/debug/.fingerprint/ubits-5cb737df32df7532/doc-lib-ubits.json deleted file mode 100644 index cf264ed..0000000 --- a/docs/debug/.fingerprint/ubits-5cb737df32df7532/doc-lib-ubits.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc":6064785002308032717,"features":"[]","target":2709273923335524737,"profile":13883289224548942237,"path":17523903030608720598,"deps":[[3604316984868239912,"doc_comment",false,6086386570177262889],[17122623820282837837,"safe_transmute",false,5634907853326898976],[17738545360000146463,"paste",false,16503671152000733265]],"local":[{"Precalculated":"1651601534.138340045s (docs/.rustc_info.json)"}],"rustflags":[],"metadata":3531897852417656932,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/doc-lib-ubits b/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/doc-lib-ubits new file mode 100644 index 0000000..4b1bc19 --- /dev/null +++ b/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/doc-lib-ubits @@ -0,0 +1 @@ +ddc28e5657fc0c23 \ No newline at end of file diff --git a/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/doc-lib-ubits.json b/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/doc-lib-ubits.json new file mode 100644 index 0000000..bd49cf2 --- /dev/null +++ b/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/doc-lib-ubits.json @@ -0,0 +1 @@ +{"rustc":4826714390000139368,"features":"[]","declared_features":"[]","target":4895282625946509461,"profile":4625255726265738819,"path":10763286916239946207,"deps":[[4722856061491664201,"doc_comment",false,63154618190827755],[17496040597546035961,"safe_transmute",false,1613299248328439916],[17605717126308396068,"paste",false,2037855196502550778]],"local":[{"Precalculated":"1763658268.946029039s (docs/debug/.cargo-lock)"}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/invoked.timestamp b/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/docs/debug/.fingerprint/ubits-d0f4991a0b8f298b/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/docs/debug/build/doc-comment-16a6f021619eaad7/build-script-build b/docs/debug/build/doc-comment-16a6f021619eaad7/build-script-build new file mode 100755 index 0000000..1d8cc6d Binary files /dev/null and b/docs/debug/build/doc-comment-16a6f021619eaad7/build-script-build differ diff --git a/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7 b/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7 new file mode 100755 index 0000000..1d8cc6d Binary files /dev/null and b/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7 differ diff --git a/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7.d b/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7.d new file mode 100644 index 0000000..63d16da --- /dev/null +++ b/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7.d @@ -0,0 +1,5 @@ +/home/runner/work/ubits/ubits/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7.d: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/doc-comment-0.3.4/build.rs + +/home/runner/work/ubits/ubits/docs/debug/build/doc-comment-16a6f021619eaad7/build_script_build-16a6f021619eaad7: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/doc-comment-0.3.4/build.rs + +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/doc-comment-0.3.4/build.rs: diff --git a/docs/debug/build/doc-comment-1b06897278944c90/root-output b/docs/debug/build/doc-comment-1b06897278944c90/root-output deleted file mode 100644 index be44112..0000000 --- a/docs/debug/build/doc-comment-1b06897278944c90/root-output +++ /dev/null @@ -1 +0,0 @@ -/home/runner/work/ubits/ubits/docs/debug/build/doc-comment-1b06897278944c90/out \ No newline at end of file diff --git a/docs/debug/build/doc-comment-87fa1f73bab2947c/invoked.timestamp b/docs/debug/build/doc-comment-87fa1f73bab2947c/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/docs/debug/build/doc-comment-87fa1f73bab2947c/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/docs/debug/build/doc-comment-1b06897278944c90/output b/docs/debug/build/doc-comment-87fa1f73bab2947c/output similarity index 100% rename from docs/debug/build/doc-comment-1b06897278944c90/output rename to docs/debug/build/doc-comment-87fa1f73bab2947c/output diff --git a/docs/debug/build/doc-comment-87fa1f73bab2947c/root-output b/docs/debug/build/doc-comment-87fa1f73bab2947c/root-output new file mode 100644 index 0000000..51f852f --- /dev/null +++ b/docs/debug/build/doc-comment-87fa1f73bab2947c/root-output @@ -0,0 +1 @@ +/home/runner/work/ubits/ubits/docs/debug/build/doc-comment-87fa1f73bab2947c/out \ No newline at end of file diff --git a/docs/debug/build/doc-comment-1b06897278944c90/stderr b/docs/debug/build/doc-comment-87fa1f73bab2947c/stderr similarity index 100% rename from docs/debug/build/doc-comment-1b06897278944c90/stderr rename to docs/debug/build/doc-comment-87fa1f73bab2947c/stderr diff --git a/docs/debug/build/doc-comment-ab83651059ca7977/build-script-build b/docs/debug/build/doc-comment-ab83651059ca7977/build-script-build deleted file mode 100755 index ff6382a..0000000 Binary files a/docs/debug/build/doc-comment-ab83651059ca7977/build-script-build and /dev/null differ diff --git a/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977 b/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977 deleted file mode 100755 index ff6382a..0000000 Binary files a/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977 and /dev/null differ diff --git a/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977.d b/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977.d deleted file mode 100644 index db88898..0000000 --- a/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977.d +++ /dev/null @@ -1,5 +0,0 @@ -/home/runner/work/ubits/ubits/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/doc-comment-0.3.3/build.rs - -/home/runner/work/ubits/ubits/docs/debug/build/doc-comment-ab83651059ca7977/build_script_build-ab83651059ca7977.d: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/doc-comment-0.3.3/build.rs - -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/doc-comment-0.3.3/build.rs: diff --git a/docs/debug/build/paste-220e914fdb601d92/build-script-build b/docs/debug/build/paste-220e914fdb601d92/build-script-build new file mode 100755 index 0000000..118bc7f Binary files /dev/null and b/docs/debug/build/paste-220e914fdb601d92/build-script-build differ diff --git a/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92 b/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92 new file mode 100755 index 0000000..118bc7f Binary files /dev/null and b/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92 differ diff --git a/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92.d b/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92.d new file mode 100644 index 0000000..0f90223 --- /dev/null +++ b/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92.d @@ -0,0 +1,5 @@ +/home/runner/work/ubits/ubits/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92.d: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/build.rs + +/home/runner/work/ubits/ubits/docs/debug/build/paste-220e914fdb601d92/build_script_build-220e914fdb601d92: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/build.rs + +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/build.rs: diff --git a/docs/debug/build/paste-5e5c6d03f89d0c51/invoked.timestamp b/docs/debug/build/paste-5e5c6d03f89d0c51/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/docs/debug/build/paste-5e5c6d03f89d0c51/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/docs/debug/build/paste-5e5c6d03f89d0c51/output b/docs/debug/build/paste-5e5c6d03f89d0c51/output new file mode 100644 index 0000000..738185c --- /dev/null +++ b/docs/debug/build/paste-5e5c6d03f89d0c51/output @@ -0,0 +1,3 @@ +cargo:rerun-if-changed=build.rs +cargo:rustc-check-cfg=cfg(no_literal_fromstr) +cargo:rustc-check-cfg=cfg(feature, values("protocol_feature_paste")) diff --git a/docs/debug/build/paste-5e5c6d03f89d0c51/root-output b/docs/debug/build/paste-5e5c6d03f89d0c51/root-output new file mode 100644 index 0000000..5f65ed9 --- /dev/null +++ b/docs/debug/build/paste-5e5c6d03f89d0c51/root-output @@ -0,0 +1 @@ +/home/runner/work/ubits/ubits/docs/debug/build/paste-5e5c6d03f89d0c51/out \ No newline at end of file diff --git a/docs/debug/build/paste-5e5c6d03f89d0c51/stderr b/docs/debug/build/paste-5e5c6d03f89d0c51/stderr new file mode 100644 index 0000000..e69de29 diff --git a/docs/debug/deps/doc_comment-bda2383960759dfa.d b/docs/debug/deps/doc_comment-bda2383960759dfa.d deleted file mode 100644 index 18aff55..0000000 --- a/docs/debug/deps/doc_comment-bda2383960759dfa.d +++ /dev/null @@ -1,5 +0,0 @@ -/home/runner/work/ubits/ubits/docs/debug/deps/doc_comment-bda2383960759dfa.rmeta: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/doc-comment-0.3.3/src/lib.rs - -/home/runner/work/ubits/ubits/docs/debug/deps/doc_comment-bda2383960759dfa.d: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/doc-comment-0.3.3/src/lib.rs - -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/doc-comment-0.3.3/src/lib.rs: diff --git a/docs/debug/deps/doc_comment-db0e63784ee930b3.d b/docs/debug/deps/doc_comment-db0e63784ee930b3.d new file mode 100644 index 0000000..b7258d5 --- /dev/null +++ b/docs/debug/deps/doc_comment-db0e63784ee930b3.d @@ -0,0 +1,5 @@ +/home/runner/work/ubits/ubits/docs/debug/deps/doc_comment-db0e63784ee930b3.d: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/doc-comment-0.3.4/src/lib.rs + +/home/runner/work/ubits/ubits/docs/debug/deps/libdoc_comment-db0e63784ee930b3.rmeta: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/doc-comment-0.3.4/src/lib.rs + +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/doc-comment-0.3.4/src/lib.rs: diff --git a/docs/debug/deps/libdoc_comment-bda2383960759dfa.rmeta b/docs/debug/deps/libdoc_comment-bda2383960759dfa.rmeta deleted file mode 100644 index 8db8898..0000000 Binary files a/docs/debug/deps/libdoc_comment-bda2383960759dfa.rmeta and /dev/null differ diff --git a/docs/debug/deps/libdoc_comment-db0e63784ee930b3.rmeta b/docs/debug/deps/libdoc_comment-db0e63784ee930b3.rmeta new file mode 100644 index 0000000..826f3b7 Binary files /dev/null and b/docs/debug/deps/libdoc_comment-db0e63784ee930b3.rmeta differ diff --git a/docs/debug/deps/libpaste-20ebc6fd9e2b3438.so b/docs/debug/deps/libpaste-20ebc6fd9e2b3438.so deleted file mode 100755 index 9174acb..0000000 Binary files a/docs/debug/deps/libpaste-20ebc6fd9e2b3438.so and /dev/null differ diff --git a/docs/debug/deps/libpaste-45ae09343cbe966a.so b/docs/debug/deps/libpaste-45ae09343cbe966a.so new file mode 100755 index 0000000..841f36a Binary files /dev/null and b/docs/debug/deps/libpaste-45ae09343cbe966a.so differ diff --git a/docs/debug/deps/libsafe_transmute-08de2e97acce0a0b.rmeta b/docs/debug/deps/libsafe_transmute-08de2e97acce0a0b.rmeta deleted file mode 100644 index 7d977c9..0000000 Binary files a/docs/debug/deps/libsafe_transmute-08de2e97acce0a0b.rmeta and /dev/null differ diff --git a/docs/debug/deps/libsafe_transmute-323d820241496e09.rmeta b/docs/debug/deps/libsafe_transmute-323d820241496e09.rmeta new file mode 100644 index 0000000..52cea89 Binary files /dev/null and b/docs/debug/deps/libsafe_transmute-323d820241496e09.rmeta differ diff --git a/docs/debug/deps/paste-20ebc6fd9e2b3438.d b/docs/debug/deps/paste-20ebc6fd9e2b3438.d deleted file mode 100644 index a09ff59..0000000 --- a/docs/debug/deps/paste-20ebc6fd9e2b3438.d +++ /dev/null @@ -1,8 +0,0 @@ -/home/runner/work/ubits/ubits/docs/debug/deps/libpaste-20ebc6fd9e2b3438.so: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/lib.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/attr.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/error.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/segment.rs - -/home/runner/work/ubits/ubits/docs/debug/deps/paste-20ebc6fd9e2b3438.d: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/lib.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/attr.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/error.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/segment.rs - -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/lib.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/attr.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/error.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/paste-1.0.7/src/segment.rs: diff --git a/docs/debug/deps/paste-45ae09343cbe966a.d b/docs/debug/deps/paste-45ae09343cbe966a.d new file mode 100644 index 0000000..492c663 --- /dev/null +++ b/docs/debug/deps/paste-45ae09343cbe966a.d @@ -0,0 +1,8 @@ +/home/runner/work/ubits/ubits/docs/debug/deps/paste-45ae09343cbe966a.d: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/lib.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/attr.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/error.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/segment.rs + +/home/runner/work/ubits/ubits/docs/debug/deps/libpaste-45ae09343cbe966a.so: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/lib.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/attr.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/error.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/segment.rs + +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/lib.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/attr.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/error.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/paste-1.0.15/src/segment.rs: diff --git a/docs/debug/deps/safe_transmute-08de2e97acce0a0b.d b/docs/debug/deps/safe_transmute-08de2e97acce0a0b.d deleted file mode 100644 index 5850e3c..0000000 --- a/docs/debug/deps/safe_transmute-08de2e97acce0a0b.d +++ /dev/null @@ -1,16 +0,0 @@ -/home/runner/work/ubits/ubits/docs/debug/deps/safe_transmute-08de2e97acce0a0b.rmeta: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/lib.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/full.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/base.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/bool.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/util.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/align.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/error.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/guard.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/trivial.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/to_bytes.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/migration/mod.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/migration/v0_11.rs - -/home/runner/work/ubits/ubits/docs/debug/deps/safe_transmute-08de2e97acce0a0b.d: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/lib.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/full.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/base.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/bool.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/util.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/align.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/error.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/guard.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/trivial.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/to_bytes.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/migration/mod.rs /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/migration/v0_11.rs - -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/lib.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/full.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/base.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/bool.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/util.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/align.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/error.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/guard.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/trivial.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/to_bytes.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/migration/mod.rs: -/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/safe-transmute-0.11.2/src/migration/v0_11.rs: diff --git a/docs/debug/deps/safe_transmute-323d820241496e09.d b/docs/debug/deps/safe_transmute-323d820241496e09.d new file mode 100644 index 0000000..99f3a6a --- /dev/null +++ b/docs/debug/deps/safe_transmute-323d820241496e09.d @@ -0,0 +1,16 @@ +/home/runner/work/ubits/ubits/docs/debug/deps/safe_transmute-323d820241496e09.d: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/lib.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/full.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/base.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/bool.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/util.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/align.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/error.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/guard.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/trivial.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/to_bytes.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/migration/mod.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/migration/v0_11.rs + +/home/runner/work/ubits/ubits/docs/debug/deps/libsafe_transmute-323d820241496e09.rmeta: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/lib.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/full.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/base.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/bool.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/util.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/align.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/error.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/guard.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/trivial.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/to_bytes.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/migration/mod.rs /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/migration/v0_11.rs + +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/lib.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/full.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/base.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/bool.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/util.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/align.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/error.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/guard.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/trivial.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/to_bytes.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/migration/mod.rs: +/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/safe-transmute-0.11.3/src/migration/v0_11.rs: diff --git a/docs/doc/.lock b/docs/doc/.lock old mode 100755 new mode 100644 diff --git a/docs/doc/FiraSans-Medium.woff b/docs/doc/FiraSans-Medium.woff deleted file mode 100644 index 7d742c5..0000000 Binary files a/docs/doc/FiraSans-Medium.woff and /dev/null differ diff --git a/docs/doc/FiraSans-Regular.woff b/docs/doc/FiraSans-Regular.woff deleted file mode 100644 index d8e0363..0000000 Binary files a/docs/doc/FiraSans-Regular.woff and /dev/null differ diff --git a/docs/doc/NanumBarunGothic.ttf.woff b/docs/doc/NanumBarunGothic.ttf.woff deleted file mode 100644 index fb063e8..0000000 Binary files a/docs/doc/NanumBarunGothic.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceCodePro-It.ttf.woff b/docs/doc/SourceCodePro-It.ttf.woff deleted file mode 100644 index 8d68f2f..0000000 Binary files a/docs/doc/SourceCodePro-It.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceCodePro-Regular.ttf.woff b/docs/doc/SourceCodePro-Regular.ttf.woff deleted file mode 100644 index 7be076e..0000000 Binary files a/docs/doc/SourceCodePro-Regular.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceCodePro-Semibold.ttf.woff b/docs/doc/SourceCodePro-Semibold.ttf.woff deleted file mode 100644 index 61bc67b..0000000 Binary files a/docs/doc/SourceCodePro-Semibold.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceSerif4-Bold.ttf.woff b/docs/doc/SourceSerif4-Bold.ttf.woff deleted file mode 100644 index 8ad4188..0000000 Binary files a/docs/doc/SourceSerif4-Bold.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceSerif4-Bold.ttf.woff2 b/docs/doc/SourceSerif4-Bold.ttf.woff2 deleted file mode 100644 index db57d21..0000000 Binary files a/docs/doc/SourceSerif4-Bold.ttf.woff2 and /dev/null differ diff --git a/docs/doc/SourceSerif4-It.ttf.woff b/docs/doc/SourceSerif4-It.ttf.woff deleted file mode 100644 index 2a34b5c..0000000 Binary files a/docs/doc/SourceSerif4-It.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceSerif4-It.ttf.woff2 b/docs/doc/SourceSerif4-It.ttf.woff2 deleted file mode 100644 index 1cbc021..0000000 Binary files a/docs/doc/SourceSerif4-It.ttf.woff2 and /dev/null differ diff --git a/docs/doc/SourceSerif4-Regular.ttf.woff b/docs/doc/SourceSerif4-Regular.ttf.woff deleted file mode 100644 index 45a5521..0000000 Binary files a/docs/doc/SourceSerif4-Regular.ttf.woff and /dev/null differ diff --git a/docs/doc/SourceSerif4-Regular.ttf.woff2 b/docs/doc/SourceSerif4-Regular.ttf.woff2 deleted file mode 100644 index 2db73fe..0000000 Binary files a/docs/doc/SourceSerif4-Regular.ttf.woff2 and /dev/null differ diff --git a/docs/doc/ayu.css b/docs/doc/ayu.css deleted file mode 100644 index 50d893e..0000000 --- a/docs/doc/ayu.css +++ /dev/null @@ -1 +0,0 @@ - body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#14191f;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 #24292f;}.sidebar{scrollbar-color:#5c6773 #24292f;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current,.sidebar a:hover{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#14191f;}.sidebar-elems .location{color:#ff7733;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#5c6773;}.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}.sidebar a{color:#53b1db;}.sidebar a.current.type{color:#53b1db;}.sidebar a.current.associatedtype{color:#53b1db;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#c5c5c5;}.sidebar h2 a,.sidebar h3 a{color:white;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search,.search-input{background-color:#141920;border-color:#424c57;color:#c5c5c5;}.search-input{color:#ffffff;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help span.bottom,#help span.top{border-color:#5c6773;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.typedef,.content a.typedef,.block a.current.typedef{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-associatedtype:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}.sidebar a.current.enum{}.sidebar a.current.struct{}.sidebar a.current.foreigntype{}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{}.sidebar a.current.union{}.sidebar a.current.constant .sidebar a.current.static{}.sidebar a.current.primitive{}.sidebar a.current.externcrate .sidebar a.current.mod{}.sidebar a.current.trait{}.sidebar a.current.traitalias{}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{}.sidebar a.current.keyword{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow:inset 0 -1px 0 #5c6773;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#616161;}.toggle-line:hover .toggle-line-inner{background:#898989;} \ No newline at end of file diff --git a/docs/doc/brush.svg b/docs/doc/brush.svg deleted file mode 100644 index ea266e8..0000000 --- a/docs/doc/brush.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/doc/clipboard.svg b/docs/doc/clipboard.svg deleted file mode 100644 index 8adbd99..0000000 --- a/docs/doc/clipboard.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/doc/crates.js b/docs/doc/crates.js index b86dfd5..b6797bc 100644 --- a/docs/doc/crates.js +++ b/docs/doc/crates.js @@ -1 +1,2 @@ -window.ALL_CRATES = ["ubits"]; \ No newline at end of file +window.ALL_CRATES = ["ubits"]; +//{"start":21,"fragment_lengths":[7]} \ No newline at end of file diff --git a/docs/doc/dark.css b/docs/doc/dark.css deleted file mode 100644 index a31f453..0000000 --- a/docs/doc/dark.css +++ /dev/null @@ -1 +0,0 @@ -body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#505050;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) #5a5a5a;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current,.sidebar a:hover{background:#444;}.source .sidebar{background-color:#565656;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#D2991D;}.sidebar a{color:#fdbf35;}.sidebar a.current.enum{color:#12ece2;}.sidebar a.current.struct{color:#12ece2;}.sidebar a.current.type{color:#12ece2;}.sidebar a.current.associatedtype{color:#fdbf35;}.sidebar a.current.foreigntype{color:#12ece2;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#0be900;}.sidebar a.current.union{color:#12ece2;}.sidebar a.current.constant .sidebar a.current.static{color:#fdbf35;}.sidebar a.current.primitive{color:#12ece2;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#fdbf35;}.sidebar a.current.trait{color:#cca7ff;}.sidebar a.current.traitalias{color:#cca7ff;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#32d479;}.sidebar a.current.keyword{color:#fdbf35;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#ddd;}.search-results a{color:#ddd;}a.test-arrow{color:#dedede;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search,.search-input{color:#111;background-color:#f0f0f0;border-color:#000;}.search-input{border-color:#e0e0e0;}.search-input:focus{border-color:#008dfd;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#616161;}.toggle-line:hover .toggle-line-inner{background:#898989;} \ No newline at end of file diff --git a/docs/doc/down-arrow.svg b/docs/doc/down-arrow.svg deleted file mode 100644 index 35437e7..0000000 --- a/docs/doc/down-arrow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/doc/favicon-16x16.png b/docs/doc/favicon-16x16.png deleted file mode 100644 index ea4b45c..0000000 Binary files a/docs/doc/favicon-16x16.png and /dev/null differ diff --git a/docs/doc/favicon-32x32.png b/docs/doc/favicon-32x32.png deleted file mode 100644 index 69b8613..0000000 Binary files a/docs/doc/favicon-32x32.png and /dev/null differ diff --git a/docs/doc/help.html b/docs/doc/help.html new file mode 100644 index 0000000..e3d3af6 --- /dev/null +++ b/docs/doc/help.html @@ -0,0 +1 @@ +Help

All

Rustdoc help

Back
\ No newline at end of file diff --git a/docs/doc/implementors/core/clone/trait.Clone.js b/docs/doc/implementors/core/clone/trait.Clone.js deleted file mode 100644 index c56b1a6..0000000 --- a/docs/doc/implementors/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Clone for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Clone for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Clone for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/cmp/trait.PartialEq.js b/docs/doc/implementors/core/cmp/trait.PartialEq.js deleted file mode 100644 index 1c14ce1..0000000 --- a/docs/doc/implementors/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl PartialEq<ExampleFlags> for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl PartialEq<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl PartialEq<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/cmp/trait.PartialOrd.js b/docs/doc/implementors/core/cmp/trait.PartialOrd.js deleted file mode 100644 index 1fd1678..0000000 --- a/docs/doc/implementors/core/cmp/trait.PartialOrd.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl PartialOrd<ExampleFlags> for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl PartialOrd<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl PartialOrd<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/convert/trait.From.js b/docs/doc/implementors/core/convert/trait.From.js deleted file mode 100644 index 443804e..0000000 --- a/docs/doc/implementors/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl From<u8> for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl From<ExampleFlags> for u8","synthetic":false,"types":[]},{"text":"impl From<u8> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl From<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl From<u8> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/default/trait.Default.js b/docs/doc/implementors/core/default/trait.Default.js deleted file mode 100644 index df23594..0000000 --- a/docs/doc/implementors/core/default/trait.Default.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Default for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Default for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/fmt/trait.Binary.js b/docs/doc/implementors/core/fmt/trait.Binary.js deleted file mode 100644 index 32b2168..0000000 --- a/docs/doc/implementors/core/fmt/trait.Binary.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Binary for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Binary for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/fmt/trait.Debug.js b/docs/doc/implementors/core/fmt/trait.Debug.js deleted file mode 100644 index 7ecf619..0000000 --- a/docs/doc/implementors/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Debug for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Debug for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Debug for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/marker/trait.Copy.js b/docs/doc/implementors/core/marker/trait.Copy.js deleted file mode 100644 index 715af76..0000000 --- a/docs/doc/implementors/core/marker/trait.Copy.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Copy for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Copy for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Copy for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/marker/trait.Freeze.js b/docs/doc/implementors/core/marker/trait.Freeze.js deleted file mode 100644 index 886be32..0000000 --- a/docs/doc/implementors/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Freeze for ExampleFlags","synthetic":true,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Freeze for ExampleField","synthetic":true,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Freeze for ExampleField","synthetic":true,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/marker/trait.Send.js b/docs/doc/implementors/core/marker/trait.Send.js deleted file mode 100644 index 91695d6..0000000 --- a/docs/doc/implementors/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Send for ExampleFlags","synthetic":true,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Send for ExampleField","synthetic":true,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Send for ExampleField","synthetic":true,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/marker/trait.StructuralPartialEq.js b/docs/doc/implementors/core/marker/trait.StructuralPartialEq.js deleted file mode 100644 index a61fb17..0000000 --- a/docs/doc/implementors/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl StructuralPartialEq for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl StructuralPartialEq for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl StructuralPartialEq for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/marker/trait.Sync.js b/docs/doc/implementors/core/marker/trait.Sync.js deleted file mode 100644 index 01f6552..0000000 --- a/docs/doc/implementors/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Sync for ExampleFlags","synthetic":true,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Sync for ExampleField","synthetic":true,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Sync for ExampleField","synthetic":true,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/marker/trait.Unpin.js b/docs/doc/implementors/core/marker/trait.Unpin.js deleted file mode 100644 index a9f3542..0000000 --- a/docs/doc/implementors/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl Unpin for ExampleFlags","synthetic":true,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl Unpin for ExampleField","synthetic":true,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl Unpin for ExampleField","synthetic":true,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/ops/bit/trait.BitAnd.js b/docs/doc/implementors/core/ops/bit/trait.BitAnd.js deleted file mode 100644 index 2d5b2dd..0000000 --- a/docs/doc/implementors/core/ops/bit/trait.BitAnd.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl BitAnd<ExampleFlags> for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl BitAnd<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitAnd<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitAnd<ExampleFlags> for &ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitAnd<ExampleFlags> for &mut ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitAnd<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/ops/bit/trait.BitAndAssign.js b/docs/doc/implementors/core/ops/bit/trait.BitAndAssign.js deleted file mode 100644 index 5b0502f..0000000 --- a/docs/doc/implementors/core/ops/bit/trait.BitAndAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl BitAndAssign<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitAndAssign<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitAndAssign<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/ops/bit/trait.BitOr.js b/docs/doc/implementors/core/ops/bit/trait.BitOr.js deleted file mode 100644 index 2b50dd0..0000000 --- a/docs/doc/implementors/core/ops/bit/trait.BitOr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl BitOr<ExampleFlags> for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl BitOr<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitOr<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitOr<ExampleFlags> for &ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitOr<ExampleFlags> for &mut ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitOr<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/ops/bit/trait.BitOrAssign.js b/docs/doc/implementors/core/ops/bit/trait.BitOrAssign.js deleted file mode 100644 index ecf4773..0000000 --- a/docs/doc/implementors/core/ops/bit/trait.BitOrAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl BitOrAssign<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitOrAssign<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitOrAssign<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/ops/bit/trait.BitXor.js b/docs/doc/implementors/core/ops/bit/trait.BitXor.js deleted file mode 100644 index 4507096..0000000 --- a/docs/doc/implementors/core/ops/bit/trait.BitXor.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl BitXor<ExampleFlags> for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl BitXor<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitXor<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitXor<ExampleFlags> for &ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitXor<ExampleFlags> for &mut ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitXor<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/ops/bit/trait.BitXorAssign.js b/docs/doc/implementors/core/ops/bit/trait.BitXorAssign.js deleted file mode 100644 index 3872ad5..0000000 --- a/docs/doc/implementors/core/ops/bit/trait.BitXorAssign.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl BitXorAssign<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitXorAssign<ExampleFlags> for ExampleField","synthetic":false,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl BitXorAssign<ExampleField> for ExampleField","synthetic":false,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/docs/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index 85dac6e..0000000 --- a/docs/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl RefUnwindSafe for ExampleFlags","synthetic":true,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl RefUnwindSafe for ExampleField","synthetic":true,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl RefUnwindSafe for ExampleField","synthetic":true,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/docs/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index 429c852..0000000 --- a/docs/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl UnwindSafe for ExampleFlags","synthetic":true,"types":["ubits::examples::full_example::ExampleFlags"]},{"text":"impl UnwindSafe for ExampleField","synthetic":true,"types":["ubits::examples::full_example::ExampleField"]},{"text":"impl UnwindSafe for ExampleField","synthetic":true,"types":["ubits::examples::flagless_example::ExampleField"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/implementors/safe_transmute/trivial/trait.TriviallyTransmutable.js b/docs/doc/implementors/safe_transmute/trivial/trait.TriviallyTransmutable.js deleted file mode 100644 index d300402..0000000 --- a/docs/doc/implementors/safe_transmute/trivial/trait.TriviallyTransmutable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ubits"] = [{"text":"impl TriviallyTransmutable for ExampleFlags","synthetic":false,"types":["ubits::examples::full_example::ExampleFlags"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/doc/light.css b/docs/doc/light.css deleted file mode 100644 index 289f10c..0000000 --- a/docs/doc/light.css +++ /dev/null @@ -1 +0,0 @@ - body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#DDDDDD;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#F5F5F5;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.rust-logo{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current,.sidebar a:hover{background-color:#fff;}.source .sidebar{background-color:#f1f1f1;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#ddd;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}.sidebar a{color:#356da4;}.sidebar a.current.enum{color:#a63283;}.sidebar a.current.struct{color:#a63283;}.sidebar a.current.type{color:#a63283;}.sidebar a.current.associatedtype{color:#356da4;}.sidebar a.current.foreigntype{color:#356da4;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#067901;}.sidebar a.current.union{color:#a63283;}.sidebar a.current.constant .sidebar a.current.static{color:#356da4;}.sidebar a.current.primitive{color:#a63283;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#356da4;}.sidebar a.current.trait{color:#6849c3;}.sidebar a.current.traitalias{color:#4b349e;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#a67736;}.sidebar a.current.keyword{color:#356da4;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#000;}.search-results a{color:initial;}a.test-arrow{color:#f5f5f5;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search,.search-input{color:#555;background-color:white;border-color:#e0e0e0;}.search-input:focus{border-color:#66afe9;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgb(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F5F5F5;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F5F5F5;border-right-color:#000;}#sidebar-filler{background-color:#F5F5F5;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F5F5F5;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F5F5F5;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/docs/doc/main.js b/docs/doc/main.js deleted file mode 100644 index 44f37e5..0000000 --- a/docs/doc/main.js +++ /dev/null @@ -1,8 +0,0 @@ -if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVar(name){var el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}(function(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");window.searchJS=resourcePath("search",".js");window.searchIndexJS=resourcePath("search-index",".js");var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,};var mobileLocationTitle=document.querySelector(".mobile-topbar h2.location");var locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";var MAIN_ID="main-content";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){if(!document.location.href.startsWith("file:///")){return}var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=getVar("themes").split(",");removeClass(themeChoices.parentElement,"hidden");function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!=''){loadSearch()}var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},};function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById(MAIN_ID);var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown");handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i${longty}`;div.appendChild(h3);var ul=document.createElement("ul");for(var i=0,len=filtered.length;i .in-band > .trait").textContent;var baseIdName="impl-"+traitName+"-";var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;i summary:not(.hideme)"),function(el){el.addEventListener("click",function(e){if(e.target.tagName!="SUMMARY"&&e.target.tagName!="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),function(e){e.onclick=function(){this.getElementsByClassName('notable-traits-tooltiptext')[0].classList.toggle("force-tooltip")}});var sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){addClass(sidebar,"shown")}else{removeClass(sidebar,"shown")}})}var buildHelperPopup=function(){var popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",function(ev){if(ev.target===popup){displayHelp(false,ev)}});var book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ - the rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"
"+x[0].split(" ").map(function(y,index){return(index&1)===0?""+y+"":" "+y+" "}).join("")+"
"+x[1]+"
"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ - str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(function(x){return"

"+x+"

"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,document.querySelector("main"));buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value=path.join('::');el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/docs/doc/noscript.css b/docs/doc/noscript.css deleted file mode 100644 index 8ad8864..0000000 --- a/docs/doc/noscript.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}.sub{display:none;}#theme-picker{display:none;} \ No newline at end of file diff --git a/docs/doc/rustdoc.css b/docs/doc/rustdoc.css deleted file mode 100644 index 07de4cb..0000000 --- a/docs/doc/rustdoc.css +++ /dev/null @@ -1 +0,0 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2"),url("SourceSerif4-Regular.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2"),url("SourceSerif4-It.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2"),url("SourceSerif4-Bold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2"),url("SourceCodePro-Regular.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2"),url("SourceCodePro-It.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),url("SourceCodePro-Semibold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2"),url("NanumBarunGothic.ttf.woff") format("woff");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:20px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}h1.fqn{margin:0;padding:0;}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}.main-heading a:hover{text-decoration:underline;}#toggle-all-docs{text-decoration:none;}h2,.top-doc h3,.top-doc h4{border-bottom:1px solid;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;border-bottom-style:none;margin:0;padding:0;margin-top:0.6em;margin-bottom:0.4em;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,.out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main-content>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.docblock.item-decl{margin-left:0;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{max-width:none;overflow:visible;margin-left:0px;}nav.sub{position:relative;font-size:1rem;text-transform:uppercase;}.sub-container{display:flex;flex-direction:row;flex-wrap:nowrap;}.sub-logo-container{display:none;margin-right:20px;}.source .sub-logo-container{display:block;}.source .sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar{font-size:0.875rem;width:250px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.sidebar-elems,.sidebar>.location{padding-left:24px;}.sidebar .location{overflow-wrap:anywhere;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.source .sidebar>*:not(:first-child){transition:opacity 0.5s;opacity:0;visibility:hidden;}.source .sidebar.expanded{overflow-y:auto;}.source .sidebar.expanded>*{opacity:1;visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.block{padding:0;}.block ul,.block li{padding:0;margin:0;list-style:none;}.block a,h2.location a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{border-bottom:none;font-weight:500;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;font-weight:500;padding:0;margin:0;}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.example-wrap>pre.rust a:hover{text-decoration:underline;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre.line-numbers{width:auto;overflow-x:visible;}.rustdoc .example-wrap>pre{margin:0;}#search{position:relative;}.search-loading{text-align:center;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;font-size:1.125rem;font-weight:normal;float:right;}.method>.code-header,.trait-impl>.code-header{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;overflow-wrap:break-word;overflow-wrap:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}#main-content{position:relative;}#main-content>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.125rem;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1rem;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.875rem;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:0.875rem;}.content .item-info{position:relative;margin-left:24px;}.sub-variant>div>.item-info{margin-top:initial;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;margin-bottom:25px;}.source nav.sub{margin-left:32px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.block a.current.crate{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-container{position:relative;display:flex;height:34px;}.search-container>*{height:100%;}.search-results-title{display:inline;}#search-settings{font-size:1.5rem;font-weight:500;margin-bottom:20px;}#crate-search{min-width:115px;margin-top:5px;margin-left:0.25em;padding-left:0.3125em;padding-right:23px;border:0;border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");}.search-container{margin-top:4px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:1px solid;border-radius:2px;padding:8px;font-size:1rem;transition:border-color 300ms ease;width:100%;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{text-align:center;display:block;margin:10px 0;border-bottom:1px solid;padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.item-info .stab{display:inline-block;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.25rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.rightside{float:right;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.code-attribute{font-weight:300;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1rem;font-weight:400;border-bottom:none;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:1.25rem;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;cursor:pointer;font-weight:bold;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;z-index:1;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:-38px;top:4px;}.theme-picker button{outline:none;}#settings-menu,#help-button{margin-left:4px;outline:none;}#theme-picker,#copy-path{height:34px;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:5px;width:33px;border:1px solid;border-radius:2px;cursor:pointer;}#help-button{font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:20px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);overflow-wrap:normal;}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:1rem;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:1.125rem;display:block;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main-content>ul{padding-left:10px;}#main-content>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.625rem;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.undocumented[open] >summary::before,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.undocumented>summary::before,details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}.sidebar.expanded+main .width-limiter .sub-logo-container.rust-logo{display:none;}.rustdoc.source .sidebar{transition:width .5s;}.source .sidebar.expanded{width:300px;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.rustdoc,.main-heading{flex-direction:column;}.content .out-of-band{text-align:left;margin-left:initial;padding:initial;}.content .out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar-elems{margin-top:1em;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;background-color:rgba(0,0,0,0);margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.source .sidebar{top:0;padding:0;}.sidebar.shown,.sidebar.expanded,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{position:fixed;margin:0;z-index:11;width:0;}.mobile-topbar .location a{padding:0;margin:0;}.mobile-topbar .location{border:none;padding:0;margin:auto 0.5em auto auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:24px;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.source .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;}.source nav:not(.sidebar).sub{margin-left:32px;}#theme-picker{display:none;width:0;}.content{margin-left:0px;}.source .content{margin-top:10px;}#search{margin-left:0;padding:0;}.anchor{display:none !important;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}.sidebar.expanded #sidebar-toggle{font-size:1.5rem;}.sidebar:not(.expanded) #sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;border:1px solid;border-left:0;}#source-sidebar{z-index:11;}#main-content>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}.source .sidebar.expanded{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main-content>table:not(.table-display) td{word-break:break-word;width:50%;}#crate-search{border-radius:4px;border:0;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}.sub-container{flex-direction:column;}.sub-logo-container{align-self:center;}.source .sub-logo-container>img{height:35px;width:35px;}.sidebar:not(.expanded) #sidebar-toggle{top:10px;}}.method-toggle summary,.implementors-toggle summary,.impl{margin-bottom:0.75em;}.method-toggle[open]{margin-bottom:2em;}.implementors-toggle[open]{margin-bottom:2em;}#trait-implementations-list .method-toggle,#synthetic-implementations-list .method-toggle,#blanket-implementations-list .method-toggle{margin-bottom:1em;}.scraped-example-title{font-family:'Fira Sans';}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow:hidden;max-height:240px;}.scraped-example:not(.expanded) .code-wrapper .example-wrap pre.rust{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper{overflow:hidden;max-height:240px;}.scraped-example .code-wrapper .line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.more-examples-toggle{margin-top:10px;}.more-examples-toggle summary{color:#999;font-family:'Fira Sans';}.more-scraped-examples{margin-left:25px;display:flex;flex-direction:row;width:calc(100% - 25px);}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line:hover .toggle-line-inner{background:#aaa;}.toggle-line-inner{min-width:2px;background:#ddd;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;font-family:'Fira Sans';}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/docs/doc/search-index.js b/docs/doc/search-index.js deleted file mode 100644 index 89fa0ab..0000000 --- a/docs/doc/search-index.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchIndex = JSON.parse('{\ -"ubits":{"doc":"crates.io Downloads Build Docs Licence","t":[14,0,0,0,18,18,3,18,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,18,18,3,4,13,13,13,13,13,13,13,13,18,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["bitfield","examples","flagless_example","full_example","BITS","BYTES","ExampleField","MAX","as_binary","as_integer","bitand","bitand_assign","bitor","bitor_assign","bitxor","bitxor_assign","borrow","borrow_mut","clear_index","clone","clone_into","combine","default","diff","eq","fmt","fmt","from","from","from_binary_str","from_binary_string","get_index","intersect","into","into_combined","into_diff","into_intersection","ne","new","ones","partial_cmp","set_index","to_owned","toggle_index","try_from","try_into","type_id","zeros","BITS","BYTES","ExampleField","ExampleFlags","Flag0","Flag1","Flag2","Flag3","Flag4","Flag5","Flag6","Flag7","MAX","as_binary","as_integer","bitand","bitand","bitand","bitand_assign","bitand_assign","bitor","bitor","bitor","bitor_assign","bitor_assign","bitxor","bitxor","bitxor","bitxor_assign","bitxor_assign","borrow","borrow","borrow_mut","borrow_mut","clear","clear_index","clone","clone","clone_into","clone_into","combine","default","diff","eq","eq","fmt","fmt","fmt","from","from","from","from","from","from_binary_str","from_binary_string","get","get_index","intersect","into","into","into_combined","into_diff","into_intersection","ne","new","ones","partial_cmp","partial_cmp","set","set_index","to_owned","to_owned","toggle","toggle_index","try_from","try_from","try_into","try_into","type_id","type_id","zeros"],"q":["ubits","","ubits::examples","","ubits::examples::flagless_example","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","ubits::examples::full_example","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Generates a bitfield struct and a corresponding flag enum.","Examples of generated output using different …","Example of generated output, using only a bit field …","Example of generated output, using both a bit field and a …","Number of bits in an instance of ExampleField.","Number of bytes used by an instance of ExampleField.","Optional docstring for my example bit field.","Maximum valid integer for ExampleField.","Returns the current field value as a binary formatted …","Returns the current field value as a u8","","","","","","","","","Sets the value of the bit at the supplied index to 0.","","","Returns a new ExampleFieldwith ones for flags that were …","","Returns a new ExampleFieldwith ones for flags that do not …","","","","Returns the argument unchanged.","","Create a new instance of ExampleField from a binary string.","Create a new instance of ExampleField from a binary string.","Returns the value of the bit at the supplied index as a …","Returns a new ExampleFieldwith ones for flags that were …","Calls U::from(self).","Returns a new ExampleFieldwith ones for flags that were …","Returns a new ExampleFieldwith ones for flags that do not …","Returns a new ExampleFieldwith ones for flags that were …","","Create a new instance of ExampleField from a u8 value.","Create a new instance of ExampleField from the maximum …","","Sets the value of the bit at the supplied index to 1.","","Flips the value of the bit at the supplied index.","","","","Create a new instance of ExampleField from 0.","Number of bits in an instance of ExampleField.","Number of bytes used by an instance of ExampleField.","Optional docstring for my example bit field.","Optional docstring for my flag enum.","Optional docstring for Flag0","Optional docstring for Flag1","Optional docstring for Flag2","Optional docstring for Flag3","Optional docstring for Flag4","Optional docstring for Flag5","Optional docstring for Flag6","Optional docstring for Flag7","Maximum valid integer for ExampleField.","Returns the current field value as a binary formatted …","Returns the current field value as a u8","","","","","","","","","","","","","","","","","","","","Sets the value of the bit at the supplied flag to 0.","Sets the value of the bit at the supplied index to 0.","","","","","Returns a new ExampleFieldwith ones for flags that were …","","Returns a new ExampleFieldwith ones for flags that do not …","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Create a new instance of ExampleField from a binary string.","Create a new instance of ExampleField from a binary string.","Returns the value of the bit at the supplied flag as a …","Returns the value of the bit at the supplied index as a …","Returns a new ExampleFieldwith ones for flags that were …","Calls U::from(self).","Calls U::from(self).","Returns a new ExampleFieldwith ones for flags that were …","Returns a new ExampleFieldwith ones for flags that do not …","Returns a new ExampleFieldwith ones for flags that were …","","Create a new instance of ExampleField from a u8 value.","Create a new instance of ExampleField from the maximum …","","","Sets the value of the bit at the supplied flag to 1.","Sets the value of the bit at the supplied index to 1.","","","Flips the value of the bit at the supplied flag.","Flips the value of the bit at the supplied index.","","","","","","","Create a new instance of ExampleField from 0."],"i":[0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,0,0,3,3,3,3,3,3,3,3,2,2,2,3,2,2,2,2,3,2,2,2,2,3,2,2,2,2,3,2,3,2,2,2,3,2,3,2,2,2,2,3,2,3,2,2,3,3,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,3,2,2,2,3,2,2,2,3,2,3,2,3,2,2],"f":[null,null,null,null,null,null,null,null,[[["",0]],["string",3]],[[["",0]],["u8",0]],[[]],[[["",0]]],[[]],[[["",0]]],[[]],[[["",0]]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0],["u8",0]]],[[["",0]],["examplefield",3]],[[["",0],["",0]]],[[["",0]]],[[]],[[["",0]]],[[["",0],["examplefield",3]],["bool",0]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[]],[[["u8",0]],["examplefield",3]],[[["str",0]]],[[["string",3]]],[[["",0],["u8",0]],["bool",0]],[[["",0]]],[[]],[[]],[[]],[[]],[[["",0],["examplefield",3]],["bool",0]],[[["u8",0]]],[[]],[[["",0],["examplefield",3]],["option",4,[["ordering",4]]]],[[["",0],["u8",0]]],[[["",0]]],[[["",0],["u8",0]]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[]],null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["string",3]],[[["",0]],["u8",0]],[[]],[[["exampleflags",4]]],[[]],[[["",0],["exampleflags",4]]],[[["",0]]],[[]],[[]],[[["exampleflags",4]]],[[["",0],["exampleflags",4]]],[[["",0]]],[[]],[[["exampleflags",4]]],[[]],[[["",0],["exampleflags",4]]],[[["",0]]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0],["exampleflags",4]],["",0]],[[["",0],["u8",0]]],[[["",0]],["exampleflags",4]],[[["",0]],["examplefield",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0]]],[[]],[[["",0]]],[[["",0],["exampleflags",4]],["bool",0]],[[["",0],["examplefield",3]],["bool",0]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["u8",0]],["exampleflags",4]],[[]],[[["u8",0]],["examplefield",3]],[[["exampleflags",4]],["examplefield",3]],[[]],[[["str",0]]],[[["string",3]]],[[["",0],["exampleflags",4]],["bool",0]],[[["",0],["u8",0]],["bool",0]],[[["",0]]],[[]],[[]],[[]],[[]],[[]],[[["",0],["examplefield",3]],["bool",0]],[[["u8",0]]],[[]],[[["",0],["exampleflags",4]],["option",4,[["ordering",4]]]],[[["",0],["examplefield",3]],["option",4,[["ordering",4]]]],[[["",0],["exampleflags",4]],["",0]],[[["",0],["u8",0]]],[[["",0]]],[[["",0]]],[[["",0],["exampleflags",4]],["",0]],[[["",0],["u8",0]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]]],"p":[[3,"ExampleField"],[3,"ExampleField"],[4,"ExampleFlags"]]}\ -}'); -if (window.initSearch) {window.initSearch(searchIndex)}; \ No newline at end of file diff --git a/docs/doc/search.index/0a32bd316874.js b/docs/doc/search.index/0a32bd316874.js new file mode 100644 index 0000000..ed42756 --- /dev/null +++ b/docs/doc/search.index/0a32bd316874.js @@ -0,0 +1 @@ +rn_("MUAAADwAPQBSAFMAJQFCAAAjdgB3AHgAJ5AAkQCSAGl0NQA2ADcAFQBAAAAXlQCWAHNaAFsABQHAAAATfgB/AAOAAGlsBQBBAAAUeQB6AGk0ALcAAIWwQACGAAGwUACEAAEhASL1TwAAADUAAQAQAAEAIUIAAHsAfAB9AAUJwQAAACYAACcAACgAACkAACoAACsAACwAAC0AGpUAlgAAgAAwMTIzNDU2N2xztwYAh4AAWQJQAbBwAIQAAR1IBAEUAAAA") \ No newline at end of file diff --git a/docs/doc/search.index/11bf11a6c640.js b/docs/doc/search.index/11bf11a6c640.js new file mode 100644 index 0000000..9ad82b8 --- /dev/null +++ b/docs/doc/search.index/11bf11a6c640.js @@ -0,0 +1 @@ +rn_("VQBCAAAliwCMAI0AYUYARwBIAEkASgBLAFUAQQAAJYEAggCDAGEuAC8AMAAxADIAMwBVAEIAACWIAIkAigBhQABBAEIAQwBEAEUAVwEAhaBAAAAAWYAAEgAQJSFAIvQjAAAAbQABAAEA") \ No newline at end of file diff --git a/docs/doc/search.index/2dcde0157dc7.js b/docs/doc/search.index/2dcde0157dc7.js new file mode 100644 index 0000000..0163163 --- /dev/null +++ b/docs/doc/search.index/2dcde0157dc7.js @@ -0,0 +1 @@ +rn_("JQBAAAAicwB0AHUAbUwATQBOABUASAAAEpkAmgBpkwCUAPMAAWI7MAAAAQAACQACABcABgBfAAIAWwOwAAA5AAFtc3c=") \ No newline at end of file diff --git a/docs/doc/search.index/36ba7d91284a.js b/docs/doc/search.index/36ba7d91284a.js new file mode 100644 index 0000000..1355401 --- /dev/null +++ b/docs/doc/search.index/36ba7d91284a.js @@ -0,0 +1 @@ +rn_("VQBBAAAliwCMAI0AYUYARwBIAEkASgBLAAUBwAAAE34AfwADgABpbBMEArAAAFoAAWZz9IQAAAABABAAAQDzAAJhbzowAAABAAAAAAAJABAAAAAFAAYAaABpAG8AcAB5AHoAhgCHAA==") \ No newline at end of file diff --git a/docs/doc/search.index/406b87d06b75.js b/docs/doc/search.index/406b87d06b75.js new file mode 100644 index 0000000..90e6ee0 --- /dev/null +++ b/docs/doc/search.index/406b87d06b75.js @@ -0,0 +1 @@ +rn_("FQBCAAASmQCaAGmTAJQAMUMAAD8AVQBWAFcAIUMAAGIAYwBkACFDAABfAGAAYQD3AACFsCAAJAABIIEG8mYAAAABAA==") \ No newline at end of file diff --git a/docs/doc/search.index/4fd7c14ef5fd.js b/docs/doc/search.index/4fd7c14ef5fd.js new file mode 100644 index 0000000..90b4af3 --- /dev/null +++ b/docs/doc/search.index/4fd7c14ef5fd.js @@ -0,0 +1 @@ +rn_("hQJAAAAXjgCPABNsAG0AG5cAmABjZGkeAB8AIABiAGMAZAB2AHcAeAAVAEMAABKXAJgAaWoAawDzAAFzAVQAAAArArAgAHEAAWdy+wJlbw==") \ No newline at end of file diff --git a/docs/doc/search.index/alias/a762150c532c.js b/docs/doc/search.index/alias/a762150c532c.js new file mode 100644 index 0000000..f829e46 --- /dev/null +++ b/docs/doc/search.index/alias/a762150c532c.js @@ -0,0 +1 @@ +rd_("") \ No newline at end of file diff --git a/docs/doc/search.index/crateNames/a54e295c7d06.js b/docs/doc/search.index/crateNames/a54e295c7d06.js new file mode 100644 index 0000000..3b791ba --- /dev/null +++ b/docs/doc/search.index/crateNames/a54e295c7d06.js @@ -0,0 +1 @@ +rd_("eubits") \ No newline at end of file diff --git a/docs/doc/search.index/desc/614df692f6ed.js b/docs/doc/search.index/desc/614df692f6ed.js new file mode 100644 index 0000000..7b7b091 --- /dev/null +++ b/docs/doc/search.index/desc/614df692f6ed.js @@ -0,0 +1 @@ +rd_("CdMaximum valid integer for ExampleField.0CjReturns the value of the bit at the supplied flag as a \xe2\x80\xa6E`Create a new instance of ExampleField from a u8 value.0DaSets the value of the bit at the supplied flag to 1.CkNumber of bits in an instance of ExampleField.0DjReturns a new ExampleFieldwith ones for flags that do not \xe2\x80\xa60AoReturns the argument unchanged.00BaCalls U::from(self).00DgCreate a new instance of ExampleField from the maximum \xe2\x80\xa60DaNumber of bytes used by an instance of ExampleField.0AlOptional docstring for Flag0AlOptional docstring for Flag1AlOptional docstring for Flag2AlOptional docstring for Flag3AlOptional docstring for Flag4AlOptional docstring for Flag5AlOptional docstring for Flag6AlOptional docstring for Flag7DaSets the value of the bit at the supplied flag to 0.Bfcrates.io Downloads Build Docs LicenceDgCreate a new instance of ExampleField from 0.0C`Flips the value of the bit at the supplied flag.DhReturns a new ExampleFieldwith ones for flags that were \xe2\x80\xa60CjGenerates a bitfield struct and a corresponding flag enum.C`Examples of generated output using different \xe2\x80\xa6CiReturns the current field value as a binary formatted \xe2\x80\xa60CkReturns the value of the bit at the supplied index as a \xe2\x80\xa6044DjReturns a new ExampleFieldwith ones for flags that do not \xe2\x80\xa60DbSets the value of the bit at the supplied index to 1.0CdReturns the current field value as a u80DbSets the value of the bit at the supplied index to 0.0BlOptional docstring for my example bit field.0BdOptional docstring for my flag enum.CmExample of generated output, using both a bit field and a \xe2\x80\xa6CaFlips the value of the bit at the supplied index.0<ExampleField from a binary string.0CgExample of generated output, using only a bit field \xe2\x80\xa6>>11") \ No newline at end of file diff --git a/docs/doc/search.index/entry/cae8257aa6ef.js b/docs/doc/search.index/entry/cae8257aa6ef.js new file mode 100644 index 0000000..d70aa8b --- /dev/null +++ b/docs/doc/search.index/entry/cae8257aa6ef.js @@ -0,0 +1 @@ +rd_("Ae[56,13,133,133,129,0]Ae[56,13,133,133,127,0]Ae[56,13,150,150,128,0]Ae[56,19,133,133,127,0]Ae[56,19,150,150,128,0]4Cd[56,13,133,133,127,0,\"impl-Binary-for-ExampleField\"]Cc[56,13,133,133,127,0,\"impl-Debug-for-ExampleField\"]Cd[56,13,150,150,128,0,\"impl-Binary-for-ExampleField\"]Cc[56,13,150,150,128,0,\"impl-Debug-for-ExampleField\"]7767547688Cj[56,13,133,133,127,0,\"impl-From%3Cu8%3E-for-ExampleField\"]Dd[56,13,133,133,127,0,\"impl-From%3CExampleFlags%3E-for-ExampleField\"]988:989876Ae[56,15,133,133,129,0]0000000;Cc[56,13,133,133,127,0,\"impl-BitOr-for-ExampleField\"]De[56,13,133,133,127,0,\"impl-BitOr%3CExampleFlags%3E-for-ExampleField\"]Dh[56,13,133,133,127,0,\"impl-BitOr%3CExampleFlags%3E-for-%26ExampleField\"]Dl[56,13,133,133,127,0,\"impl-BitOr%3CExampleFlags%3E-for-%26mut+ExampleField\"]=>?>=n[56,3,0,0,0,0]?>Ae[56,13,133,133,129,0]Cd[56,13,133,133,127,0,\"impl-BitAnd-for-ExampleField\"]Df[56,13,133,133,127,0,\"impl-BitAnd%3CExampleFlags%3E-for-ExampleField\"]Di[56,13,133,133,127,0,\"impl-BitAnd%3CExampleFlags%3E-for-%26ExampleField\"]Dm[56,13,133,133,127,0,\"impl-BitAnd%3CExampleFlags%3E-for-%26mut+ExampleField\"]Ae[56,13,150,150,128,0]5Dm[56,13,133,133,127,0,\"impl-BitXor%3CExampleFlags%3E-for-%26mut+ExampleField\"]Cd[56,13,133,133,127,0,\"impl-BitXor-for-ExampleField\"]Df[56,13,133,133,127,0,\"impl-BitXor%3CExampleFlags%3E-for-ExampleField\"]Di[56,13,133,133,127,0,\"impl-BitXor%3CExampleFlags%3E-for-%26ExampleField\"]49Ae[56,13,133,133,127,0]500505:05A`[56,16,57,0,0,0]o[56,2,57,0,0,0]<27<27<27272727272727<27<2727<27A`[56,5,133,0,0,0]A`[56,5,150,0,0,0]A`[56,6,133,0,0,0]Ci[56,13,133,133,127,0,\"impl-BitOrAssign-for-ExampleField\"]Dk[56,13,133,133,127,0,\"impl-BitOrAssign%3CExampleFlags%3E-for-ExampleField\"]1>16>1>1") \ No newline at end of file diff --git a/docs/doc/search.index/function/969a8b2a27d1.js b/docs/doc/search.index/function/969a8b2a27d1.js new file mode 100644 index 0000000..d524087 --- /dev/null +++ b/docs/doc/search.index/function/969a8b2a27d1.js @@ -0,0 +1 @@ +rd_("Ao[\"{{{Mn{A@b}}{Mn{A@b}}}Bj}\",[]]Am[\"{{{Mn{On}}{Mn{On}}}Bj}\",[]]Ao[\"{{{Mn{A@`}}{Mn{A@`}}}Bj}\",[]]B`[\"{{{Mn{A@b}}{Mn{AlLl}}}Gj}\",[]]Ao[\"{{{Mn{On}}{Mn{AlLl}}}Gj}\",[]]0B`[\"{{{Mn{A@`}}{Mn{AlLl}}}Gj}\",[]]0Ah[\"{{{Mn{On}}A@b}Bj}\",[]]l[\"{jOn}\",[]]m[\"{jA@`}\",[]]Bd[\"{{{Mn{AlOn}}A@b}{{Mn{AlOn}}}}\",[]]Ag[\"{{{Mn{On}}On}On}\",[]]Aj[\"{{{Mn{A@`}}A@`}A@`}\",[]]A`[\"{cc{}}\",[\"T\"]]m[\"{jA@b}\",[]]6n[\"{A@bOn}\",[]]226Aa[\"{{}c{}}\",[\"U\"]]00m[\"{{}On}\",[]]n[\"{{}A@`}\",[]]Bc[\"{{A@bA@b}c{}}\",[\"BitOr::Output\"]]Ba[\"{{OnOn}c{}}\",[\"BitOr::Output\"]]Bb[\"{{OnA@b}c{}}\",[\"BitOr::Output\"]]Bh[\"{{{Mn{On}}A@b}c{}}\",[\"BitOr::Output\"]]Bj[\"{{{Mn{AlOn}}A@b}c{}}\",[\"BitOr::Output\"]]Bc[\"{{A@`A@`}c{}}\",[\"BitOr::Output\"]]>Ag[\"{{{Mn{A@b}}}A@b}\",[]]Ae[\"{{{Mn{On}}}On}\",[]]Ag[\"{{{Mn{A@`}}}A@`}\",[]]:9Bd[\"{{A@bA@b}c{}}\",[\"BitAnd::Output\"]]Bb[\"{{OnOn}c{}}\",[\"BitAnd::Output\"]]Bc[\"{{OnA@b}c{}}\",[\"BitAnd::Output\"]]Bi[\"{{{Mn{On}}A@b}c{}}\",[\"BitAnd::Output\"]]Bk[\"{{{Mn{AlOn}}A@b}c{}}\",[\"BitAnd::Output\"]]Bd[\"{{A@`A@`}c{}}\",[\"BitAnd::Output\"]]Bd[\"{{A@bA@b}c{}}\",[\"BitXor::Output\"]]Bk[\"{{{Mn{AlOn}}A@b}c{}}\",[\"BitXor::Output\"]]Bb[\"{{OnOn}c{}}\",[\"BitXor::Output\"]]Bc[\"{{OnA@b}c{}}\",[\"BitXor::Output\"]]Bi[\"{{{Mn{On}}A@b}c{}}\",[\"BitXor::Output\"]]Bd[\"{{A@`A@`}c{}}\",[\"BitXor::Output\"]]Ai[\"{Mn{{Mn{c}}}{}}\",[\"T\"]]00Bd[\"{{{Mn{AlOn}}A@b}{{Mn{AlOn}}}}\",[]]Ag[\"{{{Mn{On}}On}On}\",[]]Aj[\"{{{Mn{A@`}}A@`}A@`}\",[]]m[\"{{}On}\",[]]n[\"{{}A@`}\",[]]m[\"{MnH`}\",[]]00Aa[\"{Mnc{}}\",[\"T\"]]00An[\"{c{{Gl{e}}}{}{}}\",[\"U\",\"T\"]]00Ai[\"{{}{{Gl{c}}}{}}\",[\"U\"]]00Ae[\"{{{Mn{On}}}Gn}\",[]]Af[\"{{{Mn{A@`}}}Gn}\",[]]Af[\"{{{Mn{On}}j}Bj}\",[]]Ag[\"{{{Mn{A@`}}j}Bj}\",[]];:Aa[\"{{OnOn}On}\",[]]Ad[\"{{A@`A@`}A@`}\",[]]Ah[\"{{{Mn{AlOn}}j}Dh}\",[]]Ai[\"{{{Mn{AlA@`}}j}Dh}\",[]]Ad[\"{{{Mn{On}}}j}\",[]]Ae[\"{{{Mn{A@`}}}j}\",[]]Bc[\"{{{Mn{Al}}}{{Mn{Alc}}}{}}\",[\"T\"]]00Am[\"{{Mn{Mn{Alc}}}Dh{}}\",[\"T\"]]0054Bg[\"{{{Mn{A@b}}{Mn{A@b}}}{{Gh{Kb}}}}\",[]]Be[\"{{{Mn{On}}{Mn{On}}}{{Gh{Kb}}}}\",[]]Bg[\"{{{Mn{A@`}}{Mn{A@`}}}{{Gh{Kb}}}}\",[]]Ai[\"{{{Mn{AlOn}}On}Dh}\",[]]Aj[\"{{{Mn{AlOn}}A@b}Dh}\",[]]Ak[\"{{{Mn{AlA@`}}A@`}Dh}\",[]];:210120=-1){var obj=searchIndex[result.id];obj.lev=result.lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates[obj.fullPath]){continue}duplicates[obj.fullPath]=true;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){var result=results[entry];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};ar.push(result)}}results=ar;if(results.length===0){return[]}results.sort(function(aaa,bbb){var a,b;a=(aaa.word!==val);b=(bbb.word!==val);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==window.currentCrate);b=(bbb.item.crate!==window.currentCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(var i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}}}else if(literalSearch){var found=false;if((!val.generics||val.generics.length===0)&&obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){found=obj[GENERICS_DATA].some(function(gen){return gen[NAME]===val.name})}return found?0:MAX_LEV_DISTANCE+1}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==null){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}function addIntoResults(isExact,res,fullId,id,index,lev){if(lev===0||(!isExact&&lev<=MAX_LEV_DISTANCE)){if(res[fullId]!==undefined){var result=res[fullId];if(result.dontValidate||result.lev<=lev){return}}res[fullId]={id:id,index:index,dontValidate:isExact,lev:lev,}}}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i0){firstNonZeroDistance=distance;break}}in_args=firstNonZeroDistance}addIntoResults(true,results_in_args,fullId,i,-1,in_args);addIntoResults(true,results_returned,fullId,i,-1,returned);if(is_module){addIntoResults(true,results,fullId,i,-1,0)}}}query.inputs=inputs.map(function(input){return input.name});query.output=output.name}else{query.inputs=[val];query.output=val;query.search=val;val=val.replace(/_/g,"");var valGenerics=extractGenerics(val);var paths=valLower.split("::");removeEmptyStringsFromArray(paths);val=paths[paths.length-1];var contains=paths.slice(0,paths.length>1?paths.length-1:1);var lev,j;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}addIntoResults(false,results_in_args,fullId,j,index,in_args);addIntoResults(false,results_returned,fullId,j,index,returned);if(typePassesFilter(typeFilter,ty.ty)&&(index!==-1||lev<=MAX_LEV_DISTANCE)){if(index!==-1&&paths.length<2){lev=0}addIntoResults(false,results,fullId,j,index,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type="",query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){var search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query,true);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(window.ALL_CRATES.length>1){crates=` in `}var output=`
-

Results for ${escape(query.query)} `+(query.type?" (type: "+escape(query.type)+")":"")+"

"+crates+`
`+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
";var resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;let crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){query=query.raw.trim();var results={"in_args":[],"returned":[],"others":[],};if(query.length!==0){var tmp=execQuery(getQuery(query),searchWords,filterCrates);results.in_args.push(tmp.in_args);results.returned.push(tmp.returned);results.others.push(tmp.others)}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){putBackSearch()}return}var filterCrates=getFilterCrates();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=buildUrl(query.raw,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execSearch(query,searchWords,filterCrates),params["go_to_first"],filterCrates)}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;var crateCorpus=rawSearchIndex[crate];searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=crateCorpus.t;var itemNames=crateCorpus.n;var itemPaths=crateCorpus.q;var itemDescs=crateCorpus.d;var itemParentIdxs=crateCorpus.i;var itemFunctionSearchTypes=crateCorpus.f;var paths=crateCorpus.p;var aliases=crateCorpus.a;var len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="All crates"){var params=searchState.getQueryStringParams();var query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}searchWords=buildIndex(rawSearchIndex);registerSearchEvents();function runSearchIfNeeded(){if(searchState.getQueryStringParams().search){search()}}runSearchIfNeeded()};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() \ No newline at end of file diff --git a/docs/doc/settings.css b/docs/doc/settings.css deleted file mode 100644 index 35df7bc..0000000 --- a/docs/doc/settings.css +++ /dev/null @@ -1 +0,0 @@ -.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.setting-line .radio-line,.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line .setting-name{flex-grow:1;margin-top:auto;margin-bottom:auto;}.setting-line .radio-line input{margin-right:0.3em;}.radio-line .choice{border-radius:0.1em;border:1px solid;margin-left:0.5em;margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/docs/doc/settings.html b/docs/doc/settings.html index b04fccb..05b7ff8 100644 --- a/docs/doc/settings.html +++ b/docs/doc/settings.html @@ -1,17 +1 @@ -Rustdoc settings - -
-

Rustdoc settings

Back
Use system theme
Theme
Preferred light theme
Preferred dark theme
Auto-hide item contents for large items.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
- \ No newline at end of file +Settings

All

Rustdoc settings

Back
\ No newline at end of file diff --git a/docs/doc/settings.js b/docs/doc/settings.js deleted file mode 100644 index 8047189..0000000 --- a/docs/doc/settings.js +++ /dev/null @@ -1 +0,0 @@ -(function(){function changeSetting(settingName,value){updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();updateLightAndDark();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function showLightAndDark(){addClass(document.getElementById("theme").parentElement,"hidden");removeClass(document.getElementById("preferred-light-theme").parentElement,"hidden");removeClass(document.getElementById("preferred-dark-theme").parentElement,"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme").parentElement,"hidden");addClass(document.getElementById("preferred-dark-theme").parentElement,"hidden");removeClass(document.getElementById("theme").parentElement,"hidden")}function updateLightAndDark(){if(getSettingValue("use-system-theme")!=="false"){showLightAndDark()}else{hideLightAndDark()}}function setEvents(){updateLightAndDark();onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}});onEachLazy(document.querySelectorAll("input[type=\"radio\"]"),function(elem){const settingId=elem.name;const settingValue=getSettingValue(settingId);if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",function(ev){changeSetting(ev.target.name,ev.target.value)})});document.getElementById("back").addEventListener("click",function(){history.back()})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/docs/doc/source-files.js b/docs/doc/source-files.js deleted file mode 100644 index b3924f0..0000000 --- a/docs/doc/source-files.js +++ /dev/null @@ -1,3 +0,0 @@ -var N = null;var sourcesIndex = {}; -sourcesIndex["ubits"] = {"name":"","files":["lib.rs"]}; -createSourceSidebar(); diff --git a/docs/doc/source-script.js b/docs/doc/source-script.js deleted file mode 100644 index e01a7fe..0000000 --- a/docs/doc/source-script.js +++ /dev/null @@ -1 +0,0 @@ -(function(){function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.classList.add("expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{sidebar.classList.remove("expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner=document.createElement("div");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}var container=document.querySelector("nav.sidebar");var sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("source-sidebar-show")!=="true"){container.classList.remove("expanded")}else{container.classList.add("expanded")}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});container.appendChild(sidebar);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}var lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(scrollTo,match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(tocur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",function(){var match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(false,match)}});onEachLazy(document.getElementsByClassName("line-numbers"),function(el){el.addEventListener("click",handleSourceHighlight)});highlightSourceLines(true);window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/docs/doc/src-files.js b/docs/doc/src-files.js new file mode 100644 index 0000000..d1c3d0b --- /dev/null +++ b/docs/doc/src-files.js @@ -0,0 +1,2 @@ +createSrcSidebar('[["ubits",["",[],["lib.rs"]]]]'); +//{"start":19,"fragment_lengths":[28]} \ No newline at end of file diff --git a/docs/doc/src/ubits/lib.rs.html b/docs/doc/src/ubits/lib.rs.html index cb7510e..be84763 100644 --- a/docs/doc/src/ubits/lib.rs.html +++ b/docs/doc/src/ubits/lib.rs.html @@ -1,7680 +1,3836 @@ -lib.rs - source - -
   1
-   2
-   3
-   4
-   5
-   6
-   7
-   8
-   9
-  10
-  11
-  12
-  13
-  14
-  15
-  16
-  17
-  18
-  19
-  20
-  21
-  22
-  23
-  24
-  25
-  26
-  27
-  28
-  29
-  30
-  31
-  32
-  33
-  34
-  35
-  36
-  37
-  38
-  39
-  40
-  41
-  42
-  43
-  44
-  45
-  46
-  47
-  48
-  49
-  50
-  51
-  52
-  53
-  54
-  55
-  56
-  57
-  58
-  59
-  60
-  61
-  62
-  63
-  64
-  65
-  66
-  67
-  68
-  69
-  70
-  71
-  72
-  73
-  74
-  75
-  76
-  77
-  78
-  79
-  80
-  81
-  82
-  83
-  84
-  85
-  86
-  87
-  88
-  89
-  90
-  91
-  92
-  93
-  94
-  95
-  96
-  97
-  98
-  99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214
- 215
- 216
- 217
- 218
- 219
- 220
- 221
- 222
- 223
- 224
- 225
- 226
- 227
- 228
- 229
- 230
- 231
- 232
- 233
- 234
- 235
- 236
- 237
- 238
- 239
- 240
- 241
- 242
- 243
- 244
- 245
- 246
- 247
- 248
- 249
- 250
- 251
- 252
- 253
- 254
- 255
- 256
- 257
- 258
- 259
- 260
- 261
- 262
- 263
- 264
- 265
- 266
- 267
- 268
- 269
- 270
- 271
- 272
- 273
- 274
- 275
- 276
- 277
- 278
- 279
- 280
- 281
- 282
- 283
- 284
- 285
- 286
- 287
- 288
- 289
- 290
- 291
- 292
- 293
- 294
- 295
- 296
- 297
- 298
- 299
- 300
- 301
- 302
- 303
- 304
- 305
- 306
- 307
- 308
- 309
- 310
- 311
- 312
- 313
- 314
- 315
- 316
- 317
- 318
- 319
- 320
- 321
- 322
- 323
- 324
- 325
- 326
- 327
- 328
- 329
- 330
- 331
- 332
- 333
- 334
- 335
- 336
- 337
- 338
- 339
- 340
- 341
- 342
- 343
- 344
- 345
- 346
- 347
- 348
- 349
- 350
- 351
- 352
- 353
- 354
- 355
- 356
- 357
- 358
- 359
- 360
- 361
- 362
- 363
- 364
- 365
- 366
- 367
- 368
- 369
- 370
- 371
- 372
- 373
- 374
- 375
- 376
- 377
- 378
- 379
- 380
- 381
- 382
- 383
- 384
- 385
- 386
- 387
- 388
- 389
- 390
- 391
- 392
- 393
- 394
- 395
- 396
- 397
- 398
- 399
- 400
- 401
- 402
- 403
- 404
- 405
- 406
- 407
- 408
- 409
- 410
- 411
- 412
- 413
- 414
- 415
- 416
- 417
- 418
- 419
- 420
- 421
- 422
- 423
- 424
- 425
- 426
- 427
- 428
- 429
- 430
- 431
- 432
- 433
- 434
- 435
- 436
- 437
- 438
- 439
- 440
- 441
- 442
- 443
- 444
- 445
- 446
- 447
- 448
- 449
- 450
- 451
- 452
- 453
- 454
- 455
- 456
- 457
- 458
- 459
- 460
- 461
- 462
- 463
- 464
- 465
- 466
- 467
- 468
- 469
- 470
- 471
- 472
- 473
- 474
- 475
- 476
- 477
- 478
- 479
- 480
- 481
- 482
- 483
- 484
- 485
- 486
- 487
- 488
- 489
- 490
- 491
- 492
- 493
- 494
- 495
- 496
- 497
- 498
- 499
- 500
- 501
- 502
- 503
- 504
- 505
- 506
- 507
- 508
- 509
- 510
- 511
- 512
- 513
- 514
- 515
- 516
- 517
- 518
- 519
- 520
- 521
- 522
- 523
- 524
- 525
- 526
- 527
- 528
- 529
- 530
- 531
- 532
- 533
- 534
- 535
- 536
- 537
- 538
- 539
- 540
- 541
- 542
- 543
- 544
- 545
- 546
- 547
- 548
- 549
- 550
- 551
- 552
- 553
- 554
- 555
- 556
- 557
- 558
- 559
- 560
- 561
- 562
- 563
- 564
- 565
- 566
- 567
- 568
- 569
- 570
- 571
- 572
- 573
- 574
- 575
- 576
- 577
- 578
- 579
- 580
- 581
- 582
- 583
- 584
- 585
- 586
- 587
- 588
- 589
- 590
- 591
- 592
- 593
- 594
- 595
- 596
- 597
- 598
- 599
- 600
- 601
- 602
- 603
- 604
- 605
- 606
- 607
- 608
- 609
- 610
- 611
- 612
- 613
- 614
- 615
- 616
- 617
- 618
- 619
- 620
- 621
- 622
- 623
- 624
- 625
- 626
- 627
- 628
- 629
- 630
- 631
- 632
- 633
- 634
- 635
- 636
- 637
- 638
- 639
- 640
- 641
- 642
- 643
- 644
- 645
- 646
- 647
- 648
- 649
- 650
- 651
- 652
- 653
- 654
- 655
- 656
- 657
- 658
- 659
- 660
- 661
- 662
- 663
- 664
- 665
- 666
- 667
- 668
- 669
- 670
- 671
- 672
- 673
- 674
- 675
- 676
- 677
- 678
- 679
- 680
- 681
- 682
- 683
- 684
- 685
- 686
- 687
- 688
- 689
- 690
- 691
- 692
- 693
- 694
- 695
- 696
- 697
- 698
- 699
- 700
- 701
- 702
- 703
- 704
- 705
- 706
- 707
- 708
- 709
- 710
- 711
- 712
- 713
- 714
- 715
- 716
- 717
- 718
- 719
- 720
- 721
- 722
- 723
- 724
- 725
- 726
- 727
- 728
- 729
- 730
- 731
- 732
- 733
- 734
- 735
- 736
- 737
- 738
- 739
- 740
- 741
- 742
- 743
- 744
- 745
- 746
- 747
- 748
- 749
- 750
- 751
- 752
- 753
- 754
- 755
- 756
- 757
- 758
- 759
- 760
- 761
- 762
- 763
- 764
- 765
- 766
- 767
- 768
- 769
- 770
- 771
- 772
- 773
- 774
- 775
- 776
- 777
- 778
- 779
- 780
- 781
- 782
- 783
- 784
- 785
- 786
- 787
- 788
- 789
- 790
- 791
- 792
- 793
- 794
- 795
- 796
- 797
- 798
- 799
- 800
- 801
- 802
- 803
- 804
- 805
- 806
- 807
- 808
- 809
- 810
- 811
- 812
- 813
- 814
- 815
- 816
- 817
- 818
- 819
- 820
- 821
- 822
- 823
- 824
- 825
- 826
- 827
- 828
- 829
- 830
- 831
- 832
- 833
- 834
- 835
- 836
- 837
- 838
- 839
- 840
- 841
- 842
- 843
- 844
- 845
- 846
- 847
- 848
- 849
- 850
- 851
- 852
- 853
- 854
- 855
- 856
- 857
- 858
- 859
- 860
- 861
- 862
- 863
- 864
- 865
- 866
- 867
- 868
- 869
- 870
- 871
- 872
- 873
- 874
- 875
- 876
- 877
- 878
- 879
- 880
- 881
- 882
- 883
- 884
- 885
- 886
- 887
- 888
- 889
- 890
- 891
- 892
- 893
- 894
- 895
- 896
- 897
- 898
- 899
- 900
- 901
- 902
- 903
- 904
- 905
- 906
- 907
- 908
- 909
- 910
- 911
- 912
- 913
- 914
- 915
- 916
- 917
- 918
- 919
- 920
- 921
- 922
- 923
- 924
- 925
- 926
- 927
- 928
- 929
- 930
- 931
- 932
- 933
- 934
- 935
- 936
- 937
- 938
- 939
- 940
- 941
- 942
- 943
- 944
- 945
- 946
- 947
- 948
- 949
- 950
- 951
- 952
- 953
- 954
- 955
- 956
- 957
- 958
- 959
- 960
- 961
- 962
- 963
- 964
- 965
- 966
- 967
- 968
- 969
- 970
- 971
- 972
- 973
- 974
- 975
- 976
- 977
- 978
- 979
- 980
- 981
- 982
- 983
- 984
- 985
- 986
- 987
- 988
- 989
- 990
- 991
- 992
- 993
- 994
- 995
- 996
- 997
- 998
- 999
-1000
-1001
-1002
-1003
-1004
-1005
-1006
-1007
-1008
-1009
-1010
-1011
-1012
-1013
-1014
-1015
-1016
-1017
-1018
-1019
-1020
-1021
-1022
-1023
-1024
-1025
-1026
-1027
-1028
-1029
-1030
-1031
-1032
-1033
-1034
-1035
-1036
-1037
-1038
-1039
-1040
-1041
-1042
-1043
-1044
-1045
-1046
-1047
-1048
-1049
-1050
-1051
-1052
-1053
-1054
-1055
-1056
-1057
-1058
-1059
-1060
-1061
-1062
-1063
-1064
-1065
-1066
-1067
-1068
-1069
-1070
-1071
-1072
-1073
-1074
-1075
-1076
-1077
-1078
-1079
-1080
-1081
-1082
-1083
-1084
-1085
-1086
-1087
-1088
-1089
-1090
-1091
-1092
-1093
-1094
-1095
-1096
-1097
-1098
-1099
-1100
-1101
-1102
-1103
-1104
-1105
-1106
-1107
-1108
-1109
-1110
-1111
-1112
-1113
-1114
-1115
-1116
-1117
-1118
-1119
-1120
-1121
-1122
-1123
-1124
-1125
-1126
-1127
-1128
-1129
-1130
-1131
-1132
-1133
-1134
-1135
-1136
-1137
-1138
-1139
-1140
-1141
-1142
-1143
-1144
-1145
-1146
-1147
-1148
-1149
-1150
-1151
-1152
-1153
-1154
-1155
-1156
-1157
-1158
-1159
-1160
-1161
-1162
-1163
-1164
-1165
-1166
-1167
-1168
-1169
-1170
-1171
-1172
-1173
-1174
-1175
-1176
-1177
-1178
-1179
-1180
-1181
-1182
-1183
-1184
-1185
-1186
-1187
-1188
-1189
-1190
-1191
-1192
-1193
-1194
-1195
-1196
-1197
-1198
-1199
-1200
-1201
-1202
-1203
-1204
-1205
-1206
-1207
-1208
-1209
-1210
-1211
-1212
-1213
-1214
-1215
-1216
-1217
-1218
-1219
-1220
-1221
-1222
-1223
-1224
-1225
-1226
-1227
-1228
-1229
-1230
-1231
-1232
-1233
-1234
-1235
-1236
-1237
-1238
-1239
-1240
-1241
-1242
-1243
-1244
-1245
-1246
-1247
-1248
-1249
-1250
-1251
-1252
-1253
-1254
-1255
-1256
-1257
-1258
-1259
-1260
-1261
-1262
-1263
-1264
-1265
-1266
-1267
-1268
-1269
-1270
-1271
-1272
-1273
-1274
-1275
-1276
-1277
-1278
-1279
-1280
-1281
-1282
-1283
-1284
-1285
-1286
-1287
-1288
-1289
-1290
-1291
-1292
-1293
-1294
-1295
-1296
-1297
-1298
-1299
-1300
-1301
-1302
-1303
-1304
-1305
-1306
-1307
-1308
-1309
-1310
-1311
-1312
-1313
-1314
-1315
-1316
-1317
-1318
-1319
-1320
-1321
-1322
-1323
-1324
-1325
-1326
-1327
-1328
-1329
-1330
-1331
-1332
-1333
-1334
-1335
-1336
-1337
-1338
-1339
-1340
-1341
-1342
-1343
-1344
-1345
-1346
-1347
-1348
-1349
-1350
-1351
-1352
-1353
-1354
-1355
-1356
-1357
-1358
-1359
-1360
-1361
-1362
-1363
-1364
-1365
-1366
-1367
-1368
-1369
-1370
-1371
-1372
-1373
-1374
-1375
-1376
-1377
-1378
-1379
-1380
-1381
-1382
-1383
-1384
-1385
-1386
-1387
-1388
-1389
-1390
-1391
-1392
-1393
-1394
-1395
-1396
-1397
-1398
-1399
-1400
-1401
-1402
-1403
-1404
-1405
-1406
-1407
-1408
-1409
-1410
-1411
-1412
-1413
-1414
-1415
-1416
-1417
-1418
-1419
-1420
-1421
-1422
-1423
-1424
-1425
-1426
-1427
-1428
-1429
-1430
-1431
-1432
-1433
-1434
-1435
-1436
-1437
-1438
-1439
-1440
-1441
-1442
-1443
-1444
-1445
-1446
-1447
-1448
-1449
-1450
-1451
-1452
-1453
-1454
-1455
-1456
-1457
-1458
-1459
-1460
-1461
-1462
-1463
-1464
-1465
-1466
-1467
-1468
-1469
-1470
-1471
-1472
-1473
-1474
-1475
-1476
-1477
-1478
-1479
-1480
-1481
-1482
-1483
-1484
-1485
-1486
-1487
-1488
-1489
-1490
-1491
-1492
-1493
-1494
-1495
-1496
-1497
-1498
-1499
-1500
-1501
-1502
-1503
-1504
-1505
-1506
-1507
-1508
-1509
-1510
-1511
-1512
-1513
-1514
-1515
-1516
-1517
-1518
-1519
-1520
-1521
-1522
-1523
-1524
-1525
-1526
-1527
-1528
-1529
-1530
-1531
-1532
-1533
-1534
-1535
-1536
-1537
-1538
-1539
-1540
-1541
-1542
-1543
-1544
-1545
-1546
-1547
-1548
-1549
-1550
-1551
-1552
-1553
-1554
-1555
-1556
-1557
-1558
-1559
-1560
-1561
-1562
-1563
-1564
-1565
-1566
-1567
-1568
-1569
-1570
-1571
-1572
-1573
-1574
-1575
-1576
-1577
-1578
-1579
-1580
-1581
-1582
-1583
-1584
-1585
-1586
-1587
-1588
-1589
-1590
-1591
-1592
-1593
-1594
-1595
-1596
-1597
-1598
-1599
-1600
-1601
-1602
-1603
-1604
-1605
-1606
-1607
-1608
-1609
-1610
-1611
-1612
-1613
-1614
-1615
-1616
-1617
-1618
-1619
-1620
-1621
-1622
-1623
-1624
-1625
-1626
-1627
-1628
-1629
-1630
-1631
-1632
-1633
-1634
-1635
-1636
-1637
-1638
-1639
-1640
-1641
-1642
-1643
-1644
-1645
-1646
-1647
-1648
-1649
-1650
-1651
-1652
-1653
-1654
-1655
-1656
-1657
-1658
-1659
-1660
-1661
-1662
-1663
-1664
-1665
-1666
-1667
-1668
-1669
-1670
-1671
-1672
-1673
-1674
-1675
-1676
-1677
-1678
-1679
-1680
-1681
-1682
-1683
-1684
-1685
-1686
-1687
-1688
-1689
-1690
-1691
-1692
-1693
-1694
-1695
-1696
-1697
-1698
-1699
-1700
-1701
-1702
-1703
-1704
-1705
-1706
-1707
-1708
-1709
-1710
-1711
-1712
-1713
-1714
-1715
-1716
-1717
-1718
-1719
-1720
-1721
-1722
-1723
-1724
-1725
-1726
-1727
-1728
-1729
-1730
-1731
-1732
-1733
-1734
-1735
-1736
-1737
-1738
-1739
-1740
-1741
-1742
-1743
-1744
-1745
-1746
-1747
-1748
-1749
-1750
-1751
-1752
-1753
-1754
-1755
-1756
-1757
-1758
-1759
-1760
-1761
-1762
-1763
-1764
-1765
-1766
-1767
-1768
-1769
-1770
-1771
-1772
-1773
-1774
-1775
-1776
-1777
-1778
-1779
-1780
-1781
-1782
-1783
-1784
-1785
-1786
-1787
-1788
-1789
-1790
-1791
-1792
-1793
-1794
-1795
-1796
-1797
-1798
-1799
-1800
-1801
-1802
-1803
-1804
-1805
-1806
-1807
-1808
-1809
-1810
-1811
-1812
-1813
-1814
-1815
-1816
-1817
-1818
-1819
-1820
-1821
-1822
-1823
-1824
-1825
-1826
-1827
-1828
-1829
-1830
-1831
-1832
-1833
-1834
-1835
-1836
-1837
-1838
-1839
-1840
-1841
-1842
-1843
-1844
-1845
-1846
-1847
-1848
-1849
-1850
-1851
-1852
-1853
-1854
-1855
-1856
-1857
-1858
-1859
-1860
-1861
-1862
-1863
-1864
-1865
-1866
-1867
-1868
-1869
-1870
-1871
-1872
-1873
-1874
-1875
-1876
-1877
-1878
-1879
-1880
-1881
-1882
-1883
-1884
-1885
-1886
-1887
-1888
-1889
-1890
-1891
-1892
-1893
-1894
-1895
-1896
-1897
-1898
-1899
-1900
-1901
-1902
-1903
-1904
-1905
-1906
-1907
-1908
-1909
-1910
-1911
-1912
-1913
-1914
-1915
-1916
-1917
-1918
-1919
-1920
-1921
-1922
-1923
-1924
-1925
-1926
-1927
-1928
-1929
-1930
-1931
-1932
-1933
-1934
-1935
-1936
-1937
-1938
-1939
-1940
-1941
-1942
-1943
-1944
-1945
-1946
-1947
-1948
-1949
-1950
-1951
-1952
-1953
-1954
-1955
-1956
-1957
-1958
-1959
-1960
-1961
-1962
-1963
-1964
-1965
-1966
-1967
-1968
-1969
-1970
-1971
-1972
-1973
-1974
-1975
-1976
-1977
-1978
-1979
-1980
-1981
-1982
-1983
-1984
-1985
-1986
-1987
-1988
-1989
-1990
-1991
-1992
-1993
-1994
-1995
-1996
-1997
-1998
-1999
-2000
-2001
-2002
-2003
-2004
-2005
-2006
-2007
-2008
-2009
-2010
-2011
-2012
-2013
-2014
-2015
-2016
-2017
-2018
-2019
-2020
-2021
-2022
-2023
-2024
-2025
-2026
-2027
-2028
-2029
-2030
-2031
-2032
-2033
-2034
-2035
-2036
-2037
-2038
-2039
-2040
-2041
-2042
-2043
-2044
-2045
-2046
-2047
-2048
-2049
-2050
-2051
-2052
-2053
-2054
-2055
-2056
-2057
-2058
-2059
-2060
-2061
-2062
-2063
-2064
-2065
-2066
-2067
-2068
-2069
-2070
-2071
-2072
-2073
-2074
-2075
-2076
-2077
-2078
-2079
-2080
-2081
-2082
-2083
-2084
-2085
-2086
-2087
-2088
-2089
-2090
-2091
-2092
-2093
-2094
-2095
-2096
-2097
-2098
-2099
-2100
-2101
-2102
-2103
-2104
-2105
-2106
-2107
-2108
-2109
-2110
-2111
-2112
-2113
-2114
-2115
-2116
-2117
-2118
-2119
-2120
-2121
-2122
-2123
-2124
-2125
-2126
-2127
-2128
-2129
-2130
-2131
-2132
-2133
-2134
-2135
-2136
-2137
-2138
-2139
-2140
-2141
-2142
-2143
-2144
-2145
-2146
-2147
-2148
-2149
-2150
-2151
-2152
-2153
-2154
-2155
-2156
-2157
-2158
-2159
-2160
-2161
-2162
-2163
-2164
-2165
-2166
-2167
-2168
-2169
-2170
-2171
-2172
-2173
-2174
-2175
-2176
-2177
-2178
-2179
-2180
-2181
-2182
-2183
-2184
-2185
-2186
-2187
-2188
-2189
-2190
-2191
-2192
-2193
-2194
-2195
-2196
-2197
-2198
-2199
-2200
-2201
-2202
-2203
-2204
-2205
-2206
-2207
-2208
-2209
-2210
-2211
-2212
-2213
-2214
-2215
-2216
-2217
-2218
-2219
-2220
-2221
-2222
-2223
-2224
-2225
-2226
-2227
-2228
-2229
-2230
-2231
-2232
-2233
-2234
-2235
-2236
-2237
-2238
-2239
-2240
-2241
-2242
-2243
-2244
-2245
-2246
-2247
-2248
-2249
-2250
-2251
-2252
-2253
-2254
-2255
-2256
-2257
-2258
-2259
-2260
-2261
-2262
-2263
-2264
-2265
-2266
-2267
-2268
-2269
-2270
-2271
-2272
-2273
-2274
-2275
-2276
-2277
-2278
-2279
-2280
-2281
-2282
-2283
-2284
-2285
-2286
-2287
-2288
-2289
-2290
-2291
-2292
-2293
-2294
-2295
-2296
-2297
-2298
-2299
-2300
-2301
-2302
-2303
-2304
-2305
-2306
-2307
-2308
-2309
-2310
-2311
-2312
-2313
-2314
-2315
-2316
-2317
-2318
-2319
-2320
-2321
-2322
-2323
-2324
-2325
-2326
-2327
-2328
-2329
-2330
-2331
-2332
-2333
-2334
-2335
-2336
-2337
-2338
-2339
-2340
-2341
-2342
-2343
-2344
-2345
-2346
-2347
-2348
-2349
-2350
-2351
-2352
-2353
-2354
-2355
-2356
-2357
-2358
-2359
-2360
-2361
-2362
-2363
-2364
-2365
-2366
-2367
-2368
-2369
-2370
-2371
-2372
-2373
-2374
-2375
-2376
-2377
-2378
-2379
-2380
-2381
-2382
-2383
-2384
-2385
-2386
-2387
-2388
-2389
-2390
-2391
-2392
-2393
-2394
-2395
-2396
-2397
-2398
-2399
-2400
-2401
-2402
-2403
-2404
-2405
-2406
-2407
-2408
-2409
-2410
-2411
-2412
-2413
-2414
-2415
-2416
-2417
-2418
-2419
-2420
-2421
-2422
-2423
-2424
-2425
-2426
-2427
-2428
-2429
-2430
-2431
-2432
-2433
-2434
-2435
-2436
-2437
-2438
-2439
-2440
-2441
-2442
-2443
-2444
-2445
-2446
-2447
-2448
-2449
-2450
-2451
-2452
-2453
-2454
-2455
-2456
-2457
-2458
-2459
-2460
-2461
-2462
-2463
-2464
-2465
-2466
-2467
-2468
-2469
-2470
-2471
-2472
-2473
-2474
-2475
-2476
-2477
-2478
-2479
-2480
-2481
-2482
-2483
-2484
-2485
-2486
-2487
-2488
-2489
-2490
-2491
-2492
-2493
-2494
-2495
-2496
-2497
-2498
-2499
-2500
-2501
-2502
-2503
-2504
-2505
-2506
-2507
-2508
-2509
-2510
-2511
-2512
-2513
-2514
-2515
-2516
-2517
-2518
-2519
-2520
-2521
-2522
-2523
-2524
-2525
-2526
-2527
-2528
-2529
-2530
-2531
-2532
-2533
-2534
-2535
-2536
-2537
-2538
-2539
-2540
-2541
-2542
-2543
-2544
-2545
-2546
-2547
-2548
-2549
-2550
-2551
-2552
-2553
-2554
-2555
-2556
-2557
-2558
-2559
-2560
-2561
-2562
-2563
-2564
-2565
-2566
-2567
-2568
-2569
-2570
-2571
-2572
-2573
-2574
-2575
-2576
-2577
-2578
-2579
-2580
-2581
-2582
-2583
-2584
-2585
-2586
-2587
-2588
-2589
-2590
-2591
-2592
-2593
-2594
-2595
-2596
-2597
-2598
-2599
-2600
-2601
-2602
-2603
-2604
-2605
-2606
-2607
-2608
-2609
-2610
-2611
-2612
-2613
-2614
-2615
-2616
-2617
-2618
-2619
-2620
-2621
-2622
-2623
-2624
-2625
-2626
-2627
-2628
-2629
-2630
-2631
-2632
-2633
-2634
-2635
-2636
-2637
-2638
-2639
-2640
-2641
-2642
-2643
-2644
-2645
-2646
-2647
-2648
-2649
-2650
-2651
-2652
-2653
-2654
-2655
-2656
-2657
-2658
-2659
-2660
-2661
-2662
-2663
-2664
-2665
-2666
-2667
-2668
-2669
-2670
-2671
-2672
-2673
-2674
-2675
-2676
-2677
-2678
-2679
-2680
-2681
-2682
-2683
-2684
-2685
-2686
-2687
-2688
-2689
-2690
-2691
-2692
-2693
-2694
-2695
-2696
-2697
-2698
-2699
-2700
-2701
-2702
-2703
-2704
-2705
-2706
-2707
-2708
-2709
-2710
-2711
-2712
-2713
-2714
-2715
-2716
-2717
-2718
-2719
-2720
-2721
-2722
-2723
-2724
-2725
-2726
-2727
-2728
-2729
-2730
-2731
-2732
-2733
-2734
-2735
-2736
-2737
-2738
-2739
-2740
-2741
-2742
-2743
-2744
-2745
-2746
-2747
-2748
-2749
-2750
-2751
-2752
-2753
-2754
-2755
-2756
-2757
-2758
-2759
-2760
-2761
-2762
-2763
-2764
-2765
-2766
-2767
-2768
-2769
-2770
-2771
-2772
-2773
-2774
-2775
-2776
-2777
-2778
-2779
-2780
-2781
-2782
-2783
-2784
-2785
-2786
-2787
-2788
-2789
-2790
-2791
-2792
-2793
-2794
-2795
-2796
-2797
-2798
-2799
-2800
-2801
-2802
-2803
-2804
-2805
-2806
-2807
-2808
-2809
-2810
-2811
-2812
-2813
-2814
-2815
-2816
-2817
-2818
-2819
-2820
-2821
-2822
-2823
-2824
-2825
-2826
-2827
-2828
-2829
-2830
-2831
-2832
-2833
-2834
-2835
-2836
-2837
-2838
-2839
-2840
-2841
-2842
-2843
-2844
-2845
-2846
-2847
-2848
-2849
-2850
-2851
-2852
-2853
-2854
-2855
-2856
-2857
-2858
-2859
-2860
-2861
-2862
-2863
-2864
-2865
-2866
-2867
-2868
-2869
-2870
-2871
-2872
-2873
-2874
-2875
-2876
-2877
-2878
-2879
-2880
-2881
-2882
-2883
-2884
-2885
-2886
-2887
-2888
-2889
-2890
-2891
-2892
-2893
-2894
-2895
-2896
-2897
-2898
-2899
-2900
-2901
-2902
-2903
-2904
-2905
-2906
-2907
-2908
-2909
-2910
-2911
-2912
-2913
-2914
-2915
-2916
-2917
-2918
-2919
-2920
-2921
-2922
-2923
-2924
-2925
-2926
-2927
-2928
-2929
-2930
-2931
-2932
-2933
-2934
-2935
-2936
-2937
-2938
-2939
-2940
-2941
-2942
-2943
-2944
-2945
-2946
-2947
-2948
-2949
-2950
-2951
-2952
-2953
-2954
-2955
-2956
-2957
-2958
-2959
-2960
-2961
-2962
-2963
-2964
-2965
-2966
-2967
-2968
-2969
-2970
-2971
-2972
-2973
-2974
-2975
-2976
-2977
-2978
-2979
-2980
-2981
-2982
-2983
-2984
-2985
-2986
-2987
-2988
-2989
-2990
-2991
-2992
-2993
-2994
-2995
-2996
-2997
-2998
-2999
-3000
-3001
-3002
-3003
-3004
-3005
-3006
-3007
-3008
-3009
-3010
-3011
-3012
-3013
-3014
-3015
-3016
-3017
-3018
-3019
-3020
-3021
-3022
-3023
-3024
-3025
-3026
-3027
-3028
-3029
-3030
-3031
-3032
-3033
-3034
-3035
-3036
-3037
-3038
-3039
-3040
-3041
-3042
-3043
-3044
-3045
-3046
-3047
-3048
-3049
-3050
-3051
-3052
-3053
-3054
-3055
-3056
-3057
-3058
-3059
-3060
-3061
-3062
-3063
-3064
-3065
-3066
-3067
-3068
-3069
-3070
-3071
-3072
-3073
-3074
-3075
-3076
-3077
-3078
-3079
-3080
-3081
-3082
-3083
-3084
-3085
-3086
-3087
-3088
-3089
-3090
-3091
-3092
-3093
-3094
-3095
-3096
-3097
-3098
-3099
-3100
-3101
-3102
-3103
-3104
-3105
-3106
-3107
-3108
-3109
-3110
-3111
-3112
-3113
-3114
-3115
-3116
-3117
-3118
-3119
-3120
-3121
-3122
-3123
-3124
-3125
-3126
-3127
-3128
-3129
-3130
-3131
-3132
-3133
-3134
-3135
-3136
-3137
-3138
-3139
-3140
-3141
-3142
-3143
-3144
-3145
-3146
-3147
-3148
-3149
-3150
-3151
-3152
-3153
-3154
-3155
-3156
-3157
-3158
-3159
-3160
-3161
-3162
-3163
-3164
-3165
-3166
-3167
-3168
-3169
-3170
-3171
-3172
-3173
-3174
-3175
-3176
-3177
-3178
-3179
-3180
-3181
-3182
-3183
-3184
-3185
-3186
-3187
-3188
-3189
-3190
-3191
-3192
-3193
-3194
-3195
-3196
-3197
-3198
-3199
-3200
-3201
-3202
-3203
-3204
-3205
-3206
-3207
-3208
-3209
-3210
-3211
-3212
-3213
-3214
-3215
-3216
-3217
-3218
-3219
-3220
-3221
-3222
-3223
-3224
-3225
-3226
-3227
-3228
-3229
-3230
-3231
-3232
-3233
-3234
-3235
-3236
-3237
-3238
-3239
-3240
-3241
-3242
-3243
-3244
-3245
-3246
-3247
-3248
-3249
-3250
-3251
-3252
-3253
-3254
-3255
-3256
-3257
-3258
-3259
-3260
-3261
-3262
-3263
-3264
-3265
-3266
-3267
-3268
-3269
-3270
-3271
-3272
-3273
-3274
-3275
-3276
-3277
-3278
-3279
-3280
-3281
-3282
-3283
-3284
-3285
-3286
-3287
-3288
-3289
-3290
-3291
-3292
-3293
-3294
-3295
-3296
-3297
-3298
-3299
-3300
-3301
-3302
-3303
-3304
-3305
-3306
-3307
-3308
-3309
-3310
-3311
-3312
-3313
-3314
-3315
-3316
-3317
-3318
-3319
-3320
-3321
-3322
-3323
-3324
-3325
-3326
-3327
-3328
-3329
-3330
-3331
-3332
-3333
-3334
-3335
-3336
-3337
-3338
-3339
-3340
-3341
-3342
-3343
-3344
-3345
-3346
-3347
-3348
-3349
-3350
-3351
-3352
-3353
-3354
-3355
-3356
-3357
-3358
-3359
-3360
-3361
-3362
-3363
-3364
-3365
-3366
-3367
-3368
-3369
-3370
-3371
-3372
-3373
-3374
-3375
-3376
-3377
-3378
-3379
-3380
-3381
-3382
-3383
-3384
-3385
-3386
-3387
-3388
-3389
-3390
-3391
-3392
-3393
-3394
-3395
-3396
-3397
-3398
-3399
-3400
-3401
-3402
-3403
-3404
-3405
-3406
-3407
-3408
-3409
-3410
-3411
-3412
-3413
-3414
-3415
-3416
-3417
-3418
-3419
-3420
-3421
-3422
-3423
-3424
-3425
-3426
-3427
-3428
-3429
-3430
-3431
-3432
-3433
-3434
-3435
-3436
-3437
-3438
-3439
-3440
-3441
-3442
-3443
-3444
-3445
-3446
-3447
-3448
-3449
-3450
-3451
-3452
-3453
-3454
-3455
-3456
-3457
-3458
-3459
-3460
-3461
-3462
-3463
-3464
-3465
-3466
-3467
-3468
-3469
-3470
-3471
-3472
-3473
-3474
-3475
-3476
-3477
-3478
-3479
-3480
-3481
-3482
-3483
-3484
-3485
-3486
-3487
-3488
-3489
-3490
-3491
-3492
-3493
-3494
-3495
-3496
-3497
-3498
-3499
-3500
-3501
-3502
-3503
-3504
-3505
-3506
-3507
-3508
-3509
-3510
-3511
-3512
-3513
-3514
-3515
-3516
-3517
-3518
-3519
-3520
-3521
-3522
-3523
-3524
-3525
-3526
-3527
-3528
-3529
-3530
-3531
-3532
-3533
-3534
-3535
-3536
-3537
-3538
-3539
-3540
-3541
-3542
-3543
-3544
-3545
-3546
-3547
-3548
-3549
-3550
-3551
-3552
-3553
-3554
-3555
-3556
-3557
-3558
-3559
-3560
-3561
-3562
-3563
-3564
-3565
-3566
-3567
-3568
-3569
-3570
-3571
-3572
-3573
-3574
-3575
-3576
-3577
-3578
-3579
-3580
-3581
-3582
-3583
-3584
-3585
-3586
-3587
-3588
-3589
-3590
-3591
-3592
-3593
-3594
-3595
-3596
-3597
-3598
-3599
-3600
-3601
-3602
-3603
-3604
-3605
-3606
-3607
-3608
-3609
-3610
-3611
-3612
-3613
-3614
-3615
-3616
-3617
-3618
-3619
-3620
-3621
-3622
-3623
-3624
-3625
-3626
-3627
-3628
-3629
-3630
-3631
-3632
-3633
-3634
-3635
-3636
-3637
-3638
-3639
-3640
-3641
-3642
-3643
-3644
-3645
-3646
-3647
-3648
-3649
-3650
-3651
-3652
-3653
-3654
-3655
-3656
-3657
-3658
-3659
-3660
-3661
-3662
-3663
-3664
-3665
-3666
-3667
-3668
-3669
-3670
-3671
-3672
-3673
-3674
-3675
-3676
-3677
-3678
-3679
-3680
-3681
-3682
-3683
-3684
-3685
-3686
-3687
-3688
-3689
-3690
-3691
-3692
-3693
-3694
-3695
-3696
-3697
-3698
-3699
-3700
-3701
-3702
-3703
-3704
-3705
-3706
-3707
-3708
-3709
-3710
-3711
-3712
-3713
-3714
-3715
-3716
-3717
-3718
-3719
-3720
-3721
-3722
-3723
-3724
-3725
-3726
-3727
-3728
-3729
-3730
-3731
-3732
-3733
-3734
-3735
-3736
-3737
-3738
-3739
-3740
-3741
-3742
-3743
-3744
-3745
-3746
-3747
-3748
-3749
-3750
-3751
-3752
-3753
-3754
-3755
-3756
-3757
-3758
-3759
-3760
-3761
-3762
-3763
-3764
-3765
-3766
-3767
-3768
-3769
-3770
-3771
-3772
-3773
-3774
-3775
-3776
-3777
-3778
-3779
-3780
-3781
-3782
-3783
-3784
-3785
-3786
-3787
-3788
-3789
-3790
-3791
-3792
-3793
-3794
-3795
-3796
-3797
-3798
-3799
-3800
-3801
-3802
-3803
-3804
-3805
-3806
-3807
-3808
-3809
-3810
-3811
-3812
-3813
-3814
-3815
-3816
-3817
-3818
-3819
-3820
-3821
-3822
-3823
-3824
-3825
-3826
-3827
-3828
-3829
-3830
-3831
-3832
-3833
-3834
-3835
-3836
-
//!
-//! [![crates.io](https://img.shields.io/crates/v/ubits.svg)](https://crates.io/crates/ubits)
-//! [![Downloads](https://img.shields.io/crates/d/ubits.svg)](https://crates.io/crates/ubits)
-//! [![Build](https://github.com/manoadamro/ubits/actions/workflows/rust.yml/badge.svg)](https://github.com/manoadamro/ubits/actions/workflows/rust.yml)
-//! [![Docs](https://img.shields.io/docsrs/ubits)](https://manoadamro.github.io/ubits/doc/ubits/)
-//! [![Licence](https://img.shields.io/github/license/manoadamro/ubits)](https://github.com/manoadamro/ubits/blob/main/LICENSE)
-//!
-//! Bit fields and masks for rust!
-//!
-//! Provides a macro for generating [`bit field`](https://en.wikipedia.org/wiki/Bit_field) types
-//! complete with flags and some helpful trait implementations.
-//!
-//! Supports field widths of `8`, `16`, `32`, `64` and `128` bits.
-//!
-//! - [`bitfield`] - macro documentation.
-//! - [`examples`] - examples of the output generated by the [`bitfield`] macro.
-//!
-//! __Note: the example module is only complied with documentation builds
-//! and is not available for importing in the wild.__
-//!
-//!
-//! # Usage
-//!
-//! Generate a bitfield struct with a flag enum...
-//! (The following examples all use this as a definition.)
-//! ```rust
-//! use ubits::bitfield;
-//!
-//!     bitfield! {
-//!         pub u8 ExampleField
-//!         ExampleFlags {
-//!             0 : Flag0,
-//!             1 : Flag1,
-//!             2 : Flag2,
-//!             3 : Flag3,
-//!             4 : Flag4,
-//!             5 : Flag5,
-//!             6 : Flag6,
-//!             7 : Flag7,
-//!         }
-//!     }
-//! ```
-//!
-//! ## Instances
-//!
-//! From integer:
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let from_integer = ExampleField(123);
-//! assert_eq!(ExampleField(123), from_integer);
-//! ```
-//!
-//! From a binary string:
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let from_binary = ExampleField::from_binary_str("01111011");
-//! assert_eq!(ExampleField(123), from_binary)
-//! ```
-//!
-//! From ones:
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let from_ones = ExampleField::ones();
-//! assert_eq!("11111111", from_ones.as_binary());
-//! assert_eq!(255, from_ones.as_integer());
-//! ```
-//!
-//! From zeros:
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let from_zeros = ExampleField::zeros();
-//! assert_eq!("00000000", from_zeros.as_binary());
-//! assert_eq!(0, from_zeros.as_integer());
-//! ```
-//!
-//! ### Field Access
-//!
-//! Get bit value by field:
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let field = ExampleField::from_binary_str("01010101");
-//! assert!(field.get(ExampleFlags::Flag0));
-//! assert!(!field.get(ExampleFlags::Flag1));
-//! ```
-//!
-//! Get bit value by index:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let field = ExampleField::from_binary_str("01010101");
-//! assert!(field.get_index(0));
-//! assert!(!field.get_index(1));
-//! ```
-//!
-//! Set bit value by field:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! field.set(ExampleFlags::Flag1);
-//! field.set(ExampleFlags::Flag3);
-//! assert_eq!("01011111", field.as_binary());
-//! ```
-//!
-//! Set bit value by index:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! field.set_index(1);
-//! field.set_index(3);
-//! assert_eq!("01011111", field.as_binary());
-//! ```
-//!
-//! Clear bit value by field:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! field.clear(ExampleFlags::Flag0);
-//! field.clear(ExampleFlags::Flag2);
-//! assert_eq!("01010000", field.as_binary());
-//! ```
-//!
-//! Clear bit value by index:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! field.clear_index(0);
-//! field.clear_index(2);
-//! assert_eq!("01010000", field.as_binary());
-//! ```
-//!
-//! Toggle bit value by field:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! field.toggle(ExampleFlags::Flag0);
-//! assert_eq!("01010100", field.as_binary());
-//! field.toggle(ExampleFlags::Flag0);
-//! assert_eq!("01010101", field.as_binary());
-//! ```
-//!
-//! Toggle bit value by index:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! field.toggle_index(0);
-//! assert_eq!("01010100", field.as_binary());
-//! field.toggle_index(0);
-//! assert_eq!("01010101", field.as_binary());
-//! ```
-//!
-//! ### Named Getters and Setters
-//!
-//! Ubits can generate getter and setter methods for zero or more fields, if a name is provided.
-//!
-//! ```rust
-//! use ubits::bitfield;
-//!    bitfield! {
-//!        pub u8 ExampleField
-//!        ExampleFlags {
-//!            0 : Flag0 : (field_0),  // is_field_0 & set_field_0 & clear_field_0 & toggle_field_0
-//!            1 : Flag1 : (field_1),  // is_field_1 & set_field_1 & clear_field_1 & toggle_field_1
-//!            2 : Flag2,
-//!            3 : Flag3,
-//!            4 : Flag4,
-//!            5 : Flag5,
-//!            6 : Flag6,
-//!            7 : Flag7,
-//!        }
-//!    }
-//!
-//! let mut field = ExampleField::from_binary_str("01010101");
-//! assert_eq!(true, field.is_field_0());
-//! assert_eq!(false, field.is_field_1());
-//!
-//! field.set_field_1();
-//! assert_eq!(true, field.is_field_1());
-//!
-//! field.clear_field_1();
-//! assert_eq!(false, field.is_field_1());
-//!
-//! field.toggle_field_1();
-//! assert_eq!(true, field.is_field_1());
-//! ```
-//!
-//! ### Combinations
-//!
-//! Combine bit fields: <br>
-//! (use `into_combined` to consume self)
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut a = ExampleField::from_binary_str("01010101");
-//! let b = ExampleField::from_binary_str("10101010");
-//! assert_eq!("11111111", a.combine(b).as_binary());
-//! ```
-//!
-//! Get the intersection of two bitfields: <br>
-//! (use `into_intersection` to consume self)
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut a = ExampleField::from_binary_str("11000011");
-//! let b = ExampleField::from_binary_str("01111110");
-//! assert_eq!("01000010", a.intersect(b).as_binary());
-//! ```
-//!
-//! Get the diff of two bitfields: <br>
-//! (use `into_diff` to consume self)
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut a = ExampleField::from_binary_str("11000011");
-//! let b = ExampleField::from_binary_str("01100110");
-//! assert_eq!("10100101", a.diff(b).as_binary());
-//! ```
-//!
-//! ### Bitwise
-//!
-//! Both bit field instances and flags use bitwise operators to change bit values.
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut from_zeros = ExampleField::zeros();
-//! assert_eq!("00000000", from_zeros.as_binary());
-//!
-//! // set bit to 1
-//! from_zeros |= ExampleFlags::Flag1;
-//! assert_eq!("00000010", from_zeros.as_binary());
-//!
-//! // set bit back to 0
-//! from_zeros &= ExampleFlags::Flag1;
-//! assert_eq!("00000000", from_zeros.as_binary());
-//!
-//! // toggle a bit
-//! from_zeros ^= ExampleFlags::Flag1;
-//! assert_eq!("00000010", from_zeros.as_binary());
-//!
-//! from_zeros ^= ExampleFlags::Flag1;
-//! assert_eq!("00000000", from_zeros.as_binary());
-//! ```
-//!
-//! Operations can also be chained together:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut from_zeros = ExampleField::zeros() | ExampleFlags::Flag1 | ExampleFlags::Flag3;
-//! assert_eq!("00001010", from_zeros.as_binary());
-//!
-//! ```
-//!
-//! Bitfield instances can also be created from combining flags:
-//!
-//! ```rust
-//! # use ubits::bitfield;
-//! #    bitfield! {
-//! #        pub u8 ExampleField
-//! #        ExampleFlags {
-//! #            0 : Flag0,
-//! #            1 : Flag1,
-//! #            2 : Flag2,
-//! #            3 : Flag3,
-//! #            4 : Flag4,
-//! #            5 : Flag5,
-//! #            6 : Flag6,
-//! #            7 : Flag7,
-//! #        }
-//! #    }
-//!
-//! let mut from_zeros = ExampleFlags::Flag1 | ExampleFlags::Flag3;
-//! assert_eq!("00001010", from_zeros.as_binary());
-//!
-//! ```
-//!
-//! ## Fields named with flags
-//!
-//! The generated flags enum allows you to access bits by name.
-//! The flag has an associated [`u8`] value,
-//! which determines the index its target bit.
-//! (See [`bitfield`] for more info)
-//!
-//! With the following input...
-//! ```no_compile
-//! 1 0 1 0 0 1 1 0
-//! ```
-//!
-//! and the following flags...
-//! ```no_compile
-//! 0 : f1
-//! 1 : f1
-//! 2 : f2
-//! 3 : f3
-//! 4 : f4
-//! 5 : f5
-//! 6 : f6
-//! 7 : f7
-//! ```
-//!
-//! we end up with this layout.
-//!
-//! | name      | f7  | f6  | f5  | f4  | f3  | f2  | f1  | f0  |
-//! |-----------|----|----|----|----|----|----|----|----|
-//! | bit value | 1  | 0  | 1  | 0  | 0  | 1  | 1  | 0  |
-//! | index     | 7  | 6  | 5  | 4  | 3  | 2  | 1  | 0  |
-//!
-//!
-//! With the same input and only the first few flags:
-//!
-//! ```no_compile
-//! 0 : f0
-//! 1 : f1
-//! 2 : f2
-//! ```
-//!
-//! we end up with this layout.
-//!
-//! | name      |    |    |    |    |    | f2 | f1 | f0 |
-//! |-----------|----|----|----|----|----|----|----|----|
-//! | bit value | 1  | 0  | 1  | 0  | 0  | 1  | 1  | 0  |
-//! | index     | 7  | 6  | 5  | 4  | 3  | 2  | 1  | 0  |
-//!
-//!
-//! Using the same input, but with dispersed flags:
-//!
-//! ```no_compile
-//! 1 : f0
-//! 3 : f1
-//! 6 : f2
-//! ```
-//!
-//! we end up with this layout.
-//!
-//! | name      |    | f2 |    |    | f1 |    | f0 |    |
-//! |-----------|----|----|----|----|----|----|----|----|
-//! | bit value | 1  | 0  | 1  | 0  | 0  | 1  | 1  | 0  |
-//! | index     | 7  | 6  | 5  | 4  | 3  | 2  | 1  | 0  |
-//!
-
-// -------------------------------------------------------------------------------------------------
-// Imports
-
-extern crate doc_comment;
-extern crate paste;
-extern crate safe_transmute;
-
-#[doc(hidden)]
-pub use doc_comment::doc_comment as __doc_comment;
-
-#[doc(hidden)]
-pub use safe_transmute::{
-    transmute_one as __transmute_one, TriviallyTransmutable as __TriviallyTransmutable,
-};
-
-#[doc(hidden)]
-pub use paste::paste as __paste;
-
-// -------------------------------------------------------------------------------------------------
-// Generator Macros
-
-/// Generates a bitfield struct and a corresponding flag enum.
-///
-/// Can be used multiple times in a single codebase
-/// as long as the identifiers are unique or are isolated so as not to clash.
-///
-/// __See the [`examples`] module for examples of the generated output.__
-///
-/// # Args
-///
-/// - `pub` - optional accessor: if provided, both generated items will public.
-/// If omitted, both will be private. <br>
-/// [see here](https://doc.rust-lang.org/reference/visibility-and-privacy.html#visibility-and-privacy) for possible visibility options.
-///
-/// - `ExampleField` - name for the generated bitfield struct.
-/// (results in `struct ExampleField(...)`)
-///
-/// - `ExampleFlags` - name for the generated flag enum.
-/// (results in `enum ExampleFlags { ... }`)
-///
-/// - `u8` - unsigned integer type to use as a bit array. *Must be an unsigned integer* <br>
-/// valid options are: [`u8`],[`u16`], [`u32`], [`u64`], [`u128`], [`usize`]
-///
-/// - `0 : Flag0` - defines each member of the flag enum. <br>
-/// The left hand side must be a [`u8`] `(0..=254)`
-/// and must be less than the number of bits in the underlying unsigned type.
-/// This value determines the index of the target bit within the field. <br>
-/// The right hand side can be any valid identifier (unique to this enum).
-/// These identifiers will be used to access the corresponding field.
-///
-/// - `/// docstrings` - Each element can take optional docstrings.
-/// This includes the bit field struct, the flag enum, and each member within the flag enum.
-/// See [`examples`] for more information.
-///
-/// # Examples:
-///
-/// Full Example - (see below for explanation for each parameter):
-/// ```rust
-/// use ubits::bitfield;
-///
-///     bitfield! {
-///         /// Optional docstring
-///         /// for [`ExampleField`] struct
-///         pub u8 ExampleField
-///         /// Optional docstring
-///         /// for [`ExampleFlags`] enum
-///         ExampleFlags {
-///             /// Optional docstring for [`ExampleFlags::Flag0`]
-///             0 : Flag0,
-///             /// Optional docstring for [`ExampleFlags::Flag1`]
-///             1 : Flag1,
-///             /// Optional docstring for [`ExampleFlags::Flag2`]
-///             2 : Flag2,
-///             /// Optional docstring for [`ExampleFlags::Flag3`]
-///             3 : Flag3,
-///             /// Optional docstring for [`ExampleFlags::Flag4`]
-///             4 : Flag4,
-///             /// Optional docstring for [`ExampleFlags::Flag5`]
-///             5 : Flag5,
-///             /// Optional docstring for [`ExampleFlags::Flag6`]
-///             6 : Flag6,
-///             /// Optional docstring for [`ExampleFlags::Flag7`]
-///             7 : Flag7,
-///         }
-///     }
-/// ```
-///
-/// You don't have to name *all* the fields if you don't need them...
-///
-/// You can use just a few from the front:
-/// ```rust
-/// use ubits::bitfield;
-///
-///     bitfield! {
-///         /// Optional docstring
-///         /// for [`ExampleField`] struct
-///         pub u8 ExampleField
-///         /// Optional docstring
-///         /// for [`ExampleFlags`] enum
-///         ExampleFlags {
-///             /// Optional docstring for [`ExampleFlags::Flag0`]
-///             0 : Flag0,
-///             /// Optional docstring for [`ExampleFlags::Flag1`]
-///             1 : Flag1,
-///             /// Optional docstring for [`ExampleFlags::Flag2`]
-///             2 : Flag2,
-///         }
-///     }
-/// ```
-///
-/// ... or any valid indices:
-/// ```rust
-/// use ubits::bitfield;
-///
-///     bitfield! {
-///         /// Optional docstring
-///         /// for [`ExampleField`] struct
-///         pub u8 ExampleField
-///         /// Optional docstring
-///         /// for [`ExampleFlags`] enum
-///         ExampleFlags {
-///             /// Optional docstring for [`ExampleFlags::Flag0`]
-///             0 : Flag0,
-///             /// Optional docstring for [`ExampleFlags::Flag1`]
-///             3 : Flag1,
-///             /// Optional docstring for [`ExampleFlags::Flag2`]
-///             6 : Flag2,
-///         }
-///     }
-/// ```
-/// ... or just omit the flags altogether and use indices only.:
-/// ```rust
-/// use ubits::bitfield;
-///     bitfield! {
-///         /// Optional docstring
-///         /// for [`ExampleField`] struct
-///         pub u8 ExampleField
-///     }
-/// ```
-/// __Note: if you omit flags, no flag enum will be generated
-/// and no methods for the bitfield struct that rely on flags will be generated.__
-///
-#[macro_export(local_inner_macros)]
-macro_rules! bitfield {
-
-    // U8
-    (
-        $(#[$doc:meta])*
-        $access:vis u8 $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( : ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-        __bitfield_unchecked!( $(#[$doc])* $access [u8] [8] [u8::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
-    };
-
-    // U16
-    (
-        $(#[$doc:meta])*
-        $access:vis u16 $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-        __bitfield_unchecked!( $(#[$doc])* $access [u16] [16] [u16::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
-    };
-
-    // U32
-    (
-        $(#[$doc:meta])*
-        $access:vis u32 $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-        __bitfield_unchecked!( $(#[$doc])* $access [u32] [32] [u32::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
-    };
-
-    // U64
-    (
-        $(#[$doc:meta])*
-        $access:vis u64 $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-        __bitfield_unchecked!( $(#[$doc])* $access [u64] [64] [u64::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
-    };
-
-    // U128
-    (
-        $(#[$doc:meta])*
-        $access:vis u128 $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-        __bitfield_unchecked!( $(#[$doc])* $access [u128] [128] [u128::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
-    };
-
-    // USIZE
-    (
-        $(#[$doc:meta])*
-        $access:vis usize $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-        __bitfield_unchecked!( $(#[$doc])* $access [usize] [usize::BITS as usize] [usize::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
-    };
-}
-
-/// Not to be used directly.
-///
-/// Generates a bitfield struct and flag enum
-/// but does no type checking.
-/// Passing types that aren't unsigned integer types is undefined behaviour.
-///
-/// Use the [`bitfield`] macro instead as it enforces a closed set of types.
-#[doc(hidden)]
-#[macro_export(local_inner_macros)]
-macro_rules! __bitfield_unchecked {
-    (
-        $(#[$field_doc:meta])*
-        $access:vis [$type:ty] [$($bits:tt)*] [$max:path] $name:ident
-        $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-
-        $(
-            __def_flag_enum! {
-                $(#[$flag_doc])*
-                $access $name
-                $flag {
-                    $(
-                        $(#[$member_doc])*
-                        $idx : $field $(($named_getter))?,
-                    )*
-                }
-            }
-        )?
-
-        __def_field_struct! {
-            $(#[$field_doc])*
-            $access [$type] [$($bits)*] [$max] $name
-            $(
-                $flag {
-                    $(
-                        $(#[$member_doc])*
-                        $idx : $field $(($named_getter))?,
-                    )*
-                }
-            )?
-        }
-    };
-}
-
-// -------------------------------------------------------------------------------------------------
-// Type Definitions
-
-/// Defines a field struct with its members and implementations
-#[doc(hidden)]
-#[macro_export(local_inner_macros)]
-macro_rules! __def_field_struct {
-    (
-        $(#[$field_doc:meta])*
-        $access:vis [$type:ty] [$($bits:tt)*] [$max:path] $name:ident
-        $(
-            $flag:ident {
-                $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
-            }
-        )?
-    ) => {
-
-        // Struct: $name
-        $(#[$field_doc])*
-        #[derive(Copy, Clone, PartialEq, PartialOrd)]
-        $access struct $name($type);
-
-        $(
-            impl $name {
-                $(
-                    $(
-                        __paste! {
-                            fn [< is_ $named_getter >](&self) -> bool {
-                                self.get($flag::$field)
-                            }
-                        }
-
-                        __paste! {
-                            fn [< set_ $named_getter >](&mut self) {
-                                self.set($flag::$field);
-                            }
-                        }
-
-                        __paste! {
-                            fn [< clear_ $named_getter >](&mut self) {
-                                self.clear($flag::$field);
-                            }
-                        }
-
-                        __paste! {
-                            fn [< toggle_ $named_getter >](&mut self) {
-                                self.toggle($flag::$field);
-                            }
-                        }
-                    )?
-                )*
-            }
-        )?
-
-        // Constants
-        __impl_field_constants! {
-            $name { type: $type, max: $max, bits: [$($bits)*] }
-        }
-
-        // Constructors
-        __impl_field_ctors! {
-            $name : $type
-        }
-
-        // State
-        __impl_field_state! {
-            $name : $type
-        }
-
-        // Indexers
-        __impl_field_index_accessors! {
-            $name
-        }
-
-        $(
-            // Flags
-            __impl_field_flag_accessors! {
-                $name $flag $type
-            }
-        )?
-
-        // Combinators
-        __impl_field_flag_combinators! {
-            $name
-        }
-
-        // Converters
-        __impl_field_flag_converters! {
-            $name
-        }
-
-        // Name: $name
-        __impl_default! {
-            $name => { $name(0) }
-        }
-
-        // From: $type -> $name
-        __impl_from! {
-            /// Returns a field instance from value of its underlying type.
-            $type as $name (value) => {
-                $name(value)
-            }
-        }
-
-        $(
-            // From: $flag -> $name
-            __impl_from! {
-                /// Returns a field instance from a flag.
-                $flag as $name (value) => {
-                    Self(0 | (1 << (value as $type)) )
-                }
-            }
-        )?
-
-        // Bitwise: $name + $name
-        __impl_bitwise_operators! {
-            [Self] for $name : (self rhs -> Self)
-            BitAnd => { Self(self.0 & rhs.0) }
-            BitOr => { Self(self.0 | rhs.0) }
-            BitXor => {  Self(self.0 ^ rhs.0) }
-            BitAndAssign => { self.0 &= rhs.0; }
-            BitOrAssign => { self.0 |= rhs.0; }
-            BitXorAssign => { self.0 ^= rhs.0; }
-        }
-
-        $(
-            // Bitwise: $name + $flag
-            __impl_bitwise_operators! {
-                [$flag] for $name : (self rhs -> $name)
-                BitAnd => { $name(self.0 & !(1 << (rhs as $type))) }
-                BitOr => { $name(self.0 | (1 << (rhs as $type))) }
-                BitXor => { $name(self.0 ^ (1 << (rhs as $type))) }
-                BitAndAssign => { self.clear(rhs); }
-                BitOrAssign => { self.set(rhs); }
-                BitXorAssign => { self.toggle(rhs); }
-            }
-
-            // Bitwise: &$name + $flag
-            __impl_bitwise_operators! {
-                [$flag] for & $name : (self rhs -> $name)
-                BitAnd => { $name(self.0 & !(1 << (rhs as $type))) }
-                BitOr => { $name(self.0 | (1 << (rhs as $type))) }
-                BitXor => { $name(self.0 ^ (1 << (rhs as $type))) }
-            }
-
-            // Bitwise: $mut $name + $flag
-            __impl_bitwise_operators! {
-                [$flag] for &mut $name : (self rhs -> $name)
-                BitAnd => { $name(self.0 & !(1 << (rhs as $type))) }
-                BitOr => { $name(self.0 | (1 << (rhs as $type))) }
-                BitXor => { $name(self.0 ^ (1 << (rhs as $type))) }
-            }
-        )?
-
-        // Bitwise: Debug & Binary
-        __impl_formatters! {
-            $name (self f) {
-                Debug => { core::write!(f, "{}({})", core::stringify!($name), self.as_binary()) }
-                Binary => { core::write!(f, "{}", self.as_binary()) }
-            }
-        }
-    };
-}
-
-/// Defines a flag enum with its members and implementations
-#[doc(hidden)]
-#[macro_export(local_inner_macros)]
-macro_rules! __def_flag_enum {
-    (
-        $(#[$flag_doc:meta])*
-        $access:vis $name:ident
-        $flag:ident {
-            $(
-                $(#[$member_doc:meta])*
-                $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-            )*
-        }
-    ) => {
-
-        // Enum: $flag
-        $(#[$flag_doc])*
-        #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
-        #[repr(u8)]
-        $access enum $flag {
-            $( $(#[$member_doc])* $field = $idx ),*
-        }
-
-        // Bitwise: $flag + $flag
-        __impl_bitwise_operators! {
-            [Self] for $flag : (self rhs -> $name)
-            BitAnd => { $name(0).clear(self) & rhs }
-            BitOr => { $name(0).set(self) | rhs }
-            BitXor => { $name(0).toggle(self) ^ rhs }
-        }
-
-        // Bitwise: u8 -> $flag
-        __impl_from! {
-            /// Converts a [`u8`] to a flag
-            ///
-            /// # Errors
-            ///
-            /// Panics if the supplied [`u8`] is out of range for fields base type.
-            /// eg: for a 16-bit field (using [`u16`]),
-            /// providing an index of `20` will cause a panic.
-            u8 as $flag (value) => {
-                $crate::__transmute_one::<$flag>(&[value])
-                .expect(std::format!(
-                    "failed to transmute {} to {}. {} is not a valid index in {}.",
-                    value,
-                    core::stringify!($flag),
-                    value,
-                    core::stringify!($flag)
-                ).as_str())
-            }
-        }
-
-        // Bitwise: $flag -> u8
-        __impl_from! {
-            /// Returns a flag as its corresponding [`u8`] value.
-            $flag as u8 (value) => {
-                value as u8
-            }
-        }
-
-        unsafe impl $crate::__TriviallyTransmutable for $flag {}
-    };
-}
-
-// -------------------------------------------------------------------------------------------------
-// Field Implementations
-
-/// Generates constants for `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_constants {
-    ($name:ident { type: $type:ty, max: $max:path, bits: [$($bits:tt)*] }) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Constant values describing [`", core::stringify!($name), "`]."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Number of bits in an instance of [`", core::stringify!($name), "`]."
-                    ),
-                    pub const BITS: usize = $($bits)*;
-                }
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Number of bytes used by an instance of [`", core::stringify!($name), "`]."
-                    ),
-                    pub const BYTES: usize = $($bits)* / 8;
-                }
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Maximum valid integer for [`", core::stringify!($name), "`]."
-                    ),
-                    pub const MAX: $type = $max;
-                }
-            }
-        }
-    };
-}
-
-/// Generates constructors for `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_ctors {
-    ( $name:ident : $type:ty ) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Constructors for creating instances of [`", core::stringify!($name), "`]."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Create a new instance of [`", core::stringify!($name), "`] ",
-                      "from a [`", core::stringify!($type), "`] value."
-                    ),
-                    pub fn new(value: $type) -> Self {
-                        Self(value)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Create a new instance of [`", core::stringify!($name), "`] ",
-                      "from `0`."
-                    ),
-                    pub fn zeros() -> Self {
-                        Self(0)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Create a new instance of [`", core::stringify!($name), "`] ",
-                      "from the maximum possible integer value."
-                    ),
-                    pub fn ones() -> Self {
-                        Self(Self::MAX)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Create a new instance of [`", core::stringify!($name), "`] ",
-                      "from a binary string."
-                    ),
-                    pub fn from_binary_str(value: &str) -> Self {
-                        Self(<$type>::from_str_radix(value, 2).unwrap())
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Create a new instance of [`", core::stringify!($name), "`] ",
-                      "from a binary string."
-                    ),
-                    pub fn from_binary_string(value: String) -> Self {
-                        Self(<$type>::from_str_radix(value.as_str(), 2).unwrap())
-                    }
-                }
-            }
-        }
-    };
-}
-
-/// Generates getters for state fields in `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_state {
-    ($name:ident : $type:ty) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Current state of this bitfield."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Returns the current field value as a [`", core::stringify!($type), "`]"
-                    ),
-                    pub fn as_integer(&self) -> $type {
-                        self.0
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                      "Returns the current field value as a binary formatted string."
-                    ),
-                    pub fn as_binary(&self) -> String {
-                        std::format!("{:0width$b}", self.0, width = Self::BITS)
-                    }
-                }
-            }
-        }
-    };
-}
-
-/// Generates getters by index for bit fields in `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_index_accessors {
-    ($name:ident) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Field accessors by index for [`", core::stringify!($name), "`]."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns the value of the bit at the supplied index as a boolean."
-                    ),
-                    pub fn get_index(&self, index: u8) -> bool {
-                        ((self.0 >> index) & 1) == 1
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Sets the value of the bit at the supplied index to `1`."
-                    ),
-                    pub fn set_index(&mut self, index: u8) {
-                        self.0 |= (1 << index);
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Sets the value of the bit at the supplied index to `0`."
-                    ),
-                    pub fn clear_index(&mut self, index: u8) {
-                        self.0 &= !(1 << index);
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Flips the value of the bit at the supplied index."
-                    ),
-                    pub fn toggle_index(&mut self, index: u8) {
-                        self.0 ^= (1 << index);
-                    }
-                }
-            }
-        }
-    };
-}
-
-/// Generates getters by flag for bit fields in `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_flag_accessors {
-    ($name:ident $flag:ident $type:ty) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Named field accessors by [`", core::stringify!($flag), "`] for [`", core::stringify!($name), "`]."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns the value of the bit at the supplied flag as a boolean."
-                    ),
-                    pub fn get(&self, flag: $flag) -> bool {
-                        ((self.0 >> (flag as $type)) & 1) == 1
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Sets the value of the bit at the supplied flag to `1`."
-                    ),
-                    pub fn set(&mut self, flag: $flag) -> &mut Self {
-                        self.0 |= (1 << (flag as $type));
-                        self
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Sets the value of the bit at the supplied flag to `0`."
-                    ),
-                    pub fn clear(&mut self, flag: $flag) -> &mut Self {
-                        self.0 &= !(1 << (flag as $type));
-                        self
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Flips the value of the bit at the supplied flag."
-                    ),
-                    pub fn toggle(&mut self, flag: $flag) -> &mut Self {
-                        self.0 ^= (1 << (flag as $type));
-                        self
-                    }
-                }
-            }
-        }
-    };
-}
-
-/// Generates combinator methods for `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_flag_combinators {
-    ($name:ident) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Combinators for [`", core::stringify!($name), "`]."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns a new [`", core::stringify!($name), "`]",
-                        "with ones for flags that do not match. ",
-                        "Does not consume `self`."
-                    ),
-                    pub fn diff(&self, other: Self) -> Self {
-                        Self(self.0 ^ other.0)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns a new [`", core::stringify!($name), "`]",
-                        "with ones for flags that were set on either input. ",
-                        "Does not consume `self`."
-                    ),
-                    pub fn combine(&self, other: Self) -> Self {
-                        Self(self.0 | other.0)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns a new [`", core::stringify!($name), "`]",
-                        "with ones for flags that were set on both inputs. ",
-                        "Does not consume `self`."
-                    ),
-                    pub fn intersect(&self, other: Self) -> Self {
-                        Self(self.0 & other.0)
-                    }
-                }
-            }
-        }
-    };
-}
-
-/// Generates conversion methods for `$name`
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_field_flag_converters {
-    ($name:ident) => {
-        $crate::__doc_comment! {
-            core::concat!(
-                "Conversion methods."
-            ),
-            impl $name {
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns a new [`", core::stringify!($name), "`]",
-                        "with ones for flags that do not match. ",
-                        "Consumes `self`."
-                    ),
-                    pub fn into_diff(self, other: Self) -> Self {
-                        Self(self.0 ^ other.0)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns a new [`", core::stringify!($name), "`]",
-                        "with ones for flags that were set on either input. ",
-                        "Consumes `self`."
-                    ),
-                    pub fn into_combined(self, other: Self) -> Self {
-                        Self(self.0 | other.0)
-                    }
-                }
-
-                $crate::__doc_comment! {
-                    core::concat!(
-                        "Returns a new [`", core::stringify!($name), "`]",
-                        "with ones for flags that were set on both inputs. ",
-                        "Consumes `self`."
-                    ),
-                    pub fn into_intersection(self, other: Self) -> Self {
-                        Self(self.0 & other.0)
-                    }
-                }
-            }
-        }
-    };
-}
-
-// -------------------------------------------------------------------------------------------------
-// Trait Implementations
-
-// Operators
-
-/// Generates a set of bitwise operators
-/// for a set of parameters
-#[doc(hidden)]
-#[macro_export(local_inner_macros)]
-macro_rules! __impl_bitwise_operators {
-
-    // Owned
-    (
-        [$flag:ty] for $dest:ident : ($self:ident $other:ident -> $output:ident)
-        $( BitAnd => $bitand:block )?
-        $( BitOr => $bitor:block )?
-        $( BitXor => $bitxor:block )?
-        $( BitAndAssign => $bitand_assign:block )?
-        $( BitOrAssign => $bitor_assign:block )?
-        $( BitXorAssign => $bitxor_assign:block )?
-    ) => {
-        $( __impl_operator! {BitAnd [$flag] bitand for $dest ($self $other -> $output) => $bitand} )?
-        $( __impl_operator! {BitOr [$flag] bitor for $dest ($self $other -> $output) => $bitor} )?
-        $( __impl_operator! {BitXor [$flag] bitxor for $dest ($self $other -> $output) => $bitxor} )?
-
-        $( __impl_assign_operator! {BitAndAssign [$flag] bitand_assign for $dest ($self $other) => $bitand_assign} )?
-        $( __impl_assign_operator! {BitOrAssign [$flag] bitor_assign for $dest ($self $other) => $bitor_assign} )?
-        $( __impl_assign_operator! {BitXorAssign [$flag] bitxor_assign for $dest ($self $other) => $bitxor_assign} )?
-    };
-
-    // Reference
-    (
-        [$flag:ty] for & $dest:ident : ($self:ident $other:ident -> $output:ident)
-        $( BitAnd => $bitand:block )?
-        $( BitOr => $bitor:block )?
-        $( BitXor => $bitxor:block )?
-    ) => {
-        $( __impl_operator! {BitAnd [$flag] bitand for & $dest ($self $other -> $output) => $bitand} )?
-        $( __impl_operator! {BitOr [$flag] bitor for & $dest ($self $other -> $output) => $bitor} )?
-        $( __impl_operator! {BitXor [$flag] bitxor for & $dest ($self $other -> $output) => $bitxor} )?
-    };
-
-    // Mutable Reference
-    (
-        [$flag:ty] for &mut $dest:ident : ($self:ident $other:ident -> $output:ident)
-        $( BitAnd => $bitand:block )?
-        $( BitOr => $bitor:block )?
-        $( BitXor => $bitxor:block )?
-    ) => {
-        $( __impl_operator! {BitAnd [$flag] bitand for &mut $dest ($self $other -> $output) => $bitand} )?
-        $( __impl_operator! {BitOr [$flag] bitor for &mut $dest ($self $other -> $output) => $bitor} )?
-        $( __impl_operator! {BitXor [$flag] bitxor for &mut $dest ($self $other -> $output) => $bitxor} )?
-    };
-}
-
-/// Generates a generic operator
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_operator {
-
-    // Owned
-    ( $op_type:ident [$rhs:ty] $op_lower:ident for $dest:ident ($self:ident $other:ident -> $output:ident) => $block:block ) => {
-        impl std::ops::$op_type<$rhs> for $dest {
-            type Output = $output;
-            fn $op_lower($self, $other: $rhs) -> Self::Output $block
-        }
-    };
-
-    // Reference
-    ( $op_type:ident [$rhs:ty] $op_lower:ident for & $dest:ident ($self:ident $other:ident -> $output:ident) => $block:block ) => {
-        impl std::ops::$op_type<$rhs> for &$dest {
-            type Output = $output;
-            fn $op_lower($self, $other: $rhs) -> Self::Output $block
-        }
-    };
-
-    // Mutable Reference
-    ( $op_type:ident [$rhs:ty] $op_lower:ident for &mut $dest:ident ($self:ident $other:ident -> $output:ident) => $block:block ) => {
-        impl std::ops::$op_type<$rhs> for &mut $dest {
-            type Output = $output;
-            fn $op_lower($self, $other: $rhs) -> Self::Output $block
-        }
-    };
-}
-
-/// Generates a generic assign operator
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_assign_operator {
-    ( $op_type:ident [$rhs:ty] $op_lower:ident for $dest:ident ($self:ident $other:ident) => $block:block ) => {
-        impl std::ops::$op_type<$rhs> for $dest {
-            fn $op_lower(&mut $self, $other: $rhs) $block
-        }
-    };
-}
-
-// Defaults
-
-/// Generates a [`Default`] implementation.
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_default {
-    ($name:ident => $block:block) => {
-        impl Default for $name {
-            fn default() -> Self $block
-        }
-    };
-}
-
-// Converters
-
-/// Generates a [`From`] implementation.
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_from {
-    ($(#[$doc:meta])* $from:ty as $to:ident ($arg:ident) => $block:block) => {
-        $(#[$doc])*
-        impl From<$from> for $to {
-            fn from($arg: $from) -> $to $block
-        }
-    };
-}
-
-// Formatters
-
-/// Generates formatter implementations
-/// from a set of parameters.
-#[doc(hidden)]
-#[macro_export(local_inner_macros)]
-macro_rules! __impl_formatters {
-    ($name:ident ($self:ident $f:ident) { $( $formatter:ident => $block:block )+ } ) => {
-        $( __impl_formatter!($formatter for $name ($self $f) => $block); )+
-    };
-}
-
-/// Generates a generic formatter implementation.
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __impl_formatter {
-    ($formatter:ident for $name:ident ($self:ident $f:ident) => $block:block) => {
-        impl std::fmt::$formatter for $name {
-            fn fmt(&$self, $f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result $block
-        }
-    };
-}
-
-// -------------------------------------------------------------------------------------------------
-// Example
-
-#[allow(dead_code)]
-#[allow(unused_variables)]
-#[cfg(doc)]
-pub mod examples {
-    //! Examples of generated output using different configurations.
-    //!
-    //! __This module is only compiled with documentation builds
-    //! and will not be available for import.__
-    //!
-    //! use the [`bitfield`] macro to generate a field struct and flag enum.
-    //!
-
-    #[allow(dead_code)]
-    #[allow(unused_variables)]
-    #[cfg(doc)]
-    pub mod full_example {
-        //! Example of generated output, using both a bit field and a flag enum.
-        //!
-        //! __This module is only compiled with documentation builds
-        //! and will not be available for import.__
-        //!
-        //! use the [`bitfield`] macro to generate a field struct and flag enum.
-        //!
-        use super::*;
-
-        bitfield! {
-            /// Optional docstring for my example bit field.
-            pub u8 ExampleField
-            /// Optional docstring for my flag enum.
-            ExampleFlags {
-                /// Optional docstring for Flag0
-                0 : Flag0,
-                /// Optional docstring for Flag1
-                1 : Flag1,
-                /// Optional docstring for Flag2
-                2 : Flag2,
-                /// Optional docstring for Flag3
-                3 : Flag3,
-                /// Optional docstring for Flag4
-                4 : Flag4,
-                /// Optional docstring for Flag5
-                5 : Flag5,
-                /// Optional docstring for Flag6
-                6 : Flag6,
-                /// Optional docstring for Flag7
-                7 : Flag7,
-            }
-        }
-    }
-
-    #[allow(dead_code)]
-    #[allow(unused_variables)]
-    #[cfg(doc)]
-    pub mod flagless_example {
-        //! Example of generated output, using only a bit field without a flag enum.
-        //!
-        //! __This module is only compiled with documentation builds
-        //! and will not be available for import.__
-        //!
-        //! use the [`bitfield`] macro to generate a field struct and flag enum.
-        //!
-        use super::*;
-
-        bitfield! {
-            /// Optional docstring for my example bit field.
-            pub u8 ExampleField
-        }
-    }
-}
-
-// -------------------------------------------------------------------------------------------------
-// Tests
-
-#[allow(dead_code)]
-#[allow(unused_variables)]
-#[cfg(test)]
-mod test {
-    use super::*;
-    use std::{u128, u16, u32, u64, usize};
-
-    macro_rules! tests {
-        ( $( $name:ident => $block:block )+ ) => {
-            $(
-                #[test]
-                fn $name() $block
-            )+
-        };
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u8 MyFieldU8
-        MyFlagsU8 {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u16 MyFieldU16
-        MyFlagsU16 {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u32 MyFieldU32
-        MyFlagsU32 {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u64 MyFieldU64
-        MyFlagsU64 {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
-            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
-            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
-            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u128 MyFieldU128
-        MyFlagsU128 {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
-            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
-            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
-            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
-            64 : Flag64, 65 : Flag65, 66 : Flag66, 67 : Flag67, 68 : Flag68, 69 : Flag69, 70 : Flag70, 71 : Flag71,
-            72 : Flag72, 73 : Flag73, 74 : Flag74, 75 : Flag75, 76 : Flag76, 77 : Flag77, 78 : Flag78, 79 : Flag79,
-            80 : Flag80, 81 : Flag81, 82 : Flag82, 83 : Flag83, 84 : Flag84, 85 : Flag85, 86 : Flag86, 87 : Flag87,
-            88 : Flag88, 89 : Flag89, 90 : Flag90, 91 : Flag91, 92 : Flag92, 93 : Flag93, 94 : Flag94, 95 : Flag95,
-            96 : Flag96, 97 : Flag97, 98 : Flag98, 99 : Flag99, 100 : Flag100, 101 : Flag101, 102 : Flag102, 103 : Flag103,
-            104 : Flag104, 105 : Flag105, 106 : Flag106, 107 : Flag107, 108 : Flag108, 109 : Flag109, 110 : Flag110, 111 : Flag111,
-            112 : Flag112, 113 : Flag113, 114 : Flag114, 115 : Flag115, 116 : Flag116, 117 : Flag117, 118 : Flag118, 119 : Flag119,
-            120 : Flag120, 121 : Flag121, 122 : Flag122, 123 : Flag123, 124 : Flag124, 125 : Flag125, 126 : Flag126, 127 : Flag127,
-        }
-    }
-
-    #[cfg(target_pointer_width = "64")]
-    bitfield! {
-        /// My Test Thing
-        usize MyFieldUsize
-        MyFlagsUsize {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
-            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
-            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
-            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
-        }
-    }
-
-    #[cfg(target_pointer_width = "32")]
-    bitfield! {
-        /// My Test Thing
-        usize MyFieldUsize
-        MyFlagsUsize {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u8 MyFieldU8Nf
-        MyFlagsU8Nf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u16 MyFieldU16Nf
-        MyFlagsU16Nf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u32 MyFieldU32Nf
-        MyFlagsU32Nf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u64 MyFieldU64Nf
-        MyFlagsU64Nf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
-            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
-            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
-            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
-        }
-    }
-
-    bitfield! {
-        /// My Test Thing
-        u128 MyFieldU128Nf
-        MyFlagsU128Nf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
-            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
-            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
-            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
-            64 : Flag64, 65 : Flag65, 66 : Flag66, 67 : Flag67, 68 : Flag68, 69 : Flag69, 70 : Flag70, 71 : Flag71,
-            72 : Flag72, 73 : Flag73, 74 : Flag74, 75 : Flag75, 76 : Flag76, 77 : Flag77, 78 : Flag78, 79 : Flag79,
-            80 : Flag80, 81 : Flag81, 82 : Flag82, 83 : Flag83, 84 : Flag84, 85 : Flag85, 86 : Flag86, 87 : Flag87,
-            88 : Flag88, 89 : Flag89, 90 : Flag90, 91 : Flag91, 92 : Flag92, 93 : Flag93, 94 : Flag94, 95 : Flag95,
-            96 : Flag96, 97 : Flag97, 98 : Flag98, 99 : Flag99, 100 : Flag100, 101 : Flag101, 102 : Flag102, 103 : Flag103,
-            104 : Flag104, 105 : Flag105, 106 : Flag106, 107 : Flag107, 108 : Flag108, 109 : Flag109, 110 : Flag110, 111 : Flag111,
-            112 : Flag112, 113 : Flag113, 114 : Flag114, 115 : Flag115, 116 : Flag116, 117 : Flag117, 118 : Flag118, 119 : Flag119,
-            120 : Flag120, 121 : Flag121, 122 : Flag122, 123 : Flag123, 124 : Flag124, 125 : Flag125, 126 : Flag126, 127 : Flag127,
-        }
-    }
-
-    #[cfg(target_pointer_width = "64")]
-    bitfield! {
-        /// My Test Thing
-        usize MyFieldUsizeNf
-        MyFlagsUsizeNf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
-            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
-            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
-            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
-        }
-    }
-
-    #[cfg(target_pointer_width = "32")]
-    bitfield! {
-        /// My Test Thing
-        usize MyFieldUsizeNf
-        MyFlagsUsizeNf {
-            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
-            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
-            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
-            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
-        }
-    }
-
-    const U8: u8 = 123;
-    const B8: &str = "01111011";
-    const U16: u16 = 51526;
-    const B16: &str = "1100100101000110";
-    const U32: u32 = 2828091834;
-    const B32: &str = "10101000100100010100000110111010";
-    const U64: u64 = 18325744043706550615;
-    const B64: &str = "1111111001010010000111110001110100100001110111000000100101010111";
-    const U128: u128 = 160140183460469230739687303714882104727;
-    const B128: &str = "01111000011110011110000010100001011000111110000100101011010111011111111110000110011101100010110100100000110001101010110110010111";
-
-    #[cfg(target_pointer_width = "64")]
-    const USIZE: usize = 18325744043706550615;
-    #[cfg(target_pointer_width = "64")]
-    const BSIZE: &str = "1111111001010010000111110001110100100001110111000000100101010111";
-
-    #[cfg(target_pointer_width = "32")]
-    const USIZE: usize = 2828091834;
-    #[cfg(target_pointer_width = "32")]
-    const BSIZE: &str = "10101000100100010100000110111010";
-
-    // constructors
-    tests! {
-        new_u8 => {
-            MyFieldU8(U8);
-        }
-        new_u16 => {
-            MyFieldU16(U16);
-        }
-        new_u32 => {
-            MyFieldU32(U32);
-        }
-        new_u64 => {
-            MyFieldU64(U64);
-        }
-        new_u128 => {
-            MyFieldU128(U128);
-        }
-        new_usize => {
-            MyFieldUsize(USIZE);
-        }
-    }
-
-    // from binary str
-    tests! {
-        from_binary_str_u8 => {
-            assert_eq!(MyFieldU8::from_binary_str(B8), MyFieldU8(U8));
-        }
-        from_binary_str_u16 => {
-            assert_eq!(MyFieldU16::from_binary_str(B16), MyFieldU16(U16));
-        }
-        from_binary_str_u32 => {
-            assert_eq!(MyFieldU32::from_binary_str(B32), MyFieldU32(U32));
-        }
-        from_binary_str_u64 => {
-            assert_eq!(MyFieldU64::from_binary_str(B64), MyFieldU64(U64));
-        }
-        from_binary_str_u128 => {
-            assert_eq!(MyFieldU128::from_binary_str(B128), MyFieldU128(U128));
-        }
-        from_binary_str_usize => {
-            assert_eq!(MyFieldUsize::from_binary_str(BSIZE), MyFieldUsize(USIZE));
-        }
-    }
-
-    // from binary string
-    tests! {
-        from_binary_string_u8 => {
-            assert_eq!(MyFieldU8::from_binary_string(String::from(B8)), MyFieldU8(U8));
-        }
-        from_binary_string_u16 => {
-            assert_eq!(MyFieldU16::from_binary_string(String::from(B16)), MyFieldU16(U16));
-        }
-        from_binary_string_u32 => {
-            assert_eq!(MyFieldU32::from_binary_string(String::from(B32)), MyFieldU32(U32));
-        }
-        from_binary_string_u64 => {
-            assert_eq!(MyFieldU64::from_binary_string(String::from(B64)), MyFieldU64(U64));
-        }
-        from_binary_string_u128 => {
-            assert_eq!(MyFieldU128::from_binary_string(String::from(B128)), MyFieldU128(U128));
-        }
-        from_binary_string_usize => {
-            assert_eq!(MyFieldUsize::from_binary_string(String::from(BSIZE)), MyFieldUsize(USIZE));
-        }
-    }
-
-    // ones
-    tests! {
-        ones_u8 => {
-            assert_eq!(MyFieldU8::ones(), MyFieldU8(u8::MAX));
-        }
-        ones_u16 => {
-            assert_eq!(MyFieldU16::ones(), MyFieldU16(u16::MAX));
-        }
-        ones_u32 => {
-            assert_eq!(MyFieldU32::ones(), MyFieldU32(u32::MAX));
-        }
-        ones_u64 => {
-            assert_eq!(MyFieldU64::ones(), MyFieldU64(u64::MAX));
-        }
-        ones_u128 => {
-            assert_eq!(MyFieldU128::ones(), MyFieldU128(u128::MAX));
-        }
-        ones_usize => {
-            assert_eq!(MyFieldUsize::ones(), MyFieldUsize(usize::MAX));
-        }
-    }
-
-    // zeros
-    tests! {
-        zeros_u8 => {
-            assert_eq!(MyFieldU8::zeros(), MyFieldU8(0));
-        }
-        zeros_u16 => {
-            assert_eq!(MyFieldU16::zeros(), MyFieldU16(0));
-        }
-        zeros_u32 => {
-            assert_eq!(MyFieldU32::zeros(), MyFieldU32(0));
-        }
-        zeros_u64 => {
-            assert_eq!(MyFieldU64::zeros(), MyFieldU64(0));
-        }
-        zeros_u128 => {
-            assert_eq!(MyFieldU128::zeros(), MyFieldU128(0));
-        }
-        zeros_usize => {
-            assert_eq!(MyFieldUsize::zeros(), MyFieldUsize(0));
-        }
-    }
-
-    // defaults
-    tests! {
-        default_u8 => {
-            assert_eq!(0, MyFieldU8::default().as_integer())
-        }
-        default_u16 => {
-            assert_eq!(0, MyFieldU16::default().as_integer())
-        }
-        default_u32 => {
-            assert_eq!(0, MyFieldU32::default().as_integer())
-        }
-        default_u64 => {
-            assert_eq!(0, MyFieldU64::default().as_integer())
-        }
-        default_u128 => {
-            assert_eq!(0, MyFieldU128::default().as_integer())
-        }
-        default_usize => {
-            assert_eq!(0, MyFieldUsize::default().as_integer())
-        }
-    }
-
-    // bit count
-    tests! {
-        bit_count_u8 => {
-            let field = MyFieldU8(U8);
-            assert_eq!(u8::BITS as usize, MyFieldU8::BITS)
-        }
-        bit_count_u16 => {
-            let field = MyFieldU16(U16);
-            assert_eq!(u16::BITS as usize, MyFieldU16::BITS)
-        }
-        bit_count_u32 => {
-            let field = MyFieldU32(U32);
-            assert_eq!(u32::BITS as usize, MyFieldU32::BITS)
-        }
-        bit_count_u64 => {
-            let field = MyFieldU64(U64);
-            assert_eq!(u64::BITS as usize, MyFieldU64::BITS)
-        }
-        bit_count_u128 => {
-            let field = MyFieldU128(U128);
-            assert_eq!(u128::BITS as usize, MyFieldU128::BITS)
-        }
-        bit_count_usize => {
-            let field = MyFieldUsize(USIZE);
-            assert_eq!(usize::BITS as usize, MyFieldUsize::BITS)
-        }
-    }
-
-    // byte count
-    tests! {
-        byte_count_u8 => {
-            let field = MyFieldU8(U8);
-            assert_eq!(1, MyFieldU8::BYTES)
-        }
-        byte_count_u16 => {
-            let field = MyFieldU16(U16);
-            assert_eq!(2, MyFieldU16::BYTES)
-        }
-        byte_count_u32 => {
-            let field = MyFieldU32(U32);
-            assert_eq!(4, MyFieldU32::BYTES)
-        }
-        byte_count_u64 => {
-            let field = MyFieldU64(U64);
-            assert_eq!(8, MyFieldU64::BYTES)
-        }
-        byte_count_u128 => {
-            let field = MyFieldU128(U128);
-            assert_eq!(16, MyFieldU128::BYTES)
-        }
-        byte_count_usize => {
-            let field = MyFieldUsize(USIZE);
-            assert_eq!((usize::BITS as usize) / 8, MyFieldUsize::BYTES)
-        }
-    }
-
-    // integer value
-    tests! {
-        integer_u8 => {
-            let field = MyFieldU8(U8);
-            assert_eq!(U8, field.as_integer())
-        }
-        integer_u16 => {
-            let field = MyFieldU16(U16);
-            assert_eq!(U16, field.as_integer())
-        }
-        integer_u32 => {
-            let field = MyFieldU32(U32);
-            assert_eq!(U32, field.as_integer())
-        }
-        integer_u64 => {
-            let field = MyFieldU64(U64);
-            assert_eq!(U64, field.as_integer())
-        }
-        integer_u128 => {
-            let field = MyFieldU128(U128);
-            assert_eq!(U128, field.as_integer())
-        }
-        integer_usize => {
-            let field = MyFieldUsize(USIZE);
-            assert_eq!(USIZE, field.as_integer())
-        }
-    }
-
-    // binary value
-    tests! {
-        binary_u8 => {
-            let field = MyFieldU8(U8);
-            assert_eq!(B8, field.as_binary())
-        }
-        binary_u16 => {
-            let field = MyFieldU16(U16);
-            assert_eq!(B16, field.as_binary())
-        }
-        binary_u32 => {
-            let field = MyFieldU32(U32);
-            assert_eq!(B32, field.as_binary())
-        }
-        binary_u64 => {
-            let field = MyFieldU64(U64);
-            assert_eq!(B64, field.as_binary())
-        }
-        binary_u128 => {
-            let field = MyFieldU128(U128);
-            assert_eq!(B128, field.as_binary())
-        }
-        binary_usize => {
-            let field = MyFieldUsize(USIZE);
-            assert_eq!(BSIZE, field.as_binary())
-        }
-    }
-
-    // get index
-    tests! {
-        get_index_u8 => {
-            let field = MyFieldU8(U8);
-            for (index, char) in B8.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8))
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_index_u16 => {
-            let field = MyFieldU16(U16);
-            for (index, char) in B16.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8))
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_index_u32 => {
-            let field = MyFieldU32(U32);
-            for (index, char) in B32.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8))
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_index_u64 => {
-            let field = MyFieldU64(U64);
-            for (index, char) in B64.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8))
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_index_u128 => {
-            let field = MyFieldU128(U128);
-            for (index, char) in B128.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8))
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_index_usize => {
-            let field = MyFieldUsize(USIZE);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8))
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-    }
-
-    // set index
-    tests! {
-        set_index_u8 => {
-            let mut field = MyFieldU8(0);
-            for (index, char) in B8.chars().rev().enumerate() {
-                field.set_index(index as u8);
-                for (s_index, _char) in B8.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_index_u16 => {
-            let mut field = MyFieldU16(0);
-            for (index, char) in B16.chars().rev().enumerate() {
-                field.set_index(index as u8);
-                for (s_index, _char) in B16.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_index_u32 => {
-            let mut field = MyFieldU32(0);
-            for (index, char) in B32.chars().rev().enumerate() {
-                field.set_index(index as u8);
-                for (s_index, _char) in B32.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_index_u64 => {
-            let mut field = MyFieldU64(0);
-            for (index, char) in B64.chars().rev().enumerate() {
-                field.set_index(index as u8);
-                for (s_index, _char) in B64.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_index_u128 => {
-            let mut field = MyFieldU128(0);
-            for (index, char) in B128.chars().rev().enumerate() {
-                field.set_index(index as u8);
-                for (s_index, _char) in B128.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_index_usize => {
-            let mut field = MyFieldUsize(0);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                field.set_index(index as u8);
-                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-    }
-
-    // clear index
-    tests! {
-        clear_index_u8 => {
-            let mut field = MyFieldU8(u8::MAX);
-            for (index, char) in B8.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear_index(index as u8);
-                for (s_index, _char) in B8.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_index_u16 => {
-            let mut field = MyFieldU16(u16::MAX);
-            for (index, char) in B16.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear_index(index as u8);
-                for (s_index, _char) in B16.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_index_u32 => {
-            let mut field = MyFieldU32(u32::MAX);
-            for (index, char) in B32.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear_index(index as u8);
-                for (s_index, _char) in B32.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_index_u64 => {
-            let mut field = MyFieldU64(u64::MAX);
-            for (index, char) in B64.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear_index(index as u8);
-                for (s_index, _char) in B64.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_index_u128 => {
-            let mut field = MyFieldU128(u128::MAX);
-            for (index, char) in B128.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear_index(index as u8);
-                for (s_index, _char) in B128.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_index_usize => {
-            let mut field = MyFieldUsize(usize::MAX);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear_index(index as u8);
-                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-    }
-
-    // toggle index
-    tests! {
-        toggle_index_u8 => {
-            let mut field = MyFieldU8(U8);
-            for (index, char) in B8.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string");
-                }
-            }
-        }
-        toggle_index_u16 => {
-            let mut field = MyFieldU16(U16);
-            for (index, char) in B16.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_index_u32 => {
-            let mut field = MyFieldU32(U32);
-            for (index, char) in B32.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_index_u64 => {
-            let mut field = MyFieldU64(U64);
-            for (index, char) in B64.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_index_u128 => {
-            let mut field = MyFieldU128(U128);
-            for (index, char) in B128.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_index_usize => {
-            let mut field = MyFieldUsize(USIZE);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle_index(index as u8);
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-    }
-
-    // get
-    tests! {
-        get_u8 => {
-            let field = MyFieldU8(U8);
-            for (index, char) in B8.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get(MyFlagsU8::from(index as u8)))
-                } else if char == '0' {
-                    assert!(!field.get(MyFlagsU8::from(index as u8)))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_u16 => {
-            let field = MyFieldU16(U16);
-            for (index, char) in B16.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get(MyFlagsU16::from(index as u8)))
-                } else if char == '0' {
-                    assert!(!field.get(MyFlagsU16::from(index as u8)))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_u32 => {
-            let field = MyFieldU32(U32);
-            for (index, char) in B32.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get(MyFlagsU32::from(index as u8)))
-                } else if char == '0' {
-                    assert!(!field.get(MyFlagsU32::from(index as u8)))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_u64 => {
-            let field = MyFieldU64(U64);
-            for (index, char) in B64.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get(MyFlagsU64::from(index as u8)))
-                } else if char == '0' {
-                    assert!(!field.get(MyFlagsU64::from(index as u8)))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_u128 => {
-            let field = MyFieldU128(U128);
-            for (index, char) in B128.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get(MyFlagsU128::from(index as u8)))
-                } else if char == '0' {
-                    assert!(!field.get(MyFlagsU128::from(index as u8)))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        get_usize => {
-            let field = MyFieldUsize(USIZE);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get(MyFlagsUsize::from(index as u8)))
-                } else if char == '0' {
-                    assert!(!field.get(MyFlagsUsize::from(index as u8)))
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-    }
-
-    // set
-    tests! {
-        set_u8 => {
-            let mut field = MyFieldU8(0);
-            for (index, char) in B8.chars().rev().enumerate() {
-                field.set(MyFlagsU8::from(index as u8));
-                for (s_index, _char) in B8.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_u16 => {
-            let mut field = MyFieldU16(0);
-            for (index, char) in B16.chars().rev().enumerate() {
-                field.set(MyFlagsU16::from(index as u8));
-                for (s_index, _char) in B16.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_u32 => {
-            let mut field = MyFieldU32(0);
-            for (index, char) in B32.chars().rev().enumerate() {
-                field.set(MyFlagsU32::from(index as u8));
-                for (s_index, _char) in B32.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_u64 => {
-            let mut field = MyFieldU64(0);
-            for (index, char) in B64.chars().rev().enumerate() {
-                field.set(MyFlagsU64::from(index as u8));
-                for (s_index, _char) in B64.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_u128 => {
-            let mut field = MyFieldU128(0);
-            for (index, char) in B128.chars().rev().enumerate() {
-                field.set(MyFlagsU128::from(index as u8));
-                for (s_index, _char) in B128.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        set_usize => {
-            let mut field = MyFieldUsize(0);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                field.set(MyFlagsUsize::from(index as u8));
-                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-    }
-
-    // clear
-    tests! {
-        clear_u8 => {
-            let mut field = MyFieldU8(u8::MAX);
-            for (index, char) in B8.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear(MyFlagsU8::from(index as u8));
-                for (s_index, _char) in B8.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_u16 => {
-            let mut field = MyFieldU16(u16::MAX);
-            for (index, char) in B16.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear(MyFlagsU16::from(index as u8));
-                for (s_index, _char) in B16.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_u32 => {
-            let mut field = MyFieldU32(u32::MAX);
-            for (index, char) in B32.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear(MyFlagsU32::from(index as u8));
-                for (s_index, _char) in B32.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_u64 => {
-            let mut field = MyFieldU64(u64::MAX);
-            for (index, char) in B64.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear(MyFlagsU64::from(index as u8));
-                for (s_index, _char) in B64.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_u128 => {
-            let mut field = MyFieldU128(u128::MAX);
-            for (index, char) in B128.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear(MyFlagsU128::from(index as u8));
-                for (s_index, _char) in B128.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-        clear_usize => {
-            let mut field = MyFieldUsize(usize::MAX);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                assert!(field.get_index(index as u8), "{:#?}", field);
-                field.clear(MyFlagsUsize::from(index as u8));
-                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
-                    if s_index <= index {
-                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
-                    }  else {
-                        assert!(field.get_index(s_index as u8), "{:#?}", field);
-                    }
-                }
-            }
-        }
-    }
-
-    // toggle
-    tests! {
-        toggle_u8 => {
-            let mut field = MyFieldU8(U8);
-            for (index, char) in B8.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle(MyFlagsU8::from(index as u8));
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle(MyFlagsU8::from(index as u8));
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string");
-                }
-            }
-        }
-        toggle_u16 => {
-            let mut field = MyFieldU16(U16);
-            for (index, char) in B16.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle(MyFlagsU16::from(index as u8));
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle(MyFlagsU16::from(index as u8));
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_u32 => {
-            let mut field = MyFieldU32(U32);
-            for (index, char) in B32.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle(MyFlagsU32::from(index as u8));
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle(MyFlagsU32::from(index as u8));
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_u64 => {
-            let mut field = MyFieldU64(U64);
-            for (index, char) in B64.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle(MyFlagsU64::from(index as u8));
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle(MyFlagsU64::from(index as u8));
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_u128 => {
-            let mut field = MyFieldU128(U128);
-            for (index, char) in B128.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle(MyFlagsU128::from(index as u8));
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle(MyFlagsU128::from(index as u8));
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-        toggle_usize => {
-            let mut field = MyFieldUsize(USIZE);
-            for (index, char) in BSIZE.chars().rev().enumerate() {
-                if char == '1' {
-                    assert!(field.get_index(index as u8));
-                    field.toggle(MyFlagsUsize::from(index as u8));
-                    assert!(!field.get_index(index as u8));
-                } else if char == '0' {
-                    assert!(!field.get_index(index as u8));
-                    field.toggle(MyFlagsUsize::from(index as u8));
-                    assert!(field.get_index(index as u8));
-                } else {
-                    panic!("invalid char in binary string")
-                }
-            }
-        }
-    }
-
-    // diff
-    tests! {
-        diff_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.diff(reversed);
-            assert_eq!("10100101", out.as_binary());
-            assert_eq!(165, out.as_integer());
-        }
-        diff_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.diff(reversed);
-            assert_eq!("1010101111010101", out.as_binary());
-            assert_eq!(43989, out.as_integer());
-        }
-        diff_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.diff(reversed);
-            assert_eq!("11110101000100111100100010101111", out.as_binary());
-            assert_eq!(4111714479, out.as_integer());
-        }
-        diff_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.diff(reversed);
-            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", out.as_binary());
-            assert_eq!(1495798268358312744, out.as_integer());
-        }
-        diff_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.diff(reversed);
-            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", out.as_binary());
-            assert_eq!(193799958082971305581995159990093034377, out.as_integer());
-        }
-        // diff_usize => {
-        //     let field = MyFieldUsize(USIZE);
-        // }
-    }
-
-    // combine
-    tests! {
-        combine_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.combine(reversed);
-            assert_eq!("11111111", out.as_binary());
-            assert_eq!(255, out.as_integer());
-        }
-        combine_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.combine(reversed);
-            assert_eq!("1110101111010111", out.as_binary());
-            assert_eq!(60375, out.as_integer());
-        }
-        combine_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.combine(reversed);
-            assert_eq!("11111101100100111100100110111111", out.as_binary());
-            assert_eq!(4254321087, out.as_integer());
-        }
-        combine_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.combine(reversed);
-            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", out.as_binary());
-            assert_eq!(18361808577405668223, out.as_integer());
-        }
-        combine_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.combine(reversed);
-            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", out.as_binary());
-            assert_eq!(332296039312012448238196841470979719071, out.as_integer());
-        }
-        // combine_usize => {
-        //     let field = MyFieldUsize(USIZE);
-        // }
-    }
-
-    // intersect
-    tests! {
-        intersect_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.intersect(reversed);
-            assert_eq!("01011010", out.as_binary());
-            assert_eq!(90, out.as_integer());
-        }
-        intersect_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.intersect(reversed);
-            assert_eq!("0100000000000010", out.as_binary());
-            assert_eq!(16386, out.as_integer());
-        }
-        intersect_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.intersect(reversed);
-            assert_eq!("00001000100000000000000100010000", out.as_binary());
-            assert_eq!(142606608, out.as_integer());
-        }
-        intersect_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.intersect(reversed);
-            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", out.as_binary());
-            assert_eq!(16866010309047355479, out.as_integer());
-        }
-        intersect_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.intersect(reversed);
-            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", out.as_binary());
-            assert_eq!(138496081229041142656201681480886684694, out.as_integer());
-        }
-        // intersect_usize => {
-        //     let field = MyFieldUsize(USIZE);
-        // }
-    }
-
-    // into diff
-    tests! {
-        into_diff_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_diff(reversed);
-            assert_eq!("10100101", out.as_binary());
-            assert_eq!(165, out.as_integer());
-        }
-        into_diff_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_diff(reversed);
-            assert_eq!("1010101111010101", out.as_binary());
-            assert_eq!(43989, out.as_integer());
-        }
-        into_diff_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_diff(reversed);
-            assert_eq!("11110101000100111100100010101111", out.as_binary());
-            assert_eq!(4111714479, out.as_integer());
-        }
-        into_diff_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_diff(reversed);
-            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", out.as_binary());
-            assert_eq!(1495798268358312744, out.as_integer());
-        }
-        into_diff_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_diff(reversed);
-            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", out.as_binary());
-            assert_eq!(193799958082971305581995159990093034377, out.as_integer());
-        }
-        // into_diff_usize => {
-        //     let field = MyFieldUsize(USIZE);
-        // }
-    }
-
-    // into combined
-    tests! {
-        into_combined_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_combined(reversed);
-            assert_eq!("11111111", out.as_binary());
-            assert_eq!(255, out.as_integer());
-        }
-        into_combined_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_combined(reversed);
-            assert_eq!("1110101111010111", out.as_binary());
-            assert_eq!(60375, out.as_integer());
-        }
-        into_combined_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_combined(reversed);
-            assert_eq!("11111101100100111100100110111111", out.as_binary());
-            assert_eq!(4254321087, out.as_integer());
-        }
-        into_combined_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_combined(reversed);
-            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", out.as_binary());
-            assert_eq!(18361808577405668223, out.as_integer());
-        }
-        into_combined_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_combined(reversed);
-            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", out.as_binary());
-            assert_eq!(332296039312012448238196841470979719071, out.as_integer());
-        }
-        // into_combined_usize => {
-        //     let field = MyFieldUsize(USIZE);
-        // }
-    }
-
-    // into intersection
-    tests! {
-        into_intersection_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_intersection(reversed);
-            assert_eq!("01011010", out.as_binary());
-            assert_eq!(90, out.as_integer());
-        }
-        into_intersection_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_intersection(reversed);
-            assert_eq!("0100000000000010", out.as_binary());
-            assert_eq!(16386, out.as_integer());
-        }
-        into_intersection_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_intersection(reversed);
-            assert_eq!("00001000100000000000000100010000", out.as_binary());
-            assert_eq!(142606608, out.as_integer());
-        }
-        into_intersection_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_intersection(reversed);
-            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", out.as_binary());
-            assert_eq!(16866010309047355479, out.as_integer());
-        }
-        into_intersection_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field.into_intersection(reversed);
-            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", out.as_binary());
-            assert_eq!(138496081229041142656201681480886684694, out.as_integer());
-        }
-        // into_intersection_usize => {
-        //     let field = MyFieldUsize(USIZE);
-        // }
-    }
-
-    // field from flag
-    tests! {
-        field_from_flag_u8 => {
-            for index in 0..u8::BITS {
-                let flag = MyFlagsU8::from(index as u8);
-                let field = MyFieldU8::from(flag);
-                assert_eq!(MyFieldU8(0u8 | (1 << index)), field)
-            }
-        }
-        field_from_flag_u16 => {
-            for index in 0..u16::BITS {
-                let flag = MyFlagsU16::from(index as u8);
-                let field = MyFieldU16::from(flag);
-                assert_eq!(MyFieldU16(0u16 | (1 << index)), field)
-            }
-        }
-        field_from_flag_u32 => {
-            for index in 0..u32::BITS {
-                let flag = MyFlagsU32::from(index as u8);
-                let field = MyFieldU32::from(flag);
-                assert_eq!(MyFieldU32(0u32 | (1 << index)), field)
-            }
-        }
-        field_from_flag_u64 => {
-            for index in 0..u64::BITS {
-                let flag = MyFlagsU64::from(index as u8);
-                let field = MyFieldU64::from(flag);
-                assert_eq!(MyFieldU64(0u64 | (1 << index)), field)
-            }
-        }
-        field_from_flag_u128 => {
-            for index in 0..u128::BITS {
-                let flag = MyFlagsU128::from(index as u8);
-                let field = MyFieldU128::from(flag);
-                assert_eq!(MyFieldU128(0u128 | (1 << index)), field)
-            }
-        }
-        field_from_flag_usize => {
-            for index in 0..usize::BITS {
-                let flag = MyFlagsUsize::from(index as u8);
-                let field = MyFieldUsize::from(flag);
-                assert_eq!(MyFieldUsize(0usize | (1 << index)), field)
-            }
-        }
-    }
-
-    // $name & $name
-    tests! {
-        bitwise_name_and_name_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field & reversed;
-            assert_eq!("01011010", out.as_binary());
-            assert_eq!(90, out.as_integer());
-        }
-        bitwise_name_and_name_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field & reversed;
-            assert_eq!("0100000000000010", out.as_binary());
-            assert_eq!(16386, out.as_integer());
-        }
-        bitwise_name_and_name_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field & reversed;
-            assert_eq!("00001000100000000000000100010000", out.as_binary());
-            assert_eq!(142606608, out.as_integer());
-        }
-        bitwise_name_and_name_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field & reversed;
-            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", out.as_binary());
-            assert_eq!(16866010309047355479, out.as_integer());
-        }
-        bitwise_name_and_name_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field & reversed;
-            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", out.as_binary());
-            assert_eq!(138496081229041142656201681480886684694, out.as_integer());
-        }
-        // bitwise_name_and_name_usize => {
-        //
-        // }
-    }
-
-    // $name | $name
-    tests! {
-        bitwise_name_or_name_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field | reversed;
-            assert_eq!("11111111", out.as_binary());
-            assert_eq!(255, out.as_integer());
-        }
-        bitwise_name_or_name_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field | reversed;
-            assert_eq!("1110101111010111", out.as_binary());
-            assert_eq!(60375, out.as_integer());
-        }
-        bitwise_name_or_name_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field | reversed;
-            assert_eq!("11111101100100111100100110111111", out.as_binary());
-            assert_eq!(4254321087, out.as_integer());
-        }
-        bitwise_name_or_name_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field | reversed;
-            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", out.as_binary());
-            assert_eq!(18361808577405668223, out.as_integer());
-        }
-        bitwise_name_or_name_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field | reversed;
-            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", out.as_binary());
-            assert_eq!(332296039312012448238196841470979719071, out.as_integer());
-        }
-        // bitwise_name_or_name_usize => {
-        //
-        // }
-    }
-
-    // $name ^ $name
-    tests! {
-        bitwise_name_xor_name_u8 => {
-            let field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field ^ reversed;
-            assert_eq!("10100101", out.as_binary());
-            assert_eq!(165, out.as_integer());
-        }
-        bitwise_name_xor_name_u16 => {
-            let field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field ^ reversed;
-            assert_eq!("1010101111010101", out.as_binary());
-            assert_eq!(43989, out.as_integer());
-        }
-        bitwise_name_xor_name_u32 => {
-            let field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field ^ reversed;
-            assert_eq!("11110101000100111100100010101111", out.as_binary());
-            assert_eq!(4111714479, out.as_integer());
-        }
-        bitwise_name_xor_name_u64 => {
-            let field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field ^ reversed;
-            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", out.as_binary());
-            assert_eq!(1495798268358312744, out.as_integer());
-        }
-        bitwise_name_xor_name_u128 => {
-            let field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            let out = field ^ reversed;
-            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", out.as_binary());
-            assert_eq!(193799958082971305581995159990093034377, out.as_integer());
-        }
-        // bitwise_name_xor_name_usize => {
-        //
-        // }
-    }
-
-    // $name &= $name
-    tests! {
-        bitwise_name_and_assign_name_u8 => {
-            let mut field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field &= reversed;
-            assert_eq!("01011010", field.as_binary());
-            assert_eq!(90, field.as_integer());
-        }
-        bitwise_name_and_assign_name_u16 => {
-            let mut field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field &= reversed;
-            assert_eq!("0100000000000010", field.as_binary());
-            assert_eq!(16386, field.as_integer());
-        }
-        bitwise_name_and_assign_name_u32 => {
-            let mut field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field &= reversed;
-            assert_eq!("00001000100000000000000100010000", field.as_binary());
-            assert_eq!(142606608, field.as_integer());
-        }
-        bitwise_name_and_assign_name_u64 => {
-            let mut field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field &= reversed;
-            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", field.as_binary());
-            assert_eq!(16866010309047355479, field.as_integer());
-        }
-        bitwise_name_and_assign_name_u128 => {
-            let mut field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field &= reversed;
-            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", field.as_binary());
-            assert_eq!(138496081229041142656201681480886684694, field.as_integer());
-        }
-    //     bitwise_name_and_assign_name_usize => {
-    //
-    //     }
-    }
-
-    // $name |= $name
-    tests! {
-        bitwise_name_or_assign_name_u8 => {
-            let mut field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field |= reversed;
-            assert_eq!("11111111", field.as_binary());
-            assert_eq!(255, field.as_integer());
-        }
-        bitwise_name_or_assign_name_u16 => {
-            let mut field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field |= reversed;
-            assert_eq!("1110101111010111", field.as_binary());
-            assert_eq!(60375, field.as_integer());
-        }
-        bitwise_name_or_assign_name_u32 => {
-            let mut field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field |= reversed;
-            assert_eq!("11111101100100111100100110111111", field.as_binary());
-            assert_eq!(4254321087, field.as_integer());
-        }
-        bitwise_name_or_assign_name_u64 => {
-            let mut field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field |= reversed;
-            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", field.as_binary());
-            assert_eq!(18361808577405668223, field.as_integer());
-        }
-        bitwise_name_or_assign_name_u128 => {
-            let mut field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field |= reversed;
-            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", field.as_binary());
-            assert_eq!(332296039312012448238196841470979719071, field.as_integer());
-        }
-        // bitwise_name_or_assign_name_usize => {
-        //
-        // }
-    }
-
-    // $name ^= $name
-    tests! {
-        bitwise_name_xor_assign_name_u8 => {
-            let mut field = MyFieldU8(U8);
-            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field ^= reversed;
-            assert_eq!("10100101", field.as_binary());
-            assert_eq!(165, field.as_integer());
-        }
-        bitwise_name_xor_assign_name_u16 => {
-            let mut field = MyFieldU16(U16);
-            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field ^= reversed;
-            assert_eq!("1010101111010101", field.as_binary());
-            assert_eq!(43989, field.as_integer());
-        }
-        bitwise_name_xor_assign_name_u32 => {
-            let mut field = MyFieldU32(U32);
-            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field ^= reversed;
-            assert_eq!("11110101000100111100100010101111", field.as_binary());
-            assert_eq!(4111714479, field.as_integer());
-        }
-        bitwise_name_xor_assign_name_u64 => {
-            let mut field = MyFieldU64(U64);
-            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field ^= reversed;
-            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", field.as_binary());
-            assert_eq!(1495798268358312744, field.as_integer());
-        }
-        bitwise_name_xor_assign_name_u128 => {
-            let mut field = MyFieldU128(U128);
-            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
-            field ^= reversed;
-            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", field.as_binary());
-            assert_eq!(193799958082971305581995159990093034377, field.as_integer());
-        }
-        // bitwise_name_xor_assign_name_usize => {
-        //
-        // }
-    }
-
-    // $name & $flag
-    tests! {
-        bitwise_name_and_flag_u8 => {
-            for index in 0..u8::BITS {
-                let mask = MyFieldU8(u8::MAX) & MyFlagsU8::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_flag_u16 => {
-            for index in 0..u16::BITS {
-                let mask = MyFieldU16(u16::MAX) & MyFlagsU16::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_flag_u32 => {
-            for index in 0..u32::BITS {
-                let mask = MyFieldU32(u32::MAX) & MyFlagsU32::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_flag_u64 => {
-            for index in 0..u64::BITS {
-                let mask = MyFieldU64(u64::MAX) & MyFlagsU64::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_flag_u128 => {
-            for index in 0..u128::BITS {
-                let mask = MyFieldU128(u128::MAX) & MyFlagsU128::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        // bitwise_name_and_flag_usize => {
-        //
-        // }
-    }
-
-    // $name | $flag
-    tests! {
-        bitwise_name_or_flag_u8 => {
-            for index in 0..u8::BITS {
-                let mask = MyFieldU8(0) | MyFlagsU8::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_flag_u16 => {
-            for index in 0..u16::BITS {
-                let mask = MyFieldU16(0) | MyFlagsU16::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_flag_u32 => {
-            for index in 0..u32::BITS {
-                let mask = MyFieldU32(0) | MyFlagsU32::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_flag_u64 => {
-            for index in 0..u64::BITS {
-                let mask = MyFieldU64(0) | MyFlagsU64::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_flag_u128 => {
-            for index in 0..u128::BITS {
-                let mask = MyFieldU128(0) | MyFlagsU128::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        // bitwise_name_or_flag_usize => {
-        //
-        // }
-    }
-
-    // $name ^ $flag
-    tests! {
-        bitwise_name_xor_flag_u8 => {
-            for index in 0..u8::BITS {
-                let mask = MyFieldU8(0) ^ MyFlagsU8::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_flag_u16 => {
-            for index in 0..u16::BITS {
-                let mask = MyFieldU16(0) ^ MyFlagsU16::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_flag_u32 => {
-            for index in 0..u32::BITS {
-                let mask = MyFieldU32(0) ^ MyFlagsU32::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_flag_u64 => {
-            for index in 0..u64::BITS {
-                let mask = MyFieldU64(0) ^ MyFlagsU64::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_flag_u128 => {
-            for index in 0..u128::BITS {
-                let mask = MyFieldU128(0) ^ MyFlagsU128::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        // bitwise_name_xor_flag_usize => {
-        //
-        // }
-    }
-
-    // $name &= $flag
-    tests! {
-        bitwise_name_and_assign_flag_u8 => {
-            for index in 0..u8::BITS {
-                let mut mask = MyFieldU8(u8::MAX);
-                mask &= MyFlagsU8::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_assign_flag_u16 => {
-            for index in 0..u16::BITS {
-                let mut mask = MyFieldU16(u16::MAX);
-                mask &= MyFlagsU16::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_assign_flag_u32 => {
-            for index in 0..u32::BITS {
-                let mut mask = MyFieldU32(u32::MAX);
-                mask &= MyFlagsU32::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_assign_flag_u64 => {
-            for index in 0..u64::BITS {
-                let mut mask = MyFieldU64(u64::MAX);
-                mask &= MyFlagsU64::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_and_assign_flag_u128 => {
-            for index in 0..u128::BITS {
-                let mut mask = MyFieldU128(u128::MAX);
-                mask &= MyFlagsU128::from(index as u8);
-                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        // bitwise_name_and_assign_flag_usize => {
-        //
-        // }
-    }
-
-    // $name |= $flag
-    tests! {
-        bitwise_name_or_assign_flag_u8 => {
-            for index in 0..u8::BITS {
-                let mut mask = MyFieldU8(0);
-                mask |= MyFlagsU8::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_assign_flag_u16 => {
-            for index in 0..u16::BITS {
-                let mut mask = MyFieldU16(0);
-                mask |= MyFlagsU16::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_assign_flag_u32 => {
-            for index in 0..u32::BITS {
-                let mut mask = MyFieldU32(0);
-                mask |= MyFlagsU32::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_assign_flag_u64 => {
-            for index in 0..u64::BITS {
-                let mut mask = MyFieldU64(0);
-                mask |= MyFlagsU64::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_or_assign_flag_u128 => {
-            for index in 0..u128::BITS {
-                let mut mask = MyFieldU128(0);
-                mask |= MyFlagsU128::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        // bitwise_name_or_assign_flag_usize => {
-        //
-        // }
-    }
-
-    // $name ^= $flag
-    tests! {
-        bitwise_name_xor_assign_flag_u8 => {
-            for index in 0..u8::BITS {
-                let mut mask = MyFieldU8(0);
-                mask ^= MyFlagsU8::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_assign_flag_u16 => {
-            for index in 0..u16::BITS {
-                let mut mask = MyFieldU16(0);
-                mask ^= MyFlagsU16::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_assign_flag_u32 => {
-            for index in 0..u32::BITS {
-                let mut mask = MyFieldU32(0);
-                mask ^= MyFlagsU32::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_assign_flag_u64 => {
-            for index in 0..u64::BITS {
-                let mut mask = MyFieldU64(0);
-                mask ^= MyFlagsU64::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        bitwise_name_xor_assign_flag_u128 => {
-            for index in 0..u128::BITS {
-                let mut mask = MyFieldU128(0);
-                mask ^= MyFlagsU128::from(index as u8);
-                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
-            }
-        }
-        // bitwise_name_xor_assign_flag_usize => {
-        //
-        // }
-    }
-
-    // $flag & $flag
-    tests! {
-        bitwise_flag_and_flag_u8 => {
-            for index_a in 0..u8::BITS {
-                let a = MyFlagsU8::from(index_a as u8);
-                for index_b in 0..u8::BITS {
-                    let b = MyFlagsU8::from(index_b as u8);
-                    assert_eq!(MyFieldU8(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
-                }
-            }
-        }
-        bitwise_flag_and_flag_u16 => {
-            for index_a in 0..u16::BITS {
-                let a = MyFlagsU16::from(index_a as u8);
-                for index_b in 0..u16::BITS {
-                    let b = MyFlagsU16::from(index_b as u8);
-                    assert_eq!(MyFieldU16(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
-                }
-            }
-        }
-        bitwise_flag_and_flag_u32 => {
-            for index_a in 0..u32::BITS {
-                let a = MyFlagsU32::from(index_a as u8);
-                for index_b in 0..u32::BITS {
-                    let b = MyFlagsU32::from(index_b as u8);
-                    assert_eq!(MyFieldU32(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
-                }
-            }
-        }
-        bitwise_flag_and_flag_u64 => {
-            for index_a in 0..u64::BITS {
-                let a = MyFlagsU64::from(index_a as u8);
-                for index_b in 0..u64::BITS {
-                    let b = MyFlagsU64::from(index_b as u8);
-                    assert_eq!(MyFieldU64(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
-                }
-            }
-        }
-        bitwise_flag_and_flag_u128 => {
-            for index_a in 0..u128::BITS {
-                let a = MyFlagsU128::from(index_a as u8);
-                for index_b in 0..u128::BITS {
-                    let b = MyFlagsU128::from(index_b as u8);
-                    assert_eq!(MyFieldU128(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
-                }
-            }
-        }
-        // bitwise_flag_and_flag_usize => {
-        //
-        // }
-    }
-
-    // $flag | $flag
-    tests! {
-        bitwise_flag_or_flag_u8 => {
-            for index_a in 0..u8::BITS {
-                let a = MyFlagsU8::from(index_a as u8);
-                for index_b in 0..u8::BITS {
-                    let b = MyFlagsU8::from(index_b as u8);
-                    assert_eq!(MyFieldU8(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
-                }
-            }
-        }
-        bitwise_flag_or_flag_u16 => {
-            for index_a in 0..u16::BITS {
-                let a = MyFlagsU16::from(index_a as u8);
-                for index_b in 0..u16::BITS {
-                    let b = MyFlagsU16::from(index_b as u8);
-                    assert_eq!(MyFieldU16(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
-                }
-            }
-        }
-        bitwise_flag_or_flag_u32 => {
-            for index_a in 0..u32::BITS {
-                let a = MyFlagsU32::from(index_a as u8);
-                for index_b in 0..u32::BITS {
-                    let b = MyFlagsU32::from(index_b as u8);
-                    assert_eq!(MyFieldU32(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
-                }
-            }
-        }
-        bitwise_flag_or_flag_u64 => {
-            for index_a in 0..u64::BITS {
-                let a = MyFlagsU64::from(index_a as u8);
-                for index_b in 0..u64::BITS {
-                    let b = MyFlagsU64::from(index_b as u8);
-                    assert_eq!(MyFieldU64(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
-                }
-            }
-        }
-        bitwise_flag_or_flag_u128 => {
-            for index_a in 0..u128::BITS {
-                let a = MyFlagsU128::from(index_a as u8);
-                for index_b in 0..u128::BITS {
-                    let b = MyFlagsU128::from(index_b as u8);
-                    assert_eq!(MyFieldU128(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
-                }
-            }
-        }
-        // bitwise_flag_or_flag_usize => {
-        //
-        // }
-    }
-
-    // $flag ^ $flag
-    tests! {
-        bitwise_flag_xor_flag_u8 => {
-            for index_a in 0..u8::BITS {
-                let a = MyFlagsU8::from(index_a as u8);
-                for index_b in 0..u8::BITS {
-                    let b = MyFlagsU8::from(index_b as u8);
-                    assert_eq!(MyFieldU8(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
-                }
-            }
-        }
-        bitwise_flag_xor_flag_u16 => {
-            for index_a in 0..u16::BITS {
-                let a = MyFlagsU16::from(index_a as u8);
-                for index_b in 0..u16::BITS {
-                    let b = MyFlagsU16::from(index_b as u8);
-                    assert_eq!(MyFieldU16(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
-                }
-            }
-        }
-        bitwise_flag_xor_flag_u32 => {
-            for index_a in 0..u32::BITS {
-                let a = MyFlagsU32::from(index_a as u8);
-                for index_b in 0..u32::BITS {
-                    let b = MyFlagsU32::from(index_b as u8);
-                    assert_eq!(MyFieldU32(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
-                }
-            }
-        }
-        bitwise_flag_xor_flag_u64 => {
-            for index_a in 0..u64::BITS {
-                let a = MyFlagsU64::from(index_a as u8);
-                for index_b in 0..u64::BITS {
-                    let b = MyFlagsU64::from(index_b as u8);
-                    assert_eq!(MyFieldU64(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
-                }
-            }
-        }
-        bitwise_flag_xor_flag_u128 => {
-            for index_a in 0..u128::BITS {
-                let a = MyFlagsU128::from(index_a as u8);
-                for index_b in 0..u128::BITS {
-                    let b = MyFlagsU128::from(index_b as u8);
-                    assert_eq!(MyFieldU128(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
-                }
-            }
-        }
-        // bitwise_flag_xor_flag_usize => {
-        //
-        // }
-    }
-
-    // flag from u8
-    tests! {
-        flag_from_u8_u8 => {
-            for index in 0..u8::BITS {
-                let _ = MyFlagsU8::from(index as u8);
-            }
-        }
-        flag_from_u8_u16 => {
-            for index in 0..u16::BITS {
-                let _ = MyFlagsU16::from(index as u8);
-            }
-        }
-        flag_from_u8_u32 => {
-            for index in 0..u32::BITS {
-                let _ = MyFlagsU32::from(index as u8);
-            }
-        }
-        flag_from_u8_u64 => {
-            for index in 0..u64::BITS {
-                let _ = MyFlagsU64::from(index as u8);
-            }
-        }
-        flag_from_u8_u128 => {
-            for index in 0..u128::BITS {
-                let _ = MyFlagsU128::from(index as u8);
-            }
-        }
-        flag_from_u8_usize => {
-            for index in 0..usize::BITS {
-                let _ = MyFlagsUsize::from(index as u8);
-            }
-        }
-    }
-
-    // u8 from flag
-    tests! {
-        u8_from_flag_u8 => {
-            for index in 0..u8::BITS {
-                assert_eq!(MyFlagsU8::from(index as u8) as u8, index as u8)
-            }
-        }
-        u8_from_flag_u16 => {
-            for index in 0..u16::BITS {
-                assert_eq!(MyFlagsU16::from(index as u8) as u8, index as u8)
-            }
-        }
-        u8_from_flag_u32 => {
-            for index in 0..u32::BITS {
-                assert_eq!(MyFlagsU32::from(index as u8) as u8, index as u8)
-            }
-        }
-        u8_from_flag_u64 => {
-            for index in 0..u64::BITS {
-                assert_eq!(MyFlagsU64::from(index as u8) as u8, index as u8)
-            }
-        }
-        u8_from_flag_u128 => {
-            for index in 0..u128::BITS {
-                assert_eq!(MyFlagsU128::from(index as u8) as u8, index as u8)
-            }
-        }
-        u8_from_flag_usize => {
-            for index in 0..usize::BITS {
-                assert_eq!(MyFlagsUsize::from(index as u8) as u8, index as u8)
-            }
-        }
-    }
-}
-
-// -------------------------------------------------------------------------------------------------
-
-
- \ No newline at end of file +lib.rs - source

ubits/
lib.rs

1//!
+2//! [![crates.io](https://img.shields.io/crates/v/ubits.svg)](https://crates.io/crates/ubits)
+3//! [![Downloads](https://img.shields.io/crates/d/ubits.svg)](https://crates.io/crates/ubits)
+4//! [![Build](https://github.com/manoadamro/ubits/actions/workflows/rust.yml/badge.svg)](https://github.com/manoadamro/ubits/actions/workflows/rust.yml)
+5//! [![Docs](https://img.shields.io/docsrs/ubits)](https://manoadamro.github.io/ubits/doc/ubits/)
+6//! [![Licence](https://img.shields.io/github/license/manoadamro/ubits)](https://github.com/manoadamro/ubits/blob/main/LICENSE)
+7//!
+8//! Bit fields and masks for rust!
+9//!
+10//! Provides a macro for generating [`bit field`](https://en.wikipedia.org/wiki/Bit_field) types
+11//! complete with flags and some helpful trait implementations.
+12//!
+13//! Supports field widths of `8`, `16`, `32`, `64` and `128` bits.
+14//!
+15//! - [`bitfield`] - macro documentation.
+16//! - [`examples`] - examples of the output generated by the [`bitfield`] macro.
+17//!
+18//! __Note: the example module is only complied with documentation builds
+19//! and is not available for importing in the wild.__
+20//!
+21//!
+22//! # Usage
+23//!
+24//! Generate a bitfield struct with a flag enum...
+25//! (The following examples all use this as a definition.)
+26//! ```rust
+27//! use ubits::bitfield;
+28//!
+29//!     bitfield! {
+30//!         pub u8 ExampleField
+31//!         ExampleFlags {
+32//!             0 : Flag0,
+33//!             1 : Flag1,
+34//!             2 : Flag2,
+35//!             3 : Flag3,
+36//!             4 : Flag4,
+37//!             5 : Flag5,
+38//!             6 : Flag6,
+39//!             7 : Flag7,
+40//!         }
+41//!     }
+42//! ```
+43//!
+44//! ## Instances
+45//!
+46//! From integer:
+47//! ```rust
+48//! # use ubits::bitfield;
+49//! #    bitfield! {
+50//! #        pub u8 ExampleField
+51//! #        ExampleFlags {
+52//! #            0 : Flag0,
+53//! #            1 : Flag1,
+54//! #            2 : Flag2,
+55//! #            3 : Flag3,
+56//! #            4 : Flag4,
+57//! #            5 : Flag5,
+58//! #            6 : Flag6,
+59//! #            7 : Flag7,
+60//! #        }
+61//! #    }
+62//!
+63//! let from_integer = ExampleField(123);
+64//! assert_eq!(ExampleField(123), from_integer);
+65//! ```
+66//!
+67//! From a binary string:
+68//! ```rust
+69//! # use ubits::bitfield;
+70//! #    bitfield! {
+71//! #        pub u8 ExampleField
+72//! #        ExampleFlags {
+73//! #            0 : Flag0,
+74//! #            1 : Flag1,
+75//! #            2 : Flag2,
+76//! #            3 : Flag3,
+77//! #            4 : Flag4,
+78//! #            5 : Flag5,
+79//! #            6 : Flag6,
+80//! #            7 : Flag7,
+81//! #        }
+82//! #    }
+83//!
+84//! let from_binary = ExampleField::from_binary_str("01111011");
+85//! assert_eq!(ExampleField(123), from_binary)
+86//! ```
+87//!
+88//! From ones:
+89//! ```rust
+90//! # use ubits::bitfield;
+91//! #    bitfield! {
+92//! #        pub u8 ExampleField
+93//! #        ExampleFlags {
+94//! #            0 : Flag0,
+95//! #            1 : Flag1,
+96//! #            2 : Flag2,
+97//! #            3 : Flag3,
+98//! #            4 : Flag4,
+99//! #            5 : Flag5,
+100//! #            6 : Flag6,
+101//! #            7 : Flag7,
+102//! #        }
+103//! #    }
+104//!
+105//! let from_ones = ExampleField::ones();
+106//! assert_eq!("11111111", from_ones.as_binary());
+107//! assert_eq!(255, from_ones.as_integer());
+108//! ```
+109//!
+110//! From zeros:
+111//! ```rust
+112//! # use ubits::bitfield;
+113//! #    bitfield! {
+114//! #        pub u8 ExampleField
+115//! #        ExampleFlags {
+116//! #            0 : Flag0,
+117//! #            1 : Flag1,
+118//! #            2 : Flag2,
+119//! #            3 : Flag3,
+120//! #            4 : Flag4,
+121//! #            5 : Flag5,
+122//! #            6 : Flag6,
+123//! #            7 : Flag7,
+124//! #        }
+125//! #    }
+126//!
+127//! let from_zeros = ExampleField::zeros();
+128//! assert_eq!("00000000", from_zeros.as_binary());
+129//! assert_eq!(0, from_zeros.as_integer());
+130//! ```
+131//!
+132//! ### Field Access
+133//!
+134//! Get bit value by field:
+135//! ```rust
+136//! # use ubits::bitfield;
+137//! #    bitfield! {
+138//! #        pub u8 ExampleField
+139//! #        ExampleFlags {
+140//! #            0 : Flag0,
+141//! #            1 : Flag1,
+142//! #            2 : Flag2,
+143//! #            3 : Flag3,
+144//! #            4 : Flag4,
+145//! #            5 : Flag5,
+146//! #            6 : Flag6,
+147//! #            7 : Flag7,
+148//! #        }
+149//! #    }
+150//!
+151//! let field = ExampleField::from_binary_str("01010101");
+152//! assert!(field.get(ExampleFlags::Flag0));
+153//! assert!(!field.get(ExampleFlags::Flag1));
+154//! ```
+155//!
+156//! Get bit value by index:
+157//!
+158//! ```rust
+159//! # use ubits::bitfield;
+160//! #    bitfield! {
+161//! #        pub u8 ExampleField
+162//! #        ExampleFlags {
+163//! #            0 : Flag0,
+164//! #            1 : Flag1,
+165//! #            2 : Flag2,
+166//! #            3 : Flag3,
+167//! #            4 : Flag4,
+168//! #            5 : Flag5,
+169//! #            6 : Flag6,
+170//! #            7 : Flag7,
+171//! #        }
+172//! #    }
+173//!
+174//! let field = ExampleField::from_binary_str("01010101");
+175//! assert!(field.get_index(0));
+176//! assert!(!field.get_index(1));
+177//! ```
+178//!
+179//! Set bit value by field:
+180//!
+181//! ```rust
+182//! # use ubits::bitfield;
+183//! #    bitfield! {
+184//! #        pub u8 ExampleField
+185//! #        ExampleFlags {
+186//! #            0 : Flag0,
+187//! #            1 : Flag1,
+188//! #            2 : Flag2,
+189//! #            3 : Flag3,
+190//! #            4 : Flag4,
+191//! #            5 : Flag5,
+192//! #            6 : Flag6,
+193//! #            7 : Flag7,
+194//! #        }
+195//! #    }
+196//!
+197//! let mut field = ExampleField::from_binary_str("01010101");
+198//! field.set(ExampleFlags::Flag1);
+199//! field.set(ExampleFlags::Flag3);
+200//! assert_eq!("01011111", field.as_binary());
+201//! ```
+202//!
+203//! Set bit value by index:
+204//!
+205//! ```rust
+206//! # use ubits::bitfield;
+207//! #    bitfield! {
+208//! #        pub u8 ExampleField
+209//! #        ExampleFlags {
+210//! #            0 : Flag0,
+211//! #            1 : Flag1,
+212//! #            2 : Flag2,
+213//! #            3 : Flag3,
+214//! #            4 : Flag4,
+215//! #            5 : Flag5,
+216//! #            6 : Flag6,
+217//! #            7 : Flag7,
+218//! #        }
+219//! #    }
+220//!
+221//! let mut field = ExampleField::from_binary_str("01010101");
+222//! field.set_index(1);
+223//! field.set_index(3);
+224//! assert_eq!("01011111", field.as_binary());
+225//! ```
+226//!
+227//! Clear bit value by field:
+228//!
+229//! ```rust
+230//! # use ubits::bitfield;
+231//! #    bitfield! {
+232//! #        pub u8 ExampleField
+233//! #        ExampleFlags {
+234//! #            0 : Flag0,
+235//! #            1 : Flag1,
+236//! #            2 : Flag2,
+237//! #            3 : Flag3,
+238//! #            4 : Flag4,
+239//! #            5 : Flag5,
+240//! #            6 : Flag6,
+241//! #            7 : Flag7,
+242//! #        }
+243//! #    }
+244//!
+245//! let mut field = ExampleField::from_binary_str("01010101");
+246//! field.clear(ExampleFlags::Flag0);
+247//! field.clear(ExampleFlags::Flag2);
+248//! assert_eq!("01010000", field.as_binary());
+249//! ```
+250//!
+251//! Clear bit value by index:
+252//!
+253//! ```rust
+254//! # use ubits::bitfield;
+255//! #    bitfield! {
+256//! #        pub u8 ExampleField
+257//! #        ExampleFlags {
+258//! #            0 : Flag0,
+259//! #            1 : Flag1,
+260//! #            2 : Flag2,
+261//! #            3 : Flag3,
+262//! #            4 : Flag4,
+263//! #            5 : Flag5,
+264//! #            6 : Flag6,
+265//! #            7 : Flag7,
+266//! #        }
+267//! #    }
+268//!
+269//! let mut field = ExampleField::from_binary_str("01010101");
+270//! field.clear_index(0);
+271//! field.clear_index(2);
+272//! assert_eq!("01010000", field.as_binary());
+273//! ```
+274//!
+275//! Toggle bit value by field:
+276//!
+277//! ```rust
+278//! # use ubits::bitfield;
+279//! #    bitfield! {
+280//! #        pub u8 ExampleField
+281//! #        ExampleFlags {
+282//! #            0 : Flag0,
+283//! #            1 : Flag1,
+284//! #            2 : Flag2,
+285//! #            3 : Flag3,
+286//! #            4 : Flag4,
+287//! #            5 : Flag5,
+288//! #            6 : Flag6,
+289//! #            7 : Flag7,
+290//! #        }
+291//! #    }
+292//!
+293//! let mut field = ExampleField::from_binary_str("01010101");
+294//! field.toggle(ExampleFlags::Flag0);
+295//! assert_eq!("01010100", field.as_binary());
+296//! field.toggle(ExampleFlags::Flag0);
+297//! assert_eq!("01010101", field.as_binary());
+298//! ```
+299//!
+300//! Toggle bit value by index:
+301//!
+302//! ```rust
+303//! # use ubits::bitfield;
+304//! #    bitfield! {
+305//! #        pub u8 ExampleField
+306//! #        ExampleFlags {
+307//! #            0 : Flag0,
+308//! #            1 : Flag1,
+309//! #            2 : Flag2,
+310//! #            3 : Flag3,
+311//! #            4 : Flag4,
+312//! #            5 : Flag5,
+313//! #            6 : Flag6,
+314//! #            7 : Flag7,
+315//! #        }
+316//! #    }
+317//!
+318//! let mut field = ExampleField::from_binary_str("01010101");
+319//! field.toggle_index(0);
+320//! assert_eq!("01010100", field.as_binary());
+321//! field.toggle_index(0);
+322//! assert_eq!("01010101", field.as_binary());
+323//! ```
+324//!
+325//! ### Named Getters and Setters
+326//!
+327//! Ubits can generate getter and setter methods for zero or more fields, if a name is provided.
+328//!
+329//! ```rust
+330//! use ubits::bitfield;
+331//!    bitfield! {
+332//!        pub u8 ExampleField
+333//!        ExampleFlags {
+334//!            0 : Flag0 : (field_0),  // is_field_0 & set_field_0 & clear_field_0 & toggle_field_0
+335//!            1 : Flag1 : (field_1),  // is_field_1 & set_field_1 & clear_field_1 & toggle_field_1
+336//!            2 : Flag2,
+337//!            3 : Flag3,
+338//!            4 : Flag4,
+339//!            5 : Flag5,
+340//!            6 : Flag6,
+341//!            7 : Flag7,
+342//!        }
+343//!    }
+344//!
+345//! let mut field = ExampleField::from_binary_str("01010101");
+346//! assert_eq!(true, field.is_field_0());
+347//! assert_eq!(false, field.is_field_1());
+348//!
+349//! field.set_field_1();
+350//! assert_eq!(true, field.is_field_1());
+351//!
+352//! field.clear_field_1();
+353//! assert_eq!(false, field.is_field_1());
+354//!
+355//! field.toggle_field_1();
+356//! assert_eq!(true, field.is_field_1());
+357//! ```
+358//!
+359//! ### Combinations
+360//!
+361//! Combine bit fields: <br>
+362//! (use `into_combined` to consume self)
+363//!
+364//! ```rust
+365//! # use ubits::bitfield;
+366//! #    bitfield! {
+367//! #        pub u8 ExampleField
+368//! #        ExampleFlags {
+369//! #            0 : Flag0,
+370//! #            1 : Flag1,
+371//! #            2 : Flag2,
+372//! #            3 : Flag3,
+373//! #            4 : Flag4,
+374//! #            5 : Flag5,
+375//! #            6 : Flag6,
+376//! #            7 : Flag7,
+377//! #        }
+378//! #    }
+379//!
+380//! let mut a = ExampleField::from_binary_str("01010101");
+381//! let b = ExampleField::from_binary_str("10101010");
+382//! assert_eq!("11111111", a.combine(b).as_binary());
+383//! ```
+384//!
+385//! Get the intersection of two bitfields: <br>
+386//! (use `into_intersection` to consume self)
+387//! ```rust
+388//! # use ubits::bitfield;
+389//! #    bitfield! {
+390//! #        pub u8 ExampleField
+391//! #        ExampleFlags {
+392//! #            0 : Flag0,
+393//! #            1 : Flag1,
+394//! #            2 : Flag2,
+395//! #            3 : Flag3,
+396//! #            4 : Flag4,
+397//! #            5 : Flag5,
+398//! #            6 : Flag6,
+399//! #            7 : Flag7,
+400//! #        }
+401//! #    }
+402//!
+403//! let mut a = ExampleField::from_binary_str("11000011");
+404//! let b = ExampleField::from_binary_str("01111110");
+405//! assert_eq!("01000010", a.intersect(b).as_binary());
+406//! ```
+407//!
+408//! Get the diff of two bitfields: <br>
+409//! (use `into_diff` to consume self)
+410//!
+411//! ```rust
+412//! # use ubits::bitfield;
+413//! #    bitfield! {
+414//! #        pub u8 ExampleField
+415//! #        ExampleFlags {
+416//! #            0 : Flag0,
+417//! #            1 : Flag1,
+418//! #            2 : Flag2,
+419//! #            3 : Flag3,
+420//! #            4 : Flag4,
+421//! #            5 : Flag5,
+422//! #            6 : Flag6,
+423//! #            7 : Flag7,
+424//! #        }
+425//! #    }
+426//!
+427//! let mut a = ExampleField::from_binary_str("11000011");
+428//! let b = ExampleField::from_binary_str("01100110");
+429//! assert_eq!("10100101", a.diff(b).as_binary());
+430//! ```
+431//!
+432//! ### Bitwise
+433//!
+434//! Both bit field instances and flags use bitwise operators to change bit values.
+435//!
+436//! ```rust
+437//! # use ubits::bitfield;
+438//! #    bitfield! {
+439//! #        pub u8 ExampleField
+440//! #        ExampleFlags {
+441//! #            0 : Flag0,
+442//! #            1 : Flag1,
+443//! #            2 : Flag2,
+444//! #            3 : Flag3,
+445//! #            4 : Flag4,
+446//! #            5 : Flag5,
+447//! #            6 : Flag6,
+448//! #            7 : Flag7,
+449//! #        }
+450//! #    }
+451//!
+452//! let mut from_zeros = ExampleField::zeros();
+453//! assert_eq!("00000000", from_zeros.as_binary());
+454//!
+455//! // set bit to 1
+456//! from_zeros |= ExampleFlags::Flag1;
+457//! assert_eq!("00000010", from_zeros.as_binary());
+458//!
+459//! // set bit back to 0
+460//! from_zeros &= ExampleFlags::Flag1;
+461//! assert_eq!("00000000", from_zeros.as_binary());
+462//!
+463//! // toggle a bit
+464//! from_zeros ^= ExampleFlags::Flag1;
+465//! assert_eq!("00000010", from_zeros.as_binary());
+466//!
+467//! from_zeros ^= ExampleFlags::Flag1;
+468//! assert_eq!("00000000", from_zeros.as_binary());
+469//! ```
+470//!
+471//! Operations can also be chained together:
+472//!
+473//! ```rust
+474//! # use ubits::bitfield;
+475//! #    bitfield! {
+476//! #        pub u8 ExampleField
+477//! #        ExampleFlags {
+478//! #            0 : Flag0,
+479//! #            1 : Flag1,
+480//! #            2 : Flag2,
+481//! #            3 : Flag3,
+482//! #            4 : Flag4,
+483//! #            5 : Flag5,
+484//! #            6 : Flag6,
+485//! #            7 : Flag7,
+486//! #        }
+487//! #    }
+488//!
+489//! let mut from_zeros = ExampleField::zeros() | ExampleFlags::Flag1 | ExampleFlags::Flag3;
+490//! assert_eq!("00001010", from_zeros.as_binary());
+491//!
+492//! ```
+493//!
+494//! Bitfield instances can also be created from combining flags:
+495//!
+496//! ```rust
+497//! # use ubits::bitfield;
+498//! #    bitfield! {
+499//! #        pub u8 ExampleField
+500//! #        ExampleFlags {
+501//! #            0 : Flag0,
+502//! #            1 : Flag1,
+503//! #            2 : Flag2,
+504//! #            3 : Flag3,
+505//! #            4 : Flag4,
+506//! #            5 : Flag5,
+507//! #            6 : Flag6,
+508//! #            7 : Flag7,
+509//! #        }
+510//! #    }
+511//!
+512//! let mut from_zeros = ExampleFlags::Flag1 | ExampleFlags::Flag3;
+513//! assert_eq!("00001010", from_zeros.as_binary());
+514//!
+515//! ```
+516//!
+517//! ## Fields named with flags
+518//!
+519//! The generated flags enum allows you to access bits by name.
+520//! The flag has an associated [`u8`] value,
+521//! which determines the index its target bit.
+522//! (See [`bitfield`] for more info)
+523//!
+524//! With the following input...
+525//! ```no_compile
+526//! 1 0 1 0 0 1 1 0
+527//! ```
+528//!
+529//! and the following flags...
+530//! ```no_compile
+531//! 0 : f1
+532//! 1 : f1
+533//! 2 : f2
+534//! 3 : f3
+535//! 4 : f4
+536//! 5 : f5
+537//! 6 : f6
+538//! 7 : f7
+539//! ```
+540//!
+541//! we end up with this layout.
+542//!
+543//! | name      | f7  | f6  | f5  | f4  | f3  | f2  | f1  | f0  |
+544//! |-----------|----|----|----|----|----|----|----|----|
+545//! | bit value | 1  | 0  | 1  | 0  | 0  | 1  | 1  | 0  |
+546//! | index     | 7  | 6  | 5  | 4  | 3  | 2  | 1  | 0  |
+547//!
+548//!
+549//! With the same input and only the first few flags:
+550//!
+551//! ```no_compile
+552//! 0 : f0
+553//! 1 : f1
+554//! 2 : f2
+555//! ```
+556//!
+557//! we end up with this layout.
+558//!
+559//! | name      |    |    |    |    |    | f2 | f1 | f0 |
+560//! |-----------|----|----|----|----|----|----|----|----|
+561//! | bit value | 1  | 0  | 1  | 0  | 0  | 1  | 1  | 0  |
+562//! | index     | 7  | 6  | 5  | 4  | 3  | 2  | 1  | 0  |
+563//!
+564//!
+565//! Using the same input, but with dispersed flags:
+566//!
+567//! ```no_compile
+568//! 1 : f0
+569//! 3 : f1
+570//! 6 : f2
+571//! ```
+572//!
+573//! we end up with this layout.
+574//!
+575//! | name      |    | f2 |    |    | f1 |    | f0 |    |
+576//! |-----------|----|----|----|----|----|----|----|----|
+577//! | bit value | 1  | 0  | 1  | 0  | 0  | 1  | 1  | 0  |
+578//! | index     | 7  | 6  | 5  | 4  | 3  | 2  | 1  | 0  |
+579//!
+580
+581// -------------------------------------------------------------------------------------------------
+582// Imports
+583
+584extern crate doc_comment;
+585extern crate paste;
+586extern crate safe_transmute;
+587
+588#[doc(hidden)]
+589pub use doc_comment::doc_comment as __doc_comment;
+590
+591#[doc(hidden)]
+592pub use safe_transmute::{
+593    transmute_one as __transmute_one, TriviallyTransmutable as __TriviallyTransmutable,
+594};
+595
+596#[doc(hidden)]
+597pub use paste::paste as __paste;
+598
+599// -------------------------------------------------------------------------------------------------
+600// Generator Macros
+601
+602/// Generates a bitfield struct and a corresponding flag enum.
+603///
+604/// Can be used multiple times in a single codebase
+605/// as long as the identifiers are unique or are isolated so as not to clash.
+606///
+607/// __See the [`examples`] module for examples of the generated output.__
+608///
+609/// # Args
+610///
+611/// - `pub` - optional accessor: if provided, both generated items will public.
+612/// If omitted, both will be private. <br>
+613/// [see here](https://doc.rust-lang.org/reference/visibility-and-privacy.html#visibility-and-privacy) for possible visibility options.
+614///
+615/// - `ExampleField` - name for the generated bitfield struct.
+616/// (results in `struct ExampleField(...)`)
+617///
+618/// - `ExampleFlags` - name for the generated flag enum.
+619/// (results in `enum ExampleFlags { ... }`)
+620///
+621/// - `u8` - unsigned integer type to use as a bit array. *Must be an unsigned integer* <br>
+622/// valid options are: [`u8`],[`u16`], [`u32`], [`u64`], [`u128`], [`usize`]
+623///
+624/// - `0 : Flag0` - defines each member of the flag enum. <br>
+625/// The left hand side must be a [`u8`] `(0..=254)`
+626/// and must be less than the number of bits in the underlying unsigned type.
+627/// This value determines the index of the target bit within the field. <br>
+628/// The right hand side can be any valid identifier (unique to this enum).
+629/// These identifiers will be used to access the corresponding field.
+630///
+631/// - `/// docstrings` - Each element can take optional docstrings.
+632/// This includes the bit field struct, the flag enum, and each member within the flag enum.
+633/// See [`examples`] for more information.
+634///
+635/// # Examples:
+636///
+637/// Full Example - (see below for explanation for each parameter):
+638/// ```rust
+639/// use ubits::bitfield;
+640///
+641///     bitfield! {
+642///         /// Optional docstring
+643///         /// for [`ExampleField`] struct
+644///         pub u8 ExampleField
+645///         /// Optional docstring
+646///         /// for [`ExampleFlags`] enum
+647///         ExampleFlags {
+648///             /// Optional docstring for [`ExampleFlags::Flag0`]
+649///             0 : Flag0,
+650///             /// Optional docstring for [`ExampleFlags::Flag1`]
+651///             1 : Flag1,
+652///             /// Optional docstring for [`ExampleFlags::Flag2`]
+653///             2 : Flag2,
+654///             /// Optional docstring for [`ExampleFlags::Flag3`]
+655///             3 : Flag3,
+656///             /// Optional docstring for [`ExampleFlags::Flag4`]
+657///             4 : Flag4,
+658///             /// Optional docstring for [`ExampleFlags::Flag5`]
+659///             5 : Flag5,
+660///             /// Optional docstring for [`ExampleFlags::Flag6`]
+661///             6 : Flag6,
+662///             /// Optional docstring for [`ExampleFlags::Flag7`]
+663///             7 : Flag7,
+664///         }
+665///     }
+666/// ```
+667///
+668/// You don't have to name *all* the fields if you don't need them...
+669///
+670/// You can use just a few from the front:
+671/// ```rust
+672/// use ubits::bitfield;
+673///
+674///     bitfield! {
+675///         /// Optional docstring
+676///         /// for [`ExampleField`] struct
+677///         pub u8 ExampleField
+678///         /// Optional docstring
+679///         /// for [`ExampleFlags`] enum
+680///         ExampleFlags {
+681///             /// Optional docstring for [`ExampleFlags::Flag0`]
+682///             0 : Flag0,
+683///             /// Optional docstring for [`ExampleFlags::Flag1`]
+684///             1 : Flag1,
+685///             /// Optional docstring for [`ExampleFlags::Flag2`]
+686///             2 : Flag2,
+687///         }
+688///     }
+689/// ```
+690///
+691/// ... or any valid indices:
+692/// ```rust
+693/// use ubits::bitfield;
+694///
+695///     bitfield! {
+696///         /// Optional docstring
+697///         /// for [`ExampleField`] struct
+698///         pub u8 ExampleField
+699///         /// Optional docstring
+700///         /// for [`ExampleFlags`] enum
+701///         ExampleFlags {
+702///             /// Optional docstring for [`ExampleFlags::Flag0`]
+703///             0 : Flag0,
+704///             /// Optional docstring for [`ExampleFlags::Flag1`]
+705///             3 : Flag1,
+706///             /// Optional docstring for [`ExampleFlags::Flag2`]
+707///             6 : Flag2,
+708///         }
+709///     }
+710/// ```
+711/// ... or just omit the flags altogether and use indices only.:
+712/// ```rust
+713/// use ubits::bitfield;
+714///     bitfield! {
+715///         /// Optional docstring
+716///         /// for [`ExampleField`] struct
+717///         pub u8 ExampleField
+718///     }
+719/// ```
+720/// __Note: if you omit flags, no flag enum will be generated
+721/// and no methods for the bitfield struct that rely on flags will be generated.__
+722///
+723#[macro_export(local_inner_macros)]
+724macro_rules! bitfield {
+725
+726    // U8
+727    (
+728        $(#[$doc:meta])*
+729        $access:vis u8 $name:ident
+730        $(
+731            $(#[$flag_doc:meta])*
+732            $flag:ident {
+733                $(
+734                    $(#[$member_doc:meta])*
+735                    $idx:literal : $field:ident $( : ( $named_getter:ident ) )?,
+736                )*
+737            }
+738        )?
+739    ) => {
+740        __bitfield_unchecked!( $(#[$doc])* $access [u8] [8] [u8::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
+741    };
+742
+743    // U16
+744    (
+745        $(#[$doc:meta])*
+746        $access:vis u16 $name:ident
+747        $(
+748            $(#[$flag_doc:meta])*
+749            $flag:ident {
+750                $(
+751                    $(#[$member_doc:meta])*
+752                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+753                )*
+754            }
+755        )?
+756    ) => {
+757        __bitfield_unchecked!( $(#[$doc])* $access [u16] [16] [u16::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
+758    };
+759
+760    // U32
+761    (
+762        $(#[$doc:meta])*
+763        $access:vis u32 $name:ident
+764        $(
+765            $(#[$flag_doc:meta])*
+766            $flag:ident {
+767                $(
+768                    $(#[$member_doc:meta])*
+769                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+770                )*
+771            }
+772        )?
+773    ) => {
+774        __bitfield_unchecked!( $(#[$doc])* $access [u32] [32] [u32::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
+775    };
+776
+777    // U64
+778    (
+779        $(#[$doc:meta])*
+780        $access:vis u64 $name:ident
+781        $(
+782            $(#[$flag_doc:meta])*
+783            $flag:ident {
+784                $(
+785                    $(#[$member_doc:meta])*
+786                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+787                )*
+788            }
+789        )?
+790    ) => {
+791        __bitfield_unchecked!( $(#[$doc])* $access [u64] [64] [u64::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
+792    };
+793
+794    // U128
+795    (
+796        $(#[$doc:meta])*
+797        $access:vis u128 $name:ident
+798        $(
+799            $(#[$flag_doc:meta])*
+800            $flag:ident {
+801                $(
+802                    $(#[$member_doc:meta])*
+803                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+804                )*
+805            }
+806        )?
+807    ) => {
+808        __bitfield_unchecked!( $(#[$doc])* $access [u128] [128] [u128::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
+809    };
+810
+811    // USIZE
+812    (
+813        $(#[$doc:meta])*
+814        $access:vis usize $name:ident
+815        $(
+816            $(#[$flag_doc:meta])*
+817            $flag:ident {
+818                $(
+819                    $(#[$member_doc:meta])*
+820                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+821                )*
+822            }
+823        )?
+824    ) => {
+825        __bitfield_unchecked!( $(#[$doc])* $access [usize] [usize::BITS as usize] [usize::MAX] $name $($(#[$flag_doc])* $flag { $( $(#[$member_doc])* $idx : $field $(($named_getter))?, )* } )?);
+826    };
+827}
+828
+829/// Not to be used directly.
+830///
+831/// Generates a bitfield struct and flag enum
+832/// but does no type checking.
+833/// Passing types that aren't unsigned integer types is undefined behaviour.
+834///
+835/// Use the [`bitfield`] macro instead as it enforces a closed set of types.
+836#[doc(hidden)]
+837#[macro_export(local_inner_macros)]
+838macro_rules! __bitfield_unchecked {
+839    (
+840        $(#[$field_doc:meta])*
+841        $access:vis [$type:ty] [$($bits:tt)*] [$max:path] $name:ident
+842        $(
+843            $(#[$flag_doc:meta])*
+844            $flag:ident {
+845                $(
+846                    $(#[$member_doc:meta])*
+847                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+848                )*
+849            }
+850        )?
+851    ) => {
+852
+853        $(
+854            __def_flag_enum! {
+855                $(#[$flag_doc])*
+856                $access $name
+857                $flag {
+858                    $(
+859                        $(#[$member_doc])*
+860                        $idx : $field $(($named_getter))?,
+861                    )*
+862                }
+863            }
+864        )?
+865
+866        __def_field_struct! {
+867            $(#[$field_doc])*
+868            $access [$type] [$($bits)*] [$max] $name
+869            $(
+870                $flag {
+871                    $(
+872                        $(#[$member_doc])*
+873                        $idx : $field $(($named_getter))?,
+874                    )*
+875                }
+876            )?
+877        }
+878    };
+879}
+880
+881// -------------------------------------------------------------------------------------------------
+882// Type Definitions
+883
+884/// Defines a field struct with its members and implementations
+885#[doc(hidden)]
+886#[macro_export(local_inner_macros)]
+887macro_rules! __def_field_struct {
+888    (
+889        $(#[$field_doc:meta])*
+890        $access:vis [$type:ty] [$($bits:tt)*] [$max:path] $name:ident
+891        $(
+892            $flag:ident {
+893                $(
+894                    $(#[$member_doc:meta])*
+895                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+896                )*
+897            }
+898        )?
+899    ) => {
+900
+901        // Struct: $name
+902        $(#[$field_doc])*
+903        #[derive(Copy, Clone, PartialEq, PartialOrd)]
+904        $access struct $name($type);
+905
+906        $(
+907            impl $name {
+908                $(
+909                    $(
+910                        __paste! {
+911                            pub fn [< is_ $named_getter >](&self) -> bool {
+912                                self.get($flag::$field)
+913                            }
+914                        }
+915
+916                        __paste! {
+917                            pub fn [< set_ $named_getter >](&mut self) {
+918                                self.set($flag::$field);
+919                            }
+920                        }
+921
+922                        __paste! {
+923                            pub fn [< clear_ $named_getter >](&mut self) {
+924                                self.clear($flag::$field);
+925                            }
+926                        }
+927
+928                        __paste! {
+929                            pub fn [< toggle_ $named_getter >](&mut self) {
+930                                self.toggle($flag::$field);
+931                            }
+932                        }
+933                    )?
+934                )*
+935            }
+936        )?
+937
+938        // Constants
+939        __impl_field_constants! {
+940            $name { type: $type, max: $max, bits: [$($bits)*] }
+941        }
+942
+943        // Constructors
+944        __impl_field_ctors! {
+945            $name : $type
+946        }
+947
+948        // State
+949        __impl_field_state! {
+950            $name : $type
+951        }
+952
+953        // Indexers
+954        __impl_field_index_accessors! {
+955            $name
+956        }
+957
+958        $(
+959            // Flags
+960            __impl_field_flag_accessors! {
+961                $name $flag $type
+962            }
+963        )?
+964
+965        // Combinators
+966        __impl_field_flag_combinators! {
+967            $name
+968        }
+969
+970        // Converters
+971        __impl_field_flag_converters! {
+972            $name
+973        }
+974
+975        // Name: $name
+976        __impl_default! {
+977            $name => { $name(0) }
+978        }
+979
+980        // From: $type -> $name
+981        __impl_from! {
+982            /// Returns a field instance from value of its underlying type.
+983            $type as $name (value) => {
+984                $name(value)
+985            }
+986        }
+987
+988        $(
+989            // From: $flag -> $name
+990            __impl_from! {
+991                /// Returns a field instance from a flag.
+992                $flag as $name (value) => {
+993                    Self(0 | (1 << (value as $type)) )
+994                }
+995            }
+996        )?
+997
+998        // Bitwise: $name + $name
+999        __impl_bitwise_operators! {
+1000            [Self] for $name : (self rhs -> Self)
+1001            BitAnd => { Self(self.0 & rhs.0) }
+1002            BitOr => { Self(self.0 | rhs.0) }
+1003            BitXor => {  Self(self.0 ^ rhs.0) }
+1004            BitAndAssign => { self.0 &= rhs.0; }
+1005            BitOrAssign => { self.0 |= rhs.0; }
+1006            BitXorAssign => { self.0 ^= rhs.0; }
+1007        }
+1008
+1009        $(
+1010            // Bitwise: $name + $flag
+1011            __impl_bitwise_operators! {
+1012                [$flag] for $name : (self rhs -> $name)
+1013                BitAnd => { $name(self.0 & !(1 << (rhs as $type))) }
+1014                BitOr => { $name(self.0 | (1 << (rhs as $type))) }
+1015                BitXor => { $name(self.0 ^ (1 << (rhs as $type))) }
+1016                BitAndAssign => { self.clear(rhs); }
+1017                BitOrAssign => { self.set(rhs); }
+1018                BitXorAssign => { self.toggle(rhs); }
+1019            }
+1020
+1021            // Bitwise: &$name + $flag
+1022            __impl_bitwise_operators! {
+1023                [$flag] for & $name : (self rhs -> $name)
+1024                BitAnd => { $name(self.0 & !(1 << (rhs as $type))) }
+1025                BitOr => { $name(self.0 | (1 << (rhs as $type))) }
+1026                BitXor => { $name(self.0 ^ (1 << (rhs as $type))) }
+1027            }
+1028
+1029            // Bitwise: $mut $name + $flag
+1030            __impl_bitwise_operators! {
+1031                [$flag] for &mut $name : (self rhs -> $name)
+1032                BitAnd => { $name(self.0 & !(1 << (rhs as $type))) }
+1033                BitOr => { $name(self.0 | (1 << (rhs as $type))) }
+1034                BitXor => { $name(self.0 ^ (1 << (rhs as $type))) }
+1035            }
+1036        )?
+1037
+1038        // Bitwise: Debug & Binary
+1039        __impl_formatters! {
+1040            $name (self f) {
+1041                Debug => { core::write!(f, "{}({})", core::stringify!($name), self.as_binary()) }
+1042                Binary => { core::write!(f, "{}", self.as_binary()) }
+1043            }
+1044        }
+1045    };
+1046}
+1047
+1048/// Defines a flag enum with its members and implementations
+1049#[doc(hidden)]
+1050#[macro_export(local_inner_macros)]
+1051macro_rules! __def_flag_enum {
+1052    (
+1053        $(#[$flag_doc:meta])*
+1054        $access:vis $name:ident
+1055        $flag:ident {
+1056            $(
+1057                $(#[$member_doc:meta])*
+1058                $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+1059            )*
+1060        }
+1061    ) => {
+1062
+1063        // Enum: $flag
+1064        $(#[$flag_doc])*
+1065        #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
+1066        #[repr(u8)]
+1067        $access enum $flag {
+1068            $( $(#[$member_doc])* $field = $idx ),*
+1069        }
+1070
+1071        // Bitwise: $flag + $flag
+1072        __impl_bitwise_operators! {
+1073            [Self] for $flag : (self rhs -> $name)
+1074            BitAnd => { $name(0).clear(self) & rhs }
+1075            BitOr => { $name(0).set(self) | rhs }
+1076            BitXor => { $name(0).toggle(self) ^ rhs }
+1077        }
+1078
+1079        // Bitwise: u8 -> $flag
+1080        __impl_from! {
+1081            /// Converts a [`u8`] to a flag
+1082            ///
+1083            /// # Errors
+1084            ///
+1085            /// Panics if the supplied [`u8`] is out of range for fields base type.
+1086            /// eg: for a 16-bit field (using [`u16`]),
+1087            /// providing an index of `20` will cause a panic.
+1088            u8 as $flag (value) => {
+1089                $crate::__transmute_one::<$flag>(&[value])
+1090                .expect(std::format!(
+1091                    "failed to transmute {} to {}. {} is not a valid index in {}.",
+1092                    value,
+1093                    core::stringify!($flag),
+1094                    value,
+1095                    core::stringify!($flag)
+1096                ).as_str())
+1097            }
+1098        }
+1099
+1100        // Bitwise: $flag -> u8
+1101        __impl_from! {
+1102            /// Returns a flag as its corresponding [`u8`] value.
+1103            $flag as u8 (value) => {
+1104                value as u8
+1105            }
+1106        }
+1107
+1108        unsafe impl $crate::__TriviallyTransmutable for $flag {}
+1109    };
+1110}
+1111
+1112// -------------------------------------------------------------------------------------------------
+1113// Field Implementations
+1114
+1115/// Generates constants for `$name`
+1116#[doc(hidden)]
+1117#[macro_export]
+1118macro_rules! __impl_field_constants {
+1119    ($name:ident { type: $type:ty, max: $max:path, bits: [$($bits:tt)*] }) => {
+1120        $crate::__doc_comment! {
+1121            core::concat!(
+1122                "Constant values describing [`", core::stringify!($name), "`]."
+1123            ),
+1124            impl $name {
+1125                $crate::__doc_comment! {
+1126                    core::concat!(
+1127                      "Number of bits in an instance of [`", core::stringify!($name), "`]."
+1128                    ),
+1129                    pub const BITS: usize = $($bits)*;
+1130                }
+1131                $crate::__doc_comment! {
+1132                    core::concat!(
+1133                      "Number of bytes used by an instance of [`", core::stringify!($name), "`]."
+1134                    ),
+1135                    pub const BYTES: usize = $($bits)* / 8;
+1136                }
+1137                $crate::__doc_comment! {
+1138                    core::concat!(
+1139                      "Maximum valid integer for [`", core::stringify!($name), "`]."
+1140                    ),
+1141                    pub const MAX: $type = $max;
+1142                }
+1143            }
+1144        }
+1145    };
+1146}
+1147
+1148/// Generates constructors for `$name`
+1149#[doc(hidden)]
+1150#[macro_export]
+1151macro_rules! __impl_field_ctors {
+1152    ( $name:ident : $type:ty ) => {
+1153        $crate::__doc_comment! {
+1154            core::concat!(
+1155                "Constructors for creating instances of [`", core::stringify!($name), "`]."
+1156            ),
+1157            impl $name {
+1158                $crate::__doc_comment! {
+1159                    core::concat!(
+1160                      "Create a new instance of [`", core::stringify!($name), "`] ",
+1161                      "from a [`", core::stringify!($type), "`] value."
+1162                    ),
+1163                    pub fn new(value: $type) -> Self {
+1164                        Self(value)
+1165                    }
+1166                }
+1167
+1168                $crate::__doc_comment! {
+1169                    core::concat!(
+1170                      "Create a new instance of [`", core::stringify!($name), "`] ",
+1171                      "from `0`."
+1172                    ),
+1173                    pub fn zeros() -> Self {
+1174                        Self(0)
+1175                    }
+1176                }
+1177
+1178                $crate::__doc_comment! {
+1179                    core::concat!(
+1180                      "Create a new instance of [`", core::stringify!($name), "`] ",
+1181                      "from the maximum possible integer value."
+1182                    ),
+1183                    pub fn ones() -> Self {
+1184                        Self(Self::MAX)
+1185                    }
+1186                }
+1187
+1188                $crate::__doc_comment! {
+1189                    core::concat!(
+1190                      "Create a new instance of [`", core::stringify!($name), "`] ",
+1191                      "from a binary string."
+1192                    ),
+1193                    pub fn from_binary_str(value: &str) -> Self {
+1194                        Self(<$type>::from_str_radix(value, 2).unwrap())
+1195                    }
+1196                }
+1197
+1198                $crate::__doc_comment! {
+1199                    core::concat!(
+1200                      "Create a new instance of [`", core::stringify!($name), "`] ",
+1201                      "from a binary string."
+1202                    ),
+1203                    pub fn from_binary_string(value: String) -> Self {
+1204                        Self(<$type>::from_str_radix(value.as_str(), 2).unwrap())
+1205                    }
+1206                }
+1207            }
+1208        }
+1209    };
+1210}
+1211
+1212/// Generates getters for state fields in `$name`
+1213#[doc(hidden)]
+1214#[macro_export]
+1215macro_rules! __impl_field_state {
+1216    ($name:ident : $type:ty) => {
+1217        $crate::__doc_comment! {
+1218            core::concat!(
+1219                "Current state of this bitfield."
+1220            ),
+1221            impl $name {
+1222                $crate::__doc_comment! {
+1223                    core::concat!(
+1224                      "Returns the current field value as a [`", core::stringify!($type), "`]"
+1225                    ),
+1226                    pub fn as_integer(&self) -> $type {
+1227                        self.0
+1228                    }
+1229                }
+1230
+1231                $crate::__doc_comment! {
+1232                    core::concat!(
+1233                      "Returns the current field value as a binary formatted string."
+1234                    ),
+1235                    pub fn as_binary(&self) -> String {
+1236                        std::format!("{:0width$b}", self.0, width = Self::BITS)
+1237                    }
+1238                }
+1239            }
+1240        }
+1241    };
+1242}
+1243
+1244/// Generates getters by index for bit fields in `$name`
+1245#[doc(hidden)]
+1246#[macro_export]
+1247macro_rules! __impl_field_index_accessors {
+1248    ($name:ident) => {
+1249        $crate::__doc_comment! {
+1250            core::concat!(
+1251                "Field accessors by index for [`", core::stringify!($name), "`]."
+1252            ),
+1253            impl $name {
+1254                $crate::__doc_comment! {
+1255                    core::concat!(
+1256                        "Returns the value of the bit at the supplied index as a boolean."
+1257                    ),
+1258                    pub fn get_index(&self, index: u8) -> bool {
+1259                        ((self.0 >> index) & 1) == 1
+1260                    }
+1261                }
+1262
+1263                $crate::__doc_comment! {
+1264                    core::concat!(
+1265                        "Sets the value of the bit at the supplied index to `1`."
+1266                    ),
+1267                    pub fn set_index(&mut self, index: u8) {
+1268                        self.0 |= (1 << index);
+1269                    }
+1270                }
+1271
+1272                $crate::__doc_comment! {
+1273                    core::concat!(
+1274                        "Sets the value of the bit at the supplied index to `0`."
+1275                    ),
+1276                    pub fn clear_index(&mut self, index: u8) {
+1277                        self.0 &= !(1 << index);
+1278                    }
+1279                }
+1280
+1281                $crate::__doc_comment! {
+1282                    core::concat!(
+1283                        "Flips the value of the bit at the supplied index."
+1284                    ),
+1285                    pub fn toggle_index(&mut self, index: u8) {
+1286                        self.0 ^= (1 << index);
+1287                    }
+1288                }
+1289            }
+1290        }
+1291    };
+1292}
+1293
+1294/// Generates getters by flag for bit fields in `$name`
+1295#[doc(hidden)]
+1296#[macro_export]
+1297macro_rules! __impl_field_flag_accessors {
+1298    ($name:ident $flag:ident $type:ty) => {
+1299        $crate::__doc_comment! {
+1300            core::concat!(
+1301                "Named field accessors by [`", core::stringify!($flag), "`] for [`", core::stringify!($name), "`]."
+1302            ),
+1303            impl $name {
+1304                $crate::__doc_comment! {
+1305                    core::concat!(
+1306                        "Returns the value of the bit at the supplied flag as a boolean."
+1307                    ),
+1308                    pub fn get(&self, flag: $flag) -> bool {
+1309                        ((self.0 >> (flag as $type)) & 1) == 1
+1310                    }
+1311                }
+1312
+1313                $crate::__doc_comment! {
+1314                    core::concat!(
+1315                        "Sets the value of the bit at the supplied flag to `1`."
+1316                    ),
+1317                    pub fn set(&mut self, flag: $flag) -> &mut Self {
+1318                        self.0 |= (1 << (flag as $type));
+1319                        self
+1320                    }
+1321                }
+1322
+1323                $crate::__doc_comment! {
+1324                    core::concat!(
+1325                        "Sets the value of the bit at the supplied flag to `0`."
+1326                    ),
+1327                    pub fn clear(&mut self, flag: $flag) -> &mut Self {
+1328                        self.0 &= !(1 << (flag as $type));
+1329                        self
+1330                    }
+1331                }
+1332
+1333                $crate::__doc_comment! {
+1334                    core::concat!(
+1335                        "Flips the value of the bit at the supplied flag."
+1336                    ),
+1337                    pub fn toggle(&mut self, flag: $flag) -> &mut Self {
+1338                        self.0 ^= (1 << (flag as $type));
+1339                        self
+1340                    }
+1341                }
+1342            }
+1343        }
+1344    };
+1345}
+1346
+1347/// Generates combinator methods for `$name`
+1348#[doc(hidden)]
+1349#[macro_export]
+1350macro_rules! __impl_field_flag_combinators {
+1351    ($name:ident) => {
+1352        $crate::__doc_comment! {
+1353            core::concat!(
+1354                "Combinators for [`", core::stringify!($name), "`]."
+1355            ),
+1356            impl $name {
+1357                $crate::__doc_comment! {
+1358                    core::concat!(
+1359                        "Returns a new [`", core::stringify!($name), "`]",
+1360                        "with ones for flags that do not match. ",
+1361                        "Does not consume `self`."
+1362                    ),
+1363                    pub fn diff(&self, other: Self) -> Self {
+1364                        Self(self.0 ^ other.0)
+1365                    }
+1366                }
+1367
+1368                $crate::__doc_comment! {
+1369                    core::concat!(
+1370                        "Returns a new [`", core::stringify!($name), "`]",
+1371                        "with ones for flags that were set on either input. ",
+1372                        "Does not consume `self`."
+1373                    ),
+1374                    pub fn combine(&self, other: Self) -> Self {
+1375                        Self(self.0 | other.0)
+1376                    }
+1377                }
+1378
+1379                $crate::__doc_comment! {
+1380                    core::concat!(
+1381                        "Returns a new [`", core::stringify!($name), "`]",
+1382                        "with ones for flags that were set on both inputs. ",
+1383                        "Does not consume `self`."
+1384                    ),
+1385                    pub fn intersect(&self, other: Self) -> Self {
+1386                        Self(self.0 & other.0)
+1387                    }
+1388                }
+1389            }
+1390        }
+1391    };
+1392}
+1393
+1394/// Generates conversion methods for `$name`
+1395#[doc(hidden)]
+1396#[macro_export]
+1397macro_rules! __impl_field_flag_converters {
+1398    ($name:ident) => {
+1399        $crate::__doc_comment! {
+1400            core::concat!(
+1401                "Conversion methods."
+1402            ),
+1403            impl $name {
+1404                $crate::__doc_comment! {
+1405                    core::concat!(
+1406                        "Returns a new [`", core::stringify!($name), "`]",
+1407                        "with ones for flags that do not match. ",
+1408                        "Consumes `self`."
+1409                    ),
+1410                    pub fn into_diff(self, other: Self) -> Self {
+1411                        Self(self.0 ^ other.0)
+1412                    }
+1413                }
+1414
+1415                $crate::__doc_comment! {
+1416                    core::concat!(
+1417                        "Returns a new [`", core::stringify!($name), "`]",
+1418                        "with ones for flags that were set on either input. ",
+1419                        "Consumes `self`."
+1420                    ),
+1421                    pub fn into_combined(self, other: Self) -> Self {
+1422                        Self(self.0 | other.0)
+1423                    }
+1424                }
+1425
+1426                $crate::__doc_comment! {
+1427                    core::concat!(
+1428                        "Returns a new [`", core::stringify!($name), "`]",
+1429                        "with ones for flags that were set on both inputs. ",
+1430                        "Consumes `self`."
+1431                    ),
+1432                    pub fn into_intersection(self, other: Self) -> Self {
+1433                        Self(self.0 & other.0)
+1434                    }
+1435                }
+1436            }
+1437        }
+1438    };
+1439}
+1440
+1441// -------------------------------------------------------------------------------------------------
+1442// Trait Implementations
+1443
+1444// Operators
+1445
+1446/// Generates a set of bitwise operators
+1447/// for a set of parameters
+1448#[doc(hidden)]
+1449#[macro_export(local_inner_macros)]
+1450macro_rules! __impl_bitwise_operators {
+1451
+1452    // Owned
+1453    (
+1454        [$flag:ty] for $dest:ident : ($self:ident $other:ident -> $output:ident)
+1455        $( BitAnd => $bitand:block )?
+1456        $( BitOr => $bitor:block )?
+1457        $( BitXor => $bitxor:block )?
+1458        $( BitAndAssign => $bitand_assign:block )?
+1459        $( BitOrAssign => $bitor_assign:block )?
+1460        $( BitXorAssign => $bitxor_assign:block )?
+1461    ) => {
+1462        $( __impl_operator! {BitAnd [$flag] bitand for $dest ($self $other -> $output) => $bitand} )?
+1463        $( __impl_operator! {BitOr [$flag] bitor for $dest ($self $other -> $output) => $bitor} )?
+1464        $( __impl_operator! {BitXor [$flag] bitxor for $dest ($self $other -> $output) => $bitxor} )?
+1465
+1466        $( __impl_assign_operator! {BitAndAssign [$flag] bitand_assign for $dest ($self $other) => $bitand_assign} )?
+1467        $( __impl_assign_operator! {BitOrAssign [$flag] bitor_assign for $dest ($self $other) => $bitor_assign} )?
+1468        $( __impl_assign_operator! {BitXorAssign [$flag] bitxor_assign for $dest ($self $other) => $bitxor_assign} )?
+1469    };
+1470
+1471    // Reference
+1472    (
+1473        [$flag:ty] for & $dest:ident : ($self:ident $other:ident -> $output:ident)
+1474        $( BitAnd => $bitand:block )?
+1475        $( BitOr => $bitor:block )?
+1476        $( BitXor => $bitxor:block )?
+1477    ) => {
+1478        $( __impl_operator! {BitAnd [$flag] bitand for & $dest ($self $other -> $output) => $bitand} )?
+1479        $( __impl_operator! {BitOr [$flag] bitor for & $dest ($self $other -> $output) => $bitor} )?
+1480        $( __impl_operator! {BitXor [$flag] bitxor for & $dest ($self $other -> $output) => $bitxor} )?
+1481    };
+1482
+1483    // Mutable Reference
+1484    (
+1485        [$flag:ty] for &mut $dest:ident : ($self:ident $other:ident -> $output:ident)
+1486        $( BitAnd => $bitand:block )?
+1487        $( BitOr => $bitor:block )?
+1488        $( BitXor => $bitxor:block )?
+1489    ) => {
+1490        $( __impl_operator! {BitAnd [$flag] bitand for &mut $dest ($self $other -> $output) => $bitand} )?
+1491        $( __impl_operator! {BitOr [$flag] bitor for &mut $dest ($self $other -> $output) => $bitor} )?
+1492        $( __impl_operator! {BitXor [$flag] bitxor for &mut $dest ($self $other -> $output) => $bitxor} )?
+1493    };
+1494}
+1495
+1496/// Generates a generic operator
+1497#[doc(hidden)]
+1498#[macro_export]
+1499macro_rules! __impl_operator {
+1500
+1501    // Owned
+1502    ( $op_type:ident [$rhs:ty] $op_lower:ident for $dest:ident ($self:ident $other:ident -> $output:ident) => $block:block ) => {
+1503        impl std::ops::$op_type<$rhs> for $dest {
+1504            type Output = $output;
+1505            fn $op_lower($self, $other: $rhs) -> Self::Output $block
+1506        }
+1507    };
+1508
+1509    // Reference
+1510    ( $op_type:ident [$rhs:ty] $op_lower:ident for & $dest:ident ($self:ident $other:ident -> $output:ident) => $block:block ) => {
+1511        impl std::ops::$op_type<$rhs> for &$dest {
+1512            type Output = $output;
+1513            fn $op_lower($self, $other: $rhs) -> Self::Output $block
+1514        }
+1515    };
+1516
+1517    // Mutable Reference
+1518    ( $op_type:ident [$rhs:ty] $op_lower:ident for &mut $dest:ident ($self:ident $other:ident -> $output:ident) => $block:block ) => {
+1519        impl std::ops::$op_type<$rhs> for &mut $dest {
+1520            type Output = $output;
+1521            fn $op_lower($self, $other: $rhs) -> Self::Output $block
+1522        }
+1523    };
+1524}
+1525
+1526/// Generates a generic assign operator
+1527#[doc(hidden)]
+1528#[macro_export]
+1529macro_rules! __impl_assign_operator {
+1530    ( $op_type:ident [$rhs:ty] $op_lower:ident for $dest:ident ($self:ident $other:ident) => $block:block ) => {
+1531        impl std::ops::$op_type<$rhs> for $dest {
+1532            fn $op_lower(&mut $self, $other: $rhs) $block
+1533        }
+1534    };
+1535}
+1536
+1537// Defaults
+1538
+1539/// Generates a [`Default`] implementation.
+1540#[doc(hidden)]
+1541#[macro_export]
+1542macro_rules! __impl_default {
+1543    ($name:ident => $block:block) => {
+1544        impl Default for $name {
+1545            fn default() -> Self $block
+1546        }
+1547    };
+1548}
+1549
+1550// Converters
+1551
+1552/// Generates a [`From`] implementation.
+1553#[doc(hidden)]
+1554#[macro_export]
+1555macro_rules! __impl_from {
+1556    ($(#[$doc:meta])* $from:ty as $to:ident ($arg:ident) => $block:block) => {
+1557        $(#[$doc])*
+1558        impl From<$from> for $to {
+1559            fn from($arg: $from) -> $to $block
+1560        }
+1561    };
+1562}
+1563
+1564// Formatters
+1565
+1566/// Generates formatter implementations
+1567/// from a set of parameters.
+1568#[doc(hidden)]
+1569#[macro_export(local_inner_macros)]
+1570macro_rules! __impl_formatters {
+1571    ($name:ident ($self:ident $f:ident) { $( $formatter:ident => $block:block )+ } ) => {
+1572        $( __impl_formatter!($formatter for $name ($self $f) => $block); )+
+1573    };
+1574}
+1575
+1576/// Generates a generic formatter implementation.
+1577#[doc(hidden)]
+1578#[macro_export]
+1579macro_rules! __impl_formatter {
+1580    ($formatter:ident for $name:ident ($self:ident $f:ident) => $block:block) => {
+1581        impl std::fmt::$formatter for $name {
+1582            fn fmt(&$self, $f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result $block
+1583        }
+1584    };
+1585}
+1586
+1587// -------------------------------------------------------------------------------------------------
+1588// Example
+1589
+1590#[allow(dead_code)]
+1591#[allow(unused_variables)]
+1592#[cfg(doc)]
+1593pub mod examples {
+1594    //! Examples of generated output using different configurations.
+1595    //!
+1596    //! __This module is only compiled with documentation builds
+1597    //! and will not be available for import.__
+1598    //!
+1599    //! use the [`bitfield`] macro to generate a field struct and flag enum.
+1600    //!
+1601
+1602    #[allow(dead_code)]
+1603    #[allow(unused_variables)]
+1604    #[cfg(doc)]
+1605    pub mod full_example {
+1606        //! Example of generated output, using both a bit field and a flag enum.
+1607        //!
+1608        //! __This module is only compiled with documentation builds
+1609        //! and will not be available for import.__
+1610        //!
+1611        //! use the [`bitfield`] macro to generate a field struct and flag enum.
+1612        //!
+1613        use super::*;
+1614
+1615        bitfield! {
+1616            /// Optional docstring for my example bit field.
+1617            pub u8 ExampleField
+1618            /// Optional docstring for my flag enum.
+1619            ExampleFlags {
+1620                /// Optional docstring for Flag0
+1621                0 : Flag0,
+1622                /// Optional docstring for Flag1
+1623                1 : Flag1,
+1624                /// Optional docstring for Flag2
+1625                2 : Flag2,
+1626                /// Optional docstring for Flag3
+1627                3 : Flag3,
+1628                /// Optional docstring for Flag4
+1629                4 : Flag4,
+1630                /// Optional docstring for Flag5
+1631                5 : Flag5,
+1632                /// Optional docstring for Flag6
+1633                6 : Flag6,
+1634                /// Optional docstring for Flag7
+1635                7 : Flag7,
+1636            }
+1637        }
+1638    }
+1639
+1640    #[allow(dead_code)]
+1641    #[allow(unused_variables)]
+1642    #[cfg(doc)]
+1643    pub mod flagless_example {
+1644        //! Example of generated output, using only a bit field without a flag enum.
+1645        //!
+1646        //! __This module is only compiled with documentation builds
+1647        //! and will not be available for import.__
+1648        //!
+1649        //! use the [`bitfield`] macro to generate a field struct and flag enum.
+1650        //!
+1651        use super::*;
+1652
+1653        bitfield! {
+1654            /// Optional docstring for my example bit field.
+1655            pub u8 ExampleField
+1656        }
+1657    }
+1658}
+1659
+1660// -------------------------------------------------------------------------------------------------
+1661// Tests
+1662
+1663#[allow(dead_code)]
+1664#[allow(unused_variables)]
+1665#[cfg(test)]
+1666mod test {
+1667    use super::*;
+1668    use std::{u128, u16, u32, u64, usize};
+1669
+1670    macro_rules! tests {
+1671        ( $( $name:ident => $block:block )+ ) => {
+1672            $(
+1673                #[test]
+1674                fn $name() $block
+1675            )+
+1676        };
+1677    }
+1678
+1679    bitfield! {
+1680        /// My Test Thing
+1681        u8 MyFieldU8
+1682        MyFlagsU8 {
+1683            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1684        }
+1685    }
+1686
+1687    bitfield! {
+1688        /// My Test Thing
+1689        u16 MyFieldU16
+1690        MyFlagsU16 {
+1691            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1692            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1693        }
+1694    }
+1695
+1696    bitfield! {
+1697        /// My Test Thing
+1698        u32 MyFieldU32
+1699        MyFlagsU32 {
+1700            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1701            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1702            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1703            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1704        }
+1705    }
+1706
+1707    bitfield! {
+1708        /// My Test Thing
+1709        u64 MyFieldU64
+1710        MyFlagsU64 {
+1711            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1712            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1713            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1714            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1715            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
+1716            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
+1717            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
+1718            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
+1719        }
+1720    }
+1721
+1722    bitfield! {
+1723        /// My Test Thing
+1724        u128 MyFieldU128
+1725        MyFlagsU128 {
+1726            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1727            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1728            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1729            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1730            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
+1731            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
+1732            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
+1733            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
+1734            64 : Flag64, 65 : Flag65, 66 : Flag66, 67 : Flag67, 68 : Flag68, 69 : Flag69, 70 : Flag70, 71 : Flag71,
+1735            72 : Flag72, 73 : Flag73, 74 : Flag74, 75 : Flag75, 76 : Flag76, 77 : Flag77, 78 : Flag78, 79 : Flag79,
+1736            80 : Flag80, 81 : Flag81, 82 : Flag82, 83 : Flag83, 84 : Flag84, 85 : Flag85, 86 : Flag86, 87 : Flag87,
+1737            88 : Flag88, 89 : Flag89, 90 : Flag90, 91 : Flag91, 92 : Flag92, 93 : Flag93, 94 : Flag94, 95 : Flag95,
+1738            96 : Flag96, 97 : Flag97, 98 : Flag98, 99 : Flag99, 100 : Flag100, 101 : Flag101, 102 : Flag102, 103 : Flag103,
+1739            104 : Flag104, 105 : Flag105, 106 : Flag106, 107 : Flag107, 108 : Flag108, 109 : Flag109, 110 : Flag110, 111 : Flag111,
+1740            112 : Flag112, 113 : Flag113, 114 : Flag114, 115 : Flag115, 116 : Flag116, 117 : Flag117, 118 : Flag118, 119 : Flag119,
+1741            120 : Flag120, 121 : Flag121, 122 : Flag122, 123 : Flag123, 124 : Flag124, 125 : Flag125, 126 : Flag126, 127 : Flag127,
+1742        }
+1743    }
+1744
+1745    #[cfg(target_pointer_width = "64")]
+1746    bitfield! {
+1747        /// My Test Thing
+1748        usize MyFieldUsize
+1749        MyFlagsUsize {
+1750            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1751            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1752            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1753            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1754            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
+1755            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
+1756            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
+1757            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
+1758        }
+1759    }
+1760
+1761    #[cfg(target_pointer_width = "32")]
+1762    bitfield! {
+1763        /// My Test Thing
+1764        usize MyFieldUsize
+1765        MyFlagsUsize {
+1766            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1767            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1768            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1769            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1770        }
+1771    }
+1772
+1773    bitfield! {
+1774        /// My Test Thing
+1775        u8 MyFieldU8Nf
+1776        MyFlagsU8Nf {
+1777            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1778        }
+1779    }
+1780
+1781    bitfield! {
+1782        /// My Test Thing
+1783        u16 MyFieldU16Nf
+1784        MyFlagsU16Nf {
+1785            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1786            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1787        }
+1788    }
+1789
+1790    bitfield! {
+1791        /// My Test Thing
+1792        u32 MyFieldU32Nf
+1793        MyFlagsU32Nf {
+1794            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1795            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1796            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1797            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1798        }
+1799    }
+1800
+1801    bitfield! {
+1802        /// My Test Thing
+1803        u64 MyFieldU64Nf
+1804        MyFlagsU64Nf {
+1805            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1806            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1807            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1808            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1809            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
+1810            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
+1811            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
+1812            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
+1813        }
+1814    }
+1815
+1816    bitfield! {
+1817        /// My Test Thing
+1818        u128 MyFieldU128Nf
+1819        MyFlagsU128Nf {
+1820            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1821            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1822            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1823            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1824            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
+1825            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
+1826            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
+1827            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
+1828            64 : Flag64, 65 : Flag65, 66 : Flag66, 67 : Flag67, 68 : Flag68, 69 : Flag69, 70 : Flag70, 71 : Flag71,
+1829            72 : Flag72, 73 : Flag73, 74 : Flag74, 75 : Flag75, 76 : Flag76, 77 : Flag77, 78 : Flag78, 79 : Flag79,
+1830            80 : Flag80, 81 : Flag81, 82 : Flag82, 83 : Flag83, 84 : Flag84, 85 : Flag85, 86 : Flag86, 87 : Flag87,
+1831            88 : Flag88, 89 : Flag89, 90 : Flag90, 91 : Flag91, 92 : Flag92, 93 : Flag93, 94 : Flag94, 95 : Flag95,
+1832            96 : Flag96, 97 : Flag97, 98 : Flag98, 99 : Flag99, 100 : Flag100, 101 : Flag101, 102 : Flag102, 103 : Flag103,
+1833            104 : Flag104, 105 : Flag105, 106 : Flag106, 107 : Flag107, 108 : Flag108, 109 : Flag109, 110 : Flag110, 111 : Flag111,
+1834            112 : Flag112, 113 : Flag113, 114 : Flag114, 115 : Flag115, 116 : Flag116, 117 : Flag117, 118 : Flag118, 119 : Flag119,
+1835            120 : Flag120, 121 : Flag121, 122 : Flag122, 123 : Flag123, 124 : Flag124, 125 : Flag125, 126 : Flag126, 127 : Flag127,
+1836        }
+1837    }
+1838
+1839    #[cfg(target_pointer_width = "64")]
+1840    bitfield! {
+1841        /// My Test Thing
+1842        usize MyFieldUsizeNf
+1843        MyFlagsUsizeNf {
+1844            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1845            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1846            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1847            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1848            32 : Flag32, 33 : Flag33, 34 : Flag34, 35 : Flag35, 36 : Flag36, 37 : Flag37, 38 : Flag38, 39 : Flag39,
+1849            40 : Flag40, 41 : Flag41, 42 : Flag42, 43 : Flag43, 44 : Flag44, 45 : Flag45, 46 : Flag46, 47 : Flag47,
+1850            48 : Flag48, 49 : Flag49, 50 : Flag50, 51 : Flag51, 52 : Flag52, 53 : Flag53, 54 : Flag54, 55 : Flag55,
+1851            56 : Flag56, 57 : Flag57, 58 : Flag58, 59 : Flag59, 60 : Flag60, 61 : Flag61, 62 : Flag62, 63 : Flag63,
+1852        }
+1853    }
+1854
+1855    #[cfg(target_pointer_width = "32")]
+1856    bitfield! {
+1857        /// My Test Thing
+1858        usize MyFieldUsizeNf
+1859        MyFlagsUsizeNf {
+1860            0 : Flag0, 1 : Flag1, 2 : Flag2, 3 : Flag3, 4 : Flag4, 5 : Flag5, 6 : Flag6, 7 : Flag7,
+1861            8 : Flag8, 9 : Flag9, 10 : Flag10, 11 : Flag11, 12 : Flag12, 13 : Flag13, 14 : Flag14, 15 : Flag15,
+1862            16 : Flag16, 17 : Flag17, 18 : Flag18, 19 : Flag19, 20 : Flag20, 21 : Flag21, 22 : Flag22, 23 : Flag23,
+1863            24 : Flag24, 25 : Flag25, 26 : Flag26, 27 : Flag27, 28 : Flag28, 29 : Flag29, 30 : Flag30, 31 : Flag31,
+1864        }
+1865    }
+1866
+1867    const U8: u8 = 123;
+1868    const B8: &str = "01111011";
+1869    const U16: u16 = 51526;
+1870    const B16: &str = "1100100101000110";
+1871    const U32: u32 = 2828091834;
+1872    const B32: &str = "10101000100100010100000110111010";
+1873    const U64: u64 = 18325744043706550615;
+1874    const B64: &str = "1111111001010010000111110001110100100001110111000000100101010111";
+1875    const U128: u128 = 160140183460469230739687303714882104727;
+1876    const B128: &str = "01111000011110011110000010100001011000111110000100101011010111011111111110000110011101100010110100100000110001101010110110010111";
+1877
+1878    #[cfg(target_pointer_width = "64")]
+1879    const USIZE: usize = 18325744043706550615;
+1880    #[cfg(target_pointer_width = "64")]
+1881    const BSIZE: &str = "1111111001010010000111110001110100100001110111000000100101010111";
+1882
+1883    #[cfg(target_pointer_width = "32")]
+1884    const USIZE: usize = 2828091834;
+1885    #[cfg(target_pointer_width = "32")]
+1886    const BSIZE: &str = "10101000100100010100000110111010";
+1887
+1888    // constructors
+1889    tests! {
+1890        new_u8 => {
+1891            MyFieldU8(U8);
+1892        }
+1893        new_u16 => {
+1894            MyFieldU16(U16);
+1895        }
+1896        new_u32 => {
+1897            MyFieldU32(U32);
+1898        }
+1899        new_u64 => {
+1900            MyFieldU64(U64);
+1901        }
+1902        new_u128 => {
+1903            MyFieldU128(U128);
+1904        }
+1905        new_usize => {
+1906            MyFieldUsize(USIZE);
+1907        }
+1908    }
+1909
+1910    // from binary str
+1911    tests! {
+1912        from_binary_str_u8 => {
+1913            assert_eq!(MyFieldU8::from_binary_str(B8), MyFieldU8(U8));
+1914        }
+1915        from_binary_str_u16 => {
+1916            assert_eq!(MyFieldU16::from_binary_str(B16), MyFieldU16(U16));
+1917        }
+1918        from_binary_str_u32 => {
+1919            assert_eq!(MyFieldU32::from_binary_str(B32), MyFieldU32(U32));
+1920        }
+1921        from_binary_str_u64 => {
+1922            assert_eq!(MyFieldU64::from_binary_str(B64), MyFieldU64(U64));
+1923        }
+1924        from_binary_str_u128 => {
+1925            assert_eq!(MyFieldU128::from_binary_str(B128), MyFieldU128(U128));
+1926        }
+1927        from_binary_str_usize => {
+1928            assert_eq!(MyFieldUsize::from_binary_str(BSIZE), MyFieldUsize(USIZE));
+1929        }
+1930    }
+1931
+1932    // from binary string
+1933    tests! {
+1934        from_binary_string_u8 => {
+1935            assert_eq!(MyFieldU8::from_binary_string(String::from(B8)), MyFieldU8(U8));
+1936        }
+1937        from_binary_string_u16 => {
+1938            assert_eq!(MyFieldU16::from_binary_string(String::from(B16)), MyFieldU16(U16));
+1939        }
+1940        from_binary_string_u32 => {
+1941            assert_eq!(MyFieldU32::from_binary_string(String::from(B32)), MyFieldU32(U32));
+1942        }
+1943        from_binary_string_u64 => {
+1944            assert_eq!(MyFieldU64::from_binary_string(String::from(B64)), MyFieldU64(U64));
+1945        }
+1946        from_binary_string_u128 => {
+1947            assert_eq!(MyFieldU128::from_binary_string(String::from(B128)), MyFieldU128(U128));
+1948        }
+1949        from_binary_string_usize => {
+1950            assert_eq!(MyFieldUsize::from_binary_string(String::from(BSIZE)), MyFieldUsize(USIZE));
+1951        }
+1952    }
+1953
+1954    // ones
+1955    tests! {
+1956        ones_u8 => {
+1957            assert_eq!(MyFieldU8::ones(), MyFieldU8(u8::MAX));
+1958        }
+1959        ones_u16 => {
+1960            assert_eq!(MyFieldU16::ones(), MyFieldU16(u16::MAX));
+1961        }
+1962        ones_u32 => {
+1963            assert_eq!(MyFieldU32::ones(), MyFieldU32(u32::MAX));
+1964        }
+1965        ones_u64 => {
+1966            assert_eq!(MyFieldU64::ones(), MyFieldU64(u64::MAX));
+1967        }
+1968        ones_u128 => {
+1969            assert_eq!(MyFieldU128::ones(), MyFieldU128(u128::MAX));
+1970        }
+1971        ones_usize => {
+1972            assert_eq!(MyFieldUsize::ones(), MyFieldUsize(usize::MAX));
+1973        }
+1974    }
+1975
+1976    // zeros
+1977    tests! {
+1978        zeros_u8 => {
+1979            assert_eq!(MyFieldU8::zeros(), MyFieldU8(0));
+1980        }
+1981        zeros_u16 => {
+1982            assert_eq!(MyFieldU16::zeros(), MyFieldU16(0));
+1983        }
+1984        zeros_u32 => {
+1985            assert_eq!(MyFieldU32::zeros(), MyFieldU32(0));
+1986        }
+1987        zeros_u64 => {
+1988            assert_eq!(MyFieldU64::zeros(), MyFieldU64(0));
+1989        }
+1990        zeros_u128 => {
+1991            assert_eq!(MyFieldU128::zeros(), MyFieldU128(0));
+1992        }
+1993        zeros_usize => {
+1994            assert_eq!(MyFieldUsize::zeros(), MyFieldUsize(0));
+1995        }
+1996    }
+1997
+1998    // defaults
+1999    tests! {
+2000        default_u8 => {
+2001            assert_eq!(0, MyFieldU8::default().as_integer())
+2002        }
+2003        default_u16 => {
+2004            assert_eq!(0, MyFieldU16::default().as_integer())
+2005        }
+2006        default_u32 => {
+2007            assert_eq!(0, MyFieldU32::default().as_integer())
+2008        }
+2009        default_u64 => {
+2010            assert_eq!(0, MyFieldU64::default().as_integer())
+2011        }
+2012        default_u128 => {
+2013            assert_eq!(0, MyFieldU128::default().as_integer())
+2014        }
+2015        default_usize => {
+2016            assert_eq!(0, MyFieldUsize::default().as_integer())
+2017        }
+2018    }
+2019
+2020    // bit count
+2021    tests! {
+2022        bit_count_u8 => {
+2023            let field = MyFieldU8(U8);
+2024            assert_eq!(u8::BITS as usize, MyFieldU8::BITS)
+2025        }
+2026        bit_count_u16 => {
+2027            let field = MyFieldU16(U16);
+2028            assert_eq!(u16::BITS as usize, MyFieldU16::BITS)
+2029        }
+2030        bit_count_u32 => {
+2031            let field = MyFieldU32(U32);
+2032            assert_eq!(u32::BITS as usize, MyFieldU32::BITS)
+2033        }
+2034        bit_count_u64 => {
+2035            let field = MyFieldU64(U64);
+2036            assert_eq!(u64::BITS as usize, MyFieldU64::BITS)
+2037        }
+2038        bit_count_u128 => {
+2039            let field = MyFieldU128(U128);
+2040            assert_eq!(u128::BITS as usize, MyFieldU128::BITS)
+2041        }
+2042        bit_count_usize => {
+2043            let field = MyFieldUsize(USIZE);
+2044            assert_eq!(usize::BITS as usize, MyFieldUsize::BITS)
+2045        }
+2046    }
+2047
+2048    // byte count
+2049    tests! {
+2050        byte_count_u8 => {
+2051            let field = MyFieldU8(U8);
+2052            assert_eq!(1, MyFieldU8::BYTES)
+2053        }
+2054        byte_count_u16 => {
+2055            let field = MyFieldU16(U16);
+2056            assert_eq!(2, MyFieldU16::BYTES)
+2057        }
+2058        byte_count_u32 => {
+2059            let field = MyFieldU32(U32);
+2060            assert_eq!(4, MyFieldU32::BYTES)
+2061        }
+2062        byte_count_u64 => {
+2063            let field = MyFieldU64(U64);
+2064            assert_eq!(8, MyFieldU64::BYTES)
+2065        }
+2066        byte_count_u128 => {
+2067            let field = MyFieldU128(U128);
+2068            assert_eq!(16, MyFieldU128::BYTES)
+2069        }
+2070        byte_count_usize => {
+2071            let field = MyFieldUsize(USIZE);
+2072            assert_eq!((usize::BITS as usize) / 8, MyFieldUsize::BYTES)
+2073        }
+2074    }
+2075
+2076    // integer value
+2077    tests! {
+2078        integer_u8 => {
+2079            let field = MyFieldU8(U8);
+2080            assert_eq!(U8, field.as_integer())
+2081        }
+2082        integer_u16 => {
+2083            let field = MyFieldU16(U16);
+2084            assert_eq!(U16, field.as_integer())
+2085        }
+2086        integer_u32 => {
+2087            let field = MyFieldU32(U32);
+2088            assert_eq!(U32, field.as_integer())
+2089        }
+2090        integer_u64 => {
+2091            let field = MyFieldU64(U64);
+2092            assert_eq!(U64, field.as_integer())
+2093        }
+2094        integer_u128 => {
+2095            let field = MyFieldU128(U128);
+2096            assert_eq!(U128, field.as_integer())
+2097        }
+2098        integer_usize => {
+2099            let field = MyFieldUsize(USIZE);
+2100            assert_eq!(USIZE, field.as_integer())
+2101        }
+2102    }
+2103
+2104    // binary value
+2105    tests! {
+2106        binary_u8 => {
+2107            let field = MyFieldU8(U8);
+2108            assert_eq!(B8, field.as_binary())
+2109        }
+2110        binary_u16 => {
+2111            let field = MyFieldU16(U16);
+2112            assert_eq!(B16, field.as_binary())
+2113        }
+2114        binary_u32 => {
+2115            let field = MyFieldU32(U32);
+2116            assert_eq!(B32, field.as_binary())
+2117        }
+2118        binary_u64 => {
+2119            let field = MyFieldU64(U64);
+2120            assert_eq!(B64, field.as_binary())
+2121        }
+2122        binary_u128 => {
+2123            let field = MyFieldU128(U128);
+2124            assert_eq!(B128, field.as_binary())
+2125        }
+2126        binary_usize => {
+2127            let field = MyFieldUsize(USIZE);
+2128            assert_eq!(BSIZE, field.as_binary())
+2129        }
+2130    }
+2131
+2132    // get index
+2133    tests! {
+2134        get_index_u8 => {
+2135            let field = MyFieldU8(U8);
+2136            for (index, char) in B8.chars().rev().enumerate() {
+2137                if char == '1' {
+2138                    assert!(field.get_index(index as u8))
+2139                } else if char == '0' {
+2140                    assert!(!field.get_index(index as u8))
+2141                } else {
+2142                    panic!("invalid char in binary string")
+2143                }
+2144            }
+2145        }
+2146        get_index_u16 => {
+2147            let field = MyFieldU16(U16);
+2148            for (index, char) in B16.chars().rev().enumerate() {
+2149                if char == '1' {
+2150                    assert!(field.get_index(index as u8))
+2151                } else if char == '0' {
+2152                    assert!(!field.get_index(index as u8))
+2153                } else {
+2154                    panic!("invalid char in binary string")
+2155                }
+2156            }
+2157        }
+2158        get_index_u32 => {
+2159            let field = MyFieldU32(U32);
+2160            for (index, char) in B32.chars().rev().enumerate() {
+2161                if char == '1' {
+2162                    assert!(field.get_index(index as u8))
+2163                } else if char == '0' {
+2164                    assert!(!field.get_index(index as u8))
+2165                } else {
+2166                    panic!("invalid char in binary string")
+2167                }
+2168            }
+2169        }
+2170        get_index_u64 => {
+2171            let field = MyFieldU64(U64);
+2172            for (index, char) in B64.chars().rev().enumerate() {
+2173                if char == '1' {
+2174                    assert!(field.get_index(index as u8))
+2175                } else if char == '0' {
+2176                    assert!(!field.get_index(index as u8))
+2177                } else {
+2178                    panic!("invalid char in binary string")
+2179                }
+2180            }
+2181        }
+2182        get_index_u128 => {
+2183            let field = MyFieldU128(U128);
+2184            for (index, char) in B128.chars().rev().enumerate() {
+2185                if char == '1' {
+2186                    assert!(field.get_index(index as u8))
+2187                } else if char == '0' {
+2188                    assert!(!field.get_index(index as u8))
+2189                } else {
+2190                    panic!("invalid char in binary string")
+2191                }
+2192            }
+2193        }
+2194        get_index_usize => {
+2195            let field = MyFieldUsize(USIZE);
+2196            for (index, char) in BSIZE.chars().rev().enumerate() {
+2197                if char == '1' {
+2198                    assert!(field.get_index(index as u8))
+2199                } else if char == '0' {
+2200                    assert!(!field.get_index(index as u8))
+2201                } else {
+2202                    panic!("invalid char in binary string")
+2203                }
+2204            }
+2205        }
+2206    }
+2207
+2208    // set index
+2209    tests! {
+2210        set_index_u8 => {
+2211            let mut field = MyFieldU8(0);
+2212            for (index, char) in B8.chars().rev().enumerate() {
+2213                field.set_index(index as u8);
+2214                for (s_index, _char) in B8.chars().rev().enumerate() {
+2215                    if s_index <= index {
+2216                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2217                    }  else {
+2218                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2219                    }
+2220                }
+2221            }
+2222        }
+2223        set_index_u16 => {
+2224            let mut field = MyFieldU16(0);
+2225            for (index, char) in B16.chars().rev().enumerate() {
+2226                field.set_index(index as u8);
+2227                for (s_index, _char) in B16.chars().rev().enumerate() {
+2228                    if s_index <= index {
+2229                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2230                    }  else {
+2231                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2232                    }
+2233                }
+2234            }
+2235        }
+2236        set_index_u32 => {
+2237            let mut field = MyFieldU32(0);
+2238            for (index, char) in B32.chars().rev().enumerate() {
+2239                field.set_index(index as u8);
+2240                for (s_index, _char) in B32.chars().rev().enumerate() {
+2241                    if s_index <= index {
+2242                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2243                    }  else {
+2244                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2245                    }
+2246                }
+2247            }
+2248        }
+2249        set_index_u64 => {
+2250            let mut field = MyFieldU64(0);
+2251            for (index, char) in B64.chars().rev().enumerate() {
+2252                field.set_index(index as u8);
+2253                for (s_index, _char) in B64.chars().rev().enumerate() {
+2254                    if s_index <= index {
+2255                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2256                    }  else {
+2257                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2258                    }
+2259                }
+2260            }
+2261        }
+2262        set_index_u128 => {
+2263            let mut field = MyFieldU128(0);
+2264            for (index, char) in B128.chars().rev().enumerate() {
+2265                field.set_index(index as u8);
+2266                for (s_index, _char) in B128.chars().rev().enumerate() {
+2267                    if s_index <= index {
+2268                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2269                    }  else {
+2270                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2271                    }
+2272                }
+2273            }
+2274        }
+2275        set_index_usize => {
+2276            let mut field = MyFieldUsize(0);
+2277            for (index, char) in BSIZE.chars().rev().enumerate() {
+2278                field.set_index(index as u8);
+2279                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
+2280                    if s_index <= index {
+2281                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2282                    }  else {
+2283                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2284                    }
+2285                }
+2286            }
+2287        }
+2288    }
+2289
+2290    // clear index
+2291    tests! {
+2292        clear_index_u8 => {
+2293            let mut field = MyFieldU8(u8::MAX);
+2294            for (index, char) in B8.chars().rev().enumerate() {
+2295                assert!(field.get_index(index as u8), "{:#?}", field);
+2296                field.clear_index(index as u8);
+2297                for (s_index, _char) in B8.chars().rev().enumerate() {
+2298                    if s_index <= index {
+2299                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2300                    }  else {
+2301                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2302                    }
+2303                }
+2304            }
+2305        }
+2306        clear_index_u16 => {
+2307            let mut field = MyFieldU16(u16::MAX);
+2308            for (index, char) in B16.chars().rev().enumerate() {
+2309                assert!(field.get_index(index as u8), "{:#?}", field);
+2310                field.clear_index(index as u8);
+2311                for (s_index, _char) in B16.chars().rev().enumerate() {
+2312                    if s_index <= index {
+2313                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2314                    }  else {
+2315                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2316                    }
+2317                }
+2318            }
+2319        }
+2320        clear_index_u32 => {
+2321            let mut field = MyFieldU32(u32::MAX);
+2322            for (index, char) in B32.chars().rev().enumerate() {
+2323                assert!(field.get_index(index as u8), "{:#?}", field);
+2324                field.clear_index(index as u8);
+2325                for (s_index, _char) in B32.chars().rev().enumerate() {
+2326                    if s_index <= index {
+2327                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2328                    }  else {
+2329                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2330                    }
+2331                }
+2332            }
+2333        }
+2334        clear_index_u64 => {
+2335            let mut field = MyFieldU64(u64::MAX);
+2336            for (index, char) in B64.chars().rev().enumerate() {
+2337                assert!(field.get_index(index as u8), "{:#?}", field);
+2338                field.clear_index(index as u8);
+2339                for (s_index, _char) in B64.chars().rev().enumerate() {
+2340                    if s_index <= index {
+2341                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2342                    }  else {
+2343                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2344                    }
+2345                }
+2346            }
+2347        }
+2348        clear_index_u128 => {
+2349            let mut field = MyFieldU128(u128::MAX);
+2350            for (index, char) in B128.chars().rev().enumerate() {
+2351                assert!(field.get_index(index as u8), "{:#?}", field);
+2352                field.clear_index(index as u8);
+2353                for (s_index, _char) in B128.chars().rev().enumerate() {
+2354                    if s_index <= index {
+2355                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2356                    }  else {
+2357                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2358                    }
+2359                }
+2360            }
+2361        }
+2362        clear_index_usize => {
+2363            let mut field = MyFieldUsize(usize::MAX);
+2364            for (index, char) in BSIZE.chars().rev().enumerate() {
+2365                assert!(field.get_index(index as u8), "{:#?}", field);
+2366                field.clear_index(index as u8);
+2367                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
+2368                    if s_index <= index {
+2369                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2370                    }  else {
+2371                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2372                    }
+2373                }
+2374            }
+2375        }
+2376    }
+2377
+2378    // toggle index
+2379    tests! {
+2380        toggle_index_u8 => {
+2381            let mut field = MyFieldU8(U8);
+2382            for (index, char) in B8.chars().rev().enumerate() {
+2383                if char == '1' {
+2384                    assert!(field.get_index(index as u8));
+2385                    field.toggle_index(index as u8);
+2386                    assert!(!field.get_index(index as u8));
+2387                } else if char == '0' {
+2388                    assert!(!field.get_index(index as u8));
+2389                    field.toggle_index(index as u8);
+2390                    assert!(field.get_index(index as u8));
+2391                } else {
+2392                    panic!("invalid char in binary string");
+2393                }
+2394            }
+2395        }
+2396        toggle_index_u16 => {
+2397            let mut field = MyFieldU16(U16);
+2398            for (index, char) in B16.chars().rev().enumerate() {
+2399                if char == '1' {
+2400                    assert!(field.get_index(index as u8));
+2401                    field.toggle_index(index as u8);
+2402                    assert!(!field.get_index(index as u8));
+2403                } else if char == '0' {
+2404                    assert!(!field.get_index(index as u8));
+2405                    field.toggle_index(index as u8);
+2406                    assert!(field.get_index(index as u8));
+2407                } else {
+2408                    panic!("invalid char in binary string")
+2409                }
+2410            }
+2411        }
+2412        toggle_index_u32 => {
+2413            let mut field = MyFieldU32(U32);
+2414            for (index, char) in B32.chars().rev().enumerate() {
+2415                if char == '1' {
+2416                    assert!(field.get_index(index as u8));
+2417                    field.toggle_index(index as u8);
+2418                    assert!(!field.get_index(index as u8));
+2419                } else if char == '0' {
+2420                    assert!(!field.get_index(index as u8));
+2421                    field.toggle_index(index as u8);
+2422                    assert!(field.get_index(index as u8));
+2423                } else {
+2424                    panic!("invalid char in binary string")
+2425                }
+2426            }
+2427        }
+2428        toggle_index_u64 => {
+2429            let mut field = MyFieldU64(U64);
+2430            for (index, char) in B64.chars().rev().enumerate() {
+2431                if char == '1' {
+2432                    assert!(field.get_index(index as u8));
+2433                    field.toggle_index(index as u8);
+2434                    assert!(!field.get_index(index as u8));
+2435                } else if char == '0' {
+2436                    assert!(!field.get_index(index as u8));
+2437                    field.toggle_index(index as u8);
+2438                    assert!(field.get_index(index as u8));
+2439                } else {
+2440                    panic!("invalid char in binary string")
+2441                }
+2442            }
+2443        }
+2444        toggle_index_u128 => {
+2445            let mut field = MyFieldU128(U128);
+2446            for (index, char) in B128.chars().rev().enumerate() {
+2447                if char == '1' {
+2448                    assert!(field.get_index(index as u8));
+2449                    field.toggle_index(index as u8);
+2450                    assert!(!field.get_index(index as u8));
+2451                } else if char == '0' {
+2452                    assert!(!field.get_index(index as u8));
+2453                    field.toggle_index(index as u8);
+2454                    assert!(field.get_index(index as u8));
+2455                } else {
+2456                    panic!("invalid char in binary string")
+2457                }
+2458            }
+2459        }
+2460        toggle_index_usize => {
+2461            let mut field = MyFieldUsize(USIZE);
+2462            for (index, char) in BSIZE.chars().rev().enumerate() {
+2463                if char == '1' {
+2464                    assert!(field.get_index(index as u8));
+2465                    field.toggle_index(index as u8);
+2466                    assert!(!field.get_index(index as u8));
+2467                } else if char == '0' {
+2468                    assert!(!field.get_index(index as u8));
+2469                    field.toggle_index(index as u8);
+2470                    assert!(field.get_index(index as u8));
+2471                } else {
+2472                    panic!("invalid char in binary string")
+2473                }
+2474            }
+2475        }
+2476    }
+2477
+2478    // get
+2479    tests! {
+2480        get_u8 => {
+2481            let field = MyFieldU8(U8);
+2482            for (index, char) in B8.chars().rev().enumerate() {
+2483                if char == '1' {
+2484                    assert!(field.get(MyFlagsU8::from(index as u8)))
+2485                } else if char == '0' {
+2486                    assert!(!field.get(MyFlagsU8::from(index as u8)))
+2487                } else {
+2488                    panic!("invalid char in binary string")
+2489                }
+2490            }
+2491        }
+2492        get_u16 => {
+2493            let field = MyFieldU16(U16);
+2494            for (index, char) in B16.chars().rev().enumerate() {
+2495                if char == '1' {
+2496                    assert!(field.get(MyFlagsU16::from(index as u8)))
+2497                } else if char == '0' {
+2498                    assert!(!field.get(MyFlagsU16::from(index as u8)))
+2499                } else {
+2500                    panic!("invalid char in binary string")
+2501                }
+2502            }
+2503        }
+2504        get_u32 => {
+2505            let field = MyFieldU32(U32);
+2506            for (index, char) in B32.chars().rev().enumerate() {
+2507                if char == '1' {
+2508                    assert!(field.get(MyFlagsU32::from(index as u8)))
+2509                } else if char == '0' {
+2510                    assert!(!field.get(MyFlagsU32::from(index as u8)))
+2511                } else {
+2512                    panic!("invalid char in binary string")
+2513                }
+2514            }
+2515        }
+2516        get_u64 => {
+2517            let field = MyFieldU64(U64);
+2518            for (index, char) in B64.chars().rev().enumerate() {
+2519                if char == '1' {
+2520                    assert!(field.get(MyFlagsU64::from(index as u8)))
+2521                } else if char == '0' {
+2522                    assert!(!field.get(MyFlagsU64::from(index as u8)))
+2523                } else {
+2524                    panic!("invalid char in binary string")
+2525                }
+2526            }
+2527        }
+2528        get_u128 => {
+2529            let field = MyFieldU128(U128);
+2530            for (index, char) in B128.chars().rev().enumerate() {
+2531                if char == '1' {
+2532                    assert!(field.get(MyFlagsU128::from(index as u8)))
+2533                } else if char == '0' {
+2534                    assert!(!field.get(MyFlagsU128::from(index as u8)))
+2535                } else {
+2536                    panic!("invalid char in binary string")
+2537                }
+2538            }
+2539        }
+2540        get_usize => {
+2541            let field = MyFieldUsize(USIZE);
+2542            for (index, char) in BSIZE.chars().rev().enumerate() {
+2543                if char == '1' {
+2544                    assert!(field.get(MyFlagsUsize::from(index as u8)))
+2545                } else if char == '0' {
+2546                    assert!(!field.get(MyFlagsUsize::from(index as u8)))
+2547                } else {
+2548                    panic!("invalid char in binary string")
+2549                }
+2550            }
+2551        }
+2552    }
+2553
+2554    // set
+2555    tests! {
+2556        set_u8 => {
+2557            let mut field = MyFieldU8(0);
+2558            for (index, char) in B8.chars().rev().enumerate() {
+2559                field.set(MyFlagsU8::from(index as u8));
+2560                for (s_index, _char) in B8.chars().rev().enumerate() {
+2561                    if s_index <= index {
+2562                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2563                    }  else {
+2564                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2565                    }
+2566                }
+2567            }
+2568        }
+2569        set_u16 => {
+2570            let mut field = MyFieldU16(0);
+2571            for (index, char) in B16.chars().rev().enumerate() {
+2572                field.set(MyFlagsU16::from(index as u8));
+2573                for (s_index, _char) in B16.chars().rev().enumerate() {
+2574                    if s_index <= index {
+2575                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2576                    }  else {
+2577                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2578                    }
+2579                }
+2580            }
+2581        }
+2582        set_u32 => {
+2583            let mut field = MyFieldU32(0);
+2584            for (index, char) in B32.chars().rev().enumerate() {
+2585                field.set(MyFlagsU32::from(index as u8));
+2586                for (s_index, _char) in B32.chars().rev().enumerate() {
+2587                    if s_index <= index {
+2588                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2589                    }  else {
+2590                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2591                    }
+2592                }
+2593            }
+2594        }
+2595        set_u64 => {
+2596            let mut field = MyFieldU64(0);
+2597            for (index, char) in B64.chars().rev().enumerate() {
+2598                field.set(MyFlagsU64::from(index as u8));
+2599                for (s_index, _char) in B64.chars().rev().enumerate() {
+2600                    if s_index <= index {
+2601                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2602                    }  else {
+2603                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2604                    }
+2605                }
+2606            }
+2607        }
+2608        set_u128 => {
+2609            let mut field = MyFieldU128(0);
+2610            for (index, char) in B128.chars().rev().enumerate() {
+2611                field.set(MyFlagsU128::from(index as u8));
+2612                for (s_index, _char) in B128.chars().rev().enumerate() {
+2613                    if s_index <= index {
+2614                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2615                    }  else {
+2616                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2617                    }
+2618                }
+2619            }
+2620        }
+2621        set_usize => {
+2622            let mut field = MyFieldUsize(0);
+2623            for (index, char) in BSIZE.chars().rev().enumerate() {
+2624                field.set(MyFlagsUsize::from(index as u8));
+2625                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
+2626                    if s_index <= index {
+2627                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2628                    }  else {
+2629                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2630                    }
+2631                }
+2632            }
+2633        }
+2634    }
+2635
+2636    // clear
+2637    tests! {
+2638        clear_u8 => {
+2639            let mut field = MyFieldU8(u8::MAX);
+2640            for (index, char) in B8.chars().rev().enumerate() {
+2641                assert!(field.get_index(index as u8), "{:#?}", field);
+2642                field.clear(MyFlagsU8::from(index as u8));
+2643                for (s_index, _char) in B8.chars().rev().enumerate() {
+2644                    if s_index <= index {
+2645                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2646                    }  else {
+2647                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2648                    }
+2649                }
+2650            }
+2651        }
+2652        clear_u16 => {
+2653            let mut field = MyFieldU16(u16::MAX);
+2654            for (index, char) in B16.chars().rev().enumerate() {
+2655                assert!(field.get_index(index as u8), "{:#?}", field);
+2656                field.clear(MyFlagsU16::from(index as u8));
+2657                for (s_index, _char) in B16.chars().rev().enumerate() {
+2658                    if s_index <= index {
+2659                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2660                    }  else {
+2661                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2662                    }
+2663                }
+2664            }
+2665        }
+2666        clear_u32 => {
+2667            let mut field = MyFieldU32(u32::MAX);
+2668            for (index, char) in B32.chars().rev().enumerate() {
+2669                assert!(field.get_index(index as u8), "{:#?}", field);
+2670                field.clear(MyFlagsU32::from(index as u8));
+2671                for (s_index, _char) in B32.chars().rev().enumerate() {
+2672                    if s_index <= index {
+2673                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2674                    }  else {
+2675                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2676                    }
+2677                }
+2678            }
+2679        }
+2680        clear_u64 => {
+2681            let mut field = MyFieldU64(u64::MAX);
+2682            for (index, char) in B64.chars().rev().enumerate() {
+2683                assert!(field.get_index(index as u8), "{:#?}", field);
+2684                field.clear(MyFlagsU64::from(index as u8));
+2685                for (s_index, _char) in B64.chars().rev().enumerate() {
+2686                    if s_index <= index {
+2687                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2688                    }  else {
+2689                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2690                    }
+2691                }
+2692            }
+2693        }
+2694        clear_u128 => {
+2695            let mut field = MyFieldU128(u128::MAX);
+2696            for (index, char) in B128.chars().rev().enumerate() {
+2697                assert!(field.get_index(index as u8), "{:#?}", field);
+2698                field.clear(MyFlagsU128::from(index as u8));
+2699                for (s_index, _char) in B128.chars().rev().enumerate() {
+2700                    if s_index <= index {
+2701                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2702                    }  else {
+2703                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2704                    }
+2705                }
+2706            }
+2707        }
+2708        clear_usize => {
+2709            let mut field = MyFieldUsize(usize::MAX);
+2710            for (index, char) in BSIZE.chars().rev().enumerate() {
+2711                assert!(field.get_index(index as u8), "{:#?}", field);
+2712                field.clear(MyFlagsUsize::from(index as u8));
+2713                for (s_index, _char) in BSIZE.chars().rev().enumerate() {
+2714                    if s_index <= index {
+2715                        assert!(!field.get_index(s_index as u8), "{:#?}", field);
+2716                    }  else {
+2717                        assert!(field.get_index(s_index as u8), "{:#?}", field);
+2718                    }
+2719                }
+2720            }
+2721        }
+2722    }
+2723
+2724    // toggle
+2725    tests! {
+2726        toggle_u8 => {
+2727            let mut field = MyFieldU8(U8);
+2728            for (index, char) in B8.chars().rev().enumerate() {
+2729                if char == '1' {
+2730                    assert!(field.get_index(index as u8));
+2731                    field.toggle(MyFlagsU8::from(index as u8));
+2732                    assert!(!field.get_index(index as u8));
+2733                } else if char == '0' {
+2734                    assert!(!field.get_index(index as u8));
+2735                    field.toggle(MyFlagsU8::from(index as u8));
+2736                    assert!(field.get_index(index as u8));
+2737                } else {
+2738                    panic!("invalid char in binary string");
+2739                }
+2740            }
+2741        }
+2742        toggle_u16 => {
+2743            let mut field = MyFieldU16(U16);
+2744            for (index, char) in B16.chars().rev().enumerate() {
+2745                if char == '1' {
+2746                    assert!(field.get_index(index as u8));
+2747                    field.toggle(MyFlagsU16::from(index as u8));
+2748                    assert!(!field.get_index(index as u8));
+2749                } else if char == '0' {
+2750                    assert!(!field.get_index(index as u8));
+2751                    field.toggle(MyFlagsU16::from(index as u8));
+2752                    assert!(field.get_index(index as u8));
+2753                } else {
+2754                    panic!("invalid char in binary string")
+2755                }
+2756            }
+2757        }
+2758        toggle_u32 => {
+2759            let mut field = MyFieldU32(U32);
+2760            for (index, char) in B32.chars().rev().enumerate() {
+2761                if char == '1' {
+2762                    assert!(field.get_index(index as u8));
+2763                    field.toggle(MyFlagsU32::from(index as u8));
+2764                    assert!(!field.get_index(index as u8));
+2765                } else if char == '0' {
+2766                    assert!(!field.get_index(index as u8));
+2767                    field.toggle(MyFlagsU32::from(index as u8));
+2768                    assert!(field.get_index(index as u8));
+2769                } else {
+2770                    panic!("invalid char in binary string")
+2771                }
+2772            }
+2773        }
+2774        toggle_u64 => {
+2775            let mut field = MyFieldU64(U64);
+2776            for (index, char) in B64.chars().rev().enumerate() {
+2777                if char == '1' {
+2778                    assert!(field.get_index(index as u8));
+2779                    field.toggle(MyFlagsU64::from(index as u8));
+2780                    assert!(!field.get_index(index as u8));
+2781                } else if char == '0' {
+2782                    assert!(!field.get_index(index as u8));
+2783                    field.toggle(MyFlagsU64::from(index as u8));
+2784                    assert!(field.get_index(index as u8));
+2785                } else {
+2786                    panic!("invalid char in binary string")
+2787                }
+2788            }
+2789        }
+2790        toggle_u128 => {
+2791            let mut field = MyFieldU128(U128);
+2792            for (index, char) in B128.chars().rev().enumerate() {
+2793                if char == '1' {
+2794                    assert!(field.get_index(index as u8));
+2795                    field.toggle(MyFlagsU128::from(index as u8));
+2796                    assert!(!field.get_index(index as u8));
+2797                } else if char == '0' {
+2798                    assert!(!field.get_index(index as u8));
+2799                    field.toggle(MyFlagsU128::from(index as u8));
+2800                    assert!(field.get_index(index as u8));
+2801                } else {
+2802                    panic!("invalid char in binary string")
+2803                }
+2804            }
+2805        }
+2806        toggle_usize => {
+2807            let mut field = MyFieldUsize(USIZE);
+2808            for (index, char) in BSIZE.chars().rev().enumerate() {
+2809                if char == '1' {
+2810                    assert!(field.get_index(index as u8));
+2811                    field.toggle(MyFlagsUsize::from(index as u8));
+2812                    assert!(!field.get_index(index as u8));
+2813                } else if char == '0' {
+2814                    assert!(!field.get_index(index as u8));
+2815                    field.toggle(MyFlagsUsize::from(index as u8));
+2816                    assert!(field.get_index(index as u8));
+2817                } else {
+2818                    panic!("invalid char in binary string")
+2819                }
+2820            }
+2821        }
+2822    }
+2823
+2824    // diff
+2825    tests! {
+2826        diff_u8 => {
+2827            let field = MyFieldU8(U8);
+2828            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2829            let out = field.diff(reversed);
+2830            assert_eq!("10100101", out.as_binary());
+2831            assert_eq!(165, out.as_integer());
+2832        }
+2833        diff_u16 => {
+2834            let field = MyFieldU16(U16);
+2835            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2836            let out = field.diff(reversed);
+2837            assert_eq!("1010101111010101", out.as_binary());
+2838            assert_eq!(43989, out.as_integer());
+2839        }
+2840        diff_u32 => {
+2841            let field = MyFieldU32(U32);
+2842            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2843            let out = field.diff(reversed);
+2844            assert_eq!("11110101000100111100100010101111", out.as_binary());
+2845            assert_eq!(4111714479, out.as_integer());
+2846        }
+2847        diff_u64 => {
+2848            let field = MyFieldU64(U64);
+2849            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2850            let out = field.diff(reversed);
+2851            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", out.as_binary());
+2852            assert_eq!(1495798268358312744, out.as_integer());
+2853        }
+2854        diff_u128 => {
+2855            let field = MyFieldU128(U128);
+2856            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2857            let out = field.diff(reversed);
+2858            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", out.as_binary());
+2859            assert_eq!(193799958082971305581995159990093034377, out.as_integer());
+2860        }
+2861        // diff_usize => {
+2862        //     let field = MyFieldUsize(USIZE);
+2863        // }
+2864    }
+2865
+2866    // combine
+2867    tests! {
+2868        combine_u8 => {
+2869            let field = MyFieldU8(U8);
+2870            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2871            let out = field.combine(reversed);
+2872            assert_eq!("11111111", out.as_binary());
+2873            assert_eq!(255, out.as_integer());
+2874        }
+2875        combine_u16 => {
+2876            let field = MyFieldU16(U16);
+2877            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2878            let out = field.combine(reversed);
+2879            assert_eq!("1110101111010111", out.as_binary());
+2880            assert_eq!(60375, out.as_integer());
+2881        }
+2882        combine_u32 => {
+2883            let field = MyFieldU32(U32);
+2884            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2885            let out = field.combine(reversed);
+2886            assert_eq!("11111101100100111100100110111111", out.as_binary());
+2887            assert_eq!(4254321087, out.as_integer());
+2888        }
+2889        combine_u64 => {
+2890            let field = MyFieldU64(U64);
+2891            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2892            let out = field.combine(reversed);
+2893            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", out.as_binary());
+2894            assert_eq!(18361808577405668223, out.as_integer());
+2895        }
+2896        combine_u128 => {
+2897            let field = MyFieldU128(U128);
+2898            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2899            let out = field.combine(reversed);
+2900            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", out.as_binary());
+2901            assert_eq!(332296039312012448238196841470979719071, out.as_integer());
+2902        }
+2903        // combine_usize => {
+2904        //     let field = MyFieldUsize(USIZE);
+2905        // }
+2906    }
+2907
+2908    // intersect
+2909    tests! {
+2910        intersect_u8 => {
+2911            let field = MyFieldU8(U8);
+2912            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2913            let out = field.intersect(reversed);
+2914            assert_eq!("01011010", out.as_binary());
+2915            assert_eq!(90, out.as_integer());
+2916        }
+2917        intersect_u16 => {
+2918            let field = MyFieldU16(U16);
+2919            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2920            let out = field.intersect(reversed);
+2921            assert_eq!("0100000000000010", out.as_binary());
+2922            assert_eq!(16386, out.as_integer());
+2923        }
+2924        intersect_u32 => {
+2925            let field = MyFieldU32(U32);
+2926            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2927            let out = field.intersect(reversed);
+2928            assert_eq!("00001000100000000000000100010000", out.as_binary());
+2929            assert_eq!(142606608, out.as_integer());
+2930        }
+2931        intersect_u64 => {
+2932            let field = MyFieldU64(U64);
+2933            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2934            let out = field.intersect(reversed);
+2935            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", out.as_binary());
+2936            assert_eq!(16866010309047355479, out.as_integer());
+2937        }
+2938        intersect_u128 => {
+2939            let field = MyFieldU128(U128);
+2940            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2941            let out = field.intersect(reversed);
+2942            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", out.as_binary());
+2943            assert_eq!(138496081229041142656201681480886684694, out.as_integer());
+2944        }
+2945        // intersect_usize => {
+2946        //     let field = MyFieldUsize(USIZE);
+2947        // }
+2948    }
+2949
+2950    // into diff
+2951    tests! {
+2952        into_diff_u8 => {
+2953            let field = MyFieldU8(U8);
+2954            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2955            let out = field.into_diff(reversed);
+2956            assert_eq!("10100101", out.as_binary());
+2957            assert_eq!(165, out.as_integer());
+2958        }
+2959        into_diff_u16 => {
+2960            let field = MyFieldU16(U16);
+2961            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2962            let out = field.into_diff(reversed);
+2963            assert_eq!("1010101111010101", out.as_binary());
+2964            assert_eq!(43989, out.as_integer());
+2965        }
+2966        into_diff_u32 => {
+2967            let field = MyFieldU32(U32);
+2968            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2969            let out = field.into_diff(reversed);
+2970            assert_eq!("11110101000100111100100010101111", out.as_binary());
+2971            assert_eq!(4111714479, out.as_integer());
+2972        }
+2973        into_diff_u64 => {
+2974            let field = MyFieldU64(U64);
+2975            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2976            let out = field.into_diff(reversed);
+2977            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", out.as_binary());
+2978            assert_eq!(1495798268358312744, out.as_integer());
+2979        }
+2980        into_diff_u128 => {
+2981            let field = MyFieldU128(U128);
+2982            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2983            let out = field.into_diff(reversed);
+2984            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", out.as_binary());
+2985            assert_eq!(193799958082971305581995159990093034377, out.as_integer());
+2986        }
+2987        // into_diff_usize => {
+2988        //     let field = MyFieldUsize(USIZE);
+2989        // }
+2990    }
+2991
+2992    // into combined
+2993    tests! {
+2994        into_combined_u8 => {
+2995            let field = MyFieldU8(U8);
+2996            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+2997            let out = field.into_combined(reversed);
+2998            assert_eq!("11111111", out.as_binary());
+2999            assert_eq!(255, out.as_integer());
+3000        }
+3001        into_combined_u16 => {
+3002            let field = MyFieldU16(U16);
+3003            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3004            let out = field.into_combined(reversed);
+3005            assert_eq!("1110101111010111", out.as_binary());
+3006            assert_eq!(60375, out.as_integer());
+3007        }
+3008        into_combined_u32 => {
+3009            let field = MyFieldU32(U32);
+3010            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3011            let out = field.into_combined(reversed);
+3012            assert_eq!("11111101100100111100100110111111", out.as_binary());
+3013            assert_eq!(4254321087, out.as_integer());
+3014        }
+3015        into_combined_u64 => {
+3016            let field = MyFieldU64(U64);
+3017            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3018            let out = field.into_combined(reversed);
+3019            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", out.as_binary());
+3020            assert_eq!(18361808577405668223, out.as_integer());
+3021        }
+3022        into_combined_u128 => {
+3023            let field = MyFieldU128(U128);
+3024            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3025            let out = field.into_combined(reversed);
+3026            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", out.as_binary());
+3027            assert_eq!(332296039312012448238196841470979719071, out.as_integer());
+3028        }
+3029        // into_combined_usize => {
+3030        //     let field = MyFieldUsize(USIZE);
+3031        // }
+3032    }
+3033
+3034    // into intersection
+3035    tests! {
+3036        into_intersection_u8 => {
+3037            let field = MyFieldU8(U8);
+3038            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3039            let out = field.into_intersection(reversed);
+3040            assert_eq!("01011010", out.as_binary());
+3041            assert_eq!(90, out.as_integer());
+3042        }
+3043        into_intersection_u16 => {
+3044            let field = MyFieldU16(U16);
+3045            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3046            let out = field.into_intersection(reversed);
+3047            assert_eq!("0100000000000010", out.as_binary());
+3048            assert_eq!(16386, out.as_integer());
+3049        }
+3050        into_intersection_u32 => {
+3051            let field = MyFieldU32(U32);
+3052            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3053            let out = field.into_intersection(reversed);
+3054            assert_eq!("00001000100000000000000100010000", out.as_binary());
+3055            assert_eq!(142606608, out.as_integer());
+3056        }
+3057        into_intersection_u64 => {
+3058            let field = MyFieldU64(U64);
+3059            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3060            let out = field.into_intersection(reversed);
+3061            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", out.as_binary());
+3062            assert_eq!(16866010309047355479, out.as_integer());
+3063        }
+3064        into_intersection_u128 => {
+3065            let field = MyFieldU128(U128);
+3066            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3067            let out = field.into_intersection(reversed);
+3068            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", out.as_binary());
+3069            assert_eq!(138496081229041142656201681480886684694, out.as_integer());
+3070        }
+3071        // into_intersection_usize => {
+3072        //     let field = MyFieldUsize(USIZE);
+3073        // }
+3074    }
+3075
+3076    // field from flag
+3077    tests! {
+3078        field_from_flag_u8 => {
+3079            for index in 0..u8::BITS {
+3080                let flag = MyFlagsU8::from(index as u8);
+3081                let field = MyFieldU8::from(flag);
+3082                assert_eq!(MyFieldU8(0u8 | (1 << index)), field)
+3083            }
+3084        }
+3085        field_from_flag_u16 => {
+3086            for index in 0..u16::BITS {
+3087                let flag = MyFlagsU16::from(index as u8);
+3088                let field = MyFieldU16::from(flag);
+3089                assert_eq!(MyFieldU16(0u16 | (1 << index)), field)
+3090            }
+3091        }
+3092        field_from_flag_u32 => {
+3093            for index in 0..u32::BITS {
+3094                let flag = MyFlagsU32::from(index as u8);
+3095                let field = MyFieldU32::from(flag);
+3096                assert_eq!(MyFieldU32(0u32 | (1 << index)), field)
+3097            }
+3098        }
+3099        field_from_flag_u64 => {
+3100            for index in 0..u64::BITS {
+3101                let flag = MyFlagsU64::from(index as u8);
+3102                let field = MyFieldU64::from(flag);
+3103                assert_eq!(MyFieldU64(0u64 | (1 << index)), field)
+3104            }
+3105        }
+3106        field_from_flag_u128 => {
+3107            for index in 0..u128::BITS {
+3108                let flag = MyFlagsU128::from(index as u8);
+3109                let field = MyFieldU128::from(flag);
+3110                assert_eq!(MyFieldU128(0u128 | (1 << index)), field)
+3111            }
+3112        }
+3113        field_from_flag_usize => {
+3114            for index in 0..usize::BITS {
+3115                let flag = MyFlagsUsize::from(index as u8);
+3116                let field = MyFieldUsize::from(flag);
+3117                assert_eq!(MyFieldUsize(0usize | (1 << index)), field)
+3118            }
+3119        }
+3120    }
+3121
+3122    // $name & $name
+3123    tests! {
+3124        bitwise_name_and_name_u8 => {
+3125            let field = MyFieldU8(U8);
+3126            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3127            let out = field & reversed;
+3128            assert_eq!("01011010", out.as_binary());
+3129            assert_eq!(90, out.as_integer());
+3130        }
+3131        bitwise_name_and_name_u16 => {
+3132            let field = MyFieldU16(U16);
+3133            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3134            let out = field & reversed;
+3135            assert_eq!("0100000000000010", out.as_binary());
+3136            assert_eq!(16386, out.as_integer());
+3137        }
+3138        bitwise_name_and_name_u32 => {
+3139            let field = MyFieldU32(U32);
+3140            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3141            let out = field & reversed;
+3142            assert_eq!("00001000100000000000000100010000", out.as_binary());
+3143            assert_eq!(142606608, out.as_integer());
+3144        }
+3145        bitwise_name_and_name_u64 => {
+3146            let field = MyFieldU64(U64);
+3147            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3148            let out = field & reversed;
+3149            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", out.as_binary());
+3150            assert_eq!(16866010309047355479, out.as_integer());
+3151        }
+3152        bitwise_name_and_name_u128 => {
+3153            let field = MyFieldU128(U128);
+3154            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3155            let out = field & reversed;
+3156            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", out.as_binary());
+3157            assert_eq!(138496081229041142656201681480886684694, out.as_integer());
+3158        }
+3159        // bitwise_name_and_name_usize => {
+3160        //
+3161        // }
+3162    }
+3163
+3164    // $name | $name
+3165    tests! {
+3166        bitwise_name_or_name_u8 => {
+3167            let field = MyFieldU8(U8);
+3168            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3169            let out = field | reversed;
+3170            assert_eq!("11111111", out.as_binary());
+3171            assert_eq!(255, out.as_integer());
+3172        }
+3173        bitwise_name_or_name_u16 => {
+3174            let field = MyFieldU16(U16);
+3175            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3176            let out = field | reversed;
+3177            assert_eq!("1110101111010111", out.as_binary());
+3178            assert_eq!(60375, out.as_integer());
+3179        }
+3180        bitwise_name_or_name_u32 => {
+3181            let field = MyFieldU32(U32);
+3182            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3183            let out = field | reversed;
+3184            assert_eq!("11111101100100111100100110111111", out.as_binary());
+3185            assert_eq!(4254321087, out.as_integer());
+3186        }
+3187        bitwise_name_or_name_u64 => {
+3188            let field = MyFieldU64(U64);
+3189            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3190            let out = field | reversed;
+3191            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", out.as_binary());
+3192            assert_eq!(18361808577405668223, out.as_integer());
+3193        }
+3194        bitwise_name_or_name_u128 => {
+3195            let field = MyFieldU128(U128);
+3196            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3197            let out = field | reversed;
+3198            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", out.as_binary());
+3199            assert_eq!(332296039312012448238196841470979719071, out.as_integer());
+3200        }
+3201        // bitwise_name_or_name_usize => {
+3202        //
+3203        // }
+3204    }
+3205
+3206    // $name ^ $name
+3207    tests! {
+3208        bitwise_name_xor_name_u8 => {
+3209            let field = MyFieldU8(U8);
+3210            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3211            let out = field ^ reversed;
+3212            assert_eq!("10100101", out.as_binary());
+3213            assert_eq!(165, out.as_integer());
+3214        }
+3215        bitwise_name_xor_name_u16 => {
+3216            let field = MyFieldU16(U16);
+3217            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3218            let out = field ^ reversed;
+3219            assert_eq!("1010101111010101", out.as_binary());
+3220            assert_eq!(43989, out.as_integer());
+3221        }
+3222        bitwise_name_xor_name_u32 => {
+3223            let field = MyFieldU32(U32);
+3224            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3225            let out = field ^ reversed;
+3226            assert_eq!("11110101000100111100100010101111", out.as_binary());
+3227            assert_eq!(4111714479, out.as_integer());
+3228        }
+3229        bitwise_name_xor_name_u64 => {
+3230            let field = MyFieldU64(U64);
+3231            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3232            let out = field ^ reversed;
+3233            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", out.as_binary());
+3234            assert_eq!(1495798268358312744, out.as_integer());
+3235        }
+3236        bitwise_name_xor_name_u128 => {
+3237            let field = MyFieldU128(U128);
+3238            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3239            let out = field ^ reversed;
+3240            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", out.as_binary());
+3241            assert_eq!(193799958082971305581995159990093034377, out.as_integer());
+3242        }
+3243        // bitwise_name_xor_name_usize => {
+3244        //
+3245        // }
+3246    }
+3247
+3248    // $name &= $name
+3249    tests! {
+3250        bitwise_name_and_assign_name_u8 => {
+3251            let mut field = MyFieldU8(U8);
+3252            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3253            field &= reversed;
+3254            assert_eq!("01011010", field.as_binary());
+3255            assert_eq!(90, field.as_integer());
+3256        }
+3257        bitwise_name_and_assign_name_u16 => {
+3258            let mut field = MyFieldU16(U16);
+3259            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3260            field &= reversed;
+3261            assert_eq!("0100000000000010", field.as_binary());
+3262            assert_eq!(16386, field.as_integer());
+3263        }
+3264        bitwise_name_and_assign_name_u32 => {
+3265            let mut field = MyFieldU32(U32);
+3266            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3267            field &= reversed;
+3268            assert_eq!("00001000100000000000000100010000", field.as_binary());
+3269            assert_eq!(142606608, field.as_integer());
+3270        }
+3271        bitwise_name_and_assign_name_u64 => {
+3272            let mut field = MyFieldU64(U64);
+3273            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3274            field &= reversed;
+3275            assert_eq!("1110101000010000000110110000010000100000110110000000100001010111", field.as_binary());
+3276            assert_eq!(16866010309047355479, field.as_integer());
+3277        }
+3278        bitwise_name_and_assign_name_u128 => {
+3279            let mut field = MyFieldU128(U128);
+3280            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3281            field &= reversed;
+3282            assert_eq!("01101000001100010110000000000000001000000110000000100001010111011011101010000100000001100000010000000000000001101000110000010110", field.as_binary());
+3283            assert_eq!(138496081229041142656201681480886684694, field.as_integer());
+3284        }
+3285    //     bitwise_name_and_assign_name_usize => {
+3286    //
+3287    //     }
+3288    }
+3289
+3290    // $name |= $name
+3291    tests! {
+3292        bitwise_name_or_assign_name_u8 => {
+3293            let mut field = MyFieldU8(U8);
+3294            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3295            field |= reversed;
+3296            assert_eq!("11111111", field.as_binary());
+3297            assert_eq!(255, field.as_integer());
+3298        }
+3299        bitwise_name_or_assign_name_u16 => {
+3300            let mut field = MyFieldU16(U16);
+3301            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3302            field |= reversed;
+3303            assert_eq!("1110101111010111", field.as_binary());
+3304            assert_eq!(60375, field.as_integer());
+3305        }
+3306        bitwise_name_or_assign_name_u32 => {
+3307            let mut field = MyFieldU32(U32);
+3308            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3309            field |= reversed;
+3310            assert_eq!("11111101100100111100100110111111", field.as_binary());
+3311            assert_eq!(4254321087, field.as_integer());
+3312        }
+3313        bitwise_name_or_assign_name_u64 => {
+3314            let mut field = MyFieldU64(U64);
+3315            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3316            field |= reversed;
+3317            assert_eq!("1111111011010010001111111001110110111001111111000100101101111111", field.as_binary());
+3318            assert_eq!(18361808577405668223, field.as_integer());
+3319        }
+3320        bitwise_name_or_assign_name_u128 => {
+3321            let mut field = MyFieldU128(U128);
+3322            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3323            field |= reversed;
+3324            assert_eq!("11111001111111011110001110100101111101111110111101101011111111111111111111010110111101111110111110100101110001111011111110011111", field.as_binary());
+3325            assert_eq!(332296039312012448238196841470979719071, field.as_integer());
+3326        }
+3327        // bitwise_name_or_assign_name_usize => {
+3328        //
+3329        // }
+3330    }
+3331
+3332    // $name ^= $name
+3333    tests! {
+3334        bitwise_name_xor_assign_name_u8 => {
+3335            let mut field = MyFieldU8(U8);
+3336            let reversed = MyFieldU8(u8::from_str_radix(B8.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3337            field ^= reversed;
+3338            assert_eq!("10100101", field.as_binary());
+3339            assert_eq!(165, field.as_integer());
+3340        }
+3341        bitwise_name_xor_assign_name_u16 => {
+3342            let mut field = MyFieldU16(U16);
+3343            let reversed = MyFieldU16(u16::from_str_radix(B16.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3344            field ^= reversed;
+3345            assert_eq!("1010101111010101", field.as_binary());
+3346            assert_eq!(43989, field.as_integer());
+3347        }
+3348        bitwise_name_xor_assign_name_u32 => {
+3349            let mut field = MyFieldU32(U32);
+3350            let reversed = MyFieldU32(u32::from_str_radix(B32.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3351            field ^= reversed;
+3352            assert_eq!("11110101000100111100100010101111", field.as_binary());
+3353            assert_eq!(4111714479, field.as_integer());
+3354        }
+3355        bitwise_name_xor_assign_name_u64 => {
+3356            let mut field = MyFieldU64(U64);
+3357            let reversed = MyFieldU64(u64::from_str_radix(B64.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3358            field ^= reversed;
+3359            assert_eq!("0001010011000010001001001001100110011001001001000100001100101000", field.as_binary());
+3360            assert_eq!(1495798268358312744, field.as_integer());
+3361        }
+3362        bitwise_name_xor_assign_name_u128 => {
+3363            let mut field = MyFieldU128(U128);
+3364            let reversed = MyFieldU128(u128::from_str_radix(B128.chars().rev().collect::<String>().as_str(), 2).unwrap());
+3365            field ^= reversed;
+3366            assert_eq!("10010001110011001000001110100101110101111000111101001010101000100100010101010010111100011110101110100101110000010011001110001001", field.as_binary());
+3367            assert_eq!(193799958082971305581995159990093034377, field.as_integer());
+3368        }
+3369        // bitwise_name_xor_assign_name_usize => {
+3370        //
+3371        // }
+3372    }
+3373
+3374    // $name & $flag
+3375    tests! {
+3376        bitwise_name_and_flag_u8 => {
+3377            for index in 0..u8::BITS {
+3378                let mask = MyFieldU8(u8::MAX) & MyFlagsU8::from(index as u8);
+3379                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3380            }
+3381        }
+3382        bitwise_name_and_flag_u16 => {
+3383            for index in 0..u16::BITS {
+3384                let mask = MyFieldU16(u16::MAX) & MyFlagsU16::from(index as u8);
+3385                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3386            }
+3387        }
+3388        bitwise_name_and_flag_u32 => {
+3389            for index in 0..u32::BITS {
+3390                let mask = MyFieldU32(u32::MAX) & MyFlagsU32::from(index as u8);
+3391                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3392            }
+3393        }
+3394        bitwise_name_and_flag_u64 => {
+3395            for index in 0..u64::BITS {
+3396                let mask = MyFieldU64(u64::MAX) & MyFlagsU64::from(index as u8);
+3397                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3398            }
+3399        }
+3400        bitwise_name_and_flag_u128 => {
+3401            for index in 0..u128::BITS {
+3402                let mask = MyFieldU128(u128::MAX) & MyFlagsU128::from(index as u8);
+3403                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3404            }
+3405        }
+3406        // bitwise_name_and_flag_usize => {
+3407        //
+3408        // }
+3409    }
+3410
+3411    // $name | $flag
+3412    tests! {
+3413        bitwise_name_or_flag_u8 => {
+3414            for index in 0..u8::BITS {
+3415                let mask = MyFieldU8(0) | MyFlagsU8::from(index as u8);
+3416                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3417            }
+3418        }
+3419        bitwise_name_or_flag_u16 => {
+3420            for index in 0..u16::BITS {
+3421                let mask = MyFieldU16(0) | MyFlagsU16::from(index as u8);
+3422                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3423            }
+3424        }
+3425        bitwise_name_or_flag_u32 => {
+3426            for index in 0..u32::BITS {
+3427                let mask = MyFieldU32(0) | MyFlagsU32::from(index as u8);
+3428                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3429            }
+3430        }
+3431        bitwise_name_or_flag_u64 => {
+3432            for index in 0..u64::BITS {
+3433                let mask = MyFieldU64(0) | MyFlagsU64::from(index as u8);
+3434                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3435            }
+3436        }
+3437        bitwise_name_or_flag_u128 => {
+3438            for index in 0..u128::BITS {
+3439                let mask = MyFieldU128(0) | MyFlagsU128::from(index as u8);
+3440                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3441            }
+3442        }
+3443        // bitwise_name_or_flag_usize => {
+3444        //
+3445        // }
+3446    }
+3447
+3448    // $name ^ $flag
+3449    tests! {
+3450        bitwise_name_xor_flag_u8 => {
+3451            for index in 0..u8::BITS {
+3452                let mask = MyFieldU8(0) ^ MyFlagsU8::from(index as u8);
+3453                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3454            }
+3455        }
+3456        bitwise_name_xor_flag_u16 => {
+3457            for index in 0..u16::BITS {
+3458                let mask = MyFieldU16(0) ^ MyFlagsU16::from(index as u8);
+3459                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3460            }
+3461        }
+3462        bitwise_name_xor_flag_u32 => {
+3463            for index in 0..u32::BITS {
+3464                let mask = MyFieldU32(0) ^ MyFlagsU32::from(index as u8);
+3465                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3466            }
+3467        }
+3468        bitwise_name_xor_flag_u64 => {
+3469            for index in 0..u64::BITS {
+3470                let mask = MyFieldU64(0) ^ MyFlagsU64::from(index as u8);
+3471                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3472            }
+3473        }
+3474        bitwise_name_xor_flag_u128 => {
+3475            for index in 0..u128::BITS {
+3476                let mask = MyFieldU128(0) ^ MyFlagsU128::from(index as u8);
+3477                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3478            }
+3479        }
+3480        // bitwise_name_xor_flag_usize => {
+3481        //
+3482        // }
+3483    }
+3484
+3485    // $name &= $flag
+3486    tests! {
+3487        bitwise_name_and_assign_flag_u8 => {
+3488            for index in 0..u8::BITS {
+3489                let mut mask = MyFieldU8(u8::MAX);
+3490                mask &= MyFlagsU8::from(index as u8);
+3491                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3492            }
+3493        }
+3494        bitwise_name_and_assign_flag_u16 => {
+3495            for index in 0..u16::BITS {
+3496                let mut mask = MyFieldU16(u16::MAX);
+3497                mask &= MyFlagsU16::from(index as u8);
+3498                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3499            }
+3500        }
+3501        bitwise_name_and_assign_flag_u32 => {
+3502            for index in 0..u32::BITS {
+3503                let mut mask = MyFieldU32(u32::MAX);
+3504                mask &= MyFlagsU32::from(index as u8);
+3505                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3506            }
+3507        }
+3508        bitwise_name_and_assign_flag_u64 => {
+3509            for index in 0..u64::BITS {
+3510                let mut mask = MyFieldU64(u64::MAX);
+3511                mask &= MyFlagsU64::from(index as u8);
+3512                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3513            }
+3514        }
+3515        bitwise_name_and_assign_flag_u128 => {
+3516            for index in 0..u128::BITS {
+3517                let mut mask = MyFieldU128(u128::MAX);
+3518                mask &= MyFlagsU128::from(index as u8);
+3519                assert_eq!(0 | !(1 << (index as u8) ), mask.as_integer());
+3520            }
+3521        }
+3522        // bitwise_name_and_assign_flag_usize => {
+3523        //
+3524        // }
+3525    }
+3526
+3527    // $name |= $flag
+3528    tests! {
+3529        bitwise_name_or_assign_flag_u8 => {
+3530            for index in 0..u8::BITS {
+3531                let mut mask = MyFieldU8(0);
+3532                mask |= MyFlagsU8::from(index as u8);
+3533                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3534            }
+3535        }
+3536        bitwise_name_or_assign_flag_u16 => {
+3537            for index in 0..u16::BITS {
+3538                let mut mask = MyFieldU16(0);
+3539                mask |= MyFlagsU16::from(index as u8);
+3540                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3541            }
+3542        }
+3543        bitwise_name_or_assign_flag_u32 => {
+3544            for index in 0..u32::BITS {
+3545                let mut mask = MyFieldU32(0);
+3546                mask |= MyFlagsU32::from(index as u8);
+3547                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3548            }
+3549        }
+3550        bitwise_name_or_assign_flag_u64 => {
+3551            for index in 0..u64::BITS {
+3552                let mut mask = MyFieldU64(0);
+3553                mask |= MyFlagsU64::from(index as u8);
+3554                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3555            }
+3556        }
+3557        bitwise_name_or_assign_flag_u128 => {
+3558            for index in 0..u128::BITS {
+3559                let mut mask = MyFieldU128(0);
+3560                mask |= MyFlagsU128::from(index as u8);
+3561                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3562            }
+3563        }
+3564        // bitwise_name_or_assign_flag_usize => {
+3565        //
+3566        // }
+3567    }
+3568
+3569    // $name ^= $flag
+3570    tests! {
+3571        bitwise_name_xor_assign_flag_u8 => {
+3572            for index in 0..u8::BITS {
+3573                let mut mask = MyFieldU8(0);
+3574                mask ^= MyFlagsU8::from(index as u8);
+3575                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3576            }
+3577        }
+3578        bitwise_name_xor_assign_flag_u16 => {
+3579            for index in 0..u16::BITS {
+3580                let mut mask = MyFieldU16(0);
+3581                mask ^= MyFlagsU16::from(index as u8);
+3582                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3583            }
+3584        }
+3585        bitwise_name_xor_assign_flag_u32 => {
+3586            for index in 0..u32::BITS {
+3587                let mut mask = MyFieldU32(0);
+3588                mask ^= MyFlagsU32::from(index as u8);
+3589                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3590            }
+3591        }
+3592        bitwise_name_xor_assign_flag_u64 => {
+3593            for index in 0..u64::BITS {
+3594                let mut mask = MyFieldU64(0);
+3595                mask ^= MyFlagsU64::from(index as u8);
+3596                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3597            }
+3598        }
+3599        bitwise_name_xor_assign_flag_u128 => {
+3600            for index in 0..u128::BITS {
+3601                let mut mask = MyFieldU128(0);
+3602                mask ^= MyFlagsU128::from(index as u8);
+3603                assert_eq!(0 | (1 << (index as u8) ), mask.as_integer());
+3604            }
+3605        }
+3606        // bitwise_name_xor_assign_flag_usize => {
+3607        //
+3608        // }
+3609    }
+3610
+3611    // $flag & $flag
+3612    tests! {
+3613        bitwise_flag_and_flag_u8 => {
+3614            for index_a in 0..u8::BITS {
+3615                let a = MyFlagsU8::from(index_a as u8);
+3616                for index_b in 0..u8::BITS {
+3617                    let b = MyFlagsU8::from(index_b as u8);
+3618                    assert_eq!(MyFieldU8(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
+3619                }
+3620            }
+3621        }
+3622        bitwise_flag_and_flag_u16 => {
+3623            for index_a in 0..u16::BITS {
+3624                let a = MyFlagsU16::from(index_a as u8);
+3625                for index_b in 0..u16::BITS {
+3626                    let b = MyFlagsU16::from(index_b as u8);
+3627                    assert_eq!(MyFieldU16(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
+3628                }
+3629            }
+3630        }
+3631        bitwise_flag_and_flag_u32 => {
+3632            for index_a in 0..u32::BITS {
+3633                let a = MyFlagsU32::from(index_a as u8);
+3634                for index_b in 0..u32::BITS {
+3635                    let b = MyFlagsU32::from(index_b as u8);
+3636                    assert_eq!(MyFieldU32(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
+3637                }
+3638            }
+3639        }
+3640        bitwise_flag_and_flag_u64 => {
+3641            for index_a in 0..u64::BITS {
+3642                let a = MyFlagsU64::from(index_a as u8);
+3643                for index_b in 0..u64::BITS {
+3644                    let b = MyFlagsU64::from(index_b as u8);
+3645                    assert_eq!(MyFieldU64(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
+3646                }
+3647            }
+3648        }
+3649        bitwise_flag_and_flag_u128 => {
+3650            for index_a in 0..u128::BITS {
+3651                let a = MyFlagsU128::from(index_a as u8);
+3652                for index_b in 0..u128::BITS {
+3653                    let b = MyFlagsU128::from(index_b as u8);
+3654                    assert_eq!(MyFieldU128(0 & 1 << index_a as u8 & 1 << index_b as u8), a & b);
+3655                }
+3656            }
+3657        }
+3658        // bitwise_flag_and_flag_usize => {
+3659        //
+3660        // }
+3661    }
+3662
+3663    // $flag | $flag
+3664    tests! {
+3665        bitwise_flag_or_flag_u8 => {
+3666            for index_a in 0..u8::BITS {
+3667                let a = MyFlagsU8::from(index_a as u8);
+3668                for index_b in 0..u8::BITS {
+3669                    let b = MyFlagsU8::from(index_b as u8);
+3670                    assert_eq!(MyFieldU8(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
+3671                }
+3672            }
+3673        }
+3674        bitwise_flag_or_flag_u16 => {
+3675            for index_a in 0..u16::BITS {
+3676                let a = MyFlagsU16::from(index_a as u8);
+3677                for index_b in 0..u16::BITS {
+3678                    let b = MyFlagsU16::from(index_b as u8);
+3679                    assert_eq!(MyFieldU16(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
+3680                }
+3681            }
+3682        }
+3683        bitwise_flag_or_flag_u32 => {
+3684            for index_a in 0..u32::BITS {
+3685                let a = MyFlagsU32::from(index_a as u8);
+3686                for index_b in 0..u32::BITS {
+3687                    let b = MyFlagsU32::from(index_b as u8);
+3688                    assert_eq!(MyFieldU32(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
+3689                }
+3690            }
+3691        }
+3692        bitwise_flag_or_flag_u64 => {
+3693            for index_a in 0..u64::BITS {
+3694                let a = MyFlagsU64::from(index_a as u8);
+3695                for index_b in 0..u64::BITS {
+3696                    let b = MyFlagsU64::from(index_b as u8);
+3697                    assert_eq!(MyFieldU64(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
+3698                }
+3699            }
+3700        }
+3701        bitwise_flag_or_flag_u128 => {
+3702            for index_a in 0..u128::BITS {
+3703                let a = MyFlagsU128::from(index_a as u8);
+3704                for index_b in 0..u128::BITS {
+3705                    let b = MyFlagsU128::from(index_b as u8);
+3706                    assert_eq!(MyFieldU128(0 | 1 << index_a as u8 | 1 << index_b as u8), a | b);
+3707                }
+3708            }
+3709        }
+3710        // bitwise_flag_or_flag_usize => {
+3711        //
+3712        // }
+3713    }
+3714
+3715    // $flag ^ $flag
+3716    tests! {
+3717        bitwise_flag_xor_flag_u8 => {
+3718            for index_a in 0..u8::BITS {
+3719                let a = MyFlagsU8::from(index_a as u8);
+3720                for index_b in 0..u8::BITS {
+3721                    let b = MyFlagsU8::from(index_b as u8);
+3722                    assert_eq!(MyFieldU8(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
+3723                }
+3724            }
+3725        }
+3726        bitwise_flag_xor_flag_u16 => {
+3727            for index_a in 0..u16::BITS {
+3728                let a = MyFlagsU16::from(index_a as u8);
+3729                for index_b in 0..u16::BITS {
+3730                    let b = MyFlagsU16::from(index_b as u8);
+3731                    assert_eq!(MyFieldU16(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
+3732                }
+3733            }
+3734        }
+3735        bitwise_flag_xor_flag_u32 => {
+3736            for index_a in 0..u32::BITS {
+3737                let a = MyFlagsU32::from(index_a as u8);
+3738                for index_b in 0..u32::BITS {
+3739                    let b = MyFlagsU32::from(index_b as u8);
+3740                    assert_eq!(MyFieldU32(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
+3741                }
+3742            }
+3743        }
+3744        bitwise_flag_xor_flag_u64 => {
+3745            for index_a in 0..u64::BITS {
+3746                let a = MyFlagsU64::from(index_a as u8);
+3747                for index_b in 0..u64::BITS {
+3748                    let b = MyFlagsU64::from(index_b as u8);
+3749                    assert_eq!(MyFieldU64(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
+3750                }
+3751            }
+3752        }
+3753        bitwise_flag_xor_flag_u128 => {
+3754            for index_a in 0..u128::BITS {
+3755                let a = MyFlagsU128::from(index_a as u8);
+3756                for index_b in 0..u128::BITS {
+3757                    let b = MyFlagsU128::from(index_b as u8);
+3758                    assert_eq!(MyFieldU128(0 ^ 1 << index_a as u8 ^ 1 << index_b as u8), a ^ b);
+3759                }
+3760            }
+3761        }
+3762        // bitwise_flag_xor_flag_usize => {
+3763        //
+3764        // }
+3765    }
+3766
+3767    // flag from u8
+3768    tests! {
+3769        flag_from_u8_u8 => {
+3770            for index in 0..u8::BITS {
+3771                let _ = MyFlagsU8::from(index as u8);
+3772            }
+3773        }
+3774        flag_from_u8_u16 => {
+3775            for index in 0..u16::BITS {
+3776                let _ = MyFlagsU16::from(index as u8);
+3777            }
+3778        }
+3779        flag_from_u8_u32 => {
+3780            for index in 0..u32::BITS {
+3781                let _ = MyFlagsU32::from(index as u8);
+3782            }
+3783        }
+3784        flag_from_u8_u64 => {
+3785            for index in 0..u64::BITS {
+3786                let _ = MyFlagsU64::from(index as u8);
+3787            }
+3788        }
+3789        flag_from_u8_u128 => {
+3790            for index in 0..u128::BITS {
+3791                let _ = MyFlagsU128::from(index as u8);
+3792            }
+3793        }
+3794        flag_from_u8_usize => {
+3795            for index in 0..usize::BITS {
+3796                let _ = MyFlagsUsize::from(index as u8);
+3797            }
+3798        }
+3799    }
+3800
+3801    // u8 from flag
+3802    tests! {
+3803        u8_from_flag_u8 => {
+3804            for index in 0..u8::BITS {
+3805                assert_eq!(MyFlagsU8::from(index as u8) as u8, index as u8)
+3806            }
+3807        }
+3808        u8_from_flag_u16 => {
+3809            for index in 0..u16::BITS {
+3810                assert_eq!(MyFlagsU16::from(index as u8) as u8, index as u8)
+3811            }
+3812        }
+3813        u8_from_flag_u32 => {
+3814            for index in 0..u32::BITS {
+3815                assert_eq!(MyFlagsU32::from(index as u8) as u8, index as u8)
+3816            }
+3817        }
+3818        u8_from_flag_u64 => {
+3819            for index in 0..u64::BITS {
+3820                assert_eq!(MyFlagsU64::from(index as u8) as u8, index as u8)
+3821            }
+3822        }
+3823        u8_from_flag_u128 => {
+3824            for index in 0..u128::BITS {
+3825                assert_eq!(MyFlagsU128::from(index as u8) as u8, index as u8)
+3826            }
+3827        }
+3828        u8_from_flag_usize => {
+3829            for index in 0..usize::BITS {
+3830                assert_eq!(MyFlagsUsize::from(index as u8) as u8, index as u8)
+3831            }
+3832        }
+3833    }
+3834}
+3835
+3836// -------------------------------------------------------------------------------------------------
\ No newline at end of file diff --git a/docs/doc/COPYRIGHT.txt b/docs/doc/static.files/COPYRIGHT-7fb11f4e.txt similarity index 61% rename from docs/doc/COPYRIGHT.txt rename to docs/doc/static.files/COPYRIGHT-7fb11f4e.txt index c2629a8..752dab0 100644 --- a/docs/doc/COPYRIGHT.txt +++ b/docs/doc/static.files/COPYRIGHT-7fb11f4e.txt @@ -1,9 +1,10 @@ +# REUSE-IgnoreStart + 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.woff2, FiraSans-Medium.woff2, - FiraSans-Regular.woff, FiraSans-Medium.woff): +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ with Reserved Font Name Fira Sans. @@ -25,9 +26,7 @@ included, and carry their own copyright notices and license terms: Licensed under the MIT license (see LICENSE-MIT.txt). * Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2, - SourceCodePro-Regular.ttf.woff, SourceCodePro-Semibold.ttf.woff, - SourceCodePro-It.ttf.woff): + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark @@ -37,8 +36,7 @@ included, and carry their own copyright notices and license terms: See SourceCodePro-LICENSE.txt. * Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2, SourceSerif4-Regular.ttf.woff, - SourceSerif4-Bold.ttf.woff, SourceSerif4-It.ttf.woff): + SourceSerif4-It.ttf.woff2, SourceSerif4-Semibold.ttf.woff2): Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United @@ -47,4 +45,27 @@ included, and carry their own copyright notices and license terms: Licensed under the SIL Open Font License, Version 1.1. See SourceSerif4-LICENSE.md. +* Nanum Barun Gothic Font (NanumBarunGothic.woff2) + + Copyright 2010, NAVER Corporation (http://www.nhncorp.com) + with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, + NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, + Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, + Naver NanumMyeongjoEco, NanumMyeongjoEco, Naver NanumGothicLight, + NanumGothicLight, NanumBarunGothic, Naver NanumBarunGothic. + + https://hangeul.naver.com/2017/nanum + https://github.com/hiun/NanumBarunGothic + + Licensed under the SIL Open Font License, Version 1.1. + See NanumBarunGothic-LICENSE.txt. + +* Rust logos (rust-logo.svg, favicon.svg, favicon-32x32.png) + + Copyright 2025 Rust Foundation. + Licensed under the Creative Commons Attribution license (CC-BY). + https://rustfoundation.org/policy/rust-trademark-policy/ + This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/docs/doc/static.files/FiraMono-Medium-86f75c8c.woff2 b/docs/doc/static.files/FiraMono-Medium-86f75c8c.woff2 new file mode 100644 index 0000000..610e9b2 Binary files /dev/null and b/docs/doc/static.files/FiraMono-Medium-86f75c8c.woff2 differ diff --git a/docs/doc/static.files/FiraMono-Regular-87c26294.woff2 b/docs/doc/static.files/FiraMono-Regular-87c26294.woff2 new file mode 100644 index 0000000..9fa44b7 Binary files /dev/null and b/docs/doc/static.files/FiraMono-Regular-87c26294.woff2 differ diff --git a/docs/doc/static.files/FiraSans-Italic-81dc35de.woff2 b/docs/doc/static.files/FiraSans-Italic-81dc35de.woff2 new file mode 100644 index 0000000..3f63664 Binary files /dev/null and b/docs/doc/static.files/FiraSans-Italic-81dc35de.woff2 differ diff --git a/docs/doc/FiraSans-LICENSE.txt b/docs/doc/static.files/FiraSans-LICENSE-05ab6dbd.txt similarity index 99% rename from docs/doc/FiraSans-LICENSE.txt rename to docs/doc/static.files/FiraSans-LICENSE-05ab6dbd.txt index ff9afab..d7e9c14 100644 --- a/docs/doc/FiraSans-LICENSE.txt +++ b/docs/doc/static.files/FiraSans-LICENSE-05ab6dbd.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. with Reserved Font Name < Fira >, @@ -92,3 +94,5 @@ 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. + +// REUSE-IgnoreEnd diff --git a/docs/doc/FiraSans-Medium.woff2 b/docs/doc/static.files/FiraSans-Medium-e1aa3f0a.woff2 similarity index 100% rename from docs/doc/FiraSans-Medium.woff2 rename to docs/doc/static.files/FiraSans-Medium-e1aa3f0a.woff2 diff --git a/docs/doc/static.files/FiraSans-MediumItalic-ccf7e434.woff2 b/docs/doc/static.files/FiraSans-MediumItalic-ccf7e434.woff2 new file mode 100644 index 0000000..2d08f9f Binary files /dev/null and b/docs/doc/static.files/FiraSans-MediumItalic-ccf7e434.woff2 differ diff --git a/docs/doc/FiraSans-Regular.woff2 b/docs/doc/static.files/FiraSans-Regular-0fe48ade.woff2 similarity index 100% rename from docs/doc/FiraSans-Regular.woff2 rename to docs/doc/static.files/FiraSans-Regular-0fe48ade.woff2 diff --git a/docs/doc/LICENSE-APACHE.txt b/docs/doc/static.files/LICENSE-APACHE-a60eea81.txt similarity index 100% rename from docs/doc/LICENSE-APACHE.txt rename to docs/doc/static.files/LICENSE-APACHE-a60eea81.txt diff --git a/docs/doc/LICENSE-MIT.txt b/docs/doc/static.files/LICENSE-MIT-23f18e03.txt similarity index 100% rename from docs/doc/LICENSE-MIT.txt rename to docs/doc/static.files/LICENSE-MIT-23f18e03.txt diff --git a/docs/doc/NanumBarunGothic.ttf.woff2 b/docs/doc/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 similarity index 100% rename from docs/doc/NanumBarunGothic.ttf.woff2 rename to docs/doc/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 diff --git a/docs/doc/NanumBarunGothic-LICENSE.txt b/docs/doc/static.files/NanumBarunGothic-LICENSE-a37d393b.txt similarity index 99% rename from docs/doc/NanumBarunGothic-LICENSE.txt rename to docs/doc/static.files/NanumBarunGothic-LICENSE-a37d393b.txt index 0bf4668..4b3edc2 100644 --- a/docs/doc/NanumBarunGothic-LICENSE.txt +++ b/docs/doc/static.files/NanumBarunGothic-LICENSE-a37d393b.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, @@ -97,3 +99,5 @@ 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. + +// REUSE-IgnoreEnd diff --git a/docs/doc/SourceCodePro-It.ttf.woff2 b/docs/doc/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 similarity index 100% rename from docs/doc/SourceCodePro-It.ttf.woff2 rename to docs/doc/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 diff --git a/docs/doc/SourceCodePro-LICENSE.txt b/docs/doc/static.files/SourceCodePro-LICENSE-67f54ca7.txt similarity index 99% rename from docs/doc/SourceCodePro-LICENSE.txt rename to docs/doc/static.files/SourceCodePro-LICENSE-67f54ca7.txt index 0754257..0d2941e 100644 --- a/docs/doc/SourceCodePro-LICENSE.txt +++ b/docs/doc/static.files/SourceCodePro-LICENSE-67f54ca7.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + 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. @@ -91,3 +93,5 @@ 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. + +// REUSE-IgnoreEnd diff --git a/docs/doc/SourceCodePro-Regular.ttf.woff2 b/docs/doc/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 similarity index 100% rename from docs/doc/SourceCodePro-Regular.ttf.woff2 rename to docs/doc/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 diff --git a/docs/doc/SourceCodePro-Semibold.ttf.woff2 b/docs/doc/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 similarity index 100% rename from docs/doc/SourceCodePro-Semibold.ttf.woff2 rename to docs/doc/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 diff --git a/docs/doc/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 b/docs/doc/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 new file mode 100644 index 0000000..181a07f Binary files /dev/null and b/docs/doc/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 differ diff --git a/docs/doc/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 b/docs/doc/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 new file mode 100644 index 0000000..2ae08a7 Binary files /dev/null and b/docs/doc/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 differ diff --git a/docs/doc/SourceSerif4-LICENSE.md b/docs/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md similarity index 94% rename from docs/doc/SourceSerif4-LICENSE.md rename to docs/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md index 68ea189..175fa4f 100644 --- a/docs/doc/SourceSerif4-LICENSE.md +++ b/docs/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md @@ -1,4 +1,7 @@ + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. This Font Software is licensed under the SIL Open Font License, Version 1.1. @@ -91,3 +94,5 @@ 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. + + diff --git a/docs/doc/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 b/docs/doc/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 new file mode 100644 index 0000000..0263fc3 Binary files /dev/null and b/docs/doc/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 differ diff --git a/docs/doc/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 b/docs/doc/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 new file mode 100644 index 0000000..dd55f4e Binary files /dev/null and b/docs/doc/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 differ diff --git a/docs/doc/favicon.svg b/docs/doc/static.files/favicon-044be391.svg similarity index 100% rename from docs/doc/favicon.svg rename to docs/doc/static.files/favicon-044be391.svg diff --git a/docs/doc/static.files/favicon-32x32-eab170b8.png b/docs/doc/static.files/favicon-32x32-eab170b8.png new file mode 100644 index 0000000..0670c4d Binary files /dev/null and b/docs/doc/static.files/favicon-32x32-eab170b8.png differ diff --git a/docs/doc/static.files/main-6dc2a7f3.js b/docs/doc/static.files/main-6dc2a7f3.js new file mode 100644 index 0000000..3e51cbd --- /dev/null +++ b/docs/doc/static.files/main-6dc2a7f3.js @@ -0,0 +1,24 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension;}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden");const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.setAttribute("disabled","disabled");}}function showMain(){const main=document.getElementById(MAIN_ID);if(!main){return;}removeClass(main,"hidden");const mainHeading=main.querySelector(".main-heading");if(mainHeading&&window.searchState.rustdocToolbar){if(window.searchState.rustdocToolbar.parentElement){window.searchState.rustdocToolbar.parentElement.removeChild(window.searchState.rustdocToolbar,);}mainHeading.appendChild(window.searchState.rustdocToolbar);}const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.removeAttribute("disabled");}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key;}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape";}return String.fromCharCode(c);}const MAIN_ID="main-content";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0];}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID));}return el;}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden");}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden");}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild);}if(elemToDisplay===null){addClass(el,"hidden");showMain();return;}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden");const mainHeading=elemToDisplay.querySelector(".main-heading");if(mainHeading&&window.searchState.rustdocToolbar){if(window.searchState.rustdocToolbar.parentElement){window.searchState.rustdocToolbar.parentElement.removeChild(window.searchState.rustdocToolbar,);}mainHeading.appendChild(window.searchState.rustdocToolbar);}}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function";}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link);}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback;}document.head.append(script);}onEachLazy(document.querySelectorAll(".settings-menu"),settingsMenu=>{settingsMenu.querySelector("a").onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return;}window.hideAllModals(false);addClass(settingsMenu,"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css");}}},0);};});window.searchState={rustdocToolbar:document.querySelector("rustdoc-toolbar"),loadingText:"Loading search results...",inputElement:()=>{let el=document.getElementsByClassName("search-input")[0];if(!el){const out=nonnull(nonnull(window.searchState.outputElement()).parentElement);const hdr=document.createElement("div");hdr.className="main-heading search-results-main-heading";const params=window.searchState.getQueryStringParams();const autofocusParam=params.search===""?"autofocus":"";hdr.innerHTML=`
`;out.insertBefore(hdr,window.searchState.outputElement());el=document.getElementsByClassName("search-input")[0];}if(el instanceof HTMLInputElement){return el;}return null;},containerElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el);}return el;},outputElement:()=>{const container=window.searchState.containerElement();if(!container){return null;}let el=container.querySelector(".search-out");if(!el){el=document.createElement("div");el.className="search-out";container.appendChild(el);}return el;},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(window.searchState.timeout!==null){clearTimeout(window.searchState.timeout);window.searchState.timeout=null;}},isDisplayed:()=>{const container=window.searchState.containerElement();if(!container){return false;}return!!container.parentElement&&container.parentElement.id===ALTERNATIVE_DISPLAY_ID;},focus:()=>{const inputElement=window.searchState.inputElement();window.searchState.showResults();if(inputElement){inputElement.focus();requestAnimationFrame(()=>inputElement.focus());}},defocus:()=>{nonnull(window.searchState.inputElement()).blur();},toggle:()=>{if(window.searchState.isDisplayed()){window.searchState.defocus();window.searchState.hideResults();}else{window.searchState.focus();}},showResults:()=>{document.title=window.searchState.title;if(window.searchState.isDisplayed()){return;}const search=window.searchState.containerElement();switchDisplayedElement(search);const btn=document.querySelector("#search-button a");if(browserSupportsHistoryApi()&&btn instanceof HTMLAnchorElement&&window.searchState.getQueryStringParams().search===undefined){history.pushState(null,"",btn.href);}const btnLabel=document.querySelector("#search-button a span.label");if(btnLabel){btnLabel.innerHTML="Exit";}},removeQueryParameters:()=>{document.title=window.searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash);}},hideResults:()=>{switchDisplayedElement(null);window.searchState.removeQueryParameters();const btnLabel=document.querySelector("#search-button a span.label");if(btnLabel){btnLabel.innerHTML="Search";}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1]);});return params;},setup:()=>{let searchLoaded=false;const search_input=window.searchState.inputElement();if(!search_input){return;}function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit();}function loadSearch(){if(!searchLoaded){searchLoaded=true;window.rr_=data=>{window.searchIndex=data;};if(!window.StringdexOnload){window.StringdexOnload=[];}window.StringdexOnload.push(()=>{loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm,);});loadScript(getVar("static-root-path")+getVar("stringdex-js"),sendSearchForm);loadScript(resourcePath("search.index/root",".js"),sendSearchForm);}}search_input.addEventListener("focus",()=>{loadSearch();});const btn=document.getElementById("search-button");if(btn){btn.onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return;}event.preventDefault();window.searchState.toggle();loadSearch();};}if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=window.searchState.getQueryStringParams();document.title=previousTitle;const inputElement=window.searchState.inputElement();if(params.search!==undefined&&inputElement!==null){loadSearch();inputElement.value=params.search;e.preventDefault();window.searchState.showResults();if(params.search===""){window.searchState.focus();}}else{window.searchState.hideResults();}});}window.onpageshow=()=>{const inputElement=window.searchState.inputElement();const qSearch=window.searchState.getQueryStringParams().search;if(qSearch!==undefined&&inputElement!==null){if(inputElement.value===""){inputElement.value=qSearch;}window.searchState.showResults();if(qSearch===""){loadSearch();window.searchState.focus();}}else{window.searchState.hideResults();}};const params=window.searchState.getQueryStringParams();if(params.search!==undefined){window.searchState.setLoadingSearch();loadSearch();}},setLoadingSearch:()=>{const search=window.searchState.outputElement();nonnull(search).innerHTML="

"+window.searchState.loadingText+"

";window.searchState.showResults();},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject);});}const list=await descShard.promise;return list[descIndex];},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"));},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&window.searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash);}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView();}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId);}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElems=document.querySelectorAll(`details > summary > section[id^="${implId}"]`,);onEachLazy(implElems,implElem=>{const numbered=/^(.+?)-([0-9]+)$/.exec(implElem.id);if(implElem.id!==implId&&(!numbered||numbered[1]!==implId)){return false;}return onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/^(.+?)-([0-9]+)$/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id);},0);return true;}},);});}}}function onHashChange(ev){hideSidebar();handleHashes(ev);}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true;}elem=elem.parentElement;}}function expandSection(id){openParentDetails(document.getElementById(id));}function handleEscape(ev){window.searchState.clearInputTimeout();window.searchState.hideResults();ev.preventDefault();window.searchState.defocus();window.hideAllModals(true);}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return;}if(document.activeElement&&document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();window.searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs(false);break;case"_":ev.preventDefault();collapseAllDocs(true);break;case"?":showHelp();break;default:break;}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return;}const sidebar=document.getElementById("rustdoc-modnav");function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return;}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`;}else{path=`${modpath}${shortty}.${name}.html`;}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html";}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current");}li.appendChild(link);ul.appendChild(li);}sidebar.appendChild(h3);sidebar.appendChild(ul);}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("attribute","attributes","Attributes");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases");}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return;}aliases.split(",").forEach(alias=>{inlined_types.add(alias);});});}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue;}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop;}inlined_types.add(struct_type);}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href);}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1;}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors);}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return;}window.pending_type_impls=undefined;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue;}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList);}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header);}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList);}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href);}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id);}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i;}while(document.getElementById(`${el.id}-${i}`)){i+=1;}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref;}});}idMap.set(el.id,i+1);});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li);}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH);}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block);}if(hasClass(item,"associatedtype")){associatedTypes=block;}else if(hasClass(item,"associatedconstant")){associatedConstants=block;}else{methods=block;}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li);});}outputList.appendChild(template.content);}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue;}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0;});list.replaceChildren(...newChildren);}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls);}function addSidebarCrates(){if(!window.ALL_CRATES){return;}const sidebarElems=document.getElementById("rustdoc-modnav");if(!sidebarElems){return;}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current";}li.appendChild(link);ul.appendChild(li);}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul);}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true;}});innerToggle.children[0].innerText="Summary";}function collapseAllDocs(collapseImpls){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if((collapseImpls||e.parentNode.id!=="implementations-list")||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false;}});innerToggle.children[0].innerText="Show all";}function toggleAllDocs(ev){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return;}if(hasClass(innerToggle,"will-expand")){expandAllDocs();}else{collapseAllDocs(ev!==undefined&&ev.shiftKey);}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs;}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open;});}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false);}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true;}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false;}});}());window.rustdoc_add_line_numbers_to_examples=()=>{function generateLine(nb){return`${nb}`;}onEachLazy(document.querySelectorAll(".rustdoc:not(.src) :not(.scraped-example) > .example-wrap > pre > code",),code=>{if(hasClass(code.parentElement.parentElement,"hide-lines")){removeClass(code.parentElement.parentElement,"hide-lines");return;}const lines=code.innerHTML.split("\n");const digits=(lines.length+"").length;code.innerHTML=lines.map((line,index)=>generateLine(index+1)+line).join("\n");addClass(code.parentElement.parentElement,`digits-${digits}`);});};window.rustdoc_remove_line_numbers_from_examples=()=>{onEachLazy(document.querySelectorAll(".rustdoc:not(.src) :not(.scraped-example) > .example-wrap"),x=>addClass(x,"hide-lines"),);};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples();}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown");}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown");}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true;}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar);}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar();});});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(!e.target.matches("summary, a, a *")){e.preventDefault();}});});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText);}else{throw new Error("showTooltip() called with notable without any notable traits!");}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return;}window.hideAllModals(false);const wrapper=Object.assign(document.createElement("div"),{TOOLTIP_BASE:e});if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
";}else{const ttl=e.getAttribute("title");if(ttl!==null){e.setAttribute("data-title",ttl);e.removeAttribute("title");}const dttl=e.getAttribute("data-title");if(dttl!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(dttl));wrapper.appendChild(titleContent);}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";document.body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px";}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",);}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return;}clearTooltipHoverTimeout(e);};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"||!(ev.relatedTarget instanceof HTMLElement)){return;}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out");}};}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return;}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return;}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return;}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element);}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false);}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS);}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT;}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0);}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus();}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false;}document.body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=undefined;}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true);}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler;}return false;};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return;}setTooltipHoverTimeout(e,true);};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return;}setTooltipHoverTimeout(e,true);};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return;}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");}};});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar();}else{hideSidebar();}});}function helpBlurHandler(event){const isInPopover=onEachLazy(document.querySelectorAll(".settings-menu, .help-menu"),menu=>{return menu.contains(document.activeElement)||menu.contains(event.relatedTarget);},);if(!isInPopover){window.hidePopoverMenus();}}function buildHelpMenu(){const book_info=document.createElement("span");const drloChannel=`https://doc.rust-lang.org/${getVar("channel")}`;book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],["_","Collapse all sections, including impl blocks"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look \ + here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"",`Look for functions that accept or return \ + slices and \ + arrays by writing square \ + brackets (e.g., -> [u8] or [] -> Option)`,"Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover content";}container.id="help";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);nonnull(document.getElementById("main-content")).appendChild(help_section);}else{onEachLazy(document.getElementsByClassName("help-menu"),menu=>{if(menu.offsetWidth!==0){menu.appendChild(container);container.onblur=helpBlurHandler;menu.onblur=helpBlurHandler;menu.children[0].onblur=helpBlurHandler;return true;}});}return container;}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus);};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".settings-menu .popover"),elem=>{elem.style.display="none";});onEachLazy(document.querySelectorAll(".help-menu .popover"),elem=>{elem.parentElement.removeChild(elem);});};function showHelp(){window.hideAllModals(false);onEachLazy(document.querySelectorAll(".help-menu a"),menu=>{if(menu.offsetWidth!==0){menu.focus();return true;}});buildHelpMenu();}if(isHelpPage){buildHelpMenu();}else{onEachLazy(document.querySelectorAll(".help-menu > a"),helpLink=>{helpLink.addEventListener("click",event=>{if(event.ctrlKey||event.altKey||event.metaKey){return;}event.preventDefault();if(document.getElementById("help")){window.hidePopoverMenus();}else{showHelp();}},);});}addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);window.searchState.setup();}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;let sidebarButton=document.getElementById("sidebar-button");const body=document.querySelector(".main-heading");if(!sidebarButton&&body){sidebarButton=document.createElement("div");sidebarButton.id="sidebar-button";const path=`${window.rootPath}${window.currentCrate}/all.html`;sidebarButton.innerHTML=``;body.insertBefore(sidebarButton,body.firstChild);}if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(window.rustdocToggleSrcSidebar){window.rustdocToggleSrcSidebar();}e.preventDefault();});}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return;}const isSrcPage=hasClass(document.body,"src");const hideSidebar=function(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width");}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width");}};const showSidebar=function(){if(isSrcPage){window.rustdocShowSourceSidebar();}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");}};const changeSidebarSize=function(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size.toString());sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px");}else{updateLocalStorage("desktop-sidebar-width",size.toString());sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px");}};const isSidebarHidden=function(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar");};const resize=function(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return;}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar();}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame);}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return;}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",);},100);}};window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN);}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize);}});const stopResize=function(e){if(currentPointerId===null){return;}if(e){e.preventDefault();}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null;}};const initResize=function(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return;}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return;}currentPointerId=e.pointerId;}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null;};resizer.addEventListener("pointerdown",initResize,false);}());(function(){function copyContentToClipboard(content){if(content===null){return;}const el=document.createElement("textarea");el.value=content;el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);}function copyButtonAnimation(button){button.classList.add("clicked");if(button.reset_button_timeout!==undefined){clearTimeout(button.reset_button_timeout);}button.reset_button_timeout=setTimeout(()=>{button.reset_button_timeout=undefined;button.classList.remove("clicked");},1000);}const but=document.getElementById("copy-path");if(!but){return;}but.onclick=()=>{const titleElement=document.querySelector("title");const title=titleElement&&titleElement.textContent?titleElement.textContent.replace(" - Rust",""):"";const[item,module]=title.split(" in ");const path=[item];if(module!==undefined){path.unshift(module);}copyContentToClipboard(path.join("::"));copyButtonAnimation(but);};function copyCode(codeElem){if(!codeElem){return;}copyContentToClipboard(codeElem.textContent);}function getExampleWrap(event){const target=event.target;if(target instanceof HTMLElement){let elem=target;while(elem!==null&&!hasClass(elem,"example-wrap")){if(elem===document.body||elem.tagName==="A"||elem.tagName==="BUTTON"||hasClass(elem,"docblock")){return null;}elem=elem.parentElement;}return elem;}else{return null;}}function addCopyButton(event){const elem=getExampleWrap(event);if(elem===null){return;}elem.removeEventListener("mouseover",addCopyButton);const parent=document.createElement("div");parent.className="button-holder";const runButton=elem.querySelector(".test-arrow");if(runButton!==null){parent.appendChild(runButton);}elem.appendChild(parent);const copyButton=document.createElement("button");copyButton.className="copy-button";copyButton.title="Copy code to clipboard";copyButton.addEventListener("click",()=>{copyCode(elem.querySelector("pre > code"));copyButtonAnimation(copyButton);});parent.appendChild(copyButton);if(!elem.parentElement||!elem.parentElement.classList.contains("scraped-example")||!window.updateScrapedExample){return;}const scrapedWrapped=elem.parentElement;window.updateScrapedExample(scrapedWrapped,parent);}function showHideCodeExampleButtons(event){const elem=getExampleWrap(event);if(elem===null){return;}let buttons=elem.querySelector(".button-holder");if(buttons===null){addCopyButton(event);buttons=elem.querySelector(".button-holder");if(buttons===null){return;}}buttons.classList.toggle("keep-visible");}onEachLazy(document.querySelectorAll(".docblock .example-wrap"),elem=>{elem.addEventListener("mouseover",addCopyButton);elem.addEventListener("click",showHideCodeExampleButtons);});}());(function(){document.body.addEventListener("copy",event=>{let target=nonnull(event.target);let isInsideCode=false;while(target&&target!==document.body){if(target.tagName==="CODE"){isInsideCode=true;break;}target=target.parentElement;}if(!isInsideCode){return;}const selection=document.getSelection();nonnull(event.clipboardData).setData("text/plain",selection.toString());event.preventDefault();});}()); \ No newline at end of file diff --git a/docs/doc/normalize.css b/docs/doc/static.files/normalize-9960930a.css similarity index 100% rename from docs/doc/normalize.css rename to docs/doc/static.files/normalize-9960930a.css diff --git a/docs/doc/static.files/noscript-263c88ec.css b/docs/doc/static.files/noscript-263c88ec.css new file mode 100644 index 0000000..e41db77 --- /dev/null +++ b/docs/doc/static.files/noscript-263c88ec.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--sidebar-border-color:#ddd;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--attribute-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--sidebar-border-color:#2A2A2A;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--attribute-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/docs/doc/rust-logo.svg b/docs/doc/static.files/rust-logo-9a9549ea.svg similarity index 100% rename from docs/doc/rust-logo.svg rename to docs/doc/static.files/rust-logo-9a9549ea.svg diff --git a/docs/doc/static.files/rustdoc-e56847b5.css b/docs/doc/static.files/rustdoc-e56847b5.css new file mode 100644 index 0000000..9626ea4 --- /dev/null +++ b/docs/doc/static.files/rustdoc-e56847b5.css @@ -0,0 +1,76 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;--clipboard-image:url('data:image/svg+xml,\ +\ +\ +');--copy-path-height:34px;--copy-path-width:33px;--checkmark-image:url('data:image/svg+xml,\ +\ +');--button-left-margin:4px;--button-border-radius:2px;--toolbar-button-border-radius:6px;--code-block-border-radius:6px;--impl-items-indent:0.3em;--docblock-indent:24px;--font-family:"Source Serif 4",NanumBarunGothic,serif;--font-family-code:"Source Code Pro",monospace;--line-number-padding:4px;--line-number-right-margin:20px;--prev-arrow-image:url('data:image/svg+xml,');--next-arrow-image:url('data:image/svg+xml,');--expand-arrow-image:url('data:image/svg+xml,');--collapse-arrow-image:url('data:image/svg+xml,');--hamburger-image:url('data:image/svg+xml,\ + ');}:root.sans-serif{--font-family:"Fira Sans",sans-serif;--font-family-code:"Fira Mono",monospace;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-0fe48ade.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:italic;font-weight:400;src:local('Fira Sans Italic'),url("FiraSans-Italic-81dc35de.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-e1aa3f0a.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:italic;font-weight:500;src:local('Fira Sans Medium Italic'),url("FiraSans-MediumItalic-ccf7e434.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Mono';font-style:normal;font-weight:400;src:local('Fira Mono'),url("FiraMono-Regular-87c26294.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Mono';font-style:normal;font-weight:500;src:local('Fira Mono Medium'),url("FiraMono-Medium-86f75c8c.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-6b053e98.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-ca3b17ed.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:500;src:local('Source Serif 4 Semibold'),url("SourceSerif4-Semibold-457a13ac.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-6d4fd4c0.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-8badfe75.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-fc8b9304.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-aa29a496.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-13b3dcba.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 var(--font-family);margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;grid-area:main-heading-h1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{position:relative;display:grid;grid-template-areas:"main-heading-breadcrumbs main-heading-breadcrumbs" "main-heading-h1 main-heading-toolbar" "main-heading-sub-heading main-heading-toolbar";grid-template-columns:minmax(105px,1fr) minmax(0,max-content);grid-template-rows:minmax(25px,min-content) min-content min-content;padding-bottom:6px;margin-bottom:15px;}.search-results-main-heading{grid-template-areas:"main-heading-breadcrumbs main-heading-placeholder" "main-heading-breadcrumbs main-heading-toolbar " "main-heading-h1 main-heading-toolbar ";}.search-results-main-heading nav.sub{grid-area:main-heading-h1;align-items:end;margin:4px 0 8px 0;}.rustdoc-breadcrumbs{grid-area:main-heading-breadcrumbs;line-height:1.25;padding-top:5px;position:relative;z-index:1;}.search-switcher{grid-area:main-heading-breadcrumbs;line-height:1.5;display:flex;color:var(--main-color);align-items:baseline;white-space:nowrap;padding-top:8px;min-height:34px;}.rustdoc-breadcrumbs a{padding:5px 0 7px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}.structfield,.sub-variant-field{margin:0.6em 0;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,rustdoc-topbar,.search-input,.search-results .result-name,.item-table dt>a,.out-of-band,.sub-heading,span.since,a.src,rustdoc-toolbar,summary.hideme,.scraped-example-list,.rustdoc-breadcrumbs,.search-switcher,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,rustdoc-topbar h2 a,h1 a,.search-results a,.search-results li,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}span.attribute,a.attribute{color:var(--attribute-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,.code-header,.type-signature{font-family:var(--font-family-code);}.docblock code,.item-table dd code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.item-table dd pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;padding-left:16px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);border-right:solid 1px var(--sidebar-border-color);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:ew-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:var(--desktop-sidebar-width);display:flex;align-items:center;justify-content:flex-start;color:var(--right-side-color);}.sidebar-resizer::before{content:"";border-right:dotted 2px currentColor;width:2px;height:12px;}.sidebar-resizer::after{content:"";border-right:dotted 2px currentColor;width:2px;height:16px;}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing *{cursor:ew-resize !important;}.sidebar-resizing .sidebar{position:fixed;border-right:solid 2px var(--sidebar-resizer-active);}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:calc(var(--desktop-sidebar-width) - 1px);border-left:solid 1px var(--sidebar-resizer-hover);color:var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}.sidebar{border-right:none;}}.sidebar-resizer.active{padding:0 140px;width:calc(140px + 140px + 9px + 2px);margin-left:-140px;border-left:none;color:var(--sidebar-resizer-active);}.sidebar,rustdoc-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li,.block ul{padding:0;margin:0;list-style:none;}.block ul a{padding-left:1rem;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.hide-toc #rustdoc-toc,.hide-toc .in-crate{display:none;}.hide-modnav #rustdoc-modnav{display:none;}.sidebar h2{text-wrap:balance;overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{text-wrap:balance;overflow-wrap:anywhere;font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}rustdoc-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap>pre,.rustdoc .scraped-example .src-line-numbers,.rustdoc .scraped-example .src-line-numbers>pre{border-radius:6px;}.rustdoc .scraped-example{position:relative;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 10 + 10px);}.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers,.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers>pre,.rustdoc:not(.src) .scraped-example:not(.expanded) pre.rust{padding-bottom:0;overflow:auto hidden;}.rustdoc:not(.src) .scraped-example .src-line-numbers{padding-top:0;}.rustdoc:not(.src) .scraped-example.expanded .src-line-numbers{padding-bottom:0;}.rustdoc:not(.src) .example-wrap pre{overflow:auto;}.example-wrap code{position:relative;}.example-wrap pre code span{display:inline;}.example-wrap.digits-1{--example-wrap-digits-count:1ch;}.example-wrap.digits-2{--example-wrap-digits-count:2ch;}.example-wrap.digits-3{--example-wrap-digits-count:3ch;}.example-wrap.digits-4{--example-wrap-digits-count:4ch;}.example-wrap.digits-5{--example-wrap-digits-count:5ch;}.example-wrap.digits-6{--example-wrap-digits-count:6ch;}.example-wrap.digits-7{--example-wrap-digits-count:7ch;}.example-wrap.digits-8{--example-wrap-digits-count:8ch;}.example-wrap.digits-9{--example-wrap-digits-count:9ch;}.example-wrap .expansion{position:relative;display:inline;}.example-wrap .expansion>input{display:block;position:absolute;appearance:none;content:'↕';left:-20px;top:0;border:1px solid var(--border-color);border-radius:4px;cursor:pointer;color:var(--main-color);padding:0 2px;line-height:20px;}.example-wrap .expansion>input::after{content:"↕";}.example-wrap .expansion .expanded{display:none;color:var(--main-color);}.example-wrap .expansion>input:checked~.expanded,.example-wrap .expansion>input:checked~* .expanded{display:inherit;}.example-wrap .expansion>input:checked~.original,.example-wrap .expansion>input:checked~* .original{display:none;}.example-wrap [data-nosnippet]{width:calc(var(--example-wrap-digits-count) + var(--line-number-padding) * 2);}.example-wrap pre>code{padding-left:calc(var(--example-wrap-digits-count) + var(--line-number-padding) * 2 + var(--line-number-right-margin));}.src .example-wrap .expansion [data-nosnippet]{position:initial;margin-left:calc((var(--example-wrap-digits-count) + var(--line-number-padding) * 2 + var(--line-number-right-margin)) * -1);}.example-wrap [data-nosnippet]{color:var(--src-line-numbers-span-color);text-align:right;display:inline-block;margin-right:var(--line-number-right-margin);-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding:0 var(--line-number-padding);position:absolute;left:0;}.example-wrap pre>code{position:relative;display:block;}:root.word-wrap-source-code .example-wrap pre>code{word-break:break-all;white-space:pre-wrap;}:root.word-wrap-source-code .example-wrap pre>code *{word-break:break-all;}.example-wrap [data-nosnippet]:target{border-right:none;}.example-wrap .line-highlighted[data-nosnippet]{background-color:var(--src-line-number-highlighted-background-color);}.example-wrap.hide-lines [data-nosnippet]{display:none;}.search-loading{text-align:center;}.item-table dd{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.item-table dd code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:var(--docblock-indent);position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.sub-heading{font-size:1rem;flex-grow:0;grid-area:main-heading-sub-heading;line-height:1.25;padding-bottom:4px;}.main-heading rustdoc-toolbar,.main-heading .out-of-band{grid-area:main-heading-toolbar;}rustdoc-toolbar{display:flex;flex-direction:row;flex-wrap:nowrap;min-height:60px;}.docblock code,.item-table dd code,pre,.rustdoc.src .example-wrap,.example-wrap .src-line-numbers{background-color:var(--code-block-background-color);border-radius:var(--code-block-border-radius);text-decoration:inherit;}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.docblock .stab,.item-table dd .stab,.docblock p code{display:inline-block;}.docblock li{margin-bottom:.4em;}.docblock li p:not(:last-child){margin-bottom:.3em;}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:var(--docblock-indent);}.impl-items>.item-info{margin-left:calc(var(--docblock-indent) + var(--impl-items-indent));}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;display:flex;align-items:start;margin-top:4px;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 -10px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:10px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover:not([data-nosnippet]),.all-items a:hover,.docblock a:not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.item-table dd a:not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{padding:0;margin:0;width:100%;}.item-table>dt{padding-right:1.25rem;}.item-table>dd{margin-inline-start:0;margin-left:0;}#crate-search-div{position:relative;min-width:0;margin-top:-1px;}#crate-search{padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);max-width:100%;}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;margin:0;padding:0;}.search-results>a{display:grid;grid-template-areas:"search-result-name search-result-desc" "search-result-type-signature search-result-type-signature";grid-template-columns:.6fr .4fr;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);column-gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;grid-area:search-result-desc;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;grid-area:search-result-name;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.search-results .type-signature{grid-area:search-result-type-signature;white-space:pre-wrap;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-check input{flex-shrink:0;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#settings.popover{--popover-arrow-offset:196px;top:calc(100% - 16px);}#help.popover{max-width:600px;--popover-arrow-offset:115px;top:calc(100% - 16px);}#help dt{float:left;clear:left;margin-right:0.5rem;}#help dd{margin-bottom:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;padding:0 0.5rem;text-wrap-style:balance;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side{display:flex;margin-bottom:20px;}.side-by-side>div{width:50%;padding:0 20px 0 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-table dt .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band,.sub-heading,rustdoc-toolbar{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a:not([data-nosnippet]){background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}.example-wrap>a.test-arrow,.example-wrap .button-holder{visibility:hidden;position:absolute;top:4px;right:4px;z-index:1;}a.test-arrow{height:var(--copy-path-height);padding:6px 4px 0 11px;}a.test-arrow::before{content:url('data:image/svg+xml,');}.example-wrap .button-holder{display:flex;}@media not (pointer:coarse){.example-wrap:hover>a.test-arrow,.example-wrap:hover>.button-holder{visibility:visible;}}.example-wrap .button-holder.keep-visible{visibility:visible;}.example-wrap .button-holder>*{background:var(--main-background-color);cursor:pointer;border-radius:var(--button-border-radius);height:var(--copy-path-height);width:var(--copy-path-width);border:0;color:var(--code-example-button-color);}.example-wrap .button-holder>*:hover{color:var(--code-example-button-hover-color);}.example-wrap .button-holder>*:not(:first-child){margin-left:var(--button-left-margin);}.example-wrap .button-holder .copy-button{padding:2px 0 0 4px;}.example-wrap .button-holder .copy-button::before,.example-wrap .test-arrow::before,.example-wrap .button-holder .prev::before,.example-wrap .button-holder .next::before,.example-wrap .button-holder .expand::before{filter:var(--copy-path-img-filter);}.example-wrap .button-holder .copy-button::before{content:var(--clipboard-image);}.example-wrap .button-holder .copy-button:hover::before,.example-wrap .test-arrow:hover::before{filter:var(--copy-path-img-hover-filter);}.example-wrap .button-holder .copy-button.clicked::before{content:var(--checkmark-image);padding-right:5px;}.example-wrap .button-holder .prev,.example-wrap .button-holder .next,.example-wrap .button-holder .expand{line-height:0px;}.example-wrap .button-holder .prev::before{content:var(--prev-arrow-image);}.example-wrap .button-holder .next::before{content:var(--next-arrow-image);}.example-wrap .button-holder .expand::before{content:var(--expand-arrow-image);}.example-wrap .button-holder .expand.collapse::before{content:var(--collapse-arrow-image);}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.main-heading span.since::before{content:"Since ";}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}@keyframes targetfadein{from{background-color:var(--main-background-color);}10%{background-color:var(--target-border-color);}to{background-color:var(--target-background-color);}}:target:not([data-nosnippet]){background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}a.tooltip{font-family:var(--font-family);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}@media not (prefers-reduced-motion){:target{animation:0.65s cubic-bezier(0,0,0.1,1.0) 0.1s targetfadein;}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{margin-top:0.25rem;display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){--search-tab-button-background:var(--search-tab-button-not-selected-background);background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{--search-tab-button-background:var(--search-tab-button-selected-background);background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);position:relative;}#search-tabs .count.loading{color:transparent;}.search-form.loading{--search-tab-button-background:var(--button-background-color);}#search-tabs .count.loading::before,.search-form.loading::before{width:16px;height:16px;border-radius:16px;background:radial-gradient(var(--search-tab-button-background) 0 50%,transparent 50% 100%),conic-gradient(var(--code-highlight-kw-color) 0deg 30deg,var(--code-highlight-prelude-color) 30deg 60deg,var(--code-highlight-number-color) 90deg 120deg,var(--code-highlight-lifetime-color) 120deg 150deg,var(--code-highlight-comment-color) 150deg 180deg,var(--code-highlight-self-color) 180deg 210deg,var(--code-highlight-attribute-color) 210deg 240deg,var(--code-highlight-literal-color) 210deg 240deg,var(--code-highlight-macro-color) 240deg 270deg,var(--code-highlight-question-mark-color) 270deg 300deg,var(--code-highlight-prelude-val-color) 300deg 330deg,var(--code-highlight-doc-comment-color) 330deg 360deg);content:"";position:absolute;left:2px;top:2px;animation:rotating 1.25s linear infinite;}#search-tabs .count.loading::after,.search-form.loading::after{width:18px;height:18px;border-radius:18px;background:conic-gradient(var(--search-tab-button-background) 0deg 180deg,transparent 270deg 360deg);content:"";position:absolute;left:1px;top:1px;animation:rotating 0.66s linear infinite;}.search-form.loading::before{left:auto;right:9px;top:8px;}.search-form.loading::after{left:auto;right:8px;top:8px;}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#search-button,.settings-menu,.help-menu,button#toggle-all-docs{margin-left:var(--button-left-margin);display:flex;line-height:1.25;min-width:14px;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;margin-top:25px;left:6px;height:34px;width:34px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar #sidebar-button{left:6px;background-color:var(--main-background-color);}.src #sidebar-button{margin-top:0;top:8px;left:8px;border-color:var(--border-color);}.hide-sidebar .src #sidebar-button{position:static;}#search-button>a,.settings-menu>a,.help-menu>a,#sidebar-button>a,button#toggle-all-docs{display:flex;align-items:center;justify-content:center;flex-direction:column;}#search-button>a,.settings-menu>a,.help-menu>a,button#toggle-all-docs{border:1px solid transparent;border-radius:var(--button-border-radius);color:var(--main-color);}#search-button>a,.settings-menu>a,.help-menu>a,button#toggle-all-docs{width:80px;border-radius:var(--toolbar-button-border-radius);}#search-button>a,.settings-menu>a,.help-menu>a{min-width:0;}#sidebar-button>a{border:solid 1px transparent;border-radius:var(--button-border-radius);background-color:var(--button-background-color);width:33px;}.src #sidebar-button>a{background-color:var(--sidebar-background-color);border-color:var(--border-color);}#search-button>a:hover,#search-button>a:focus-visible,.settings-menu>a:hover,.settings-menu>a:focus-visible,.help-menu>a:hover,#help-menu>a:focus-visible,#sidebar-button>a:hover,#sidebar-button>a:focus-visible,#copy-path:hover,#copy-path:focus-visible,button#toggle-all-docs:hover,button#toggle-all-docs:focus-visible{border-color:var(--settings-button-border-focus);text-decoration:none;}#search-button>a::before{content:url('data:image/svg+xml,\ + \ + Search\ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}.settings-menu>a::before{content:url('data:image/svg+xml,\ + \ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs::before{content:url('data:image/svg+xml,\ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}.help-menu>a::before{content:url('data:image/svg+xml,\ + \ + \ + \ + \ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}.help-menu>a{width:74px;}.help-menu>a>.label{padding-right:1px;}#toggle-all-docs:not(.will-expand)>.label{padding-left:1px;}#search-button>a::before,button#toggle-all-docs::before,.help-menu>a::before,.settings-menu>a::before{filter:var(--settings-menu-filter);margin:8px;}@media not (pointer:coarse){#search-button>a:hover::before,button#toggle-all-docs:hover::before,.help-menu>a:hover::before,.settings-menu>a:hover::before{filter:var(--settings-menu-hover-filter);}}button[disabled]#toggle-all-docs{opacity:0.25;border:solid 1px var(--main-background-color);background-size:cover;}button[disabled]#toggle-all-docs:hover{border:solid 1px var(--main-background-color);cursor:not-allowed;}rustdoc-toolbar span.label{font-size:1rem;flex-grow:1;padding-bottom:4px;}#sidebar-button>a::before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:var(--copy-path-height);width:var(--copy-path-width);margin-left:10px;padding:0;padding-left:2px;border:solid 1px transparent;border-radius:var(--button-border-radius);font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:var(--clipboard-image);}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:var(--checkmark-image);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}.settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.big-toggle{contain:inline-size;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,\ + ');content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>.methods>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}.impl-items>*:not(.item-info),.implementors-toggle>.docblock,#main-content>.methods>:not(.item-info),.impl>.item-info,.impl>.docblock,.impl+.docblock{margin-left:var(--impl-items-indent);}details.big-toggle>summary:not(.hideme)::before{left:-34px;top:9px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,\ + ');}details.toggle[open] >summary::after{content:"Collapse";}details.toggle:not([open])>summary .docblock{max-height:calc(1.5em + 0.75em);overflow-y:hidden;}details.toggle:not([open])>summary .docblock>:first-child{max-width:100%;overflow:hidden;width:fit-content;white-space:nowrap;position:relative;padding-right:1em;}details.toggle:not([open])>summary .docblock>:first-child::after{content:"…";position:absolute;right:0;top:0;bottom:0;z-index:1;background-color:var(--main-background-color);font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;padding-left:0.2em;}details.toggle:not([open])>summary .docblock>div:first-child::after{padding-top:calc(1.5em + 0.75em - 1.2rem);}details.toggle>summary .docblock{margin-top:0.75em;}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a::before,.sidebar-menu-toggle::before{content:var(--hamburger-image);opacity:0.75;filter:var(--mobile-sidebar-menu-filter);}.src #sidebar-button>a:hover{background:var(--main-background-color);}.sidebar-menu-toggle:hover::before,.sidebar-menu-toggle:active::before,.sidebar-menu-toggle:focus::before{opacity:1;}@media (max-width:850px){#search-tabs .count{display:block;}.side-by-side{flex-direction:column-reverse;}.side-by-side>div{width:auto;}.main-heading{grid-template-areas:"main-heading-breadcrumbs main-heading-toolbar" "main-heading-h1 main-heading-toolbar" "main-heading-sub-heading main-heading-toolbar";}.search-results-main-heading{display:grid;grid-template-areas:"main-heading-breadcrumbs main-heading-toolbar" "main-heading-breadcrumbs main-heading-toolbar" "main-heading-h1 main-heading-toolbar";}rustdoc-toolbar{margin-top:-10px;display:grid;grid-template-areas:"x settings help" "search summary summary";grid-template-rows:35px 1fr;}.search-results-main-heading rustdoc-toolbar{display:grid;grid-template-areas:"settings help" "search search";}.search-results-main-heading #toggle-all-docs{display:none;}rustdoc-toolbar .settings-menu span.label,rustdoc-toolbar .help-menu span.label{display:none;}rustdoc-toolbar .settings-menu{grid-area:settings;}rustdoc-toolbar .help-menu{grid-area:help;}rustdoc-toolbar .settings-menu{grid-area:settings;}rustdoc-toolbar #search-button{grid-area:search;}rustdoc-toolbar #toggle-all-docs{grid-area:summary;}rustdoc-toolbar .settings-menu,rustdoc-toolbar .help-menu{height:35px;}rustdoc-toolbar .settings-menu>a,rustdoc-toolbar .help-menu>a{border-radius:2px;text-align:center;width:34px;padding:5px 0;}rustdoc-toolbar .settings-menu>a:before,rustdoc-toolbar .help-menu>a:before{margin:0 4px;}#settings.popover{top:16px;--popover-arrow-offset:58px;}#help.popover{top:16px;--popover-arrow-offset:16px;}}@media (max-width:700px){:root{--impl-items-indent:0.7em;}*[id]{scroll-margin-top:45px;}#copy-path{width:0;visibility:hidden;}rustdoc-topbar span.label,html:not(.hide-sidebar) .rustdoc:not(.src) rustdoc-toolbar .settings-menu>a,html:not(.hide-sidebar) .rustdoc:not(.src) rustdoc-toolbar .help-menu>a{display:none;}rustdoc-topbar .settings-menu>a,rustdoc-topbar .help-menu>a{width:33px;line-height:0;}rustdoc-topbar .settings-menu>a:hover,rustdoc-topbar .help-menu>a:hover{border:none;background:var(--main-background-color);border-radius:0;}#settings.popover{top:32px;--popover-arrow-offset:48px;}#help.popover{top:32px;--popover-arrow-offset:12px;}.rustdoc{display:block;}html:not(.hide-sidebar) main{padding-left:15px;padding-top:0px;}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);border-right:none;width:100%;}.sidebar-elems .block li a{white-space:wrap;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}html .src main{padding:18px 0;}.src .search-form{margin-left:40px;}.src .main-heading{margin-left:8px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}rustdoc-topbar>h2{padding-bottom:0;margin:auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;text-align:center;}rustdoc-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}rustdoc-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;height:45px;width:100%;left:0;top:0;}.hide-sidebar rustdoc-topbar{display:none;}.sidebar-menu-toggle{width:41px;min-width:41px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#sidebar-button>a::before{content:url('data:image/svg+xml,\ + \ + \ + \ + \ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table dd{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.implementors-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>.methods>details.toggle>summary:not(.hideme)::before{left:-20px;}summary>.item-info{margin-left:10px;}.impl-items>.item-info{margin-left:calc(var(--impl-items-indent) + 10px);}.src nav.sub{margin:0 0 -25px 0;padding:var(--nav-sub-mobile-padding);}html:not(.src-sidebar-expanded) .src #sidebar-button>a{background-color:var(--main-background-color);}html:not(.src-sidebar-expanded) .src #sidebar-button>a:hover,html:not(.src-sidebar-expanded) .src #sidebar-button>a:focus-visible{background-color:var(--sidebar-background-color);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table:not(.reexports){display:grid;grid-template-columns:33% 67%;}.item-table>dt,.item-table>dd{overflow-wrap:anywhere;}.item-table>dt{grid-column-start:1;}.item-table>dd{grid-column-start:2;}}@media print{:root{--docblock-indent:0;}nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}main{padding:10px;}}@media (max-width:464px){:root{--docblock-indent:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example:not(.expanded) .example-wrap::before,.scraped-example:not(.expanded) .example-wrap::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .example-wrap::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .example-wrap::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded){width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded){overflow-x:hidden;}.scraped-example .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--sidebar-border-color:#ddd;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--attribute-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--sidebar-border-color:#999;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--attribute-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--sidebar-border-color:#5c6773;--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--code-example-button-color:#b2b2b2;--code-example-button-hover-color:#fff;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--attribute-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(70%);--settings-menu-hover-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] a[data-nosnippet].line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] .settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a::before{filter:invert(100);} \ No newline at end of file diff --git a/docs/doc/static.files/scrape-examples-2bbcccac.js b/docs/doc/static.files/scrape-examples-2bbcccac.js new file mode 100644 index 0000000..c90f297 --- /dev/null +++ b/docs/doc/static.files/scrape-examples-2bbcccac.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelectorAll("[data-nosnippet]");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines[line].offsetTop;}else{const halfHeight=elt.offsetHeight/2;const offsetTop=lines[loc[0]].offsetTop;const lastLine=lines[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight;}nonnull(lines[0].parentElement).scrollTo(0,scrollOffset);nonnull(elt.querySelector(".rust")).scrollTo(0,scrollOffset);}function createScrapeButton(parent,className,content){const button=document.createElement("button");button.className=className;button.title=content;parent.insertBefore(button,parent.firstChild);return button;}window.updateScrapedExample=(example,buttonHolder)=>{let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=nonnull(example.querySelector(".scraped-example-title a"));let expandButton=null;if(!example.classList.contains("expanded")){expandButton=createScrapeButton(buttonHolder,"expand","Show all");}const isHidden=nonnull(example.parentElement).classList.contains("more-scraped-examples");const locs=example.locs;if(locs.length>1){const next=createScrapeButton(buttonHolder,"next","Next usage");const prev=createScrapeButton(buttonHolder,"prev","Previous usage");const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title;};prev.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length;});});next.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length;});});}if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");removeClass(expandButton,"collapse");expandButton.title="Show all";scrollToLoc(example,locs[0][0],isHidden);}else{addClass(example,"expanded");addClass(expandButton,"collapse");expandButton.title="Show single example";}});}};function setupLoc(example,isHidden){const locs_str=nonnull(example.attributes.getNamedItem("data-locs")).textContent;const locs=JSON.parse(nonnull(nonnull(locs_str)));example.locs=locs;scrollToLoc(example,locs[0][0],isHidden);}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>setupLoc(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false;});});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>setupLoc(el,true));});},{once:true});});})(); \ No newline at end of file diff --git a/docs/doc/static.files/search-e256b49e.js b/docs/doc/static.files/search-e256b49e.js new file mode 100644 index 0000000..319bc5c --- /dev/null +++ b/docs/doc/static.files/search-e256b49e.js @@ -0,0 +1,5 @@ +"use strict";const initSearch=async function(Stringdex,RoaringBitmap,hooks){if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me;};}async function onEachBtwnAsync(arr,func,funcBtwn){let skipped=true;for(const value of arr){if(!skipped){funcBtwn(value);}skipped=await func(value);}}const yieldToBrowser=typeof window!=="undefined"&&window.requestIdleCallback?function(){return new Promise((resolve,_reject)=>{window.requestIdleCallback(resolve);});}:function(){return new Promise((resolve,_reject)=>{setTimeout(resolve,0);});};const timeout=function(ms){return new Promise((resolve,_reject)=>{setTimeout(resolve,ms);});};if(!Promise.withResolvers){Promise.withResolvers=()=>{let resolve,reject;const promise=new Promise((res,rej)=>{resolve=res;reject=rej;});return{promise,resolve,reject};};}const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic","attribute",];const TY_PRIMITIVE=1;const TY_GENERIC=26;const TY_IMPORT=4;const TY_TRAIT=10;const TY_FN=7;const TY_METHOD=13;const TY_TYMETHOD=12;const TY_ASSOCTYPE=17;const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1;}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1);}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1);}if(b.length===0){return minDist;}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE;}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,);}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp;}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1);},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit);}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1;}function isFnLikeTy(ty){return ty===TY_FN||ty===TY_METHOD||ty===TY_TYMETHOD;}function isSeparatorCharacter(c){return c===","||c==="=";}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->";}function skipWhitespace(parserState){while(parserState.pos0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true;}else if(c!==" "){break;}pos-=1;}return false;}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">");}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"];}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",];}if(elems.length===0){throw["Expected type filter before ",":"];}else if(query.literalSearch){throw["Cannot use quotes on type filter"];}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.normalizedPathLast;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics);}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<";}else if(endChar==="]"){extra="[";}else if(endChar===")"){extra="(";}else if(endChar===""){extra="->";}else{extra=endChar;}while(parserState.pos"," after ","="];}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue;}else if(c===" "){parserState.pos+=1;continue;}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue;}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"];}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra];}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"];}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"];}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,];}throw["Expected ",","," or ","=",...extra,", found ",c,];}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra];}if(posBefore===parserState.pos){parserState.pos+=1;}foundStopChar=false;}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra];}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"];}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem;}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator};}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];const handleRefOrPtr=(chr,name)=>{if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ",chr," and ",parserState.typeFilter," both specified",];}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos"){generics[0].typeFilter=typeFilter;elems.push(generics[0]);}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",];}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1;}elems.push(makePrimitiveElement(name,{bindingName,generics}));}}else if(parserState.userQuery[parserState.pos]==="&"){handleRefOrPtr("&","reference");}else if(parserState.userQuery[parserState.pos]==="*"){handleRefOrPtr("*","pointer");}else{const isStringElem=parserState.userQuery[start]==="\"";if(isStringElem){start+=1;getStringElem(query,parserState,isInGenerics);end=parserState.pos-1;}else{end=getIdentEndPosition(parserState);}if(parserState.pos=end){throw["Found generics without a path"];}parserState.pos+=1;getItemsBefore(query,parserState,generics,">");}else if(parserState.pos=end){throw["Found generics without a path"];}if(parserState.isInBinding){throw["Unexpected ","("," after ","="];}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output");}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}));}parserState.typeFilter=typeFilter;}if(isStringElem){skipWhitespace(parserState);}if(start>=end&&generics.length===0){return;}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"];}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"];}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"];}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"];}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"];}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"];}parserState.isInBinding={name,generics};}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),);}}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",];}}function createQueryElement(query,parserState,name,generics,isInGenerics){const path=name.trim();if(path.length===0&&generics.length===0){throw["Unexpected ",parserState.userQuery[parserState.pos]];}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw["Cannot have more than one element if you use quotes"];}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name.trim()==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",];}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",];}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName});}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"];}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]];}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/).map(x=>x.toLowerCase());if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"];}else{throw["Unexpected ",parserState.userQuery[parserState.pos]];}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"];}pathSegments[i]="never";}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1;}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null&&gen.bindingName.name!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen);}bindings.set(gen.bindingName.name.toLowerCase().replace(/_/g,""),gen.bindingName.generics,);return false;}return true;}),bindings,typeFilter,bindingName,};}function makePrimitiveElement(name,extra){return Object.assign({name,id:null,fullPath:[name],pathWithoutLast:[],pathLast:name,normalizedPathLast:name,generics:[],bindings:new Map(),typeFilter:"primitive",bindingName:null,},extra);}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"];}else if(query.literalSearch){throw["Cannot have more than one literal search element"];}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"];}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""];}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"];}else if(start===end){throw["Cannot have empty string element"];}parserState.pos+=1;query.literalSearch=true;}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"];}else{throw["Unexpected ",c," (not a valid identifier)"];}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos;}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro";}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",];}end=macroExclamation;}return end;}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1;}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::";}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true;}return false;}function isPathSeparator(c){return c===":"||c===" ";}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.elemCount=0;this.backrefQueue=[];}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset);}this.offset+=1;return ret;}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList();}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset);}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;this.elemCount+=1;return sign?-value:value;}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48];}if(c===96){this.offset+=1;return this.cons(0);}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop();}return result;}}const EMPTY_STRING_ARRAY=[];const EMPTY_GENERICS_ARRAY=[];const EMPTY_BINDINGS_ARRAY=[];const EMPTY_BINDINGS_MAP=new Map();function itemTypeFromName(typename){if(typename===null){return NO_TYPE_FILTER;}const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename];}return index;}class DocSearch{constructor(rootPath,database){this.rootPath=rootPath;this.database=database;this.utf8decoder=new TextDecoder();this.TYPES_POOL=new Map();}getTypeNameIds(){if(this.typeNameIds){return this.typeNameIds;}const nn=this.database.getData("normalizedName");if(!nn){return{typeNameIdOfOutput:-1,typeNameIdOfFnPtr:-1,typeNameIdOfFn:-1,typeNameIdOfFnMut:-1,typeNameIdOfFnOnce:-1,typeNameIdOfArray:-1,typeNameIdOfSlice:-1,typeNameIdOfArrayOrSlice:-1,typeNameIdOfTuple:-1,typeNameIdOfUnit:-1,typeNameIdOfTupleOrUnit:-1,typeNameIdOfReference:-1,typeNameIdOfPointer:-1,typeNameIdOfHof:-1,typeNameIdOfNever:-1,};}return this.getTypeNameIdsAsync(nn);}async getTypeNameIdsAsync(nn){const[output,fn,fnMut,fnOnce,hof,array,slice,arrayOrSlice,tuple,unit,tupleOrUnit,reference,pointer,never,]=await Promise.all([nn.search("output"),nn.search("fn"),nn.search("fnmut"),nn.search("fnonce"),nn.search("->"),nn.search("array"),nn.search("slice"),nn.search("[]"),nn.search("tuple"),nn.search("unit"),nn.search("()"),nn.search("reference"),nn.search("pointer"),nn.search("never"),]);const first=async(trie,ty,modulePath)=>{if(trie){for(const id of trie.matches().entries()){const pathData=await this.getPathData(id);if(pathData&&pathData.ty===ty&&pathData.modulePath===modulePath){return id;}}}return-1;};const typeNameIdOfOutput=await first(output,TY_ASSOCTYPE,"");const typeNameIdOfFnPtr=await first(fn,TY_PRIMITIVE,"");const typeNameIdOfFn=await first(fn,TY_TRAIT,"core::ops");const typeNameIdOfFnMut=await first(fnMut,TY_TRAIT,"core::ops");const typeNameIdOfFnOnce=await first(fnOnce,TY_TRAIT,"core::ops");const typeNameIdOfArray=await first(array,TY_PRIMITIVE,"");const typeNameIdOfSlice=await first(slice,TY_PRIMITIVE,"");const typeNameIdOfArrayOrSlice=await first(arrayOrSlice,TY_PRIMITIVE,"");const typeNameIdOfTuple=await first(tuple,TY_PRIMITIVE,"");const typeNameIdOfUnit=await first(unit,TY_PRIMITIVE,"");const typeNameIdOfTupleOrUnit=await first(tupleOrUnit,TY_PRIMITIVE,"");const typeNameIdOfReference=await first(reference,TY_PRIMITIVE,"");const typeNameIdOfPointer=await first(pointer,TY_PRIMITIVE,"");const typeNameIdOfHof=await first(hof,TY_PRIMITIVE,"");const typeNameIdOfNever=await first(never,TY_PRIMITIVE,"");this.typeNameIds={typeNameIdOfOutput,typeNameIdOfFnPtr,typeNameIdOfFn,typeNameIdOfFnMut,typeNameIdOfFnOnce,typeNameIdOfArray,typeNameIdOfSlice,typeNameIdOfArrayOrSlice,typeNameIdOfTuple,typeNameIdOfUnit,typeNameIdOfTupleOrUnit,typeNameIdOfReference,typeNameIdOfPointer,typeNameIdOfHof,typeNameIdOfNever,};return this.typeNameIds;}static parseQuery(userQuery){function newParsedQuery(userQuery){return{userQuery,elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,hasReturnArrow:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),};}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){query.hasReturnArrow=true;break;}throw["Unexpected ",c," (did you mean ","->","?)"];}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]];}throw["Unexpected ",c];}else if(c===" "){skipWhitespace(parserState);continue;}if(!foundStopChar){let extra=EMPTY_STRING_ARRAY;if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"];}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"];}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,];}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,];}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1;}foundStopChar=false;}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",];}while(parserState.pos{const ty=itemTypeFromName(elem.typeFilter);if(ty===TY_GENERIC&&elem.generics.length!==0){throw["Generic type parameter ",elem.name," does not accept generic parameters",];}for(const generic of elem.generics){checkTypeFilter(generic);}for(const constraints of elem.bindings.values()){for(const constraint of constraints){checkTypeFilter(constraint);}}};for(const elem of query.elems){checkTypeFilter(elem);}for(const elem of query.returned){checkTypeFilter(elem);}}catch(err){query=newParsedQuery(userQuery);if(Array.isArray(err)&&err.every(elem=>typeof elem==="string")){query.error=err;}else{throw err;}return query;}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1;}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query;}async getName(id){const ni=this.database.getData("name");if(!ni){return null;}const name=await ni.at(id);return name===undefined||name===null?null:this.utf8decoder.decode(name);}async getDesc(id){const di=this.database.getData("desc");if(!di){return null;}const desc=await di.at(id);return desc===undefined||desc===null?null:this.utf8decoder.decode(desc);}async getAliasTarget(id){const ai=this.database.getData("alias");if(!ai){return null;}const bytes=await ai.at(id);if(bytes===undefined||bytes===null||bytes.length===0){return null;}else{const encoded=this.utf8decoder.decode(bytes);const decoded=JSON.parse(encoded);return decoded;}}async getEntryData(id){const ei=this.database.getData("entry");if(!ei){return null;}const encoded=this.utf8decoder.decode(await ei.at(id));if(encoded===""||encoded===undefined||encoded===null){return null;}const raw=JSON.parse(encoded);return{krate:raw[0],ty:raw[1],modulePath:raw[2]===0?null:raw[2]-1,exactModulePath:raw[3]===0?null:raw[3]-1,parent:raw[4]===0?null:raw[4]-1,deprecated:raw[5]===1?true:false,associatedItemDisambiguator:raw.length===6?null:raw[6],};}async getPathData(id){const pi=this.database.getData("path");if(!pi){return null;}const encoded=this.utf8decoder.decode(await pi.at(id));if(encoded===""||encoded===undefined||encoded===null){return null;}const raw=JSON.parse(encoded);return{ty:raw[0],modulePath:raw[1],exactModulePath:raw[2]===0||raw[2]===undefined?raw[1]:raw[2],};}async getFunctionData(id){const fi=this.database.getData("function");if(!fi){return null;}const encoded=this.utf8decoder.decode(await fi.at(id));if(encoded===""||encoded===undefined||encoded===null){return null;}const raw=JSON.parse(encoded);const parser=new VlqHexDecoder(raw[0],async functionSearchType=>{if(typeof functionSearchType==="number"){return null;}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs_;let output_;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs_=Promise.all([this.buildItemSearchType(functionSearchType[INPUTS_DATA]),]);}else{inputs_=this.buildItemSearchTypeAll(functionSearchType[INPUTS_DATA]);}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output_=Promise.all([this.buildItemSearchType(functionSearchType[OUTPUT_DATA]),]);}else{output_=this.buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA]);}}else{output_=Promise.resolve(EMPTY_GENERICS_ARRAY);}const where_clause_=[];const l=functionSearchType.length;for(let i=2;i0?await Promise.all(types.map(type=>this.buildItemSearchType(type))):EMPTY_GENERICS_ARRAY;}async buildItemSearchType(type){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let id,generics;let bindings;if(typeof type==="number"){id=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP;}else{id=type[PATH_INDEX_DATA];generics=await this.buildItemSearchTypeAll(type[GENERICS_DATA]);if(type[BINDINGS_DATA]&&type[BINDINGS_DATA].length>0){bindings=new Map((await Promise.all(type[BINDINGS_DATA].map(async binding=>{const[assocType,constraints]=binding;const[k,v]=await Promise.all([this.buildItemSearchType(assocType).then(t=>t.id),this.buildItemSearchTypeAll(constraints),]);return k===null?EMPTY_BINDINGS_ARRAY:[[k,v]];},))).flat());}else{bindings=EMPTY_BINDINGS_MAP;}}let result;if(id<0){result={id,name:"",ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}else if(id===0){result={id:null,name:"",ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}else{const[name,path,type]=await Promise.all([this.getName(id-1),this.getPathData(id-1),this.getTypeData(id-1),]);if(path===undefined||path===null||type===undefined||type===null){return{id:null,name:"",ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}result={id:id-1,name,ty:path.ty,path:path.modulePath,exactPath:path.exactModulePath===null?path.modulePath:path.exactModulePath,generics,bindings,unboxFlag:type.searchUnbox,};}const cr=this.TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics;}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(k);if(!v2){ok=false;break;}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v);}else if(v!==v2){ok=false;break;}}if(ok){result.bindings=cr.bindings;}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty&&cr.name===result.name&&cr.unboxFlag===result.unboxFlag){return cr;}}this.TYPES_POOL.set(result.id,result);return result;}async execQuery(parsedQuery,filterCrates,currentCrate){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const buildHrefAndPath=item=>{let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.modulePath;let exactPath=item.exactModulePath;if(type==="mod"){displayPath=path+"::";href=this.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html";}else if(type==="import"){displayPath=item.modulePath+"::";href=this.rootPath+item.modulePath.replace(/::/g,"/")+"/index.html#reexport."+name;}else if(type==="primitive"||type==="keyword"||type==="attribute"){displayPath="";exactPath="";href=this.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html";}else if(type==="externcrate"){displayPath="";href=this.rootPath+name+"/index.html";}else if(item.parent){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.path.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.path.exactModulePath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::";exactPath=myparent.name;}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.modulePath.lastIndexOf("::");const enumName=item.modulePath.substr(enumNameIdx+2);path=item.modulePath.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName;}else{displayPath=path+"::"+myparent.name+"::";}if(item.entry&&item.entry.associatedItemDisambiguator!==null){anchor=item.entry.associatedItemDisambiguator+"/"+anchor;}href=this.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor;}else{displayPath=item.modulePath+"::";href=this.rootPath+item.modulePath.replace(/::/g,"/")+"/"+type+"."+name+".html";}return[displayPath,href,`${exactPath}::${name}`];};function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6);}return tmp;}const formatDisplayTypeSignature=async(obj,typeInfo,elems,returned)=>{const typeNameIds=await this.getTypeNameIds();const objType=obj.type;if(!objType){return{type:[],mappedNames:new Map(),whereClause:new Map()};}let fnInputs=null;let fnOutput=null;let mgens=null;if(typeInfo!=="elems"&&typeInfo!=="returned"){fnInputs=unifyFunctionTypes(objType.inputs,elems,objType.where_clause,null,mgensScratch=>{fnOutput=unifyFunctionTypes(objType.output,returned,objType.where_clause,mgensScratch,mgensOut=>{mgens=mgensOut;return true;},0,typeNameIds,);return!!fnOutput;},0,typeNameIds,);}else{const highlighted=unifyFunctionTypes(typeInfo==="elems"?objType.inputs:objType.output,typeInfo==="elems"?elems:returned,objType.where_clause,null,mgensOut=>{mgens=mgensOut;return true;},0,typeNameIds,);if(typeInfo==="elems"){fnInputs=highlighted;}else{fnOutput=highlighted;}}if(!fnInputs){fnInputs=objType.inputs;}if(!fnOutput){fnOutput=objType.output;}const mappedNames=new Map();const whereClause=new Map();const fnParamNames=obj.paramNames||[];const queryParamNames=[];const remapQuery=queryElem=>{if(queryElem.id!==null&&queryElem.id<0){queryParamNames[-1-queryElem.id]=queryElem.name;}if(queryElem.generics.length>0){queryElem.generics.forEach(remapQuery);}if(queryElem.bindings.size>0){[...queryElem.bindings.values()].flat().forEach(remapQuery);}};elems.forEach(remapQuery);returned.forEach(remapQuery);const pushText=(fnType,result)=>{if(!!(result.length%2)===!!fnType.highlighted){result.push("");}else if(result.length===0&&!!fnType.highlighted){result.push("");result.push("");}result[result.length-1]+=fnType.name;};const writeHof=async(fnType,result)=>{const hofOutput=fnType.bindings.get(typeNameIds.typeNameIdOfOutput)||[];const hofInputs=fnType.generics;pushText(fnType,result);pushText({name:" (",highlighted:false},result);let needsComma=false;for(const fnType of hofInputs){if(needsComma){pushText({name:", ",highlighted:false},result);}needsComma=true;await writeFn(fnType,result);}pushText({name:hofOutput.length===0?")":") -> ",highlighted:false,},result);if(hofOutput.length>1){pushText({name:"(",highlighted:false},result);}needsComma=false;for(const fnType of hofOutput){if(needsComma){pushText({name:", ",highlighted:false},result);}needsComma=true;await writeFn(fnType,result);}if(hofOutput.length>1){pushText({name:")",highlighted:false},result);}};const writeSpecialPrimitive=async(fnType,result)=>{if(fnType.id===typeNameIds.typeNameIdOfArray||fnType.id===typeNameIds.typeNameIdOfSlice||fnType.id===typeNameIds.typeNameIdOfTuple||fnType.id===typeNameIds.typeNameIdOfUnit){const[ob,sb]=fnType.id===typeNameIds.typeNameIdOfArray||fnType.id===typeNameIds.typeNameIdOfSlice?["[","]"]:["(",")"];pushText({name:ob,highlighted:fnType.highlighted},result);await onEachBtwnAsync(fnType.generics,nested=>writeFn(nested,result),()=>pushText({name:", ",highlighted:false},result),);pushText({name:sb,highlighted:fnType.highlighted},result);return true;}else if(fnType.id===typeNameIds.typeNameIdOfReference){pushText({name:"&",highlighted:fnType.highlighted},result);let prevHighlighted=false;await onEachBtwnAsync(fnType.generics,async value=>{prevHighlighted=!!value.highlighted;await writeFn(value,result);},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true;}else if(fnType.id===typeNameIds.typeNameIdOfPointer){pushText({name:"*",highlighted:fnType.highlighted},result);if(fnType.generics.length<2){pushText({name:"const ",highlighted:fnType.highlighted},result);}let prevHighlighted=false;await onEachBtwnAsync(fnType.generics,async value=>{prevHighlighted=!!value.highlighted;await writeFn(value,result);},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true;}else if(fnType.id===typeNameIds.typeNameIdOfFn||fnType.id===typeNameIds.typeNameIdOfFnMut||fnType.id===typeNameIds.typeNameIdOfFnOnce||fnType.id===typeNameIds.typeNameIdOfFnPtr){await writeHof(fnType,result);return true;}else if(fnType.id===typeNameIds.typeNameIdOfNever){pushText({name:"!",highlighted:fnType.highlighted},result);return true;}return false;};const writeFn=async(fnType,result)=>{if(fnType.id!==null&&fnType.id<0){if(fnParamNames[-1-fnType.id]===""){const generics=fnType.generics.length>0?fnType.generics:objType.where_clause[-1-fnType.id];for(const nested of generics){await writeFn(nested,result);}return;}else if(mgens){for(const[queryId,fnId]of mgens){if(fnId===fnType.id){mappedNames.set(queryParamNames[-1-queryId],fnParamNames[-1-fnType.id],);}}}pushText({name:fnParamNames[-1-fnType.id],highlighted:!!fnType.highlighted,},result);const where=[];await onEachBtwnAsync(fnType.generics,nested=>writeFn(nested,where),()=>pushText({name:" + ",highlighted:false},where),);if(where.length>0){whereClause.set(fnParamNames[-1-fnType.id],where);}}else{if(fnType.ty===TY_PRIMITIVE){if(await writeSpecialPrimitive(fnType,result)){return;}}else if(fnType.ty===TY_TRAIT&&(fnType.id===typeNameIds.typeNameIdOfFn||fnType.id===typeNameIds.typeNameIdOfFnMut||fnType.id===typeNameIds.typeNameIdOfFnOnce||fnType.id===typeNameIds.typeNameIdOfFnPtr)){await writeHof(fnType,result);return;}else if(fnType.name===""&&fnType.bindings.size===0&&fnType.generics.length!==0){pushText({name:"impl ",highlighted:false},result);if(fnType.generics.length>1){pushText({name:"(",highlighted:false},result);}await onEachBtwnAsync(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(fnType.generics.length>1){pushText({name:")",highlighted:false},result);}return;}pushText(fnType,result);let hasBindings=false;if(fnType.bindings.size>0){await onEachBtwnAsync(await Promise.all([...fnType.bindings.entries()].map(async([key,values])=>[await this.getName(key),values],)),async([name,values])=>{if(values.length===1&&values[0].id<0&&`${fnType.name}::${name}`===fnParamNames[-1-values[0].id]){for(const value of values){await writeFn(value,[]);}return true;}if(!hasBindings){hasBindings=true;pushText({name:"<",highlighted:false},result);}pushText({name,highlighted:false},result);pushText({name:values.length!==1?"=(":"=",highlighted:false,},result);await onEachBtwnAsync(values||[],value=>writeFn(value,result),()=>pushText({name:" + ",highlighted:false},result),);if(values.length!==1){pushText({name:")",highlighted:false},result);}},()=>pushText({name:", ",highlighted:false},result),);}if(fnType.generics.length>0){pushText({name:hasBindings?", ":"<",highlighted:false},result);}await onEachBtwnAsync(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(hasBindings||fnType.generics.length>0){pushText({name:">",highlighted:false},result);}}};const type=[];await onEachBtwnAsync(fnInputs,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);pushText({name:" -> ",highlighted:false},type);await onEachBtwnAsync(fnOutput,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);return{type,mappedNames,whereClause};};const transformResults=(results,typeInfo,duplicates)=>{const out=[];for(const result of results){const item=result.item;if(item.id!==-1){const res=buildHrefAndPath(item);const obj=Object.assign({parent:item.parent?{path:item.parent.path.modulePath,exactPath:item.parent.path.exactModulePath||item.parent.path.modulePath,name:item.parent.name,ty:item.parent.path.ty,}:undefined,type:item.functionData&&item.functionData.functionSignature?item.functionData.functionSignature:undefined,paramNames:item.functionData&&item.functionData.paramNames?item.functionData.paramNames:undefined,dist:result.dist,path_dist:result.path_dist,index:result.index,desc:this.getDesc(result.id),item,displayPath:pathSplitter(res[0]),fullPath:"",href:"",displayTypeSignature:null,},result);obj.fullPath=res[2]+"|"+obj.item.ty;if(duplicates.has(obj.fullPath)){continue;}if(obj.item.ty===TY_IMPORT&&duplicates.has(res[2])){continue;}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue;}duplicates.add(obj.fullPath);duplicates.add(res[2]);if(typeInfo!==null){obj.displayTypeSignature=formatDisplayTypeSignature(obj,typeInfo,result.elems,result.returned,);}obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break;}}}return out;};const sortAndTransformResults=async function*(results,typeInfo,preferredCrate,duplicates){const userQuery=parsedQuery.userQuery;const normalizedUserQuery=parsedQuery.userQuery.toLowerCase();const isMixedCase=normalizedUserQuery!==userQuery;const result_list=[];for(const result of results.values()){if(!result){continue;}const item=result.item;if(filterCrates!==null&&item.crate!==filterCrates){continue;}if(item){result_list.push(result);}else{continue;}}result_list.sort((aaa,bbb)=>{const aai=aaa.item;const bbi=bbb.item;let a;let b;if(typeInfo===null){if(isMixedCase){a=Number(aai.name!==userQuery);b=Number(bbi.name!==userQuery);if(a!==b){return a-b;}}a=Number(aai.normalizedName!==normalizedUserQuery);b=Number(bbi.normalizedName!==normalizedUserQuery);if(a!==b){return a-b;}a=Number(aaa.index<0);b=Number(bbb.index<0);if(a!==b){return a-b;}}a=Number(aaa.path_dist);b=Number(bbb.path_dist);if(a!==b){return a-b;}a=Number(aaa.index);b=Number(bbb.index);if(a!==b){return a-b;}a=Number(aaa.dist);b=Number(bbb.dist);if(a!==b){return a-b;}a=Number(aaa.is_alias);b=Number(bbb.is_alias);if(a!==b){return a-b;}a=Number(aai.deprecated);b=Number(bbi.deprecated);if(a!==b){return a-b;}a=Number(aai.crate!==preferredCrate);b=Number(bbi.crate!==preferredCrate);if(a!==b){return a-b;}a=Number(aai.normalizedName.length);b=Number(bbi.normalizedName.length);if(a!==b){return a-b;}let aw=aai.normalizedName;let bw=bbi.normalizedName;if(aw!==bw){return(aw>bw?+1:-1);}const di=this.database.getData("desc");if(di){a=Number(di.isEmpty(aaa.id));b=Number(di.isEmpty(bbb.id));if(a!==b){return a-b;}}a=Number(aai.ty);b=Number(bbi.ty);if(a!==b){return a-b;}const ap=aai.modulePath;const bp=bbi.modulePath;aw=ap===undefined?"":ap;bw=bp===undefined?"":bp;if(aw!==bw){return(aw>bw?+1:-1);}return 0;});const transformed_result_list=transformResults(result_list,typeInfo,duplicates);yield*transformed_result_list;return transformed_result_list.length;}.bind(this);function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,typeNameIds,){if(unboxingDepth>=UNBOXING_LIMIT){return null;}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null;}if(!fnTypesIn||fnTypesIn.length===0){return null;}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens,typeNameIds,)){continue;}if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(mgens&&mgens.has(queryElem.id)&&mgens.get(queryElem.id)!==fnType.id){continue;}const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);if(!solutionCb||solutionCb(mgensScratch)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted;}}else if(solutionCb(mgens?new Map(mgens):null)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:unifyGenericTypes(fnType.generics,queryElem.generics,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth,typeNameIds,)||fnType.generics,});return highlighted;}}for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,typeNameIds,)){continue;}if(fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,typeNameIds,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,});return highlighted;}}else{const highlightedGenerics=unifyFunctionTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,typeNameIds,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)];})),});return highlighted;}}}return null;}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens,typeNameIds,)){continue;}let mgensScratch;if(fnType.id!==null&&queryElem.id!==null&&fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(queryElem.id)&&mgensScratch.get(queryElem.id)!==fnType.id){continue;}mgensScratch.set(queryElem.id,fnType.id);}else{mgensScratch=mgens;}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast);}let unifiedGenerics=[];let unifiedGenericsMgens=null;const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return solutionCb(mgensScratch);}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,typeNameIds,);if(!solution){return false;}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,typeNameIds,);if(unifiedGenerics!==null){unifiedGenericsMgens=simplifiedMgens;return true;}}return false;},unboxingDepth,typeNameIds,);if(passesUnification){passesUnification.length=fl;passesUnification[flast]=passesUnification[i];passesUnification[i]=Object.assign({},fnType,{highlighted:true,generics:unifiedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,queryElem.bindings.has(k)?unifyFunctionTypes(v,queryElem.bindings.get(k),whereClause,unifiedGenericsMgens,solutionCb,unboxingDepth,typeNameIds,):unifiedGenerics.splice(0,v.length)];})),});return passesUnification;}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl;}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,typeNameIds,)){continue;}const generics=fnType.id!==null&&fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...bindings,...generics),queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,typeNameIds,);if(passesUnification){const highlightedGenerics=passesUnification.slice(i,i+generics.length+bindings.length,);const highlightedFnType=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)];})),});return passesUnification.toSpliced(i,generics.length+bindings.length,highlightedFnType,);}}return null;}function unifyGenericTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,typeNameIds,){if(unboxingDepth>=UNBOXING_LIMIT){return null;}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null;}if(!fnTypesIn||fnTypesIn.length===0){return null;}const fnType=fnTypesIn[0];const queryElem=queryElems[0];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens,typeNameIds,)){if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(!mgens||!mgens.has(queryElem.id)||mgens.get(queryElem.id)===fnType.id){const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,typeNameIds,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted;}}}else{let unifiedGenerics;const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgens,mgensScratch=>{const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,typeNameIds,);if(!solution){return false;}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,typeNameIds,);if(unifiedGenerics!==null){return true;}}},unboxingDepth,typeNameIds,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:unifiedGenerics||fnType.generics,});return highlighted;}}}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,typeNameIds,)){let highlightedRemaining;if(fnType.id!==null&&fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,typeNameIds,);if(hl){highlightedRemaining=hl;}return hl;},unboxingDepth+1,typeNameIds,);if(highlightedGenerics){return[Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,}),...highlightedRemaining];}}else{const highlightedGenerics=unifyGenericTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics,],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,typeNameIds,);if(hl){highlightedRemaining=hl;}return hl;},unboxingDepth+1,typeNameIds,);if(highlightedGenerics){return[Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)];})),}),...highlightedRemaining];}}}return null;}const unifyFunctionTypeIsMatchCandidate=(fnType,queryElem,mgensIn,typeNameIds)=>{if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false;}if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(mgensIn&&mgensIn.has(queryElem.id)&&mgensIn.get(queryElem.id)!==fnType.id){return false;}return true;}else{if(queryElem.id===typeNameIds.typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIds.typeNameIdOfSlice||fnType.id===typeNameIds.typeNameIdOfArray)){}else if(queryElem.id===typeNameIds.typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIds.typeNameIdOfTuple||fnType.id===typeNameIds.typeNameIdOfUnit)){}else if(queryElem.id===typeNameIds.typeNameIdOfHof&&(fnType.id===typeNameIds.typeNameIdOfFn||fnType.id===typeNameIds.typeNameIdOfFnMut||fnType.id===typeNameIds.typeNameIdOfFnOnce||fnType.id===typeNameIds.typeNameIdOfFnPtr)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false;}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false;}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false;}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break;}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false;}if(!fnType.bindings.has(name)){return false;}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false;},unboxingDepth,typeNameIds,);return newSolutions;});}if(mgensSolutionSet.length===0){return false;}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[];}else{return constraints;}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...binds,...simplifiedGenerics];}else{simplifiedGenerics=binds;}return{simplifiedGenerics,mgens:mgensSolutionSet};}return{simplifiedGenerics,mgens:[mgensIn]};}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,typeNameIds,){if(unboxingDepth>=UNBOXING_LIMIT){return false;}if(fnType.id!==null&&fnType.id<0){if(!whereClause){return false;}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgens,unboxingDepth,typeNameIds,);}else if(fnType.unboxFlag&&(fnType.generics.length>0||fnType.bindings.size>0)){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,typeNameIds,);}return false;}function containsTypeFromQuery(elems,list,where_clause,typeNameIds){if(!list)return false;for(const ty of elems){if(ty.id!==null&&ty.id<0){continue;}if(checkIfInList(list,ty,where_clause,null,0,typeNameIds)){return true;}}return false;}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth,typeNameIds){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth,typeNameIds)){return true;}}return false;}const checkType=(row,elem,whereClause,mgens,unboxingDepth,typeNameIds)=>{if(unboxingDepth>=UNBOXING_LIMIT){return false;}if(row.id!==null&&elem.id!==null&&row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&row.generics.length===0&&elem.generics.length===0&&row.bindings.size===0&&elem.bindings.size===0&&elem.id!==typeNameIds.typeNameIdOfArrayOrSlice&&elem.id!==typeNameIds.typeNameIdOfHof&&elem.id!==typeNameIds.typeNameIdOfTupleOrUnit){return row.id===elem.id&&typePassesFilter(elem.typeFilter,row.ty);}else{return unifyFunctionTypes([row],[elem],whereClause,mgens,()=>true,unboxingDepth,typeNameIds,);}};const checkTypeMgensForConflict=mgens=>{if(!mgens){return true;}const fnTypes=new Set();for(const[_qid,fid]of mgens){if(fnTypes.has(fid)){return false;}fnTypes.add(fid);}return true;};function checkPath(contains,path){if(contains.length===0){return 0;}const maxPathEditDistance=parsedQuery.literalSearch?0:Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter;}dist_total+=dist;}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength));}return ret_dist>maxPathEditDistance?null:ret_dist;}function checkRowPath(contains,row){if(contains.length===0){return 0;}const path=row.modulePath.split("::");if(row.parent&&row.parent.name){path.push(row.parent.name.toLowerCase());}return checkPath(contains,path);}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias";}return false;}const innerRunNameQuery=async function*(currentCrate){const index=this.database.getData("normalizedName");if(!index){return;}const idDuplicates=new Set();const pathDuplicates=new Set();let count=0;const prefixResults=[];const normalizedUserQuery=parsedQuery.userQuery.replace(/[_"]/g,"").toLowerCase();const handleAlias=async(name,alias,dist,index)=>{return{id:alias,dist,path_dist:0,index,alias:name,is_alias:true,elems:[],returned:[],item:nonnull(await this.getRow(alias,false)),};};const flush=async function*(data){const satr=sortAndTransformResults(await Promise.all(data),null,currentCrate,pathDuplicates,);data.length=0;for await(const processed of satr){yield processed;count+=1;if((count&0x7F)===0){await yieldToBrowser();}if(count>=MAX_RESULTS){return true;}}return false;};const aliasResults=await index.search(normalizedUserQuery);if(aliasResults){for(const id of aliasResults.matches().entries()){const[name,alias]=await Promise.all([this.getName(id),this.getAliasTarget(id),]);if(name!==null&&alias!==null&&!idDuplicates.has(id)&&name.replace(/[_"]/g,"").toLowerCase()===normalizedUserQuery){prefixResults.push(handleAlias(name,alias,0,0));idDuplicates.add(id);}}}if(parsedQuery.error!==null||parsedQuery.elems.length===0){yield*flush(prefixResults);return;}const elem=parsedQuery.elems[0];const typeFilter=itemTypeFromName(elem.typeFilter);const handleNameSearch=async id=>{const row=await this.getRow(id,false);if(!row||!row.entry){return null;}if(!typePassesFilter(typeFilter,row.ty)||(filterCrates!==null&&row.crate!==filterCrates)){return null;}let pathDist=0;if(elem.fullPath.length>1){pathDist=checkRowPath(elem.pathWithoutLast,row);if(pathDist===null){return null;}}if(parsedQuery.literalSearch){return row.name.toLowerCase()===elem.pathLast?{id,dist:0,path_dist:0,index:0,elems:[],returned:[],is_alias:false,item:row,}:null;}else{return{id,dist:editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance,),path_dist:pathDist,index:row.normalizedName.indexOf(elem.normalizedPathLast),elems:[],returned:[],is_alias:false,item:row,};}};if(elem.normalizedPathLast===""){const l=index.length;for(let id=0;id{let i=0;const l=idx.length;while(i{if(!elem){return empty_postings_list;}const typeFilter=itemTypeFromName(elem.typeFilter);const[searchResults,upla,uplb]=await Promise.all([index.search(elem.normalizedPathLast),unpackPostingsListAll(elem.generics,polarity),unpackPostingsListBindings(elem.bindings,polarity),]);const typePromises=[];if(typeFilter!==TY_GENERIC&&searchResults){for(const id of searchResults.matches().entries()){typePromises.push(Promise.all([this.getName(id),this.getTypeData(id),this.getPathData(id),]).then(([name,typeData,pathData])=>[id,name,typeData,pathData]));}}const types=(await Promise.all(typePromises)).filter(([_id,name,ty,path])=>name!==null&&name.toLowerCase()===elem.pathLast&&ty&&!ty[polarity].every(bitmap=>{return bitmap.isEmpty();})&&path&&path.ty!==TY_ASSOCTYPE&&(elem.pathWithoutLast.length===0||checkPath(elem.pathWithoutLast,path.modulePath.split("::"),)===0),);if(types.length===0){const areGenericsAllowed=typeFilter===TY_GENERIC||(typeFilter===-1&&(parsedQuery.totalElems>1||parsedQuery.hasReturnArrow)&&elem.pathWithoutLast.length===0&&elem.generics.length===0&&elem.bindings.size===0);if(typeFilter!==TY_GENERIC&&(elem.name.length>=3||!areGenericsAllowed)){let chosenName=null;let chosenType=[];let chosenPath=[];let chosenId=[];let chosenDist=Number.MAX_SAFE_INTEGER;const levResults=index.searchLev(elem.normalizedPathLast);for await(const searchResults of levResults){for(const id of searchResults.matches().entries()){const[name,ty,path]=await Promise.all([this.getName(id),this.getTypeData(id),this.getPathData(id),]);if(name!==null&&ty!==null&&path!==null&&!ty[polarity].every(bitmap=>{return bitmap.isEmpty();})&&path.ty!==TY_ASSOCTYPE){let dist=editDistance(name,elem.pathLast,maxEditDistance,);if(elem.pathWithoutLast.length!==0){const pathDist=checkPath(elem.pathWithoutLast,path.modulePath.split("::"),);dist+=pathDist===null?Number.MAX_SAFE_INTEGER:pathDist;}if(name===chosenName){chosenId.push(id);chosenType.push(ty);chosenPath.push(path);}else if(dist{const p1=!pathData1?"":pathData1.modulePath;const p2=!pathData2?"":pathData2.modulePath;const n1=name1===null?"":name1;const n2=name2===null?"":name2;if(p1.length!==p2.length){return p1.length>p2.length?+1:-1;}if(n1.length!==n2.length){return n1.length>n2.length?+1:-1;}if(n1!==n2){return n1>n2?+1:-1;}if(p1!==p2){return p1>p2?+1:-1;}return 0;});const results=[];for(const[id,_name,typeData]of types){if(!typeData||typeData[polarity].every(bitmap=>{return bitmap.isEmpty();})){continue;}for(const{invertedIndex:genericsIdx,queryElem:generics}of upla){for(const{invertedIndex:bindingsIdx,queryElem:bindings}of uplb){results.push({invertedIndex:intersectInvertedIndexes(typeData[polarity],genericsIdx,bindingsIdx,),queryElem:{name:elem.name,id,typeFilter,generics,bindings,fullPath:elem.fullPath,pathLast:elem.pathLast,normalizedPathLast:elem.normalizedPathLast,pathWithoutLast:elem.pathWithoutLast,},});if((results.length&0x7F)===0){await yieldToBrowser();}}}}return results;};const unpackPostingsListAll=async(elems,polarity)=>{if(!elems||elems.length===0){return nested_everything_postings_list;}const[firstPostingsList,remainingAll]=await Promise.all([unpackPostingsList(elems[0],polarity),unpackPostingsListAll(elems.slice(1),polarity),]);const results=[];for(const{invertedIndex:firstIdx,queryElem:firstElem,}of firstPostingsList){for(const{invertedIndex:remainingIdx,queryElem:remainingElems,}of remainingAll){results.push({invertedIndex:intersectInvertedIndexes(firstIdx,remainingIdx),queryElem:[firstElem,...remainingElems],});if((results.length&0x7F)===0){await yieldToBrowser();}}}return results;};const unpackPostingsListBindings=async(elems,polarity)=>{if(!elems){return[{invertedIndex:everything_inverted_index,queryElem:new Map(),}];}const firstKey=elems.keys().next().value;if(firstKey===undefined){return[{invertedIndex:everything_inverted_index,queryElem:new Map(),}];}const firstList=elems.get(firstKey);if(firstList===undefined){return[{invertedIndex:everything_inverted_index,queryElem:new Map(),}];}elems.delete(firstKey);const[firstKeyIds,firstPostingsList,remainingAll]=await Promise.all([index.search(firstKey),unpackPostingsListAll(firstList,polarity),unpackPostingsListBindings(elems,polarity),]);if(!firstKeyIds){elems.set(firstKey,firstList);return[{invertedIndex:empty_inverted_index,queryElem:new Map(),}];}const results=[];for(const keyId of firstKeyIds.matches().entries()){for(const{invertedIndex:firstIdx,queryElem:firstElem,}of firstPostingsList){for(const{invertedIndex:remainingIdx,queryElem:remainingElems,}of remainingAll){const elems=new Map(remainingElems);elems.set(keyId,firstElem);results.push({invertedIndex:intersectInvertedIndexes(firstIdx,remainingIdx),queryElem:elems,});if((results.length&0x7F)===0){await yieldToBrowser();}}}}elems.set(firstKey,firstList);if(results.length===0){return[{invertedIndex:empty_inverted_index,queryElem:new Map(),}];}return results;};const[allInputs,allOutput,typeNameIds]=await Promise.all([unpackPostingsListAll(inputs,"invertedFunctionInputsIndex"),unpackPostingsListAll(output,"invertedFunctionOutputIndex"),this.getTypeNameIds(),]);let checkCounter=0;const queryPlan=[];for(const{invertedIndex:inputsIdx,queryElem:inputs}of allInputs){for(const{invertedIndex:outputIdx,queryElem:output}of allOutput){const invertedIndex=intersectInvertedIndexes(inputsIdx,outputIdx);for(const[size,bitmap]of invertedIndex.entries()){checkCounter+=1;if((checkCounter&0x7F)===0){await yieldToBrowser();}if(!queryPlan[size]){queryPlan[size]=[];}queryPlan[size].push({bitmap,inputs,output,});}}}const resultPromises=[];const dedup=new Set();let resultCounter=0;const isReturnTypeQuery=inputs.length===0;const pushToBottom=[];plan:for(const queryStep of queryPlan){for(const{bitmap,inputs,output}of queryStep){for(const id of bitmap.entries()){checkCounter+=1;if((checkCounter&0x7F)===0){await yieldToBrowser();}resultPromises.push(this.getFunctionData(id).then(async fnData=>{if(!fnData||!fnData.functionSignature){return null;}checkCounter+=1;if((checkCounter&0x7F)===0){await yieldToBrowser();}const functionSignature=fnData.functionSignature;if(!unifyFunctionTypes(functionSignature.inputs,inputs,functionSignature.where_clause,null,mgens=>{return!!unifyFunctionTypes(functionSignature.output,output,functionSignature.where_clause,mgens,checkTypeMgensForConflict,0,typeNameIds,);},0,typeNameIds,)){return null;}const item=await this.getRow(id,true);if(!item){return null;}const result={id,dist:fnData.elemCount,path_dist:0,index:-1,elems:inputs,returned:output,is_alias:false,item,};const entry=item.entry;if((entry&&!isFnLikeTy(entry.ty))||(isReturnTypeQuery&&functionSignature&&containsTypeFromQuery(output,functionSignature.inputs,functionSignature.where_clause,typeNameIds,))){pushToBottom.push(result);return null;}return result;}));}}for await(const result of sortAndTransformResults(await Promise.all(resultPromises),typeInfo,currentCrate,dedup,)){if(resultCounter>=MAX_RESULTS){break plan;}yield result;resultCounter+=1;}resultPromises.length=0;}if(resultCounter>=MAX_RESULTS){return;}for await(const result of sortAndTransformResults(await Promise.all(pushToBottom),typeInfo,currentCrate,dedup,)){if(resultCounter>=MAX_RESULTS){break;}yield result;resultCounter+=1;}}.bind(this);if(parsedQuery.foundElems===1&&!parsedQuery.hasReturnArrow){const{promise:donePromise,resolve:doneResolve,reject:doneReject,}=Promise.withResolvers();const doneTimeout=timeout(250);return{"in_args":(async function*(){await Promise.race([donePromise,doneTimeout]);yield*innerRunTypeQuery(parsedQuery.elems,[],"elems",currentCrate);})(),"returned":(async function*(){await Promise.race([donePromise,doneTimeout]);yield*innerRunTypeQuery([],parsedQuery.elems,"returned",currentCrate);})(),"others":(async function*(){try{yield*innerRunNameQuery(currentCrate);doneResolve(null);}catch(e){doneReject(e);throw e;}})(),"query":parsedQuery,};}else if(parsedQuery.error!==null){return{"in_args":(async function*(){})(),"returned":(async function*(){})(),"others":innerRunNameQuery(currentCrate),"query":parsedQuery,};}else{const typeInfo=parsedQuery.elems.length===0?"returned":(parsedQuery.returned.length===0?"elems":"sig");return{"in_args":(async function*(){})(),"returned":(async function*(){})(),"others":parsedQuery.foundElems===0?(async function*(){})():innerRunTypeQuery(parsedQuery.elems,parsedQuery.returned,typeInfo,currentCrate,),"query":parsedQuery,};}}}let docSearch;const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias","","attribute",];let currentResults;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true;}else{removeClass(elem,"selected");}iter+=1;});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true;}else{removeClass(elem,"active");}iter+=1;});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden");}else{addClass(correctionsElem[0],"hidden");}}else if(nb!==0){printTab(0);}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates);}return getNakedUrl()+extra+window.location.hash;}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"){return elem.value;}return null;}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;window.searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult();}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target&&target instanceof HTMLElement){target.focus();}}async function addTab(results,query,display,finishedCallback,isTypeSearch){const extraClass=display?" active":"";let output=document.createElement("ul");output.className="search-results "+extraClass;let count=0;const descList=[];const addNextResultToOutput=async obj=>{count+=1;const name=obj.item.name;const type=itemTypes[obj.item.ty];const longType=longItemTypes[obj.item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=obj.href;const resultName=document.createElement("span");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(obj.alias!==undefined){alias=`
\ +${obj.alias} - see \ +
`;}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${obj.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";obj.desc.then(desc=>{if(desc!==null){description.insertAdjacentHTML("beforeend",desc);}});descList.push(obj.desc);if(obj.displayTypeSignature){const{type,mappedNames,whereClause}=await obj.displayTypeSignature;const displayType=document.createElement("div");type.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));displayType.appendChild(highlight);}else{displayType.appendChild(document.createTextNode(value));}});if(mappedNames.size>0||whereClause.size>0){let addWhereLineFn=()=>{const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode("where"));displayType.appendChild(line);addWhereLineFn=()=>{};};for(const[qname,name]of mappedNames){if(name===qname){continue;}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${qname} matches `));const lineStrong=document.createElement("strong");lineStrong.appendChild(document.createTextNode(name));line.appendChild(lineStrong);displayType.appendChild(line);}for(const[name,innerType]of whereClause){if(innerType.length<=1){continue;}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${name}: `));innerType.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));line.appendChild(highlight);}else{line.appendChild(document.createTextNode(value));}});displayType.appendChild(line);}}displayType.className="type-signature";link.appendChild(displayType);}link.appendChild(description);output.appendChild(link);results.next().then(async nextResult=>{if(nextResult.value){addNextResultToOutput(nextResult.value);}else{await Promise.all(descList);yieldToBrowser().then(()=>finishedCallback(count,output));}});};const firstResult=await results.next();let correctionOutput="";if(query.correction!==null&&isTypeSearch){const orig=query.returned.length>0?query.returned[0].name:query.elems[0].name;correctionOutput="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${query.correction}" instead.

`;}if(query.proposeCorrectionFrom!==null&&isTypeSearch){const orig=query.proposeCorrectionFrom;const targ=query.proposeCorrectionTo;correctionOutput="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`;}if(firstResult.value){if(correctionOutput!==""){const h3=document.createElement("h3");h3.innerHTML=correctionOutput;output.appendChild(h3);}await addNextResultToOutput(firstResult.value);}else{output=document.createElement("div");if(correctionOutput!==""){const h3=document.createElement("h3");h3.innerHTML=correctionOutput;output.appendChild(h3);}output.className="search-failed"+extraClass;const dlroChannel=`https://doc.rust-lang.org/${getVar("channel")}`;if(query.userQuery!==""){output.innerHTML+="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:";}output.innerHTML+="Example searches:";yieldToBrowser().then(()=>finishedCallback(0,output));}return output;}function makeTab(tabNb,text,results,query,isTypeSearch,goToFirst){const isCurrentTab=window.searchState.currentTab===tabNb;const tabButton=document.createElement("button");tabButton.appendChild(document.createTextNode(text));tabButton.className=isCurrentTab?"selected":"";const tabCount=document.createElement("span");tabCount.className="count loading";tabCount.innerHTML="\u{2007}(\u{2007})\u{2007}\u{2007}";tabButton.appendChild(tabCount);return[tabButton,addTab(results,query,isCurrentTab,(count,output)=>{const search=window.searchState.outputElement();const error=query.error;if(count===0&&error!==null&&search){error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`;}else{error[index]=value;}});const errorReport=document.createElement("h3");errorReport.className="error";errorReport.innerHTML=`Query parser error: "${error.join("")}".`;search.insertBefore(errorReport,search.firstElementChild);}else if(goToFirst||(count===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};window.searchState.removeQueryParameters();const a=output.querySelector("a");if(a){a.click();return;}}const fmtNbElems=count<10?`\u{2007}(${count})\u{2007}\u{2007}`:count<100?`\u{2007}(${count})\u{2007}`:`\u{2007}(${count})`;tabCount.innerHTML=fmtNbElems;tabCount.className="count";},isTypeSearch),];}async function showResults(docSearch,results,goToFirst,filterCrates){const search=window.searchState.outputElement();if(!search){return;}let crates="";const crateNames=await docSearch.getCrateNameList();if(crateNames.length>1){crates=" in 
"+"
";}nonnull(document.querySelector(".search-switcher")).innerHTML=`Search results${crates}`;const tabs=[];searchState.currentTab=0;if(results.query.error!==null){tabs.push(makeTab(0,"In Names",results.others,results.query,false,goToFirst));}else if(results.query.foundElems<=1&&results.query.returned.length===0&&!results.query.hasReturnArrow){tabs.push(makeTab(0,"In Names",results.others,results.query,false,goToFirst));tabs.push(makeTab(1,"In Parameters",results.in_args,results.query,true,false));tabs.push(makeTab(2,"In Return Types",results.returned,results.query,true,false));}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";tabs.push(makeTab(0,signatureTabTitle,results.others,results.query,true,goToFirst));}const tabsElem=document.createElement("div");tabsElem.id="search-tabs";const resultsElem=document.createElement("div");resultsElem.id="results";search.innerHTML="";for(const[tab,output]of tabs){tabsElem.appendChild(tab);const placeholder=document.createElement("div");output.then(output=>{if(placeholder.parentElement){placeholder.parentElement.replaceChild(output,placeholder);}});resultsElem.appendChild(placeholder);}if(window.searchState.rustdocToolbar){nonnull(nonnull(window.searchState.containerElement()).querySelector(".main-heading"),).appendChild(window.searchState.rustdocToolbar);}const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate);}search.appendChild(tabsElem);search.appendChild(resultsElem);window.searchState.showResults();window.searchState.focusedByTab=[null,null,null];let i=0;for(const elem of tabsElem.childNodes){const j=i;elem.onclick=()=>printTab(j);window.searchState.focusedByTab[i]=null;i+=1;}printTab(0);}function updateSearchHistory(url){const btn=document.querySelector("#search-button a");if(btn instanceof HTMLAnchorElement){btn.href=url;}if(!browserSupportsHistoryApi()){return;}const params=searchState.getQueryStringParams();if(!history.state&¶ms.search===undefined){history.pushState(null,"",url);}else{history.replaceState(null,"",url);}}async function search(forced){const query=DocSearch.parseQuery(nonnull(window.searchState.inputElement()).value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch();}return;}currentResults=query.userQuery;searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"];}if(filterCrates!==null&&(await docSearch.getCrateNameList()).indexOf(filterCrates)===-1){filterCrates=null;}searchState.title="\""+query.userQuery+"\" Search - Rust";updateSearchHistory(buildUrl(query.userQuery,filterCrates));await showResults(docSearch,await docSearch.execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates);}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search();}function putBackSearch(){const search_input=window.searchState.inputElement();if(!search_input){return;}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()));}document.title=searchState.title;}}function registerSearchEvents(){const params=searchState.getQueryStringParams();const inputElement=nonnull(window.searchState.inputElement());if(inputElement.value===""){inputElement.value=params.search||"";}const searchAfter500ms=()=>{searchState.clearInputTimeout();window.searchState.timeout=setTimeout(search,500);};inputElement.onkeyup=searchAfter500ms;inputElement.oninput=searchAfter500ms;if(inputElement.form){inputElement.form.onsubmit=onSearchSubmit;}inputElement.onchange=e=>{if(e.target!==document.activeElement){return;}searchState.clearInputTimeout();setTimeout(search,0);};inputElement.onpaste=inputElement.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(!(e instanceof KeyboardEvent)){return;}if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return;}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus();}else{searchState.focus();}e.preventDefault();}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus();}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault();}});inputElement.addEventListener("focus",()=>{putBackSearch();});}function updateCrate(ev){if(ev.target.value==="all crates"){const query=nonnull(window.searchState.inputElement()).value.trim();updateSearchHistory(buildUrl(query,null));}currentResults=null;search(true);}const makeUint8ArrayFromBase64=Uint8Array.fromBase64?Uint8Array.fromBase64:(string=>{const bytes_as_string=atob(string);const l=bytes_as_string.length;const bytes=new Uint8Array(l);for(let i=0;i{removeClass(form,"loading");});registerSearchEvents();if(window.searchState.getQueryStringParams().search!==undefined){search();}}else if(typeof exports!=="undefined"){docSearch=new DocSearch(ROOT_PATH,database);return{docSearch,DocSearch};}};if(typeof window!=="undefined"){const ROOT_PATH=window.rootPath;let databaseCallbacks=null;initSearch(window.Stringdex,window.RoaringBitmap,{loadRoot:callbacks=>{for(const key in callbacks){if(Object.hasOwn(callbacks,key)){window[key]=callbacks[key];}}databaseCallbacks=callbacks;if(window.searchIndex){window.rr_(window.searchIndex);}},loadTreeByHash:hashHex=>{const script=document.createElement("script");script.src=`${ROOT_PATH}search.index/${hashHex}.js`;script.onerror=e=>{if(databaseCallbacks){databaseCallbacks.err_rn_(hashHex,e);}};document.documentElement.appendChild(script);},loadDataByNameAndHash:(name,hashHex)=>{const script=document.createElement("script");script.src=`${ROOT_PATH}search.index/${name}/${hashHex}.js`;script.onerror=e=>{if(databaseCallbacks){databaseCallbacks.err_rd_(hashHex,e);}};document.documentElement.appendChild(script);},});}else if(typeof exports!=="undefined"){exports.initSearch=initSearch;} \ No newline at end of file diff --git a/docs/doc/static.files/settings-c38705f0.js b/docs/doc/static.files/settings-c38705f0.js new file mode 100644 index 0000000..7e4939e --- /dev/null +++ b/docs/doc/static.files/settings-c38705f0.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem);}updateLocalStorage(settingName,""+value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){const f=window.rustdoc_add_line_numbers_to_examples;if(f!==undefined){f();}}else{const f=window.rustdoc_remove_line_numbers_from_examples;if(f!==undefined){f();}}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar");}else{removeClass(document.documentElement,"hide-sidebar");}break;case"hide-toc":if(value===true){addClass(document.documentElement,"hide-toc");}else{removeClass(document.documentElement,"hide-toc");}break;case"hide-modnav":if(value===true){addClass(document.documentElement,"hide-modnav");}else{removeClass(document.documentElement,"hide-modnav");}break;case"sans-serif-fonts":if(value===true){addClass(document.documentElement,"sans-serif");}else{removeClass(document.documentElement,"sans-serif");}break;case"word-wrap-source-code":if(value===true){addClass(document.documentElement,"word-wrap-source-code");}else{removeClass(document.documentElement,"word-wrap-source-code");}break;}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden");}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden");}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark();}else{hideLightAndDark();}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true";}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked);};});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference";}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value;}elem.addEventListener("change",()=>{changeSetting(elem.name,elem.value);});},);}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `;});output+=`\ +
+
`;}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`;}}return output;}function buildSettingsPage(){const theme_list=getVar("themes");const theme_names=(theme_list===null?"":theme_list).split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Hide table of contents","js_name":"hide-toc","default":false,},{"name":"Hide module navigation","js_name":"hide-modnav","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},{"name":"Use sans serif fonts","js_name":"sans-serif-fonts","default":false,},{"name":"Word wrap source code","js_name":"word-wrap-source-code","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover";}el.innerHTML=innerHTML;if(isSettingsPage){const mainElem=document.getElementById(MAIN_ID);if(mainElem!==null){mainElem.appendChild(el);}}else{el.setAttribute("tabindex","-1");onEachLazy(document.querySelectorAll(".settings-menu"),menu=>{if(menu.offsetWidth!==0){menu.appendChild(el);return true;}});}return el;}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(document.querySelectorAll(".settings-menu"),menu=>{if(menu.offsetWidth!==0){if(!menu.contains(settingsMenu)&&settingsMenu.parentElement){settingsMenu.parentElement.removeChild(settingsMenu);menu.appendChild(settingsMenu);}return true;}});onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked;}});}function settingsBlurHandler(event){const isInPopover=onEachLazy(document.querySelectorAll(".settings-menu, .help-menu"),menu=>{return menu.contains(document.activeElement)||menu.contains(event.relatedTarget);},);if(!isInPopover){window.hidePopoverMenus();}}if(!isSettingsPage){const settingsMenu=nonnull(document.getElementById("settings"));onEachLazy(document.querySelectorAll(".settings-menu"),settingsButton=>{settingsButton.querySelector("a").onclick=event=>{if(!(event.target instanceof Element)||settingsMenu.contains(event.target)){return;}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals(false);if(shouldDisplaySettings){displaySettings();}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;});onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler;});settingsMenu.onblur=settingsBlurHandler;}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings();}onEachLazy(document.querySelectorAll(".settings-menu"),settingsButton=>{removeClass(settingsButton,"rotate");});},0);})(); \ No newline at end of file diff --git a/docs/doc/static.files/src-script-813739b1.js b/docs/doc/static.files/src-script-813739b1.js new file mode 100644 index 0000000..bf54625 --- /dev/null +++ b/docs/doc/static.files/src-script-813739b1.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false");};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true");};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar();}else{window.rustdocShowSourceSidebar();}};function createSrcSidebar(srcIndexStr){const container=nonnull(document.querySelector("nav.sidebar"));const sidebar=document.createElement("div");sidebar.id="src-sidebar";const srcIndex=new Map(JSON.parse(srcIndexStr));let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile);}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus();}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return;}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10);}if(to{removeClass(e,"line-highlighted");});for(let i=from;i<=to;++i){elem=document.getElementById(""+i);if(!elem){break;}addClass(elem,"line-highlighted");}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,"","#"+name);highlightSrcLines();}else{location.replace("#"+name);}window.scrollTo(x,y);};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return;}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp;}set_fragment(prev_line_id+"-"+cur_line_id);}else{prev_line_id=cur_line_id;set_fragment(""+cur_line_id);}};}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.querySelectorAll("a[data-nosnippet]"),el=>{el.addEventListener("click",handleSrcHighlight);});highlightSrcLines();window.createSrcSidebar=createSrcSidebar;})(); \ No newline at end of file diff --git a/docs/doc/static.files/storage-e2aeef58.js b/docs/doc/static.files/storage-e2aeef58.js new file mode 100644 index 0000000..fb76ad5 --- /dev/null +++ b/docs/doc/static.files/storage-e2aeef58.js @@ -0,0 +1,27 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=(function(){const currentTheme=document.getElementById("themeStyle");return currentTheme instanceof HTMLLinkElement?currentTheme:null;})();const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null;})();function nonnull(x,msg){if(x===null){throw(msg||"unexpected null value!");}else{return x;}}function nonundef(x,msg){if(x===undefined){throw(msg||"unexpected null value!");}else{return x;}}function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def;}}return current;}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return!!elem&&!!elem.classList&&elem.classList.contains(className);}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className);}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className);}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true;}}return false;}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func);}function updateLocalStorage(name,value){try{if(value===null){window.localStorage.removeItem("rustdoc-"+name);}else{window.localStorage.setItem("rustdoc-"+name,value);}}catch{}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name);}catch{return null;}}function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.getAttribute("data-"+name):null;}function switchTheme(newThemeName,saveTheme){const themeNames=(getVar("themes")||"").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(newThemeName===null||themeNames.indexOf(newThemeName)===-1){return;}if(saveTheme){updateLocalStorage("theme",newThemeName);}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme&&window.currentTheme.parentNode){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null;}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=(function(){const currentTheme=document.getElementById("themeStyle");return currentTheme instanceof HTMLLinkElement?currentTheme:null;})();}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme);}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref;}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true);}else{switchTheme(getSettingValue("theme"),false);}}mql.addEventListener("change",updateTheme);return updateTheme;})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&localStoredTheme!==null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme);}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded");}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar");}if(getSettingValue("hide-toc")==="true"){addClass(document.documentElement,"hide-toc");}if(getSettingValue("hide-modnav")==="true"){addClass(document.documentElement,"hide-modnav");}if(getSettingValue("sans-serif-fonts")==="true"){addClass(document.documentElement,"sans-serif");}if(getSettingValue("word-wrap-source-code")==="true"){addClass(document.documentElement,"word-wrap-source-code");}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",);}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",);}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0);}});class RustdocToolbarElement extends HTMLElement{constructor(){super();}connectedCallback(){if(this.firstElementChild){return;}const rootPath=getVar("root-path");const currentUrl=window.location.href.split("?")[0].split("#")[0];this.innerHTML=` +
+ Search +
+
+ Settings +
+
+ Help +
+ `;}}window.customElements.define("rustdoc-toolbar",RustdocToolbarElement);class RustdocTopBarElement extends HTMLElement{constructor(){super();}connectedCallback(){const rootPath=getVar("root-path");const tmplt=document.createElement("template");tmplt.innerHTML=` + + + + + `;const shadow=this.attachShadow({mode:"open"});shadow.appendChild(tmplt.content.cloneNode(true));this.innerHTML+=` + +
+ Settings +
+
+ Help +
+ `;}}window.customElements.define("rustdoc-topbar",RustdocTopBarElement); \ No newline at end of file diff --git a/docs/doc/static.files/stringdex-c3e638e9.js b/docs/doc/static.files/stringdex-c3e638e9.js new file mode 100644 index 0000000..dbf1e08 --- /dev/null +++ b/docs/doc/static.files/stringdex-c3e638e9.js @@ -0,0 +1,2 @@ +const EMPTY_UINT8=new Uint8Array();class RoaringBitmap{constructor(u8array,startingOffset){const start=startingOffset?startingOffset:0;let i=start;this.keysAndCardinalities=EMPTY_UINT8;this.containers=[];this.consumed_len_bytes=0;if(u8array===null||u8array.length===i||u8array[i]===0){return this;}else if(u8array[i]>0xf0){const lspecial=u8array[i]&0x0f;this.keysAndCardinalities=new Uint8Array(lspecial*4);let pspecial=i+1;let key=u8array[pspecial+2]|(u8array[pspecial+3]<<8);let value=u8array[pspecial]|(u8array[pspecial+1]<<8);let entry=(key<<16)|value;let container;container=new RoaringBitmapArray(1,new Uint8Array(4));container.array[0]=value&0xFF;container.array[1]=(value>>8)&0xFF;this.containers.push(container);this.keysAndCardinalities[0]=key;this.keysAndCardinalities[1]=key>>8;pspecial+=4;for(let ispecial=1;ispecial>16;container=this.addToArrayAt(key);const cardinalityOld=container.cardinality;container.array[cardinalityOld*2]=value&0xFF;container.array[(cardinalityOld*2)+1]=(value>>8)&0xFF;container.cardinality=cardinalityOld+1;pspecial+=2;}this.consumed_len_bytes=pspecial-i;return this;}else if(u8array[i]<0x3a){const lspecial=u8array[i];this.keysAndCardinalities=new Uint8Array(lspecial*4);let pspecial=i+1;for(let ispecial=0;ispecial>8)&0xFF;container.cardinality=cardinalityOld+1;pspecial+=4;}this.consumed_len_bytes=pspecial-i;return this;}const has_runs=u8array[i]===0x3b;if(u8array[i]!==0x3a&&u8array[i]!==0x3b){throw new Error("not a roaring bitmap: "+u8array[i]);}const size=has_runs?((u8array[i+2]|(u8array[i+3]<<8))+1):((u8array[i+4]|(u8array[i+5]<<8)|(u8array[i+6]<<16)|(u8array[i+7]<<24)));i+=has_runs?4:8;let is_run;if(has_runs){const is_run_len=(size+7)>>3;is_run=new Uint8Array(u8array.buffer,i+u8array.byteOffset,is_run_len);i+=is_run_len;}else{is_run=EMPTY_UINT8;}this.keysAndCardinalities=u8array.subarray(i,i+(size*4));i+=size*4;let offsets=null;if(!has_runs||size>=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,new Uint8Array(u8array.buffer,i+u8array.byteOffset,runcount*4),));i+=runcount*4;}else if(cardinality>=4096){this.containers.push(new RoaringBitmapBits(new Uint8Array(u8array.buffer,i+u8array.byteOffset,8192,)));i+=8192;}else{const end=cardinality*2;this.containers.push(new RoaringBitmapArray(cardinality,new Uint8Array(u8array.buffer,i+u8array.byteOffset,end),));i+=end;}}this.consumed_len_bytes=i-start;}static makeSingleton(number){const result=new RoaringBitmap(null,0);result.keysAndCardinalities=Uint8Array.of((number>>16),(number>>24),0,0,);result.containers.push(new RoaringBitmapArray(1,Uint8Array.of(number,number>>8),));return result;}static everything(){if(EVERYTHING_BITMAP.isEmpty()){let i=0;const l=1<<16;const everything_range=new RoaringBitmapRun(1,Uint8Array.of(0,0,0xff,0xff));EVERYTHING_BITMAP.keysAndCardinalities=new Uint8Array(l*4);while(i>8;EVERYTHING_BITMAP.keysAndCardinalities[(i*4)+2]=0xff;EVERYTHING_BITMAP.keysAndCardinalities[(i*4)+3]=0xff;i+=1;}}return EVERYTHING_BITMAP;}static empty(){return EMPTY_BITMAP;}isEmpty(){return this.containers.length===0;}addToArrayAt(key){let mid=this.getContainerId(key);let container;if(mid===-1){container=new RoaringBitmapArray(0,new Uint8Array(2));mid=this.containers.length;this.containers.push(container);if(mid*4>this.keysAndCardinalities.length){const keysAndContainers=new Uint8Array(mid*8);keysAndContainers.set(this.keysAndCardinalities);this.keysAndCardinalities=keysAndContainers;}this.keysAndCardinalities[(mid*4)+0]=key;this.keysAndCardinalities[(mid*4)+1]=key>>8;}else{container=this.containers[mid];const cardinalityOld=this.keysAndCardinalities[(mid*4)+2]|(this.keysAndCardinalities[(mid*4)+3]<<8);const cardinality=cardinalityOld+1;this.keysAndCardinalities[(mid*4)+2]=cardinality;this.keysAndCardinalities[(mid*4)+3]=cardinality>>8;}const cardinalityOld=this.keysAndCardinalities[(mid*4)+2]|(this.keysAndCardinalities[(mid*4)+3]<<8);if(!(container instanceof RoaringBitmapArray)||container.array.byteLength<((cardinalityOld+1)*2)){const newBuf=new Uint8Array((cardinalityOld+1)*4);let idx=0;for(const cvalue of container.values()){newBuf[idx]=cvalue&0xFF;newBuf[idx+1]=(cvalue>>8)&0xFF;idx+=2;}if(container instanceof RoaringBitmapArray){container.cardinality=cardinalityOld;container.array=newBuf;return container;}const newcontainer=new RoaringBitmapArray(cardinalityOld,newBuf);this.containers[mid]=newcontainer;return newcontainer;}else{return container;}}union(that){if(this.isEmpty()){return that;}if(that.isEmpty()){return this;}if(this===RoaringBitmap.everything()||that===RoaringBitmap.everything()){return RoaringBitmap.everything();}let i=0;const il=this.containers.length;let j=0;const jl=that.containers.length;const result=new RoaringBitmap(null,0);result.keysAndCardinalities=new Uint8Array((il+jl)*4);while(i=jl||(i=il||(jthatContainer.array.length?thisContainer.array.length:thatContainer.array.length,);let k=0;const kl=resultArray.length;while(k>8)&0xFF;k+=2;}result.containers.push(new RoaringBitmapArray(resultValues.length,resultArray,));card=resultValues.length;}result.keysAndCardinalities[k+0]=this.keysAndCardinalities[ik+0];result.keysAndCardinalities[k+1]=this.keysAndCardinalities[ik+1];card-=1;result.keysAndCardinalities[k+2]=card;result.keysAndCardinalities[k+3]=card>>8;i+=1;j+=1;}}return result;}intersection(that){if(this.isEmpty()||that.isEmpty()){return EMPTY_BITMAP;}if(this===RoaringBitmap.everything()){return that;}if(that===RoaringBitmap.everything()){return this;}let i=0;const il=this.containers.length;let j=0;const jl=that.containers.length;const result=new RoaringBitmap(null,0);result.keysAndCardinalities=new Uint8Array((il>jl?il:jl)*4);while(i=jl||(i=il||(jthatContainer.array.length?thisContainer.array.length:thatContainer.array.length,);let k=0;const kl=resultArray.length;while(k>8)&0xFF;k+=2;}result.containers.push(new RoaringBitmapArray(resultValues.length,resultArray,));}}if(card!==0){result.keysAndCardinalities[k+0]=this.keysAndCardinalities[ik+0];result.keysAndCardinalities[k+1]=this.keysAndCardinalities[ik+1];card-=1;result.keysAndCardinalities[k+2]=card;result.keysAndCardinalities[k+3]=card>>8;}i+=1;j+=1;}}return result;}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;const mid=this.getContainerId(key);return mid===-1?false:this.containers[mid].contains(value);}remove(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;const mid=this.getContainerId(key);if(mid===-1){return this;}const container=this.containers[mid];if(!container.contains(value)){return this;}const newCardinality=(this.keysAndCardinalities[(mid*4)+2]|(this.keysAndCardinalities[(mid*4)+3]<<8));const l=this.containers.length;const m=l-(newCardinality===0?1:0);const result=new RoaringBitmap(null,0);result.keysAndCardinalities=new Uint8Array(m*4);let j=0;for(let i=0;i>8;const card=newCardinality-1;result.keysAndCardinalities[(j*4)+2]=card;result.keysAndCardinalities[(j*4)+3]=card>>8;const newContainer=new RoaringBitmapArray(newCardinality,new Uint8Array(newCardinality*2),);let newContainerSlot=0;for(const containerValue of container.values()){if(containerValue!==value){newContainer.array[newContainerSlot]=value&0xFF;newContainerSlot+=1;newContainer.array[newContainerSlot]=value>>8;newContainerSlot+=1;}}result.containers.push(newContainer);j+=1;}}else{result.keysAndCardinalities[(j*4)+0]=this.keysAndCardinalities[(i*4)+0];result.keysAndCardinalities[(j*4)+1]=this.keysAndCardinalities[(i*4)+1];result.keysAndCardinalities[(j*4)+2]=this.keysAndCardinalities[(i*4)+2];result.keysAndCardinalities[(j*4)+3]=this.keysAndCardinalities[(i*4)+3];result.containers.push(this.containers[i]);j+=1;}}return result;}getContainerId(key){let left=0;let right=this.containers.length-1;while(left<=right){const mid=Math.floor((left+right)/2);const x=this.keysAndCardinalities[(mid*4)]|(this.keysAndCardinalities[(mid*4)+1]<<8);if(xkey){right=mid-1;}else{return mid;}}return-1;}*entries(){const l=this.containers.length;for(let i=0;i>1;const i=mid*4;const start=this.array[i]|(this.array[i+1]<<8);const lenm1=this.array[i+2]|(this.array[i+3]<<8);if((start+lenm1)value){right=mid-1;}else{return true;}}return false;}*values(){let i=0;while(i>1;const i=mid*2;const x=this.array[i]|(this.array[i+1]<<8);if(xvalue){right=mid-1;}else{return true;}}return false;}*values(){let i=0;const l=this.cardinality*2;while(i>3]&(1<<(value&7)));}*values(){let i=0;const l=this.array.length<<3;while(i=this.values.length*9){const keys=this.keys;const values=this.values;const l=values.length;this.capacityClass+=1;const capacity=1<otherDistance){const otherKey=keys.slice(j,j+6);values[slot]=value;value=otherValue;keys[j+0]=key[start+0];keys[j+1]=key[start+1];keys[j+2]=key[start+2];keys[j+3]=key[start+3];keys[j+4]=key[start+4];keys[j+5]=key[start+5];key=otherKey;start=0;distance=otherDistance;}distance+=1;slot=(slot+1)&mask;}}}get(key){if(key.length!==6){throw"invalid key";}return this.getWithOffsetKey(key,0);}getWithOffsetKey(key,start){const mask=~(0xffffffff<otherDistance){break;}}slot=(slot+1)&mask;}return undefined;}}function bitCount(n){n=(~~n)-((n>>1)&0x55555555);n=(n&0x33333333)+((n>>2)&0x33333333);return((n+(n>>4)&0xF0F0F0F)*0x1010101)>>24;}class Uint8ArraySearchPattern{constructor(needle){this.needle=needle;this.skipTable=[];const m=needle.length;for(let i=0;i<256;i+=1){this.skipTable.push(m);}for(let i=0;i=m){for(let i=m-1;i>=0;i-=1){if(haystack[skip+i]!==needle[i]){skip+=skipTable[haystack[skip+m-1]];continue search;}}return true;}return false;}}function loadDatabase(hooks){const callbacks={rr_:function(data){const dataObj=JSON.parse(data);for(const colName of Object.keys(dataObj)){if(Object.hasOwn(dataObj[colName],"N")){const counts=[];const countsstring=dataObj[colName]["N"];let i=0;const l=countsstring.length;while(i>4)&0x0f));const id3=id2+(((nodeid[4]&0x0f)<<8)|nodeid[5]);leaves=RoaringBitmap.makeSingleton(id1).union(RoaringBitmap.makeSingleton(id2)).union(RoaringBitmap.makeSingleton(id3));}else{leaves=RoaringBitmap.makeSingleton((nodeid[2]<<24)|(nodeid[3]<<16)|(nodeid[4]<<8)|nodeid[5],);}if(isWhole){const data=(nodeid[0]&0x20)!==0?Uint8Array.of(((nodeid[0]&0x0f)<<4)|(nodeid[1]>>4)):EMPTY_UINT8;newPromise=Promise.resolve(new PrefixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,EMPTY_SEARCH_TREE_BRANCHES,data,leaves,EMPTY_BITMAP,));}else{const data=(nodeid[0]&0xf0)===0x80?0:(((nodeid[0]&0x0f)<<4)|(nodeid[1]>>4));newPromise=Promise.resolve(new SuffixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,data,leaves,));}}else{const hashHex=makeHexFromUint8Array(nodeid);newPromise=new Promise((resolve,reject)=>{const cb=registry.searchTreeLoadPromiseCallbacks.get(nodeid);if(cb){registry.searchTreeLoadPromiseCallbacks.set(nodeid,(err,data)=>{cb(err,data);if(data){resolve(data);}else{reject(err);}});}else{registry.searchTreeLoadPromiseCallbacks.set(nodeid,(err,data)=>{if(data){resolve(data);}else{reject(err);}});hooks.loadTreeByHash(hashHex);}});}registry.searchTreePromises.set(nodeid,newPromise);return newPromise;},dataLoadByNameAndHash:function(name,hash){const existingBucket=registry.dataColumnsBuckets.get(hash);if(existingBucket){return existingBucket;}const hashHex=makeHexFromUint8Array(hash);const newBucket=new Promise((resolve,reject)=>{const cb=registry.dataColumnLoadPromiseCallbacks.get(hash);if(cb){registry.dataColumnLoadPromiseCallbacks.set(hash,(err,data)=>{cb(err,data);if(data){resolve(data);}else{reject(err);}});}else{registry.dataColumnLoadPromiseCallbacks.set(hash,(err,data)=>{if(data){resolve(data);}else{reject(err);}});hooks.loadDataByNameAndHash(name,hashHex);}});registry.dataColumnsBuckets.set(hash,newBucket);return newBucket;},};class SearchTreeBranches{constructor(length,nodeids){this.nodeids=nodeids;this.subtrees=[];for(let i=0;i=this.keys[i]){throw new Error("HERE");}i+=1;}}*entries(){let i=0;const l=this.keys.length;while(i>1;if(this.keys[mid]k){right=mid-1;}else{return mid;}}return-1;}getKey(i){return this.keys[i];}getKeys(){return this.keys;}}const EMPTY_SEARCH_TREE_BRANCHES=new SearchTreeBranchesArray(EMPTY_UINT8,EMPTY_UINT8,);const SHORT_ALPHABITMAP_CHARS=[];for(let i=0x61;i<=0x7A;++i){if(i===0x76||i===0x71){continue;}SHORT_ALPHABITMAP_CHARS.push(i);}const LONG_ALPHABITMAP_CHARS=[0x31,0x32,0x33,0x34,0x35,0x36];for(let i=0x61;i<=0x7A;++i){LONG_ALPHABITMAP_CHARS.push(i);}function makeSearchTreeBranchesAlphaBitmapClass(alphabitmap_chars,width){const bitwidth=width*8;const cls=class SearchTreeBranchesAlphaBitmap extends SearchTreeBranches{constructor(bitmap,nodeids){super(nodeids.length/6,nodeids);if(nodeids.length/6!==bitCount(bitmap)){throw new Error(`mismatch ${bitmap} ${nodeids}`);}this.bitmap=bitmap;this.nodeids=nodeids;}*entries(){let i=0;let j=0;while(i=this.subtrees.length?-1:result;}getKey(branch_index){return this.getKeys()[branch_index];}getKeys(){const length=bitCount(this.bitmap);const result=new Uint8Array(length);let result_index=0;for(let alpha_index=0;alpha_index=6?new Lev2TParametricDescription(w):new Lev1TParametricDescription(w);const stack=[[Promise.resolve(this.trie(dataColumn,searchPattern)),0]];const n=levParams.n;while(stack.length!==0){const[triePromise,levState]=stack.pop();const trie=await triePromise;for(const byte of trie.keysExcludeSuffixOnly()){const levPos=levParams.getPosition(levState);const vector=levParams.getVector(name,byte,levPos,Math.min(w,levPos+(2*n)+1),);const newLevState=levParams.transition(levState,levPos,vector,);if(newLevState>=0){const child=trie.child(byte);if(child){stack.push([child,newLevState]);if(levParams.isAccept(newLevState)){yield child;}}}}}}getCurrentLeaves(){return this.leaves_whole.union(this.leaves_suffix);}}class PrefixTrie{constructor(tree,offset,dataColumn,searchPattern){this.tree=tree;this.offset=offset;this.dataColumn=dataColumn;this.searchPattern=searchPattern;}matches(){if(this.offset===this.tree.data.length){return this.tree.leaves_whole;}else{return EMPTY_BITMAP;}}async*substringMatches(){let layer=[Promise.resolve(this.tree)];while(layer.length){const current_layer=layer;layer=[];for await(const tree of current_layer){let rejected=null;let leaves=tree.getCurrentLeaves();for(const leaf of leaves.entries()){const haystack=await this.dataColumn.at(leaf);if(haystack===undefined||!this.searchPattern.matches(haystack)){if(!rejected){rejected=[];}rejected.push(leaf);}}if(rejected){if(leaves.cardinality()!==rejected.length){for(const rej of rejected){leaves=leaves.remove(rej);}yield leaves;}}else{yield leaves;}}const subnodes=new HashTable();for await(const nodeEncoded of current_layer){const node=nodeEncoded instanceof InlineNeighborsTree?nodeEncoded.decode():nodeEncoded;const branches=node.branches;const l=branches.subtrees.length;for(let i=0;i0&&backlog[backlogSlot].length>1].length){const parentSlot=(backlogSlot-1)>>1;const parent=backlog[parentSlot];backlog[parentSlot]=backlog[backlogSlot];backlog[backlogSlot]=parent;backlogSlot=parentSlot;}}while(backlog.length!==0){const backlogEntry=backlog[0];if(minLength!==null&&backlogEntry.length>minLength){break;}if(!backlogEntry.bitmap.isEmpty()){yield backlogEntry.bitmap;}backlog[0]=backlog[backlog.length-1];backlog.length-=1;let backlogSlot=0;const backlogLength=backlog.length;while(backlogSlot{return node.trie(this.dataColumn,this.searchPattern);})]);i+=1;}return nodes;}else{const codePoint=data[this.offset];const trie=new PrefixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,);return[[codePoint,Promise.resolve(trie)]];}}keysExcludeSuffixOnly(){const data=this.tree.data;if(this.offset===data.length){return this.tree.might_have_prefix_branches.getKeys();}else{return Uint8Array.of(data[this.offset]);}}childrenExcludeSuffixOnly(){const data=this.tree.data;if(this.offset===data.length){const nodes=[];let i=0;for(const[k,v]of this.tree.might_have_prefix_branches.entries()){let node;if(v){node=v;}else{const newnode=this.tree.might_have_prefix_branches.getNodeID(i);if(!newnode){throw new Error(`malformed tree; no node for key ${k}`);}node=registry.searchTreeLoadByNodeID(newnode);this.tree.might_have_prefix_branches.subtrees[i]=node;this.tree.branches.subtrees[this.tree.branches.getIndex(k)]=node;}nodes.push([k,node.then(node=>{return node.trie(this.dataColumn,this.searchPattern);})]);i+=1;}return nodes;}else{const codePoint=data[this.offset];const trie=new PrefixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,);return[[codePoint,Promise.resolve(trie)]];}}child(byte){if(this.offset===this.tree.data.length){const i=this.tree.branches.getIndex(byte);if(i!==-1){let branch=this.tree.branches.subtrees[i];if(branch===null){const newnode=this.tree.branches.getNodeID(i);if(!newnode){throw new Error(`malformed tree; no node for key ${byte}`);}branch=registry.searchTreeLoadByNodeID(newnode);this.tree.branches.subtrees[i]=branch;const mhpI=this.tree.might_have_prefix_branches.getIndex(byte);if(mhpI!==-1){this.tree.might_have_prefix_branches.subtrees[mhpI]=branch;}}return branch.then(branch=>branch.trie(this.dataColumn,this.searchPattern));}}else if(this.tree.data[this.offset]===byte){return Promise.resolve(new PrefixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,));}return null;}}class SuffixSearchTree{constructor(branches,dataLen,leaves_suffix,){this.branches=branches;this.dataLen=dataLen;this.leaves_suffix=leaves_suffix;}trie(dataColumn,searchPattern){return new SuffixTrie(this,0,dataColumn,searchPattern);}async search(name,dataColumn){if(typeof name==="string"){const utf8encoder=new TextEncoder();name=utf8encoder.encode(name);}const searchPattern=new Uint8ArraySearchPattern(name);let trie=this.trie(dataColumn,searchPattern);for(const datum of name){const newTrie=trie.child(datum);if(newTrie){trie=await newTrie;}else{return null;}}return trie;}async*searchLev(_name,_dataColumn){}getCurrentLeaves(){return this.leaves_suffix;}}class SuffixTrie{constructor(tree,offset,dataColumn,searchPattern){this.tree=tree;this.offset=offset;this.dataColumn=dataColumn;this.searchPattern=searchPattern;}matches(){return EMPTY_BITMAP;}async*substringMatches(){let layer=[Promise.resolve(this.tree)];while(layer.length){const current_layer=layer;layer=[];for await(const tree of current_layer){let rejected=null;let leaves=tree.getCurrentLeaves();for(const leaf of leaves.entries()){const haystack=await this.dataColumn.at(leaf);if(haystack===undefined||!this.searchPattern.matches(haystack)){if(!rejected){rejected=[];}rejected.push(leaf);}}if(rejected){if(leaves.cardinality()!==rejected.length){for(const rej of rejected){leaves=leaves.remove(rej);}yield leaves;}}else{yield leaves;}}const subnodes=new HashTable();for await(const nodeEncoded of current_layer){const node=nodeEncoded instanceof InlineNeighborsTree?nodeEncoded.decode():nodeEncoded;const branches=node.branches;const l=branches.subtrees.length;for(let i=0;ibranch.trie(this.dataColumn,this.searchPattern));}}else{return Promise.resolve(new SuffixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,));}return null;}}class InlineNeighborsTree{constructor(encoded,start,){this.encoded=encoded;this.start=start;}decode(){let i=this.start;const encoded=this.encoded;const has_branches=(encoded[i]&0x04)!==0;const is_suffixes_only=(encoded[i]&0x01)!==0;let leaves_count=((encoded[i]>>4)&0x0f)+1;i+=1;let branch_count=0;if(has_branches){branch_count=encoded[i]+1;i+=1;}const dlen=encoded[i]&0x3f;if((encoded[i]&0x80)!==0){leaves_count=0;}i+=1;let data=EMPTY_UINT8;if(!is_suffixes_only&&dlen!==0){data=encoded.subarray(i,i+dlen);i+=dlen;}const leaf_value_upper=encoded[i]|(encoded[i+1]<<8);i+=2;const branch_nodes=[];for(let j=0;j>4)&0x0f)+1;i+=1;let branch_data=EMPTY_UINT8;if(!is_suffixes_only&&branch_dlen!==0){branch_data=encoded.subarray(i,i+branch_dlen);i+=branch_dlen;}const branch_leaves=new RoaringBitmap(null);branch_leaves.keysAndCardinalities=Uint8Array.of(leaf_value_upper&0xff,(leaf_value_upper>>8)&0xff,(branch_leaves_count-1)&0xff,((branch_leaves_count-1)>>8)&0xff,);branch_leaves.containers=[new RoaringBitmapArray(branch_leaves_count,encoded.subarray(i,i+(branch_leaves_count*2)),),];i+=branch_leaves_count*2;branch_nodes.push(Promise.resolve(is_suffixes_only?new SuffixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,branch_dlen,branch_leaves,):new PrefixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,EMPTY_SEARCH_TREE_BRANCHES,branch_data,branch_leaves,EMPTY_BITMAP,),));}const branches=branch_count===0?EMPTY_SEARCH_TREE_BRANCHES:new SearchTreeBranchesArray(encoded.subarray(i,i+branch_count),EMPTY_UINT8,);i+=branch_count;branches.subtrees=branch_nodes;let leaves=EMPTY_BITMAP;if(leaves_count!==0){leaves=new RoaringBitmap(null);leaves.keysAndCardinalities=Uint8Array.of(leaf_value_upper&0xff,(leaf_value_upper>>8)&0xff,(leaves_count-1)&0xff,((leaves_count-1)>>8)&0xff,);leaves.containers=[new RoaringBitmapArray(leaves_count,encoded.subarray(i,i+(leaves_count*2)),),];i+=leaves_count*2;}return is_suffixes_only?new SuffixSearchTree(branches,dlen,leaves,):new PrefixSearchTree(branches,branches,data,leaves,EMPTY_BITMAP,);}trie(dataColumn,searchPattern){const tree=this.decode();return tree instanceof SuffixSearchTree?new SuffixTrie(tree,0,dataColumn,searchPattern):new PrefixTrie(tree,0,dataColumn,searchPattern);}search(name,dataColumn){return this.decode().search(name,dataColumn);}searchLev(name,dataColumn){return this.decode().searchLev(name,dataColumn);}getCurrentLeaves(){return this.decode().getCurrentLeaves();}}class DataColumn{constructor(counts,hashes,emptyset,name,searchTree){this.searchTree=searchTree;this.hashes=hashes;this.emptyset=emptyset;this.name=name;this.buckets=[];this.bucket_keys=[];const l=counts.length;let k=0;let totalLength=0;for(let i=0;i=this.bucket_keys.length){return undefined;}else{const start=this.bucket_keys[idx];const bucket=this.buckets[idx];const data=this.buckets[idx].data;if(data===null){return this.atAsyncFetch(id,start,bucket);}else{return data[id-start];}}}}async atAsyncFetch(id,start,bucket){const{hash,end}=bucket;const dataSansEmptysetOrig=await registry.dataLoadByNameAndHash(this.name,hash,);let data=bucket.data;if(data!==null){return data[id-start];}const dataSansEmptyset=[...dataSansEmptysetOrig];let dataWithEmptyset=null;let pos=start;let insertCount=0;while(pos=48&&c<=63){dataSansEmptyset.push(backrefs[c-48]);i+=1;}else{let n=0;while(c<96){n=(n<<4)|(c&0xF);i+=1;c=data[i];}n=(n<<4)|(c&0xF);i+=1;const item=data.subarray(i,i+n);dataSansEmptyset.push(item);i+=n;backrefs.unshift(item);if(backrefs.length>16){backrefs.pop();}}}cb(null,dataSansEmptyset);}}function makeSearchTreeFromBase64(inputBase64){const input=makeUint8ArrayFromBase64(inputBase64);let i=0;const l=input.length;const stash=new HashTable();const hash=Uint8Array.of(0,0,0,0,0,0,0,0);const truncatedHash=new Uint8Array(hash.buffer,2,6);const hash_history=[];const data_history=[];let canonical=EMPTY_UINT8;let tree=new PrefixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,EMPTY_SEARCH_TREE_BRANCHES,EMPTY_UINT8,EMPTY_BITMAP,EMPTY_BITMAP,);function makeBranchesFromBinaryData(input,i,compression_tag,){const is_pure_suffixes_only_node=(compression_tag&0x01)!==0x00;const is_stack_compressed=(compression_tag&0x02)!==0;const is_long_compressed=(compression_tag&0x04)!==0;const all_children_are_compressed=(compression_tag&0xF0)===0xF0&&!is_long_compressed;const any_children_are_compressed=(compression_tag&0xF0)!==0x00||is_long_compressed;const start_point=i;let cplen;let cslen;let alphabitmap=null;if(is_pure_suffixes_only_node){cplen=0;cslen=input[i];i+=1;if(cslen>=0xc0){alphabitmap=SearchTreeBranchesLongAlphaBitmap;cslen=cslen&0x3F;}else if(cslen>=0x80){alphabitmap=SearchTreeBranchesShortAlphaBitmap;cslen=cslen&0x7F;}}else{cplen=input[i];i+=1;cslen=input[i];i+=1;if(cplen===0xff&&cslen===0xff){cplen=0x100;cslen=0;}else if(cplen>=0xc0&&cslen>=0xc0){alphabitmap=SearchTreeBranchesLongAlphaBitmap;cplen=cplen&0x3F;cslen=cslen&0x3F;}else if(cplen>=0x80&&cslen>=0x80){alphabitmap=SearchTreeBranchesShortAlphaBitmap;cplen=cplen&0x7F;cslen=cslen&0x7F;}}let j=0;let cpnodes;if(any_children_are_compressed){cpnodes=cplen===0?EMPTY_UINT8:new Uint8Array(cplen*6);while(j=cplen||(csicsbranches[csi])){branchset[j]=csbranches[csi];const joff=j*6;const csioff=csi*6;hashes[joff+0]=csnodes[csioff+0];hashes[joff+1]=csnodes[csioff+1];hashes[joff+2]=csnodes[csioff+2];hashes[joff+3]=csnodes[csioff+3];hashes[joff+4]=csnodes[csioff+4];hashes[joff+5]=csnodes[csioff+5];csi+=1;}else{branchset[j]=cpbranches[cpi];const joff=j*6;const cpioff=cpi*6;hashes[joff+0]=cpnodes[cpioff+0];hashes[joff+1]=cpnodes[cpioff+1];hashes[joff+2]=cpnodes[cpioff+2];hashes[joff+3]=cpnodes[cpioff+3];hashes[joff+4]=cpnodes[cpioff+4];hashes[joff+5]=cpnodes[cpioff+5];cpi+=1;}j+=1;}branches=new SearchTreeBranchesArray(branchset,hashes);}i+=cslen;}return{consumed_len_bytes:i-start_point,cpbranches,csbranches,cpnodes,csnodes,branches,might_have_prefix_branches,};}while(i>4)&0x0f)+1;const branch_count=is_long_compressed?((compression_tag>>8)&0xff)+1:0;if(is_data_compressed){data=data_history[data_history.length-dlen-1];dlen=data.length;}else if(is_pure_suffixes_only_node){data=EMPTY_UINT8;}else{data=dlen===0?EMPTY_UINT8:new Uint8Array(input.buffer,i+input.byteOffset,dlen);i+=dlen;}const branches_start=i;i+=2;for(let j=0;j>4)&0x0f)+1;i+=1;if(!is_pure_suffixes_only_node){i+=branch_dlen;}i+=branch_leaves_count*2;}i+=branch_count;i+=leaves_count*2;if(is_data_compressed){const clen=(1+(is_long_compressed?1:0)+1+dlen+(i-branches_start));const canonical=new Uint8Array(clen);let ci=0;canonical[ci]=input[start]^ 0x08;ci+=1;if(is_long_compressed){canonical[ci]=input[start+ci];ci+=1;}canonical[ci]=dlen|no_leaves_flag|0x40;ci+=1;for(let j=0;j1){if(is_pure_suffixes_only_node){data=EMPTY_UINT8;}else if(is_data_compressed){data=data_history[data_history.length-dlen-1];dlen=data.length;}else{data=dlen===0?EMPTY_UINT8:new Uint8Array(input.buffer,i+input.byteOffset,dlen);i+=dlen;}const coffset=i;const{cpbranches,csbranches,cpnodes,csnodes,consumed_len_bytes:branches_consumed_len_bytes,branches,might_have_prefix_branches,}=makeBranchesFromBinaryData(input,i,compression_tag);i+=branches_consumed_len_bytes;let whole;let suffix;if(is_pure_suffixes_only_node){if(no_leaves_flag){whole=EMPTY_BITMAP;suffix=EMPTY_BITMAP;}else{suffix=input[i]===0?EMPTY_BITMAP1:new RoaringBitmap(input,i);i+=suffix.consumed_len_bytes;}tree=new SuffixSearchTree(branches,dlen,suffix,);const clen=((is_data_compressed?2:3)+csnodes.length+csbranches.length+suffix.consumed_len_bytes);if(canonical.length{registry.searchTreeRootCallback=(error,data)=>{if(data){resolve(data);}else{reject(error);}};hooks.loadRoot(callbacks);});}if(typeof window!=="undefined"){window.Stringdex={loadDatabase,};window.RoaringBitmap=RoaringBitmap;if(window.StringdexOnload){window.StringdexOnload.forEach(cb=>cb(window.Stringdex));}}else{module.exports.Stringdex={loadDatabase,};module.exports.RoaringBitmap=RoaringBitmap;}const makeUint8ArrayFromBase64=Uint8Array.fromBase64?Uint8Array.fromBase64:(string=>{const bytes_as_string=atob(string);const l=bytes_as_string.length;const bytes=new Uint8Array(l);for(let i=0;i{const alpha={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"a":10,"b":11,"A":10,"B":11,"c":12,"d":13,"C":12,"D":13,"e":14,"f":15,"E":14,"F":15,};const l=string.length>>1;const bytes=new Uint8Array(l);for(let i=0;iarray.toHex()):(array=>{const alpha=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f",];const l=array.length;const v=[];for(let i=0;i>4]);v.push(alpha[array[i]&0xf]);}return v.join("");});function siphashOfBytes(input,k0lo,k0hi,k1lo,k1hi,output){let v0lo=k0lo ^ 0x70736575;let v0hi=k0hi ^ 0x736f6d65;let v1lo=k1lo ^ 0x6e646f6d;let v1hi=k1hi ^ 0x646f7261;let v2lo=k0lo ^ 0x6e657261;let v2hi=k0hi ^ 0x6c796765;let v3lo=k1lo ^ 0x79746573;let v3hi=k1hi ^ 0x74656462;const inputLength=input.length;let inputI=0;const left=inputLength&0x7;let milo=0;let mihi=0;while(inputI>>8;output[5]=(v0lo ^ v1lo ^ v2lo ^ v3lo)>>>16;output[4]=(v0lo ^ v1lo ^ v2lo ^ v3lo)>>>24;output[3]=(v0hi ^ v1hi ^ v2hi ^ v3hi)&0xff;output[2]=(v0hi ^ v1hi ^ v2hi ^ v3hi)>>>8;output[1]=(v0hi ^ v1hi ^ v2hi ^ v3hi)>>>16;output[0]=(v0hi ^ v1hi ^ v2hi ^ v3hi)>>>24;function u8ToU64le(offset,length){const n0=offset>>0)+(v1lo>>>0)>0xffffffff)?1:0))|0;v0lo=(v0lo+v1lo)|0;let v1lo_=v1lo;let v1hi_=v1hi;v1lo=(v1lo_<<13)|(v1hi_>>>19);v1hi=(v1hi_<<13)|(v1lo_>>>19);v1lo ^=v0lo;v1hi ^=v0hi;const v0lo_=v0lo;const v0hi_=v0hi;v0lo=v0hi_;v0hi=v0lo_;v2hi=(v2hi+v3hi+(((v2lo>>>0)+(v3lo>>>0)>0xffffffff)?1:0))|0;v2lo=(v2lo+v3lo)|0;let v3lo_=v3lo;let v3hi_=v3hi;v3lo=(v3lo_<<16)|(v3hi_>>>16);v3hi=(v3hi_<<16)|(v3lo_>>>16);v3lo ^=v2lo;v3hi ^=v2hi;v0hi=(v0hi+v3hi+(((v0lo>>>0)+(v3lo>>>0)>0xffffffff)?1:0))|0;v0lo=(v0lo+v3lo)|0;v3lo_=v3lo;v3hi_=v3hi;v3lo=(v3lo_<<21)|(v3hi_>>>11);v3hi=(v3hi_<<21)|(v3lo_>>>11);v3lo ^=v0lo;v3hi ^=v0hi;v2hi=(v2hi+v1hi+(((v2lo>>>0)+(v1lo>>>0)>0xffffffff)?1:0))|0;v2lo=(v2lo+v1lo)|0;v1lo_=v1lo;v1hi_=v1hi;v1lo=(v1lo_<<17)|(v1hi_>>>15);v1hi=(v1hi_<<17)|(v1lo_>>>15);v1lo ^=v2lo;v1hi ^=v2hi;const v2lo_=v2lo;const v2hi_=v2hi;v2lo=v2hi_;v2hi=v2lo_;}}class ParametricDescription{constructor(w,n,minErrors){this.w=w;this.n=n;this.minErrors=minErrors;}isAccept(absState){const state=Math.floor(absState/(this.w+1));const offset=absState%(this.w+1);return this.w-offset+this.minErrors[state]<=this.n;}getPosition(absState){return absState%(this.w+1);}getVector(name,charCode,pos,end){let vector=0;for(let i=pos;i>5;const bitStart=bitLoc&31;if(bitStart+bitsPerValue<=32){return((data[dataLoc]>>bitStart)&this.MASKS[bitsPerValue-1]);}else{const part=32-bitStart;return ~~(((data[dataLoc]>>bitStart)&this.MASKS[part-1])+((data[1+dataLoc]&this.MASKS[bitsPerValue-part-1])<0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchToSavedTheme()}window.addEventListener("pageshow",function(ev){if(ev.persisted){setTimeout(switchToSavedTheme,0)}}) \ No newline at end of file diff --git a/docs/doc/toggle-minus.svg b/docs/doc/toggle-minus.svg deleted file mode 100644 index 7315478..0000000 --- a/docs/doc/toggle-minus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/doc/toggle-plus.svg b/docs/doc/toggle-plus.svg deleted file mode 100644 index 08b1703..0000000 --- a/docs/doc/toggle-plus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/doc/trait.impl/core/clone/trait.Clone.js b/docs/doc/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 0000000..f1d1436 --- /dev/null +++ b/docs/doc/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Clone for ExampleFlags"],["impl Clone for ExampleField"],["impl Clone for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[934]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/cmp/trait.PartialEq.js b/docs/doc/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..984d4b1 --- /dev/null +++ b/docs/doc/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl PartialEq for ExampleFlags"],["impl PartialEq for ExampleField"],["impl PartialEq for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[958]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/cmp/trait.PartialOrd.js b/docs/doc/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 0000000..90df042 --- /dev/null +++ b/docs/doc/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl PartialOrd for ExampleFlags"],["impl PartialOrd for ExampleField"],["impl PartialOrd for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[967]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/convert/trait.From.js b/docs/doc/trait.impl/core/convert/trait.From.js new file mode 100644 index 0000000..5317759 --- /dev/null +++ b/docs/doc/trait.impl/core/convert/trait.From.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl From<ExampleFlags> for u8"],["impl From<ExampleFlags> for ExampleField"],["impl From<u8> for ExampleFlags"],["impl From<u8> for ExampleField"],["impl From<u8> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2112]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/default/trait.Default.js b/docs/doc/trait.impl/core/default/trait.Default.js new file mode 100644 index 0000000..d0ade54 --- /dev/null +++ b/docs/doc/trait.impl/core/default/trait.Default.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Default for ExampleField"],["impl Default for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[653]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/fmt/trait.Binary.js b/docs/doc/trait.impl/core/fmt/trait.Binary.js new file mode 100644 index 0000000..1c5b157 --- /dev/null +++ b/docs/doc/trait.impl/core/fmt/trait.Binary.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Binary for ExampleField"],["impl Binary for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[631]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/fmt/trait.Debug.js b/docs/doc/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 0000000..c934dc7 --- /dev/null +++ b/docs/doc/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Debug for ExampleFlags"],["impl Debug for ExampleField"],["impl Debug for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[922]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.Copy.js b/docs/doc/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 0000000..ba65a9e --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Copy for ExampleFlags"],["impl Copy for ExampleField"],["impl Copy for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[931]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.Freeze.js b/docs/doc/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 0000000..988d270 --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Freeze for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl Freeze for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl Freeze for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1103]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.Send.js b/docs/doc/trait.impl/core/marker/trait.Send.js new file mode 100644 index 0000000..fd6c467 --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Send for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl Send for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl Send for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1085]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.StructuralPartialEq.js b/docs/doc/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..f4a9d7a --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl StructuralPartialEq for ExampleFlags"],["impl StructuralPartialEq for ExampleField"],["impl StructuralPartialEq for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1066]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.Sync.js b/docs/doc/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 0000000..86f3296 --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Sync for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl Sync for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl Sync for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1085]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.Unpin.js b/docs/doc/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 0000000..a127d70 --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl Unpin for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl Unpin for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl Unpin for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1094]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/marker/trait.UnsafeUnpin.js b/docs/doc/trait.impl/core/marker/trait.UnsafeUnpin.js new file mode 100644 index 0000000..a921f00 --- /dev/null +++ b/docs/doc/trait.impl/core/marker/trait.UnsafeUnpin.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl UnsafeUnpin for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl UnsafeUnpin for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl UnsafeUnpin for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[722]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/ops/bit/trait.BitAnd.js b/docs/doc/trait.impl/core/ops/bit/trait.BitAnd.js new file mode 100644 index 0000000..30db7da --- /dev/null +++ b/docs/doc/trait.impl/core/ops/bit/trait.BitAnd.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl BitAnd for ExampleFlags"],["impl BitAnd for ExampleField"],["impl BitAnd for ExampleField"],["impl BitAnd<ExampleFlags> for &ExampleField"],["impl BitAnd<ExampleFlags> for &mut ExampleField"],["impl BitAnd<ExampleFlags> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2400]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/ops/bit/trait.BitAndAssign.js b/docs/doc/trait.impl/core/ops/bit/trait.BitAndAssign.js new file mode 100644 index 0000000..dcba4a2 --- /dev/null +++ b/docs/doc/trait.impl/core/ops/bit/trait.BitAndAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl BitAndAssign for ExampleField"],["impl BitAndAssign for ExampleField"],["impl BitAndAssign<ExampleFlags> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1179]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/ops/bit/trait.BitOr.js b/docs/doc/trait.impl/core/ops/bit/trait.BitOr.js new file mode 100644 index 0000000..f3d5bcc --- /dev/null +++ b/docs/doc/trait.impl/core/ops/bit/trait.BitOr.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl BitOr for ExampleFlags"],["impl BitOr for ExampleField"],["impl BitOr for ExampleField"],["impl BitOr<ExampleFlags> for &ExampleField"],["impl BitOr<ExampleFlags> for &mut ExampleField"],["impl BitOr<ExampleFlags> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2382]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/ops/bit/trait.BitOrAssign.js b/docs/doc/trait.impl/core/ops/bit/trait.BitOrAssign.js new file mode 100644 index 0000000..6589610 --- /dev/null +++ b/docs/doc/trait.impl/core/ops/bit/trait.BitOrAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl BitOrAssign for ExampleField"],["impl BitOrAssign for ExampleField"],["impl BitOrAssign<ExampleFlags> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1170]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/ops/bit/trait.BitXor.js b/docs/doc/trait.impl/core/ops/bit/trait.BitXor.js new file mode 100644 index 0000000..4e9a816 --- /dev/null +++ b/docs/doc/trait.impl/core/ops/bit/trait.BitXor.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl BitXor for ExampleFlags"],["impl BitXor for ExampleField"],["impl BitXor for ExampleField"],["impl BitXor<ExampleFlags> for &ExampleField"],["impl BitXor<ExampleFlags> for &mut ExampleField"],["impl BitXor<ExampleFlags> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2400]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/ops/bit/trait.BitXorAssign.js b/docs/doc/trait.impl/core/ops/bit/trait.BitXorAssign.js new file mode 100644 index 0000000..0505f35 --- /dev/null +++ b/docs/doc/trait.impl/core/ops/bit/trait.BitXorAssign.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl BitXorAssign for ExampleField"],["impl BitXorAssign for ExampleField"],["impl BitXorAssign<ExampleFlags> for ExampleField"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1179]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/docs/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 0000000..82c6b76 --- /dev/null +++ b/docs/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl RefUnwindSafe for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl RefUnwindSafe for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl RefUnwindSafe for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1235]} \ No newline at end of file diff --git a/docs/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/docs/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 0000000..eb2fe9d --- /dev/null +++ b/docs/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl UnwindSafe for ExampleFlags",1,["ubits::examples::full_example::ExampleFlags"]],["impl UnwindSafe for ExampleField",1,["ubits::examples::flagless_example::ExampleField"]],["impl UnwindSafe for ExampleField",1,["ubits::examples::full_example::ExampleField"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1208]} \ No newline at end of file diff --git a/docs/doc/trait.impl/safe_transmute/trivial/trait.TriviallyTransmutable.js b/docs/doc/trait.impl/safe_transmute/trivial/trait.TriviallyTransmutable.js new file mode 100644 index 0000000..f872825 --- /dev/null +++ b/docs/doc/trait.impl/safe_transmute/trivial/trait.TriviallyTransmutable.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["ubits",[["impl TriviallyTransmutable for ExampleFlags"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[200]} \ No newline at end of file diff --git a/docs/doc/ubits/all.html b/docs/doc/ubits/all.html index e74c104..f463da0 100644 --- a/docs/doc/ubits/all.html +++ b/docs/doc/ubits/all.html @@ -1,7 +1 @@ -List of all items in this crate - -
- \ No newline at end of file +List of all items in this crate

All

\ No newline at end of file diff --git a/docs/doc/ubits/examples/flagless_example/index.html b/docs/doc/ubits/examples/flagless_example/index.html index 41c5fc6..0dbfdb0 100644 --- a/docs/doc/ubits/examples/flagless_example/index.html +++ b/docs/doc/ubits/examples/flagless_example/index.html @@ -1,14 +1,5 @@ -ubits::examples::flagless_example - Rust - -
Expand description

Example of generated output, using only a bit field without a flag enum.

+ubits::examples::flagless_example - Rust

Module flagless_example

Module flagless_example 

Source
Expand description

Example of generated output, using only a bit field without a flag enum.

This module is only compiled with documentation builds and will not be available for import.

-

use the bitfield macro to generate a field struct and flag enum.

-

Structs

-

Optional docstring for my example bit field.

-
- \ No newline at end of file +

use the bitfield macro to generate a field struct and flag enum.

+

Structs§

ExampleField
Optional docstring for my example bit field.
\ No newline at end of file diff --git a/docs/doc/ubits/examples/flagless_example/sidebar-items.js b/docs/doc/ubits/examples/flagless_example/sidebar-items.js index 58a03cd..68b7549 100644 --- a/docs/doc/ubits/examples/flagless_example/sidebar-items.js +++ b/docs/doc/ubits/examples/flagless_example/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"struct":[["ExampleField","Optional docstring for my example bit field."]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"struct":["ExampleField"]}; \ No newline at end of file diff --git a/docs/doc/ubits/examples/flagless_example/struct.ExampleField.html b/docs/doc/ubits/examples/flagless_example/struct.ExampleField.html index 848d545..4c3cae0 100644 --- a/docs/doc/ubits/examples/flagless_example/struct.ExampleField.html +++ b/docs/doc/ubits/examples/flagless_example/struct.ExampleField.html @@ -1,75 +1,45 @@ -ExampleField in ubits::examples::flagless_example - Rust - -
pub struct ExampleField(_);
Expand description

Optional docstring for my example bit field.

-

Implementations

Constant values describing ExampleField.

-

Number of bits in an instance of ExampleField.

-

Number of bytes used by an instance of ExampleField.

-

Maximum valid integer for ExampleField.

-

Constructors for creating instances of ExampleField.

-

Create a new instance of ExampleField from a u8 value.

-

Create a new instance of ExampleField from 0.

-

Create a new instance of ExampleField from the maximum possible integer value.

-

Create a new instance of ExampleField from a binary string.

-

Create a new instance of ExampleField from a binary string.

-

Current state of this bitfield.

-

Returns the current field value as a u8

-

Returns the current field value as a binary formatted string.

-

Field accessors by index for ExampleField.

-

Returns the value of the bit at the supplied index as a boolean.

-

Sets the value of the bit at the supplied index to 1.

-

Sets the value of the bit at the supplied index to 0.

-

Flips the value of the bit at the supplied index.

-

Combinators for ExampleField.

-

Returns a new ExampleFieldwith ones for flags that do not match. Does not consume self.

-

Returns a new ExampleFieldwith ones for flags that were set on either input. Does not consume self.

-

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Does not consume self.

-

Conversion methods.

-

Returns a new ExampleFieldwith ones for flags that do not match. Consumes self.

-

Returns a new ExampleFieldwith ones for flags that were set on either input. Consumes self.

-

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Consumes self.

-

Trait Implementations

Formats the value using the given formatter.

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

Performs the &= operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

Performs the |= operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

Performs the ^= operation. Read more

-

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Returns a field instance from value of its underlying type.

-

Performs the conversion.

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+ExampleField in ubits::examples::flagless_example - Rust

ExampleField

Struct ExampleField 

Source
pub struct ExampleField(/* private fields */);
Expand description

Optional docstring for my example bit field.

+

Implementations§

Source§

impl ExampleField

Constant values describing ExampleField.

+
Source

pub const BITS: usize = 8usize

Number of bits in an instance of ExampleField.

+
Source

pub const BYTES: usize = 1usize

Number of bytes used by an instance of ExampleField.

+
Source

pub const MAX: u8 = 255u8

Maximum valid integer for ExampleField.

+
Source§

impl ExampleField

Constructors for creating instances of ExampleField.

+
Source

pub fn new(value: u8) -> Self

Create a new instance of ExampleField from a u8 value.

+
Source

pub fn zeros() -> Self

Create a new instance of ExampleField from 0.

+
Source

pub fn ones() -> Self

Create a new instance of ExampleField from the maximum possible integer value.

+
Source

pub fn from_binary_str(value: &str) -> Self

Create a new instance of ExampleField from a binary string.

+
Source

pub fn from_binary_string(value: String) -> Self

Create a new instance of ExampleField from a binary string.

+
Source§

impl ExampleField

Current state of this bitfield.

+
Source

pub fn as_integer(&self) -> u8

Returns the current field value as a u8

+
Source

pub fn as_binary(&self) -> String

Returns the current field value as a binary formatted string.

+
Source§

impl ExampleField

Field accessors by index for ExampleField.

+
Source

pub fn get_index(&self, index: u8) -> bool

Returns the value of the bit at the supplied index as a boolean.

+
Source

pub fn set_index(&mut self, index: u8)

Sets the value of the bit at the supplied index to 1.

+
Source

pub fn clear_index(&mut self, index: u8)

Sets the value of the bit at the supplied index to 0.

+
Source

pub fn toggle_index(&mut self, index: u8)

Flips the value of the bit at the supplied index.

+
Source§

impl ExampleField

Combinators for ExampleField.

+
Source

pub fn diff(&self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that do not match. Does not consume self.

+
Source

pub fn combine(&self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on either input. Does not consume self.

+
Source

pub fn intersect(&self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Does not consume self.

+
Source§

impl ExampleField

Conversion methods.

+
Source

pub fn into_diff(self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that do not match. Consumes self.

+
Source

pub fn into_combined(self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on either input. Consumes self.

+
Source

pub fn into_intersection(self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Consumes self.

+

Trait Implementations§

Source§

impl Binary for ExampleField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for ExampleField

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for ExampleField

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for ExampleField

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for ExampleField

Source§

fn clone(&self) -> ExampleField

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExampleField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExampleField

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<u8> for ExampleField

Returns a field instance from value of its underlying type.

+
Source§

fn from(value: u8) -> ExampleField

Converts to this type from the input type.
Source§

impl PartialEq for ExampleField

Source§

fn eq(&self, other: &ExampleField) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for ExampleField

Source§

fn partial_cmp(&self, other: &ExampleField) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl Copy for ExampleField

Source§

impl StructuralPartialEq for ExampleField

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/docs/doc/ubits/examples/full_example/enum.ExampleFlags.html b/docs/doc/ubits/examples/full_example/enum.ExampleFlags.html index b188b74..9fa852e 100644 --- a/docs/doc/ubits/examples/full_example/enum.ExampleFlags.html +++ b/docs/doc/ubits/examples/full_example/enum.ExampleFlags.html @@ -1,91 +1,42 @@ -ExampleFlags in ubits::examples::full_example - Rust - -
#[repr(u8)]
-pub enum ExampleFlags {
-    Flag0,
-    Flag1,
-    Flag2,
-    Flag3,
-    Flag4,
-    Flag5,
-    Flag6,
-    Flag7,
-}
Expand description

Optional docstring for my flag enum.

-

Variants

Flag0

Optional docstring for Flag0

-

Flag1

Optional docstring for Flag1

-

Flag2

Optional docstring for Flag2

-

Flag3

Optional docstring for Flag3

-

Flag4

Optional docstring for Flag4

-

Flag5

Optional docstring for Flag5

-

Flag6

Optional docstring for Flag6

-

Flag7

Optional docstring for Flag7

-

Trait Implementations

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

Performs the &= operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

Performs the |= operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

Performs the ^= operation. Read more

-

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Returns a flag as its corresponding u8 value.

-

Performs the conversion.

-

Returns a field instance from a flag.

-

Performs the conversion.

-

Converts a u8 to a flag

-

Errors

-

Panics if the supplied u8 is out of range for fields base type. -eg: for a 16-bit field (using u16), +ExampleFlags in ubits::examples::full_example - Rust

ExampleFlags

Enum ExampleFlags 

Source
#[repr(u8)]
pub enum ExampleFlags { + Flag0 = 0, + Flag1 = 1, + Flag2 = 2, + Flag3 = 3, + Flag4 = 4, + Flag5 = 5, + Flag6 = 6, + Flag7 = 7, +}
Expand description

Optional docstring for my flag enum.

+

Variants§

§

Flag0 = 0

Optional docstring for Flag0

+
§

Flag1 = 1

Optional docstring for Flag1

+
§

Flag2 = 2

Optional docstring for Flag2

+
§

Flag3 = 3

Optional docstring for Flag3

+
§

Flag4 = 4

Optional docstring for Flag4

+
§

Flag5 = 5

Optional docstring for Flag5

+
§

Flag6 = 6

Optional docstring for Flag6

+
§

Flag7 = 7

Optional docstring for Flag7

+

Trait Implementations§

Source§

impl BitAnd<ExampleFlags> for &ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: ExampleFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<ExampleFlags> for &mut ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: ExampleFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<ExampleFlags> for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: ExampleFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for ExampleFlags

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign<ExampleFlags> for ExampleField

Source§

fn bitand_assign(&mut self, rhs: ExampleFlags)

Performs the &= operation. Read more
Source§

impl BitOr<ExampleFlags> for &ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: ExampleFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<ExampleFlags> for &mut ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: ExampleFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<ExampleFlags> for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: ExampleFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr for ExampleFlags

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign<ExampleFlags> for ExampleField

Source§

fn bitor_assign(&mut self, rhs: ExampleFlags)

Performs the |= operation. Read more
Source§

impl BitXor<ExampleFlags> for &ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: ExampleFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<ExampleFlags> for &mut ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: ExampleFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<ExampleFlags> for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: ExampleFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor for ExampleFlags

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign<ExampleFlags> for ExampleField

Source§

fn bitxor_assign(&mut self, rhs: ExampleFlags)

Performs the ^= operation. Read more
Source§

impl Clone for ExampleFlags

Source§

fn clone(&self) -> ExampleFlags

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExampleFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ExampleFlags> for ExampleField

Returns a field instance from a flag.

+
Source§

fn from(value: ExampleFlags) -> ExampleField

Converts to this type from the input type.
Source§

impl From<ExampleFlags> for u8

Returns a flag as its corresponding u8 value.

+
Source§

fn from(value: ExampleFlags) -> u8

Converts to this type from the input type.
Source§

impl From<u8> for ExampleFlags

Converts a u8 to a flag

+

§Errors

+

Panics if the supplied u8 is out of range for fields base type. +eg: for a 16-bit field (using u16), providing an index of 20 will cause a panic.

-

Performs the conversion.

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+
Source§

fn from(value: u8) -> ExampleFlags

Converts to this type from the input type.
Source§

impl PartialEq for ExampleFlags

Source§

fn eq(&self, other: &ExampleFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for ExampleFlags

Source§

fn partial_cmp(&self, other: &ExampleFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl Copy for ExampleFlags

Source§

impl StructuralPartialEq for ExampleFlags

Source§

impl TriviallyTransmutable for ExampleFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/docs/doc/ubits/examples/full_example/index.html b/docs/doc/ubits/examples/full_example/index.html index 4a0a741..e292c1c 100644 --- a/docs/doc/ubits/examples/full_example/index.html +++ b/docs/doc/ubits/examples/full_example/index.html @@ -1,16 +1,5 @@ -ubits::examples::full_example - Rust - -
Expand description

Example of generated output, using both a bit field and a flag enum.

+ubits::examples::full_example - Rust

Module full_example

Module full_example 

Source
Expand description

Example of generated output, using both a bit field and a flag enum.

This module is only compiled with documentation builds and will not be available for import.

-

use the bitfield macro to generate a field struct and flag enum.

-

Structs

-

Optional docstring for my example bit field.

-

Enums

-

Optional docstring for my flag enum.

-
- \ No newline at end of file +

use the bitfield macro to generate a field struct and flag enum.

+

Structs§

ExampleField
Optional docstring for my example bit field.

Enums§

ExampleFlags
Optional docstring for my flag enum.
\ No newline at end of file diff --git a/docs/doc/ubits/examples/full_example/sidebar-items.js b/docs/doc/ubits/examples/full_example/sidebar-items.js index a361450..38daf07 100644 --- a/docs/doc/ubits/examples/full_example/sidebar-items.js +++ b/docs/doc/ubits/examples/full_example/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"enum":[["ExampleFlags","Optional docstring for my flag enum."]],"struct":[["ExampleField","Optional docstring for my example bit field."]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["ExampleFlags"],"struct":["ExampleField"]}; \ No newline at end of file diff --git a/docs/doc/ubits/examples/full_example/struct.ExampleField.html b/docs/doc/ubits/examples/full_example/struct.ExampleField.html index 5431b34..dc50583 100644 --- a/docs/doc/ubits/examples/full_example/struct.ExampleField.html +++ b/docs/doc/ubits/examples/full_example/struct.ExampleField.html @@ -1,103 +1,51 @@ -ExampleField in ubits::examples::full_example - Rust - -
pub struct ExampleField(_);
Expand description

Optional docstring for my example bit field.

-

Implementations

Constant values describing ExampleField.

-

Number of bits in an instance of ExampleField.

-

Number of bytes used by an instance of ExampleField.

-

Maximum valid integer for ExampleField.

-

Constructors for creating instances of ExampleField.

-

Create a new instance of ExampleField from a u8 value.

-

Create a new instance of ExampleField from 0.

-

Create a new instance of ExampleField from the maximum possible integer value.

-

Create a new instance of ExampleField from a binary string.

-

Create a new instance of ExampleField from a binary string.

-

Current state of this bitfield.

-

Returns the current field value as a u8

-

Returns the current field value as a binary formatted string.

-

Field accessors by index for ExampleField.

-

Returns the value of the bit at the supplied index as a boolean.

-

Sets the value of the bit at the supplied index to 1.

-

Sets the value of the bit at the supplied index to 0.

-

Flips the value of the bit at the supplied index.

-

Named field accessors by ExampleFlags for ExampleField.

-

Returns the value of the bit at the supplied flag as a boolean.

-

Sets the value of the bit at the supplied flag to 1.

-

Sets the value of the bit at the supplied flag to 0.

-

Flips the value of the bit at the supplied flag.

-

Combinators for ExampleField.

-

Returns a new ExampleFieldwith ones for flags that do not match. Does not consume self.

-

Returns a new ExampleFieldwith ones for flags that were set on either input. Does not consume self.

-

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Does not consume self.

-

Conversion methods.

-

Returns a new ExampleFieldwith ones for flags that do not match. Consumes self.

-

Returns a new ExampleFieldwith ones for flags that were set on either input. Consumes self.

-

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Consumes self.

-

Trait Implementations

Formats the value using the given formatter.

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

The resulting type after applying the & operator.

-

Performs the & operation. Read more

-

Performs the &= operation. Read more

-

Performs the &= operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

The resulting type after applying the | operator.

-

Performs the | operation. Read more

-

Performs the |= operation. Read more

-

Performs the |= operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

The resulting type after applying the ^ operator.

-

Performs the ^ operation. Read more

-

Performs the ^= operation. Read more

-

Performs the ^= operation. Read more

-

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Returns a field instance from a flag.

-

Performs the conversion.

-

Returns a field instance from value of its underlying type.

-

Performs the conversion.

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

This method returns an ordering between self and other values if one exists. Read more

-

This method tests less than (for self and other) and is used by the < operator. Read more

-

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more

-

This method tests greater than (for self and other) and is used by the > operator. Read more

-

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+ExampleField in ubits::examples::full_example - Rust

ExampleField

Struct ExampleField 

Source
pub struct ExampleField(/* private fields */);
Expand description

Optional docstring for my example bit field.

+

Implementations§

Source§

impl ExampleField

Constant values describing ExampleField.

+
Source

pub const BITS: usize = 8usize

Number of bits in an instance of ExampleField.

+
Source

pub const BYTES: usize = 1usize

Number of bytes used by an instance of ExampleField.

+
Source

pub const MAX: u8 = 255u8

Maximum valid integer for ExampleField.

+
Source§

impl ExampleField

Constructors for creating instances of ExampleField.

+
Source

pub fn new(value: u8) -> Self

Create a new instance of ExampleField from a u8 value.

+
Source

pub fn zeros() -> Self

Create a new instance of ExampleField from 0.

+
Source

pub fn ones() -> Self

Create a new instance of ExampleField from the maximum possible integer value.

+
Source

pub fn from_binary_str(value: &str) -> Self

Create a new instance of ExampleField from a binary string.

+
Source

pub fn from_binary_string(value: String) -> Self

Create a new instance of ExampleField from a binary string.

+
Source§

impl ExampleField

Current state of this bitfield.

+
Source

pub fn as_integer(&self) -> u8

Returns the current field value as a u8

+
Source

pub fn as_binary(&self) -> String

Returns the current field value as a binary formatted string.

+
Source§

impl ExampleField

Field accessors by index for ExampleField.

+
Source

pub fn get_index(&self, index: u8) -> bool

Returns the value of the bit at the supplied index as a boolean.

+
Source

pub fn set_index(&mut self, index: u8)

Sets the value of the bit at the supplied index to 1.

+
Source

pub fn clear_index(&mut self, index: u8)

Sets the value of the bit at the supplied index to 0.

+
Source

pub fn toggle_index(&mut self, index: u8)

Flips the value of the bit at the supplied index.

+
Source§

impl ExampleField

Named field accessors by ExampleFlags for ExampleField.

+
Source

pub fn get(&self, flag: ExampleFlags) -> bool

Returns the value of the bit at the supplied flag as a boolean.

+
Source

pub fn set(&mut self, flag: ExampleFlags) -> &mut Self

Sets the value of the bit at the supplied flag to 1.

+
Source

pub fn clear(&mut self, flag: ExampleFlags) -> &mut Self

Sets the value of the bit at the supplied flag to 0.

+
Source

pub fn toggle(&mut self, flag: ExampleFlags) -> &mut Self

Flips the value of the bit at the supplied flag.

+
Source§

impl ExampleField

Combinators for ExampleField.

+
Source

pub fn diff(&self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that do not match. Does not consume self.

+
Source

pub fn combine(&self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on either input. Does not consume self.

+
Source

pub fn intersect(&self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Does not consume self.

+
Source§

impl ExampleField

Conversion methods.

+
Source

pub fn into_diff(self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that do not match. Consumes self.

+
Source

pub fn into_combined(self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on either input. Consumes self.

+
Source

pub fn into_intersection(self, other: Self) -> Self

Returns a new ExampleFieldwith ones for flags that were set on both inputs. Consumes self.

+

Trait Implementations§

Source§

impl Binary for ExampleField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd<ExampleFlags> for &ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: ExampleFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<ExampleFlags> for &mut ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: ExampleFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<ExampleFlags> for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: ExampleFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign<ExampleFlags> for ExampleField

Source§

fn bitand_assign(&mut self, rhs: ExampleFlags)

Performs the &= operation. Read more
Source§

impl BitAndAssign for ExampleField

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr<ExampleFlags> for &ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: ExampleFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<ExampleFlags> for &mut ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: ExampleFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<ExampleFlags> for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: ExampleFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign<ExampleFlags> for ExampleField

Source§

fn bitor_assign(&mut self, rhs: ExampleFlags)

Performs the |= operation. Read more
Source§

impl BitOrAssign for ExampleField

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor<ExampleFlags> for &ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: ExampleFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<ExampleFlags> for &mut ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: ExampleFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<ExampleFlags> for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: ExampleFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor for ExampleField

Source§

type Output = ExampleField

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign<ExampleFlags> for ExampleField

Source§

fn bitxor_assign(&mut self, rhs: ExampleFlags)

Performs the ^= operation. Read more
Source§

impl BitXorAssign for ExampleField

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for ExampleField

Source§

fn clone(&self) -> ExampleField

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExampleField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExampleField

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<ExampleFlags> for ExampleField

Returns a field instance from a flag.

+
Source§

fn from(value: ExampleFlags) -> ExampleField

Converts to this type from the input type.
Source§

impl From<u8> for ExampleField

Returns a field instance from value of its underlying type.

+
Source§

fn from(value: u8) -> ExampleField

Converts to this type from the input type.
Source§

impl PartialEq for ExampleField

Source§

fn eq(&self, other: &ExampleField) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for ExampleField

Source§

fn partial_cmp(&self, other: &ExampleField) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl Copy for ExampleField

Source§

impl StructuralPartialEq for ExampleField

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/docs/doc/ubits/examples/index.html b/docs/doc/ubits/examples/index.html index c4c6653..28ca206 100644 --- a/docs/doc/ubits/examples/index.html +++ b/docs/doc/ubits/examples/index.html @@ -1,15 +1,5 @@ -ubits::examples - Rust - -
-

Module ubits::examples

source · []
Expand description

Examples of generated output using different configurations.

+ubits::examples - Rust

Module examples

Module examples 

Source
Expand description

Examples of generated output using different configurations.

This module is only compiled with documentation builds and will not be available for import.

-

use the bitfield macro to generate a field struct and flag enum.

-

Modules

-

Example of generated output, using only a bit field without a flag enum.

-

Example of generated output, using both a bit field and a flag enum.

-
- \ No newline at end of file +

use the bitfield macro to generate a field struct and flag enum.

+

Modules§

flagless_example
Example of generated output, using only a bit field without a flag enum.
full_example
Example of generated output, using both a bit field and a flag enum.
\ No newline at end of file diff --git a/docs/doc/ubits/examples/sidebar-items.js b/docs/doc/ubits/examples/sidebar-items.js index 0b9c9fe..345dea4 100644 --- a/docs/doc/ubits/examples/sidebar-items.js +++ b/docs/doc/ubits/examples/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"mod":[["flagless_example","Example of generated output, using only a bit field without a flag enum."],["full_example","Example of generated output, using both a bit field and a flag enum."]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["flagless_example","full_example"]}; \ No newline at end of file diff --git a/docs/doc/ubits/index.html b/docs/doc/ubits/index.html index 202c253..8b7674f 100644 --- a/docs/doc/ubits/index.html +++ b/docs/doc/ubits/index.html @@ -1,10 +1,4 @@ -ubits - Rust - -
-

Crate ubits

source · []
Expand description

crates.io +ubits - Rust

Crate ubits

Crate ubits 

Source
Expand description

crates.io Downloads Build Docs @@ -14,200 +8,194 @@

Crate ubits

Supports field widths of 8, 16, 32, 64 and 128 bits.

Note: the example module is only complied with documentation builds and is not available for importing in the wild.

-

Usage

+

§Usage

Generate a bitfield struct with a flag enum… (The following examples all use this as a definition.)

-
use ubits::bitfield;
+
use ubits::bitfield;
 
     bitfield! {
-        pub u8 ExampleField
-        ExampleFlags {
-            0 : Flag0,
-            1 : Flag1,
-            2 : Flag2,
-            3 : Flag3,
-            4 : Flag4,
-            5 : Flag5,
-            6 : Flag6,
-            7 : Flag7,
+        pub u8 ExampleField
+        ExampleFlags {
+            0 : Flag0,
+            1 : Flag1,
+            2 : Flag2,
+            3 : Flag3,
+            4 : Flag4,
+            5 : Flag5,
+            6 : Flag6,
+            7 : Flag7,
         }
-    }
-

Instances

+ }

§Instances

From integer:


-let from_integer = ExampleField(123);
-assert_eq!(ExampleField(123), from_integer);
+let from_integer = ExampleField(123); +assert_eq!(ExampleField(123), from_integer);

From a binary string:


-let from_binary = ExampleField::from_binary_str("01111011");
-assert_eq!(ExampleField(123), from_binary)
+let from_binary = ExampleField::from_binary_str("01111011"); +assert_eq!(ExampleField(123), from_binary)

From ones:


-let from_ones = ExampleField::ones();
-assert_eq!("11111111", from_ones.as_binary());
-assert_eq!(255, from_ones.as_integer());
+let from_ones = ExampleField::ones(); +assert_eq!("11111111", from_ones.as_binary()); +assert_eq!(255, from_ones.as_integer());

From zeros:


-let from_zeros = ExampleField::zeros();
-assert_eq!("00000000", from_zeros.as_binary());
-assert_eq!(0, from_zeros.as_integer());
-

Field Access

+let from_zeros = ExampleField::zeros(); +assert_eq!("00000000", from_zeros.as_binary()); +assert_eq!(0, from_zeros.as_integer());

§Field Access

Get bit value by field:


-let field = ExampleField::from_binary_str("01010101");
-assert!(field.get(ExampleFlags::Flag0));
-assert!(!field.get(ExampleFlags::Flag1));
+let field = ExampleField::from_binary_str("01010101"); +assert!(field.get(ExampleFlags::Flag0)); +assert!(!field.get(ExampleFlags::Flag1));

Get bit value by index:


-let field = ExampleField::from_binary_str("01010101");
-assert!(field.get_index(0));
-assert!(!field.get_index(1));
+let field = ExampleField::from_binary_str("01010101"); +assert!(field.get_index(0)); +assert!(!field.get_index(1));

Set bit value by field:


-let mut field = ExampleField::from_binary_str("01010101");
-field.set(ExampleFlags::Flag1);
-field.set(ExampleFlags::Flag3);
-assert_eq!("01011111", field.as_binary());
+let mut field = ExampleField::from_binary_str("01010101"); +field.set(ExampleFlags::Flag1); +field.set(ExampleFlags::Flag3); +assert_eq!("01011111", field.as_binary());

Set bit value by index:


-let mut field = ExampleField::from_binary_str("01010101");
-field.set_index(1);
-field.set_index(3);
-assert_eq!("01011111", field.as_binary());
+let mut field = ExampleField::from_binary_str("01010101"); +field.set_index(1); +field.set_index(3); +assert_eq!("01011111", field.as_binary());

Clear bit value by field:


-let mut field = ExampleField::from_binary_str("01010101");
-field.clear(ExampleFlags::Flag0);
-field.clear(ExampleFlags::Flag2);
-assert_eq!("01010000", field.as_binary());
+let mut field = ExampleField::from_binary_str("01010101"); +field.clear(ExampleFlags::Flag0); +field.clear(ExampleFlags::Flag2); +assert_eq!("01010000", field.as_binary());

Clear bit value by index:


-let mut field = ExampleField::from_binary_str("01010101");
-field.clear_index(0);
-field.clear_index(2);
-assert_eq!("01010000", field.as_binary());
+let mut field = ExampleField::from_binary_str("01010101"); +field.clear_index(0); +field.clear_index(2); +assert_eq!("01010000", field.as_binary());

Toggle bit value by field:


-let mut field = ExampleField::from_binary_str("01010101");
-field.toggle(ExampleFlags::Flag0);
-assert_eq!("01010100", field.as_binary());
-field.toggle(ExampleFlags::Flag0);
-assert_eq!("01010101", field.as_binary());
+let mut field = ExampleField::from_binary_str("01010101"); +field.toggle(ExampleFlags::Flag0); +assert_eq!("01010100", field.as_binary()); +field.toggle(ExampleFlags::Flag0); +assert_eq!("01010101", field.as_binary());

Toggle bit value by index:


-let mut field = ExampleField::from_binary_str("01010101");
-field.toggle_index(0);
-assert_eq!("01010100", field.as_binary());
-field.toggle_index(0);
-assert_eq!("01010101", field.as_binary());
-

Named Getters and Setters

+let mut field = ExampleField::from_binary_str("01010101"); +field.toggle_index(0); +assert_eq!("01010100", field.as_binary()); +field.toggle_index(0); +assert_eq!("01010101", field.as_binary());

§Named Getters and Setters

Ubits can generate getter and setter methods for zero or more fields, if a name is provided.

-
use ubits::bitfield;
+
use ubits::bitfield;
    bitfield! {
-       pub u8 ExampleField
-       ExampleFlags {
-           0 : Flag0 : (field_0),  // is_field_0 & set_field_0 & clear_field_0 & toggle_field_0
-           1 : Flag1 : (field_1),  // is_field_1 & set_field_1 & clear_field_1 & toggle_field_1
-           2 : Flag2,
-           3 : Flag3,
-           4 : Flag4,
-           5 : Flag5,
-           6 : Flag6,
-           7 : Flag7,
+       pub u8 ExampleField
+       ExampleFlags {
+           0 : Flag0 : (field_0),  // is_field_0 & set_field_0 & clear_field_0 & toggle_field_0
+           1 : Flag1 : (field_1),  // is_field_1 & set_field_1 & clear_field_1 & toggle_field_1
+           2 : Flag2,
+           3 : Flag3,
+           4 : Flag4,
+           5 : Flag5,
+           6 : Flag6,
+           7 : Flag7,
        }
    }
 
-let mut field = ExampleField::from_binary_str("01010101");
-assert_eq!(true, field.is_field_0());
-assert_eq!(false, field.is_field_1());
+let mut field = ExampleField::from_binary_str("01010101");
+assert_eq!(true, field.is_field_0());
+assert_eq!(false, field.is_field_1());
 
-field.set_field_1();
-assert_eq!(true, field.is_field_1());
+field.set_field_1();
+assert_eq!(true, field.is_field_1());
 
-field.clear_field_1();
-assert_eq!(false, field.is_field_1());
+field.clear_field_1();
+assert_eq!(false, field.is_field_1());
 
-field.toggle_field_1();
-assert_eq!(true, field.is_field_1());
-

Combinations

+field.toggle_field_1(); +assert_eq!(true, field.is_field_1());

§Combinations

Combine bit fields:
(use into_combined to consume self)


-let mut a = ExampleField::from_binary_str("01010101");
-let b = ExampleField::from_binary_str("10101010");
-assert_eq!("11111111", a.combine(b).as_binary());
+let mut a = ExampleField::from_binary_str("01010101"); +let b = ExampleField::from_binary_str("10101010"); +assert_eq!("11111111", a.combine(b).as_binary());

Get the intersection of two bitfields:
(use into_intersection to consume self)


-let mut a = ExampleField::from_binary_str("11000011");
-let b = ExampleField::from_binary_str("01111110");
-assert_eq!("01000010", a.intersect(b).as_binary());
+let mut a = ExampleField::from_binary_str("11000011"); +let b = ExampleField::from_binary_str("01111110"); +assert_eq!("01000010", a.intersect(b).as_binary());

Get the diff of two bitfields:
(use into_diff to consume self)


-let mut a = ExampleField::from_binary_str("11000011");
-let b = ExampleField::from_binary_str("01100110");
-assert_eq!("10100101", a.diff(b).as_binary());
-

Bitwise

+let mut a = ExampleField::from_binary_str("11000011"); +let b = ExampleField::from_binary_str("01100110"); +assert_eq!("10100101", a.diff(b).as_binary());

§Bitwise

Both bit field instances and flags use bitwise operators to change bit values.


-let mut from_zeros = ExampleField::zeros();
-assert_eq!("00000000", from_zeros.as_binary());
+let mut from_zeros = ExampleField::zeros();
+assert_eq!("00000000", from_zeros.as_binary());
 
-// set bit to 1
-from_zeros |= ExampleFlags::Flag1;
-assert_eq!("00000010", from_zeros.as_binary());
+// set bit to 1
+from_zeros |= ExampleFlags::Flag1;
+assert_eq!("00000010", from_zeros.as_binary());
 
-// set bit back to 0
-from_zeros &= ExampleFlags::Flag1;
-assert_eq!("00000000", from_zeros.as_binary());
+// set bit back to 0
+from_zeros &= ExampleFlags::Flag1;
+assert_eq!("00000000", from_zeros.as_binary());
 
-// toggle a bit
-from_zeros ^= ExampleFlags::Flag1;
-assert_eq!("00000010", from_zeros.as_binary());
+// toggle a bit
+from_zeros ^= ExampleFlags::Flag1;
+assert_eq!("00000010", from_zeros.as_binary());
 
-from_zeros ^= ExampleFlags::Flag1;
-assert_eq!("00000000", from_zeros.as_binary());
+from_zeros ^= ExampleFlags::Flag1; +assert_eq!("00000000", from_zeros.as_binary());

Operations can also be chained together:


-let mut from_zeros = ExampleField::zeros() | ExampleFlags::Flag1 | ExampleFlags::Flag3;
-assert_eq!("00001010", from_zeros.as_binary());
+let mut from_zeros = ExampleField::zeros() | ExampleFlags::Flag1 | ExampleFlags::Flag3;
+assert_eq!("00001010", from_zeros.as_binary());
 

Bitfield instances can also be created from combining flags:


-let mut from_zeros = ExampleFlags::Flag1 | ExampleFlags::Flag3;
-assert_eq!("00001010", from_zeros.as_binary());
-
-

Fields named with flags

+let mut from_zeros = ExampleFlags::Flag1 | ExampleFlags::Flag3; +assert_eq!("00001010", from_zeros.as_binary()); +

§Fields named with flags

The generated flags enum allows you to access bits by name. -The flag has an associated u8 value, +The flag has an associated u8 value, which determines the index its target bit. -(See bitfield for more info)

+(See bitfield for more info)

With the following input…

1 0 1 0 0 1 1 0

and the following flags…

@@ -244,9 +232,4 @@

Fields named bit value10100110 index76543210 -

Modules

-

Examples of generated output using different configurations.

-

Macros

-

Generates a bitfield struct and a corresponding flag enum.

-
- \ No newline at end of file +

Modules§

examples
Examples of generated output using different configurations.

Macros§

bitfield
Generates a bitfield struct and a corresponding flag enum.
\ No newline at end of file diff --git a/docs/doc/ubits/macro.bitfield.html b/docs/doc/ubits/macro.bitfield.html index faf3f84..355e6c3 100644 --- a/docs/doc/ubits/macro.bitfield.html +++ b/docs/doc/ubits/macro.bitfield.html @@ -1,94 +1,87 @@ -bitfield in ubits - Rust - -
macro_rules! bitfield {
+bitfield in ubits - Rust

bitfield

Macro bitfield 

Source
macro_rules! bitfield {
     (
-        $(#[$doc:meta])*
-        $access:vis u8 $name:ident
+        $(#[$doc:meta])*
+        $access:vis u8 $name:ident
         $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
+            $(#[$flag_doc:meta])*
+            $flag:ident {
                 $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( : ( $named_getter:ident ) )?,
-                )*
+                    $(#[$member_doc:meta])*
+                    $idx:literal : $field:ident $( : ( $named_getter:ident ) )?,
+                )*
             }
-        )?
+        )?
     ) => { ... };
     (
-        $(#[$doc:meta])*
-        $access:vis u16 $name:ident
+        $(#[$doc:meta])*
+        $access:vis u16 $name:ident
         $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
+            $(#[$flag_doc:meta])*
+            $flag:ident {
                 $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
+                    $(#[$member_doc:meta])*
+                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+                )*
             }
-        )?
+        )?
     ) => { ... };
     (
-        $(#[$doc:meta])*
-        $access:vis u32 $name:ident
+        $(#[$doc:meta])*
+        $access:vis u32 $name:ident
         $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
+            $(#[$flag_doc:meta])*
+            $flag:ident {
                 $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
+                    $(#[$member_doc:meta])*
+                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+                )*
             }
-        )?
+        )?
     ) => { ... };
     (
-        $(#[$doc:meta])*
-        $access:vis u64 $name:ident
+        $(#[$doc:meta])*
+        $access:vis u64 $name:ident
         $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
+            $(#[$flag_doc:meta])*
+            $flag:ident {
                 $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
+                    $(#[$member_doc:meta])*
+                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+                )*
             }
-        )?
+        )?
     ) => { ... };
     (
-        $(#[$doc:meta])*
-        $access:vis u128 $name:ident
+        $(#[$doc:meta])*
+        $access:vis u128 $name:ident
         $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
+            $(#[$flag_doc:meta])*
+            $flag:ident {
                 $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
+                    $(#[$member_doc:meta])*
+                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+                )*
             }
-        )?
+        )?
     ) => { ... };
     (
-        $(#[$doc:meta])*
-        $access:vis usize $name:ident
+        $(#[$doc:meta])*
+        $access:vis usize $name:ident
         $(
-            $(#[$flag_doc:meta])*
-            $flag:ident {
+            $(#[$flag_doc:meta])*
+            $flag:ident {
                 $(
-                    $(#[$member_doc:meta])*
-                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
-                )*
+                    $(#[$member_doc:meta])*
+                    $idx:literal : $field:ident $( ( $named_getter:ident ) )?,
+                )*
             }
-        )?
+        )?
     ) => { ... };
-}
-
Expand description

Generates a bitfield struct and a corresponding flag enum.

+}
Expand description

Generates a bitfield struct and a corresponding flag enum.

Can be used multiple times in a single codebase as long as the identifiers are unique or are isolated so as not to clash.

-

See the examples module for examples of the generated output.

-

Args

+

See the examples module for examples of the generated output.

+

§Args

  • pub - optional accessor: if provided, both generated items will public. @@ -105,11 +98,11 @@

    Args

  • u8 - unsigned integer type to use as a bit array. Must be an unsigned integer
    -valid options are: u8,u16, u32, u64, u128, usize

    +valid options are: u8,u16, u32, u64, u128, usize

  • 0 : Flag0 - defines each member of the flag enum.
    -The left hand side must be a u8 (0..=254) +The left hand side must be a u8 (0..=254) and must be less than the number of bits in the underlying unsigned type. This value determines the index of the target bit within the field.
    The right hand side can be any valid identifier (unique to this enum). @@ -118,87 +111,86 @@

    Args

  • /// docstrings - Each element can take optional docstrings. This includes the bit field struct, the flag enum, and each member within the flag enum. -See examples for more information.

    +See examples for more information.

-

Examples:

+

§Examples:

Full Example - (see below for explanation for each parameter):

-
use ubits::bitfield;
+
use ubits::bitfield;
 
     bitfield! {
-        /// Optional docstring
-        /// for [`ExampleField`] struct
-        pub u8 ExampleField
-        /// Optional docstring
-        /// for [`ExampleFlags`] enum
-        ExampleFlags {
-            /// Optional docstring for [`ExampleFlags::Flag0`]
-            0 : Flag0,
-            /// Optional docstring for [`ExampleFlags::Flag1`]
-            1 : Flag1,
-            /// Optional docstring for [`ExampleFlags::Flag2`]
-            2 : Flag2,
-            /// Optional docstring for [`ExampleFlags::Flag3`]
-            3 : Flag3,
-            /// Optional docstring for [`ExampleFlags::Flag4`]
-            4 : Flag4,
-            /// Optional docstring for [`ExampleFlags::Flag5`]
-            5 : Flag5,
-            /// Optional docstring for [`ExampleFlags::Flag6`]
-            6 : Flag6,
-            /// Optional docstring for [`ExampleFlags::Flag7`]
-            7 : Flag7,
+        /// Optional docstring
+        /// for [`ExampleField`] struct
+        pub u8 ExampleField
+        /// Optional docstring
+        /// for [`ExampleFlags`] enum
+        ExampleFlags {
+            /// Optional docstring for [`ExampleFlags::Flag0`]
+            0 : Flag0,
+            /// Optional docstring for [`ExampleFlags::Flag1`]
+            1 : Flag1,
+            /// Optional docstring for [`ExampleFlags::Flag2`]
+            2 : Flag2,
+            /// Optional docstring for [`ExampleFlags::Flag3`]
+            3 : Flag3,
+            /// Optional docstring for [`ExampleFlags::Flag4`]
+            4 : Flag4,
+            /// Optional docstring for [`ExampleFlags::Flag5`]
+            5 : Flag5,
+            /// Optional docstring for [`ExampleFlags::Flag6`]
+            6 : Flag6,
+            /// Optional docstring for [`ExampleFlags::Flag7`]
+            7 : Flag7,
         }
     }

You don’t have to name all the fields if you don’t need them…

You can use just a few from the front:

-
use ubits::bitfield;
+
use ubits::bitfield;
 
     bitfield! {
-        /// Optional docstring
-        /// for [`ExampleField`] struct
-        pub u8 ExampleField
-        /// Optional docstring
-        /// for [`ExampleFlags`] enum
-        ExampleFlags {
-            /// Optional docstring for [`ExampleFlags::Flag0`]
-            0 : Flag0,
-            /// Optional docstring for [`ExampleFlags::Flag1`]
-            1 : Flag1,
-            /// Optional docstring for [`ExampleFlags::Flag2`]
-            2 : Flag2,
+        /// Optional docstring
+        /// for [`ExampleField`] struct
+        pub u8 ExampleField
+        /// Optional docstring
+        /// for [`ExampleFlags`] enum
+        ExampleFlags {
+            /// Optional docstring for [`ExampleFlags::Flag0`]
+            0 : Flag0,
+            /// Optional docstring for [`ExampleFlags::Flag1`]
+            1 : Flag1,
+            /// Optional docstring for [`ExampleFlags::Flag2`]
+            2 : Flag2,
         }
     }

… or any valid indices:

-
use ubits::bitfield;
+
use ubits::bitfield;
 
     bitfield! {
-        /// Optional docstring
-        /// for [`ExampleField`] struct
-        pub u8 ExampleField
-        /// Optional docstring
-        /// for [`ExampleFlags`] enum
-        ExampleFlags {
-            /// Optional docstring for [`ExampleFlags::Flag0`]
-            0 : Flag0,
-            /// Optional docstring for [`ExampleFlags::Flag1`]
-            3 : Flag1,
-            /// Optional docstring for [`ExampleFlags::Flag2`]
-            6 : Flag2,
+        /// Optional docstring
+        /// for [`ExampleField`] struct
+        pub u8 ExampleField
+        /// Optional docstring
+        /// for [`ExampleFlags`] enum
+        ExampleFlags {
+            /// Optional docstring for [`ExampleFlags::Flag0`]
+            0 : Flag0,
+            /// Optional docstring for [`ExampleFlags::Flag1`]
+            3 : Flag1,
+            /// Optional docstring for [`ExampleFlags::Flag2`]
+            6 : Flag2,
         }
     }

… or just omit the flags altogether and use indices only.:

-
use ubits::bitfield;
+
use ubits::bitfield;
     bitfield! {
-        /// Optional docstring
-        /// for [`ExampleField`] struct
-        pub u8 ExampleField
+        /// Optional docstring
+        /// for [`ExampleField`] struct
+        pub u8 ExampleField
     }

Note: if you omit flags, no flag enum will be generated and no methods for the bitfield struct that rely on flags will be generated.

-
- \ No newline at end of file + \ No newline at end of file diff --git a/docs/doc/ubits/sidebar-items.js b/docs/doc/ubits/sidebar-items.js index c9b01ef..d0d32fc 100644 --- a/docs/doc/ubits/sidebar-items.js +++ b/docs/doc/ubits/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"macro":[["bitfield","Generates a bitfield struct and a corresponding flag enum."]],"mod":[["examples","Examples of generated output using different configurations."]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"macro":["bitfield"],"mod":["examples"]}; \ No newline at end of file diff --git a/docs/doc/wheel.svg b/docs/doc/wheel.svg deleted file mode 100644 index 01da3b2..0000000 --- a/docs/doc/wheel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file