[
  {
    "path": ".gitattributes",
    "content": "# Set the default behavior, in case people don't have core.autocrlf set.\n* text=auto eol=lf\n"
  },
  {
    "path": ".github/workflows/rbe.yml",
    "content": "name: CI\non: [push, pull_request]\n\nenv:\n  # Update the language picker in index.hbs to link new languages.\n  LANGUAGES: ja zh es ko\n  MDBOOK_VERSION: 0.5.1\n\njobs:\n  test:\n    name: Run tests\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        # We need the full history below.\n        fetch-depth: 0\n\n    - name: Update rustup\n      run: rustup self update\n\n    - name: Install Rust\n      run: |\n        rustup set profile minimal\n        rustup toolchain install nightly -c rust-docs\n        rustup default nightly\n\n    - name: Install mdbook\n      run: |\n        mkdir bin\n        curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin\n        echo \"$(pwd)/bin\" >> ${GITHUB_PATH}\n\n    - name: Install mdbook-i18n-helpers\n      run: |\n        cargo install mdbook-i18n-helpers --locked --version 0.4.0\n\n    - name: Report versions\n      run: |\n        rustup --version\n        rustc -Vv\n        mdbook --version\n\n    - name: Run tests\n      run: mdbook test\n\n    - name: Build HTML\n      run: mdbook build\n\n    - name: Check for broken links\n      run: |\n        curl -sSLo linkcheck.sh \\\n          https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh\n        sh linkcheck.sh --all rust-by-example\n\n    - name: Build all translations\n      run: |\n        for po_lang in ${{ env.LANGUAGES }}; do\n          echo \"::group::Building $po_lang translation\"\n          # Set language and adjust site URL. Clear the redirects\n          # since they are in sync with the source files, not the\n          # translation.\n          MDBOOK_BOOK__LANGUAGE=$po_lang \\\n          mdbook build -d book/$po_lang\n          echo \"::endgroup::\"\n        done\n\n    - name: Check all translations for broken links\n      run: |\n        for po_lang in ${{ env.LANGUAGES }}; do\n          MDBOOK_BOOK__LANGUAGE=$po_lang \\\n          sh linkcheck.sh --all rust-by-example\n        done\n\n    - name: Upload Artifact\n      uses: actions/upload-artifact@v4\n      with:\n        name: rust-by-example\n        path: book\n"
  },
  {
    "path": ".gitignore",
    "content": "book\n\npo/messages.pot\n\n.vscode/\n\n# Auto-generated files from macOS\n.DS_Store\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# The Rust Code of Conduct\n\nA version of this document [can be found online](https://www.rust-lang.org/conduct.html).\n\n## Conduct\n\n**Contact**: [rust-mods@rust-lang.org](mailto:rust-mods@rust-lang.org)\n\n* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.\n* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.\n* Please be kind and courteous. There's no need to be mean or rude.\n* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.\n* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.\n* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior. We interpret the term \"harassment\" as including the definition in the [Citizen Code of Conduct](http://citizencodeofconduct.org/); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.\n* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team][mod_team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.\n* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.\n\n## Moderation\n\nThese are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team][mod_team].\n\n1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)\n2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.\n3. Moderators will first respond to such remarks with a warning.\n4. If the warning is unheeded, the user will be \"kicked,\" i.e., kicked out of the communication channel to cool off.\n5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.\n6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.\n7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.\n8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.\n\nIn the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.\n\nAnd if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.\n\nThe enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion.\n\n*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).*\n\n[mod_team]: https://www.rust-lang.org/team.html#Moderation-team\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Rust by Example contribution guidelines\n\nThank you for your interest in making Rust by Example (also known as RBE)\nbetter! We'd love to have your contribution. We expect all contributors to\nabide by the [Rust code of conduct], which you can find at that link or in the\n[`CODE_OF_CONDUCT.md`] file in this repository.\n\n[Rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct\n[`CODE_OF_CONDUCT.md`]: https://github.com/rust-lang/rust-by-example/blob/master/CODE_OF_CONDUCT.md\n\n## License\n\nRBE is dual licensed under the MIT and Apache 2.0 licenses, and so are all\ncontributions. Please see the [`LICENSE-MIT`] and [`LICENSE-APACHE`] files in\nthis directory for more details.\n\n[`LICENSE-MIT`]: https://github.com/rust-lang/rust-by-example/blob/master/LICENSE-MIT\n[`LICENSE-APACHE`]: https://github.com/rust-lang/rust-by-example/blob/master/LICENSE-APACHE\n\n## Pull Requests\n\nTo make changes to RBE, please send in pull requests on GitHub to the `master`\nbranch. We'll review them and either merge or request changes. Travis CI tests\neverything as well, so you may get feedback from it too.\n\nIf you make additions or other changes to a pull request, feel free to either amend\nprevious commits or only add new ones, however you prefer. We may ask you to squash\nyour commits before merging, depending.\n\n## Issue Tracker\n\nYou can find the issue tracker [on\nGitHub](https://github.com/rust-lang/rust-by-example/issues). If you've found a\nproblem with RBE, please open an issue there.\n\nWe use the following labels:\n\n* `enhancement`: This is for any request for new sections or functionality.\n* `bug`: This is for anything that's in RBE, but incorrect or not working.\n* `discussion`: A discussion about improving something in RBE; this may lead to new\n  enhancement or bug issues.\n* `E-mentor`: This issue has someone dedicated to helping a new contributor fix it!\n  Can apply to both enhancement or bug issues.\n\n## Development workflow\n\nTo build RBE, [install Rust](https://www.rust-lang.org/tools/install), and then:\n\n```bash\n$ git clone https://github.com/rust-lang/rust-by-example\n$ cd rust-by-example\n$ cargo install mdbook\n$ mdbook build\n```\n\n**The following warnings can be ignored safely.**\n\n```text\n WARN The command `mdbook-gettext` for preprocessor `gettext` was not found, but is marked as optional.\n```\n\n[install Rust]: http://rust-lang.org/install.html\n\nThe files will be in the `book` directory at the top-level; `mdbook serve` will\nopen the contents in your web browser ([localhost:3000](http://localhost:3000) by default).\n\nTo run the tests:\n\n```bash\n$ mdbook test\n```\n\nIf you're adding a new chapter, you'll need to edit `src\\SUMMARY.md` to add it. If\nyou're tweaking an existing example, you'll need to edit the corresponding file; check\n`src\\SUMMARY.md` to see a mapping of where chapters go to files.\n"
  },
  {
    "path": "LICENSE-APACHE",
    "content": "                              Apache License\n                        Version 2.0, January 2004\n                     http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined by Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity\n   exercising permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or\n   Object form, made available under the License, as indicated by a\n   copyright notice that is included in or attached to the work\n   (an example is provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original version of the Work and any modifications or additions\n   to that Work or Derivative Works thereof, that is intentionally\n   submitted to Licensor for inclusion in the Work by the copyright owner\n   or by an individual or Legal Entity authorized to submit on behalf of\n   the copyright owner. For the purposes of this definition, \"submitted\"\n   means any form of electronic, verbal, or written communication sent\n   to the Licensor or its representatives, including but not limited to\n   communication on electronic mailing lists, source code control systems,\n   and issue tracking systems that are managed by, or on behalf of, the\n   Licensor for the purpose of discussing and improving the Work, but\n   excluding communication that is conspicuously marked or otherwise\n   designated in writing by the copyright owner as \"Not a Contribution.\"\n\n   \"Contributor\" shall mean Licensor and any individual or Legal Entity\n   on behalf of whom a Contribution has been received by Licensor and\n   subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file as part of its\n       distribution, then any Derivative Works that You distribute must\n       include a readable copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE text from the Work, provided\n       that such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to the Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n   To apply the Apache License to your work, attach the following\n   boilerplate notice, with the fields enclosed by brackets \"[]\"\n   replaced with your own identifying information. (Don't include\n   the brackets!)  The text should be enclosed in the appropriate\n   comment syntax for the file format. We also recommend that a\n   file or class name and description of purpose be included on the\n   same \"printed page\" as the copyright notice for easier\n   identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "LICENSE-MIT",
    "content": "Copyright (c) 2014 Jorge Aparicio\n\nPermission is hereby granted, free of charge, to any\nperson obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the\nSoftware without restriction, including without\nlimitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software\nis furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice\nshall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF\nANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\nSHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\nIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Rust By Example\n\n[![Build Status](https://github.com/rust-lang/rust-by-example/actions/workflows/rbe.yml/badge.svg)](https://github.com/rust-lang/rust-by-example/actions)\n\nLearn Rust with examples (Live code editor included)\n\n## Using\n\nIf you'd like to read Rust by Example, you can visit <https://doc.rust-lang.org/rust-by-example/>\nto read it online.\n\nIf you'd like to read it locally, [install Rust], and then:\n\n```bash\ngit clone https://github.com/rust-lang/rust-by-example\ncd rust-by-example\ncargo install mdbook\nmdbook build\nmdbook serve\n```\n\n[install Rust]: https://www.rust-lang.org/tools/install\n\nTo be able to run the examples, you must be connected to the internet; you can\nread all content offline, however!\n\n**The following warnings can be ignored safely.**\n\n```text\n WARN The command `mdbook-gettext` for preprocessor `gettext` was not found, but is marked as optional.\n```\n\n### Using translated version\n\nIf there is a translated resource in `po/` directory, it can be specified through `MDBOOK_BOOK__LANGUAGE` like below:\n\n```bash\ngit clone https://github.com/rust-lang/rust-by-example\ncd rust-by-example\ncargo install mdbook\nMDBOOK_BOOK__LANGUAGE=ja mdbook build\nMDBOOK_BOOK__LANGUAGE=ja mdbook serve\n```\n\n## Contributing\n\nPlease see the [CONTRIBUTING.md] file for more details.\n\n[CONTRIBUTING.md]: https://github.com/rust-lang/rust-by-example/blob/master/CONTRIBUTING.md\n\n## Translating\n\nPlease see the [TRANSLATING.md] file for more details.\n\n[TRANSLATING.md]: https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md\n\n### Translating guide for each languages\n\n* Japanese/日本語: [TRANSLATING_JA.md]\n\n[TRANSLATING_JA.md]: https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING_JA.md\n\n* Chinese/中文: [TRANSLATING_ZH.md]\n\n[TRANSLATING_ZH.md]: https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING_ZH.md\n\n## Translations to other languages\n\n* [Bulgarian](https://github.com/kberov/rust-by-example-bg)\n* [French](https://github.com/Songbird0/FR_RBE)\n* [Russian](https://github.com/ruRust/rust-by-example)\n* [Vietnamese](https://github.com/EyesCrypto-Insights/rust-by-example-vn)\n* [Portuguese](https://github.com/nazarepiedady/rust-com-exemplos)\n\n## License\n\nRust by Example is licensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n  <http://www.apache.org/licenses/LICENSE-2.0>)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  <http://opensource.org/licenses/MIT>)\n\nat your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in Rust by Example by you, as defined in the Apache-2.0 license, shall be\ndually licensed as above, without any additional terms or conditions.\n"
  },
  {
    "path": "TRANSLATING.md",
    "content": "# Rust by Example translation guidelines\n\nPlease see the [CONTRIBUTING.md] file for general contribution guidelines.\nThis file describes about the translation workflow.\n\n[CONTRIBUTING.md]: https://github.com/rust-lang/rust-by-example/blob/master/CONTRIBUTING.md\n\n## Translation workflow\n\n### Preparation\n\nRBE uses [mdbook-i18n-helpers](https://github.com/google/mdbook-i18n-helpers) as a translation framework.\nThe following tools are required.\n\n* GNU gettext utilities ( `msgmerge` and `msgcat` )\n* mdbook-i18n-helpers ( `cargo install mdbook-i18n-helpers` )\n\n### Creating and Updating Translations\n\nPlease see the [mdbook-i18n-helpers USAGE](https://github.com/google/mdbook-i18n-helpers/blob/main/i18n-helpers/USAGE.md) file for the detailed usage of mdbook-i18n-helpers.\nThe summarized command list is below:\n\n#### Generating a message template\n\nThe generated message templete `po/messages.pot` is required to create or update translations.\n\n```bash\nMDBOOK_OUTPUT='{\"xgettext\": {\"pot-file\": \"messages.pot\"}}' \\\n  mdbook build -d po\n```\n\n#### Creating a new translation resource\n\n`xx` is [ISO 639](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code.\n\n```bash\nmsginit -i po/messages.pot -l xx -o po/xx.po\n```\n\n#### Updating the existing translation resource\n\n```bash\nmsgmerge --update po/xx.po po/messages.pot\n```\n\n#### Tracking translation progress\n\n```bash\nmsgfmt --statistics po/xx.po\n```\n\n### Editing translation resources\n\nAfter generating a translation resource `po/xx.po`, you can write translation messages in `msgstr` entry of `po/xx.po`.\nTo build a translated book, the following command can be used.\n\n```bash\nMDBOOK_BOOK__LANGUAGE=xx mdbook build\nMDBOOK_BOOK__LANGUAGE=xx mdbook serve\n```\n\n### Add a language entry\n\nPlease add a language entry in `.github/workflows/rbe.yml`, `theme/head.hbs`, and `src/bootstrap/src/core/build_steps/doc.rs` in [rust-lang/rust](https://github.com/rust-lang/rust) like below:\n\n* `rbe.yml`\n\n```yml\nenv:\n  # Update the language picker in index.hbs to link new languages.\n  LANGUAGES: xx yy zz\n```\n\n* `head.hbs`\n\n```html\n<ul id=\"language-list\" class=\"theme-popup\" aria-label=\"Languages\" role=\"menu\">\n  <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n      <a id=\"en\">English</a>\n  </button></li>\n  <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n      <a id=\"xx\">XX language</a>\n  </button></li>\n  <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n      <a id=\"yy\">YY language</a>\n  </button></li>\n  <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n      <a id=\"zz\">ZZ language</a>\n  </button></li>\n</ul>\n```\n\n* `src/bootstrap/src/core/build_steps/doc.rs` in [rust-lang/rust](https://github.com/rust-lang/rust)\n\n```rust\nRustByExample, \"src/doc/rust-by-example\", \"rust-by-example\", &[\"xx\", \"yy\", \"zz\"], submodule;\n```\n"
  },
  {
    "path": "TRANSLATING_JA.md",
    "content": "# Rust by Example 日本語版 翻訳ガイド\n\n日本語版の翻訳は https://github.com/rust-lang-ja/rust-by-example にて日本語のレビューを行います。\n翻訳に貢献される方は以下のフローに従ってください。\n\n* https://github.com/rust-lang/rust-by-example を自身のアカウントにフォークする\n* `po/ja.po` に訳文を追加・変更する\n* https://github.com/rust-lang-ja/rust-by-example （の`ja`ブランチ）にプルリクエストを出す\n  + 直接オリジナルのリポジトリに出しても訳文自体のレビューができないので rust-lang-ja で一旦レビューします\n  + 上記リポジトリは`ja`ブランチがデフォルトなので通常通りプルリクエストを作成すれば`ja`ブランチ向けになります\n\nrust-lang-ja のレビュワーは以下のように作業します。\n\n* プルリクエストをレビューし、問題なければ`ja`ブランチにマージ\n* https://github.com/rust-lang/rust-by-example にプルリクエストを出す\n\n最終的に https://github.com/rust-lang/rust-by-example でマージされれば公開されます。\n\n## 翻訳の方法\n\n### 全般的なこと\n\n* 文体は「です・ます」調\n* 記号類は原則として全角（括弧`（）`やコロン`：`など）\n\n### 対訳表\n\n* カタカナ語のままで違和感のない用語はカタカナ語のまま使う\n  + 気持としては「無理矢理和訳」を避けたい。そのための基準。\n  + カタカナ語の方が用語として認識しやすい\n* カタカナ語の末尾の長音記号「ー」は省く(JIS規格)\n* 構文キーワードなどはそのままアルファベットを使う\n\n| English                          | 日本語\n| :------------------------------- | :-------------\n| (lockの) acquire                 | 獲得\n| (lockの) release                 | 解放\n| Intrinsics                       | Intrinsic\n| Lang Items                       | Lang Item\n| Universal Function Call Syntax   | 共通の関数呼び出し構文\n| abort                            | アボート\n| activity                         | 実践\n| aggregate type                   | 合成型\n| alignment                        | アラインメント\n| allocator                        | アロケータ\n| antipattern                      | アンチパターン\n| application                      | アプリケーション\n| argument type                    | 引数タイプ\n| arity                            | アリティ\n| array                            | 配列\n| assignment                       | 代入\n| associated -                     | 関連-\n| atomic                           | アトミック\n| attribute                        | アトリビュート\n| binary                           | バイナリ\n| binding                          | 束縛\n| block                            | ブロック\n| borrow  checker                  | 借用チェッカー\n| borrowing                        | 借用\n| bounds                           | 境界\n| bug                              | バグ\n| capture                          | キャプチャ\n| case analysis                    | 場合分け\n| casting                          | キャスト\n| channel                          | チャネル\n| closure                          | クロージャ\n| code bloat                       | コードの膨張\n| coercion                         | 型強制\n| color model                      | カラーモデル\n| combinator                       | コンビネータ\n| comma                            | カンマ\n| command line                     | コマンドライン\n| compile-time error               | コンパイル時エラー\n| compiler                         | コンパイラ\n| composable                       | 合成可能\n| computer science                 | コンピュータサイエンス\n| concurrency                      | 並行性\n| constant                         | 定数\n| constructor                      | コンストラクタ\n| continuous integration           | 継続的インテグレーション\n| crate                            | クレート\n| custom type                      | カスタム型\n| dangling                         | ダングリング\n| data race                        | データ競合\n| deadlock                         | デッドロック\n| declaration statement            | 宣言文\n| dereferencing                    | 参照外し\n| derive                           | 導出\n| designator                       | 識別子\n| destructor                       | デストラクタ\n| destructuring                    | 分配\n| directive                        | ディレクティブ\n| directory                        | ディレクトリ\n| discriminant                     | 判別子\n| distribution                     | 配布物\n| diverge                          | ダイバージ\n| diverging                        | ダイバージング\n| diverging function               | 発散する関数\n| documentation comment            | ドキュメンテーションコメント\n| documentation test               | ドキュメンテーションテスト\n| early return                     | 早期リターン\n| empty tuple                      | 空タプル\n| encode                           | エンコード\n| endpoint                         | エンドポイント\n| entry point                      | エントリポイント\n| enum                             | 列挙型\n| equality                         | 等値性\n| ergonomic                        | エルゴノミック（人間にとって扱いやすいもの）\n| error                            | エラー\n| error handling                   | エラーハンドリング\n| executable                       | 実行可能形式\n| existentially quantified type    | 存在量型\n| expression statement             | 式文\n| exterior                         | 外側の\n| feature                          | フィーチャ\n| field                            | フィールド\n| foreign                          | 他言語\n| free-standing function           | フリースタンディングな関数\n| full path                        | 絶対パス\n| generic parameter                | ジェネリックパラメータ\n| generics                         | ジェネリクス\n| glob                             | グロブ\n| growable                         | 伸張可能\n| guard                            | ガード\n| handle                           | ハンドル\n| hash                             | ハッシュ\n| hash set                         | ハッシュ集合\n| higher order functions           | 高階関数\n| identifier                       | 識別子\n| immutability                     | イミュータビリティ\n| immutable                        | イミュータブル\n| implement                        | 実装する\n| initialize                       | 初期化する\n| input lifetime                   | 入力ライフタイム\n| install                          | インストール\n| installer                        | インストーラ\n| interior                         | 内側の\n| interpolate                      | インターポーレートする\n| interpolation                    | インターポーレーション\n| key                              | キー\n| keyword                          | キーワード\n| leak                             | リーク\n| least significant bit            | 最下位ビット\n| lending                          | 貸付け\n| library                          | ライブラリ\n| lifetime                         | ライフタイム\n| lifetime coercion                | ライフタイムの圧縮\n| lifetime elision                 | ライフタイムの省略\n| lifetime parameter               | ライフタイムパラメータ\n| link                             | リンク\n| lint                             | リント\n| mangling                         | マングリング\n| match                            | マッチ\n| memory                           | メモリ\n| method                           | メソッド\n| monomorphization                 | 単相化\n| move                             | ムーブ\n| mutability                       | ミュータビリティ\n| mutable                          | ミュータブル\n| mutable binding                  | ミュータブルな束縛\n| mutual-exclusion                 | 相互排他\n| null                             | ヌル\n| numeric literal                  | 数値リテラル\n| object-safe                      | オブジェクト安全\n| offline                          | オフライン\n| opaque                           | オペーク\n| open source                      | オープンソース\n| option                           | オプション\n| output lifetime                  | 出力ライフタイム\n| output type                      | アウトプット型\n| overflow                         | オーバーフロー\n| owner                            | 所有者\n| ownership                        | 所有権\n| panic                            | パニック\n| parameter                        | パラメータ\n| parametric polymorphism          | パラメトリック多相\n| parse                            | パース、パースする\n| partial moves                    | 部分的ムーブ\n| patch                            | パッチ\n| pattern                          | パターン\n| performance                      | パフォーマンス\n| phantom type                     | 幽霊型\n| platform                         | プラットフォーム\n| pointer                          | ポインタ\n| primitive type                   | プリミティブ型\n| private                          | プライベート\n| process                          | プロセス\n| public                           | パブリック\n| r-value                          | 右辺値\n| range                            | レンジ\n| raw pointer                      | 生ポインタ\n| raw identifier                   | 生識別子\n| re-assignment                    | 再代入\n| rebind                           | 再束縛\n| reference count                  | 参照カウント\n| regression                       | リグレッション\n| release                          | リリース\n| return                           | 返す\n| return type                      | リターン型\n| return value                     | 戻り値\n| runtime                          | 実行時\n| safe                             | 安全\n| safety check                     | 安全性検査\n| scope                            | スコープ\n| scoped                           | スコープ化された\n| script                           | スクリプト\n| semantics                        | セマンティクス\n| shadow                           | 覆い隠す\n| shadowing                        | シャドーイング\n| signature                        | シグネチャ\n| signed                           | 符号付き\n| slice                            | スライス\n| slicing                          | スライシング\n| specialized                      | 特殊化された\n| standard library                 | 標準ライブラリ\n| string                           | 文字列\n| string interpolation             | 文字列インターポーレーション\n| struct                           | 構造体\n| structure                        | 構造体\n| sum type                         | 直和型\n| subtrait                         | サブトレイト\n| supertrait                       | スーパートレイト\n| symbol                           | シンボル\n| syntactic sugar                  | 糖衣構文\n| syntax tree                      | 構文木\n| system                           | システム\n| tagged union                     | タグ付き共用体\n| term                             | 項\n| thread-locality                  | スレッドローカル性\n| threadsafe                       | スレッドセーフ\n| tick                             | クオート\n| token trees                      | トークン木\n| trait                            | トレイト\n| transmute                        | トランスミュート\n| tuple                            | タプル\n| tuple struct                     | タプル\n| type alias                       | 型エイリアス\n| type erasure                     | 型消去\n| type family                      | 型族\n| type inference                   | 型推論\n| type parameter                   | 型パラメータ\n| uninstall                        | アンインストール\n| unit  注: `()` の読み            | ユニット\n| unsafe                           | アンセーフ\n| unsigned                         | 符号無し\n| unsized type                     | サイズ不定型\n| unwinding                        | 巻き戻し\n| unwrap                           | アンラップ\n| value constructor                | 値コンストラクタ\n| variable                         | 変数\n| variable binding                 | 変数束縛\n| variant                          | ヴァリアント\n| vector                           | ベクタ\n| version                          | バージョン\n| warning                          | ウォーニング\n| wildcard                         | ワイルドカード\n| wrapper                          | ラッパ\n"
  },
  {
    "path": "TRANSLATING_ZH.md",
    "content": "# Rust by Example 中文版翻译指南\n\nRust by Example 中文版的翻译在 https://github.com/rust-lang-cn/rust-by-example 仓库进行审核和校对。\n\n如果您希望参与翻译，请按照以下流程操作：\n\n1. 复刻（fork）https://github.com/rust-lang/rust-by-example 仓库。\n\n2. 在 `po/zh.po` 文件中添加或修改译文。\n\n3. 向 https://github.com/rust-lang-cn/rust-by-example 仓库的 `zh` 分支提交 PR（Pull Request）。\n   - 先在 rust-lang-cn 仓库进行审校，而非直接向原始仓库提交 PR，这样可以更方便进行译文讨论。\n   - 中文社区仓库的默认分支为 `zh`，因此正常创建 PR 时会自动指向该分支。\n\nrust-lang-cn 翻译组成员的维护流程：\n\n1. 审核并校对提交的 PR，先合并到 `zh` 分支。\n\n2. 向 https://github.com/rust-lang/rust-by-example 原始仓库提交 PR。\n\n## 翻译规范\n\n### 总体原则\n\n* 文风应保持正式、清晰、简洁\n* 标点符号原则上使用全角（如括号\"（）\"和冒号\"：\"等）\n\n### 术语翻译指南\n\n* 对于已经广泛接受的技术术语，保留英文或使用通用的中文翻译\n* 避免生硬的直译，优先考虑符合中文语境的自然表达\n* 保持术语翻译的一致性，可参考 [Rust 语言术语中英文对照表](https://github.com/rust-lang-cn/english-chinese-glossary-of-rust/blob/master/rust-glossary.md)\n"
  },
  {
    "path": "book.toml",
    "content": "[book]\ntitle = \"Rust By Example\"\ndescription = \"Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.\"\nauthors = [\"The Rust Community\"]\n\n[output.html.playpen]\neditable = true\nline-numbers = true\n\n[output.html.fold]\nenable = true\n\n[output.html]\ngit-repository-url = \"https://github.com/rust-lang/rust-by-example\"\nedit-url-template = \"https://github.com/rust-lang/rust-by-example/edit/master/{path}\"\nhash-files = true\nadditional-css = [\n  \"theme/css/language-picker.css\",\n]\n\n[output.html.search]\nuse-boolean-and = true\n\n[rust]\nedition = \"2021\"\n\n[build]\nextra-watch-dirs = [\"po\"]\n\n[preprocessor.gettext]\noptional = true\nafter = [\"links\"]\n"
  },
  {
    "path": "po/es.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Rust By Example\\n\"\n\"POT-Creation-Date: 2025-01-30T21:37:19-06:00\\n\"\n\"PO-Revision-Date: 2025-01-30 21:37-06:00\\n\"\n\"Last-Translator: mrg <miguelraz@gmail.com>\\n\"\n\"Language-Team: Spanish <es@tp.org.es>\\n\"\n\"Language: es\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: src/SUMMARY.md:1\nmsgid \"Summary\"\nmsgstr \"Resumen\"\n\n#: src/SUMMARY.md:3\nmsgid \"Introduction\"\nmsgstr \"Introducción\"\n\n#: src/SUMMARY.md:5 src/hello.md:1\nmsgid \"Hello World\"\nmsgstr \"Hola Mundo\"\n\n#: src/SUMMARY.md:6 src/hello/comment.md:1\nmsgid \"Comments\"\nmsgstr \"Comentarios\"\n\n#: src/SUMMARY.md:7 src/hello/print.md:1\nmsgid \"Formatted print\"\nmsgstr \"Imprimir con formatos\"\n\n#: src/SUMMARY.md:8 src/hello/print/print_debug.md:1\nmsgid \"Debug\"\nmsgstr \"Depuración\"\n\n#: src/SUMMARY.md:9 src/hello/print/print_display.md:1\nmsgid \"Display\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:10 src/hello/print/print_display/testcase_list.md:1\nmsgid \"Testcase: List\"\nmsgstr \"Ejemplot: Lista\"\n\n#: src/SUMMARY.md:11 src/hello/print/fmt.md:1\nmsgid \"Formatting\"\nmsgstr \"Formateo\"\n\n#: src/SUMMARY.md:13 src/primitives.md:1\nmsgid \"Primitives\"\nmsgstr \"Primitivas\"\n\n#: src/SUMMARY.md:14 src/primitives/literals.md:1\nmsgid \"Literals and operators\"\nmsgstr \"Operadores y Literales\"\n\n#: src/SUMMARY.md:15 src/primitives/tuples.md:1\nmsgid \"Tuples\"\nmsgstr \"Tuplas\"\n\n#: src/SUMMARY.md:16 src/primitives/array.md:1\nmsgid \"Arrays and Slices\"\nmsgstr \"Arreglos y slices\"\n\n#: src/SUMMARY.md:18 src/custom_types.md:1\nmsgid \"Custom Types\"\nmsgstr \"Tipos Personalizados\"\n\n#: src/SUMMARY.md:19 src/custom_types/structs.md:1\nmsgid \"Structures\"\nmsgstr \"Estructuras\"\n\n#: src/SUMMARY.md:20 src/custom_types/enum.md:1\nmsgid \"Enums\"\nmsgstr \"Enums\"\n\n#: src/SUMMARY.md:21 src/custom_types/enum/enum_use.md:1\nmsgid \"use\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:22 src/custom_types/enum/c_like.md:1\nmsgid \"C-like\"\nmsgstr \"Herencias de C\"\n\n#: src/SUMMARY.md:23 src/custom_types/enum/testcase_linked_list.md:1\nmsgid \"Testcase: linked-list\"\nmsgstr \"Ejemplo: lista ligada\"\n\n#: src/SUMMARY.md:24 src/custom_types/constants.md:1\nmsgid \"constants\"\nmsgstr \"constantes\"\n\n#: src/SUMMARY.md:26 src/variable_bindings.md:1\nmsgid \"Variable Bindings\"\nmsgstr \"Enlaces de variables\"\n\n#: src/SUMMARY.md:27 src/SUMMARY.md:120 src/SUMMARY.md:123\n#: src/variable_bindings/mut.md:1 src/scope/move/mut.md:1\n#: src/scope/borrow/mut.md:1\nmsgid \"Mutability\"\nmsgstr \"Mutabilidad\"\n\n#: src/SUMMARY.md:28 src/variable_bindings/scope.md:1\nmsgid \"Scope and Shadowing\"\nmsgstr \"Alcance y sombreo\"\n\n#: src/SUMMARY.md:29 src/variable_bindings/declare.md:1\nmsgid \"Declare first\"\nmsgstr \"Declara primero\"\n\n#: src/SUMMARY.md:30 src/variable_bindings/freeze.md:1\nmsgid \"Freezing\"\nmsgstr \"Congelar\"\n\n#: src/SUMMARY.md:32 src/types.md:1\nmsgid \"Types\"\nmsgstr \"Tipos\"\n\n#: src/SUMMARY.md:33 src/types/cast.md:1\nmsgid \"Casting\"\nmsgstr \"Casteo\"\n\n#: src/SUMMARY.md:34 src/types/literals.md:1\nmsgid \"Literals\"\nmsgstr \"Literales\"\n\n#: src/SUMMARY.md:35 src/types/inference.md:1\nmsgid \"Inference\"\nmsgstr \"Inferencia\"\n\n#: src/SUMMARY.md:36 src/SUMMARY.md:124 src/types/alias.md:1\n#: src/scope/borrow/alias.md:1\nmsgid \"Aliasing\"\nmsgstr \"Aliasing\"\n\n#: src/SUMMARY.md:38 src/conversion.md:1\nmsgid \"Conversion\"\nmsgstr \"Conversión\"\n\n#: src/SUMMARY.md:39 src/conversion/from_into.md:1\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` e `Into`\"\n\n#: src/SUMMARY.md:40 src/conversion/try_from_try_into.md:1\nmsgid \"`TryFrom` and `TryInto`\"\nmsgstr \"`TryFrom` y `TryInto`\"\n\n#: src/SUMMARY.md:41\nmsgid \"To and from `String`s\"\nmsgstr \"De y hacia `String`s\"\n\n#: src/SUMMARY.md:43 src/expression.md:1\nmsgid \"Expressions\"\nmsgstr \"Expresiones\"\n\n#: src/SUMMARY.md:45 src/flow_control.md:1\nmsgid \"Flow of Control\"\nmsgstr \"Control de Flujo\"\n\n#: src/SUMMARY.md:46 src/flow_control/if_else.md:1\nmsgid \"if/else\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:47 src/flow_control/loop.md:1\nmsgid \"loop\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:48 src/flow_control/loop/nested.md:1\nmsgid \"Nesting and labels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:49 src/flow_control/loop/return.md:1\nmsgid \"Returning from loops\"\nmsgstr \"Retornar desde bucles\"\n\n#: src/SUMMARY.md:50 src/flow_control/while.md:1\nmsgid \"while\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:51 src/flow_control/for.md:3\nmsgid \"for and range\"\nmsgstr \"for y range\"\n\n#: src/SUMMARY.md:52 src/flow_control/match.md:1\nmsgid \"match\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:53 src/flow_control/match/destructuring.md:1\nmsgid \"Destructuring\"\nmsgstr \"Destructura\"\n\n#: src/SUMMARY.md:54\n#: src/flow_control/match/destructuring/destructure_tuple.md:1\nmsgid \"tuples\"\nmsgstr \"tuplas\"\n\n#: src/SUMMARY.md:55\n#: src/flow_control/match/destructuring/destructure_slice.md:1\nmsgid \"arrays/slices\"\nmsgstr \"arreglos/slices\"\n\n#: src/SUMMARY.md:56 src/flow_control/match/destructuring/destructure_enum.md:1\nmsgid \"enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:57\n#: src/flow_control/match/destructuring/destructure_pointers.md:1\nmsgid \"pointers/ref\"\nmsgstr \"punteros/ref\"\n\n#: src/SUMMARY.md:58\n#: src/flow_control/match/destructuring/destructure_structures.md:1\nmsgid \"structs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:59 src/flow_control/match/guard.md:1\nmsgid \"Guards\"\nmsgstr \"Guardias\"\n\n#: src/SUMMARY.md:60 src/flow_control/match/binding.md:1\nmsgid \"Binding\"\nmsgstr \"Enlaces\"\n\n#: src/SUMMARY.md:61 src/flow_control/if_let.md:1\nmsgid \"if let\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:62 src/flow_control/let_else.md:1\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:63 src/flow_control/while_let.md:1\nmsgid \"while let\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:65 src/SUMMARY.md:103 src/SUMMARY.md:128 src/fn.md:1\n#: src/generics/gen_fn.md:1 src/scope/lifetime/fn.md:1\nmsgid \"Functions\"\nmsgstr \"Funciones\"\n\n#: src/SUMMARY.md:66 src/SUMMARY.md:129 src/scope/lifetime/methods.md:1\nmsgid \"Methods\"\nmsgstr \"Métodos\"\n\n#: src/SUMMARY.md:67 src/fn/closures.md:1\nmsgid \"Closures\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:68 src/fn/closures/capture.md:1\nmsgid \"Capturing\"\nmsgstr \"Capturas\"\n\n#: src/SUMMARY.md:69 src/fn/closures/input_parameters.md:1\nmsgid \"As input parameters\"\nmsgstr \"Como parámetros de entrada\"\n\n#: src/SUMMARY.md:70 src/fn/closures/anonymity.md:1\nmsgid \"Type anonymity\"\nmsgstr \"Anonimidad de tipos\"\n\n#: src/SUMMARY.md:71 src/fn/closures/input_functions.md:1\nmsgid \"Input functions\"\nmsgstr \"Funciones de entrada\"\n\n#: src/SUMMARY.md:72 src/fn/closures/output_parameters.md:1\nmsgid \"As output parameters\"\nmsgstr \"Como parámetros de salida\"\n\n#: src/SUMMARY.md:73 src/fn/closures/closure_examples.md:1\nmsgid \"Examples in `std`\"\nmsgstr \"Ejemplos de `std`\"\n\n#: src/SUMMARY.md:74 src/fn/closures/closure_examples/iter_any.md:1\nmsgid \"Iterator::any\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:75 src/fn/closures/closure_examples/iter_find.md:1\nmsgid \"Searching through iterators\"\nmsgstr \"Buscando con iteradores\"\n\n#: src/SUMMARY.md:76 src/fn/hof.md:1\nmsgid \"Higher Order Functions\"\nmsgstr \"Funciones de Mayor Orden\"\n\n#: src/SUMMARY.md:77 src/fn/diverging.md:1\nmsgid \"Diverging functions\"\nmsgstr \"Funciones Divergentes\"\n\n#: src/SUMMARY.md:79 src/mod.md:1\nmsgid \"Modules\"\nmsgstr \"Módulos\"\n\n#: src/SUMMARY.md:80 src/mod/visibility.md:1\nmsgid \"Visibility\"\nmsgstr \"Visibilidad\"\n\n#: src/SUMMARY.md:81 src/mod/struct_visibility.md:1\nmsgid \"Struct visibility\"\nmsgstr \"Visibilidad de estructuras\"\n\n#: src/SUMMARY.md:82 src/mod/use.md:1\nmsgid \"The `use` declaration\"\nmsgstr \"La declaración `use`\"\n\n#: src/SUMMARY.md:83 src/mod/super.md:1\nmsgid \"`super` and `self`\"\nmsgstr \"`super` y `self`\"\n\n#: src/SUMMARY.md:84 src/mod/split.md:1\nmsgid \"File hierarchy\"\nmsgstr \"Jerarquía de archivos\"\n\n#: src/SUMMARY.md:86 src/SUMMARY.md:98 src/crates.md:1 src/attribute/crate.md:1\n#: src/std_misc/arg.md:30\nmsgid \"Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:87 src/crates/lib.md:1\nmsgid \"Creating a Library\"\nmsgstr \"Creando una Library\"\n\n#: src/SUMMARY.md:88 src/crates/using_lib.md:1\nmsgid \"Using a Library\"\nmsgstr \"Usando un Library\"\n\n#: src/SUMMARY.md:90 src/cargo.md:1\nmsgid \"Cargo\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:91 src/cargo/deps.md:1\nmsgid \"Dependencies\"\nmsgstr \"Dependencias\"\n\n#: src/SUMMARY.md:92 src/cargo/conventions.md:1\nmsgid \"Conventions\"\nmsgstr \"Convenciones\"\n\n#: src/SUMMARY.md:93\nmsgid \"Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:94 src/cargo/build_scripts.md:1\nmsgid \"Build Scripts\"\nmsgstr \"Scripts de Build\"\n\n#: src/SUMMARY.md:96 src/attribute.md:1\nmsgid \"Attributes\"\nmsgstr \"Atributos\"\n\n#: src/SUMMARY.md:97 src/attribute/unused.md:1\nmsgid \"`dead_code`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:99 src/attribute/cfg.md:1\nmsgid \"`cfg`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:100 src/attribute/cfg/custom.md:1\nmsgid \"Custom\"\nmsgstr \"Personalizaciones\"\n\n#: src/SUMMARY.md:102 src/generics.md:1\nmsgid \"Generics\"\nmsgstr \"Genéricos\"\n\n#: src/SUMMARY.md:104 src/generics/impl.md:1\nmsgid \"Implementation\"\nmsgstr \"Implementación\"\n\n#: src/SUMMARY.md:105 src/SUMMARY.md:131 src/SUMMARY.md:137\n#: src/generics/gen_trait.md:1 src/scope/lifetime/trait.md:1 src/trait.md:1\nmsgid \"Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:106 src/SUMMARY.md:132 src/generics/bounds.md:1\n#: src/scope/lifetime/lifetime_bounds.md:1\nmsgid \"Bounds\"\nmsgstr \"Cotas\"\n\n#: src/SUMMARY.md:107 src/generics/bounds/testcase_empty.md:1\nmsgid \"Testcase: empty bounds\"\nmsgstr \"Ejemplo: cotas vacías\"\n\n#: src/SUMMARY.md:108 src/generics/multi_bounds.md:1\nmsgid \"Multiple bounds\"\nmsgstr \"Cotas Múltiples\"\n\n#: src/SUMMARY.md:109 src/generics/where.md:1\nmsgid \"Where clauses\"\nmsgstr \"Cláusulas where\"\n\n#: src/SUMMARY.md:110 src/generics/new_types.md:1\nmsgid \"New Type Idiom\"\nmsgstr \"Modismo New Type\"\n\n#: src/SUMMARY.md:111 src/generics/assoc_items.md:1\nmsgid \"Associated items\"\nmsgstr \"Ítems asociados\"\n\n#: src/SUMMARY.md:112 src/generics/assoc_items/the_problem.md:1\nmsgid \"The Problem\"\nmsgstr \"El Problema\"\n\n#: src/SUMMARY.md:113 src/generics/assoc_items/types.md:1\nmsgid \"Associated types\"\nmsgstr \"Tipos Asociados\"\n\n#: src/SUMMARY.md:114 src/generics/phantom.md:1\nmsgid \"Phantom type parameters\"\nmsgstr \"Parámetros Phantom Type\"\n\n#: src/SUMMARY.md:115 src/generics/phantom/testcase_units.md:1\nmsgid \"Testcase: unit clarification\"\nmsgstr \"Ejemplo: clarificación de unidades\"\n\n#: src/SUMMARY.md:117 src/scope.md:1\nmsgid \"Scoping rules\"\nmsgstr \"Reglas de alcance\"\n\n#: src/SUMMARY.md:118 src/scope/raii.md:1\nmsgid \"RAII\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:119 src/scope/move.md:1\nmsgid \"Ownership and moves\"\nmsgstr \"Ownership y moves\"\n\n#: src/SUMMARY.md:121 src/scope/move/partial_move.md:1\nmsgid \"Partial moves\"\nmsgstr \"Moves parciales\"\n\n#: src/SUMMARY.md:122 src/scope/borrow.md:1\nmsgid \"Borrowing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:125 src/scope/borrow/ref.md:1\nmsgid \"The ref pattern\"\nmsgstr \"El patrón de ref\"\n\n#: src/SUMMARY.md:126 src/scope/lifetime.md:1\nmsgid \"Lifetimes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:127 src/scope/lifetime/explicit.md:1\nmsgid \"Explicit annotation\"\nmsgstr \"Anotación explícita\"\n\n#: src/SUMMARY.md:130 src/scope/lifetime/struct.md:1\nmsgid \"Structs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:133 src/scope/lifetime/lifetime_coercion.md:1\nmsgid \"Coercion\"\nmsgstr \"Coerción\"\n\n#: src/SUMMARY.md:134 src/scope/lifetime/static_lifetime.md:1\nmsgid \"Static\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:135 src/scope/lifetime/elision.md:1\nmsgid \"Elision\"\nmsgstr \"Elisión\"\n\n#: src/SUMMARY.md:138 src/trait/derive.md:1\nmsgid \"Derive\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:139 src/trait/dyn.md:1\nmsgid \"Returning Traits with `dyn`\"\nmsgstr \"Retornando Traits con `dyn`\"\n\n#: src/SUMMARY.md:140 src/trait/ops.md:1\nmsgid \"Operator Overloading\"\nmsgstr \"Sobrecarga de Operadores\"\n\n#: src/SUMMARY.md:141 src/trait/drop.md:1\nmsgid \"Drop\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:142 src/trait/iter.md:1\nmsgid \"Iterators\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:143 src/trait/impl_trait.md:1\nmsgid \"`impl Trait`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:144 src/trait/clone.md:1\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:145 src/trait/supertraits.md:1\nmsgid \"Supertraits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:146 src/trait/disambiguating.md:1\nmsgid \"Disambiguating overlapping traits\"\nmsgstr \"Desambiguando traits empalmados\"\n\n#: src/SUMMARY.md:148\nmsgid \"macro_rules!\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:149 src/macros/syntax.md:1\nmsgid \"Syntax\"\nmsgstr \"Sintaxis\"\n\n#: src/SUMMARY.md:150 src/macros/designators.md:1\nmsgid \"Designators\"\nmsgstr \"Designadores\"\n\n#: src/SUMMARY.md:151 src/macros/overload.md:1\nmsgid \"Overload\"\nmsgstr \"Sobrecarga\"\n\n#: src/SUMMARY.md:152 src/macros/repeat.md:1\nmsgid \"Repeat\"\nmsgstr \"Repetición\"\n\n#: src/SUMMARY.md:153 src/macros/dry.md:1\nmsgid \"DRY (Don't Repeat Yourself)\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:154\nmsgid \"DSL (Domain Specific Languages)\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:155\nmsgid \"Variadics\"\nmsgstr \"Variádicas\"\n\n#: src/SUMMARY.md:157 src/error.md:1\nmsgid \"Error handling\"\nmsgstr \"Manejo de Errores\"\n\n#: src/SUMMARY.md:158 src/error/panic.md:1\nmsgid \"`panic`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:159\nmsgid \"`abort` & `unwind`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:160 src/error/option_unwrap.md:1\nmsgid \"`Option` & `unwrap`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:161 src/error/option_unwrap/question_mark.md:1\nmsgid \"Unpacking options with `?`\"\nmsgstr \"Desempacando Options con `?`\"\n\n#: src/SUMMARY.md:162 src/error/option_unwrap/map.md:1\nmsgid \"Combinators: `map`\"\nmsgstr \"Combinadores: `map`\"\n\n#: src/SUMMARY.md:163 src/error/option_unwrap/and_then.md:1\nmsgid \"Combinators: `and_then`\"\nmsgstr \"Combinadores: `and_then`\"\n\n#: src/SUMMARY.md:164\nmsgid \"Defaults: `or`, `or_else`, `get_or_insert`, `get_or_insert_with`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:165 src/SUMMARY.md:183 src/error/result.md:1\n#: src/std/result.md:1\nmsgid \"`Result`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:166 src/error/result/result_map.md:1\nmsgid \"`map` for `Result`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:167 src/error/result/result_alias.md:1\nmsgid \"aliases for `Result`\"\nmsgstr \"aliases para `Result`\"\n\n#: src/SUMMARY.md:168 src/error/result/early_returns.md:1\nmsgid \"Early returns\"\nmsgstr \"Retornos tempranos\"\n\n#: src/SUMMARY.md:169 src/error/result/enter_question_mark.md:1\nmsgid \"Introducing `?`\"\nmsgstr \"Introduciendo `?`\"\n\n#: src/SUMMARY.md:170 src/error/multiple_error_types.md:1\nmsgid \"Multiple error types\"\nmsgstr \"Mùltiples tipos de errores\"\n\n#: src/SUMMARY.md:171 src/error/multiple_error_types/option_result.md:1\nmsgid \"Pulling `Result`s out of `Option`s\"\nmsgstr \"Sacando `Result`s de `Option`s\"\n\n#: src/SUMMARY.md:172 src/error/multiple_error_types/define_error_type.md:1\nmsgid \"Defining an error type\"\nmsgstr \"Definiendo un tipo de error\"\n\n#: src/SUMMARY.md:173 src/error/multiple_error_types/boxing_errors.md:1\nmsgid \"`Box`ing errors\"\nmsgstr \"`Box`ing de errores\"\n\n#: src/SUMMARY.md:174 src/error/multiple_error_types/reenter_question_mark.md:1\nmsgid \"Other uses of `?`\"\nmsgstr \"Otros usos de `?`\"\n\n#: src/SUMMARY.md:175 src/error/multiple_error_types/wrap_error.md:1\nmsgid \"Wrapping errors\"\nmsgstr \"Envolviendo errores\"\n\n#: src/SUMMARY.md:176 src/error/iter_result.md:1\nmsgid \"Iterating over `Result`s\"\nmsgstr \"Iterando sobre `Result`s\"\n\n#: src/SUMMARY.md:178 src/std.md:1\nmsgid \"Std library types\"\nmsgstr \"Tipos de la biblioteca std\"\n\n#: src/SUMMARY.md:179 src/std/box.md:1\nmsgid \"Box, stack and heap\"\nmsgstr \"Box, stack y heap\"\n\n#: src/SUMMARY.md:180 src/std/vec.md:1\nmsgid \"Vectors\"\nmsgstr \"Vectores\"\n\n#: src/SUMMARY.md:181 src/std/str.md:1\nmsgid \"Strings\"\nmsgstr \"Cadenas\"\n\n#: src/SUMMARY.md:182 src/std/option.md:1\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md:184 src/std/result/question_mark.md:1\nmsgid \"`?`\"\nmsgstr \"`?`\"\n\n#: src/SUMMARY.md:185 src/std/panic.md:1\nmsgid \"`panic!`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:186 src/std/hash.md:1\nmsgid \"HashMap\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:187 src/std/hash/alt_key_types.md:1\nmsgid \"Alternate/custom key types\"\nmsgstr \"Tipos de llaves personalizadas/alternas\"\n\n#: src/SUMMARY.md:188 src/std/hash/hashset.md:1\nmsgid \"HashSet\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:189 src/std/rc.md:1\nmsgid \"`Rc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:190\nmsgid \"`Arc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:192 src/std_misc.md:1\nmsgid \"Std misc\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:193 src/std_misc.md:6 src/std_misc/threads.md:1\nmsgid \"Threads\"\nmsgstr \"Hilos\"\n\n#: src/SUMMARY.md:194 src/std_misc/threads/testcase_mapreduce.md:1\nmsgid \"Testcase: map-reduce\"\nmsgstr \"Ejemplo: map-reduce\"\n\n#: src/SUMMARY.md:195 src/std_misc.md:7 src/std_misc/channels.md:1\nmsgid \"Channels\"\nmsgstr \"Canales\"\n\n#: src/SUMMARY.md:196 src/std_misc/path.md:1\nmsgid \"Path\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:197 src/std_misc.md:8 src/std_misc/file.md:1\nmsgid \"File I/O\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:198 src/std_misc/file/open.md:1\nmsgid \"`open`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:199 src/std_misc/file/create.md:1\nmsgid \"`create`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:200 src/std_misc/file/read_lines.md:1\nmsgid \"`read_lines`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:201 src/std_misc/process.md:1\nmsgid \"Child processes\"\nmsgstr \"Procesos hijos\"\n\n#: src/SUMMARY.md:202 src/std_misc/process/pipe.md:1\nmsgid \"Pipes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:203 src/std_misc/process/wait.md:1\nmsgid \"Wait\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:204 src/std_misc/fs.md:1\nmsgid \"Filesystem Operations\"\nmsgstr \"Operaciones de Sistema Operativo\"\n\n#: src/SUMMARY.md:205 src/std_misc/arg.md:1\nmsgid \"Program arguments\"\nmsgstr \"Argumentos del Programa\"\n\n#: src/SUMMARY.md:206 src/std_misc/arg/matching.md:1\nmsgid \"Argument parsing\"\nmsgstr \"Parse de argumentos\"\n\n#: src/SUMMARY.md:207 src/std_misc/ffi.md:1\nmsgid \"Foreign Function Interface\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:209 src/cargo/test.md:1 src/testing.md:1\nmsgid \"Testing\"\nmsgstr \"Pruebas\"\n\n#: src/SUMMARY.md:210 src/testing/unit_testing.md:1\nmsgid \"Unit testing\"\nmsgstr \"Pruebas Unitarias\"\n\n#: src/SUMMARY.md:211 src/testing/doc_testing.md:1\nmsgid \"Documentation testing\"\nmsgstr \"Pruebas de Documentación\"\n\n#: src/SUMMARY.md:212 src/testing/integration_testing.md:1\nmsgid \"Integration testing\"\nmsgstr \"Pruebas de integración\"\n\n#: src/SUMMARY.md:213\nmsgid \"Dev-dependencies\"\nmsgstr \"Dependencias de desarrollo\"\n\n#: src/SUMMARY.md:215 src/unsafe.md:1\nmsgid \"Unsafe Operations\"\nmsgstr \"Operaciones Unsafe\"\n\n#: src/SUMMARY.md:216 src/unsafe/asm.md:1\nmsgid \"Inline assembly\"\nmsgstr \"Ensamblador Inline\"\n\n#: src/SUMMARY.md:218 src/compatibility.md:1\nmsgid \"Compatibility\"\nmsgstr \"Compatibilidad \"\n\n#: src/SUMMARY.md:219 src/compatibility/raw_identifiers.md:1\nmsgid \"Raw identifiers\"\nmsgstr \"Identificadores llanos\"\n\n#: src/SUMMARY.md:221 src/meta.md:1\nmsgid \"Meta\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:222 src/meta/doc.md:1\nmsgid \"Documentation\"\nmsgstr \"Documentación\"\n\n#: src/SUMMARY.md:223 src/meta/playground.md:1\nmsgid \"Playground\"\nmsgstr \"\"\n\n#: src/index.md:1\nmsgid \"Rust by Example\"\nmsgstr \"\"\n\n#: src/index.md:3\nmsgid \"\"\n\"[Rust](https://www.rust-lang.org/) is a modern systems programming language \"\n\"focusing on safety, speed, and concurrency. It accomplishes these goals by \"\n\"being memory safe without using garbage collection.\"\nmsgstr \"\"\n\"[Rust] (https://www.rust-lang.org/) es un lenguaje de programación de \"\n\"sistemas modernosconcentrado en la seguridad, la velocidad y la \"\n\"concurrencia. Logra estos objetivos altener seguridad de memoria sin usar la \"\n\"recolección de basura.\"\n\n#: src/index.md:7\nmsgid \"\"\n\"Rust by Example (RBE) is a collection of runnable examples that illustrate \"\n\"various Rust concepts and standard libraries. To get even more out of these \"\n\"examples, don't forget to [install Rust locally](https://www.rust-lang.org/\"\n\"tools/install) and check out the [official docs](https://doc.rust-lang.org/\"\n\"std/). Additionally for the curious, you can also [check out the source code \"\n\"for this site](https://github.com/rust-lang/rust-by-example).\"\nmsgstr \"\"\n\"Rust By Example (RBE) es una colección de ejemplos ejecutables que \"\n\"ilustranvarios conceptos de Rust y sus biblioteca estándar. Para obtener aún \"\n\"más de estosejemplos, no olvide [instalar Rust localmente] (https://www.rust-\"\n\"lang.org/tools/install) y consulte los [documentos oficiales](https://doc.\"\n\"rust-lang.org/std/). Además, para la gente curiosa, también puede [ver el \"\n\"código fuentepara este sitio](https://github.com/rust-lang/rust-by-example).\"\n\n#: src/index.md:12\nmsgid \"Now let's begin!\"\nmsgstr \"¡Comencemos!\"\n\n#: src/index.md:14\nmsgid \"[Hello World](hello.md) - Start with a traditional Hello World program.\"\nmsgstr \"\"\n\"[Hola Mundo](hello.md) - Empieza con el programa tradicional Hola Mundo.\"\n\n#: src/index.md:16\nmsgid \"\"\n\"[Primitives](primitives.md) - Learn about signed integers, unsigned integers \"\n\"and other primitives.\"\nmsgstr \"\"\n\"[Primitivas](primitives.md) - Aprende sobre enteros con signo, enteros sin \"\n\"signo y otras primitivas.\"\n\n#: src/index.md:18\nmsgid \"[Custom Types](custom_types.md) - `struct` and `enum`.\"\nmsgstr \"[Tipos Personalizados](custom_types.md) - `struct` y `enum`.\"\n\n#: src/index.md:20\nmsgid \"\"\n\"[Variable Bindings](variable_bindings.md) - mutable bindings, scope, \"\n\"shadowing.\"\nmsgstr \"\"\n\"[Enlaces de Variables](variable_bindings.md) - enlaces mutables, alcance, \"\n\"sombreo.\"\n\n#: src/index.md:22\nmsgid \"[Types](types.md) - Learn about changing and defining types.\"\nmsgstr \"[Tipos](types.md) - Aprende sobre cómo cambiar y definir tipos.\"\n\n#: src/index.md:24\nmsgid \"\"\n\"[Conversion](conversion.md) - Convert between different types, such as \"\n\"strings, integers, and floats.\"\nmsgstr \"\"\n\"[Conversión](conversion.md) - Convertir entre diferentes tipos, como \"\n\"cadenas, enteros y flotantes.\"\n\n#: src/index.md:26\nmsgid \"\"\n\"[Expressions](expression.md) - Learn about Expressions & how to use them.\"\nmsgstr \"\"\n\"[Expresiones](expression.md) - Aprenda sobre expresiones y cómo usarlas.\"\n\n#: src/index.md:28\nmsgid \"[Flow of Control](flow_control.md) - `if`/`else`, `for`, and others.\"\nmsgstr \"[Control de Flujo](flow_control.md) - `if`/`else`, `for`, y otros.\"\n\n#: src/index.md:30\nmsgid \"\"\n\"[Functions](fn.md) - Learn about Methods, Closures and Higher Order \"\n\"Functions.\"\nmsgstr \"\"\n\"[Funciones](fn.md) - Aprender sobre métodos, closures y Funciones de Orden \"\n\"Superior.\"\n\n#: src/index.md:32\nmsgid \"[Modules](mod.md) - Organize code using modules\"\nmsgstr \"[Módulos](mod.md) - Organizar código usando módulos\"\n\n#: src/index.md:34\nmsgid \"\"\n\"[Crates](crates.md) - A crate is a compilation unit in Rust. Learn to create \"\n\"a library.\"\nmsgstr \"\"\n\"[Crates](crates.md) - Una caja es una unidad de compilación en Rust. Aprende \"\n\"a crear una biblioteca.\"\n\n#: src/index.md:36\nmsgid \"\"\n\"[Cargo](cargo.md) - Go through some basic features of the official Rust \"\n\"package management tool.\"\nmsgstr \"\"\n\"[Cargo](cargo.md) - Realice algunas características básicas de la \"\n\"herramienta de Rust oficial gestión de paquetes.\"\n\n#: src/index.md:38\nmsgid \"\"\n\"[Attributes](attribute.md) - An attribute is metadata applied to some \"\n\"module, crate or item.\"\nmsgstr \"\"\n\"[Atributos](attribute.md) - Un atributo son metadatos aplicados a algún \"\n\"módulo, crate o ítem.\"\n\n#: src/index.md:40\nmsgid \"\"\n\"[Generics](generics.md) - Learn about writing a function or data type which \"\n\"can work for multiple types of arguments.\"\nmsgstr \"\"\n\"[Genéricos](generics.md) - Aprenda a escribir una función o tipo de datos \"\n\"que puede funcionar para múltiples tipos de argumentos.\"\n\n#: src/index.md:42\nmsgid \"\"\n\"[Scoping rules](scope.md) - Scopes play an important part in ownership, \"\n\"borrowing, and lifetimes.\"\nmsgstr \"\"\n\"[Reglas de alcance](scope.md) - Los alcances juegan un papel importante del \"\n\"ownership, borrowing y lifetimes.\"\n\n#: src/index.md:44\nmsgid \"\"\n\"[Traits](trait.md) - A trait is a collection of methods defined for an \"\n\"unknown type: `Self`\"\nmsgstr \"\"\n\"[Traits](trait.md) - Un trait es una colección de métodos definidos para un \"\n\"tipo desconocido: 'Self'\"\n\n#: src/index.md:46\nmsgid \"\"\n\"[Macros](macros.md) - Macros are a way of writing code that writes other \"\n\"code, which is known as metaprogramming.\"\nmsgstr \"\"\n\"[Macros](macros.md) - Las macros son una forma de escribir código que \"\n\"escribe a otroscódigos, lo cual se conoce como metaprogramación.\"\n\n#: src/index.md:48\nmsgid \"[Error handling](error.md) - Learn Rust way of handling failures.\"\nmsgstr \"[Manejo de Errores](error.md) - Aprende a manejar errores con Rust.\"\n\n#: src/index.md:50\nmsgid \"\"\n\"[Std library types](std.md) - Learn about some custom types provided by \"\n\"`std` library.\"\nmsgstr \"\"\n\"[Tipos de la librería std](std.md) - Aprenda sobre algunos tipos de la \"\n\"librería`std`.\"\n\n#: src/index.md:52\nmsgid \"[Std misc](std_misc.md) - More custom types for file handling, threads.\"\nmsgstr \"\"\n\"[Std misc](std_misc.md) - Más tipos personalizados para el manejo de \"\n\"archivos, hilos.\"\n\n#: src/index.md:54\n#, fuzzy\nmsgid \"[Testing](testing.md) - All sorts of testing in Rust.\"\nmsgstr \"[Pruebas](testing.md) - Todo tipo de pruebas en Rust.\"\n\n#: src/index.md:56\nmsgid \"\"\n\"[Unsafe Operations](unsafe.md) - Learn about entering a block of unsafe \"\n\"operations.\"\nmsgstr \"\"\n\"[Operaciones Unsafe](unsafe.md) - Aprenda sobre el uso de bloques de \"\n\"operaciones unsafe.\"\n\n#: src/index.md:58\nmsgid \"\"\n\"[Compatibility](compatibility.md) - Handling Rust's evolution and potential \"\n\"compatibility issues.\"\nmsgstr \"\"\n\"[Compatibilidad](compatibility.md) - Manejo de la evolución de Rust y \"\n\"potenciales problemas de compatibilidad.\"\n\n#: src/index.md:60\nmsgid \"[Meta](meta.md) - Documentation, Benchmarking.\"\nmsgstr \"[Meta](meta.md) - Documentación, Benchmarking.\"\n\n#: src/hello.md:3\nmsgid \"This is the source code of the traditional Hello World program.\"\nmsgstr \"Este es el código fuente del programa tradicional Hello World.\"\n\n#: src/hello.md:6\nmsgid \"\"\n\"// This is a comment, and is ignored by the compiler.\\n\"\n\"// You can test this code by clicking the \\\"Run\\\" button over there ->\\n\"\n\"// or if you prefer to use your keyboard, you can use the \\\"Ctrl + Enter\\\"\\n\"\n\"// shortcut.\\n\"\nmsgstr \"\"\n\"// Este es un comentario, y es ignorado por el compilador.\\n\"\n\"// Puede probar este código haciendo clic en el botón \\\"Run\\\" allí -> \\n\"\n\"// o si prefiere usar su teclado, puede usar el atajo \\\"Ctrl + Enter\\\".\\n\"\n\n#: src/hello.md:10\nmsgid \"\"\n\"// This code is editable, feel free to hack it!\\n\"\n\"// You can always return to the original code by clicking the \\\"Reset\\\" \"\n\"button ->\\n\"\nmsgstr \"\"\n\"// Este código es editable, ¡siéntete libre de hackearlo!\\n\"\n\"// Siempre puede volver al código original haciendo clic en \\\"Reset\\\" botón -\"\n\"> \\n\"\n\n#: src/hello.md:13\nmsgid \"// This is the main function.\\n\"\nmsgstr \"// Esta es la función main\"\n\n#: src/hello.md:16\nmsgid \"// Statements here are executed when the compiled binary is called.\\n\"\nmsgstr \"\"\n\"// Las oraciones aquí se ejecutan cuando el binario compilado es llamado.\\n\"\n\n#: src/hello.md:18\nmsgid \"// Print text to the console.\\n\"\nmsgstr \"// Imprime el texto a la consola.\\n\"\n\n#: src/hello.md:19 src/error/result.md:55 src/meta/playground.md:12\nmsgid \"\\\"Hello World!\\\"\"\nmsgstr \"\\\"Hello World!\\\"\"\n\n#: src/hello.md:23\nmsgid \"`println!` is a [_macro_](macros.md) that prints text to the console.\"\nmsgstr \"`println!` es un [_macro_](macros.md) que imprime text a la consola.\"\n\n#: src/hello.md:26\nmsgid \"A binary can be generated using the Rust compiler: `rustc`.\"\nmsgstr \"Un binario se puede generar usand el compilador de Rust: `rustc`.\"\n\n#: src/hello.md:32\nmsgid \"`rustc` will produce a `hello` binary that can be executed.\"\nmsgstr \"`rustc` producirá un binario `hello` que puede ser ejecutado.\"\n\n#: src/hello.md:39 src/hello/print/print_display.md:107\n#: src/hello/print/print_display/testcase_list.md:53 src/hello/print/fmt.md:70\n#: src/primitives/tuples.md:64 src/custom_types/structs.md:89\nmsgid \"Activity\"\nmsgstr \"Actividad\"\n\n#: src/hello.md:41\nmsgid \"\"\n\"Click 'Run' above to see the expected output. Next, add a new line with a \"\n\"second `println!` macro so that the output shows:\"\nmsgstr \"\"\n\"Haga clic en 'Run' arriba para ver la salida esperada. A continuación, \"\n\"agregue una nueva línea con unsegundo `println!` macro para que la salida \"\n\"muestre:\"\n\n#: src/hello/comment.md:3\nmsgid \"\"\n\"Any program requires comments, and Rust supports a few different varieties:\"\nmsgstr \"\"\n\"Cualquier programa requiere comentarios, y Rust admite algunas variedades \"\n\"diferentes:\"\n\n#: src/hello/comment.md:6\nmsgid \"_Regular comments_ which are ignored by the compiler:\"\nmsgstr \"_Comentarios regulares_ que el compilador ignora:\"\n\n#: src/hello/comment.md:7\nmsgid \"`// Line comments which go to the end of the line.`\"\nmsgstr \"`// Comentarios de línea que van al final de la línea.`\"\n\n#: src/hello/comment.md:8\nmsgid \"`/* Block comments which go to the closing delimiter. */`\"\nmsgstr \"`/* Comentarios de bloque que van al delimitador de cierre. */`\"\n\n#: src/hello/comment.md:9\nmsgid \"\"\n\"_Doc comments_ which are parsed into HTML library [documentation](../meta/\"\n\"doc.md):\"\nmsgstr \"\"\n\"_Comentarios de Doc_ que se parsean en la librería HTML [documentation](../ \"\n\"meta/doc.md):\"\n\n#: src/hello/comment.md:10\nmsgid \"`/// Generate library docs for the following item.`\"\nmsgstr \"`/// Genera docs de librería para el siguiente elemento.`\"\n\n#: src/hello/comment.md:11\nmsgid \"`//! Generate library docs for the enclosing item.`\"\nmsgstr \"`//! Genera docs de librería para el artículo adjunto.`\"\n\n#: src/hello/comment.md:15\nmsgid \"\"\n\"// This is an example of a line comment.\\n\"\n\"    // There are two slashes at the beginning of the line.\\n\"\n\"    // And nothing written after these will be read by the compiler.\\n\"\nmsgstr \"\"\n\"// Este es un ejemplo de un comentario de línea.\\n\"\n\"   // Hay dos slashes al comienzo de la línea.\\n\"\n\"   // y nada escrito después de estos será leído por el compilador.\\n\"\n\n#: src/hello/comment.md:19\nmsgid \"// println!(\\\"Hello, world!\\\");\\n\"\nmsgstr \"\"\n\n#: src/hello/comment.md:21\nmsgid \"// Run it. See? Now try deleting the two slashes, and run it again.\\n\"\nmsgstr \"\"\n\"// Ejecútalo. ¿Ves? Ahora intenta eliminar las dos barras y ejecútalo \"\n\"nuevamente.\\n\"\n\n#: src/hello/comment.md:23\nmsgid \"\"\n\"/*\\n\"\n\"     * This is another type of comment, a block comment. In general,\\n\"\n\"     * line comments are the recommended comment style. But block comments\\n\"\n\"     * are extremely useful for temporarily disabling chunks of code.\\n\"\n\"     * /* Block comments can be /* nested, */ */ so it takes only a few\\n\"\n\"     * keystrokes to comment out everything in this main() function.\\n\"\n\"     * /*/*/* Try it yourself! */*/*/\\n\"\n\"     */\"\nmsgstr \"\"\n\"/*\\n\"\n\"orte     * Este es otro tipo de comentario, un comentario en bloque. En \"\n\"general,\\n\"\n\"     * los comentarios de línea son el estilo de comentarios recomendado. \"\n\"Pero los comentarios de bloque\\n\"\n\"     * son extremadamente útiles para deshabilitar temporalmente los \"\n\"segmentos de código.\\n\"\n\"     * /* Los comentarios de bloque pueden ser /* anidados, */ */ por lo que \"\n\"solo se necesitan unos pocos\\n\"\n\"     * teclazos para comentar todo en esta función main().\\n\"\n\"     * /*/*/*¡Pruébalo! */*/*/\\n\"\n\" */\"\n\n#: src/hello/comment.md:32\nmsgid \"\"\n\"/*\\n\"\n\"    Note: The previous column of `*` was entirely for style. There's\\n\"\n\"    no actual need for it.\\n\"\n\"    */\"\nmsgstr \"\"\n\"/*\\n\"\n\"   Nota: la columna anterior a `*` es completamente por estilo. No hay\\n\"\n\"   hay necesidad real para ello. \\n\"\n\"    */\"\n\n#: src/hello/comment.md:37\nmsgid \"\"\n\"// You can manipulate expressions more easily with block comments\\n\"\n\"    // than with line comments. Try deleting the comment delimiters\\n\"\n\"    // to change the result:\\n\"\nmsgstr \"\"\n\"// Puede manipular expresiones más fácilmente con comentarios de bloque \\n\"\n\"    // que con comentarios de línea. Intente eliminar los delimitadores de \"\n\"comentarios\\n\"\n\"    // para cambiar el resultado:\\n\"\n\n#: src/hello/comment.md:40\nmsgid \"/* 90 + */\"\nmsgstr \"\"\n\n#: src/hello/comment.md:41\nmsgid \"\\\"Is `x` 10 or 100? x = {}\\\"\"\nmsgstr \"\\\"¿Es `x` 10 ó 100? x = {}\\\"\"\n\n#: src/hello/comment.md:45 src/hello/print.md:103\n#: src/hello/print/print_debug.md:75 src/hello/print/print_display.md:118\n#: src/hello/print/print_display/testcase_list.md:62 src/hello/print/fmt.md:89\n#: src/primitives.md:64 src/custom_types/enum.md:100\n#: src/custom_types/enum/enum_use.md:45 src/custom_types/enum/c_like.md:33\n#: src/custom_types/enum/testcase_linked_list.md:77\n#: src/custom_types/constants.md:35 src/types/alias.md:30\n#: src/flow_control/for.md:121\n#: src/flow_control/match/destructuring/destructure_tuple.md:25\n#: src/flow_control/match/destructuring/destructure_slice.md:46\n#: src/flow_control/match/destructuring/destructure_enum.md:48\n#: src/flow_control/match/destructuring/destructure_pointers.md:63\n#: src/flow_control/match/destructuring/destructure_structures.md:45\n#: src/flow_control/match/guard.md:43 src/flow_control/match/binding.md:49\n#: src/flow_control/if_let.md:118 src/flow_control/let_else.md:55\n#: src/flow_control/while_let.md:56 src/fn/closures/capture.md:110\n#: src/fn/closures/input_parameters.md:84 src/fn/closures/anonymity.md:47\n#: src/fn/closures/input_functions.md:32\n#: src/fn/closures/output_parameters.md:49\n#: src/fn/closures/closure_examples/iter_any.md:50\n#: src/fn/closures/closure_examples/iter_find.md:68\n#: src/mod/struct_visibility.md:53 src/attribute/cfg.md:39 src/generics.md:59\n#: src/generics/gen_fn.md:54 src/generics/impl.md:48\n#: src/generics/gen_trait.md:39 src/generics/bounds.md:73\n#: src/generics/bounds/testcase_empty.md:37 src/generics/multi_bounds.md:32\n#: src/generics/where.md:49 src/generics/new_types.md:54\n#: src/generics/assoc_items.md:10 src/generics/assoc_items/the_problem.md:62\n#: src/generics/phantom.md:56 src/generics/phantom/testcase_units.md:75\n#: src/scope/raii.md:92 src/scope/move/partial_move.md:57\n#: src/scope/borrow/mut.md:56 src/scope/lifetime/explicit.md:68\n#: src/scope/lifetime/fn.md:58 src/scope/lifetime/methods.md:24\n#: src/scope/lifetime/struct.md:41 src/scope/lifetime/trait.md:28\n#: src/scope/lifetime/lifetime_bounds.md:46\n#: src/scope/lifetime/static_lifetime.md:133 src/scope/lifetime/elision.md:39\n#: src/trait/derive.md:65 src/trait/supertraits.md:40\n#: src/trait/disambiguating.md:60 src/error/option_unwrap/map.md:79\n#: src/error/option_unwrap/and_then.md:73\n#: src/error/option_unwrap/defaults.md:115 src/error/result/result_alias.md:41\n#: src/error/multiple_error_types/boxing_errors.md:57\n#: src/error/multiple_error_types/reenter_question_mark.md:74\n#: src/error/multiple_error_types/wrap_error.md:91 src/std.md:12\n#: src/std/rc.md:55 src/std_misc.md:12\n#: src/std_misc/threads/testcase_mapreduce.md:129 src/std_misc/path.md:54\n#: src/std_misc/fs.md:150 src/meta/doc.md:109 src/meta/playground.md:49\nmsgid \"See also:\"\nmsgstr \"Ver también\"\n\n#: src/hello/comment.md:47\nmsgid \"[Library documentation](../meta/doc.md)\"\nmsgstr \"[Documentación de Librerías](../meta/doc.md)\"\n\n#: src/hello/print.md:3\nmsgid \"\"\n\"Printing is handled by a series of [`macros`](../macros.md) defined in \"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) some of which are:\"\nmsgstr \"\"\n\"La impresión se maneja por una serie de [`macros`](../macros.md) definida \"\n\"en[`std::fmt`](https://doc.rust-lang.org/std/fmt/) algunos de los cuales \"\n\"son: \"\n\n#: src/hello/print.md:6\nmsgid \"`format!`: write formatted text to [`String`](../std/str.md)\"\nmsgstr \"`format!`: escribe el texto formateado a un [`String`](../std/str.md)\"\n\n#: src/hello/print.md:7\nmsgid \"\"\n\"`print!`: same as `format!` but the text is printed to the console (io::\"\n\"stdout).\"\nmsgstr \"\"\n\"`print!`: igual que `format!` pero el texto se imprime a la consola (io::\"\n\"stdout).\"\n\n#: src/hello/print.md:9\nmsgid \"`println!`: same as `print!` but a newline is appended.\"\nmsgstr \"`println!`: es igual que `print!` pero se agrega un salto de línea\"\n\n#: src/hello/print.md:10\nmsgid \"\"\n\"`eprint!`: same as `print!` but the text is printed to the standard error \"\n\"(io::stderr).\"\nmsgstr \"\"\n\"`eprint!`: igual que `print!` pero el texto se imprime al error estándar \"\n\"(io::stderr).\"\n\n#: src/hello/print.md:12\nmsgid \"`eprintln!`: same as `eprint!` but a newline is appended.\"\nmsgstr \"`eprintln!`: es igual que `eprint!` pero se agrega un salto de línea\"\n\n#: src/hello/print.md:14\n#, fuzzy\nmsgid \"\"\n\"All parse text in the same fashion. As a plus, Rust checks formatting \"\n\"correctness at compile time.\"\nmsgstr \"\"\n\"Parsea todo el texta de la misma manera. Como beneficio, Rust verifica el \"\n\"formato    // de los argumentos. Serán convertidos en cadenas.\\n\"\n\n#: src/hello/print.md:19\n#, fuzzy\nmsgid \"\"\n\"// In general, the `{}` will be automatically replaced with any\\n\"\n\"    // arguments. These will be stringified.\\n\"\nmsgstr \"\"\n\"Parsea todo el texta de la misma manera. Como beneficio, Rust verifica el \"\n\"formato    // de los argumentos. Serán convertidos en cadenas.\\n\"\n\n#: src/hello/print.md:21\nmsgid \"\\\"{} days\\\"\"\nmsgstr \"\\\"{} días\\\"\"\n\n#: src/hello/print.md:23\nmsgid \"\"\n\"// Positional arguments can be used. Specifying an integer inside `{}`\\n\"\n\"    // determines which additional argument will be replaced. Arguments \"\n\"start\\n\"\n\"    // at 0 immediately after the format string.\\n\"\nmsgstr \"\"\n\"// Se pueden usar argumentos posicionales. Especificar un entero dentro de \"\n\"`{}`\\n\"\n\"   // determina qué argumento adicional será reemplazado. Los \"\n\"argumentoscomienzan \\n\"\n\"   // en 0 inmediatamente después de la cadena de formato.\\n\"\n\n#: src/hello/print.md:26\nmsgid \"\\\"{0}, this is {1}. {1}, this is {0}\\\"\"\nmsgstr \"\\\"{0}, esto es {1}. {1}, este es {0}\\\"\"\n\n#: src/hello/print.md:26 src/scope/move/partial_move.md:31\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/hello/print.md:26 src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/hello/print.md:28\nmsgid \"// As can named arguments.\\n\"\nmsgstr \"// Como los argumentos nombrados.\\n\"\n\n#: src/hello/print.md:29\nmsgid \"\\\"{subject} {verb} {object}\\\"\"\nmsgstr \"\\\"{sujeto} {verbo} {objeto}\\\"\"\n\n#: src/hello/print.md:30\nmsgid \"\\\"the lazy dog\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:31\nmsgid \"\\\"the quick brown fox\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:32\nmsgid \"\\\"jumps over\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:34\nmsgid \"\"\n\"// Different formatting can be invoked by specifying the format character\\n\"\n\"    // after a `:`.\\n\"\nmsgstr \"\"\n\"// Se puede invocar diferentes formatos especificando el carácter del \"\n\"formato\\n\"\n\"   // después de un `:`.\\n\"\n\n#: src/hello/print.md:36\nmsgid \"\\\"Base 10:               {}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:36\nmsgid \"// 69420\\n\"\nmsgstr \"\"\n\n#: src/hello/print.md:37\nmsgid \"\\\"Base 2 (binary):       {:b}\\\"\"\nmsgstr \"\\\"Base 2 (binario):       {:b}\\\"\"\n\n#: src/hello/print.md:37\nmsgid \"// 10000111100101100\\n\"\nmsgstr \"\"\n\n#: src/hello/print.md:38\nmsgid \"\\\"Base 8 (octal):        {:o}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:38\nmsgid \"// 207454\\n\"\nmsgstr \"\"\n\n#: src/hello/print.md:39\nmsgid \"\\\"Base 16 (hexadecimal): {:x}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:39\nmsgid \"// 10f2c\\n\"\nmsgstr \"\"\n\n#: src/hello/print.md:41\nmsgid \"\"\n\"// You can right-justify text with a specified width. This will\\n\"\n\"    // output \\\"    1\\\". (Four white spaces and a \\\"1\\\", for a total width \"\n\"of 5.)\\n\"\nmsgstr \"\"\n\"// Puedes justificar el texto a la derecha con un ancho especificado. Esto \"\n\"será\\n\"\n\"// salida \\\"    1 \\\". (Cuatro espacios blancos y un \\\"1\\\", para un ancho \"\n\"totalde 5.)\\n\"\n\n#: src/hello/print.md:43\nmsgid \"\\\"{number:>5}\\\"\"\nmsgstr \"\\\"{numero:>5}\\\"\"\n\n#: src/hello/print.md:45\nmsgid \"// You can pad numbers with extra zeroes,\\n\"\nmsgstr \"// Puedes rellenar números con ceros adicionales,\\n\"\n\n#: src/hello/print.md:46\nmsgid \"\\\"{number:0>5}\\\"\"\nmsgstr \"\\\"{numero:0>5}\\\"\"\n\n#: src/hello/print.md:46\nmsgid \"\"\n\"// 00001\\n\"\n\"    // and left-adjust by flipping the sign. This will output \\\"10000\\\".\\n\"\nmsgstr \"\"\n\"// 00001\\n\"\n\"    // y justificar a la izquierda volteando el signo. Esto imprimirá \"\n\"\\\"10000\\\".\\n\"\n\n#: src/hello/print.md:48\nmsgid \"\\\"{number:0<5}\\\"\"\nmsgstr \"\\\"{numero:0<5}\\\"\"\n\n#: src/hello/print.md:48\nmsgid \"// 10000\\n\"\nmsgstr \"\"\n\n#: src/hello/print.md:50\nmsgid \"\"\n\"// You can use named arguments in the format specifier by appending a `$`.\\n\"\nmsgstr \"\"\n\"// Puede usar argumentos con nombre en el formato especificador agregando un \"\n\"`$`.\\n\"\n\n#: src/hello/print.md:51\nmsgid \"\\\"{number:0>width$}\\\"\"\nmsgstr \"\\\"{numero:0>ancho$}\\\"\"\n\n#: src/hello/print.md:53\nmsgid \"\"\n\"// Rust even checks to make sure the correct number of arguments are used.\\n\"\nmsgstr \"\"\n\"// Rust incluso verifica para asegurarse de que se usen el número correcto \"\n\"de argumentos.\\n\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"My name is {0}, {1} {0}\\\"\"\nmsgstr \"\\\"Mi nombre es {0}, {1} {0}\\\"\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"Bond\\\"\"\nmsgstr \"\"\n\n#: src/hello/print.md:55\nmsgid \"// FIXME ^ Add the missing argument: \\\"James\\\"\\n\"\nmsgstr \"\"\n\n#: src/hello/print.md:57\nmsgid \"\"\n\"// Only types that implement fmt::Display can be formatted with `{}`. User-\\n\"\n\"    // defined types do not implement fmt::Display by default.\\n\"\nmsgstr \"\"\n\"// Sólo los tipos que implementan `fmt::Display` pueden formatearse con `{}\"\n\"`.\\n\"\n\"   // Los tipos definidos por usuario no implementan `fmt::Display` de forma \"\n\"predeterminada.\\n\"\n\n#: src/hello/print.md:60\nmsgid \"// disable `dead_code` which warn against unused module\\n\"\nmsgstr \"// deshabilita `dead_code` el cual advierte contra módulos no usados\\n\"\n\n#: src/hello/print.md:63\nmsgid \"\"\n\"// This will not compile because `Structure` does not implement\\n\"\n\"    // fmt::Display.\\n\"\n\"    // println!(\\\"This struct `{}` won't print...\\\", Structure(3));\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// Esto no se compilará porque `Structure` no implementa \\n\"\n\"    // `fmt::Display`.\\n\"\n\"   // println!(\\\"esta estructura `{}` no va a imprimir... \\\", \"\n\"Structure(3));\\n\"\n\"   // TAREA ^ intente quitar el comentario de esta línea \\n\"\n\n#: src/hello/print.md:68\nmsgid \"\"\n\"// For Rust 1.58 and above, you can directly capture the argument from a\\n\"\n\"    // surrounding variable. Just like the above, this will output\\n\"\n\"    // \\\"    1\\\", 4 white spaces and a \\\"1\\\".\\n\"\nmsgstr \"\"\n\"// Para Rust 1.58 y superior, puedes capturar directamente el argumento de \"\n\"una\\n\"\n\"// variable en el entorno. Al igual que lo anterior, esto imprimirá \\n\"\n\"// \\\"     1\\\", 4 espacios blancos y a \\\"1\\\".\\n\"\n\n#: src/hello/print.md:73\nmsgid \"\\\"{number:>width$}\\\"\"\nmsgstr \"\\\"{numero:>ancho$}\\\"\"\n\n#: src/hello/print.md:77\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) contains many [`traits`]\"\n\"(https://doc.rust-lang.org/std/fmt/#formatting-traits) which govern the \"\n\"display of text. The base form of two important ones are listed below:\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) contiene muchos [`traits`]\"\n\"(https://doc.rust-lang.org/std/fmt/#formatting-traits) que rigen la \"\n\"visualización de texto. La forma básica de dos de ellos se enumera a \"\n\"continuación:\"\n\n#: src/hello/print.md:80\nmsgid \"\"\n\"`fmt::Debug`: Uses the `{:?}` marker. Format text for debugging purposes.\"\nmsgstr \"\"\n\"`fmt::Debug`: Usa el marcador `{:?}`. Formatea el texto para fines de \"\n\"depuración.\"\n\n#: src/hello/print.md:81\nmsgid \"\"\n\"`fmt::Display`: Uses the `{}` marker. Format text in a more elegant, user \"\n\"friendly fashion.\"\nmsgstr \"\"\n\"`fmt::Display`: Usa el marcador `{}`. Formatea texto de una manera más \"\n\"elegante y amistosa.\"\n\n#: src/hello/print.md:84\nmsgid \"\"\n\"Here, we used `fmt::Display` because the std library provides \"\n\"implementations for these types. To print text for custom types, more steps \"\n\"are required.\"\nmsgstr \"\"\n\"Aquí, usamos `fmt::Display` porque la librería std proporciona \"\n\"implementaciones para estos tipos. Para imprimir tipos personalizados, más \"\n\"pasosson necesarios\"\n\n#: src/hello/print.md:87\nmsgid \"\"\n\"Implementing the `fmt::Display` trait automatically implements the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"which allows us to [convert](../conversion/string.md) the type to [`String`]\"\n\"(../std/str.md).\"\nmsgstr \"\"\n\"Implementar el rasgo `fmt::Display` implementa automáticamente el trait \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) que \"\n\"nos permite [convertir](../conversion/string.md) el tipo en [`String`](../\"\n\"std/str.md).\"\n\n#: src/hello/print.md:90\nmsgid \"\"\n\"In _line 43_, `#[allow(dead_code)]` is an [attribute](../attribute.md) which \"\n\"only applies to the module after it.\"\nmsgstr \"\"\n\"En la _línea 43_,`#[allow(dead_code)]` es un [atributo](../ attribute.md) \"\n\"quesolo se aplica al módulo después de él.\"\n\n#: src/hello/print.md:92\nmsgid \"Activities\"\nmsgstr \"Actividades\"\n\n#: src/hello/print.md:94\nmsgid \"\"\n\"Fix the issue in the above code (see FIXME) so that it runs without error.\"\nmsgstr \"\"\n\"Solucione el problema en el código anterior (ver el ARRÉGLAME) para que se \"\n\"ejecute sin error.\"\n\n#: src/hello/print.md:96\nmsgid \"\"\n\"Try uncommenting the line that attempts to format the `Structure` struct \"\n\"(see TODO)\"\nmsgstr \"\"\n\"Intente quitar el comentario de la línea que intenta formatear la estructura \"\n\"`Structure`(ver TAREA)\"\n\n#: src/hello/print.md:98\nmsgid \"\"\n\"Add a `println!` macro call that prints: `Pi is roughly 3.142` by \"\n\"controlling the number of decimal places shown. For the purposes of this \"\n\"exercise, use `let pi = 3.141592` as an estimate for pi. (Hint: you may need \"\n\"to check the [`std::fmt`](https://doc.rust-lang.org/std/fmt/) documentation \"\n\"for setting the number of decimals to display)\"\nmsgstr \"\"\n\"Agregue un macro `println!` que imprima: ` Pi es aproximadamente 3.142` \"\n\"controlando el número de decimales mostrados. Para efectos de esteejercicio, \"\n\"use `let Pi = 3.141592` como una estimación para pi. (Sugerencia: \"\n\"puedesconsultar la documentación de [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/)para configurar el número de decimales desplegados)\"\n\n#: src/hello/print.md:105\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [`macros`](../macros.md), \"\n\"[`struct`](../custom_types/structs.md), [`traits`](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits), and [`dead_code`](../attribute/unused.md)\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [`macros`](../macros.md), \"\n\"[`struct`](../custom_types/structs.md), [`traits`](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits), y [`dead_code`](../attribute/unused.md)\"\n\n#: src/hello/print/print_debug.md:3\nmsgid \"\"\n\"All types which want to use `std::fmt` formatting `traits` require an \"\n\"implementation to be printable. Automatic implementations are only provided \"\n\"for types such as in the `std` library. All others _must_ be manually \"\n\"implemented somehow.\"\nmsgstr \"\"\n\"Todos los tipos que quieren usar los traits de `std::fmt` requieren \"\n\"unaimplementación para ser imprimible. Las implementaciones automáticas solo \"\n\"se proporcionanpara tipos como en la biblioteca `std`. Todos los demás tipos \"\n\"_deben_ ser manualmente implementados de alguna manera.\"\n\n#: src/hello/print/print_debug.md:8\nmsgid \"\"\n\"The `fmt::Debug` `trait` makes this very straightforward. _All_ types can \"\n\"`derive` (automatically create) the `fmt::Debug` implementation. This is not \"\n\"true for `fmt::Display` which must be manually implemented.\"\nmsgstr \"\"\n\"El trait `fmt::Debug` hace que esto sea muy sencillo. Todos Los tipos \"\n\"pueden`Derive` (crear automáticamente) la implementación `fmt::Debug`. Esto \"\n\"no ciertopara `fmt::Display` el cual debe implementarse manualmente.\"\n\n#: src/hello/print/print_debug.md:13\nmsgid \"\"\n\"// This structure cannot be printed either with `fmt::Display` or\\n\"\n\"// with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// Esta estructura no se puede imprimir con `fmt::Display` o \\n\"\n\"// con `fmt::Debug`.\\n\"\n\" \"\n\n#: src/hello/print/print_debug.md:16\nmsgid \"\"\n\"// The `derive` attribute automatically creates the implementation\\n\"\n\"// required to make this `struct` printable with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// El atributo `derive` crea automáticamente la implementación \\n\"\n\" // requerida para hacer esta `struct` imprimible con `fmt::Debug`. \\n\"\n\n#: src/hello/print/print_debug.md:23\nmsgid \"All `std` library types are automatically printable with `{:?}` too:\"\nmsgstr \"\"\n\"Todos los tipos de biblioteca `std` se pueden imprimir automáticamente con \"\n\"`{:?}` también:\"\n\n#: src/hello/print/print_debug.md:26\nmsgid \"\"\n\"// Derive the `fmt::Debug` implementation for `Structure`. `Structure`\\n\"\n\"// is a structure which contains a single `i32`.\\n\"\nmsgstr \"\"\n\"// Derive la implementación `fmt::Debug` para `Structure`. `Structure`\\n\"\n\"// es una estructura que contiene un solo `i32`.\\n\"\n\" \"\n\n#: src/hello/print/print_debug.md:30\nmsgid \"\"\n\"// Put a `Structure` inside of the structure `Deep`. Make it printable\\n\"\n\"// also.\\n\"\nmsgstr \"\"\n\"// Ponga una `Structure` dentro de la estructura `Deep`. Házlo imprimible \\n\"\n\"// también.\\n\"\n\n#: src/hello/print/print_debug.md:37\nmsgid \"// Printing with `{:?}` is similar to with `{}`.\\n\"\nmsgstr \"// Imprimir con `{:?}` es similar a imprimir con `{}`.\\n\"\n\n#: src/hello/print/print_debug.md:38\nmsgid \"\\\"{:?} months in a year.\\\"\"\nmsgstr \"\\\"{:?} meses en un año.\\\"\"\n\n#: src/hello/print/print_debug.md:39\nmsgid \"\\\"{1:?} {0:?} is the {actor:?} name.\\\"\"\nmsgstr \"\\\"{1:?} {0:?} es el nombre del {actor:?}.\\\"\"\n\n#: src/hello/print/print_debug.md:40\nmsgid \"\\\"Slater\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_debug.md:41\nmsgid \"\\\"Christian\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_debug.md:42\nmsgid \"\\\"actor's\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_debug.md:44\nmsgid \"// `Structure` is printable!\\n\"\nmsgstr \"// ¡`Structure` también se puede imprimir!\\n\"\n\n#: src/hello/print/print_debug.md:45 src/hello/print/print_debug.md:49\nmsgid \"\\\"Now {:?} will print!\\\"\"\nmsgstr \"\\\"Ahora {:?} imprimirá \\\"\"\n\n#: src/hello/print/print_debug.md:47\nmsgid \"\"\n\"// The problem with `derive` is there is no control over how\\n\"\n\"    // the results look. What if I want this to just show a `7`?\\n\"\nmsgstr \"\"\n\"// El problema con 'derive` es que no hay control sobre cómo \\n\"\n\"   // los resultados se ven. ¿Qué pasa si quiero que esto solo muestre un \"\n\"`7`?\\n\"\n\n#: src/hello/print/print_debug.md:53\nmsgid \"\"\n\"So `fmt::Debug` definitely makes this printable but sacrifices some \"\n\"elegance. Rust also provides \\\"pretty printing\\\" with `{:#?}`.\"\nmsgstr \"\"\n\"Entonces `fmt::Debug` definitivamente hace esto imprimible pero sacrifica \"\n\"algo deelegancia. Rust también proporciona \\\"Impresión Bonita\\\" con `{:#?}`.\"\n\n#: src/hello/print/print_debug.md:64 src/custom_types/structs.md:42\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_debug.md:68\nmsgid \"// Pretty print\\n\"\nmsgstr \"// Impresión bonita\"\n\n#: src/hello/print/print_debug.md:69\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_debug.md:73\nmsgid \"One can manually implement `fmt::Display` to control the display.\"\nmsgstr \"\"\n\"Se puede implementar manualmente `fmt::Display` para controlar la impresión.\"\n\n#: src/hello/print/print_debug.md:77\nmsgid \"\"\n\"[`attributes`](https://doc.rust-lang.org/reference/attributes.html), \"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), and [`struct`](../../custom_types/structs.md)\"\nmsgstr \"\"\n\"[`attributes`](https://doc.rust-lang.org/reference/attributes.html), \"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), y [`struct`](../../custom_types/structs.md)\"\n\n#: src/hello/print/print_display.md:3\nmsgid \"\"\n\"`fmt::Debug` hardly looks compact and clean, so it is often advantageous to \"\n\"customize the output appearance. This is done by manually implementing \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/), which uses the `{}` \"\n\"print marker. Implementing it looks like this:\"\nmsgstr \"\"\n\"`fmt::Debug` escasamente parece compacto y limpio, por lo que a menudo es \"\n\"ventajoso personalizar la apariencia de salida. Esto se hace implementando \"\n\"manualmente[`fmt::Display`](https://doc.rust-lang.org/std/fmt/), que usa el \"\n\"marcador `{}`. Implementarlo se ve así:\"\n\n#: src/hello/print/print_display.md:9\nmsgid \"// Import (via `use`) the `fmt` module to make it available.\\n\"\nmsgstr \"\"\n\"// Importar (a través de `use`) el módulo `fmt` para ponerlo a disposición.\\n\"\n\n#: src/hello/print/print_display.md:11\nmsgid \"\"\n\"// Define a structure for which `fmt::Display` will be implemented. This is\\n\"\n\"// a tuple struct named `Structure` that contains an `i32`.\\n\"\nmsgstr \"\"\n\"// Defina una estructura para la cual se implementará `fmt::Display`. Esto \"\n\"es\\n\"\n\" // una estructura de tupla llamada `Estructura` que contiene un `i32`. \\n\"\n\n#: src/hello/print/print_display.md:15\nmsgid \"\"\n\"// To use the `{}` marker, the trait `fmt::Display` must be implemented\\n\"\n\"// manually for the type.\\n\"\nmsgstr \"\"\n\"// Para usar el marcador `{}`, el trait `fmt::Display` debe implementarse\\n\"\n\"// manualmente para el tipo. \\n\"\n\n#: src/hello/print/print_display.md:19\nmsgid \"// This trait requires `fmt` with this exact signature.\\n\"\nmsgstr \"// Este trait requiere de `fmt` con estos tipos exactos.\\n\"\n\n#: src/hello/print/print_display.md:21\nmsgid \"\"\n\"// Write strictly the first element into the supplied output\\n\"\n\"        // stream: `f`. Returns `fmt::Result` which indicates whether the\\n\"\n\"        // operation succeeded or failed. Note that `write!` uses syntax \"\n\"which\\n\"\n\"        // is very similar to `println!`.\\n\"\nmsgstr \"\"\n\"// Escribe sólo el primer elemento en la salida suministrada \\n\"\n\"// stream: `f`. Devuelve `fmt::Result` que indica si\\n\"\n\"// la operación tuvo éxito o falló. Tenga en cuenta que 'write!` usa una \"\n\"sintaxis que \\n\"\n\"// es muy similar a `println!`. \\n\"\n\n#: src/hello/print/print_display.md:25\n#: src/hello/print/print_display/testcase_list.md:13\n#: src/hello/print/print_display/testcase_list.md:39\n#: src/hello/print/print_display/testcase_list.md:49 src/hello/print/fmt.md:53\n#: src/custom_types/enum/testcase_linked_list.md:73 src/conversion/string.md:25\n#: src/flow_control/loop.md:26 src/flow_control/while.md:21\n#: src/flow_control/for.md:23 src/flow_control/for.md:43 src/fn.md:40\n#: src/fn/closures/capture.md:96 src/fn/closures/capture.md:97\n#: src/fn/closures/anonymity.md:41 src/generics/bounds.md:12\n#: src/macros/repeat.md:24 src/macros/repeat.md:25 src/macros/repeat.md:26\n#: src/error/result.md:73 src/std/str.md:92 src/std/str.md:102\n#: src/std/str.md:106 src/std/str.md:111 src/std/result.md:72\n#: src/std/result/question_mark.md:57 src/std/result/question_mark.md:65\n#: src/std_misc/file/read_lines.md:60 src/std_misc/arg/matching.md:9\n#: src/std_misc/arg/matching.md:13\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display.md:30\nmsgid \"\"\n\"`fmt::Display` may be cleaner than `fmt::Debug` but this presents a problem \"\n\"for the `std` library. How should ambiguous types be displayed? For example, \"\n\"if the `std` library implemented a single style for all `Vec<T>`, what style \"\n\"should it be? Would it be either of these two?\"\nmsgstr \"\"\n\"`fmt::Display` puede ser más limpio que `fmt::Debug` pero esto presenta un \"\n\"problemapara la biblioteca `std`. ¿Cómo se deben mostrar los tipos ambiguos? \"\n\"Por ejemplo, si la biblioteca `std` implementó un sólo estilo para todos los \"\n\"`Vec<T>`, ¿qué estilo debería ser? ¿Sería cualquiera de estos dos?\"\n\n#: src/hello/print/print_display.md:35\nmsgid \"`Vec<path>`: `/:/etc:/home/username:/bin` (split on `:`)\"\nmsgstr \"`Vec<path>`: `/:/etc:/home/usuario:/bin` (split on `:`)\"\n\n#: src/hello/print/print_display.md:36\nmsgid \"`Vec<number>`: `1,2,3` (split on `,`)\"\nmsgstr \"`Vec<numero>`: `1,2,3` (partido en `,`)\"\n\n#: src/hello/print/print_display.md:38\nmsgid \"\"\n\"No, because there is no ideal style for all types and the `std` library \"\n\"doesn't presume to dictate one. `fmt::Display` is not implemented for \"\n\"`Vec<T>` or for any other generic containers. `fmt::Debug` must then be used \"\n\"for these generic cases.\"\nmsgstr \"\"\n\"No, porque no hay un estilo ideal para todos los tipos y la biblioteca `std` \"\n\"no presume dictar uno. `fmt::Display` no se implementa para `Vec<T>` o para \"\n\"cualquier otro contenedor genérico. `Fmt::Debug` debe usarse para estos \"\n\"casos genéricos.\"\n\n#: src/hello/print/print_display.md:43\nmsgid \"\"\n\"This is not a problem though because for any new _container_ type which is \"\n\"_not_ generic, `fmt::Display` can be implemented.\"\nmsgstr \"\"\n\"Sin embargo, esto no es un problema porque para cualquier nuevo tipo \"\n\"_contenedor_ que sea_no_ genérico, se puede implementar `fmt::Display`.\"\n\n#: src/hello/print/print_display.md:47\nmsgid \"// Import `fmt`\\n\"\nmsgstr \"// Importar `fmt`\\n\"\n\n#: src/hello/print/print_display.md:48\nmsgid \"\"\n\"// A structure holding two numbers. `Debug` will be derived so the results \"\n\"can\\n\"\n\"// be contrasted with `Display`.\\n\"\nmsgstr \"\"\n\"// Una estructura que contiene dos números. Se derivará `Debug` para que los \"\n\"resultadospuedan// ser contrastados con `Display`.\\n\"\n\n#: src/hello/print/print_display.md:53\nmsgid \"// Implement `Display` for `MinMax`.\\n\"\nmsgstr \"// Implementa `Display` para `MinMax`.\\n\"\n\n#: src/hello/print/print_display.md:57\nmsgid \"// Use `self.number` to refer to each positional data point.\\n\"\nmsgstr \"// Usa `self.number` para referirte a cada dato posicional.\\n\"\n\n#: src/hello/print/print_display.md:58\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display.md:61\nmsgid \"// Define a structure where the fields are nameable for comparison.\\n\"\nmsgstr \"\"\n\"// Define una estructura donde los campos se puedan nombrar para \"\n\"compararse.\\n\"\n\n#: src/hello/print/print_display.md:68\nmsgid \"// Similarly, implement `Display` for `Point2D`.\\n\"\nmsgstr \"// Similarmente, implementa `Display` para `Point2D`.\\n\"\n\n#: src/hello/print/print_display.md:72\nmsgid \"// Customize so only `x` and `y` are denoted.\\n\"\nmsgstr \"// Personalízalo para que sólo `x` y `y` sean denotados.\\n\"\n\n#: src/hello/print/print_display.md:73\nmsgid \"\\\"x: {}, y: {}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display.md:80\nmsgid \"\\\"Compare structures:\\\"\"\nmsgstr \"\\\"Compara estructuras:\\\"\"\n\n#: src/hello/print/print_display.md:81 src/hello/print/print_display.md:94\nmsgid \"\\\"Display: {}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display.md:82 src/hello/print/print_display.md:95\nmsgid \"\\\"Debug: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display.md:87\nmsgid \"\\\"The big range is {big} and the small is {small}\\\"\"\nmsgstr \"\\\"El rango grande es {big} y el pequeño es {small}\\\"\"\n\n#: src/hello/print/print_display.md:93\nmsgid \"\\\"Compare points:\\\"\"\nmsgstr \"\\\" Compara Puntos:\\\"\"\n\n#: src/hello/print/print_display.md:97\nmsgid \"\"\n\"// Error. Both `Debug` and `Display` were implemented, but `{:b}`\\n\"\n\"    // requires `fmt::Binary` to be implemented. This will not work.\\n\"\n\"    // println!(\\\"What does Point2D look like in binary: {:b}?\\\", point);\\n\"\nmsgstr \"\"\n\"// Error. Ambos `Debug` y `Display` fueron implementados, pero `{:b}`\\n\"\n\"   // requiere implementar `fmt::Binary`. Esto no funcionará.\\n\"\n\"   // println!(\\\"¿Cómo se ve el Punto2D en binario: {:b}?\\\", point);\\n\"\n\n#: src/hello/print/print_display.md:103\nmsgid \"\"\n\"So, `fmt::Display` has been implemented but `fmt::Binary` has not, and \"\n\"therefore cannot be used. `std::fmt` has many such [`traits`](https://doc.\"\n\"rust-lang.org/std/fmt/#formatting-traits) and each requires its own \"\n\"implementation. This is detailed further in [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/).\"\nmsgstr \"\"\n\"Entonces, `fmt::Display` se ha implementado pero `fmt::Binary` no, ypor lo \"\n\"tanto, no se puede usar. `std::fmt` tiene muchos de estos [`traits`](https://\"\n\"doc.rust-lang.org/std/fmt/#formatting-traits) y cada uno requiere \"\n\"suimplementación. Esto se detalla aún más en [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/).\"\n\n#: src/hello/print/print_display.md:109\nmsgid \"\"\n\"After checking the output of the above example, use the `Point2D` struct as \"\n\"a guide to add a `Complex` struct to the example. When printed in the same \"\n\"way, the output should be:\"\nmsgstr \"\"\n\"Después de verificar la salida del ejemplo anterior, use la estructura \"\n\"`Point2D` como una guía para agregar una estructura `Complex` al ejemplo. \"\n\"Cuando se imprime de la misma manera, la salida debería ser:\"\n\n#: src/hello/print/print_display.md:120\nmsgid \"\"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [`macros`](../../macros.md), [`struct`](../../custom_types/\"\n\"structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-\"\n\"traits), and [`use`](../../mod/use.md)\"\nmsgstr \"\"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [`macros`](../../macros.md), [`struct`](../../custom_types/\"\n\"structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-\"\n\"traits), y [`use`](../../mod/use.md)\"\n\n#: src/hello/print/print_display/testcase_list.md:3\nmsgid \"\"\n\"Implementing `fmt::Display` for a structure where the elements must each be \"\n\"handled sequentially is tricky. The problem is that each `write!` generates \"\n\"a `fmt::Result`. Proper handling of this requires dealing with _all_ the \"\n\"results. Rust provides the `?` operator for exactly this purpose.\"\nmsgstr \"\"\n\"Implementar `fmt::Display` para una estructura donde los elementos deben ser \"\n\"cada uno manejados secuencialmente es complicado. El problema es que cada \"\n\"`write!` genera un `fmt::Result`. El manejo adecuado de esto requiere tratar \"\n\"con _todos_ losresultados. Rust proporciona el operador `?` para exactamente \"\n\"este propósito.\"\n\n#: src/hello/print/print_display/testcase_list.md:8\nmsgid \"Using `?` on `write!` looks like this:\"\nmsgstr \"Usar `?` con `write!` se ve así:\"\n\n#: src/hello/print/print_display/testcase_list.md:11\nmsgid \"\"\n\"// Try `write!` to see if it errors. If it errors, return\\n\"\n\"// the error. Otherwise continue.\\n\"\nmsgstr \"\"\n\"// Usa `write!` para ver si falla. Si hay errores, regresa\\n\"\n\"// el error. En otro caso, continúa.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:16\nmsgid \"\"\n\"With `?` available, implementing `fmt::Display` for a `Vec` is \"\n\"straightforward:\"\nmsgstr \"\"\n\"Si disponemos de `?`, implementar `fmt::Display` para un `Vec` es directo:\"\n\n#: src/hello/print/print_display/testcase_list.md:20\nmsgid \"// Import the `fmt` module.\\n\"\nmsgstr \"// Importar el módulo `fmt`.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:21\nmsgid \"// Define a structure named `List` containing a `Vec`.\\n\"\nmsgstr \"// Define una estructura llamada `List` que contiene un `Vec`.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:27\nmsgid \"\"\n\"// Extract the value using tuple indexing,\\n\"\n\"        // and create a reference to `vec`.\\n\"\nmsgstr \"\"\n\"// Extrae el valor usando indexación de tuplas,\\n\"\n\"       // y crea una referencia a `vec`.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:31\nmsgid \"\\\"[\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display/testcase_list.md:33\nmsgid \"\"\n\"// Iterate over `v` in `vec` while enumerating the iteration\\n\"\n\"        // count in `count`.\\n\"\nmsgstr \"\"\n\"// Itera sobre `v` en un `vec` mientras enumeras la cuenta\\n\"\n\"       // de la iteración en `count`.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:36\nmsgid \"\"\n\"// For every element except the first, add a comma.\\n\"\n\"            // Use the ? operator to return on errors.\\n\"\nmsgstr \"\"\n\"// Para cada element excepto el primero, agrega una coma.\\n\"\n\"           // Usa el operador ? para regresar errroes.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:38 src/std/str.md:36\nmsgid \"\\\", \\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display/testcase_list.md:42\nmsgid \"// Close the opened bracket and return a fmt::Result value.\\n\"\nmsgstr \"// Cierra la llave abierta y regresa un valor de `fmt::Result`.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:43\nmsgid \"\\\"]\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/print_display/testcase_list.md:55\nmsgid \"\"\n\"Try changing the program so that the index of each element in the vector is \"\n\"also printed. The new output should look like this:\"\nmsgstr \"\"\n\"Intente cambiar el programa para que el índice de cada elemento en el vector \"\n\"seatambién impreso. La nueva salida debería verse así:\"\n\n#: src/hello/print/print_display/testcase_list.md:64\nmsgid \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/ref.\"\n\"md), [`Result`](../../../std/result.md), [`struct`](../../../custom_types/\"\n\"structs.md), [`?`](../../../std/result/question_mark.md), and [`vec!`]\"\n\"(../../../std/vec.md)\"\nmsgstr \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/ref.\"\n\"md), [`Result`](../../../std/result.md), [`struct`](../../../custom_types/\"\n\"structs.md), [`?`](../../../std/result/question_mark.md), y [`vec!`]\"\n\"(../../../std/vec.md)\"\n\n#: src/hello/print/fmt.md:3\nmsgid \"We've seen that formatting is specified via a _format string_:\"\nmsgstr \"\"\n\"Hemos visto que este formato se especifica via una _cadena de formato_:\"\n\n#: src/hello/print/fmt.md:5\nmsgid \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:6\nmsgid \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:7\nmsgid \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:9\nmsgid \"\"\n\"The same variable (`foo`) can be formatted differently depending on which \"\n\"_argument type_ is used: `X` vs `o` vs _unspecified_.\"\nmsgstr \"\"\n\"La misma variable (`foo`) puede formatearse de manera diferente dependiendo \"\n\"de cuál sea _tipo de argumento_ utilizado: `X` vs `o` vs _no especificado_.\"\n\n#: src/hello/print/fmt.md:12\nmsgid \"\"\n\"This formatting functionality is implemented via traits, and there is one \"\n\"trait for each argument type. The most common formatting trait is `Display`, \"\n\"which handles cases where the argument type is left unspecified: `{}` for \"\n\"instance.\"\nmsgstr \"\"\n\"Esta funcionalidad de formato se implementa a través de traits, y hay trait \"\n\"para cada tipo de argumento. El trait de formato más común es la `Display`, \"\n\"que maneja casos en los que el tipo de argumento se deja sin especificar: `{}\"\n\"`, por ejemplo.\"\n\n#: src/hello/print/fmt.md:21\nmsgid \"// Latitude\\n\"\nmsgstr \"// Latitude\\n\"\n\n#: src/hello/print/fmt.md:23\nmsgid \"// Longitude\\n\"\nmsgstr \"// Longitude\\n\"\n\n#: src/hello/print/fmt.md:28\nmsgid \"\"\n\"// `f` is a buffer, and this method must write the formatted string into \"\n\"it.\\n\"\nmsgstr \"\"\n\"// `f` es un búfer, y este método se usa para formatear y meterle una \"\n\"cadena.\\n\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'N'\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'S'\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'E'\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'W'\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:33\nmsgid \"\"\n\"// `write!` is like `format!`, but it will write the formatted string\\n\"\n\"        // into a buffer (the first argument).\\n\"\nmsgstr \"\"\n\"// `write!` es como `format!`, pero escribirá la cadena formateada\\n\"\n\"        // al búfer (el primer argumento).\\n\"\n\n#: src/hello/print/fmt.md:35\nmsgid \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:49\nmsgid \"\\\"Dublin\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:50\nmsgid \"\\\"Oslo\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:51\nmsgid \"\\\"Vancouver\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:60\nmsgid \"\"\n\"// Switch this to use {} once you've added an implementation\\n\"\n\"        // for fmt::Display.\\n\"\nmsgstr \"\"\n\"// Cambia esto a {} una vez que hayas añadido una implementación\\n\"\n\"        // para fmt::Display.\\n\"\n\n#: src/hello/print/fmt.md:62 src/primitives/tuples.md:60\n#: src/custom_types/structs.md:47 src/types/inference.md:23\n#: src/conversion/string.md:76 src/generics/bounds.md:49\n#: src/generics/where.md:38 src/std/str.md:137 src/std/result.md:59\n#: src/std/result.md:61 src/std/result.md:63 src/std/arc.md:26\n#: src/std_misc/channels.md:53\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/hello/print/fmt.md:67\nmsgid \"\"\n\"You can view a [full list of formatting traits](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits) and their argument types in the [`std::fmt`]\"\n\"(https://doc.rust-lang.org/std/fmt/) documentation.\"\nmsgstr \"\"\n\"Puede ver una [lista completa de traits de formato](https://doc.rust-lang.\"\n\"org/std/fmt/#formatting-traits) y sus tipos de argumentos en la \"\n\"documentación de [`std::fmt`](https://doc.rust-lang.org/std/fmt/).\"\n\n#: src/hello/print/fmt.md:72\nmsgid \"\"\n\"Add an implementation of the `fmt::Display` trait for the `Color` struct \"\n\"above so that the output displays as:\"\nmsgstr \"\"\n\"Agrega una implementación del trait `fmt::Display` para la estructura \"\n\"`Color`arriba para que la salida se muestre como:\"\n\n#: src/hello/print/fmt.md:81\nmsgid \"Three hints if you get stuck:\"\nmsgstr \"Tres pistas por si te atoras:\"\n\n#: src/hello/print/fmt.md:83\nmsgid \"\"\n\"The formula for calculating a color in the RGB color space is: `RGB = \"\n\"(R*65536)+(G*256)+B , (when R is RED, G is GREEN and B is BLUE)`. For more \"\n\"see [RGB color format & calculation](https://www.rapidtables.com/web/color/\"\n\"RGB_Color.html#rgb-format).\"\nmsgstr \"\"\n\"La fórmula para calcular un color en el espacio de color RGB es: `RGB = \"\n\"(R*65536)+(G*256)+B, (cuando R es ROJO, G es VERDE y B es AZUL)`. Para más \"\n\"ver [Formato de color RGB y su cálculo](https://www.rapidtables.com/web/color/\"\n\"RGB_Color.html#rgb-format).\"\n\n#: src/hello/print/fmt.md:86\nmsgid \"\"\n\"You [may need to list each color more than once](https://doc.rust-lang.org/\"\n\"std/fmt/#named-parameters).\"\nmsgstr \"\"\n\"Puede que [necesites enumerar cada color más de una vez](https://doc.rust-lang.org/\"\n\"std/fmt/#named-parameters).\"\n\n#: src/hello/print/fmt.md:87\nmsgid \"\"\n\"You can [pad with zeros to a width of 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width) with `:0>2`.\"\nmsgstr \"\"\n\"Puedes [acolchonar con ceros a un ancho de 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width) usando `:0>2`.\"\n\n#: src/hello/print/fmt.md:91\nmsgid \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\nmsgstr \"\"\n\n#: src/primitives.md:3\nmsgid \"\"\n\"Rust provides access to a wide variety of `primitives`. A sample includes:\"\nmsgstr \"\"\n\"Rust proporciona acceso a una amplia variedad de `primitivas`. Algunos ejemplos son:\"\n\n#: src/primitives.md:5\nmsgid \"Scalar Types\"\nmsgstr \"Tipos Escalares\"\n\n#: src/primitives.md:7\nmsgid \"\"\n\"Signed integers: `i8`, `i16`, `i32`, `i64`, `i128` and `isize` (pointer size)\"\nmsgstr \"\"\n\"Enteros con signo: `i8`, `i16`, `i32`, `i64`, `i128` y `isize` (el tamaño del puntero)\"\n\n#: src/primitives.md:8\nmsgid \"\"\n\"Unsigned integers: `u8`, `u16`, `u32`, `u64`, `u128` and `usize` (pointer \"\n\"size)\"\nmsgstr \"\"\n\"Enteros sin signo: `u8`, `u16`, `u32`, `u64`, `u128` y `usize` (el tamaño del puntero\"\n\")\"\n\n#: src/primitives.md:10\nmsgid \"Floating point: `f32`, `f64`\"\nmsgstr \"Punto flotante: `f32`, `f64`\"\n\n#: src/primitives.md:11\nmsgid \"`char` Unicode scalar values like `'a'`, `'α'` and `'∞'` (4 bytes each)\"\nmsgstr \"`char` Valores de Unicode escalares como `'a'`, `'α'` y `'∞'` (4 bytes cada uno)\"\n\n#: src/primitives.md:12\nmsgid \"`bool` either `true` or `false`\"\nmsgstr \"`bool` puede ser `true` o `falso`\"\n\n#: src/primitives.md:13\nmsgid \"The unit type `()`, whose only possible value is an empty tuple: `()`\"\nmsgstr \"El tipo unitario `()`, cuyo único posible valor es la tupla vacía: `()`\"\n\n#: src/primitives.md:15\nmsgid \"\"\n\"Despite the value of a unit type being a tuple, it is not considered a \"\n\"compound type because it does not contain multiple values.\"\nmsgstr \"\"\n\"A pesar de que el valor de un tipo de unidad es una tupla, no se considera un\"\n\"tipo de compuesto porque no contiene múltiples valores.\"\n\n#: src/primitives.md:18\nmsgid \"Compound Types\"\nmsgstr \"Tipos Compuestos\"\n\n#: src/primitives.md:20\nmsgid \"Arrays like `[1, 2, 3]`\"\nmsgstr \"Arreglos como `[1, 2, 3]`\"\n\n#: src/primitives.md:21\nmsgid \"Tuples like `(1, true)`\"\nmsgstr \"Tuplas como `(1, true)`\"\n\n#: src/primitives.md:23\nmsgid \"\"\n\"Variables can always be _type annotated_. Numbers may additionally be \"\n\"annotated via a _suffix_ or _by default_. Integers default to `i32` and \"\n\"floats to `f64`. Note that Rust can also infer types from context.\"\nmsgstr \"\"\n\"Las variables siempre pueden llevar _anotación de tipos_. Los números también pueden ser\"\n\"anotados a través de un _sufijo_ o _por default_. Los enteros usan como default `i32` y \"\n\"los flotantes usan a `f64`. Tenga en cuenta que Rust puede también puede inferir tipos.\"\n\n#: src/primitives.md:29\nmsgid \"// Variables can be type annotated.\\n\"\nmsgstr \"// Las variables pueden llevar anotaciónes de tipo.\\n\"\n\n#: src/primitives.md:32\nmsgid \"// Regular annotation\\n\"\nmsgstr \"// Anotación regular\\n\"\n\n#: src/primitives.md:33\nmsgid \"// Suffix annotation\\n\"\nmsgstr \"// Anotación con sufijo\\n\"\n\n#: src/primitives.md:35\nmsgid \"// Or a default will be used.\\n\"\nmsgstr \"// O se usará un default.\\n\"\n\n#: src/primitives.md:36\nmsgid \"// `f64`\\n\"\nmsgstr \"\"\n\n#: src/primitives.md:37\nmsgid \"// `i32`\\n\"\nmsgstr \"\"\n\n#: src/primitives.md:39\nmsgid \"// A type can also be inferred from context.\\n\"\nmsgstr \"// Un tipo también se puede inferir por context.\\n\"\n\n#: src/primitives.md:40\nmsgid \"// Type i64 is inferred from another line.\\n\"\nmsgstr \"// El tipo i64 se puede inferir de otra línea.\\n\"\n\n#: src/primitives.md:43\nmsgid \"// A mutable variable's value can be changed.\\n\"\nmsgstr \"// Una mariable mutable puede cambiar.\\n\"\n\n#: src/primitives.md:44\nmsgid \"// Mutable `i32`\\n\"\nmsgstr \"// `i32` Mutable\\n\"\n\n#: src/primitives.md:47\nmsgid \"// Error! The type of a variable can't be changed.\\n\"\nmsgstr \"// Error! El tipo de la variable no se puede cambiar.\\n\"\n\n#: src/primitives.md:50\nmsgid \"// Variables can be overwritten with shadowing.\\n\"\nmsgstr \"// Las variables se puede sobreescribir con sombreo.\\n\"\n\n#: src/primitives.md:53\nmsgid \"/* Compound types - Array and Tuple */\"\nmsgstr \"/* Tipos compuestos - Arreglo y Tupla */\"\n\n#: src/primitives.md:55\nmsgid \"// Array signature consists of Type T and length as [T; length].\\n\"\nmsgstr \"// La declaración del tipo de Arreglo consiste del tipo T y la longitud como [T; longitud].\\n\"\n\n#: src/primitives.md:58\nmsgid \"\"\n\"// Tuple is a collection of values of different types \\n\"\n\"    // and is constructed using parentheses ().\\n\"\nmsgstr \"\"\n\"// Una tupla es una colección de valores de diferentes tipos\\n\"\n\"   // y se construye usando paréntesis ().\\n\"\n\n#: src/primitives.md:66\nmsgid \"\"\n\"[the `std` library](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [`inference`](types/inference.md), and \"\n\"[`shadowing`](variable_bindings/scope.md)\"\nmsgstr \"\"\n\"[the `std` library](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [`inference`](types/inference.md), y \"\n\"[`shadowing`](variable_bindings/scope.md)\"\n\n#: src/primitives/literals.md:3\nmsgid \"\"\n\"Integers `1`, floats `1.2`, characters `'a'`, strings `\\\"abc\\\"`, booleans \"\n\"`true` and the unit type `()` can be expressed using literals.\"\nmsgstr \"\"\n\"Enteros `1`, flotantes `1.2`, caractéres `'a'`, cadenas `\\\"abc\\\"`, booleanos \"\n\"`true` y el tipo unitario `()` se puede expresar con literales.\"\n\n#: src/primitives/literals.md:6\nmsgid \"\"\n\"Integers can, alternatively, be expressed using hexadecimal, octal or binary \"\n\"notation using these prefixes respectively: `0x`, `0o` or `0b`.\"\nmsgstr \"\"\n\"Los enteros pueden, alternativamente, expresarse utilizando notación hexadecimal, octal o binaria\"\n\"usando estos prefijos respectivamente: `0x`, `0o` o` 0b`.\"\n\n#: src/primitives/literals.md:9\nmsgid \"\"\n\"Underscores can be inserted in numeric literals to improve readability, e.g. \"\n\"`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.\"\nmsgstr \"\"\n\"Se pueden insertar guíones bajos en literales numéricos para mejorar la legibilidad, por ejemplo,\"\n\"`1_000` es lo mismo que `1000`, y `0.000_001` es lo mismo que `0.000001`.\"\n\n#: src/primitives/literals.md:12\nmsgid \"\"\n\"Rust also supports scientific [E-notation](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation), e.g. `1e6`, `7.6e-4`. The associated type \"\n\"is `f64`.\"\nmsgstr \"\"\n\"Rust también admite [notación E científica](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation), e.g. `1e6`, `7.6e-4`. El tipo asociado es \"\n\"`f64`.\"\n\n#: src/primitives/literals.md:15\nmsgid \"\"\n\"We need to tell the compiler the type of the literals we use. For now, we'll \"\n\"use the `u32` suffix to indicate that the literal is an unsigned 32-bit \"\n\"integer, and the `i32` suffix to indicate that it's a signed 32-bit integer.\"\nmsgstr \"\"\n\"Necesitamos decirle al compilador el tipo de literales que usamos. Por ahora, lo haremos\"\n\"usando el sufijo `u32` para indicar que el literal es un entero sin signo de 32 bits \"\n\", y el sufijo `i32` para indicar que es un entero con signo de 32 bits.\"\n\n#: src/primitives/literals.md:19\nmsgid \"\"\n\"The operators available and their precedence [in Rust](https://doc.rust-lang.\"\n\"org/reference/expressions.html#expression-precedence) are similar to other \"\n\"[C-like languages](https://en.wikipedia.org/wiki/\"\n\"Operator_precedence#Programming_languages).\"\nmsgstr \"\"\n\"Los operadores disponibles y su precedencia [en Rust](https://doc.rust-lang.\"\n\"org/reference/expressions.html#expression-precedence) es similar a otros \"\n\"[lenguajes como C](https://en.wikipedia.org/wiki/\"\n\"Operator_precedence#Programming_languages).\"\n\n#: src/primitives/literals.md:24\nmsgid \"// Integer addition\\n\"\nmsgstr \"// Suma de enteros\"\n\n#: src/primitives/literals.md:25\nmsgid \"\\\"1 + 2 = {}\\\"\"\nmsgstr \"\"\n\n#: src/primitives/literals.md:27\nmsgid \"// Integer subtraction\\n\"\nmsgstr \"// Resta de enteros\"\n\n#: src/primitives/literals.md:28\nmsgid \"\\\"1 - 2 = {}\\\"\"\nmsgstr \"\"\n\n#: src/primitives/literals.md:29\nmsgid \"\"\n\"// TODO ^ Try changing `1i32` to `1u32` to see why the type is important\\n\"\nmsgstr \"\"\n\"// TAREA ^ Intenta cambiar `1i32` a `1u32` para ver por qué el tipo es importante\\n\"\n\n#: src/primitives/literals.md:31\nmsgid \"// Scientific notation\\n\"\nmsgstr \"// Notación científica\"\n\n#: src/primitives/literals.md:32\nmsgid \"\\\"1e4 is {}, -2.5e-3 is {}\\\"\"\nmsgstr \"\\\"1e4 es {}, -2.5e-3 es {}\\\"\"\n\n#: src/primitives/literals.md:34\nmsgid \"// Short-circuiting boolean logic\\n\"\nmsgstr \"// Lógica booleana de corto circuito\"\n\n#: src/primitives/literals.md:35\nmsgid \"\\\"true AND false is {}\\\"\"\nmsgstr \"\\\"true Y false es {}\\\"\"\n\n#: src/primitives/literals.md:36\nmsgid \"\\\"true OR false is {}\\\"\"\nmsgstr \"\\\"true O false es {}\\\"\"\n\n#: src/primitives/literals.md:37\nmsgid \"\\\"NOT true is {}\\\"\"\nmsgstr \"\\\"NOT true es {}\\\"\"\n\n#: src/primitives/literals.md:39\nmsgid \"// Bitwise operations\\n\"\nmsgstr \"// Operaciones sobre bits\"\n\n#: src/primitives/literals.md:40\nmsgid \"\\\"0011 AND 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 AND 0101 es {:04b}\\\"\"\n\n#: src/primitives/literals.md:41\nmsgid \"\\\"0011 OR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 OR 0101 es {:04b}\\\"\"\n\n#: src/primitives/literals.md:42\nmsgid \"\\\"0011 XOR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 XOR 0101 es {:04b}\\\"\"\n\n#: src/primitives/literals.md:43\nmsgid \"\\\"1 << 5 is {}\\\"\"\nmsgstr \"\\\"1 << 5 es {}\\\"\"\n\n#: src/primitives/literals.md:44\nmsgid \"\\\"0x80 >> 2 is 0x{:x}\\\"\"\nmsgstr \"\\\"0x80 >> 2 es 0x{:x}\\\"\"\n\n#: src/primitives/literals.md:46\nmsgid \"// Use underscores to improve readability!\\n\"\nmsgstr \"// ¡Usa guiones bajos para mejorar la legibilidad!\\n\"\n\n#: src/primitives/literals.md:47\nmsgid \"\\\"One million is written as {}\\\"\"\nmsgstr \"\\\" Un millón se escribe como {}\\\"\"\n\n#: src/primitives/tuples.md:3\nmsgid \"\"\n\"A tuple is a collection of values of different types. Tuples are constructed \"\n\"using parentheses `()`, and each tuple itself is a value with type signature \"\n\"`(T1, T2, ...)`, where `T1`, `T2` are the types of its members. Functions \"\n\"can use tuples to return multiple values, as tuples can hold any number of \"\n\"values.\"\nmsgstr \"\"\n\"Una tupla es una colección de valores de diferentes tipos. Se construyen tuplas\"\n\"usando paréntesis `()`, y cada tupla en sí es un valor con la anotación de tipo\"\n\"`(T1, t2, ...) `, donde `t1`, `t2` son los tipos de sus miembros. Las funciones\"\n\"pueden usar tuplas para devolver múltiples valores, ya que las tuplas pueden contener cualquier número de\"\n\"valores.\"\n\n#: src/primitives/tuples.md:9\nmsgid \"// Tuples can be used as function arguments and as return values.\\n\"\nmsgstr \"// Las tuplas se pueden como argumentos de funciones y como sus valores de retorno.\\n\"\n\n#: src/primitives/tuples.md:11\nmsgid \"// `let` can be used to bind the members of a tuple to variables.\\n\"\nmsgstr \"// `let` se puede usar para ligar los miembros de la tupla a variables.\\n\"\n\n#: src/primitives/tuples.md:16\nmsgid \"// The following struct is for the activity.\\n\"\nmsgstr \"// La siguiente `struct` es para la actividad.\\n\"\n\n#: src/primitives/tuples.md:22\nmsgid \"// A tuple with a bunch of different types.\\n\"\nmsgstr \"// Una tupla es montón de tipos diferentes.\\n\"\n\n#: src/primitives/tuples.md:26 src/generics.md:50 src/generics.md:55\n#: src/generics/gen_fn.md:47\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/primitives/tuples.md:28\nmsgid \"// Values can be extracted from the tuple using tuple indexing.\\n\"\nmsgstr \"// Se pueden extraer valores de la tupla indexando\"\n\n#: src/primitives/tuples.md:29\nmsgid \"\\\"Long tuple first value: {}\\\"\"\nmsgstr \"\\\"Tupla grande primer valor: {}\\\"\"\n\n#: src/primitives/tuples.md:30\nmsgid \"\\\"Long tuple second value: {}\\\"\"\nmsgstr \"\\\"Tupla grande segundo valor: {}\\\"\"\n\n#: src/primitives/tuples.md:32\nmsgid \"// Tuples can be tuple members.\\n\"\nmsgstr \"// Tuplas con tuplas como miembros.\\n\"\n\n#: src/primitives/tuples.md:35\nmsgid \"// Tuples are printable.\\n\"\nmsgstr \"// Las tuples se pueden imprimir.\\n\"\n\n#: src/primitives/tuples.md:36\nmsgid \"\\\"tuple of tuples: {:?}\\\"\"\nmsgstr \"\\\"tupla de tuplas: {:?}\\\"\"\n\n#: src/primitives/tuples.md:38\nmsgid \"\"\n\"// But long Tuples (more than 12 elements) cannot be printed.\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"Too long tuple: {:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ Uncomment the above 2 lines to see the compiler error\\n\"\nmsgstr \"\"\n\"// Pero no se pueden imprimir tuplas demasadio grandes (más de 12 elementos).\\n\"\n\"   // let tupla_demasiado_grande = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"   // println!(\\\"Tupla demasiado grande: {:?}\\\", tupla_demasiado_grande);\\n\"\n\"   // TAREA ^ Quita el comentario de las 2 líneas anteriores para ver el error del compilador\\n\"\n\n#: src/primitives/tuples.md:44\nmsgid \"\\\"Pair is {:?}\\\"\"\nmsgstr \"\\\"Par es {:?}\\\"\"\n\n#: src/primitives/tuples.md:46\nmsgid \"\\\"The reversed pair is {:?}\\\"\"\nmsgstr \"\\\"El par invertido es {:?}\\\"\"\n\n#: src/primitives/tuples.md:48\nmsgid \"\"\n\"// To create one element tuples, the comma is required to tell them apart\\n\"\n\"    // from a literal surrounded by parentheses.\\n\"\nmsgstr \"\"\n\"// Para crear un tuplas de un sólo elemento, se requiere la coma para distinguirlas\\n\"\n\"   // de un literal rodeado de paréntesis.\\n\"\n\n#: src/primitives/tuples.md:50\nmsgid \"\\\"One element tuple: {:?}\\\"\"\nmsgstr \"\\\"Una tupla de 1 elemento: {:?}\\\"\"\n\n#: src/primitives/tuples.md:51\nmsgid \"\\\"Just an integer: {:?}\\\"\"\nmsgstr \"\\\"Sólo un entero: {:?}\\\"\"\n\n#: src/primitives/tuples.md:53\nmsgid \"// Tuples can be destructured to create bindings.\\n\"\nmsgstr \"// Las tuplas puede desestructurar para crear variables.\\n\"\n\n#: src/primitives/tuples.md:54 src/conversion/from_into.md:17\n#: src/fn/closures/input_parameters.md:52 src/std_misc/fs.md:51\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/primitives/tuples.md:57\nmsgid \"\\\"{:?}, {:?}, {:?}, {:?}\\\"\"\nmsgstr \"\"\n\n#: src/primitives/tuples.md:66\nmsgid \"\"\n\"_Recap_: Add the `fmt::Display` trait to the `Matrix` struct in the above \"\n\"example, so that if you switch from printing the debug format `{:?}` to the \"\n\"display format `{}`, you see the following output:\"\nmsgstr \"\"\n\"_Recapitulando_: Agrega el rasgo `fmt::Display` a `Matrix` en el ejemplo\"\n\"anterior, de modo que si cambias de imprimir el formato de depuración `{:?}` al\"\n\"formato de visualización `{}`, ves la siguiente salida:\"\n\n#: src/primitives/tuples.md:75\nmsgid \"\"\n\"You may want to refer back to the example for [print display](../hello/print/\"\n\"print_display.md).\"\nmsgstr \"\"\n\"Es posible que desee consultar el ejemplo de [impresión a pantalla](../hello/print/\"\n\"print_display.md).\"\n\n#: src/primitives/tuples.md:76\nmsgid \"\"\n\"Add a `transpose` function using the `reverse` function as a template, which \"\n\"accepts a matrix as an argument, and returns a matrix in which two elements \"\n\"have been swapped. For example:\"\nmsgstr \"\"\n\"Agrega una función `transpose` usando la función `reverse` como una plantilla, el cual\"\n\"acepta una matriz como argumento y devuelve una matriz en la que dos elementos\"\n\"han sido intercambiados. Por ejemplo:\"\n\n#: src/primitives/tuples.md:81\nmsgid \"\\\"Matrix:\\\\n{}\\\"\"\nmsgstr \"\\\"Matriz:\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:82\nmsgid \"\\\"Transpose:\\\\n{}\\\"\"\nmsgstr \"\\\"Transpuesta:\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:85\nmsgid \"Results in the output:\"\nmsgstr \"Resultados en el output:\"\n\n#: src/primitives/array.md:3\nmsgid \"\"\n\"An array is a collection of objects of the same type `T`, stored in \"\n\"contiguous memory. Arrays are created using brackets `[]`, and their length, \"\n\"which is known at compile time, is part of their type signature `[T; \"\n\"length]`.\"\nmsgstr \"\"\n\"Un arreglo es una colección de objetos del mismo tipo `t`, almacenado en \"\n\"memoria contigua. Los arreglos se crean usando corchetes cuardrados `[]`, y su longitud, \"\n\"que se conoce en el momento de la compilación, es parte de su anotación de tipo `[T; \"\n\"longitud]`.\"\n\n#: src/primitives/array.md:7\nmsgid \"\"\n\"Slices are similar to arrays, but their length is not known at compile time. \"\n\"Instead, a slice is a two-word object; the first word is a pointer to the \"\n\"data, the second word is the length of the slice. The word size is the same \"\n\"as usize, determined by the processor architecture, e.g. 64 bits on an \"\n\"x86-64. Slices can be used to borrow a section of an array and have the type \"\n\"signature `&[T]`.\"\nmsgstr \"\"\n\"Las slices son similares a los arreglos, pero su longitud no se conoce al momento de compilar.\"\n\"En cambio, un slice es un objeto de dos 'words' del procesador; la primera palabra es un puntero a los\"\n\"datos, la segunda palabra es la longitud del slice. El tamaño de la palabra es el mismo\"\n\"que usize, el cual se determina por la arquitectura del procesador, e.g. 64 bits en \"\n\"x86-64. Los slices se pueden usar para tomar un `borrow` de una sección de un arreglo y tener la anotación\"\n\"de tipo `&[t]`.\"\n\n#: src/primitives/array.md:15\nmsgid \"// This function borrows a slice.\\n\"\nmsgstr \"// Esta funcion hace borrow a una slice.\\n\"\n\n#: src/primitives/array.md:18\nmsgid \"\\\"First element of the slice: {}\\\"\"\nmsgstr \"\\\" El primer elemento de un slice: {}\\\"\"\n\n#: src/primitives/array.md:19\nmsgid \"\\\"The slice has {} elements\\\"\"\nmsgstr \"\\\"El slice tiene {} elementos\\\"\"\n\n#: src/primitives/array.md:23\nmsgid \"// Fixed-size array (type signature is superfluous).\\n\"\nmsgstr \"// Arreglos de tamaño fijo (su anotación de tipo es superflua).\\n\"\n\n#: src/primitives/array.md:26\nmsgid \"// All elements can be initialized to the same value.\\n\"\nmsgstr \"// Todos los elementos pueden ser inicializados al mismo valor.\\n\"\n\n#: src/primitives/array.md:29\nmsgid \"// Indexing starts at 0.\\n\"\nmsgstr \"// Los índices empiezan en 0.\\n\"\n\n#: src/primitives/array.md:30\nmsgid \"\\\"First element of the array: {}\\\"\"\nmsgstr \"\\\"El primer elemento del arreglo: {}\\\"\"\n\n#: src/primitives/array.md:31\nmsgid \"\\\"Second element of the array: {}\\\"\"\nmsgstr \"\\\"El segundo elemento del arreglo: {}\\\"\"\n\n#: src/primitives/array.md:33\nmsgid \"// `len` returns the count of elements in the array.\\n\"\nmsgstr \"// `len` regresa cuántos elementos hay en el arreglo.\\n\"\n\n#: src/primitives/array.md:34\nmsgid \"\\\"Number of elements in array: {}\\\"\"\nmsgstr \"\\\"Número de elementos en el arreglo: {} \\\"\"\n\n#: src/primitives/array.md:36\nmsgid \"// Arrays are stack allocated.\\n\"\nmsgstr \"// Los arreglos se colocan en el stack.\\n\"\n\n#: src/primitives/array.md:37\nmsgid \"\\\"Array occupies {} bytes\\\"\"\nmsgstr \"\\\"Los arreglos ocupan {} bytes\\\"\"\n\n#: src/primitives/array.md:39\nmsgid \"// Arrays can be automatically borrowed as slices.\\n\"\nmsgstr \"// Los arreglos pueden ser `borrowed` como slices.\\n\"\n\n#: src/primitives/array.md:40\nmsgid \"\\\"Borrow the whole array as a slice.\\\"\"\nmsgstr \"\\\"Hace borrow de todo el arreglo como un slice.\\\"\"\n\n#: src/primitives/array.md:43\nmsgid \"\"\n\"// Slices can point to a section of an array.\\n\"\n\"    // They are of the form [starting_index..ending_index].\\n\"\n\"    // `starting_index` is the first position in the slice.\\n\"\n\"    // `ending_index` is one more than the last position in the slice.\\n\"\nmsgstr \"\"\n\"// Los slices pueden apuntar a una sección de un arreglo.\\n\"\n\"   // Estos son de la forma [índice_inicial..índice_final].\\n\"\n\"   // `índice_inicial` es la primera posición en el slice.\\n\"\n\"   // `índice_final` es uno más que la última posición en la porción.\\n\"\n\n#: src/primitives/array.md:47\nmsgid \"\\\"Borrow a section of the array as a slice.\\\"\"\nmsgstr \"\\\"Hace Borrow de una sección del arreglo como un slice.\\\"\"\n\n#: src/primitives/array.md:50\nmsgid \"// Example of empty slice `&[]`:\\n\"\nmsgstr \"// Un ejemplo de un slice vacío `&[]`:\\n\"\n\n#: src/primitives/array.md:53\nmsgid \"// Same but more verbose\\n\"\nmsgstr \"// Lo mismo pero menos conciso\"\n\n#: src/primitives/array.md:55\nmsgid \"\"\n\"// Arrays can be safely accessed using `.get`, which returns an\\n\"\n\"    // `Option`. This can be matched as shown below, or used with\\n\"\n\"    // `.expect()` if you would like the program to exit with a nice\\n\"\n\"    // message instead of happily continue.\\n\"\nmsgstr \"\"\n\"// Se pueden acceder a las arreglos de forma segura usando `.get`, el cual devuelve un \\n\"\n\"    // `Option'. Aquí se puede usar un match como se muestra a continuación, o en su caso con \\n\"\n\"    // `.expect()` si desees que el programa termine con un amable\\n\"\n\"    // mensaje en lugar de continuar felizmente.\\n\"\n\n#: src/primitives/array.md:59\nmsgid \"// Oops, one element too far!\\n\"\nmsgstr \"// ¡Oops!, un elemento de sobra.\\n\"\n\n#: src/primitives/array.md:61\nmsgid \"\\\"{}: {}\\\"\"\nmsgstr \"\"\n\n#: src/primitives/array.md:62\nmsgid \"\\\"Slow down! {} is too far!\\\"\"\nmsgstr \"\\\"¡Para! {} es demasiado lejos\\\"\"\n\n#: src/primitives/array.md:66\nmsgid \"\"\n\"// Out of bound indexing on array with constant value causes compile time \"\n\"error.\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // Out of bound indexing on slice causes runtime error.\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\nmsgstr \"\"\n\"// Usar un índice constante que se encuentra fuera del rango válido causa un error de compilación.\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // Usar un índice fuera de rango en un slice causa un error de compilación.\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\n\n#: src/custom_types.md:3\nmsgid \"Rust custom data types are formed mainly through the two keywords:\"\nmsgstr \"Los tipos de datos personalizados en Rust se logran principalmente con 2 palabras clave:\"\n\n#: src/custom_types.md:5\nmsgid \"`struct`: define a structure\"\nmsgstr \"`struct`: define una estructura\"\n\n#: src/custom_types.md:6\nmsgid \"`enum`: define an enumeration\"\nmsgstr \"`enum`: define una enumeración\"\n\n#: src/custom_types.md:8\nmsgid \"Constants can also be created via the `const` and `static` keywords.\"\nmsgstr \"Las constantes se crean con las palabras clave `const` o `static`.\"\n\n#: src/custom_types/structs.md:3\nmsgid \"\"\n\"There are three types of structures (\\\"structs\\\") that can be created using \"\n\"the `struct` keyword:\"\nmsgstr \"\"\n\"Hay tres tipos de estructuras (\\\"struct\\\") que se pueden crear usando\"\n\"la palabra clave 'struct`:\"\n\n#: src/custom_types/structs.md:6\nmsgid \"Tuple structs, which are, basically, named tuples.\"\nmsgstr \"Estructuras de tupla, las cuales son básicamente tuplas nombradas.\"\n\n#: src/custom_types/structs.md:7\nmsgid \"\"\n\"The classic [C structs](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\nmsgstr \"\"\n\"Las clásicas estructuras [struct de C](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\n\n#: src/custom_types/structs.md:8\nmsgid \"Unit structs, which are field-less, are useful for generics.\"\nmsgstr \"Las structs unitarias, las cuales no tienen campos, y son útiles para los genéricos.\"\n\n#: src/custom_types/structs.md:11 src/custom_types/enum/enum_use.md:6\n#: src/custom_types/enum/c_like.md:6\nmsgid \"// An attribute to hide warnings for unused code.\\n\"\nmsgstr \"// Un atributo para esconder las advertencias del código no utilizado.\\n\"\n\n#: src/custom_types/structs.md:19\nmsgid \"// A unit struct\\n\"\nmsgstr \"// Una struct unitaria\"\n\n#: src/custom_types/structs.md:22\nmsgid \"// A tuple struct\\n\"\nmsgstr \"// Una struct de tupla\"\n\n#: src/custom_types/structs.md:25\nmsgid \"// A struct with two fields\\n\"\nmsgstr \"// Una struct de dos campos\\n\"\n\n#: src/custom_types/structs.md:31\nmsgid \"// Structs can be reused as fields of another struct\\n\"\nmsgstr \"// Las Structs pueden reutilizar los campos de otras structs\\n\"\n\n#: src/custom_types/structs.md:34\nmsgid \"\"\n\"// A rectangle can be specified by where the top left and bottom right\\n\"\n\"    // corners are in space.\\n\"\nmsgstr \"\"\n\"// Un rectángulo se puede escpecificar por dónde las esquinas de arriba a la izquierda y abajo a la derecha\"\n\"    // se encuentran en el espacio.\\n\"\n\n#: src/custom_types/structs.md:41\nmsgid \"// Create struct with field init shorthand\\n\"\nmsgstr \"// Abreviación para crear un struct con un campo ya inicializado\\n\"\n\n#: src/custom_types/structs.md:46\nmsgid \"// Print debug struct\\n\"\nmsgstr \"// Imprime un struct de depuración\\n\"\n\n#: src/custom_types/structs.md:49\nmsgid \"// Instantiate a `Point`\\n\"\nmsgstr \"// Instanciar un `Point`\\n\"\n\n#: src/custom_types/structs.md:53\nmsgid \"// Access the fields of the point\\n\"\nmsgstr \"// Accesa los campos del punto\\n\"\n\n#: src/custom_types/structs.md:54\nmsgid \"\\\"point coordinates: ({}, {})\\\"\"\nmsgstr \"\\\"coordenadas del punto: ({}, {})\\\"\"\n\n#: src/custom_types/structs.md:56\nmsgid \"\"\n\"// Make a new point by using struct update syntax to use the fields of our\\n\"\n\"    // other one\\n\"\nmsgstr \"\"\n\"// Crea un nuevo punto usando la sintáxis de update de struct para usar los campos\\n\"\n\"    // del otro struct\\n\"\n\n#: src/custom_types/structs.md:60\nmsgid \"\"\n\"// `bottom_right.y` will be the same as `another_point.y` because we used \"\n\"that field\\n\"\n\"    // from `another_point`\\n\"\nmsgstr \"\"\n\"// `abajo_derecha.y` va a ser lo mismo que `otro_punto.y` por que usamos ese \"\n\"campo \\n\"\n\"    // de `otro_punto`\\n\"\n\n#: src/custom_types/structs.md:62\nmsgid \"\\\"second point: ({}, {})\\\"\"\nmsgstr \"\\\"segundo punto: ({}, {})\\\"\"\n\n#: src/custom_types/structs.md:64\nmsgid \"// Destructure the point using a `let` binding\\n\"\nmsgstr \"// Destructura el punto con un enlace `let`\\n\"\n\n#: src/custom_types/structs.md:68\nmsgid \"// struct instantiation is an expression too\\n\"\nmsgstr \"// también se puede hacer la instanciación de un struct con una expresión\"\n\n#: src/custom_types/structs.md:73\nmsgid \"// Instantiate a unit struct\\n\"\nmsgstr \"// Instacia una struct unitaria\"\n\n#: src/custom_types/structs.md:76\nmsgid \"// Instantiate a tuple struct\\n\"\nmsgstr \"// Instancia una estructura de tupla\\n\"\n\n#: src/custom_types/structs.md:79\nmsgid \"// Access the fields of a tuple struct\\n\"\nmsgstr \"// Accesa los campos de una estructura de tupla\\n\"\n\n#: src/custom_types/structs.md:80 src/custom_types/structs.md:85\nmsgid \"\\\"pair contains {:?} and {:?}\\\"\"\nmsgstr \"\\\"un par contiene {:?} y {:?}\\\"\"\n\n#: src/custom_types/structs.md:82\nmsgid \"// Destructure a tuple struct\\n\"\nmsgstr \"// Destructura una estructura de tupla\"\n\n#: src/custom_types/structs.md:91\nmsgid \"\"\n\"Add a function `rect_area` which calculates the area of a `Rectangle` (try \"\n\"using nested destructuring).\"\nmsgstr \"\"\n\"Agregue una función `rect_area` que calcula el área de un `Rectangle` (intenta\"\n\"usar de la destructación anidada).\"\n\n#: src/custom_types/structs.md:93\nmsgid \"\"\n\"Add a function `square` which takes a `Point` and a `f32` as arguments, and \"\n\"returns a `Rectangle` with its top left corner on the point, and a width and \"\n\"height corresponding to the `f32`.\"\nmsgstr \"\"\n\"Agregue una función `square` que toma un `Punto` y un `f32` como argumentos, y \"\n\"devuelve un `Rectangle` con su esquina superior izquierda en el punto, y un ancho y\"\n\"altura correspondiente al `f32`.\"\n\n#: src/custom_types/structs.md:97\nmsgid \"See also\"\nmsgstr \"Véase también\"\n\n#: src/custom_types/structs.md:99\nmsgid \"\"\n\"[`attributes`](../attribute.md), [raw identifiers](../compatibility/\"\n\"raw_identifiers.md) and [destructuring](../flow_control/match/destructuring.\"\n\"md)\"\nmsgstr \"\"\n\"[`attributes`](../attribute.md), [raw identifiers](../compatibility/\"\n\"raw_identifiers.md) y [destructuring](../flow_control/match/destructuring.\"\n\"md)\"\n\n#: src/custom_types/enum.md:3\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which may be one of a few \"\n\"different variants. Any variant which is valid as a `struct` is also valid \"\n\"in an `enum`.\"\nmsgstr \"\"\n\"La palabra clave `enum` permite la creación de un tipo que puede ser uno de unas pocas\"\n\"diferentes variantes. Cualquier variante que sea válida como `struct` también es válida\"\n\"en un `enum`.\"\n\n#: src/custom_types/enum.md:8\nmsgid \"\"\n\"// Create an `enum` to classify a web event. Note how both\\n\"\n\"// names and type information together specify the variant:\\n\"\n\"// `PageLoad != PageUnload` and `KeyPress(char) != Paste(String)`.\\n\"\n\"// Each is different and independent.\\n\"\nmsgstr \"\"\n\"// Cree un `enum` para clasificar un evento web. Tenga en cuenta cómo ambos los\\n\"\n\"// nombres y los tipos juntos especifican la variante:\\n\"\n\"// `PageLoad != PageUnload` y `KeyPress(char) != Paste(String)`.\\n\"\n\"// Cada uno es diferente e independiente.\\n\"\n\n#: src/custom_types/enum.md:13\nmsgid \"// An `enum` variant may either be `unit-like`,\\n\"\nmsgstr \"// Una variante `enum` puede ser `cuasi-unitaria`,\\n\"\n\n#: src/custom_types/enum.md:16\nmsgid \"// like tuple structs,\\n\"\nmsgstr \"// como estructuras de tuplas\"\n\n#: src/custom_types/enum.md:19\nmsgid \"// or c-like structures.\\n\"\nmsgstr \"// o estructuras estilo C.\\n\"\n\n#: src/custom_types/enum.md:22\nmsgid \"\"\n\"// A function which takes a `WebEvent` enum as an argument and\\n\"\n\"// returns nothing.\\n\"\nmsgstr \"\"\n\"// Una función que toma un enum 'WebEvent` como argumento y \\n\"\n\"// no devuelve nada.\\n\"\n\n#: src/custom_types/enum.md:27\nmsgid \"\\\"page loaded\\\"\"\nmsgstr \"\\\"página cargada\\\"\"\n\n#: src/custom_types/enum.md:28\nmsgid \"\\\"page unloaded\\\"\"\nmsgstr \"\\\"página descargada \\\"\"\n\n#: src/custom_types/enum.md:29\nmsgid \"// Destructure `c` from inside the `enum` variant.\\n\"\nmsgstr \"// Destructura `c` desde dentro de la variante `enum`.\\n\"\n\n#: src/custom_types/enum.md:30\nmsgid \"\\\"pressed '{}'.\\\"\"\nmsgstr \"\\\"presionaste '{}'.\\\"\"\n\n#: src/custom_types/enum.md:31\nmsgid \"\\\"pasted \\\\\\\"{}\\\\\\\".\\\"\"\nmsgstr \"\\\"pegaste \\\\\\\"{}\\\\\\\".\\\"\"\n\n\n#: src/custom_types/enum.md:32\nmsgid \"// Destructure `Click` into `x` and `y`.\\n\"\nmsgstr \"// Destructura `Click` en `x` y `y`.\\n\"\n\n#: src/custom_types/enum.md:34\nmsgid \"\\\"clicked at x={}, y={}.\\\"\"\nmsgstr \"\\\"click en x={}, y={}.\\\"\"\n\n\n#: src/custom_types/enum.md:40\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/custom_types/enum.md:41\nmsgid \"// `to_owned()` creates an owned `String` from a string slice.\\n\"\nmsgstr \"// `to_owned()` crea un `String` que es owned de slice de cadena.\\n\"\n\n\n#: src/custom_types/enum.md:42\nmsgid \"\\\"my text\\\"\"\nmsgstr \"\\\"mi texto\\\"\"\n\n\n#: src/custom_types/enum.md:56\nmsgid \"Type aliases\"\nmsgstr \"Aliases de tipos\"\n\n#: src/custom_types/enum.md:58\nmsgid \"\"\n\"If you use a type alias, you can refer to each enum variant via its alias. \"\n\"This might be useful if the enum's name is too long or too generic, and you \"\n\"want to rename it.\"\nmsgstr \"\"\n\"Si usa un alias de tipo, puedes consultar cada variante de enum a través de su alias.\"\n\"Esto podría ser útil si el nombre del enum es demasiado largo o demasiado genérico, y lo \"\n\"quieres renombrar.\"\n\n#: src/custom_types/enum.md:67\nmsgid \"// Creates a type alias\\n\"\nmsgstr \"// Crear un alias de tipo\\n\"\n\n#: src/custom_types/enum.md:72\nmsgid \"\"\n\"// We can refer to each variant via its alias, not its long and \"\n\"inconvenient\\n\"\n\"    // name.\\n\"\nmsgstr \"\"\n\"// Podemos referirnos a cada variante a través de su alias, y no su largo e\"\n\"inconveniente \\n\"\n\"   // nombre. \\n\"\n\n#: src/custom_types/enum.md:78\nmsgid \"\"\n\"The most common place you'll see this is in `impl` blocks using the `Self` \"\n\"alias.\"\nmsgstr \"\"\n\"El lugar más común que verás esto es en los bloques de `impl` usando el alias `Self` \"\n\".\"\n\n#: src/custom_types/enum.md:96\nmsgid \"\"\n\"To learn more about enums and type aliases, you can read the [stabilization \"\n\"report](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847) from when this feature was stabilized into Rust.\"\nmsgstr \"\"\n\"Para obtener más información sobre enums y alias de tipo, puedes leer el [informe \"\n\"estabilización](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847) de cuando este feature se estabilizó en Rust.\"\n\n#: src/custom_types/enum.md:102\nmsgid \"\"\n\"[`match`](../flow_control/match.md), [`fn`](../fn.md), and [`String`](../std/\"\n\"str.md), [\\\"Type alias enum variants\\\" RFC](https://rust-lang.github.io/\"\n\"rfcs/2338-type-alias-enum-variants.html)\"\nmsgstr \"\"\n\"[`match`](../flow_control/match.md), [`fn`](../fn.md), y [`String`](../std/\"\n\"str.md), [\\\"Type alias enum variants\\\" RFC](https://rust-lang.github.io/\"\n\"rfcs/2338-type-alias-enum-variants.html)\"\n\n#: src/custom_types/enum/enum_use.md:3\nmsgid \"The `use` declaration can be used so manual scoping isn't needed:\"\nmsgstr \"La declaración `use` se puede usar de tal manera que no se necesiten alcances manuales:\"\n\n#: src/custom_types/enum/enum_use.md:20\nmsgid \"\"\n\"// Explicitly `use` each name so they are available without\\n\"\n\"    // manual scoping.\\n\"\nmsgstr \"\"\n\"// Explícitamente `use` (usa) cada nombre para que estén disponibles sin \\n \"\n\"    // alcance manual. \\n\"\n\n#: src/custom_types/enum/enum_use.md:23\nmsgid \"// Automatically `use` each name inside `Role`.\\n\"\nmsgstr \"// Hace `use` automaticamente para cada nombre dentro de `Role`.\\n\"\n\n#: src/custom_types/enum/enum_use.md:26\nmsgid \"// Equivalent to `Stage::Beginner`.\\n\"\nmsgstr \"// Equivalente a `Stage::Beginner`.\\n\"\n\n#: src/custom_types/enum/enum_use.md:28\nmsgid \"// Equivalent to `Role::Student`.\\n\"\nmsgstr \"// Equivalente a `Role::Student`.\\n\"\n\n#: src/custom_types/enum/enum_use.md:32\nmsgid \"// Note the lack of scoping because of the explicit `use` above.\\n\"\nmsgstr \"// Notamos que la falta de alcances se debe al uso explícito de `use` arriba.\\n\"\n\n#: src/custom_types/enum/enum_use.md:33\nmsgid \"\\\"Beginners are starting their learning journey!\\\"\"\nmsgstr \"\\\"¡Los principiantes están comenzando su aprendizaje!\\\"\"\n\n#: src/custom_types/enum/enum_use.md:34\nmsgid \"\\\"Advanced learners are mastering their subjects...\\\"\"\nmsgstr \"\\\"Los estudiantes avanzados están dominando sus materias...\\\"\"\n\n#: src/custom_types/enum/enum_use.md:38\nmsgid \"// Note again the lack of scoping.\\n\"\nmsgstr \"// Notamos otra vez la falta de alcances.\\n\"\n\n#: src/custom_types/enum/enum_use.md:39\nmsgid \"\\\"Students are acquiring knowledge!\\\"\"\nmsgstr \"\\\"¡Los estudiantes están adquiriendo conocimiento!\\\"\"\n\n#: src/custom_types/enum/enum_use.md:40\nmsgid \"\\\"Teachers are spreading knowledge!\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/enum_use.md:47\nmsgid \"[`match`](../../flow_control/match.md) and [`use`](../../mod/use.md)\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:3\nmsgid \"`enum` can also be used as C-like enums.\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:8\nmsgid \"// enum with implicit discriminator (starts at 0)\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:15\nmsgid \"// enum with explicit discriminator\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:24\nmsgid \"// `enums` can be cast as integers.\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:25\nmsgid \"\\\"zero is {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:26\nmsgid \"\\\"one is {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:28\nmsgid \"\\\"roses are #{:06x}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:29\nmsgid \"\\\"violets are #{:06x}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/c_like.md:35\nmsgid \"[casting](../../types/cast.md)\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:3\nmsgid \"A common way to implement a linked-list is via `enums`:\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:9\nmsgid \"\"\n\"// Cons: Tuple struct that wraps an element and a pointer to the next node\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:11\nmsgid \"// Nil: A node that signifies the end of the linked list\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:14\nmsgid \"// Methods can be attached to an enum\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:17\nmsgid \"// Create an empty list\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:19\nmsgid \"// `Nil` has type `List`\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:23\nmsgid \"\"\n\"// Consume a list, and return the same list with a new element at its front\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:25\nmsgid \"// `Cons` also has type List\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:29\nmsgid \"// Return the length of the list\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:31\nmsgid \"\"\n\"// `self` has to be matched, because the behavior of this method\\n\"\n\"        // depends on the variant of `self`\\n\"\n\"        // `self` has type `&List`, and `*self` has type `List`, matching on \"\n\"a\\n\"\n\"        // concrete type `T` is preferred over a match on a reference `&T`\\n\"\n\"        // after Rust 2018 you can use self here and tail (with no ref) \"\n\"below as well,\\n\"\n\"        // rust will infer &s and ref tail. \\n\"\n\"        // See https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:39\nmsgid \"\"\n\"// Can't take ownership of the tail, because `self` is borrowed;\\n\"\n\"            // instead take a reference to the tail\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:42\nmsgid \"// Base Case: An empty list has zero length\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:47\nmsgid \"// Return representation of the list as a (heap allocated) string\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:51\nmsgid \"\"\n\"// `format!` is similar to `print!`, but returns a heap\\n\"\n\"                // allocated string instead of printing to the console\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:53 src/generics/impl.md:44\nmsgid \"\\\"{}, {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:56\nmsgid \"\\\"Nil\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:63\nmsgid \"// Create an empty linked list\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:66\nmsgid \"// Prepend some elements\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:71\nmsgid \"// Show the final state of the list\\n\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:72\nmsgid \"\\\"linked list has length: {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:79\nmsgid \"[`Box`](../../std/box.md) and [methods](../../fn/methods.md)\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:3\nmsgid \"\"\n\"Rust has two different types of constants which can be declared in any scope \"\n\"including global. Both require explicit type annotation:\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:6\nmsgid \"`const`: An unchangeable value (the common case).\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:7\nmsgid \"\"\n\"`static`: A possibly mutable variable with [`'static`](../scope/lifetime/\"\n\"static_lifetime.md) lifetime. The static lifetime is inferred and does not \"\n\"have to be specified. Accessing or modifying a mutable static variable is \"\n\"[`unsafe`](../unsafe.md).\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:12\nmsgid \"// Globals are declared outside all other scopes.\\n\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:13\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:17\nmsgid \"// Access constant in some function\\n\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:24\nmsgid \"// Access constant in the main thread\\n\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:25\nmsgid \"\\\"This is {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:26\nmsgid \"\\\"The threshold is {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"{} is {}\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"big\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:29\nmsgid \"// Error! Cannot modify a `const`.\\n\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:31 src/variable_bindings/scope.md:22\n#: src/variable_bindings/declare.md:27 src/variable_bindings/freeze.md:16\n#: src/types/cast.md:19 src/types/cast.md:28 src/flow_control/for.md:95\n#: src/scope/borrow.md:41 src/scope/borrow/mut.md:52 src/std/vec.md:32\n#: src/std/vec.md:45 src/std/hash/hashset.md:48\nmsgid \"// FIXME ^ Comment out this line\\n\"\nmsgstr \"\"\n\n#: src/custom_types/constants.md:37\nmsgid \"\"\n\"[The `const`/`static` RFC](https://github.com/rust-lang/rfcs/blob/master/\"\n\"text/0246-const-vs-static.md), [`'static` lifetime](../scope/lifetime/\"\n\"static_lifetime.md)\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:3\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings can be type \"\n\"annotated when declared. However, in most cases, the compiler will be able \"\n\"to infer the type of the variable from the context, heavily reducing the \"\n\"annotation burden.\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:8\nmsgid \"\"\n\"Values (like literals) can be bound to variables, using the `let` binding.\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:16\nmsgid \"// copy `an_integer` into `copied_integer`\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:19\nmsgid \"\\\"An integer: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:20\nmsgid \"\\\"A boolean: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:21\nmsgid \"\\\"Meet the unit value: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:23\nmsgid \"\"\n\"// The compiler warns about unused variable bindings; these warnings can\\n\"\n\"    // be silenced by prefixing the variable name with an underscore\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings.md:28\nmsgid \"\"\n\"// FIXME ^ Prefix with an underscore to suppress the warning\\n\"\n\"    // Please note that warnings may not be shown in a browser\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/mut.md:3\nmsgid \"\"\n\"Variable bindings are immutable by default, but this can be overridden using \"\n\"the `mut` modifier.\"\nmsgstr \"\"\n\n#: src/variable_bindings/mut.md:11\nmsgid \"\\\"Before mutation: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/mut.md:13\nmsgid \"// Ok\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/mut.md:16\nmsgid \"\\\"After mutation: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/mut.md:18\nmsgid \"// Error! Cannot assign a new value to an immutable variable\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/mut.md:23\nmsgid \"The compiler will throw a detailed diagnostic about mutability errors.\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:3\nmsgid \"\"\n\"Variable bindings have a scope, and are constrained to live in a _block_. A \"\n\"block is a collection of statements enclosed by braces `{}`.\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:8\nmsgid \"// This binding lives in the main function\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:11\nmsgid \"// This is a block, and has a smaller scope than the main function\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:13\nmsgid \"// This binding only exists in this block\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:16\nmsgid \"\\\"inner short: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:18\nmsgid \"// End of the block\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:20\nmsgid \"// Error! `short_lived_binding` doesn't exist in this scope\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:21\nmsgid \"\\\"outer short: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:24\nmsgid \"\\\"outer long: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:28\nmsgid \"\"\n\"Also, [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) \"\n\"is allowed.\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:35\nmsgid \"\\\"before being shadowed: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:37\nmsgid \"// This binding *shadows* the outer one\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:38\nmsgid \"\\\"abc\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:40\nmsgid \"\\\"shadowed in inner block: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:42\nmsgid \"\\\"outside inner block: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:44\nmsgid \"// This binding *shadows* the previous binding\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/scope.md:46\nmsgid \"\\\"shadowed in outer block: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:3\nmsgid \"\"\n\"It is possible to declare variable bindings first and initialize them later, \"\n\"but all variable bindings must be initialized before they are used: the \"\n\"compiler forbids use of uninitialized variable bindings, as it would lead to \"\n\"undefined behavior.\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:5\nmsgid \"\"\n\"It is not common to declare a variable binding and initialize it later in \"\n\"the function. It is more difficult for a reader to find the initialization \"\n\"when initialization is separated from declaration. It is common to declare \"\n\"and initialize a variable binding near where the variable will be used.\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:11\nmsgid \"// Declare a variable binding\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:17\nmsgid \"// Initialize the binding\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:21\nmsgid \"\\\"a binding: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:25\nmsgid \"// Error! Use of uninitialized binding\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/declare.md:26 src/variable_bindings/declare.md:31\nmsgid \"\\\"another binding: {}\\\"\"\nmsgstr \"\"\n\n#: src/variable_bindings/freeze.md:3\nmsgid \"\"\n\"When data is bound by the same name immutably, it also _freezes_. _Frozen_ \"\n\"data can't be modified until the immutable binding goes out of scope:\"\nmsgstr \"\"\n\n#: src/variable_bindings/freeze.md:11\nmsgid \"// Shadowing by immutable `_mutable_integer`\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/freeze.md:14\nmsgid \"// Error! `_mutable_integer` is frozen in this scope\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/freeze.md:18\nmsgid \"// `_mutable_integer` goes out of scope\\n\"\nmsgstr \"\"\n\n#: src/variable_bindings/freeze.md:21\nmsgid \"// Ok! `_mutable_integer` is not frozen in this scope\\n\"\nmsgstr \"\"\n\n#: src/types.md:3\nmsgid \"\"\n\"Rust provides several mechanisms to change or define the type of primitive \"\n\"and user defined types. The following sections cover:\"\nmsgstr \"\"\n\n#: src/types.md:6\nmsgid \"[Casting](types/cast.md) between primitive types\"\nmsgstr \"\"\n\n#: src/types.md:7\nmsgid \"Specifying the desired type of [literals](types/literals.md)\"\nmsgstr \"\"\n\n#: src/types.md:8\nmsgid \"Using [type inference](types/inference.md)\"\nmsgstr \"\"\n\n#: src/types.md:9\nmsgid \"[Aliasing](types/alias.md) types\"\nmsgstr \"\"\n\n#: src/types/cast.md:3\nmsgid \"\"\n\"Rust provides no implicit type conversion (coercion) between primitive \"\n\"types. But, explicit type conversion (casting) can be performed using the \"\n\"`as` keyword.\"\nmsgstr \"\"\n\n#: src/types/cast.md:6\nmsgid \"\"\n\"Rules for converting between integral types follow C conventions generally, \"\n\"except in cases where C has undefined behavior. The behavior of all casts \"\n\"between integral types is well defined in Rust.\"\nmsgstr \"\"\n\n#: src/types/cast.md:11\nmsgid \"// Suppress all warnings from casts which overflow.\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:17\nmsgid \"// Error! No implicit conversion\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:21\nmsgid \"// Explicit conversion\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:25\nmsgid \"\"\n\"// Error! There are limitations in conversion rules.\\n\"\n\"    // A float cannot be directly converted to a char.\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:30\nmsgid \"\\\"Casting: {} -> {} -> {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:32\nmsgid \"\"\n\"// when casting any value to an unsigned type, T,\\n\"\n\"    // T::MAX + 1 is added or subtracted until the value\\n\"\n\"    // fits into the new type\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:36\nmsgid \"// 1000 already fits in a u16\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:37\nmsgid \"\\\"1000 as a u16 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:39\nmsgid \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // Under the hood, the first 8 least significant bits (LSB) are kept,\\n\"\n\"    // while the rest towards the most significant bit (MSB) get truncated.\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:42 src/types/cast.md:61\nmsgid \"\\\"1000 as a u8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:43\nmsgid \"// -1 + 256 = 255\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:44\nmsgid \"\\\"  -1 as a u8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:46\nmsgid \"// For positive numbers, this is the same as the modulus\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:47\nmsgid \"\\\"1000 mod 256 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:49\nmsgid \"\"\n\"// When casting to a signed type, the (bitwise) result is the same as\\n\"\n\"    // first casting to the corresponding unsigned type. If the most \"\n\"significant\\n\"\n\"    // bit of that value is 1, then the value is negative.\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:53\nmsgid \"// Unless it already fits, of course.\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:54\nmsgid \"\\\" 128 as a i16 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:56\nmsgid \"\"\n\"// In boundary case 128 value in 8-bit two's complement representation is \"\n\"-128\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:57\nmsgid \"\\\" 128 as a i8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:59\nmsgid \"\"\n\"// repeating the example above\\n\"\n\"    // 1000 as u8 -> 232\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:62\nmsgid \"\"\n\"// and the value of 232 in 8-bit two's complement representation is -24\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:63\nmsgid \"\\\" 232 as a i8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:65\nmsgid \"\"\n\"// Since Rust 1.45, the `as` keyword performs a *saturating cast*\\n\"\n\"    // when casting from float to int. If the floating point value exceeds\\n\"\n\"    // the upper bound or is less than the lower bound, the returned value\\n\"\n\"    // will be equal to the bound crossed.\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:70\nmsgid \"// 300.0 as u8 is 255\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:71 src/types/cast.md:82\nmsgid \"\\\" 300.0 as u8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:72\nmsgid \"// -100.0 as u8 is 0\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:73 src/types/cast.md:84\nmsgid \"\\\"-100.0 as u8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:74 src/types/cast.md:85\nmsgid \"// nan as u8 is 0\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:75 src/types/cast.md:86\nmsgid \"\\\"   nan as u8 is : {}\\\"\"\nmsgstr \"\"\n\n#: src/types/cast.md:77\nmsgid \"\"\n\"// This behavior incurs a small runtime cost and can be avoided\\n\"\n\"    // with unsafe methods, however the results might overflow and\\n\"\n\"    // return **unsound values**. Use these methods wisely:\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:81\nmsgid \"// 300.0 as u8 is 44\\n\"\nmsgstr \"\"\n\n#: src/types/cast.md:83\nmsgid \"// -100.0 as u8 is 156\\n\"\nmsgstr \"\"\n\n#: src/types/literals.md:3\nmsgid \"\"\n\"Numeric literals can be type annotated by adding the type as a suffix. As an \"\n\"example, to specify that the literal `42` should have the type `i32`, write \"\n\"`42i32`.\"\nmsgstr \"\"\n\n#: src/types/literals.md:6\nmsgid \"\"\n\"The type of unsuffixed numeric literals will depend on how they are used. If \"\n\"no constraint exists, the compiler will use `i32` for integers, and `f64` \"\n\"for floating-point numbers.\"\nmsgstr \"\"\n\n#: src/types/literals.md:12\nmsgid \"// Suffixed literals, their types are known at initialization\\n\"\nmsgstr \"\"\n\n#: src/types/literals.md:17\nmsgid \"// Unsuffixed literals, their types depend on how they are used\\n\"\nmsgstr \"\"\n\n#: src/types/literals.md:21\nmsgid \"// `size_of_val` returns the size of a variable in bytes\\n\"\nmsgstr \"\"\n\n#: src/types/literals.md:22\nmsgid \"\\\"size of `x` in bytes: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/literals.md:23\nmsgid \"\\\"size of `y` in bytes: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/literals.md:24\nmsgid \"\\\"size of `z` in bytes: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/literals.md:25\nmsgid \"\\\"size of `i` in bytes: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/literals.md:26\nmsgid \"\\\"size of `f` in bytes: {}\\\"\"\nmsgstr \"\"\n\n#: src/types/literals.md:30\nmsgid \"\"\n\"There are some concepts used in the previous code that haven't been \"\n\"explained yet, here's a brief explanation for the impatient readers:\"\nmsgstr \"\"\n\n#: src/types/literals.md:33\nmsgid \"\"\n\"`std::mem::size_of_val` is a function, but called with its _full path_. Code \"\n\"can be split in logical units called _modules_. In this case, the \"\n\"`size_of_val` function is defined in the `mem` module, and the `mem` module \"\n\"is defined in the `std` _crate_. For more details, see [modules](../mod.md) \"\n\"and [crates](../crates.md).\"\nmsgstr \"\"\n\n#: src/types/inference.md:3\nmsgid \"\"\n\"The type inference engine is pretty smart. It does more than looking at the \"\n\"type of the value expression during an initialization. It also looks at how \"\n\"the variable is used afterwards to infer its type. Here's an advanced \"\n\"example of type inference:\"\nmsgstr \"\"\n\n#: src/types/inference.md:10\nmsgid \"\"\n\"// Because of the annotation, the compiler knows that `elem` has type u8.\\n\"\nmsgstr \"\"\n\n#: src/types/inference.md:13\nmsgid \"// Create an empty vector (a growable array).\\n\"\nmsgstr \"\"\n\n#: src/types/inference.md:15\nmsgid \"\"\n\"// At this point the compiler doesn't know the exact type of `vec`, it\\n\"\n\"    // just knows that it's a vector of something (`Vec<_>`).\\n\"\nmsgstr \"\"\n\n#: src/types/inference.md:18\nmsgid \"// Insert `elem` in the vector.\\n\"\nmsgstr \"\"\n\n#: src/types/inference.md:20\nmsgid \"\"\n\"// Aha! Now the compiler knows that `vec` is a vector of `u8`s (`Vec<u8>`)\\n\"\n\"    // TODO ^ Try commenting out the `vec.push(elem)` line\\n\"\nmsgstr \"\"\n\n#: src/types/inference.md:27\nmsgid \"\"\n\"No type annotation of variables was needed, the compiler is happy and so is \"\n\"the programmer!\"\nmsgstr \"\"\n\n#: src/types/alias.md:3\nmsgid \"\"\n\"The `type` statement can be used to give a new name to an existing type. \"\n\"Types must have `UpperCamelCase` names, or the compiler will raise a \"\n\"warning. The exception to this rule are the primitive types: `usize`, `f32`, \"\n\"etc.\"\nmsgstr \"\"\n\n#: src/types/alias.md:8\nmsgid \"// `NanoSecond`, `Inch`, and `U64` are new names for `u64`.\\n\"\nmsgstr \"\"\n\n#: src/types/alias.md:14\nmsgid \"// `NanoSecond` = `Inch` = `U64` = `u64`.\\n\"\nmsgstr \"\"\n\n#: src/types/alias.md:18\nmsgid \"\"\n\"// Note that type aliases *don't* provide any extra type safety, because\\n\"\n\"    // aliases are *not* new types\\n\"\nmsgstr \"\"\n\n#: src/types/alias.md:20\nmsgid \"\\\"{} nanoseconds + {} inches = {} unit?\\\"\"\nmsgstr \"\"\n\n#: src/types/alias.md:27\nmsgid \"\"\n\"The main use of aliases is to reduce boilerplate; for example the `io::\"\n\"Result<T>` type is an alias for the `Result<T, io::Error>` type.\"\nmsgstr \"\"\n\n#: src/types/alias.md:32\nmsgid \"[Attributes](../attribute.md)\"\nmsgstr \"\"\n\n#: src/conversion.md:3\nmsgid \"\"\n\"Primitive types can be converted to each other through [casting](types/cast.\"\n\"md).\"\nmsgstr \"\"\n\n#: src/conversion.md:5\nmsgid \"\"\n\"Rust addresses conversion between custom types (i.e., `struct` and `enum`) \"\n\"by the use of [traits](trait.md). The generic conversions will use the \"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`Into`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.Into.html) traits. However \"\n\"there are more specific ones for the more common cases, in particular when \"\n\"converting to and from `String`s.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:3\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) traits are \"\n\"inherently linked, and this is actually part of its implementation. If you \"\n\"are able to convert type A from type B, then it should be easy to believe \"\n\"that we should be able to convert type B to type A.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:7\nmsgid \"`From`\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:9\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) trait \"\n\"allows for a type to define how to create itself from another type, hence \"\n\"providing a very simple mechanism for converting between several types. \"\n\"There are numerous implementations of this trait within the standard library \"\n\"for conversion of primitive and common types.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:14\nmsgid \"For example we can easily convert a `str` into a `String`\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:21\nmsgid \"We can do something similar for defining a conversion for our own type.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:39 src/conversion/from_into.md:68\n#: src/conversion/from_into.md:98\nmsgid \"\\\"My number is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:43\nmsgid \"`Into`\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:45\nmsgid \"\"\n\"The [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) trait is \"\n\"simply the reciprocal of the `From` trait. It defines how to convert a type \"\n\"into another type.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:48\nmsgid \"\"\n\"Calling `into()` typically requires us to specify the result type as the \"\n\"compiler is unable to determine this most of the time.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:66\nmsgid \"// Try removing the type annotation\\n\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:72\nmsgid \"`From` and `Into` are interchangeable\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:74\nmsgid \"\"\n\"`From` and `Into` are designed to be complementary. We do not need to \"\n\"provide an implementation for both traits. If you have implemented the \"\n\"`From` trait for your type, `Into` will call it when necessary. Note, \"\n\"however, that the converse is not true: implementing `Into` for your type \"\n\"will not automatically provide it with an implementation of `From`.\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:86\nmsgid \"// Define `From`\\n\"\nmsgstr \"\"\n\n#: src/conversion/from_into.md:96\nmsgid \"// use `Into`\\n\"\nmsgstr \"\"\n\n#: src/conversion/try_from_try_into.md:3\nmsgid \"\"\n\"Similar to [`From` and `Into`](from_into.html), [`TryFrom`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryFrom.html) and [`TryInto`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryInto.html) are generic traits for converting \"\n\"between types. Unlike `From`/`Into`, the `TryFrom`/`TryInto` traits are used \"\n\"for fallible conversions, and as such, return [`Result`](https://doc.rust-\"\n\"lang.org/std/result/enum.Result.html)s.\"\nmsgstr \"\"\n\n#: src/conversion/try_from_try_into.md:33\nmsgid \"// TryFrom\\n\"\nmsgstr \"\"\n\n#: src/conversion/try_from_try_into.md:38\nmsgid \"// TryInto\\n\"\nmsgstr \"\"\n\n#: src/conversion/string.md:1\nmsgid \"To and from Strings\"\nmsgstr \"\"\n\n#: src/conversion/string.md:3\nmsgid \"Converting to String\"\nmsgstr \"\"\n\n#: src/conversion/string.md:5\nmsgid \"\"\n\"To convert any type to a `String` is as simple as implementing the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"for the type. Rather than doing so directly, you should implement the [`fmt::\"\n\"Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html) trait which \"\n\"automatically provides [`ToString`](https://doc.rust-lang.org/std/string/\"\n\"trait.ToString.html) and also allows printing the type as discussed in the \"\n\"section on [`print!`](../hello/print.md).\"\nmsgstr \"\"\n\n#: src/conversion/string.md:19\nmsgid \"\\\"Circle of radius {}\\\"\"\nmsgstr \"\"\n\n#: src/conversion/string.md:29\nmsgid \"Parsing a String\"\nmsgstr \"\"\n\n#: src/conversion/string.md:31\nmsgid \"\"\n\"It's useful to convert strings into many types, but one of the more common \"\n\"string operations is to convert them from string to number. The idiomatic \"\n\"approach to this is to use the [`parse`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) function and either to arrange for type \"\n\"inference or to specify the type to parse using the 'turbofish' syntax. Both \"\n\"alternatives are shown in the following example.\"\nmsgstr \"\"\n\n#: src/conversion/string.md:37\nmsgid \"\"\n\"This will convert the string into the type specified as long as the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait is \"\n\"implemented for that type. This is implemented for numerous types within the \"\n\"standard library.\"\nmsgstr \"\"\n\n#: src/conversion/string.md:43 src/std_misc/process/wait.md:10\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/conversion/string.md:44 src/error/result.md:33 src/error/result.md:68\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:75\n#: src/error/result/result_alias.md:36 src/error/result/early_returns.md:36\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:67\nmsgid \"\\\"10\\\"\"\nmsgstr \"\"\n\n#: src/conversion/string.md:47\nmsgid \"\\\"Sum: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/conversion/string.md:51\nmsgid \"\"\n\"To obtain this functionality on a user defined type simply implement the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"that type.\"\nmsgstr \"\"\n\n#: src/conversion/string.md:74\nmsgid \"\\\"    3 \\\"\"\nmsgstr \"\"\n\n#: src/expression.md:3\nmsgid \"A Rust program is (mostly) made up of a series of statements:\"\nmsgstr \"\"\n\n#: src/expression.md:7\nmsgid \"\"\n\"// statement\\n\"\n\"    // statement\\n\"\n\"    // statement\\n\"\nmsgstr \"\"\n\n#: src/expression.md:13\nmsgid \"\"\n\"There are a few kinds of statements in Rust. The most common two are \"\n\"declaring a variable binding, and using a `;` with an expression:\"\nmsgstr \"\"\n\n#: src/expression.md:18\nmsgid \"// variable binding\\n\"\nmsgstr \"\"\n\n#: src/expression.md:21\nmsgid \"// expression;\\n\"\nmsgstr \"\"\n\n#: src/expression.md:28\nmsgid \"\"\n\"Blocks are expressions too, so they can be used as values in assignments. \"\n\"The last expression in the block will be assigned to the place expression \"\n\"such as a local variable. However, if the last expression of the block ends \"\n\"with a semicolon, the return value will be `()`.\"\nmsgstr \"\"\n\n#: src/expression.md:41\nmsgid \"// This expression will be assigned to `y`\\n\"\nmsgstr \"\"\n\n#: src/expression.md:46\nmsgid \"\"\n\"// The semicolon suppresses this expression and `()` is assigned to `z`\\n\"\nmsgstr \"\"\n\n#: src/expression.md:50\nmsgid \"\\\"x is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/expression.md:51\nmsgid \"\\\"y is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/expression.md:52\nmsgid \"\\\"z is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control.md:3\nmsgid \"\"\n\"An integral part of any programming language are ways to modify control \"\n\"flow: `if`/`else`, `for`, and others. Let's talk about them in Rust.\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:3\nmsgid \"\"\n\"Branching with `if`\\\\-`else` is similar to other languages. Unlike many of \"\n\"them, the boolean condition doesn't need to be surrounded by parentheses, \"\n\"and each condition is followed by a block. `if`\\\\-`else` conditionals are \"\n\"expressions, and, all branches must return the same type.\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:13\nmsgid \"\\\"{} is negative\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:15\nmsgid \"\\\"{} is positive\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:17\nmsgid \"\\\"{} is zero\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:22\nmsgid \"\\\", and is a small number, increase ten-fold\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:24\nmsgid \"// This expression returns an `i32`.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:27\nmsgid \"\\\", and is a big number, halve the number\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:29\nmsgid \"// This expression must return an `i32` as well.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:31\nmsgid \"// TODO ^ Try suppressing this expression with a semicolon.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:33\nmsgid \"\"\n\"//   ^ Don't forget to put a semicolon here! All `let` bindings need it.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_else.md:35 src/flow_control/match.md:35\nmsgid \"\\\"{} -> {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:3\nmsgid \"Rust provides a `loop` keyword to indicate an infinite loop.\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:5\nmsgid \"\"\n\"The `break` statement can be used to exit a loop at anytime, whereas the \"\n\"`continue` statement can be used to skip the rest of the iteration and start \"\n\"a new one.\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:13\nmsgid \"\\\"Let's count until infinity!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:15\nmsgid \"// Infinite loop\\n\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:20\nmsgid \"\\\"three\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:22\nmsgid \"// Skip the rest of this iteration\\n\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:29\nmsgid \"\\\"OK, that's enough\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop.md:31\nmsgid \"// Exit this loop\\n\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:3\nmsgid \"\"\n\"It's possible to `break` or `continue` outer loops when dealing with nested \"\n\"loops. In these cases, the loops must be annotated with some `'label`, and \"\n\"the label must be passed to the `break`/`continue` statement.\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:12\nmsgid \"\\\"Entered the outer loop\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:15\nmsgid \"\\\"Entered the inner loop\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:17\nmsgid \"\"\n\"// This would break only the inner loop\\n\"\n\"            //break;\\n\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:20\nmsgid \"// This breaks the outer loop\\n\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:24\nmsgid \"\\\"This point will never be reached\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop/nested.md:27\nmsgid \"\\\"Exited the outer loop\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/loop/return.md:3\nmsgid \"\"\n\"One of the uses of a `loop` is to retry an operation until it succeeds. If \"\n\"the operation returns a value though, you might need to pass it to the rest \"\n\"of the code: put it after the `break`, and it will be returned by the `loop` \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:3\nmsgid \"\"\n\"The `while` keyword can be used to run a loop while a condition is true.\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:5\nmsgid \"\"\n\"Let's write the infamous [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) \"\n\"using a `while` loop.\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:9\nmsgid \"// A counter variable\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:12\nmsgid \"// Loop while `n` is less than 101\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:15 src/flow_control/for.md:17\n#: src/flow_control/for.md:37 src/fn.md:34\nmsgid \"\\\"fizzbuzz\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:17 src/flow_control/for.md:19\n#: src/flow_control/for.md:39 src/fn.md:36\nmsgid \"\\\"fizz\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:19 src/flow_control/for.md:21\n#: src/flow_control/for.md:41 src/fn.md:38\nmsgid \"\\\"buzz\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/while.md:24\nmsgid \"// Increment counter\\n\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:1\nmsgid \"for loops\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:5\nmsgid \"\"\n\"The `for in` construct can be used to iterate through an `Iterator`. One of \"\n\"the easiest ways to create an iterator is to use the range notation `a..b`. \"\n\"This yields values from `a` (inclusive) to `b` (exclusive) in steps of one.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:10\nmsgid \"Let's write FizzBuzz using `for` instead of `while`.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:14 src/flow_control/for.md:34\nmsgid \"// `n` will take the values: 1, 2, ..., 100 in each iteration\\n\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:29\nmsgid \"\"\n\"Alternatively, `a..=b` can be used for a range that is inclusive on both \"\n\"ends. The above can be written as:\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:49\nmsgid \"for and iterators\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:51\nmsgid \"\"\n\"The `for in` construct is able to interact with an `Iterator` in several \"\n\"ways. As discussed in the section on the [Iterator](../trait/iter.md) trait, \"\n\"by default the `for` loop will apply the `into_iter` function to the \"\n\"collection. However, this is not the only means of converting collections \"\n\"into iterators.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:56\nmsgid \"\"\n\"`into_iter`, `iter` and `iter_mut` all handle the conversion of a collection \"\n\"into an iterator in different ways, by providing different views on the data \"\n\"within.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:60\nmsgid \"\"\n\"`iter` - This borrows each element of the collection through each iteration. \"\n\"Thus leaving the collection untouched and available for reuse after the loop.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Frank\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:69\n#: src/flow_control/for.md:85 src/flow_control/for.md:89\n#: src/flow_control/for.md:104 src/flow_control/for.md:108\nmsgid \"\\\"Ferris\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:69 src/flow_control/for.md:89\n#: src/flow_control/for.md:108\nmsgid \"\\\"There is a rustacean among us!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:70\nmsgid \"// TODO ^ Try deleting the & and matching just \\\"Ferris\\\"\\n\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:71 src/flow_control/for.md:90\nmsgid \"\\\"Hello {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:75 src/flow_control/for.md:94\n#: src/flow_control/for.md:113\nmsgid \"\\\"names: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:79\nmsgid \"\"\n\"`into_iter` - This consumes the collection so that on each iteration the \"\n\"exact data is provided. Once the collection has been consumed it is no \"\n\"longer available for reuse as it has been 'moved' within the loop.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:99\nmsgid \"\"\n\"`iter_mut` - This mutably borrows each element of the collection, allowing \"\n\"for the collection to be modified in place.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:109\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:117\nmsgid \"\"\n\"In the above snippets note the type of `match` branch, that is the key \"\n\"difference in the types of iteration. The difference in type then of course \"\n\"implies differing actions that are able to be performed.\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:123\nmsgid \"[Iterator](../trait/iter.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:3\nmsgid \"\"\n\"Rust provides pattern matching via the `match` keyword, which can be used \"\n\"like a C `switch`. The first matching arm is evaluated and all possible \"\n\"values must be covered.\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:10\nmsgid \"// TODO ^ Try different values for `number`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:12\nmsgid \"\\\"Tell me about {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:14\nmsgid \"// Match a single value\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:15\nmsgid \"\\\"One!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:16\nmsgid \"// Match several values\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:17\nmsgid \"\\\"This is a prime\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:18\nmsgid \"\"\n\"// TODO ^ Try adding 13 to the list of prime values\\n\"\n\"        // Match an inclusive range\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:20\nmsgid \"\\\"A teen\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:21\nmsgid \"// Handle the rest of cases\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:22\nmsgid \"\\\"Ain't special\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:23\nmsgid \"// TODO ^ Try commenting out this catch-all arm\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:27\nmsgid \"// Match is an expression too\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:29\nmsgid \"// The arms of a match must cover all the possible values\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match.md:32\nmsgid \"// TODO ^ Try commenting out one of these arms\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring.md:3\nmsgid \"A `match` block can destructure items in a variety of ways.\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring.md:5\nmsgid \"[Destructuring Tuples](destructuring/destructure_tuple.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring.md:6\nmsgid \"[Destructuring Arrays and Slices](destructuring/destructure_slice.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring.md:7\nmsgid \"[Destructuring Enums](destructuring/destructure_enum.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring.md:8\nmsgid \"[Destructuring Pointers](destructuring/destructure_pointers.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring.md:9\nmsgid \"[Destructuring Structures](destructuring/destructure_structures.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:3\nmsgid \"Tuples can be destructured in a `match` as follows:\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:8\nmsgid \"// TODO ^ Try different values for `triple`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:10\nmsgid \"\\\"Tell me about {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:11\nmsgid \"// Match can be used to destructure a tuple\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:13\nmsgid \"// Destructure the second and third elements\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:14\nmsgid \"\\\"First is `0`, `y` is {:?}, and `z` is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:15\nmsgid \"\\\"First is `1` and the rest doesn't matter\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:16\nmsgid \"\\\"last is `2` and the rest doesn't matter\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:17\nmsgid \"\\\"First is `3`, last is `4`, and the rest doesn't matter\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:18\nmsgid \"// `..` can be used to ignore the rest of the tuple\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:19\nmsgid \"\\\"It doesn't matter what they are\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:20\nmsgid \"// `_` means don't bind the value to a variable\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:27\nmsgid \"[Tuples](../../../primitives/tuples.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:3\nmsgid \"Like tuples, arrays and slices can be destructured this way:\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:7\nmsgid \"// Try changing the values in the array, or make it a slice!\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:11\nmsgid \"\"\n\"// Binds the second and the third elements to the respective variables\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:13\nmsgid \"\\\"array[0] = 0, array[1] = {}, array[2] = {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:15\nmsgid \"// Single values can be ignored with _\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:17\nmsgid \"\\\"array[0] = 1, array[2] = {} and array[1] was ignored\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:21\nmsgid \"// You can also bind some and ignore the rest\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:23\nmsgid \"\\\"array[0] = -1, array[1] = {} and all the other ones were ignored\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:26\nmsgid \"\"\n\"// The code below would not compile\\n\"\n\"        // [-1, second] => ...\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:29\nmsgid \"\"\n\"// Or store them in another array/slice (the type depends on\\n\"\n\"        // that of the value that is being matched against)\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:32\nmsgid \"\\\"array[0] = 3, array[1] = {} and the other elements were {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:36\nmsgid \"\"\n\"// Combining these patterns, we can, for example, bind the first and\\n\"\n\"        // last values, and store the rest of them in a single array\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:39\nmsgid \"\\\"array[0] = {}, middle = {:?}, array[2] = {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:48\nmsgid \"\"\n\"[Arrays and Slices](../../../primitives/array.md) and [Binding](../binding.\"\n\"md) for `@` sigil\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:3\nmsgid \"An `enum` is destructured similarly:\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:6\nmsgid \"\"\n\"// `allow` required to silence warnings because only\\n\"\n\"// one variant is used.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:10\nmsgid \"// These 3 are specified solely by their name.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:14\nmsgid \"// These likewise tie `u32` tuples to different names: color models.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:24\nmsgid \"// TODO ^ Try different variants for `color`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:26\nmsgid \"\\\"What color is it?\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:27\nmsgid \"// An `enum` can be destructured using a `match`.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:29\nmsgid \"\\\"The color is Red!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:30\nmsgid \"\\\"The color is Blue!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:31\nmsgid \"\\\"The color is Green!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:33\nmsgid \"\\\"Red: {}, green: {}, and blue: {}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:35\nmsgid \"\\\"Hue: {}, saturation: {}, value: {}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:37\nmsgid \"\\\"Hue: {}, saturation: {}, lightness: {}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:39\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:41\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}, key (black): {}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:43\nmsgid \"// Don't need another arm because all variants have been examined\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:50\nmsgid \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md), [color models](https://en.\"\n\"wikipedia.org/wiki/Color_model) and [`enum`](../../../custom_types/enum.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:3\nmsgid \"\"\n\"For pointers, a distinction needs to be made between destructuring and \"\n\"dereferencing as they are different concepts which are used differently from \"\n\"languages like C/C++.\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:7\nmsgid \"Dereferencing uses `*`\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:8\nmsgid \"Destructuring uses `&`, `ref`, and `ref mut`\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:12\nmsgid \"\"\n\"// Assign a reference of type `i32`. The `&` signifies there\\n\"\n\"    // is a reference being assigned.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:17\nmsgid \"\"\n\"// If `reference` is pattern matched against `&val`, it results\\n\"\n\"        // in a comparison like:\\n\"\n\"        // `&i32`\\n\"\n\"        // `&val`\\n\"\n\"        // ^ We see that if the matching `&`s are dropped, then the `i32`\\n\"\n\"        // should be assigned to `val`.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:23\nmsgid \"\\\"Got a value via destructuring: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:26\nmsgid \"// To avoid the `&`, you dereference before matching.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:28\nmsgid \"\\\"Got a value via dereferencing: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:31\nmsgid \"\"\n\"// What if you don't start with a reference? `reference` was a `&`\\n\"\n\"    // because the right side was already a reference. This is not\\n\"\n\"    // a reference because the right side is not one.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:36\nmsgid \"\"\n\"// Rust provides `ref` for exactly this purpose. It modifies the\\n\"\n\"    // assignment so that a reference is created for the element; this\\n\"\n\"    // reference is assigned.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:41\nmsgid \"\"\n\"// Accordingly, by defining 2 values without references, references\\n\"\n\"    // can be retrieved via `ref` and `ref mut`.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:46\nmsgid \"// Use `ref` keyword to create a reference.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:48\nmsgid \"\\\"Got a reference to a value: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:51\nmsgid \"// Use `ref mut` similarly.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:54\nmsgid \"\"\n\"// Got a reference. Gotta dereference it before we can\\n\"\n\"            // add anything to it.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:57\nmsgid \"\\\"We added 10. `mut_value`: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:65\nmsgid \"[The ref pattern](../../../scope/borrow/ref.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:3\nmsgid \"Similarly, a `struct` can be destructured as shown:\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:12\nmsgid \"// Try changing the values in the struct to see what happens\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:16\nmsgid \"\\\"First of x is 1, b = {},  y = {} \\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:18\nmsgid \"\"\n\"// you can destructure structs and rename the variables,\\n\"\n\"        // the order is not important\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:20\nmsgid \"\\\"y is 2, i = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:22\nmsgid \"// and you can also ignore some variables:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:23\nmsgid \"\\\"y = {}, we don't care about x\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:24\nmsgid \"\"\n\"// this will give an error: pattern does not mention field `x`\\n\"\n\"        //Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:30\nmsgid \"// You do not need a match block to destructure structs:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:32\nmsgid \"\\\"Outside: x0 = {x0:?}, y0 = {y0}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:34\nmsgid \"// Destructuring works with nested structs as well:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:41\nmsgid \"\\\"Nested: nested_x = {nested_x:?}, nested_y = {nested_y:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:47\nmsgid \"[Structs](../../../custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:3\nmsgid \"A `match` _guard_ can be added to filter the arm.\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:14\nmsgid \"// ^ TODO try different values for `temperature`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:17\nmsgid \"\\\"{}C is above 30 Celsius\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:18\nmsgid \"// The `if condition` part ^ is a guard\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:19\nmsgid \"\\\"{}C is equal to or below 30 Celsius\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:21\nmsgid \"\\\"{}F is above 86 Fahrenheit\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:22\nmsgid \"\\\"{}F is equal to or below 86 Fahrenheit\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:27\nmsgid \"\"\n\"Note that the compiler won't take guard conditions into account when \"\n\"checking if all patterns are covered by the match expression.\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:35\nmsgid \"\\\"Zero\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:36\nmsgid \"\\\"Greater than zero\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:37\nmsgid \"\"\n\"// _ => unreachable!(\\\"Should never happen.\\\"),\\n\"\n\"        // TODO ^ uncomment to fix compilation\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/guard.md:45\nmsgid \"\"\n\"[Tuples](../../primitives/tuples.md) [Enums](../../custom_types/enum.md)\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:3\nmsgid \"\"\n\"Indirectly accessing a variable makes it impossible to branch and use that \"\n\"variable without re-binding. `match` provides the `@` sigil for binding \"\n\"values to names:\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:8\nmsgid \"// A function `age` which returns a `u32`.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:14\nmsgid \"\\\"Tell me what type of person you are\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:17\nmsgid \"\\\"I haven't celebrated my first birthday yet\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:18\nmsgid \"\"\n\"// Could `match` 1 ..= 12 directly but then what age\\n\"\n\"        // would the child be? Instead, bind to `n` for the\\n\"\n\"        // sequence of 1 ..= 12. Now the age can be reported.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:21\nmsgid \"\\\"I'm a child of age {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:22\nmsgid \"\\\"I'm a teen of age {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:23\nmsgid \"// Nothing bound. Return the result.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:24\nmsgid \"\\\"I'm an old person of age {:?}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:29\nmsgid \"\"\n\"You can also use binding to \\\"destructure\\\" `enum` variants, such as \"\n\"`Option`:\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:38\nmsgid \"\"\n\"// Got `Some` variant, match if its value, bound to `n`,\\n\"\n\"        // is equal to 42.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:40\nmsgid \"\\\"The Answer: {}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:41\nmsgid \"// Match any other number.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:42\nmsgid \"\\\"Not interesting... {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:43\nmsgid \"// Match anything else (`None` variant).\\n\"\nmsgstr \"\"\n\n#: src/flow_control/match/binding.md:51\nmsgid \"\"\n\"[`functions`](../../fn.md), [`enums`](../../custom_types/enum.md) and \"\n\"[`Option`](../../std/option.md)\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:3\nmsgid \"\"\n\"For some use cases, when matching enums, `match` is awkward. For example:\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:6 src/flow_control/while_let.md:7\n#: src/flow_control/while_let.md:35\nmsgid \"// Make `optional` of type `Option<i32>`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:10\nmsgid \"\\\"This is a really long string and `{:?}`\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:12\nmsgid \"\"\n\"// ^ Required because `match` is exhaustive. Doesn't it seem\\n\"\n\"    // like wasted space?\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:18\nmsgid \"\"\n\"`if let` is cleaner for this use case and in addition allows various failure \"\n\"options to be specified:\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:23\nmsgid \"// All have type `Option<i32>`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:28\nmsgid \"\"\n\"// The `if let` construct reads: \\\"if `let` destructures `number` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`).\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:31 src/flow_control/if_let.md:36\n#: src/flow_control/if_let.md:46\nmsgid \"\\\"Matched {:?}!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:34\nmsgid \"// If you need to specify a failure, use an else:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:38\nmsgid \"// Destructure failed. Change to the failure case.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:39 src/flow_control/if_let.md:50\nmsgid \"\\\"Didn't match a number. Let's go with a letter!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:42\nmsgid \"// Provide an altered failing condition.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:47\nmsgid \"\"\n\"// Destructure failed. Evaluate an `else if` condition to see if the\\n\"\n\"    // alternate failure branch should be taken:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:52\nmsgid \"// The condition evaluated false. This branch is the default:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:53\nmsgid \"\\\"I don't like letters. Let's go with an emoticon :)!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:58\nmsgid \"In the same way, `if let` can be used to match any enum value:\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:61\nmsgid \"// Our example enum\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:69\nmsgid \"// Create example variables\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:74 src/flow_control/if_let.md:110\nmsgid \"// Variable a matches Foo::Bar\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:76 src/flow_control/if_let.md:113\nmsgid \"\\\"a is foobar\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:79\nmsgid \"\"\n\"// Variable b does not match Foo::Bar\\n\"\n\"    // So this will print nothing\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:82\nmsgid \"\\\"b is foobar\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:85\nmsgid \"\"\n\"// Variable c matches Foo::Qux which has a value\\n\"\n\"    // Similar to Some() in the previous example\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:88\nmsgid \"\\\"c is {}\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:91\nmsgid \"// Binding also works with `if let`\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:93\nmsgid \"\\\"c is one hundred\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:98\nmsgid \"\"\n\"Another benefit is that `if let` allows us to match non-parameterized enum \"\n\"variants. This is true even in cases where the enum doesn't implement or \"\n\"derive `PartialEq`. In such cases `if Foo::Bar == a` would fail to compile, \"\n\"because instances of the enum cannot be equated, however `if let` will \"\n\"continue to work.\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:100\nmsgid \"Would you like a challenge? Fix the following example to use `if let`:\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:103\nmsgid \"\"\n\"// This enum purposely neither implements nor derives PartialEq.\\n\"\n\"// That is why comparing Foo::Bar == a fails below.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:112\nmsgid \"// ^-- this causes a compile-time error. Use `if let` instead.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/if_let.md:120\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/160)\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:3\nmsgid \"🛈 stable since: rust 1.65\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:5\nmsgid \"\"\n\"🛈 you can target specific edition by compiling like this `rustc --\"\n\"edition=2021 main.rs`\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:8\nmsgid \"\"\n\"With `let`\\\\-`else`, a refutable pattern can match and bind variables in the \"\n\"surrounding scope like a normal `let`, or else diverge (e.g. `break`, \"\n\"`return`, `panic!`) when the pattern doesn't match.\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:16 src/flow_control/let_else.md:39\n#: src/std/str.md:41\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:18 src/flow_control/let_else.md:42\nmsgid \"\\\"Can't segment count item pair: '{s}'\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:21 src/flow_control/let_else.md:47\nmsgid \"\\\"Can't parse integer: '{count_str}'\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:27 src/flow_control/let_else.md:52\nmsgid \"\\\"3 chairs\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:27 src/flow_control/let_else.md:52\nmsgid \"\\\"chairs\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:31\nmsgid \"\"\n\"The scope of name bindings is the main thing that makes this different from \"\n\"`match` or `if let`\\\\-`else` expressions. You could previously approximate \"\n\"these patterns with an unfortunate bit of repetition and an outer `let`:\"\nmsgstr \"\"\n\n#: src/flow_control/let_else.md:57\nmsgid \"\"\n\"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) and \"\n\"the [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html).\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:3\nmsgid \"\"\n\"Similar to `if let`, `while let` can make awkward `match` sequences more \"\n\"tolerable. Consider the following sequence that increments `i`:\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:9\nmsgid \"// Repeatedly try this test.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:13\nmsgid \"// If `optional` destructures, evaluate the block.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:16 src/flow_control/while_let.md:42\nmsgid \"\\\"Greater than 9, quit!\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:19 src/flow_control/while_let.md:45\nmsgid \"\\\"`i` is `{:?}`. Try again.\\\"\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:22\nmsgid \"// ^ Requires 3 indentations!\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:24\nmsgid \"// Quit the loop when the destructure fails:\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:26\nmsgid \"// ^ Why should this be required? There must be a better way!\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:31\nmsgid \"Using `while let` makes this sequence much nicer:\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:38\nmsgid \"\"\n\"// This reads: \\\"while `let` destructures `optional` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`). Else `break`.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:48\nmsgid \"\"\n\"// ^ Less rightward drift and doesn't require\\n\"\n\"        // explicitly handling the failing case.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:51\nmsgid \"\"\n\"// ^ `if let` had additional optional `else`/`else if`\\n\"\n\"    // clauses. `while let` does not have these.\\n\"\nmsgstr \"\"\n\n#: src/flow_control/while_let.md:58\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/214)\"\nmsgstr \"\"\n\n#: src/fn.md:3\nmsgid \"\"\n\"Functions are declared using the `fn` keyword. Its arguments are type \"\n\"annotated, just like variables, and, if the function returns a value, the \"\n\"return type must be specified after an arrow `->`.\"\nmsgstr \"\"\n\n#: src/fn.md:7\nmsgid \"\"\n\"The final expression in the function will be used as return value. \"\n\"Alternatively, the `return` statement can be used to return a value earlier \"\n\"from within the function, even from inside loops or `if` statements.\"\nmsgstr \"\"\n\n#: src/fn.md:11\nmsgid \"Let's rewrite FizzBuzz using functions!\"\nmsgstr \"\"\n\n#: src/fn.md:14\nmsgid \"\"\n\"// Unlike C/C++, there's no restriction on the order of function \"\n\"definitions\\n\"\nmsgstr \"\"\n\n#: src/fn.md:16\nmsgid \"// We can use this function here, and define it somewhere later\\n\"\nmsgstr \"\"\n\n#: src/fn.md:19\nmsgid \"// Function that returns a boolean value\\n\"\nmsgstr \"\"\n\n#: src/fn.md:22\nmsgid \"// Corner case, early return\\n\"\nmsgstr \"\"\n\n#: src/fn.md:27\nmsgid \"// This is an expression, the `return` keyword is not necessary here\\n\"\nmsgstr \"\"\n\n#: src/fn.md:30\nmsgid \"\"\n\"// Functions that \\\"don't\\\" return a value, actually return the unit type \"\n\"`()`\\n\"\nmsgstr \"\"\n\n#: src/fn.md:43\nmsgid \"\"\n\"// When a function returns `()`, the return type can be omitted from the\\n\"\n\"// signature\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:1\nmsgid \"Associated functions & Methods\"\nmsgstr \"\"\n\n#: src/fn/methods.md:3\nmsgid \"\"\n\"Some functions are connected to a particular type. These come in two forms: \"\n\"associated functions, and methods. Associated functions are functions that \"\n\"are defined on a type generally, while methods are associated functions that \"\n\"are called on a particular instance of a type.\"\nmsgstr \"\"\n\n#: src/fn/methods.md:13\nmsgid \"\"\n\"// Implementation block, all `Point` associated functions & methods go in \"\n\"here\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:16\nmsgid \"\"\n\"// This is an \\\"associated function\\\" because this function is associated \"\n\"with\\n\"\n\"    // a particular type, that is, Point.\\n\"\n\"    //\\n\"\n\"    // Associated functions don't need to be called with an instance.\\n\"\n\"    // These functions are generally used like constructors.\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:25\nmsgid \"// Another associated function, taking two arguments:\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:37\nmsgid \"\"\n\"// This is a method\\n\"\n\"    // `&self` is sugar for `self: &Self`, where `Self` is the type of the\\n\"\n\"    // caller object. In this case `Self` = `Rectangle`\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:41\nmsgid \"// `self` gives access to the struct fields via the dot operator\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:45\nmsgid \"\"\n\"// `abs` is a `f64` method that returns the absolute value of the\\n\"\n\"        // caller\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:57\nmsgid \"\"\n\"// This method requires the caller object to be mutable\\n\"\n\"    // `&mut self` desugars to `self: &mut Self`\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:67\nmsgid \"// `Pair` owns resources: two heap allocated integers\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:72\nmsgid \"\"\n\"// This method \\\"consumes\\\" the resources of the caller object\\n\"\n\"    // `self` desugars to `self: Self`\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:75\nmsgid \"// Destructure `self`\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:78\nmsgid \"\\\"Destroying Pair({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/fn/methods.md:80\nmsgid \"// `first` and `second` go out of scope and get freed\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:86\nmsgid \"// Associated functions are called using double colons\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:91\nmsgid \"\"\n\"// Methods are called using the dot operator\\n\"\n\"    // Note that the first argument `&self` is implicitly passed, i.e.\\n\"\n\"    // `rectangle.perimeter()` === `Rectangle::perimeter(&rectangle)`\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:94\nmsgid \"\\\"Rectangle perimeter: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/methods.md:95\nmsgid \"\\\"Rectangle area: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/methods.md:102\nmsgid \"\"\n\"// Error! `rectangle` is immutable, but this method requires a mutable\\n\"\n\"    // object\\n\"\n\"    //rectangle.translate(1.0, 0.0);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:107\nmsgid \"// Okay! Mutable objects can call mutable methods\\n\"\nmsgstr \"\"\n\n#: src/fn/methods.md:114\nmsgid \"\"\n\"// Error! Previous `destroy` call \\\"consumed\\\" `pair`\\n\"\n\"    //pair.destroy();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/fn/closures.md:3\nmsgid \"\"\n\"Closures are functions that can capture the enclosing environment. For \"\n\"example, a closure that captures the `x` variable:\"\nmsgstr \"\"\n\n#: src/fn/closures.md:10\nmsgid \"\"\n\"The syntax and capabilities of closures make them very convenient for on the \"\n\"fly usage. Calling a closure is exactly like calling a function. However, \"\n\"both input and return types _can_ be inferred and input variable names \"\n\"_must_ be specified.\"\nmsgstr \"\"\n\n#: src/fn/closures.md:15\nmsgid \"Other characteristics of closures include:\"\nmsgstr \"\"\n\n#: src/fn/closures.md:17\nmsgid \"using `||` instead of `()` around input variables.\"\nmsgstr \"\"\n\n#: src/fn/closures.md:18\nmsgid \"\"\n\"optional body delimitation (`{}`) for a single line expression (mandatory \"\n\"otherwise).\"\nmsgstr \"\"\n\n#: src/fn/closures.md:19\nmsgid \"the ability to capture the outer environment variables.\"\nmsgstr \"\"\n\n#: src/fn/closures.md:25\nmsgid \"\"\n\"// A regular function can't refer to variables in the enclosing environment\\n\"\n\"    //fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"    // TODO: uncomment the line above and see the compiler error. The \"\n\"compiler\\n\"\n\"    // suggests that we define a closure instead.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures.md:30\nmsgid \"\"\n\"// Closures are anonymous, here we are binding them to references.\\n\"\n\"    // Annotation is identical to function annotation but is optional\\n\"\n\"    // as are the `{}` wrapping the body. These nameless functions\\n\"\n\"    // are assigned to appropriately named variables.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures.md:37\nmsgid \"// Call the closures.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures.md:38\nmsgid \"\\\"closure_annotated: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures.md:39\nmsgid \"\\\"closure_inferred: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures.md:40\nmsgid \"\"\n\"// Once closure's type has been inferred, it cannot be inferred again with \"\n\"another type.\\n\"\n\"    //println!(\\\"cannot reuse closure_inferred with another type: {}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"    // TODO: uncomment the line above and see the compiler error.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures.md:44\nmsgid \"\"\n\"// A closure taking no arguments which returns an `i32`.\\n\"\n\"    // The return type is inferred.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures.md:47\nmsgid \"\\\"closure returning one: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:3\nmsgid \"\"\n\"Closures are inherently flexible and will do what the functionality requires \"\n\"to make the closure work without annotation. This allows capturing to \"\n\"flexibly adapt to the use case, sometimes moving and sometimes borrowing. \"\n\"Closures can capture variables:\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:8\nmsgid \"by reference: `&T`\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:9\nmsgid \"by mutable reference: `&mut T`\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:10\nmsgid \"by value: `T`\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:12\nmsgid \"\"\n\"They preferentially capture variables by reference and only go lower when \"\n\"required.\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:19\nmsgid \"\\\"green\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:21\nmsgid \"\"\n\"// A closure to print `color` which immediately borrows (`&`) `color` and\\n\"\n\"    // stores the borrow and closure in the `print` variable. It will \"\n\"remain\\n\"\n\"    // borrowed until `print` is used the last time. \\n\"\n\"    //\\n\"\n\"    // `println!` only requires arguments by immutable reference so it \"\n\"doesn't\\n\"\n\"    // impose anything more restrictive.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:27\nmsgid \"\\\"`color`: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:29\nmsgid \"// Call the closure using the borrow.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:32\nmsgid \"\"\n\"// `color` can be borrowed immutably again, because the closure only holds\\n\"\n\"    // an immutable reference to `color`. \\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:37\nmsgid \"// A move or reborrow is allowed after the final use of `print`\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:42\nmsgid \"\"\n\"// A closure to increment `count` could take either `&mut count` or `count`\\n\"\n\"    // but `&mut count` is less restrictive so it takes that. Immediately\\n\"\n\"    // borrows `count`.\\n\"\n\"    //\\n\"\n\"    // A `mut` is required on `inc` because a `&mut` is stored inside. \"\n\"Thus,\\n\"\n\"    // calling the closure mutates `count` which requires a `mut`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:50\nmsgid \"\\\"`count`: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:53\nmsgid \"// Call the closure using a mutable borrow.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:56\nmsgid \"\"\n\"// The closure still mutably borrows `count` because it is called later.\\n\"\n\"    // An attempt to reborrow will lead to an error.\\n\"\n\"    // let _reborrow = &count; \\n\"\n\"    // ^ TODO: try uncommenting this line.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:62\nmsgid \"\"\n\"// The closure no longer needs to borrow `&mut count`. Therefore, it is\\n\"\n\"    // possible to reborrow without an error\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:67\nmsgid \"// A non-copy type.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:70\nmsgid \"\"\n\"// `mem::drop` requires `T` so this must take by value. A copy type\\n\"\n\"    // would copy into the closure leaving the original untouched.\\n\"\n\"    // A non-copy must move and so `movable` immediately moves into\\n\"\n\"    // the closure.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:75\nmsgid \"\\\"`movable`: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:79\nmsgid \"// `consume` consumes the variable so this can only be called once.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:81\nmsgid \"\"\n\"// consume();\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:86\nmsgid \"\"\n\"Using `move` before vertical pipes forces closure to take ownership of \"\n\"captured variables:\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:91\nmsgid \"// `Vec` has non-copy semantics.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:99\nmsgid \"\"\n\"// println!(\\\"There're {} elements in vec\\\", haystack.len());\\n\"\n\"    // ^ Uncommenting above line will result in compile-time error\\n\"\n\"    // because borrow checker doesn't allow re-using variable after it\\n\"\n\"    // has been moved.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:104\nmsgid \"\"\n\"// Removing `move` from closure's signature will cause closure\\n\"\n\"    // to borrow _haystack_ variable immutably, hence _haystack_ is still\\n\"\n\"    // available and uncommenting above line will not cause an error.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/capture.md:112\nmsgid \"\"\n\"[`Box`](../../std/box.md) and [`std::mem::drop`](https://doc.rust-lang.org/\"\n\"std/mem/fn.drop.html)\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:3\nmsgid \"\"\n\"While Rust chooses how to capture variables on the fly mostly without type \"\n\"annotation, this ambiguity is not allowed when writing functions. When \"\n\"taking a closure as an input parameter, the closure's complete type must be \"\n\"annotated using one of a few `traits`, and they're determined by what the \"\n\"closure does with captured value. In order of decreasing restriction, they \"\n\"are:\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:10\nmsgid \"`Fn`: the closure uses the captured value by reference (`&T`)\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:11\nmsgid \"\"\n\"`FnMut`: the closure uses the captured value by mutable reference (`&mut T`)\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:12\nmsgid \"`FnOnce`: the closure uses the captured value by value (`T`)\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:14\nmsgid \"\"\n\"On a variable-by-variable basis, the compiler will capture variables in the \"\n\"least restrictive manner possible.\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:17\nmsgid \"\"\n\"For instance, consider a parameter annotated as `FnOnce`. This specifies \"\n\"that the closure _may_ capture by `&T`, `&mut T`, or `T`, but the compiler \"\n\"will ultimately choose based on how the captured variables are used in the \"\n\"closure.\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:22\nmsgid \"\"\n\"This is because if a move is possible, then any type of borrow should also \"\n\"be possible. Note that the reverse is not true. If the parameter is \"\n\"annotated as `Fn`, then capturing variables by `&mut T` or `T` are not \"\n\"allowed. However, `&T` is allowed.\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:27\nmsgid \"\"\n\"In the following example, try swapping the usage of `Fn`, `FnMut`, and \"\n\"`FnOnce` to see what happens:\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:31\nmsgid \"\"\n\"// A function which takes a closure as an argument and calls it.\\n\"\n\"// <F> denotes that F is a \\\"Generic type parameter\\\"\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:34\nmsgid \"// The closure takes no input and returns nothing.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:36\nmsgid \"// ^ TODO: Try changing this to `Fn` or `FnMut`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:40\nmsgid \"// A function which takes a closure and returns an `i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:43\nmsgid \"// The closure takes an `i32` and returns an `i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:53\nmsgid \"\"\n\"// A non-copy type.\\n\"\n\"    // `to_owned` creates owned data from borrowed one\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:55\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:57\nmsgid \"\"\n\"// Capture 2 variables: `greeting` by reference and\\n\"\n\"    // `farewell` by value.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:60\nmsgid \"// `greeting` is by reference: requires `Fn`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:61\nmsgid \"\\\"I said {}.\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:63\nmsgid \"\"\n\"// Mutation forces `farewell` to be captured by\\n\"\n\"        // mutable reference. Now requires `FnMut`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:65\nmsgid \"\\\"!!!\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:66\nmsgid \"\\\"Then I screamed {}.\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:67\nmsgid \"\\\"Now I can sleep. zzzzz\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:69\nmsgid \"\"\n\"// Manually calling drop forces `farewell` to\\n\"\n\"        // be captured by value. Now requires `FnOnce`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:74\nmsgid \"// Call the function which applies the closure.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:77\nmsgid \"// `double` satisfies `apply_to_3`'s trait bound\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:80\nmsgid \"\\\"3 doubled: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_parameters.md:86\nmsgid \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html), [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://doc.\"\n\"rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md), \"\n\"[where](../../generics/where.md) and [`FnOnce`](https://doc.rust-lang.org/\"\n\"std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:3\nmsgid \"\"\n\"Closures succinctly capture variables from enclosing scopes. Does this have \"\n\"any consequences? It surely does. Observe how using a closure as a function \"\n\"parameter requires [generics](../../generics.md), which is necessary because \"\n\"of how they are defined:\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:9\nmsgid \"// `F` must be generic.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:16\nmsgid \"\"\n\"When a closure is defined, the compiler implicitly creates a new anonymous \"\n\"structure to store the captured variables inside, meanwhile implementing the \"\n\"functionality via one of the `traits`: `Fn`, `FnMut`, or `FnOnce` for this \"\n\"unknown type. This type is assigned to the variable which is stored until \"\n\"calling.\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:22\nmsgid \"\"\n\"Since this new type is of unknown type, any usage in a function will require \"\n\"generics. However, an unbounded type parameter `<T>` would still be \"\n\"ambiguous and not be allowed. Thus, bounding by one of the `traits`: `Fn`, \"\n\"`FnMut`, or `FnOnce` (which it implements) is sufficient to specify its type.\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:28\nmsgid \"\"\n\"// `F` must implement `Fn` for a closure which takes no\\n\"\n\"// inputs and returns nothing - exactly what is required\\n\"\n\"// for `print`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:39\nmsgid \"\"\n\"// Capture `x` into an anonymous type and implement\\n\"\n\"    // `Fn` for it. Store it in `print`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/anonymity.md:49\nmsgid \"\"\n\"[A thorough analysis](https://huonw.github.io/blog/2015/05/finding-closure-\"\n\"in-rust/), [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:3\nmsgid \"\"\n\"Since closures may be used as arguments, you might wonder if the same can be \"\n\"said about functions. And indeed they can! If you declare a function that \"\n\"takes a closure as parameter, then any function that satisfies the trait \"\n\"bound of that closure can be passed as a parameter.\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:9\nmsgid \"\"\n\"// Define a function which takes a generic `F` argument\\n\"\n\"// bounded by `Fn`, and calls it\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:14\nmsgid \"// Define a wrapper function satisfying the `Fn` bound\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:17\nmsgid \"\\\"I'm a function!\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:21\nmsgid \"// Define a closure satisfying the `Fn` bound\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:22\nmsgid \"\\\"I'm a closure!\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:29\nmsgid \"\"\n\"As an additional note, the `Fn`, `FnMut`, and `FnOnce` `traits` dictate how \"\n\"a closure captures variables from the enclosing scope.\"\nmsgstr \"\"\n\n#: src/fn/closures/input_functions.md:34\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:3\nmsgid \"\"\n\"Closures as input parameters are possible, so returning closures as output \"\n\"parameters should also be possible. However, anonymous closure types are, by \"\n\"definition, unknown, so we have to use `impl Trait` to return them.\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:8\nmsgid \"The valid traits for returning a closure are:\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:10\nmsgid \"`Fn`\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:11\nmsgid \"`FnMut`\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:12\nmsgid \"`FnOnce`\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:14\nmsgid \"\"\n\"Beyond this, the `move` keyword must be used, which signals that all \"\n\"captures occur by value. This is required because any captures by reference \"\n\"would be dropped as soon as the function exited, leaving invalid references \"\n\"in the closure.\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:21\nmsgid \"\\\"Fn\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:23\n#: src/fn/closures/output_parameters.md:29\n#: src/fn/closures/output_parameters.md:35\nmsgid \"\\\"This is a: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:27\nmsgid \"\\\"FnMut\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:33\nmsgid \"\\\"FnOnce\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/output_parameters.md:51\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md) \"\n\"and [impl Trait](../../trait/impl_trait.md).\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples.md:3\nmsgid \"\"\n\"This section contains a few examples of using closures from the `std` \"\n\"library.\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:3\nmsgid \"\"\n\"`Iterator::any` is a function which when passed an iterator, will return \"\n\"`true` if any element satisfies the predicate. Otherwise `false`. Its \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:9\n#: src/fn/closures/closure_examples/iter_find.md:9\nmsgid \"// The type being iterated over.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:12\nmsgid \"\"\n\"// `any` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `Self::Item` states it takes\\n\"\n\"        // arguments to the closure by value.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:27\nmsgid \"// `iter()` for vecs yields `&i32`. Destructure to `i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:28\nmsgid \"\\\"2 in vec1: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:29\nmsgid \"// `into_iter()` for vecs yields `i32`. No destructuring required.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:30\nmsgid \"\\\"2 in vec2: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:32\nmsgid \"\"\n\"// `iter()` only borrows `vec1` and its elements, so they can be used again\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:33\nmsgid \"\\\"vec1 len: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:34\nmsgid \"\\\"First element of vec1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:35\nmsgid \"\"\n\"// `into_iter()` does move `vec2` and its elements, so they cannot be used \"\n\"again\\n\"\n\"    // println!(\\\"First element of vec2 is: {}\\\", vec2[0]);\\n\"\n\"    // println!(\\\"vec2 len: {}\\\", vec2.len());\\n\"\n\"    // TODO: uncomment two lines above and see compiler errors.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:43\nmsgid \"// `iter()` for arrays yields `&i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:44\nmsgid \"\\\"2 in array1: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:45\nmsgid \"// `into_iter()` for arrays yields `i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:46\nmsgid \"\\\"2 in array2: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:52\nmsgid \"\"\n\"[`std::iter::Iterator::any`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.any)\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:3\nmsgid \"\"\n\"`Iterator::find` is a function which iterates over an iterator and searches \"\n\"for the first value which satisfies some condition. If none of the values \"\n\"satisfy the condition, it returns `None`. Its signature:\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:12\nmsgid \"\"\n\"// `find` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `&Self::Item` states it takes\\n\"\n\"        // arguments to the closure by reference.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:27\nmsgid \"// `iter()` for vecs yields `&i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:29\nmsgid \"// `into_iter()` for vecs yields `i32`.\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:32\nmsgid \"\"\n\"// `iter()` for vecs yields `&i32`, and we want to reference one of its\\n\"\n\"    // items, so we have to destructure `&&i32` to `i32`\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:34\nmsgid \"\\\"Find 2 in vec1: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:35\nmsgid \"\"\n\"// `into_iter()` for vecs yields `i32`, and we want to reference one of\\n\"\n\"    // its items, so we have to destructure `&i32` to `i32`\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:37\nmsgid \"\\\"Find 2 in vec2: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:42\nmsgid \"// `iter()` for arrays yields `&&i32`\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:43\nmsgid \"\\\"Find 2 in array1: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:44\nmsgid \"// `into_iter()` for arrays yields `&i32`\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:45\nmsgid \"\\\"Find 2 in array2: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:49\nmsgid \"\"\n\"`Iterator::find` gives you a reference to the item. But if you want the \"\n\"_index_ of the item, use `Iterator::position`.\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:56\nmsgid \"\"\n\"// `iter()` for vecs yields `&i32` and `position()` does not take a \"\n\"reference, so\\n\"\n\"    // we have to destructure `&i32` to `i32`\\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:61\nmsgid \"\"\n\"// `into_iter()` for vecs yields `i32` and `position()` does not take a \"\n\"reference, so\\n\"\n\"    // we do not have to destructure    \\n\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:70\nmsgid \"\"\n\"[`std::iter::Iterator::find`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.find)\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:72\nmsgid \"\"\n\"[`std::iter::Iterator::find_map`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.find_map)\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:74\nmsgid \"\"\n\"[`std::iter::Iterator::position`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.position)\"\nmsgstr \"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:76\nmsgid \"\"\n\"[`std::iter::Iterator::rposition`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.rposition)\"\nmsgstr \"\"\n\n#: src/fn/hof.md:3\nmsgid \"\"\n\"Rust provides Higher Order Functions (HOF). These are functions that take \"\n\"one or more functions and/or produce a more useful function. HOFs and lazy \"\n\"iterators give Rust its functional flavor.\"\nmsgstr \"\"\n\n#: src/fn/hof.md:13\nmsgid \"\\\"Find the sum of all the numbers with odd squares under 1000\\\"\"\nmsgstr \"\"\n\n#: src/fn/hof.md:16\nmsgid \"\"\n\"// Imperative approach\\n\"\n\"    // Declare accumulator variable\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:19\nmsgid \"// Iterate: 0, 1, 2, ... to infinity\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:21\nmsgid \"// Square the number\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:25\nmsgid \"// Break loop if exceeded the upper limit\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:28\nmsgid \"// Accumulate value, if it's odd\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:32\nmsgid \"\\\"imperative style: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/hof.md:34\nmsgid \"// Functional approach\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:36\nmsgid \"// All natural numbers squared\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:37\nmsgid \"// Below upper limit\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:38\nmsgid \"// That are odd\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:39\nmsgid \"// Sum them\\n\"\nmsgstr \"\"\n\n#: src/fn/hof.md:40\nmsgid \"\\\"functional style: {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/hof.md:44\nmsgid \"\"\n\"[Option](https://doc.rust-lang.org/core/option/enum.Option.html) and \"\n\"[Iterator](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"implement their fair share of HOFs.\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:3\nmsgid \"\"\n\"Diverging functions never return. They are marked using `!`, which is an \"\n\"empty type.\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:7 src/fn/diverging.md:35\nmsgid \"\\\"This call never returns.\\\"\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:11\nmsgid \"\"\n\"As opposed to all the other types, this one cannot be instantiated, because \"\n\"the set of all possible values this type can have is empty. Note that, it is \"\n\"different from the `()` type, which has exactly one possible value.\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:15\nmsgid \"\"\n\"For example, this function returns as usual, although there is no \"\n\"information in the return value.\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:25\nmsgid \"\\\"This function returns and you can see this line.\\\"\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:29\nmsgid \"\"\n\"As opposed to this function, which will never return the control back to the \"\n\"caller.\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:36\nmsgid \"\\\"You will never see this line!\\\"\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:40\nmsgid \"\"\n\"Although this might seem like an abstract concept, it is actually very \"\n\"useful and often handy. The main advantage of this type is that it can be \"\n\"cast to any other type, making it versatile in situations where an exact \"\n\"type is required, such as in match branches. This flexibility allows us to \"\n\"write code like this:\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:50\nmsgid \"\"\n\"// Notice that the return type of this match expression must be u32\\n\"\n\"            // because of the type of the \\\"addition\\\" variable.\\n\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:53\nmsgid \"// The \\\"i\\\" variable is of type u32, which is perfectly fine.\\n\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:55\nmsgid \"\"\n\"// On the other hand, the \\\"continue\\\" expression does not return\\n\"\n\"                // u32, but it is still fine, because it never returns and \"\n\"therefore\\n\"\n\"                // does not violate the type requirements of the match \"\n\"expression.\\n\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:64\nmsgid \"\\\"Sum of odd numbers up to 9 (excluding): {}\\\"\"\nmsgstr \"\"\n\n#: src/fn/diverging.md:68\nmsgid \"\"\n\"It is also the return type of functions that loop forever (e.g. `loop {}`) \"\n\"like network servers or functions that terminate the process (e.g. `exit()`).\"\nmsgstr \"\"\n\n#: src/mod.md:3\nmsgid \"\"\n\"Rust provides a powerful module system that can be used to hierarchically \"\n\"split code in logical units (modules), and manage visibility (public/\"\n\"private) between them.\"\nmsgstr \"\"\n\n#: src/mod.md:7\nmsgid \"\"\n\"A module is a collection of items: functions, structs, traits, `impl` \"\n\"blocks, and even other modules.\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:3\nmsgid \"\"\n\"By default, the items in a module have private visibility, but this can be \"\n\"overridden with the `pub` modifier. Only the public items of a module can be \"\n\"accessed from outside the module scope.\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:8\nmsgid \"// A module named `my_mod`\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:10\nmsgid \"// Items in modules default to private visibility.\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:12\nmsgid \"\\\"called `my_mod::private_function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:15\nmsgid \"// Use the `pub` modifier to override default visibility.\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:17\nmsgid \"\\\"called `my_mod::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:20\nmsgid \"\"\n\"// Items can access other items in the same module,\\n\"\n\"    // even when private.\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:23\nmsgid \"\\\"called `my_mod::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:27\nmsgid \"// Modules can also be nested\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:30\nmsgid \"\\\"called `my_mod::nested::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:35\nmsgid \"\\\"called `my_mod::nested::private_function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:38\nmsgid \"\"\n\"// Functions declared using `pub(in path)` syntax are only visible\\n\"\n\"        // within the given path. `path` must be a parent or ancestor \"\n\"module\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:41\nmsgid \"\\\"called `my_mod::nested::public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:45\nmsgid \"\"\n\"// Functions declared using `pub(self)` syntax are only visible within\\n\"\n\"        // the current module, which is the same as leaving them private\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:48\nmsgid \"\\\"called `my_mod::nested::public_function_in_nested()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:51\nmsgid \"\"\n\"// Functions declared using `pub(super)` syntax are only visible within\\n\"\n\"        // the parent module\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:54\nmsgid \"\\\"called `my_mod::nested::public_function_in_super_mod()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:59\nmsgid \"\\\"called `my_mod::call_public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:61\nmsgid \"\\\"> \\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:65\nmsgid \"// pub(crate) makes functions visible only within the current crate\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:67\nmsgid \"\\\"called `my_mod::public_function_in_crate()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:70\nmsgid \"// Nested modules follow the same rules for visibility\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:74\nmsgid \"\\\"called `my_mod::private_nested::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:77\nmsgid \"\"\n\"// Private parent items will still restrict the visibility of a child item,\\n\"\n\"        // even if it is declared as visible within a bigger scope.\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:81\nmsgid \"\\\"called `my_mod::private_nested::restricted_function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:87 src/mod/use.md:25 src/mod/super.md:8\n#: src/mod/split.md:24\nmsgid \"\\\"called `function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:91\nmsgid \"\"\n\"// Modules allow disambiguation between items that have the same name.\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:95\nmsgid \"\"\n\"// Public items, including those inside nested modules, can be\\n\"\n\"    // accessed from outside the parent module.\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:101\nmsgid \"// pub(crate) items can be called from anywhere in the same crate\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:104\nmsgid \"\"\n\"// pub(in path) items can only be called from within the module specified\\n\"\n\"    // Error! function `public_function_in_my_mod` is private\\n\"\n\"    //my_mod::nested::public_function_in_my_mod();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:109\nmsgid \"\"\n\"// Private items of a module cannot be directly accessed, even if\\n\"\n\"    // nested in a public module:\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:112\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:116\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::nested::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:120\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/visibility.md:124\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::restricted_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:3\nmsgid \"\"\n\"Structs have an extra level of visibility with their fields. The visibility \"\n\"defaults to private, and can be overridden with the `pub` modifier. This \"\n\"visibility only matters when a struct is accessed from outside the module \"\n\"where it is defined, and has the goal of hiding information (encapsulation).\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:10\nmsgid \"// A public struct with a public field of generic type `T`\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:15\nmsgid \"// A public struct with a private field of generic type `T`\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:21\nmsgid \"// A public constructor method\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:31\nmsgid \"// Public structs with public fields can be constructed as usual\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:32\nmsgid \"\\\"public information\\\"\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:34\nmsgid \"// and their fields can be normally accessed.\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:35\nmsgid \"\\\"The open box contains: {}\\\"\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:37\nmsgid \"\"\n\"// Public structs with private fields cannot be constructed using field \"\n\"names.\\n\"\n\"    // Error! `ClosedBox` has private fields\\n\"\n\"    //let closed_box = my::ClosedBox { contents: \\\"classified \"\n\"information\\\" };\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:42\nmsgid \"\"\n\"// However, structs with private fields can be created using\\n\"\n\"    // public constructors\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:44\nmsgid \"\\\"classified information\\\"\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:46\nmsgid \"\"\n\"// and the private fields of a public struct cannot be accessed.\\n\"\n\"    // Error! The `contents` field is private\\n\"\n\"    //println!(\\\"The closed box contains: {}\\\", _closed_box.contents);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/mod/struct_visibility.md:55\nmsgid \"[generics](../generics.md) and [methods](../fn/methods.md)\"\nmsgstr \"\"\n\n#: src/mod/use.md:3\nmsgid \"\"\n\"The `use` declaration can be used to bind a full path to a new name, for \"\n\"easier access. It is often used like this:\"\nmsgstr \"\"\n\n#: src/mod/use.md:18\nmsgid \"You can use the `as` keyword to bind imports to a different name:\"\nmsgstr \"\"\n\n#: src/mod/use.md:21\nmsgid \"// Bind the `deeply::nested::function` path to `other_function`.\\n\"\nmsgstr \"\"\n\n#: src/mod/use.md:31\nmsgid \"\\\"called `deeply::nested::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/use.md:37\nmsgid \"// Easier access to `deeply::nested::function`\\n\"\nmsgstr \"\"\n\n#: src/mod/use.md:40\nmsgid \"\\\"Entering block\\\"\"\nmsgstr \"\"\n\n#: src/mod/use.md:42\nmsgid \"\"\n\"// This is equivalent to `use deeply::nested::function as function`.\\n\"\n\"        // This `function()` will shadow the outer one.\\n\"\nmsgstr \"\"\n\n#: src/mod/use.md:46\nmsgid \"\"\n\"// `use` bindings have a local scope. In this case, the\\n\"\n\"        // shadowing of `function()` is only in this block.\\n\"\nmsgstr \"\"\n\n#: src/mod/use.md:50\nmsgid \"\\\"Leaving block\\\"\"\nmsgstr \"\"\n\n#: src/mod/super.md:3\nmsgid \"\"\n\"The `super` and `self` keywords can be used in the path to remove ambiguity \"\n\"when accessing items and to prevent unnecessary hardcoding of paths.\"\nmsgstr \"\"\n\n#: src/mod/super.md:13\nmsgid \"\\\"called `cool::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/super.md:19 src/mod/split.md:49\nmsgid \"\\\"called `my::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/super.md:24\nmsgid \"\\\"called `my::cool::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/super.md:29\nmsgid \"// Let's access all the functions named `function` from this scope!\\n\"\nmsgstr \"\"\n\n#: src/mod/super.md:30\nmsgid \"\\\"called `my::indirect_call()`, that\\\\n> \\\"\"\nmsgstr \"\"\n\n#: src/mod/super.md:32\nmsgid \"\"\n\"// The `self` keyword refers to the current module scope - in this case \"\n\"`my`.\\n\"\n\"        // Calling `self::function()` and calling `function()` directly both \"\n\"give\\n\"\n\"        // the same result, because they refer to the same function.\\n\"\nmsgstr \"\"\n\n#: src/mod/super.md:38\nmsgid \"// We can also use `self` to access another module inside `my`:\\n\"\nmsgstr \"\"\n\n#: src/mod/super.md:41\nmsgid \"\"\n\"// The `super` keyword refers to the parent scope (outside the `my` \"\n\"module).\\n\"\nmsgstr \"\"\n\n#: src/mod/super.md:44\nmsgid \"\"\n\"// This will bind to the `cool::function` in the *crate* scope.\\n\"\n\"        // In this case the crate scope is the outermost scope.\\n\"\nmsgstr \"\"\n\n#: src/mod/split.md:3\nmsgid \"\"\n\"Modules can be mapped to a file/directory hierarchy. Let's break down the \"\n\"[visibility example](visibility.md) in files:\"\nmsgstr \"\"\n\n#: src/mod/split.md:16\nmsgid \"In `split.rs`:\"\nmsgstr \"\"\n\n#: src/mod/split.md:19\nmsgid \"\"\n\"// This declaration will look for a file named `my.rs` and will\\n\"\n\"// insert its contents inside a module named `my` under this scope\\n\"\nmsgstr \"\"\n\n#: src/mod/split.md:39\nmsgid \"In `my.rs`:\"\nmsgstr \"\"\n\n#: src/mod/split.md:42\nmsgid \"\"\n\"// Similarly `mod inaccessible` and `mod nested` will locate the `nested.\"\n\"rs`\\n\"\n\"// and `inaccessible.rs` files and insert them here under their respective\\n\"\n\"// modules\\n\"\nmsgstr \"\"\n\n#: src/mod/split.md:53\nmsgid \"\\\"called `my::private_function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/split.md:57\nmsgid \"\\\"called `my::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\"\n\n#: src/mod/split.md:63\nmsgid \"In `my/nested.rs`:\"\nmsgstr \"\"\n\n#: src/mod/split.md:67\nmsgid \"\\\"called `my::nested::function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/split.md:72\nmsgid \"\\\"called `my::nested::private_function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/split.md:76\nmsgid \"In `my/inaccessible.rs`:\"\nmsgstr \"\"\n\n#: src/mod/split.md:81\nmsgid \"\\\"called `my::inaccessible::public_function()`\\\"\"\nmsgstr \"\"\n\n#: src/mod/split.md:85\nmsgid \"Let's check that things still work as before:\"\nmsgstr \"\"\n\n#: src/crates.md:3\nmsgid \"\"\n\"A crate is a compilation unit in Rust. Whenever `rustc some_file.rs` is \"\n\"called, `some_file.rs` is treated as the _crate file_. If `some_file.rs` has \"\n\"`mod` declarations in it, then the contents of the module files would be \"\n\"inserted in places where `mod` declarations in the crate file are found, \"\n\"_before_ running the compiler over it. In other words, modules do _not_ get \"\n\"compiled individually, only crates get compiled.\"\nmsgstr \"\"\n\n#: src/crates.md:10\nmsgid \"\"\n\"A crate can be compiled into a binary or into a library. By default, `rustc` \"\n\"will produce a binary from a crate. This behavior can be overridden by \"\n\"passing the `--crate-type` flag to `lib`.\"\nmsgstr \"\"\n\n#: src/crates/lib.md:3\nmsgid \"Let's create a library, and then see how to link it to another crate.\"\nmsgstr \"\"\n\n#: src/crates/lib.md:5\nmsgid \"In `rary.rs`:\"\nmsgstr \"\"\n\n#: src/crates/lib.md:9 src/attribute/crate.md:19\nmsgid \"\\\"called rary's `public_function()`\\\"\"\nmsgstr \"\"\n\n#: src/crates/lib.md:13 src/attribute/crate.md:23\nmsgid \"\\\"called rary's `private_function()`\\\"\"\nmsgstr \"\"\n\n#: src/crates/lib.md:17 src/attribute/crate.md:27\nmsgid \"\\\"called rary's `indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\"\n\n#: src/crates/lib.md:29\nmsgid \"\"\n\"Libraries get prefixed with \\\"lib\\\", and by default they get named after \"\n\"their crate file, but this default name can be overridden by passing the `--\"\n\"crate-name` option to `rustc` or by using the [`crate_name` attribute](../\"\n\"attribute/crate.md).\"\nmsgstr \"\"\n\n#: src/crates/using_lib.md:3\nmsgid \"\"\n\"To link a crate to this new library you may use `rustc`'s `--extern` flag. \"\n\"All of its items will then be imported under a module named the same as the \"\n\"library. This module generally behaves the same way as any other module.\"\nmsgstr \"\"\n\n#: src/crates/using_lib.md:8\nmsgid \"\"\n\"// extern crate rary; // May be required for Rust 2015 edition or earlier\\n\"\nmsgstr \"\"\n\n#: src/crates/using_lib.md:13\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //rary::private_function();\\n\"\nmsgstr \"\"\n\n#: src/cargo.md:3\nmsgid \"\"\n\"`cargo` is the official Rust package management tool. It has lots of really \"\n\"useful features to improve code quality and developer velocity! These include\"\nmsgstr \"\"\n\n#: src/cargo.md:6\nmsgid \"\"\n\"Dependency management and integration with [crates.io](https://crates.io) \"\n\"(the official Rust package registry)\"\nmsgstr \"\"\n\n#: src/cargo.md:8\nmsgid \"Awareness of unit tests\"\nmsgstr \"\"\n\n#: src/cargo.md:9\nmsgid \"Awareness of benchmarks\"\nmsgstr \"\"\n\n#: src/cargo.md:11\nmsgid \"\"\n\"This chapter will go through some quick basics, but you can find the \"\n\"comprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/).\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:3\nmsgid \"\"\n\"Most programs have dependencies on some libraries. If you have ever managed \"\n\"dependencies by hand, you know how much of a pain this can be. Luckily, the \"\n\"Rust ecosystem comes standard with `cargo`! `cargo` can manage dependencies \"\n\"for a project.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:8\nmsgid \"To create a new Rust project,\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:11\nmsgid \"# A binary\\n\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:13\nmsgid \"# A library\\n\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:18\nmsgid \"\"\n\"For the rest of this chapter, let's assume we are making a binary, rather \"\n\"than a library, but all of the concepts are the same.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:21\nmsgid \"After the above commands, you should see a file hierarchy like this:\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:35\nmsgid \"\"\n\"The `main.rs` is the root source file for your new `foo` project -- nothing \"\n\"new there. The `Cargo.toml` is the config file for `cargo` for this project. \"\n\"If you look inside it, you should see something like this:\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:39\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:48\nmsgid \"\"\n\"The `name` field under `[package]` determines the name of the project. This \"\n\"is used by `crates.io` if you publish the crate (more later). It is also the \"\n\"name of the output binary when you compile.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:52\nmsgid \"\"\n\"The `version` field is a crate version number using [Semantic Versioning]\"\n\"(http://semver.org/).\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:55\nmsgid \"\"\n\"The `authors` field is a list of authors used when publishing the crate.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:57\nmsgid \"\"\n\"The `[dependencies]` section lets you add dependencies for your project.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:59\nmsgid \"\"\n\"For example, suppose that we want our program to have a great CLI. You can \"\n\"find lots of great packages on [crates.io](https://crates.io) (the official \"\n\"Rust package registry). One popular choice is [clap](https://crates.io/\"\n\"crates/clap). As of this writing, the most recent published version of \"\n\"`clap` is `2.27.1`. To add a dependency to our program, we can simply add \"\n\"the following to our `Cargo.toml` under `[dependencies]`: `clap = \"\n\"\\\"2.27.1\\\"`. And that's it! You can start using `clap` in your program.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:67\nmsgid \"\"\n\"`cargo` also supports [other types of dependencies](https://doc.rust-lang.\"\n\"org/cargo/reference/specifying-dependencies.html). Here is just a small \"\n\"sampling:\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:70\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"clap = \\\"2.27.1\\\" # from crates.io\\n\"\n\"rand = { git = \\\"https://github.com/rust-lang-nursery/rand\\\" } # from online \"\n\"repo\\n\"\n\"bar = { path = \\\"../bar\\\" } # from a path in the local filesystem\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:82\nmsgid \"\"\n\"`cargo` is more than a dependency manager. All of the available \"\n\"configuration options are listed in the [format specification](https://doc.\"\n\"rust-lang.org/cargo/reference/manifest.html) of `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:86\nmsgid \"\"\n\"To build our project we can execute `cargo build` anywhere in the project \"\n\"directory (including subdirectories!). We can also do `cargo run` to build \"\n\"and run. Notice that these commands will resolve all dependencies, download \"\n\"crates if needed, and build everything, including your crate. (Note that it \"\n\"only rebuilds what it has not already built, similar to `make`).\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:92\nmsgid \"Voila! That's all there is to it!\"\nmsgstr \"\"\n\n#: src/cargo/conventions.md:3\nmsgid \"In the previous chapter, we saw the following directory hierarchy:\"\nmsgstr \"\"\n\n#: src/cargo/conventions.md:12\nmsgid \"\"\n\"Suppose that we wanted to have two binaries in the same project, though. \"\n\"What then?\"\nmsgstr \"\"\n\n#: src/cargo/conventions.md:15\nmsgid \"\"\n\"It turns out that `cargo` supports this. The default binary name is `main`, \"\n\"as we saw before, but you can add additional binaries by placing them in a \"\n\"`bin/` directory:\"\nmsgstr \"\"\n\n#: src/cargo/conventions.md:28\nmsgid \"\"\n\"To tell `cargo` to only compile or run this binary, we just pass `cargo` the \"\n\"`--bin my_other_bin` flag, where `my_other_bin` is the name of the binary we \"\n\"want to work with.\"\nmsgstr \"\"\n\n#: src/cargo/conventions.md:32\nmsgid \"\"\n\"In addition to extra binaries, `cargo` supports [more features](https://doc.\"\n\"rust-lang.org/cargo/guide/project-layout.html) such as benchmarks, tests, \"\n\"and examples.\"\nmsgstr \"\"\n\n#: src/cargo/conventions.md:35\nmsgid \"In the next chapter, we will look more closely at tests.\"\nmsgstr \"\"\n\n#: src/cargo/test.md:3\nmsgid \"\"\n\"As we know testing is integral to any piece of software! Rust has first-\"\n\"class support for unit and integration testing ([see this chapter](https://\"\n\"doc.rust-lang.org/book/ch11-00-testing.html) in TRPL).\"\nmsgstr \"\"\n\n#: src/cargo/test.md:7\nmsgid \"\"\n\"From the testing chapters linked above, we see how to write unit tests and \"\n\"integration tests. Organizationally, we can place unit tests in the modules \"\n\"they test and integration tests in their own `tests/` directory:\"\nmsgstr \"\"\n\n#: src/cargo/test.md:22\nmsgid \"\"\n\"Each file in `tests` is a separate [integration test](https://doc.rust-lang.\"\n\"org/book/ch11-03-test-organization.html#integration-tests), i.e. a test that \"\n\"is meant to test your library as if it were being called from a dependent \"\n\"crate.\"\nmsgstr \"\"\n\n#: src/cargo/test.md:27\nmsgid \"\"\n\"The [Testing](../testing.md) chapter elaborates on the three different \"\n\"testing styles: [Unit](../testing/unit_testing.md), [Doc](../testing/\"\n\"doc_testing.md), and [Integration](../testing/integration_testing.md).\"\nmsgstr \"\"\n\n#: src/cargo/test.md:30\nmsgid \"`cargo` naturally provides an easy way to run all of your tests!\"\nmsgstr \"\"\n\n#: src/cargo/test.md:36\nmsgid \"You should see output like this:\"\nmsgstr \"\"\n\n#: src/cargo/test.md:38\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/test.md:53\nmsgid \"You can also run tests whose name matches a pattern:\"\nmsgstr \"\"\n\n#: src/cargo/test.md:59\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/test.md:72\nmsgid \"\"\n\"One word of caution: Cargo may run multiple tests concurrently, so make sure \"\n\"that they don't race with each other.\"\nmsgstr \"\"\n\n#: src/cargo/test.md:75\nmsgid \"\"\n\"One example of this concurrency causing issues is if two tests output to a \"\n\"file, such as below:\"\nmsgstr \"\"\n\n#: src/cargo/test.md:81\nmsgid \"// Import the necessary modules\\n\"\nmsgstr \"\"\n\n#: src/cargo/test.md:85\nmsgid \"// This test writes to a file\\n\"\nmsgstr \"\"\n\n#: src/cargo/test.md:88 src/cargo/test.md:105\nmsgid \"// Opens the file ferris.txt or creates one if it doesn't exist.\\n\"\nmsgstr \"\"\n\n#: src/cargo/test.md:92 src/cargo/test.md:109\nmsgid \"\\\"ferris.txt\\\"\"\nmsgstr \"\"\n\n#: src/cargo/test.md:93 src/cargo/test.md:110\nmsgid \"\\\"Failed to open ferris.txt\\\"\"\nmsgstr \"\"\n\n#: src/cargo/test.md:95\nmsgid \"// Print \\\"Ferris\\\" 5 times.\\n\"\nmsgstr \"\"\n\n#: src/cargo/test.md:97\nmsgid \"\\\"Ferris\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/cargo/test.md:98 src/cargo/test.md:115\nmsgid \"\\\"Could not write to ferris.txt\\\"\"\nmsgstr \"\"\n\n#: src/cargo/test.md:102\nmsgid \"// This test tries to write to the same file\\n\"\nmsgstr \"\"\n\n#: src/cargo/test.md:112\nmsgid \"// Print \\\"Corro\\\" 5 times.\\n\"\nmsgstr \"\"\n\n#: src/cargo/test.md:114\nmsgid \"\\\"Corro\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/cargo/test.md:121\nmsgid \"Although the intent is to get the following:\"\nmsgstr \"\"\n\n#: src/cargo/test.md:137\nmsgid \"What actually gets put into `ferris.txt` is this:\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:3\nmsgid \"\"\n\"Sometimes a normal build from `cargo` is not enough. Perhaps your crate \"\n\"needs some pre-requisites before `cargo` will successfully compile, things \"\n\"like code generation, or some native code that needs to be compiled. To \"\n\"solve this problem we have build scripts that Cargo can run.\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:8\nmsgid \"\"\n\"To add a build script to your package it can either be specified in the \"\n\"`Cargo.toml` as follows:\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:17\nmsgid \"\"\n\"Otherwise Cargo will look for a `build.rs` file in the project directory by \"\n\"default.\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:20\nmsgid \"How to use a build script\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:22\nmsgid \"\"\n\"The build script is simply another Rust file that will be compiled and \"\n\"invoked prior to compiling anything else in the package. Hence it can be \"\n\"used to fulfill pre-requisites of your crate.\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:26\nmsgid \"\"\n\"Cargo provides the script with inputs via environment variables [specified \"\n\"here](https://doc.rust-lang.org/cargo/reference/environment-variables.\"\n\"html#environment-variables-cargo-sets-for-build-scripts) that can be used.\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:29\nmsgid \"\"\n\"The script provides output via stdout. All lines printed are written to \"\n\"`target/debug/build/<pkg>/output`. Further, lines prefixed with `cargo:` \"\n\"will be interpreted by Cargo directly and hence can be used to define \"\n\"parameters for the package's compilation.\"\nmsgstr \"\"\n\n#: src/cargo/build_scripts.md:34\nmsgid \"\"\n\"For further specification and examples have a read of the [Cargo \"\n\"specification](https://doc.rust-lang.org/cargo/reference/build-scripts.html).\"\nmsgstr \"\"\n\n#: src/attribute.md:3\nmsgid \"\"\n\"An attribute is metadata applied to some module, crate or item. This \"\n\"metadata can be used to/for:\"\nmsgstr \"\"\n\n#: src/attribute.md:8\nmsgid \"[conditional compilation of code](attribute/cfg.md)\"\nmsgstr \"\"\n\n#: src/attribute.md:9\nmsgid \"\"\n\"[set crate name, version and type (binary or library)](attribute/crate.md)\"\nmsgstr \"\"\n\n#: src/attribute.md:10\nmsgid \"\"\n\"disable [lints](https://en.wikipedia.org/wiki/Lint_%28software%29) (warnings)\"\nmsgstr \"\"\n\n#: src/attribute.md:11\nmsgid \"enable compiler features (macros, glob imports, etc.)\"\nmsgstr \"\"\n\n#: src/attribute.md:12\nmsgid \"link to a foreign library\"\nmsgstr \"\"\n\n#: src/attribute.md:13\nmsgid \"mark functions as unit tests\"\nmsgstr \"\"\n\n#: src/attribute.md:14\nmsgid \"mark functions that will be part of a benchmark\"\nmsgstr \"\"\n\n#: src/attribute.md:15\nmsgid \"\"\n\"[attribute like macros](https://doc.rust-lang.org/book/ch19-06-macros.\"\n\"html#attribute-like-macros)\"\nmsgstr \"\"\n\n#: src/attribute.md:17\nmsgid \"\"\n\"Attributes look like `#[outer_attribute]` or `#![inner_attribute]`, with the \"\n\"difference between them being where they apply.\"\nmsgstr \"\"\n\n#: src/attribute.md:20\nmsgid \"\"\n\"`#[outer_attribute]` applies to the [item](https://doc.rust-lang.org/stable/\"\n\"reference/items.html) immediately following it. Some examples of items are: \"\n\"a function, a module declaration, a constant, a structure, an enum. Here is \"\n\"an example where attribute `#[derive(Debug)]` applies to the struct \"\n\"`Rectangle`:\"\nmsgstr \"\"\n\n#: src/attribute.md:34\nmsgid \"\"\n\"`#![inner_attribute]` applies to the enclosing [item](https://doc.rust-lang.\"\n\"org/stable/reference/items.html) (typically a module or a crate). In other \"\n\"words, this attribute is interpreted as applying to the entire scope in \"\n\"which it's placed. Here is an example where `#![allow(unused_variables)]` \"\n\"applies to the whole crate (if placed in `main.rs`):\"\nmsgstr \"\"\n\n#: src/attribute.md:44\nmsgid \"// This would normally warn about an unused variable.\\n\"\nmsgstr \"\"\n\n#: src/attribute.md:48\nmsgid \"Attributes can take arguments with different syntaxes:\"\nmsgstr \"\"\n\n#: src/attribute.md:50\nmsgid \"`#[attribute = \\\"value\\\"]`\"\nmsgstr \"\"\n\n#: src/attribute.md:51\nmsgid \"`#[attribute(key = \\\"value\\\")]`\"\nmsgstr \"\"\n\n#: src/attribute.md:52\nmsgid \"`#[attribute(value)]`\"\nmsgstr \"\"\n\n#: src/attribute.md:54\nmsgid \"\"\n\"Attributes can have multiple values and can be separated over multiple \"\n\"lines, too:\"\nmsgstr \"\"\n\n#: src/attribute/unused.md:3\nmsgid \"\"\n\"The compiler provides a `dead_code` [_lint_](https://en.wikipedia.org/wiki/\"\n\"Lint_%28software%29) that will warn about unused functions. An _attribute_ \"\n\"can be used to disable the lint.\"\nmsgstr \"\"\n\n#: src/attribute/unused.md:9\nmsgid \"\"\n\"// `#[allow(dead_code)]` is an attribute that disables the `dead_code` lint\\n\"\nmsgstr \"\"\n\n#: src/attribute/unused.md:14\nmsgid \"// FIXME ^ Add an attribute to suppress the warning\\n\"\nmsgstr \"\"\n\n#: src/attribute/unused.md:22\nmsgid \"\"\n\"Note that in real programs, you should eliminate dead code. In these \"\n\"examples we'll allow dead code in some places because of the interactive \"\n\"nature of the examples.\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:3\nmsgid \"\"\n\"The `crate_type` attribute can be used to tell the compiler whether a crate \"\n\"is a binary or a library (and even which type of library), and the \"\n\"`crate_name` attribute can be used to set the name of the crate.\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:7\nmsgid \"\"\n\"However, it is important to note that both the `crate_type` and `crate_name` \"\n\"attributes have **no** effect whatsoever when using Cargo, the Rust package \"\n\"manager. Since Cargo is used for the majority of Rust projects, this means \"\n\"real-world uses of `crate_type` and `crate_name` are relatively limited.\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:13\nmsgid \"// This crate is a library\\n\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:14\nmsgid \"\\\"lib\\\"\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:14\nmsgid \"// The library is named \\\"rary\\\"\\n\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:16\nmsgid \"\\\"rary\\\"\"\nmsgstr \"\"\n\n#: src/attribute/crate.md:33\nmsgid \"\"\n\"When the `crate_type` attribute is used, we no longer need to pass the `--\"\n\"crate-type` flag to `rustc`.\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:3\nmsgid \"\"\n\"Configuration conditional checks are possible through two different \"\n\"operators:\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:5\nmsgid \"the `cfg` attribute: `#[cfg(...)]` in attribute position\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:6\nmsgid \"the `cfg!` macro: `cfg!(...)` in boolean expressions\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:8\nmsgid \"\"\n\"While the former enables conditional compilation, the latter conditionally \"\n\"evaluates to `true` or `false` literals allowing for checks at run-time. \"\n\"Both utilize identical argument syntax.\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:12\nmsgid \"\"\n\"`cfg!`, unlike `#[cfg]`, does not remove any code and only evaluates to true \"\n\"or false. For example, all blocks in an if/else expression need to be valid \"\n\"when `cfg!` is used for the condition, regardless of what `cfg!` is \"\n\"evaluating.\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:15\nmsgid \"// This function only gets compiled if the target OS is linux\\n\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:16 src/attribute/cfg.md:22 src/attribute/cfg.md:31\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:18\nmsgid \"\\\"You are running linux!\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:20\nmsgid \"\"\n\"// And this function only gets compiled if the target OS is *not* linux\\n\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:24\nmsgid \"\\\"You are *not* running linux!\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:30\nmsgid \"\\\"Are you sure?\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:32\nmsgid \"\\\"Yes. It's definitely linux!\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:34\nmsgid \"\\\"Yes. It's definitely *not* linux!\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg.md:41\nmsgid \"\"\n\"[the reference](https://doc.rust-lang.org/reference/attributes.\"\n\"html#conditional-compilation), [`cfg!`](https://doc.rust-lang.org/std/macro.\"\n\"cfg!.html), and [macros](../macros.md).\"\nmsgstr \"\"\n\n#: src/attribute/cfg/custom.md:3\nmsgid \"\"\n\"Some conditionals like `target_os` are implicitly provided by `rustc`, but \"\n\"custom conditionals must be passed to `rustc` using the `--cfg` flag.\"\nmsgstr \"\"\n\n#: src/attribute/cfg/custom.md:9\nmsgid \"\\\"condition met!\\\"\"\nmsgstr \"\"\n\n#: src/attribute/cfg/custom.md:17\nmsgid \"Try to run this to see what happens without the custom `cfg` flag.\"\nmsgstr \"\"\n\n#: src/attribute/cfg/custom.md:19\nmsgid \"With the custom `cfg` flag:\"\nmsgstr \"\"\n\n#: src/generics.md:3\nmsgid \"\"\n\"_Generics_ is the topic of generalizing types and functionalities to broader \"\n\"cases. This is extremely useful for reducing code duplication in many ways, \"\n\"but can call for rather involved syntax. Namely, being generic requires \"\n\"taking great care to specify over which types a generic type is actually \"\n\"considered valid. The simplest and most common use of generics is for type \"\n\"parameters.\"\nmsgstr \"\"\n\n#: src/generics.md:10\nmsgid \"\"\n\"A type parameter is specified as generic by the use of angle brackets and \"\n\"upper [camel case](https://en.wikipedia.org/wiki/CamelCase): `<Aaa, Bbb, ...\"\n\">`. \\\"Generic type parameters\\\" are typically represented as `<T>`. In Rust, \"\n\"\\\"generic\\\" also describes anything that accepts one or more generic type \"\n\"parameters `<T>`. Any type specified as a generic type parameter is generic, \"\n\"and everything else is concrete (non-generic).\"\nmsgstr \"\"\n\n#: src/generics.md:16\nmsgid \"\"\n\"For example, defining a _generic function_ named `foo` that takes an \"\n\"argument `T` of any type:\"\nmsgstr \"\"\n\n#: src/generics.md:23\nmsgid \"\"\n\"Because `T` has been specified as a generic type parameter using `<T>`, it \"\n\"is considered generic when used here as `(arg: T)`. This is the case even if \"\n\"`T` has previously been defined as a `struct`.\"\nmsgstr \"\"\n\n#: src/generics.md:27\nmsgid \"This example shows some of the syntax in action:\"\nmsgstr \"\"\n\n#: src/generics.md:30\nmsgid \"// A concrete type `A`.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:32\nmsgid \"\"\n\"// In defining the type `Single`, the first use of `A` is not preceded by \"\n\"`<A>`.\\n\"\n\"// Therefore, `Single` is a concrete type, and `A` is defined as above.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:35\nmsgid \"//            ^ Here is `Single`s first use of the type `A`.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:37\nmsgid \"\"\n\"// Here, `<T>` precedes the first use of `T`, so `SingleGen` is a generic \"\n\"type.\\n\"\n\"// Because the type parameter `T` is generic, it could be anything, \"\n\"including\\n\"\n\"// the concrete type `A` defined at the top.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:44\nmsgid \"// `Single` is concrete and explicitly takes `A`.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:47\nmsgid \"\"\n\"// Create a variable `_char` of type `SingleGen<char>`\\n\"\n\"    // and give it the value `SingleGen('a')`.\\n\"\n\"    // Here, `SingleGen` has a type parameter explicitly specified.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:52\nmsgid \"// `SingleGen` can also have a type parameter implicitly specified:\\n\"\nmsgstr \"\"\n\n#: src/generics.md:53\nmsgid \"// Uses `A` defined at the top.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:54\nmsgid \"// Uses `i32`.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:55\nmsgid \"// Uses `char`.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:61\nmsgid \"[`structs`](custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:3\nmsgid \"\"\n\"The same set of rules can be applied to functions: a type `T` becomes \"\n\"generic when preceded by `<T>`.\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:6\nmsgid \"\"\n\"Using generic functions sometimes requires explicitly specifying type \"\n\"parameters. This may be the case if the function is called where the return \"\n\"type is generic, or if the compiler doesn't have enough information to infer \"\n\"the necessary type parameters.\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:11\nmsgid \"\"\n\"A function call with explicitly specified type parameters looks like: `fun::\"\n\"<A, B, ...>()`.\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:15\nmsgid \"// Concrete type `A`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:16\nmsgid \"// Concrete type `S`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:17\nmsgid \"// Generic type `SGen`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:18\nmsgid \"\"\n\"// The following functions all take ownership of the variable passed into\\n\"\n\"// them and immediately go out of scope, freeing the variable.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:21\nmsgid \"\"\n\"// Define a function `reg_fn` that takes an argument `_s` of type `S`.\\n\"\n\"// This has no `<T>` so this is not a generic function.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:25\nmsgid \"\"\n\"// Define a function `gen_spec_t` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// It has been explicitly given the type parameter `A`, but because `A` has \"\n\"not \\n\"\n\"// been specified as a generic type parameter for `gen_spec_t`, it is not \"\n\"generic.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:30\nmsgid \"\"\n\"// Define a function `gen_spec_i32` that takes an argument `_s` of type \"\n\"`SGen<i32>`.\\n\"\n\"// It has been explicitly given the type parameter `i32`, which is a \"\n\"specific type.\\n\"\n\"// Because `i32` is not a generic type, this function is also not generic.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:35\nmsgid \"\"\n\"// Define a function `generic` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// Because `SGen<T>` is preceded by `<T>`, this function is generic over \"\n\"`T`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:41\nmsgid \"// Using the non-generic functions\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:42\nmsgid \"// Concrete type.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:43\nmsgid \"// Implicitly specified type parameter `A`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:44\nmsgid \"// Implicitly specified type parameter `i32`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:46\nmsgid \"// Explicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:49\nmsgid \"// Implicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:50\nmsgid \"'c'\"\nmsgstr \"\"\n\n#: src/generics/gen_fn.md:56\nmsgid \"[functions](../fn.md) and [`struct`s](../custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/generics/impl.md:3\nmsgid \"Similar to functions, implementations require care to remain generic.\"\nmsgstr \"\"\n\n#: src/generics/impl.md:6\nmsgid \"// Concrete type `S`\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:7\nmsgid \"// Generic type `GenericVal`\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:8\nmsgid \"// impl of GenericVal where we explicitly specify type parameters:\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:10\nmsgid \"// Specify `f32`\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:11\nmsgid \"// Specify `S` as defined above\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:12\nmsgid \"// `<T>` Must precede the type to remain generic\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:25\nmsgid \"// impl of Val\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:32\nmsgid \"// impl of GenVal for a generic type `T`\\n\"\nmsgstr \"\"\n\n#: src/generics/impl.md:50\nmsgid \"\"\n\"[functions returning references](../scope/lifetime/fn.md), [`impl`](../fn/\"\n\"methods.md), and [`struct`](../custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:3\nmsgid \"\"\n\"Of course `trait`s can also be generic. Here we define one which \"\n\"reimplements the `Drop` `trait` as a generic method to `drop` itself and an \"\n\"input.\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:7\nmsgid \"// Non-copyable types.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:10\nmsgid \"// A trait generic over `T`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:13\nmsgid \"\"\n\"// Define a method on the caller type which takes an\\n\"\n\"    // additional single parameter `T` and does nothing with it.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:17\nmsgid \"\"\n\"// Implement `DoubleDrop<T>` for any generic parameter `T` and\\n\"\n\"// caller `U`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:21\nmsgid \"\"\n\"// This method takes ownership of both passed arguments,\\n\"\n\"    // deallocating both.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:30\nmsgid \"// Deallocate `empty` and `null`.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:33\nmsgid \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO: Try uncommenting these lines.\\n\"\nmsgstr \"\"\n\n#: src/generics/gen_trait.md:41\nmsgid \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html), [`struct`](../\"\n\"custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:3\nmsgid \"\"\n\"When working with generics, the type parameters often must use traits as \"\n\"_bounds_ to stipulate what functionality a type implements. For example, the \"\n\"following example uses the trait `Display` to print and so it requires `T` \"\n\"to be bound by `Display`; that is, `T` _must_ implement `Display`.\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:9\nmsgid \"\"\n\"// Define a function `printer` that takes a generic type `T` which\\n\"\n\"// must implement trait `Display`.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:16\nmsgid \"\"\n\"Bounding restricts the generic to types that conform to the bounds. That is:\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:20\nmsgid \"\"\n\"// Error! `Vec<T>` does not implement `Display`. This\\n\"\n\"// specialization will fail.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:26\nmsgid \"\"\n\"Another effect of bounding is that generic instances are allowed to access \"\n\"the [methods](../fn/methods.md) of traits specified in the bounds. For \"\n\"example:\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:30\nmsgid \"// A trait which implements the print marker: `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:45\nmsgid \"\"\n\"// The generic `T` must implement `Debug`. Regardless\\n\"\n\"// of the type, this will work properly.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:51\nmsgid \"\"\n\"// `T` must implement `HasArea`. Any type which meets\\n\"\n\"// the bound can access `HasArea`'s function `area`.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:61\nmsgid \"\\\"Area: {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:63\nmsgid \"\"\n\"//print_debug(&_triangle);\\n\"\n\"    //println!(\\\"Area: {}\\\", area(&_triangle));\\n\"\n\"    // ^ TODO: Try uncommenting these.\\n\"\n\"    // | Error: Does not implement either `Debug` or `HasArea`. \\n\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:70\nmsgid \"\"\n\"As an additional note, [`where`](../generics/where.md) clauses can also be \"\n\"used to apply bounds in some cases to be more expressive.\"\nmsgstr \"\"\n\n#: src/generics/bounds.md:75\nmsgid \"\"\n\"[`std::fmt`](../hello/print.md), [`struct`s](../custom_types/structs.md), \"\n\"and [`trait`s](../trait.md)\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:3\nmsgid \"\"\n\"A consequence of how bounds work is that even if a `trait` doesn't include \"\n\"any functionality, you can still use it as a bound. `Eq` and `Copy` are \"\n\"examples of such `trait`s from the `std` library.\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:17\nmsgid \"\"\n\"// These functions are only valid for types which implement these\\n\"\n\"// traits. The fact that the traits are empty is irrelevant.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:20\nmsgid \"\\\"red\\\"\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:21\nmsgid \"\\\"blue\\\"\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:28\nmsgid \"\"\n\"// `red()` won't work on a blue jay nor vice versa\\n\"\n\"    // because of the bounds.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:30\nmsgid \"\\\"A cardinal is {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:31\nmsgid \"\\\"A blue jay is {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:32\nmsgid \"\"\n\"//println!(\\\"A turkey is {}\\\", red(&_turkey));\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\n#: src/generics/bounds/testcase_empty.md:39\nmsgid \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), [`std::\"\n\"marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html), and \"\n\"[`trait`s](../../trait.md)\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:3\nmsgid \"\"\n\"Multiple bounds for a single type can be applied with a `+`. Like normal, \"\n\"different types are separated with `,`.\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:10\nmsgid \"\\\"Debug: `{:?}`\\\"\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:11\nmsgid \"\\\"Display: `{}`\\\"\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:15\nmsgid \"\\\"t: `{:?}`\\\"\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:16\nmsgid \"\\\"u: `{:?}`\\\"\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:20\nmsgid \"\\\"words\\\"\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:25\nmsgid \"\"\n\"//compare_prints(&array);\\n\"\n\"    // TODO ^ Try uncommenting this.\\n\"\nmsgstr \"\"\n\n#: src/generics/multi_bounds.md:34\nmsgid \"[`std::fmt`](../hello/print.md) and [`trait`s](../trait.md)\"\nmsgstr \"\"\n\n#: src/generics/where.md:3\nmsgid \"\"\n\"A bound can also be expressed using a `where` clause immediately before the \"\n\"opening `{`, rather than at the type's first mention. Additionally, `where` \"\n\"clauses can apply bounds to arbitrary types, rather than just to type \"\n\"parameters.\"\nmsgstr \"\"\n\n#: src/generics/where.md:8\nmsgid \"Some cases that a `where` clause is useful:\"\nmsgstr \"\"\n\n#: src/generics/where.md:10\nmsgid \"When specifying generic types and bounds separately is clearer:\"\nmsgstr \"\"\n\n#: src/generics/where.md:14\nmsgid \"// Expressing bounds with a `where` clause\\n\"\nmsgstr \"\"\n\n#: src/generics/where.md:21\nmsgid \"\"\n\"When using a `where` clause is more expressive than using normal syntax. The \"\n\"`impl` in this example cannot be directly expressed without a `where` clause:\"\nmsgstr \"\"\n\n#: src/generics/where.md:30\nmsgid \"\"\n\"// Because we would otherwise have to express this as `T: Debug` or \\n\"\n\"// use another method of indirect approach, this requires a `where` clause:\\n\"\nmsgstr \"\"\n\n#: src/generics/where.md:35\nmsgid \"\"\n\"// We want `Option<T>: Debug` as our bound because that is what's\\n\"\n\"    // being printed. Doing otherwise would be using the wrong bound.\\n\"\nmsgstr \"\"\n\n#: src/generics/where.md:51\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md), \"\n\"[`struct`](../custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:3\nmsgid \"\"\n\"The `newtype` idiom gives compile time guarantees that the right type of \"\n\"value is supplied to a program.\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:6\nmsgid \"\"\n\"For example, an age verification function that checks age in years, _must_ \"\n\"be given a value of type `Years`.\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:21\nmsgid \"/// truncates partial years\\n\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:34 src/generics/new_types.md:35\nmsgid \"\\\"Is an adult? {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:36\nmsgid \"// println!(\\\"Is an adult? {}\\\", is_adult(&age_days));\\n\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:40\nmsgid \"\"\n\"Uncomment the last print statement to observe that the type supplied must be \"\n\"`Years`.\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:42\nmsgid \"\"\n\"To obtain the `newtype`'s value as the base type, you may use the tuple or \"\n\"destructuring syntax like so:\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:49\nmsgid \"// Tuple\\n\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:50\nmsgid \"// Destructuring\\n\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:56\nmsgid \"[`structs`](../custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/generics/assoc_items.md:3\nmsgid \"\"\n\"\\\"Associated Items\\\" refers to a set of rules pertaining to [`item`](https://\"\n\"doc.rust-lang.org/reference/items.html)s of various types. It is an \"\n\"extension to `trait` generics, and allows `trait`s to internally define new \"\n\"items.\"\nmsgstr \"\"\n\n#: src/generics/assoc_items.md:7\nmsgid \"\"\n\"One such item is called an _associated type_, providing simpler usage \"\n\"patterns when the `trait` is generic over its container type.\"\nmsgstr \"\"\n\n#: src/generics/assoc_items.md:12\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:3\nmsgid \"\"\n\"A `trait` that is generic over its container type has type specification \"\n\"requirements - users of the `trait` _must_ specify all of its generic types.\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:6\nmsgid \"\"\n\"In the example below, the `Contains` `trait` allows the use of the generic \"\n\"types `A` and `B`. The trait is then implemented for the `Container` type, \"\n\"specifying `i32` for `A` and `B` so that it can be used with `fn \"\n\"difference()`.\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:10\nmsgid \"\"\n\"Because `Contains` is generic, we are forced to explicitly state _all_ of \"\n\"the generic types for `fn difference()`. In practice, we want a way to \"\n\"express that `A` and `B` are determined by the _input_ `C`. As you will see \"\n\"in the next section, associated types provide exactly that capability.\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:17\n#: src/generics/assoc_items/types.md:36\nmsgid \"\"\n\"// A trait which checks if 2 items are stored inside of container.\\n\"\n\"// Also retrieves first or last value.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:21\nmsgid \"// Explicitly requires `A` and `B`.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:22\n#: src/generics/assoc_items/the_problem.md:23\nmsgid \"// Doesn't explicitly require `A` or `B`.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:27\nmsgid \"// True if the numbers stored are equal.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:32\n#: src/generics/assoc_items/types.md:60\nmsgid \"// Grab the first number.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:35\n#: src/generics/assoc_items/types.md:63\nmsgid \"// Grab the last number.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:38\nmsgid \"\"\n\"// `C` contains `A` and `B`. In light of that, having to express `A` and\\n\"\n\"// `B` again is a nuisance.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:52\n#: src/generics/assoc_items/types.md:77\nmsgid \"\\\"Does container contain {} and {}: {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:55\n#: src/generics/assoc_items/types.md:80\nmsgid \"\\\"First number: {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:56\n#: src/generics/assoc_items/types.md:81\nmsgid \"\\\"Last number: {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:58\n#: src/generics/assoc_items/types.md:83\nmsgid \"\\\"The difference is: {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/the_problem.md:64\nmsgid \"\"\n\"[`struct`s](../../custom_types/structs.md), and [`trait`s](../../trait.md)\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:3\nmsgid \"\"\n\"The use of \\\"Associated types\\\" improves the overall readability of code by \"\n\"moving inner types locally into a trait as _output_ types. Syntax for the \"\n\"`trait` definition is as follows:\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:8\nmsgid \"\"\n\"// `A` and `B` are defined in the trait via the `type` keyword.\\n\"\n\"// (Note: `type` in this context is different from `type` when used for\\n\"\n\"// aliases).\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:15\nmsgid \"// Updated syntax to refer to these new types generically.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:20\nmsgid \"\"\n\"Note that functions that use the `trait` `Contains` are no longer required \"\n\"to express `A` or `B` at all:\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:24\nmsgid \"// Without using associated types\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:27\nmsgid \"// Using associated types\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:32\nmsgid \"\"\n\"Let's rewrite the example from the previous section using associated types:\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:40\nmsgid \"// Define generic types here which methods will be able to utilize.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:50\nmsgid \"\"\n\"// Specify what types `A` and `B` are. If the `input` type\\n\"\n\"    // is `Container(i32, i32)`, the `output` types are determined\\n\"\n\"    // as `i32` and `i32`.\\n\"\nmsgstr \"\"\n\n#: src/generics/assoc_items/types.md:56\nmsgid \"// `&Self::A` and `&Self::B` are also valid here.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:3\nmsgid \"\"\n\"A phantom type parameter is one that doesn't show up at runtime, but is \"\n\"checked statically (and only) at compile time.\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:6\nmsgid \"\"\n\"Data types can use extra generic type parameters to act as markers or to \"\n\"perform type checking at compile time. These extra parameters hold no \"\n\"storage values, and have no runtime behavior.\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:10\nmsgid \"\"\n\"In the following example, we combine [std::marker::PhantomData](https://doc.\"\n\"rust-lang.org/std/marker/struct.PhantomData.html) with the phantom type \"\n\"parameter concept to create tuples containing different data types.\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:16\nmsgid \"\"\n\"// A phantom tuple struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:18 src/generics/phantom.md:22\nmsgid \"// Allow equality test for this type.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:20\nmsgid \"\"\n\"// A phantom type struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:24\nmsgid \"\"\n\"// Note: Storage is allocated for generic type `A`, but not for `B`.\\n\"\n\"//       Therefore, `B` cannot be used in computations.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:29\nmsgid \"\"\n\"// Here, `f32` and `f64` are the hidden parameters.\\n\"\n\"    // PhantomTuple type specified as `<char, f32>`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:31 src/generics/phantom.md:33\n#: src/generics/phantom.md:37 src/generics/phantom.md:42\n#: src/scope/borrow/ref.md:12\nmsgid \"'Q'\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:32\nmsgid \"// PhantomTuple type specified as `<char, f64>`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:35\nmsgid \"// Type specified as `<char, f32>`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:40\nmsgid \"// Type specified as `<char, f64>`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:46\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 yields: {}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:50\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_struct1 == _struct2 yields: {}\\\",\\n\"\n\"    //           _struct1 == _struct2);\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom.md:58\nmsgid \"\"\n\"[Derive](../trait/derive.md), [struct](../custom_types/structs.md), and \"\n\"[TupleStructs](../custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:3\nmsgid \"\"\n\"A useful method of unit conversions can be examined by implementing `Add` \"\n\"with a phantom type parameter. The `Add` `trait` is examined below:\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:7\nmsgid \"\"\n\"// This construction would impose: `Self + RHS = Output`\\n\"\n\"// where RHS defaults to Self if not specified in the implementation.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:14\nmsgid \"// `Output` must be `T<U>` so that `T<U> + T<U> = T<U>`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:22\nmsgid \"The whole implementation:\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:27\nmsgid \"/// Create void enumerations to define unit types.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:33\nmsgid \"\"\n\"/// `Length` is a type with phantom type parameter `Unit`,\\n\"\n\"/// and is not generic over the length type (that is `f64`).\\n\"\n\"///\\n\"\n\"/// `f64` already implements the `Clone` and `Copy` traits.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:40\nmsgid \"/// The `Add` trait defines the behavior of the `+` operator.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:45\nmsgid \"// add() returns a new `Length` struct containing the sum.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:47\nmsgid \"// `+` calls the `Add` implementation for `f64`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:53\nmsgid \"// Specifies `one_foot` to have phantom type parameter `Inch`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:55\nmsgid \"// `one_meter` has phantom type parameter `Mm`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:58\nmsgid \"\"\n\"// `+` calls the `add()` method we implemented for `Length<Unit>`.\\n\"\n\"    //\\n\"\n\"    // Since `Length` implements `Copy`, `add()` does not consume\\n\"\n\"    // `one_foot` and `one_meter` but copies them into `self` and `rhs`.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:65\nmsgid \"// Addition works.\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:66\nmsgid \"\\\"one foot + one_foot = {:?} in\\\"\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:67\nmsgid \"\\\"one meter + one_meter = {:?} mm\\\"\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:69\nmsgid \"\"\n\"// Nonsensical operations fail as they should:\\n\"\n\"    // Compile-time Error: type mismatch.\\n\"\n\"    //let one_feter = one_foot + one_meter;\\n\"\nmsgstr \"\"\n\n#: src/generics/phantom/testcase_units.md:77\nmsgid \"\"\n\"[Borrowing (`&`)](../../scope/borrow.md), [Bounds (`X: Y`)](../../generics/\"\n\"bounds.md), [enum](../../custom_types/enum.md), [impl & self](../../fn/\"\n\"methods.md), [Overloading](../../trait/ops.md), [ref](../../scope/borrow/ref.\"\n\"md), [Traits (`X for Y`)](../../trait.md), and [TupleStructs](../../\"\n\"custom_types/structs.md).\"\nmsgstr \"\"\n\n#: src/scope.md:3\nmsgid \"\"\n\"Scopes play an important part in ownership, borrowing, and lifetimes. That \"\n\"is, they indicate to the compiler when borrows are valid, when resources can \"\n\"be freed, and when variables are created or destroyed.\"\nmsgstr \"\"\n\n#: src/scope/raii.md:3\nmsgid \"\"\n\"Variables in Rust do more than just hold data in the stack: they also _own_ \"\n\"resources, e.g. `Box<T>` owns memory in the heap. Rust enforces [RAII]\"\n\"(https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization) \"\n\"(Resource Acquisition Is Initialization), so whenever an object goes out of \"\n\"scope, its destructor is called and its owned resources are freed.\"\nmsgstr \"\"\n\n#: src/scope/raii.md:8\nmsgid \"\"\n\"This behavior shields against _resource leak_ bugs, so you'll never have to \"\n\"manually free memory or worry about memory leaks again! Here's a quick \"\n\"showcase:\"\nmsgstr \"\"\n\n#: src/scope/raii.md:12\nmsgid \"// raii.rs\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:14 src/scope/raii.md:21 src/scope/raii.md:26\nmsgid \"// Allocate an integer on the heap\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:17\nmsgid \"// `_box1` is destroyed here, and memory gets freed\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:24\nmsgid \"// A nested scope:\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:29\nmsgid \"// `_box3` is destroyed here, and memory gets freed\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:32\nmsgid \"\"\n\"// Creating lots of boxes just for fun\\n\"\n\"    // There's no need to manually free memory!\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:38\nmsgid \"// `_box2` is destroyed here, and memory gets freed\\n\"\nmsgstr \"\"\n\n#: src/scope/raii.md:42\nmsgid \"\"\n\"Of course, we can double check for memory errors using [`valgrind`](http://\"\n\"valgrind.org/info/):\"\nmsgstr \"\"\n\n#: src/scope/raii.md:65\nmsgid \"No leaks here!\"\nmsgstr \"\"\n\n#: src/scope/raii.md:67\nmsgid \"Destructor\"\nmsgstr \"\"\n\n#: src/scope/raii.md:69\nmsgid \"\"\n\"The notion of a destructor in Rust is provided through the [`Drop`](https://\"\n\"doc.rust-lang.org/std/ops/trait.Drop.html) trait. The destructor is called \"\n\"when the resource goes out of scope. This trait is not required to be \"\n\"implemented for every type, only implement it for your type if you require \"\n\"its own destructor logic.\"\nmsgstr \"\"\n\n#: src/scope/raii.md:74\nmsgid \"\"\n\"Run the below example to see how the [`Drop`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Drop.html) trait works. When the variable in the `main` function \"\n\"goes out of scope the custom destructor will be invoked.\"\nmsgstr \"\"\n\n#: src/scope/raii.md:82\nmsgid \"\\\"ToDrop is being dropped\\\"\"\nmsgstr \"\"\n\n#: src/scope/raii.md:88\nmsgid \"\\\"Made a ToDrop!\\\"\"\nmsgstr \"\"\n\n#: src/scope/raii.md:94\nmsgid \"[Box](../std/box.md)\"\nmsgstr \"\"\n\n#: src/scope/move.md:3\nmsgid \"\"\n\"Because variables are in charge of freeing their own resources, **resources \"\n\"can only have one owner**. This prevents resources from being freed more \"\n\"than once. Note that not all variables own resources (e.g. [references](../\"\n\"flow_control/match/destructuring/destructure_pointers.md)).\"\nmsgstr \"\"\n\n#: src/scope/move.md:8\nmsgid \"\"\n\"When doing assignments (`let x = y`) or passing function arguments by value \"\n\"(`foo(x)`), the _ownership_ of the resources is transferred. In Rust-speak, \"\n\"this is known as a _move_.\"\nmsgstr \"\"\n\n#: src/scope/move.md:12\nmsgid \"\"\n\"After moving resources, the previous owner can no longer be used. This \"\n\"avoids creating dangling pointers.\"\nmsgstr \"\"\n\n#: src/scope/move.md:16\nmsgid \"// This function takes ownership of the heap allocated memory\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:18\nmsgid \"\\\"Destroying a box that contains {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move.md:20\nmsgid \"// `c` is destroyed and the memory freed\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:24\nmsgid \"// _Stack_ allocated integer\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:27\nmsgid \"// *Copy* `x` into `y` - no resources are moved\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:30\nmsgid \"// Both values can be independently used\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:31\nmsgid \"\\\"x is {}, and y is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move.md:33\nmsgid \"// `a` is a pointer to a _heap_ allocated integer\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:36\nmsgid \"\\\"a contains: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move.md:38\nmsgid \"// *Move* `a` into `b`\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:40\nmsgid \"\"\n\"// The pointer address of `a` is copied (not the data) into `b`.\\n\"\n\"    // Both are now pointers to the same heap allocated data, but\\n\"\n\"    // `b` now owns it.\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:44\nmsgid \"\"\n\"// Error! `a` can no longer access the data, because it no longer owns the\\n\"\n\"    // heap memory\\n\"\n\"    //println!(\\\"a contains: {}\\\", a);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:49\nmsgid \"\"\n\"// This function takes ownership of the heap allocated memory from `b`\\n\"\nmsgstr \"\"\n\n#: src/scope/move.md:52\nmsgid \"\"\n\"// Since the heap memory has been freed at this point, this action would\\n\"\n\"    // result in dereferencing freed memory, but it's forbidden by the \"\n\"compiler\\n\"\n\"    // Error! Same reason as the previous Error\\n\"\n\"    //println!(\\\"b contains: {}\\\", b);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:3\nmsgid \"Mutability of data can be changed when ownership is transferred.\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:9\nmsgid \"\\\"immutable_box contains {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:11\nmsgid \"\"\n\"// Mutability error\\n\"\n\"    //*immutable_box = 4;\\n\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:14\nmsgid \"// *Move* the box, changing the ownership (and mutability)\\n\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:17\nmsgid \"\\\"mutable_box contains {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:19\nmsgid \"// Modify the contents of the box\\n\"\nmsgstr \"\"\n\n#: src/scope/move/mut.md:22\nmsgid \"\\\"mutable_box now contains {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:3\nmsgid \"\"\n\"Within the [destructuring](../../flow_control/match/destructuring.md) of a \"\n\"single variable, both `by-move` and `by-reference` pattern bindings can be \"\n\"used at the same time. Doing this will result in a _partial move_ of the \"\n\"variable, which means that parts of the variable will be moved while other \"\n\"parts stay. In such a case, the parent variable cannot be used afterwards as \"\n\"a whole, however the parts that are only referenced (and not moved) can \"\n\"still be used. Note that types that implement the [`Drop` trait](../../trait/\"\n\"drop.md) cannot be partially moved from, because its `drop` method would use \"\n\"it afterwards as a whole.\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:22\nmsgid \"\"\n\"// Error! cannot move out of a type which implements the `Drop` trait\\n\"\n\"    //impl Drop for Person {\\n\"\n\"    //    fn drop(&mut self) {\\n\"\n\"    //        println!(\\\"Dropping the person struct {:?}\\\", self)\\n\"\n\"    //    }\\n\"\n\"    //}\\n\"\n\"    // TODO ^ Try uncommenting these lines\\n\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:35\nmsgid \"// `name` is moved out of person, but `age` is referenced\\n\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:38\nmsgid \"\\\"The person's age is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:40\nmsgid \"\\\"The person's name is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:42\nmsgid \"\"\n\"// Error! borrow of partially moved value: `person` partial move occurs\\n\"\n\"    //println!(\\\"The person struct is {:?}\\\", person);\\n\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:45\nmsgid \"\"\n\"// `person` cannot be used but `person.age` can be used as it is not moved\\n\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:46\nmsgid \"\\\"The person's age from person struct is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:50\nmsgid \"\"\n\"(In this example, we store the `age` variable on the heap to illustrate the \"\n\"partial move: deleting `ref` in the above code would give an error as the \"\n\"ownership of `person.age` would be moved to the variable `age`. If `Person.\"\n\"age` were stored on the stack, `ref` would not be required as the definition \"\n\"of `age` would copy the data from `person.age` without moving it.)\"\nmsgstr \"\"\n\n#: src/scope/move/partial_move.md:59\nmsgid \"[destructuring](../../flow_control/match/destructuring.md)\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:3\nmsgid \"\"\n\"Most of the time, we'd like to access data without taking ownership over it. \"\n\"To accomplish this, Rust uses a _borrowing_ mechanism. Instead of passing \"\n\"objects by value (`T`), objects can be passed by reference (`&T`).\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:7\nmsgid \"\"\n\"The compiler statically guarantees (via its borrow checker) that references \"\n\"_always_ point to valid objects. That is, while references to an object \"\n\"exist, the object cannot be destroyed.\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:12\nmsgid \"// This function takes ownership of a box and destroys it\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:14\nmsgid \"\\\"Destroying box that contains {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:16\nmsgid \"// This function borrows an i32\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:19\nmsgid \"\\\"This int is: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:23\nmsgid \"\"\n\"// Create a boxed i32 in the heap, and a i32 on the stack\\n\"\n\"    // Remember: numbers can have arbitrary underscores added for \"\n\"readability\\n\"\n\"    // 5_i32 is the same as 5i32\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:29\nmsgid \"\"\n\"// Borrow the contents of the box. Ownership is not taken,\\n\"\n\"    // so the contents can be borrowed again.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:35\nmsgid \"// Take a reference to the data contained inside the box\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:38\nmsgid \"\"\n\"// Error!\\n\"\n\"        // Can't destroy `boxed_i32` while the inner value is borrowed later \"\n\"in scope.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:43\nmsgid \"// Attempt to borrow `_ref_to_i32` after inner value is destroyed\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:45\nmsgid \"// `_ref_to_i32` goes out of scope and is no longer borrowed.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:48\nmsgid \"\"\n\"// `boxed_i32` can now give up ownership to `eat_box_i32` and be destroyed\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:3\nmsgid \"\"\n\"Mutable data can be mutably borrowed using `&mut T`. This is called a \"\n\"_mutable reference_ and gives read/write access to the borrower. In \"\n\"contrast, `&T` borrows the data via an immutable reference, and the borrower \"\n\"can read the data but not modify it:\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:12\nmsgid \"\"\n\"// `&'static str` is a reference to a string allocated in read only memory\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:17\nmsgid \"// This function takes a reference to a book\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:20\nmsgid \"\\\"I immutably borrowed {} - {} edition\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:22\nmsgid \"\"\n\"// This function takes a reference to a mutable book and changes `year` to \"\n\"2014\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:26\nmsgid \"\\\"I mutably borrowed {} - {} edition\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:30\nmsgid \"// Create an immutable Book named `immutabook`\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:32\nmsgid \"// string literals have type `&'static str`\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:33\nmsgid \"\\\"Douglas Hofstadter\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:34\nmsgid \"\\\"Gödel, Escher, Bach\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:38\nmsgid \"// Create a mutable copy of `immutabook` and call it `mutabook`\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:41\nmsgid \"// Immutably borrow an immutable object\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:44\nmsgid \"// Immutably borrow a mutable object\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:47\nmsgid \"// Borrow a mutable object as mutable\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:50\nmsgid \"// Error! Cannot borrow an immutable object as mutable\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/mut.md:58\nmsgid \"[`static`](../lifetime/static_lifetime.md)\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:3\nmsgid \"\"\n\"Data can be immutably borrowed any number of times, but while immutably \"\n\"borrowed, the original data can't be mutably borrowed. On the other hand, \"\n\"only _one_ mutable borrow is allowed at a time. The original data can be \"\n\"borrowed again only _after_ the mutable reference has been used for the last \"\n\"time.\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:17\nmsgid \"// Data can be accessed via the references and the original owner\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:18 src/scope/borrow/alias.md:27\n#: src/scope/borrow/alias.md:49\nmsgid \"\\\"Point has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:21\nmsgid \"\"\n\"// Error! Can't borrow `point` as mutable because it's currently\\n\"\n\"    // borrowed as immutable.\\n\"\n\"    // let mutable_borrow = &mut point;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:26\nmsgid \"// The borrowed values are used again here\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:30\nmsgid \"\"\n\"// The immutable references are no longer used for the rest of the code so\\n\"\n\"    // it is possible to reborrow with a mutable reference.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:34\nmsgid \"// Change data via mutable reference\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:39\nmsgid \"\"\n\"// Error! Can't borrow `point` as immutable because it's currently\\n\"\n\"    // borrowed as mutable.\\n\"\n\"    // let y = &point.y;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:44\nmsgid \"\"\n\"// Error! Can't print because `println!` takes an immutable reference.\\n\"\n\"    // println!(\\\"Point Z coordinate is {}\\\", point.z);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:48\nmsgid \"// Ok! Mutable references can be passed as immutable to `println!`\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:52\nmsgid \"\"\n\"// The mutable reference is no longer used for the rest of the code so it\\n\"\n\"    // is possible to reborrow\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/alias.md:55\nmsgid \"\\\"Point now has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:3\nmsgid \"\"\n\"When doing pattern matching or destructuring via the `let` binding, the \"\n\"`ref` keyword can be used to take references to the fields of a struct/\"\n\"tuple. The example below shows a few instances where this can be useful:\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:14\nmsgid \"\"\n\"// A `ref` borrow on the left side of an assignment is equivalent to\\n\"\n\"    // an `&` borrow on the right side.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:19\nmsgid \"\\\"ref_c1 equals ref_c2: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:23\nmsgid \"// `ref` is also valid when destructuring a struct.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:25\nmsgid \"// `ref_to_x` is a reference to the `x` field of `point`.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:28\nmsgid \"// Return a copy of the `x` field of `point`.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:32\nmsgid \"// A mutable copy of `point`\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:36\nmsgid \"// `ref` can be paired with `mut` to take mutable references.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:39\nmsgid \"// Mutate the `y` field of `mutable_point` via a mutable reference.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:43\nmsgid \"\\\"point is ({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:44\nmsgid \"\\\"mutable_point is ({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:46\nmsgid \"// A mutable tuple that includes a pointer\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:50\nmsgid \"// Destructure `mutable_tuple` to change the value of `last`.\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow/ref.md:55\nmsgid \"\\\"tuple is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:3\nmsgid \"\"\n\"A _lifetime_ is a construct the compiler (or more specifically, its _borrow \"\n\"checker_) uses to ensure all borrows are valid. Specifically, a variable's \"\n\"lifetime begins when it is created and ends when it is destroyed. While \"\n\"lifetimes and scopes are often referred to together, they are not the same.\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:8\nmsgid \"\"\n\"Take, for example, the case where we borrow a variable via `&`. The borrow \"\n\"has a lifetime that is determined by where it is declared. As a result, the \"\n\"borrow is valid as long as it ends before the lender is destroyed. However, \"\n\"the scope of the borrow is determined by where the reference is used.\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:13\nmsgid \"\"\n\"In the following example and in the rest of this section, we will see how \"\n\"lifetimes relate to scopes, as well as how the two differ.\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:17\nmsgid \"\"\n\"// Lifetimes are annotated below with lines denoting the creation\\n\"\n\"// and destruction of each variable.\\n\"\n\"// `i` has the longest lifetime because its scope entirely encloses \\n\"\n\"// both `borrow1` and `borrow2`. The duration of `borrow1` compared \\n\"\n\"// to `borrow2` is irrelevant since they are disjoint.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:23\nmsgid \"\"\n\"// Lifetime for `i` starts. ────────────────┐\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:25 src/scope/lifetime.md:32\nmsgid \"//                                                   │\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:26\nmsgid \"\"\n\"// `borrow1` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:28\nmsgid \"\\\"borrow1: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:28 src/scope/lifetime.md:35\nmsgid \"//              ││\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:29\nmsgid \"\"\n\"// `borrow1` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:33\nmsgid \"\"\n\"// `borrow2` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:35\nmsgid \"\\\"borrow2: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:36\nmsgid \"\"\n\"// `borrow2` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:38\nmsgid \"// Lifetime ends. ─────────────────────────────────────┘\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime.md:41\nmsgid \"\"\n\"Note that no names or types are assigned to label lifetimes. This restricts \"\n\"how lifetimes will be able to be used as we will see.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:3\nmsgid \"\"\n\"The borrow checker uses explicit lifetime annotations to determine how long \"\n\"references should be valid. In cases where lifetimes are not elided[^1], \"\n\"Rust requires explicit annotations to determine what the lifetime of a \"\n\"reference should be. The syntax for explicitly annotating a lifetime uses an \"\n\"apostrophe character as follows:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:10\nmsgid \"// `foo` has a lifetime parameter `'a`\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:14\nmsgid \"\"\n\"Similar to [closures](../../fn/closures/anonymity.md), using lifetimes \"\n\"requires generics. Additionally, this lifetime syntax indicates that the \"\n\"lifetime of `foo` may not exceed that of `'a`. Explicit annotation of a type \"\n\"has the form `&'a T` where `'a` has already been introduced.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:19\nmsgid \"In cases with multiple lifetimes, the syntax is similar:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:22\nmsgid \"// `foo` has lifetime parameters `'a` and `'b`\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:26\nmsgid \"\"\n\"In this case, the lifetime of `foo` cannot exceed that of either `'a` _or_ \"\n\"`'b`.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:28\nmsgid \"See the following example for explicit lifetime annotation in use:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:31\nmsgid \"\"\n\"// `print_refs` takes two references to `i32` which have different\\n\"\n\"// lifetimes `'a` and `'b`. These two lifetimes must both be at\\n\"\n\"// least as long as the function `print_refs`.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:35\nmsgid \"\\\"x is {} and y is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:37\nmsgid \"\"\n\"// A function which takes no arguments, but has a lifetime parameter `'a`.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:42\nmsgid \"// ERROR: `_x` does not live long enough\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:44\nmsgid \"\"\n\"// Attempting to use the lifetime `'a` as an explicit type annotation \\n\"\n\"    // inside the function will fail because the lifetime of `&_x` is \"\n\"shorter\\n\"\n\"    // than that of `_y`. A short lifetime cannot be coerced into a longer \"\n\"one.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:50\nmsgid \"// Create variables to be borrowed below.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:53\nmsgid \"// Borrows (`&`) of both variables are passed into the function.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:55\nmsgid \"\"\n\"// Any input which is borrowed must outlive the borrower. \\n\"\n\"    // In other words, the lifetime of `four` and `nine` must \\n\"\n\"    // be longer than that of `print_refs`.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:60\nmsgid \"\"\n\"// `failed_borrow` contains no references to force `'a` to be \\n\"\n\"    // longer than the lifetime of the function, but `'a` is longer.\\n\"\n\"    // Because the lifetime is never constrained, it defaults to `'static`.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:66\nmsgid \"\"\n\"[elision](elision.md) implicitly annotates lifetimes and so is different.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/explicit.md:70\nmsgid \"[generics](../../generics.md) and [closures](../../fn/closures.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:3\nmsgid \"\"\n\"Ignoring [elision](elision.md), function signatures with lifetimes have a \"\n\"few constraints:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:5\nmsgid \"any reference _must_ have an annotated lifetime.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:6\nmsgid \"\"\n\"any reference being returned _must_ have the same lifetime as an input or be \"\n\"`static`.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:9\nmsgid \"\"\n\"Additionally, note that returning references without input is banned if it \"\n\"would result in returning references to invalid data. The following example \"\n\"shows off some valid forms of functions with lifetimes:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:14\nmsgid \"\"\n\"// One input reference with lifetime `'a` which must live\\n\"\n\"// at least as long as the function.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:17\nmsgid \"\\\"`print_one`: x is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:19\nmsgid \"// Mutable references are possible with lifetimes as well.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:24\nmsgid \"\"\n\"// Multiple elements with different lifetimes. In this case, it\\n\"\n\"// would be fine for both to have the same lifetime `'a`, but\\n\"\n\"// in more complex cases, different lifetimes may be required.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:29\nmsgid \"\\\"`print_multi`: x is {}, y is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:31\nmsgid \"\"\n\"// Returning references that have been passed in is acceptable.\\n\"\n\"// However, the correct lifetime must be returned.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:35\nmsgid \"\"\n\"//fn invalid_output<'a>() -> &'a String { &String::from(\\\"foo\\\") }\\n\"\n\"// The above is invalid: `'a` must live longer than the function.\\n\"\n\"// Here, `&String::from(\\\"foo\\\")` would create a `String`, followed by a\\n\"\n\"// reference. Then the data is dropped upon exiting the scope, leaving\\n\"\n\"// a reference to invalid data to be returned.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/fn.md:60\nmsgid \"[Functions](../../fn.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/methods.md:3\nmsgid \"Methods are annotated similarly to functions:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/methods.md:9\nmsgid \"// Annotate lifetimes as in a standalone function.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/methods.md:12\nmsgid \"\\\"`print`: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/methods.md:26\nmsgid \"[methods](../../fn/methods.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:3\nmsgid \"Annotation of lifetimes in structures are also similar to functions:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:6\nmsgid \"\"\n\"// A type `Borrowed` which houses a reference to an\\n\"\n\"// `i32`. The reference to `i32` must outlive `Borrowed`.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:10\nmsgid \"// Similarly, both references here must outlive this structure.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:17\nmsgid \"// An enum which is either an `i32` or a reference to one.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:34 src/scope/lifetime/struct.md:36\nmsgid \"\\\"x is borrowed in {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:35\nmsgid \"\\\"x and y are borrowed in {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:37\nmsgid \"\\\"y is *not* borrowed in {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/struct.md:43\nmsgid \"[`struct`s](../../custom_types/structs.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/trait.md:3\nmsgid \"\"\n\"Annotation of lifetimes in trait methods basically are similar to functions. \"\n\"Note that `impl` may have annotation of lifetimes too.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/trait.md:7\nmsgid \"// A struct with annotation of lifetimes.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/trait.md:12\nmsgid \"// Annotate lifetimes to impl.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/trait.md:24\nmsgid \"\\\"b is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/trait.md:30\nmsgid \"[`trait`s](../../trait.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:3\nmsgid \"\"\n\"Just like generic types can be bounded, lifetimes (themselves generic) use \"\n\"bounds as well. The `:` character has a slightly different meaning here, but \"\n\"`+` is the same. Note how the following read:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:7\nmsgid \"`T: 'a`: _All_ references in `T` must outlive lifetime `'a`.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:8\nmsgid \"\"\n\"`T: Trait + 'a`: Type `T` must implement trait `Trait` and _all_ references \"\n\"in `T` must outlive `'a`.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:11\nmsgid \"\"\n\"The example below shows the above syntax in action used after keyword \"\n\"`where`:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:14\nmsgid \"// Trait to bound with.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:17\nmsgid \"\"\n\"// `Ref` contains a reference to a generic type `T` that has\\n\"\n\"// some lifetime `'a` unknown by `Ref`. `T` is bounded such that any\\n\"\n\"// *references* in `T` must outlive `'a`. Additionally, the lifetime\\n\"\n\"// of `Ref` may not exceed `'a`.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:22\nmsgid \"// A generic function which prints using the `Debug` trait.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:26\nmsgid \"\\\"`print`: t is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:28\nmsgid \"\"\n\"// Here a reference to `T` is taken where `T` implements\\n\"\n\"// `Debug` and all *references* in `T` outlive `'a`. In\\n\"\n\"// addition, `'a` must outlive the function.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:34\nmsgid \"\\\"`print_ref`: t is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:48\nmsgid \"\"\n\"[generics](../../generics.md), [bounds in generics](../../generics/bounds.\"\n\"md), and [multiple bounds in generics](../../generics/multi_bounds.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:3\nmsgid \"\"\n\"A longer lifetime can be coerced into a shorter one so that it works inside \"\n\"a scope it normally wouldn't work in. This comes in the form of inferred \"\n\"coercion by the Rust compiler, and also in the form of declaring a lifetime \"\n\"difference:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:9\nmsgid \"\"\n\"// Here, Rust infers a lifetime that is as short as possible.\\n\"\n\"// The two references are then coerced to that lifetime.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:14\nmsgid \"\"\n\"// `<'a: 'b, 'b>` reads as lifetime `'a` is at least as long as `'b`.\\n\"\n\"// Here, we take in an `&'a i32` and return a `&'b i32` as a result of \"\n\"coercion.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:22\nmsgid \"// Longer lifetime\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:25\nmsgid \"// Shorter lifetime\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:27\nmsgid \"\\\"The product is {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:28\nmsgid \"\\\"{} is the first\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:3\nmsgid \"\"\n\"Rust has a few reserved lifetime names. One of those is `'static`. You might \"\n\"encounter it in two situations:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:7\nmsgid \"// A reference with 'static lifetime:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:8\nmsgid \"\\\"hello world\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:9\nmsgid \"// 'static as part of a trait bound:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:14\nmsgid \"\"\n\"Both are related but subtly different and this is a common source for \"\n\"confusion when learning Rust. Here are some examples for each situation:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:17\nmsgid \"Reference lifetime\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:19\nmsgid \"\"\n\"As a reference lifetime `'static` indicates that the data pointed to by the \"\n\"reference lives for the remaining lifetime of the running program. It can \"\n\"still be coerced to a shorter lifetime.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:23\nmsgid \"\"\n\"There are two common ways to make a variable with `'static` lifetime, and \"\n\"both are stored in the read-only memory of the binary:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:26\nmsgid \"Make a constant with the `static` declaration.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:27\nmsgid \"Make a `string` literal which has type: `&'static str`.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:29\nmsgid \"See the following example for a display of each method:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:32\nmsgid \"// Make a constant with `'static` lifetime.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:34\nmsgid \"\"\n\"// Returns a reference to `NUM` where its `'static`\\n\"\n\"// lifetime is coerced to that of the input argument.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:43\nmsgid \"// Make a `string` literal and print it:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:44\nmsgid \"\\\"I'm in read-only memory\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:45\nmsgid \"\\\"static_string: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:47\nmsgid \"\"\n\"// When `static_string` goes out of scope, the reference\\n\"\n\"        // can no longer be used, but the data remains in the binary.\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:52\nmsgid \"// Make an integer to use for `coerce_static`:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:55\nmsgid \"// Coerce `NUM` to lifetime of `lifetime_num`:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:58\nmsgid \"\\\"coerced_static: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:61\nmsgid \"\\\"NUM: {} stays accessible!\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:65\nmsgid \"\"\n\"Since `'static` references only need to be valid for the _remainder_ of a \"\n\"program's life, they can be created while the program is executed. Just to \"\n\"demonstrate, the below example uses [`Box::leak`](https://doc.rust-lang.org/\"\n\"std/boxed/struct.Box.html#method.leak) to dynamically create `'static` \"\n\"references. In that case it definitely doesn't live for the entire duration, \"\n\"but only from the leaking point onward.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:90\nmsgid \"Trait bound\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:92\nmsgid \"\"\n\"As a trait bound, it means the type does not contain any non-static \"\n\"references. Eg. the receiver can hold on to the type for as long as they \"\n\"want and it will never become invalid until they drop it.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:96\nmsgid \"\"\n\"It's important to understand this means that any owned data always passes a \"\n\"`'static` lifetime bound, but a reference to that owned data generally does \"\n\"not:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:104\nmsgid \"\\\"'static value passed in is: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:108\nmsgid \"// i is owned and contains no references, thus it's 'static:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:112\nmsgid \"\"\n\"// oops, &i only has the lifetime defined by the scope of\\n\"\n\"    // main(), so it's not 'static:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:118\nmsgid \"The compiler will tell you:\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:135\nmsgid \"[`'static` constants](../../custom_types/constants.md)\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:3\nmsgid \"\"\n\"Some lifetime patterns are overwhelmingly common and so the borrow checker \"\n\"will allow you to omit them to save typing and to improve readability. This \"\n\"is known as elision. Elision exists in Rust solely because these patterns \"\n\"are common.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:8\nmsgid \"\"\n\"The following code shows a few examples of elision. For a more comprehensive \"\n\"description of elision, see [lifetime elision](https://doc.rust-lang.org/\"\n\"book/ch10-03-lifetime-syntax.html#lifetime-elision) in the book.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:12\nmsgid \"\"\n\"// `elided_input` and `annotated_input` essentially have identical \"\n\"signatures\\n\"\n\"// because the lifetime of `elided_input` is inferred by the compiler:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:15\nmsgid \"\\\"`elided_input`: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:19\nmsgid \"\\\"`annotated_input`: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:21\nmsgid \"\"\n\"// Similarly, `elided_pass` and `annotated_pass` have identical signatures\\n\"\n\"// because the lifetime is added implicitly to `elided_pass`:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:34\nmsgid \"\\\"`elided_pass`: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:35\nmsgid \"\\\"`annotated_pass`: {}\\\"\"\nmsgstr \"\"\n\n#: src/scope/lifetime/elision.md:41\nmsgid \"\"\n\"[elision](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.\"\n\"html#lifetime-elision)\"\nmsgstr \"\"\n\n#: src/trait.md:3\nmsgid \"\"\n\"A `trait` is a collection of methods defined for an unknown type: `Self`. \"\n\"They can access other methods declared in the same trait.\"\nmsgstr \"\"\n\n#: src/trait.md:6\nmsgid \"\"\n\"Traits can be implemented for any data type. In the example below, we define \"\n\"`Animal`, a group of methods. The `Animal` `trait` is then implemented for \"\n\"the `Sheep` data type, allowing the use of methods from `Animal` with a \"\n\"`Sheep`.\"\nmsgstr \"\"\n\n#: src/trait.md:15\nmsgid \"\"\n\"// Associated function signature; `Self` refers to the implementor type.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:18\nmsgid \"// Method signatures; these will return a string.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:22\nmsgid \"// Traits can provide default method definitions.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:24\nmsgid \"\\\"{} says {}\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:35\nmsgid \"// Implementor methods can use the implementor's trait methods.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:36\nmsgid \"\\\"{} is already naked...\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:38\nmsgid \"\\\"{} gets a haircut!\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:44 src/trait/dyn.md:25\nmsgid \"// Implement the `Animal` trait for `Sheep`.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:47\nmsgid \"// `Self` is the implementor type: `Sheep`.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:58\nmsgid \"\\\"baaaaah?\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:60 src/trait/dyn.md:29\nmsgid \"\\\"baaaaah!\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:64\nmsgid \"// Default trait methods can be overridden.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:66\nmsgid \"// For example, we can add some quiet contemplation.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:67\nmsgid \"\\\"{} pauses briefly... {}\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:72\nmsgid \"// Type annotation is necessary in this case.\\n\"\nmsgstr \"\"\n\n#: src/trait.md:73\nmsgid \"\\\"Dolly\\\"\"\nmsgstr \"\"\n\n#: src/trait.md:74\nmsgid \"// TODO ^ Try removing the type annotations.\\n\"\nmsgstr \"\"\n\n#: src/trait/derive.md:3\nmsgid \"\"\n\"The compiler is capable of providing basic implementations for some traits \"\n\"via the `#[derive]` [attribute](../attribute.md). These traits can still be \"\n\"manually implemented if a more complex behavior is required.\"\nmsgstr \"\"\n\n#: src/trait/derive.md:7\nmsgid \"The following is a list of derivable traits:\"\nmsgstr \"\"\n\n#: src/trait/derive.md:9\nmsgid \"\"\n\"Comparison traits: [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html), \"\n\"[`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html), [`PartialOrd`]\"\n\"(https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html).\"\nmsgstr \"\"\n\n#: src/trait/derive.md:11\nmsgid \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html), to create \"\n\"`T` from `&T` via a copy.\"\nmsgstr \"\"\n\n#: src/trait/derive.md:12\nmsgid \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html), to give a \"\n\"type 'copy semantics' instead of 'move semantics'.\"\nmsgstr \"\"\n\n#: src/trait/derive.md:13\nmsgid \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html), to compute a \"\n\"hash from `&T`.\"\nmsgstr \"\"\n\n#: src/trait/derive.md:14\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html), to \"\n\"create an empty instance of a data type.\"\nmsgstr \"\"\n\n#: src/trait/derive.md:15\nmsgid \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html), to format a \"\n\"value using the `{:?}` formatter.\"\nmsgstr \"\"\n\n#: src/trait/derive.md:18\nmsgid \"// `Centimeters`, a tuple struct that can be compared\\n\"\nmsgstr \"\"\n\n#: src/trait/derive.md:21\nmsgid \"// `Inches`, a tuple struct that can be printed\\n\"\nmsgstr \"\"\n\n#: src/trait/derive.md:33\nmsgid \"// `Seconds`, a tuple struct with no additional attributes\\n\"\nmsgstr \"\"\n\n#: src/trait/derive.md:40\nmsgid \"\"\n\"// Error: `Seconds` can't be printed; it doesn't implement the `Debug` \"\n\"trait\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/trait/derive.md:44\nmsgid \"\"\n\"// Error: `Seconds` can't be compared; it doesn't implement the `PartialEq` \"\n\"trait\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/trait/derive.md:50\nmsgid \"\\\"One foot equals {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/derive.md:56\nmsgid \"\\\"smaller\\\"\"\nmsgstr \"\"\n\n#: src/trait/derive.md:58\nmsgid \"\\\"bigger\\\"\"\nmsgstr \"\"\n\n#: src/trait/derive.md:61\nmsgid \"\\\"One foot is {} than one meter.\\\"\"\nmsgstr \"\"\n\n#: src/trait/derive.md:67\nmsgid \"[`derive`](https://doc.rust-lang.org/reference/attributes.html#derive)\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:3\nmsgid \"\"\n\"The Rust compiler needs to know how much space every function's return type \"\n\"requires. This means all your functions have to return a concrete type. \"\n\"Unlike other languages, if you have a trait like `Animal`, you can't write a \"\n\"function that returns `Animal`, because its different implementations will \"\n\"need different amounts of memory.\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:8\nmsgid \"\"\n\"However, there's an easy workaround. Instead of returning a trait object \"\n\"directly, our functions return a `Box` which _contains_ some `Animal`. A \"\n\"`box` is just a reference to some memory in the heap. Because a reference \"\n\"has a statically-known size, and the compiler can guarantee it points to a \"\n\"heap-allocated `Animal`, we can return a trait from our function!\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:13\nmsgid \"\"\n\"Rust tries to be as explicit as possible whenever it allocates memory on the \"\n\"heap. So if your function returns a pointer-to-trait-on-heap in this way, \"\n\"you need to write the return type with the `dyn` keyword, e.g. `Box<dyn \"\n\"Animal>`.\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:22\nmsgid \"// Instance method signature\\n\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:32\nmsgid \"// Implement the `Animal` trait for `Cow`.\\n\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:36\nmsgid \"\\\"moooooo!\\\"\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:39\nmsgid \"\"\n\"// Returns some struct that implements Animal, but we don't know which one \"\n\"at compile time.\\n\"\nmsgstr \"\"\n\n#: src/trait/dyn.md:52\nmsgid \"\\\"You've randomly chosen an animal, and it says {}\\\"\"\nmsgstr \"\"\n\n#: src/trait/ops.md:3\nmsgid \"\"\n\"In Rust, many of the operators can be overloaded via traits. That is, some \"\n\"operators can be used to accomplish different tasks based on their input \"\n\"arguments. This is possible because operators are syntactic sugar for method \"\n\"calls. For example, the `+` operator in `a + b` calls the `add` method (as \"\n\"in `a.add(b)`). This `add` method is part of the `Add` trait. Hence, the `+` \"\n\"operator can be used by any implementor of the `Add` trait.\"\nmsgstr \"\"\n\n#: src/trait/ops.md:9\nmsgid \"\"\n\"A list of the traits, such as `Add`, that overload operators can be found in \"\n\"[`core::ops`](https://doc.rust-lang.org/core/ops/).\"\nmsgstr \"\"\n\n#: src/trait/ops.md:22\nmsgid \"\"\n\"// The `std::ops::Add` trait is used to specify the functionality of `+`.\\n\"\n\"// Here, we make `Add<Bar>` - the trait for addition with a RHS of type \"\n\"`Bar`.\\n\"\n\"// The following block implements the operation: Foo + Bar = FooBar\\n\"\nmsgstr \"\"\n\n#: src/trait/ops.md:30\nmsgid \"\\\"> Foo.add(Bar) was called\\\"\"\nmsgstr \"\"\n\n#: src/trait/ops.md:35\nmsgid \"\"\n\"// By reversing the types, we end up implementing non-commutative addition.\\n\"\n\"// Here, we make `Add<Foo>` - the trait for addition with a RHS of type \"\n\"`Foo`.\\n\"\n\"// This block implements the operation: Bar + Foo = BarFoo\\n\"\nmsgstr \"\"\n\n#: src/trait/ops.md:43\nmsgid \"\\\"> Bar.add(Foo) was called\\\"\"\nmsgstr \"\"\n\n#: src/trait/ops.md:50\nmsgid \"\\\"Foo + Bar = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/ops.md:51\nmsgid \"\\\"Bar + Foo = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/ops.md:55 src/testing.md:16 src/testing/doc_testing.md:104\n#: src/testing/dev_dependencies.md:36\nmsgid \"See Also\"\nmsgstr \"\"\n\n#: src/trait/ops.md:57\nmsgid \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html), [Syntax Index]\"\n\"(https://doc.rust-lang.org/book/appendix-02-operators.html)\"\nmsgstr \"\"\n\n#: src/trait/drop.md:3\nmsgid \"\"\n\"The [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) trait only \"\n\"has one method: `drop`, which is called automatically when an object goes \"\n\"out of scope. The main use of the `Drop` trait is to free the resources that \"\n\"the implementor instance owns.\"\nmsgstr \"\"\n\n#: src/trait/drop.md:7\nmsgid \"\"\n\"`Box`, `Vec`, `String`, `File`, and `Process` are some examples of types \"\n\"that implement the `Drop` trait to free resources. The `Drop` trait can also \"\n\"be manually implemented for any custom data type.\"\nmsgstr \"\"\n\n#: src/trait/drop.md:11\nmsgid \"\"\n\"The following example adds a print to console to the `drop` function to \"\n\"announce when it is called.\"\nmsgstr \"\"\n\n#: src/trait/drop.md:18\nmsgid \"// This trivial implementation of `drop` adds a print to console.\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:22\nmsgid \"\\\"> Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:27 src/std_misc/path.md:33 src/std_misc/fs.md:44\n#: src/std_misc/fs.md:87\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:29\nmsgid \"// block A\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:31 src/std_misc/path.md:33\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:33\nmsgid \"// block B\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:35 src/std_misc/path.md:36\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:36\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:38\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:40\nmsgid \"\\\"Just exited block B\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:42\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:44\nmsgid \"\\\"Just exited block A\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:46\nmsgid \"// Variable can be manually dropped using the `drop` function\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:48\nmsgid \"// TODO ^ Try commenting this line\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:50\nmsgid \"\\\"end of the main function\\\"\"\nmsgstr \"\"\n\n#: src/trait/drop.md:52\nmsgid \"\"\n\"// `_a` *won't* be `drop`ed again here, because it already has been\\n\"\n\"    // (manually) `drop`ed\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:3\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"trait is used to implement iterators over collections such as arrays.\"\nmsgstr \"\"\n\n#: src/trait/iter.md:6\nmsgid \"\"\n\"The trait requires only a method to be defined for the `next` element, which \"\n\"may be manually defined in an `impl` block or automatically defined (as in \"\n\"arrays and ranges).\"\nmsgstr \"\"\n\n#: src/trait/iter.md:10\nmsgid \"\"\n\"As a point of convenience for common situations, the `for` construct turns \"\n\"some collections into iterators using the [`.into_iter()`](https://doc.rust-\"\n\"lang.org/std/iter/trait.IntoIterator.html) method.\"\nmsgstr \"\"\n\n#: src/trait/iter.md:18\nmsgid \"\"\n\"// Implement `Iterator` for `Fibonacci`.\\n\"\n\"// The `Iterator` trait only requires a method to be defined for the `next` \"\n\"element,\\n\"\n\"// and an `associated type` to declare the return type of the iterator.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:23\nmsgid \"// We can refer to this type using Self::Item\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:26\nmsgid \"\"\n\"// Here, we define the sequence using `.curr` and `.next`.\\n\"\n\"    // The return type is `Option<T>`:\\n\"\n\"    //     * When the `Iterator` is finished, `None` is returned.\\n\"\n\"    //     * Otherwise, the next value is wrapped in `Some` and returned.\\n\"\n\"    // We use Self::Item in the return type, so we can change\\n\"\n\"    // the type without having to update the function signatures.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:38\nmsgid \"\"\n\"// Since there's no endpoint to a Fibonacci sequence, the `Iterator` \\n\"\n\"        // will never return `None`, and `Some` is always returned.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:43\nmsgid \"// Returns a Fibonacci sequence generator\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:50\nmsgid \"// `0..3` is an `Iterator` that generates: 0, 1, and 2.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:53\nmsgid \"\\\"Four consecutive `next` calls on 0..3\\\"\"\nmsgstr \"\"\n\n#: src/trait/iter.md:54 src/trait/iter.md:55 src/trait/iter.md:56\n#: src/trait/iter.md:57 src/std_misc/fs.md:90\nmsgid \"\\\"> {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/iter.md:59\nmsgid \"\"\n\"// `for` works through an `Iterator` until it returns `None`.\\n\"\n\"    // Each `Some` value is unwrapped and bound to a variable (here, `i`).\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:61\nmsgid \"\\\"Iterate through 0..3 using `for`\\\"\"\nmsgstr \"\"\n\n#: src/trait/iter.md:63 src/trait/iter.md:69 src/trait/iter.md:75\n#: src/trait/iter.md:83 src/std/vec.md:50 src/std/str.md:22\n#: src/std_misc/fs.md:82\nmsgid \"\\\"> {}\\\"\"\nmsgstr \"\"\n\n#: src/trait/iter.md:66\nmsgid \"// The `take(n)` method reduces an `Iterator` to its first `n` terms.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:67\nmsgid \"\\\"The first four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\"\n\n#: src/trait/iter.md:72\nmsgid \"\"\n\"// The `skip(n)` method shortens an `Iterator` by dropping its first `n` \"\n\"terms.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:73\nmsgid \"\\\"The next four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\"\n\n#: src/trait/iter.md:80\nmsgid \"// The `iter` method produces an `Iterator` over an array/slice.\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:81\nmsgid \"\\\"Iterate the following array {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:3\nmsgid \"`impl Trait` can be used in two locations:\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:5\nmsgid \"as an argument type\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:6\nmsgid \"as a return type\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:8\nmsgid \"As an argument type\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:10\nmsgid \"\"\n\"If your function is generic over a trait but you don't mind the specific \"\n\"type, you can simplify the function declaration using `impl Trait` as the \"\n\"type of the argument.\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:12\nmsgid \"For example, consider the following code:\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:18 src/trait/impl_trait.md:37\nmsgid \"// For each line in the source\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:20 src/trait/impl_trait.md:39\nmsgid \"\"\n\"// If the line was read successfully, process it, if not, return the error\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40 src/std/str.md:41\nmsgid \"','\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40\nmsgid \"// Split the line separated by commas\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:22 src/trait/impl_trait.md:41\nmsgid \"// Remove leading and trailing whitespace\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:23 src/trait/impl_trait.md:42\nmsgid \"// Collect all strings in a row into a Vec<String>\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:26 src/trait/impl_trait.md:45\nmsgid \"// Collect all lines into a Vec<Vec<String>>\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:30\nmsgid \"\"\n\"`parse_csv_document` is generic, allowing it to take any type which \"\n\"implements BufRead, such as `BufReader<File>` or `[u8]`, but it's not \"\n\"important what type `R` is, and `R` is only used to declare the type of \"\n\"`src`, so the function can also be written as:\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:49\nmsgid \"\"\n\"Note that using `impl Trait` as an argument type means that you cannot \"\n\"explicitly state what form of the function you use, i.e. \"\n\"`parse_csv_document::<std::io::Empty>(std::io::empty())` will not work with \"\n\"the second example.\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:51\nmsgid \"As a return type\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:53\nmsgid \"\"\n\"If your function returns a type that implements `MyTrait`, you can write its \"\n\"return type as `-> impl MyTrait`. This can help simplify your type \"\n\"signatures quite a lot!\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:59\nmsgid \"\"\n\"// This function combines two `Vec<i32>` and returns an iterator over it.\\n\"\n\"// Look how complicated its return type is!\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:68\nmsgid \"\"\n\"// This is the exact same function, but its return type uses `impl Trait`.\\n\"\n\"// Look how much simpler it is!\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:87\nmsgid \"\\\"all done\\\"\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:91\nmsgid \"\"\n\"More importantly, some Rust types can't be written out. For example, every \"\n\"closure has its own unnamed concrete type. Before `impl Trait` syntax, you \"\n\"had to allocate on the heap in order to return a closure. But now you can do \"\n\"it all statically, like this:\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:97\nmsgid \"// Returns a function that adds `y` to its input\\n\"\nmsgstr \"\"\n\n#: src/trait/impl_trait.md:109\nmsgid \"\"\n\"You can also use `impl Trait` to return an iterator that uses `map` or \"\n\"`filter` closures! This makes using `map` and `filter` easier. Because \"\n\"closure types don't have names, you can't write out an explicit return type \"\n\"if your function returns iterators with closures. But with `impl Trait` you \"\n\"can do this easily:\"\nmsgstr \"\"\n\n#: src/trait/clone.md:3\nmsgid \"\"\n\"When dealing with resources, the default behavior is to transfer them during \"\n\"assignments or function calls. However, sometimes we need to make a copy of \"\n\"the resource as well.\"\nmsgstr \"\"\n\n#: src/trait/clone.md:7\nmsgid \"\"\n\"The [`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html) trait \"\n\"helps us do exactly this. Most commonly, we can use the `.clone()` method \"\n\"defined by the `Clone` trait.\"\nmsgstr \"\"\n\n#: src/trait/clone.md:11\nmsgid \"// A unit struct without resources\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:14\nmsgid \"// A tuple struct with resources that implements the `Clone` trait\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:20\nmsgid \"// Instantiate `Unit`\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:22\nmsgid \"// Copy `Unit`, there are no resources to move\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:25\nmsgid \"// Both `Unit`s can be used independently\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:26 src/trait/clone.md:31\nmsgid \"\\\"original: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/clone.md:27\nmsgid \"\\\"copy: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/clone.md:29\nmsgid \"// Instantiate `Pair`\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:33\nmsgid \"// Move `pair` into `moved_pair`, moves resources\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:35\nmsgid \"\\\"moved: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/clone.md:37\nmsgid \"\"\n\"// Error! `pair` has lost its resources\\n\"\n\"    //println!(\\\"original: {:?}\\\", pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:41\nmsgid \"// Clone `moved_pair` into `cloned_pair` (resources are included)\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:43\nmsgid \"// Drop the moved original pair using std::mem::drop\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:46\nmsgid \"\"\n\"// Error! `moved_pair` has been dropped\\n\"\n\"    //println!(\\\"moved and dropped: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:50\nmsgid \"// The result from .clone() can still be used!\\n\"\nmsgstr \"\"\n\n#: src/trait/clone.md:51\nmsgid \"\\\"clone: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/trait/supertraits.md:3\nmsgid \"\"\n\"Rust doesn't have \\\"inheritance\\\", but you can define a trait as being a \"\n\"superset of another trait. For example:\"\nmsgstr \"\"\n\n#: src/trait/supertraits.md:10\nmsgid \"\"\n\"// Person is a supertrait of Student.\\n\"\n\"// Implementing Student requires you to also impl Person.\\n\"\nmsgstr \"\"\n\n#: src/trait/supertraits.md:20\nmsgid \"\"\n\"// CompSciStudent (computer science student) is a subtrait of both \"\n\"Programmer \\n\"\n\"// and Student. Implementing CompSciStudent requires you to impl both \"\n\"supertraits.\\n\"\nmsgstr \"\"\n\n#: src/trait/supertraits.md:29\nmsgid \"\"\n\"\\\"My name is {} and I attend {}. My favorite language is {}. My Git username \"\n\"is {}\\\"\"\nmsgstr \"\"\n\n#: src/trait/supertraits.md:42\nmsgid \"\"\n\"[The Rust Programming Language chapter on supertraits](https://doc.rust-lang.\"\n\"org/book/ch19-03-advanced-traits.html#using-supertraits-to-require-one-\"\n\"traits-functionality-within-another-trait)\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:3\nmsgid \"\"\n\"A type can implement many different traits. What if two traits both require \"\n\"the same name for a function? For example, many traits might have a method \"\n\"named `get()`. They might even have different return types!\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:7\nmsgid \"\"\n\"Good news: because each trait implementation gets its own `impl` block, it's \"\n\"clear which trait's `get` method you're implementing.\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:10\nmsgid \"\"\n\"What about when it comes time to _call_ those methods? To disambiguate \"\n\"between them, we have to use Fully Qualified Syntax.\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:15\nmsgid \"// Get the selected username out of this widget\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:20\nmsgid \"// Get the selected age out of this widget\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:23\nmsgid \"// A form with both a UsernameWidget and an AgeWidget\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:44 src/trait/disambiguating.md:54\nmsgid \"\\\"rustacean\\\"\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:48\nmsgid \"\"\n\"// If you uncomment this line, you'll get an error saying\\n\"\n\"    // \\\"multiple `get` found\\\". Because, after all, there are multiple \"\n\"methods\\n\"\n\"    // named `get`.\\n\"\n\"    // println!(\\\"{}\\\", form.get());\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:62\nmsgid \"\"\n\"[The Rust Programming Language chapter on Fully Qualified syntax](https://\"\n\"doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-\"\n\"for-disambiguation-calling-methods-with-the-same-name)\"\nmsgstr \"\"\n\n#: src/macros.md:1\nmsgid \"`macro_rules!`\"\nmsgstr \"\"\n\n#: src/macros.md:3\nmsgid \"\"\n\"Rust provides a powerful macro system that allows metaprogramming. As you've \"\n\"seen in previous chapters, macros look like functions, except that their \"\n\"name ends with a bang `!`, but instead of generating a function call, macros \"\n\"are expanded into source code that gets compiled with the rest of the \"\n\"program. However, unlike macros in C and other languages, Rust macros are \"\n\"expanded into abstract syntax trees, rather than string preprocessing, so \"\n\"you don't get unexpected precedence bugs.\"\nmsgstr \"\"\n\n#: src/macros.md:11\nmsgid \"Macros are created using the `macro_rules!` macro.\"\nmsgstr \"\"\n\n#: src/macros.md:14\nmsgid \"// This is a simple macro named `say_hello`.\\n\"\nmsgstr \"\"\n\n#: src/macros.md:16\nmsgid \"// `()` indicates that the macro takes no argument.\\n\"\nmsgstr \"\"\n\n#: src/macros.md:18\nmsgid \"// The macro will expand into the contents of this block.\\n\"\nmsgstr \"\"\n\n#: src/macros.md:19\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\"\n\n#: src/macros.md:24\nmsgid \"// This call will expand into `println!(\\\"Hello!\\\")`\\n\"\nmsgstr \"\"\n\n#: src/macros.md:29\nmsgid \"So why are macros useful?\"\nmsgstr \"\"\n\n#: src/macros.md:31\nmsgid \"\"\n\"Don't repeat yourself. There are many cases where you may need similar \"\n\"functionality in multiple places but with different types. Often, writing a \"\n\"macro is a useful way to avoid repeating code. (More on this later)\"\nmsgstr \"\"\n\n#: src/macros.md:35\nmsgid \"\"\n\"Domain-specific languages. Macros allow you to define special syntax for a \"\n\"specific purpose. (More on this later)\"\nmsgstr \"\"\n\n#: src/macros.md:38\nmsgid \"\"\n\"Variadic interfaces. Sometimes you want to define an interface that takes a \"\n\"variable number of arguments. An example is `println!` which could take any \"\n\"number of arguments, depending on the format string. (More on this later)\"\nmsgstr \"\"\n\n#: src/macros/syntax.md:3\nmsgid \"\"\n\"In following subsections, we will show how to define macros in Rust. There \"\n\"are three basic ideas:\"\nmsgstr \"\"\n\n#: src/macros/syntax.md:6\nmsgid \"[Patterns and Designators](designators.md)\"\nmsgstr \"\"\n\n#: src/macros/syntax.md:7\nmsgid \"[Overloading](overload.md)\"\nmsgstr \"\"\n\n#: src/macros/syntax.md:8\nmsgid \"[Repetition](repeat.md)\"\nmsgstr \"\"\n\n#: src/macros/designators.md:3\nmsgid \"\"\n\"The arguments of a macro are prefixed by a dollar sign `$` and type \"\n\"annotated with a _designator_:\"\nmsgstr \"\"\n\n#: src/macros/designators.md:8\nmsgid \"\"\n\"// This macro takes an argument of designator `ident` and\\n\"\n\"    // creates a function named `$func_name`.\\n\"\n\"    // The `ident` designator is used for variable/function names.\\n\"\nmsgstr \"\"\n\n#: src/macros/designators.md:13\nmsgid \"// The `stringify!` macro converts an `ident` into a string.\\n\"\nmsgstr \"\"\n\n#: src/macros/designators.md:14\nmsgid \"\\\"You called {:?}()\\\"\"\nmsgstr \"\"\n\n#: src/macros/designators.md:19\nmsgid \"// Create functions named `foo` and `bar` with the above macro.\\n\"\nmsgstr \"\"\n\n#: src/macros/designators.md:25\nmsgid \"\"\n\"// This macro takes an expression of type `expr` and prints\\n\"\n\"    // it as a string along with its result.\\n\"\n\"    // The `expr` designator is used for expressions.\\n\"\nmsgstr \"\"\n\n#: src/macros/designators.md:29\nmsgid \"// `stringify!` will convert the expression *as it is* into a string.\\n\"\nmsgstr \"\"\n\n#: src/macros/designators.md:30\nmsgid \"\\\"{:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/macros/designators.md:42\nmsgid \"// Recall that blocks are expressions too!\\n\"\nmsgstr \"\"\n\n#: src/macros/designators.md:51\nmsgid \"These are some of the available designators:\"\nmsgstr \"\"\n\n#: src/macros/designators.md:53\nmsgid \"`block`\"\nmsgstr \"\"\n\n#: src/macros/designators.md:54\nmsgid \"`expr` is used for expressions\"\nmsgstr \"\"\n\n#: src/macros/designators.md:55\nmsgid \"`ident` is used for variable/function names\"\nmsgstr \"\"\n\n#: src/macros/designators.md:56\nmsgid \"`item`\"\nmsgstr \"\"\n\n#: src/macros/designators.md:57\nmsgid \"`literal` is used for literal constants\"\nmsgstr \"\"\n\n#: src/macros/designators.md:58\nmsgid \"`pat` (_pattern_)\"\nmsgstr \"\"\n\n#: src/macros/designators.md:59\nmsgid \"`path`\"\nmsgstr \"\"\n\n#: src/macros/designators.md:60\nmsgid \"`stmt` (_statement_)\"\nmsgstr \"\"\n\n#: src/macros/designators.md:61\nmsgid \"`tt` (_token tree_)\"\nmsgstr \"\"\n\n#: src/macros/designators.md:62\nmsgid \"`ty` (_type_)\"\nmsgstr \"\"\n\n#: src/macros/designators.md:63\nmsgid \"`vis` (_visibility qualifier_)\"\nmsgstr \"\"\n\n#: src/macros/designators.md:65\nmsgid \"\"\n\"For a complete list, see the [Rust Reference](https://doc.rust-lang.org/\"\n\"reference/macros-by-example.html).\"\nmsgstr \"\"\n\n#: src/macros/overload.md:3\nmsgid \"\"\n\"Macros can be overloaded to accept different combinations of arguments. In \"\n\"that regard, `macro_rules!` can work similarly to a match block:\"\nmsgstr \"\"\n\n#: src/macros/overload.md:7\nmsgid \"\"\n\"// `test!` will compare `$left` and `$right`\\n\"\n\"// in different ways depending on how you invoke it:\\n\"\nmsgstr \"\"\n\n#: src/macros/overload.md:10\nmsgid \"\"\n\"// Arguments don't need to be separated by a comma.\\n\"\n\"    // Any template can be used!\\n\"\nmsgstr \"\"\n\n#: src/macros/overload.md:13\nmsgid \"\\\"{:?} and {:?} is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/macros/overload.md:18\nmsgid \"// ^ each arm must end with a semicolon.\\n\"\nmsgstr \"\"\n\n#: src/macros/overload.md:20\nmsgid \"\\\"{:?} or {:?} is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/macros/repeat.md:3\nmsgid \"\"\n\"Macros can use `+` in the argument list to indicate that an argument may \"\n\"repeat at least once, or `*`, to indicate that the argument may repeat zero \"\n\"or more times.\"\nmsgstr \"\"\n\n#: src/macros/repeat.md:7\nmsgid \"\"\n\"In the following example, surrounding the matcher with `$(...),+` will match \"\n\"one or more expression, separated by commas. Also note that the semicolon is \"\n\"optional on the last case.\"\nmsgstr \"\"\n\n#: src/macros/repeat.md:12\nmsgid \"// `find_min!` will calculate the minimum of any number of arguments.\\n\"\nmsgstr \"\"\n\n#: src/macros/repeat.md:14\nmsgid \"// Base case:\\n\"\nmsgstr \"\"\n\n#: src/macros/repeat.md:16\nmsgid \"// `$x` followed by at least one `$y,`\\n\"\nmsgstr \"\"\n\n#: src/macros/repeat.md:18\nmsgid \"// Call `find_min!` on the tail `$y`\\n\"\nmsgstr \"\"\n\n#: src/macros/dry.md:3\nmsgid \"\"\n\"Macros allow writing DRY code by factoring out the common parts of functions \"\n\"and/or test suites. Here is an example that implements and tests the `+=`, \"\n\"`*=` and `-=` operators on `Vec<T>`:\"\nmsgstr \"\"\n\n#: src/macros/dry.md:11\nmsgid \"\"\n\"// The `tt` (token tree) designator is used for\\n\"\n\"    // operators and tokens.\\n\"\nmsgstr \"\"\n\n#: src/macros/dry.md:15\nmsgid \"\\\"{:?}: dimension mismatch: {:?} {:?} {:?}\\\"\"\nmsgstr \"\"\n\n#: src/macros/dry.md:30\nmsgid \"// *x = x.$method(*y);\\n\"\nmsgstr \"\"\n\n#: src/macros/dry.md:35\nmsgid \"// Implement `add_assign`, `mul_assign`, and `sub_assign` functions.\\n\"\nmsgstr \"\"\n\n#: src/macros/dry.md:60\nmsgid \"// Test `add_assign`, `mul_assign`, and `sub_assign`.\\n\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:1\nmsgid \"Domain Specific Languages (DSLs)\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:3\nmsgid \"\"\n\"A DSL is a mini \\\"language\\\" embedded in a Rust macro. It is completely \"\n\"valid Rust because the macro system expands into normal Rust constructs, but \"\n\"it looks like a small language. This allows you to define concise or \"\n\"intuitive syntax for some special functionality (within bounds).\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:8\nmsgid \"\"\n\"Suppose that I want to define a little calculator API. I would like to \"\n\"supply an expression and have the output printed to console.\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:15\nmsgid \"// Force types to be unsigned integers\\n\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:16 src/macros/variadics.md:15\nmsgid \"\\\"{} = {}\\\"\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:23\nmsgid \"// hehehe `eval` is _not_ a Rust keyword!\\n\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:32 src/macros/variadics.md:35\nmsgid \"Output:\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:39\nmsgid \"\"\n\"This was a very simple example, but much more complex interfaces have been \"\n\"developed, such as [`lazy_static`](https://crates.io/crates/lazy_static) or \"\n\"[`clap`](https://crates.io/crates/clap).\"\nmsgstr \"\"\n\n#: src/macros/dsl.md:43\nmsgid \"\"\n\"Also, note the two pairs of braces in the macro. The outer ones are part of \"\n\"the syntax of `macro_rules!`, in addition to `()` or `[]`.\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:1\nmsgid \"Variadic Interfaces\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:3\nmsgid \"\"\n\"A _variadic_ interface takes an arbitrary number of arguments. For example, \"\n\"`println!` can take an arbitrary number of arguments, as determined by the \"\n\"format string.\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:7\nmsgid \"\"\n\"We can extend our `calculate!` macro from the previous section to be \"\n\"variadic:\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:11\nmsgid \"// The pattern for a single `eval`\\n\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:14\nmsgid \"// Force types to be integers\\n\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:19\nmsgid \"// Decompose multiple `eval`s recursively\\n\"\nmsgstr \"\"\n\n#: src/macros/variadics.md:27\nmsgid \"// Look ma! Variadic `calculate!`!\\n\"\nmsgstr \"\"\n\n#: src/error.md:3\nmsgid \"\"\n\"Error handling is the process of handling the possibility of failure. For \"\n\"example, failing to read a file and then continuing to use that _bad_ input \"\n\"would clearly be problematic. Noticing and explicitly managing those errors \"\n\"saves the rest of the program from various pitfalls.\"\nmsgstr \"\"\n\n#: src/error.md:8\nmsgid \"\"\n\"There are various ways to deal with errors in Rust, which are described in \"\n\"the following subchapters. They all have more or less subtle differences and \"\n\"different use cases. As a rule of thumb:\"\nmsgstr \"\"\n\n#: src/error.md:12\nmsgid \"\"\n\"An explicit `panic` is mainly useful for tests and dealing with \"\n\"unrecoverable errors. For prototyping it can be useful, for example when \"\n\"dealing with functions that haven't been implemented yet, but in those cases \"\n\"the more descriptive `unimplemented` is better. In tests `panic` is a \"\n\"reasonable way to explicitly fail.\"\nmsgstr \"\"\n\n#: src/error.md:17\nmsgid \"\"\n\"The `Option` type is for when a value is optional or when the lack of a \"\n\"value is not an error condition. For example the parent of a directory - `/` \"\n\"and `C:` don't have one. When dealing with `Option`s, `unwrap` is fine for \"\n\"prototyping and cases where it's absolutely certain that there is guaranteed \"\n\"to be a value. However `expect` is more useful since it lets you specify an \"\n\"error message in case something goes wrong anyway.\"\nmsgstr \"\"\n\n#: src/error.md:24\nmsgid \"\"\n\"When there is a chance that things do go wrong and the caller has to deal \"\n\"with the problem, use `Result`. You can `unwrap` and `expect` them as well \"\n\"(please don't do that unless it's a test or quick prototype).\"\nmsgstr \"\"\n\n#: src/error.md:28\nmsgid \"\"\n\"For a more rigorous discussion of error handling, refer to the error \"\n\"handling section in the [official book](https://doc.rust-lang.org/book/\"\n\"ch09-00-error-handling.html).\"\nmsgstr \"\"\n\n#: src/error/panic.md:3\nmsgid \"\"\n\"The simplest error handling mechanism we will see is `panic`. It prints an \"\n\"error message, starts unwinding the stack, and usually exits the program. \"\n\"Here, we explicitly call `panic` on our error condition:\"\nmsgstr \"\"\n\n#: src/error/panic.md:9 src/error/abort_unwind.md:9\nmsgid \"// You shouldn't drink too much sugary beverages.\\n\"\nmsgstr \"\"\n\n#: src/error/panic.md:10 src/error/panic.md:17 src/error/abort_unwind.md:10\n#: src/error/abort_unwind.md:23 src/error/abort_unwind.md:41\n#: src/error/abort_unwind.md:50 src/error/option_unwrap.md:32\n#: src/error/option_unwrap.md:43 src/error/option_unwrap.md:50\nmsgid \"\\\"lemonade\\\"\"\nmsgstr \"\"\n\n#: src/error/panic.md:10 src/error/option_unwrap.md:43\nmsgid \"\\\"AAAaaaaa!!!!\\\"\"\nmsgstr \"\"\n\n#: src/error/panic.md:12 src/error/abort_unwind.md:17\n#: src/error/abort_unwind.md:44\nmsgid \"\\\"Some refreshing {} is all I need.\\\"\"\nmsgstr \"\"\n\n#: src/error/panic.md:16 src/error/abort_unwind.md:22\n#: src/error/abort_unwind.md:49 src/error/option_unwrap.md:49\nmsgid \"\\\"water\\\"\"\nmsgstr \"\"\n\n#: src/error/panic.md:18\nmsgid \"\\\"still water\\\"\"\nmsgstr \"\"\n\n#: src/error/panic.md:22\nmsgid \"\"\n\"The first call to `drink` works. The second panics and thus the third is \"\n\"never called.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:1\nmsgid \"`abort` and `unwind`\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:3\nmsgid \"\"\n\"The previous section illustrates the error handling mechanism `panic`.  \"\n\"Different code paths can be conditionally compiled based on the panic \"\n\"setting. The current values available are `unwind` and `abort`.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:5\nmsgid \"\"\n\"Building on the prior lemonade example, we explicitly use the panic strategy \"\n\"to exercise different lines of code.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:11\nmsgid \"\\\"abort\\\"\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:12 src/error/abort_unwind.md:37\nmsgid \"\\\"This is not your party. Run!!!!\\\"\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:14 src/error/abort_unwind.md:32\nmsgid \"\\\"Spit it out!!!!\\\"\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:27\nmsgid \"\"\n\"Here is another example focusing on rewriting `drink()` and explicitly use \"\n\"the `unwind` keyword.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:30 src/error/abort_unwind.md:35\nmsgid \"\\\"unwind\\\"\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:54\nmsgid \"\"\n\"The panic strategy can be set from the command line by using `abort` or \"\n\"`unwind`.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:3\nmsgid \"\"\n\"In the last example, we showed that we can induce program failure at will. \"\n\"We told our program to `panic` if we drink a sugary lemonade. But what if we \"\n\"expect _some_ drink but don't receive one? That case would be just as bad, \"\n\"so it needs to be handled!\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:8\nmsgid \"\"\n\"We _could_ test this against the null string (`\\\"\\\"`) as we do with a \"\n\"lemonade. Since we're using Rust, let's instead have the compiler point out \"\n\"cases where there's no drink.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:12\nmsgid \"\"\n\"An `enum` called `Option<T>` in the `std` library is used when absence is a \"\n\"possibility. It manifests itself as one of two \\\"options\\\":\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:15\nmsgid \"`Some(T)`: An element of type `T` was found\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:16\nmsgid \"`None`: No element was found\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:18\nmsgid \"\"\n\"These cases can either be explicitly handled via `match` or implicitly with \"\n\"`unwrap`. Implicit handling will either return the inner element or `panic`.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:21\nmsgid \"\"\n\"Note that it's possible to manually customize `panic` with [expect](https://\"\n\"doc.rust-lang.org/std/option/enum.Option.html#method.expect), but `unwrap` \"\n\"otherwise leaves us with a less meaningful output than explicit handling. In \"\n\"the following example, explicit handling yields a more controlled result \"\n\"while retaining the option to `panic` if desired.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:27\nmsgid \"\"\n\"// The adult has seen it all, and can handle any drink well.\\n\"\n\"// All drinks are handled explicitly using `match`.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:30\nmsgid \"// Specify a course of action for each case.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:32\nmsgid \"\\\"Yuck! Too sugary.\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:33\nmsgid \"\\\"{}? How nice.\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:34\nmsgid \"\\\"No drink? Oh well.\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:37\nmsgid \"\"\n\"// Others will `panic` before drinking sugary drinks.\\n\"\n\"// All drinks are handled implicitly using `unwrap`.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:41\nmsgid \"// `unwrap` returns a `panic` when it receives a `None`.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:45\nmsgid \"\\\"I love {}s!!!!!\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:57\nmsgid \"\\\"coffee\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/question_mark.md:3\nmsgid \"\"\n\"You can unpack `Option`s by using `match` statements, but it's often easier \"\n\"to use the `?` operator. If `x` is an `Option`, then evaluating `x?` will \"\n\"return the underlying value if `x` is `Some`, otherwise it will terminate \"\n\"whatever function is being executed and return `None`.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/question_mark.md:10\nmsgid \"\"\n\"// If `current_age` is `None`, this returns `None`.\\n\"\n\"    // If `current_age` is `Some`, the inner `u8` value + 1\\n\"\n\"    // gets assigned to `next_age`\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/question_mark.md:14\nmsgid \"\\\"Next year I will be {}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/question_mark.md:18\nmsgid \"You can chain many `?`s together to make your code much more readable.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/question_mark.md:38\nmsgid \"\"\n\"// Gets the area code of the phone number of the person's job, if it \"\n\"exists.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/question_mark.md:40\nmsgid \"\"\n\"// This would need many nested `match` statements without the `?` operator.\\n\"\n\"        // It would take a lot more code - try writing it yourself and see \"\n\"which\\n\"\n\"        // is easier.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:3\nmsgid \"\"\n\"`match` is a valid method for handling `Option`s. However, you may \"\n\"eventually find heavy usage tedious, especially with operations only valid \"\n\"with an input. In these cases, [combinators](https://doc.rust-lang.org/\"\n\"reference/glossary.html#combinator) can be used to manage control flow in a \"\n\"modular fashion.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:8\nmsgid \"\"\n\"`Option` has a built in method called `map()`, a combinator for the simple \"\n\"mapping of `Some -> Some` and `None -> None`. Multiple `map()` calls can be \"\n\"chained together for even more flexibility.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:12\nmsgid \"\"\n\"In the following example, `process()` replaces all functions previous to it \"\n\"while staying compact.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:23\nmsgid \"\"\n\"// Peeling food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the peeled food.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:32\nmsgid \"\"\n\"// Chopping food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the chopped food.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:41\nmsgid \"\"\n\"// Cooking food. Here, we showcase `map()` instead of `match` for case \"\n\"handling.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:46\nmsgid \"\"\n\"// A function to peel, chop, and cook food all in sequence.\\n\"\n\"// We chain multiple uses of `map()` to simplify the code.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:54\nmsgid \"// Check whether there's food or not before trying to eat it!\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:58\nmsgid \"\\\"Mmm. I love {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:59\nmsgid \"\\\"Oh no! It wasn't edible.\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:70\nmsgid \"// Let's try the simpler looking `process()` now.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/map.md:81\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:3\nmsgid \"\"\n\"`map()` was described as a chainable way to simplify `match` statements. \"\n\"However, using `map()` on a function that returns an `Option<T>` results in \"\n\"the nested `Option<Option<T>>`. Chaining multiple calls together can then \"\n\"become confusing. That's where another combinator called `and_then()`, known \"\n\"in some languages as flatmap, comes in.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:9\nmsgid \"\"\n\"`and_then()` calls its function input with the wrapped value and returns the \"\n\"result. If the `Option` is `None`, then it returns `None` instead.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:11\nmsgid \"\"\n\"In the following example, `cookable_v3()` results in an `Option<Food>`. \"\n\"Using `map()` instead of `and_then()` would have given an \"\n\"`Option<Option<Food>>`, which is an invalid type for `eat()`.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:20\nmsgid \"// We don't have the ingredients to make Sushi.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:28\nmsgid \"// We have the recipe for everything except Cordon Bleu.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:36\nmsgid \"\"\n\"// To make a dish, we need both the recipe and the ingredients.\\n\"\n\"// We can represent the logic with a chain of `match`es:\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:45\nmsgid \"\"\n\"// This can conveniently be rewritten more compactly with `and_then()`:\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:50\nmsgid \"\"\n\"// Otherwise we'd need to `flatten()` an `Option<Option<Food>>`\\n\"\n\"// to get an `Option<Food>`:\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:59\nmsgid \"\\\"Yay! On {:?} we get to eat {:?}.\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:60\nmsgid \"\\\"Oh no. We don't get to eat on {:?}?\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:75\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then), and [`Option::flatten()`]\"\n\"(https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:1\nmsgid \"Unpacking options and defaults\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:3\nmsgid \"\"\n\"There is more than one way to unpack an `Option` and fall back on a default \"\n\"if it is `None`. To choose the one that meets our needs, we need to consider \"\n\"the following:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:5\nmsgid \"do we need eager or lazy evaluation?\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:6\nmsgid \"\"\n\"do we need to keep the original empty value intact, or modify it in place?\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:8\nmsgid \"`or()` is chainable, evaluates eagerly, keeps empty value intact\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:10\nmsgid \"\"\n\"`or()`is chainable and eagerly evaluates its argument, as is shown in the \"\n\"following example. Note that because `or`'s arguments are evaluated eagerly, \"\n\"the variable passed to `or` is moved.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:22\n#: src/error/option_unwrap/defaults.md:55\nmsgid \"\\\"first_available_fruit: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:23\nmsgid \"// first_available_fruit: Some(Orange)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:25\nmsgid \"\"\n\"// `or` moves its argument.\\n\"\n\"    // In the example above, `or(orange)` returned a `Some`, so `or(apple)` \"\n\"was not invoked.\\n\"\n\"    // But the variable named `apple` has been moved regardless, and cannot \"\n\"be used anymore.\\n\"\n\"    // println!(\\\"Variable apple was moved, so this line won't compile: \"\n\"{:?}\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:33\nmsgid \"`or_else()` is chainable, evaluates lazily, keeps empty value intact\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:35\nmsgid \"\"\n\"Another alternative is to use `or_else`, which is also chainable, and \"\n\"evaluates lazily, as is shown in the following example:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:44\nmsgid \"\\\"Providing kiwi as fallback\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:48\n#: src/error/option_unwrap/defaults.md:93\nmsgid \"\\\"Providing lemon as fallback\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:56\nmsgid \"\"\n\"// Providing kiwi as fallback\\n\"\n\"    // first_available_fruit: Some(Kiwi)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:61\nmsgid \"`get_or_insert()` evaluates eagerly, modifies empty value in place\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:63\nmsgid \"\"\n\"To make sure that an `Option` contains a value, we can use `get_or_insert` \"\n\"to modify it in place with a fallback value, as is shown in the following \"\n\"example. Note that `get_or_insert` eagerly evaluates its parameter, so \"\n\"variable `apple` is moved:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:73\n#: src/error/option_unwrap/defaults.md:98\nmsgid \"\\\"first_available_fruit is: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:74\n#: src/error/option_unwrap/defaults.md:99\nmsgid \"\\\"my_fruit is: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:75\nmsgid \"\"\n\"// first_available_fruit is: Apple\\n\"\n\"    // my_fruit is: Some(Apple)\\n\"\n\"    //println!(\\\"Variable named `apple` is moved: {:?}\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:82\nmsgid \"`get_or_insert_with()` evaluates lazily, modifies empty value in place\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:84\nmsgid \"\"\n\"Instead of explicitly providing a value to fall back on, we can pass a \"\n\"closure to `get_or_insert_with`, as follows:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:100\nmsgid \"\"\n\"// Providing lemon as fallback\\n\"\n\"    // first_available_fruit is: Lemon\\n\"\n\"    // my_fruit is: Some(Lemon)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:104\nmsgid \"\"\n\"// If the Option has a value, it is left unchanged, and the closure is not \"\n\"invoked\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:107\nmsgid \"\\\"should_be_apple is: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:108\nmsgid \"\\\"my_apple is unchanged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:109\nmsgid \"\"\n\"// The output is a follows. Note that the closure `get_lemon_as_fallback` is \"\n\"not invoked\\n\"\n\"    // should_be_apple is: Apple\\n\"\n\"    // my_apple is unchanged: Some(Apple)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:117\nmsgid \"\"\n\"[`closures`](https://doc.rust-lang.org/book/ch13-01-closures.html), \"\n\"[`get_or_insert`](https://doc.rust-lang.org/core/option/enum.Option.\"\n\"html#method.get_or_insert), [`get_or_insert_with`](https://doc.rust-lang.org/\"\n\"core/option/enum.Option.html#method.get_or_insert_with), [`moved variables`]\"\n\"(https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html), \"\n\"[`or`](https://doc.rust-lang.org/core/option/enum.Option.html#method.or), \"\n\"[`or_else`](https://doc.rust-lang.org/core/option/enum.Option.html#method.\"\n\"or_else)\"\nmsgstr \"\"\n\n#: src/error/result.md:3\nmsgid \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html) is a \"\n\"richer version of the [`Option`](https://doc.rust-lang.org/std/option/enum.\"\n\"Option.html) type that describes possible _error_ instead of possible \"\n\"_absence_.\"\nmsgstr \"\"\n\n#: src/error/result.md:6\nmsgid \"That is, `Result<T, E>` could have one of two outcomes:\"\nmsgstr \"\"\n\n#: src/error/result.md:8\nmsgid \"`Ok(T)`: An element `T` was found\"\nmsgstr \"\"\n\n#: src/error/result.md:9\nmsgid \"`Err(E)`: An error was found with element `E`\"\nmsgstr \"\"\n\n#: src/error/result.md:11\nmsgid \"\"\n\"By convention, the expected outcome is `Ok` while the unexpected outcome is \"\n\"`Err`.\"\nmsgstr \"\"\n\n#: src/error/result.md:13\nmsgid \"\"\n\"Like `Option`, `Result` has many methods associated with it. `unwrap()`, for \"\n\"example, either yields the element `T` or `panic`s. For case handling, there \"\n\"are many combinators between `Result` and `Option` that overlap.\"\nmsgstr \"\"\n\n#: src/error/result.md:17\nmsgid \"\"\n\"In working with Rust, you will likely encounter methods that return the \"\n\"`Result` type, such as the [`parse()`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) method. It might not always be possible to \"\n\"parse a string into the other type, so `parse()` returns a `Result` \"\n\"indicating possible failure.\"\nmsgstr \"\"\n\n#: src/error/result.md:22\nmsgid \"\"\n\"Let's see what happens when we successfully and unsuccessfully `parse()` a \"\n\"string:\"\nmsgstr \"\"\n\n#: src/error/result.md:26\nmsgid \"// Let's try using `unwrap()` to get the number out. Will it bite us?\\n\"\nmsgstr \"\"\n\n#: src/error/result.md:33 src/error/result.md:36\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:75 src/error/result/result_map.md:79\n#: src/error/result/result_alias.md:36 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:36 src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:67\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/error/result.md:34 src/error/result.md:37\nmsgid \"\\\"double is {}\\\"\"\nmsgstr \"\"\n\n#: src/error/result.md:36 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:79 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"t\\\"\"\nmsgstr \"\"\n\n#: src/error/result.md:41\nmsgid \"\"\n\"In the unsuccessful case, `parse()` leaves us with an error for `unwrap()` \"\n\"to `panic` on. Additionally, the `panic` exits our program and provides an \"\n\"unpleasant error message.\"\nmsgstr \"\"\n\n#: src/error/result.md:45\nmsgid \"\"\n\"To improve the quality of our error message, we should be more specific \"\n\"about the return type and consider explicitly handling the error.\"\nmsgstr \"\"\n\n#: src/error/result.md:48\nmsgid \"Using `Result` in `main`\"\nmsgstr \"\"\n\n#: src/error/result.md:50\nmsgid \"\"\n\"The `Result` type can also be the return type of the `main` function if \"\n\"specified explicitly. Typically the `main` function will be of the form:\"\nmsgstr \"\"\n\n#: src/error/result.md:59\nmsgid \"\"\n\"However `main` is also able to have a return type of `Result`. If an error \"\n\"occurs within the `main` function it will return an error code and print a \"\n\"debug representation of the error (using the [`Debug`](https://doc.rust-lang.\"\n\"org/std/fmt/trait.Debug.html) trait). The following example shows such a \"\n\"scenario and touches on aspects covered in [the following section](result/\"\n\"early_returns.md).\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:3\nmsgid \"\"\n\"Panicking in the previous example's `multiply` does not make for robust \"\n\"code. Generally, we want to return the error to the caller so it can decide \"\n\"what is the right way to respond to errors.\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:7\nmsgid \"\"\n\"We first need to know what kind of error type we are dealing with. To \"\n\"determine the `Err` type, we look to [`parse()`](https://doc.rust-lang.org/\"\n\"std/primitive.str.html#method.parse), which is implemented with the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"[`i32`](https://doc.rust-lang.org/std/primitive.i32.html). As a result, the \"\n\"`Err` type is specified as [`ParseIntError`](https://doc.rust-lang.org/std/\"\n\"num/struct.ParseIntError.html).\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:12\nmsgid \"\"\n\"In the example below, the straightforward `match` statement leads to code \"\n\"that is overall more cumbersome.\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:17\nmsgid \"\"\n\"// With the return type rewritten, we use pattern matching without \"\n\"`unwrap()`.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:35 src/error/result/result_map.md:68\n#: src/error/result/result_alias.md:30 src/error/result/early_returns.md:30\n#: src/error/result/enter_question_mark.md:28\n#: src/error/result/enter_question_mark.md:61\nmsgid \"\\\"n is {}\\\"\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:36 src/error/result/result_map.md:69\n#: src/error/result/result_alias.md:31 src/error/result/early_returns.md:31\n#: src/error/result/enter_question_mark.md:29\n#: src/error/result/enter_question_mark.md:62\n#: src/error/multiple_error_types/define_error_type.md:55\n#: src/error/multiple_error_types/boxing_errors.md:42\n#: src/error/multiple_error_types/reenter_question_mark.md:54\n#: src/error/multiple_error_types/wrap_error.md:68\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:41 src/error/result/result_map.md:74\nmsgid \"// This still presents a reasonable answer.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:45 src/error/result/result_map.md:78\nmsgid \"// The following now provides a much more helpful error message.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:51\nmsgid \"\"\n\"Luckily, `Option`'s `map`, `and_then`, and many other combinators are also \"\n\"implemented for `Result`. [`Result`](https://doc.rust-lang.org/std/result/\"\n\"enum.Result.html) contains a complete listing.\"\nmsgstr \"\"\n\n#: src/error/result/result_map.md:56\nmsgid \"\"\n\"// As with `Option`, we can use combinators such as `map()`.\\n\"\n\"// This function is otherwise identical to the one above and reads:\\n\"\n\"// Multiply if both values can be parsed from str, otherwise pass on the \"\n\"error.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:3\nmsgid \"\"\n\"How about when we want to reuse a specific `Result` type many times? Recall \"\n\"that Rust allows us to create [aliases](../../types/alias.md). Conveniently, \"\n\"we can define one for the specific `Result` in question.\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:7\nmsgid \"\"\n\"At a module level, creating aliases can be particularly helpful. Errors \"\n\"found in a specific module often have the same `Err` type, so a single alias \"\n\"can succinctly define _all_ associated `Results`. This is so useful that the \"\n\"`std` library even supplies one: [`io::Result`](https://doc.rust-lang.org/\"\n\"std/io/type.Result.html)!\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:12\nmsgid \"Here's a quick example to show off the syntax:\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:16\nmsgid \"\"\n\"// Define a generic alias for a `Result` with the error type \"\n\"`ParseIntError`.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:19\nmsgid \"// Use the above alias to refer to our specific `Result` type.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:26\nmsgid \"// Here, the alias again allows us to save some space.\\n\"\nmsgstr \"\"\n\n#: src/error/result/result_alias.md:43\nmsgid \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\nmsgstr \"\"\n\n#: src/error/result/early_returns.md:3\nmsgid \"\"\n\"In the previous example, we explicitly handled the errors using combinators. \"\n\"Another way to deal with this case analysis is to use a combination of \"\n\"`match` statements and _early returns_.\"\nmsgstr \"\"\n\n#: src/error/result/early_returns.md:7\nmsgid \"\"\n\"That is, we can simply stop executing the function and return the error if \"\n\"one occurs. For some, this form of code can be easier to both read and \"\n\"write. Consider this version of the previous example, rewritten using early \"\n\"returns:\"\nmsgstr \"\"\n\n#: src/error/result/early_returns.md:41\nmsgid \"\"\n\"At this point, we've learned to explicitly handle errors using combinators \"\n\"and early returns. While we generally want to avoid panicking, explicitly \"\n\"handling all of our errors is cumbersome.\"\nmsgstr \"\"\n\n#: src/error/result/early_returns.md:45\nmsgid \"\"\n\"In the next section, we'll introduce `?` for the cases where we simply need \"\n\"to `unwrap` without possibly inducing `panic`.\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:3\nmsgid \"\"\n\"Sometimes we just want the simplicity of `unwrap` without the possibility of \"\n\"a `panic`. Until now, `unwrap` has forced us to nest deeper and deeper when \"\n\"what we really wanted was to get the variable _out_. This is exactly the \"\n\"purpose of `?`.\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:7\nmsgid \"Upon finding an `Err`, there are two valid actions to take:\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:9\nmsgid \"`panic!` which we already decided to try to avoid if possible\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:10\nmsgid \"`return` because an `Err` means it cannot be handled\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:12\nmsgid \"\"\n\"`?` is _almost_[^†] exactly equivalent to an `unwrap` which `return`s \"\n\"instead of `panic`king on `Err`s. Let's see how we can simplify the earlier \"\n\"example that used combinators:\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:39\nmsgid \"The `try!` macro\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:41\nmsgid \"\"\n\"Before there was `?`, the same functionality was achieved with the `try!` \"\n\"macro. The `?` operator is now recommended, but you may still find `try!` \"\n\"when looking at older code. The same `multiply` function from the previous \"\n\"example would look like this using `try!`:\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:47\nmsgid \"\"\n\"// To compile and run this example without errors, while using Cargo, change \"\n\"the value \\n\"\n\"// of the `edition` field, in the `[package]` section of the `Cargo.toml` \"\n\"file, to \\\"2015\\\".\\n\"\nmsgstr \"\"\n\n#: src/error/result/enter_question_mark.md:72\nmsgid \"\"\n\"See [re-enter ?](../multiple_error_types/reenter_question_mark.md) for more \"\n\"details.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:3\nmsgid \"\"\n\"The previous examples have always been very convenient; `Result`s interact \"\n\"with other `Result`s and `Option`s interact with other `Option`s.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:6\nmsgid \"\"\n\"Sometimes an `Option` needs to interact with a `Result`, or a `Result<T, \"\n\"Error1>` needs to interact with a `Result<T, Error2>`. In those cases, we \"\n\"want to manage our different error types in a way that makes them composable \"\n\"and easy to interact with.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:11\nmsgid \"\"\n\"In the following code, two instances of `unwrap` generate different error \"\n\"types. `Vec::first` returns an `Option`, while `parse::<i32>` returns a \"\n\"`Result<i32, ParseIntError>`:\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:17\nmsgid \"// Generate error 1\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:18\nmsgid \"// Generate error 2\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:22\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/wrap_error.md:77 src/error/iter_result.md:40\nmsgid \"\\\"42\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"93\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"18\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"tofu\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:26 src/error/multiple_error_types.md:28\n#: src/error/multiple_error_types.md:31\n#: src/error/multiple_error_types/define_error_type.md:54\n#: src/error/multiple_error_types/boxing_errors.md:41\n#: src/error/multiple_error_types/reenter_question_mark.md:53\n#: src/error/multiple_error_types/wrap_error.md:66\nmsgid \"\\\"The first doubled is {}\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:29\n#: src/error/multiple_error_types/option_result.md:23\nmsgid \"// Error 1: the input vector is empty\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:32\n#: src/error/multiple_error_types/option_result.md:26\nmsgid \"// Error 2: the element doesn't parse to a number\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types.md:36\nmsgid \"\"\n\"Over the next sections, we'll see several strategies for handling these kind \"\n\"of problems.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/option_result.md:3\nmsgid \"\"\n\"The most basic way of handling mixed error types is to just embed them in \"\n\"each other.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/option_result.md:20\n#: src/error/multiple_error_types/option_result.md:22\n#: src/error/multiple_error_types/option_result.md:25\n#: src/error/multiple_error_types/option_result.md:49\n#: src/error/multiple_error_types/option_result.md:50\n#: src/error/multiple_error_types/option_result.md:51\nmsgid \"\\\"The first doubled is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/option_result.md:30\nmsgid \"\"\n\"There are times when we'll want to stop processing on errors (like with [`?`]\"\n\"(../result/enter_question_mark.md)) but keep going when the `Option` is \"\n\"`None`. The `transpose` function comes in handy to swap the `Result` and \"\n\"`Option`.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:3\nmsgid \"\"\n\"Sometimes it simplifies the code to mask all of the different errors with a \"\n\"single type of error.  We'll show this with a custom error.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:6\nmsgid \"\"\n\"Rust allows us to define our own error types. In general, a \\\"good\\\" error \"\n\"type:\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:8\nmsgid \"Represents different errors with the same type\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:9\nmsgid \"Presents nice error messages to the user\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:10\nmsgid \"Is easy to compare with other types\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:11\nmsgid \"Good: `Err(EmptyVec)`\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:12\nmsgid \"\"\n\"Bad: `Err(\\\"Please use a vector with at least one element\\\".to_owned())`\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:13\nmsgid \"Can hold information about the error\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:14\nmsgid \"Good: `Err(BadChar(c, position))`\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:15\nmsgid \"Bad: `Err(\\\"+ cannot be used here\\\".to_owned())`\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:16\nmsgid \"Composes well with other errors\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:22\nmsgid \"\"\n\"// Define our error types. These may be customized for our error handling \"\n\"cases.\\n\"\n\"// Now we will be able to write our own errors, defer to an underlying \"\n\"error\\n\"\n\"// implementation, or do something in between.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:28\nmsgid \"\"\n\"// Generation of an error is completely separate from how it is displayed.\\n\"\n\"// There's no need to be concerned about cluttering complex logic with the \"\n\"display style.\\n\"\n\"//\\n\"\n\"// Note that we don't store any extra info about the errors. This means we \"\n\"can't state\\n\"\n\"// which string failed to parse without modifying our types to carry that \"\n\"information.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:36\n#: src/error/multiple_error_types/boxing_errors.md:23\n#: src/error/multiple_error_types/reenter_question_mark.md:37\nmsgid \"\\\"invalid first item to double\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:42\nmsgid \"// Change the error to our new type.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/define_error_type.md:46\nmsgid \"// Update to the new error type here also.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/boxing_errors.md:3\nmsgid \"\"\n\"A way to write simple code while preserving the original errors is to [`Box`]\"\n\"(https://doc.rust-lang.org/std/boxed/struct.Box.html) them.  The drawback is \"\n\"that the underlying error type is only known at runtime and not [statically \"\n\"determined](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#trait-\"\n\"objects-perform-dynamic-dispatch).\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/boxing_errors.md:7\nmsgid \"\"\n\"The stdlib helps in boxing our errors by having `Box` implement conversion \"\n\"from any type that implements the `Error` trait into the trait object \"\n\"`Box<Error>`, via [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/boxing_errors.md:14\n#: src/error/multiple_error_types/reenter_question_mark.md:28\nmsgid \"// Change the alias to use `Box<dyn error::Error>`.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/boxing_errors.md:31\n#: src/error/multiple_error_types/boxing_errors.md:34\nmsgid \"// Converts to Box\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/boxing_errors.md:59\nmsgid \"\"\n\"[Dynamic dispatch](https://doc.rust-lang.org/book/ch17-02-trait-objects.\"\n\"html#trait-objects-perform-dynamic-dispatch) and [`Error` trait](https://doc.\"\n\"rust-lang.org/std/error/trait.Error.html)\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:3\nmsgid \"\"\n\"Notice in the previous example that our immediate reaction to calling \"\n\"`parse` is to `map` the error from a library error into a boxed error:\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:12\nmsgid \"\"\n\"Since this is a simple and common operation, it would be convenient if it \"\n\"could be elided. Alas, because `and_then` is not sufficiently flexible, it \"\n\"cannot. However, we can instead use `?`.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:16\nmsgid \"\"\n\"`?` was previously explained as either `unwrap` or `return Err(err)`. This \"\n\"is only mostly true. It actually means `unwrap` or `return Err(From::\"\n\"from(err))`. Since `From::from` is a conversion utility between different \"\n\"types, this means that if you `?` where the error is convertible to the \"\n\"return type, it will convert automatically.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:22\nmsgid \"\"\n\"Here, we rewrite the previous example using `?`. As a result, the `map_err` \"\n\"will go away when `From::from` is implemented for our error type:\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:42\nmsgid \"\"\n\"// The same structure as before but rather than chain all `Results`\\n\"\n\"// and `Options` along, we `?` to get the inner value out immediately.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:69\nmsgid \"\"\n\"This is actually fairly clean now. Compared with the original `panic`, it is \"\n\"very similar to replacing the `unwrap` calls with `?` except that the return \"\n\"types are `Result`. As a result, they must be destructured at the top level.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:76\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`?\"\n\"`](https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:3\nmsgid \"An alternative to boxing errors is to wrap them in your own error type.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:16\nmsgid \"\"\n\"// We will defer to the parse error implementation for their error.\\n\"\n\"    // Supplying extra info requires adding more data to the type.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:25\nmsgid \"\\\"please use a vector with at least one element\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:26\nmsgid \"\"\n\"// The wrapped error contains additional information and is available\\n\"\n\"            // via the source() method.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:29\nmsgid \"\\\"the provided string could not be parsed as int\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:38\nmsgid \"\"\n\"// The cause is the underlying implementation error type. Is implicitly\\n\"\n\"            // cast to the trait object `&error::Error`. This works because \"\n\"the\\n\"\n\"            // underlying type already implements the `Error` trait.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:45\nmsgid \"\"\n\"// Implement the conversion from `ParseIntError` to `DoubleError`.\\n\"\n\"// This will be automatically called by `?` if a `ParseIntError`\\n\"\n\"// needs to be converted into a `DoubleError`.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:57\nmsgid \"\"\n\"// Here we implicitly use the `ParseIntError` implementation of `From` \"\n\"(which\\n\"\n\"    // we defined above) in order to create a `DoubleError`.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:70\nmsgid \"\\\"  Caused by: {}\\\"\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:87\nmsgid \"\"\n\"This adds a bit more boilerplate for handling errors and might not be needed \"\n\"in all applications. There are some libraries that can take care of the \"\n\"boilerplate for you.\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:93\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Enums`](../../custom_types/enum.md)\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:95\nmsgid \"\"\n\"[`Crates for handling errors`](https://crates.io/keywords/error-handling)\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:3\nmsgid \"An `Iter::map` operation might fail, for example:\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:12 src/error/iter_result.md:29\n#: src/error/iter_result.md:65\nmsgid \"\\\"Results: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:16\nmsgid \"Let's step through strategies for handling this.\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:18\nmsgid \"Ignore the failed items with `filter_map()`\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:20\nmsgid \"\"\n\"`filter_map` calls a function and filters out the results that are `None`.\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:33\nmsgid \"Collect the failed items with `map_err()` and `filter_map()`\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:35\nmsgid \"\"\n\"`map_err` calls a function with the error, so by adding that to the previous \"\n\"`filter_map` solution we can save them off to the side while iterating.\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:40\nmsgid \"\\\"999\\\"\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:47 src/error/iter_result.md:80\n#: src/error/iter_result.md:97\nmsgid \"\\\"Numbers: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:48 src/error/iter_result.md:81\n#: src/error/iter_result.md:98\nmsgid \"\\\"Errors: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:52\nmsgid \"Fail the entire operation with `collect()`\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:54\nmsgid \"\"\n\"`Result` implements `FromIterator` so that a vector of results \"\n\"(`Vec<Result<T, E>>`) can be turned into a result with a vector \"\n\"(`Result<Vec<T>, E>`). Once an `Result::Err` is found, the iteration will \"\n\"terminate.\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:69\nmsgid \"This same technique can be used with `Option`.\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:71\nmsgid \"Collect all valid values and failures with `partition()`\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:85\nmsgid \"\"\n\"When you look at the results, you'll note that everything is still wrapped \"\n\"in `Result`.  A little more boilerplate is needed for this.\"\nmsgstr \"\"\n\n#: src/std.md:3\nmsgid \"\"\n\"The `std` library provides many custom types which expands drastically on \"\n\"the `primitives`. Some of these include:\"\nmsgstr \"\"\n\n#: src/std.md:6\nmsgid \"growable `String`s like: `\\\"hello world\\\"`\"\nmsgstr \"\"\n\n#: src/std.md:7\nmsgid \"growable vectors: `[1, 2, 3]`\"\nmsgstr \"\"\n\n#: src/std.md:8\nmsgid \"optional types: `Option<i32>`\"\nmsgstr \"\"\n\n#: src/std.md:9\nmsgid \"error handling types: `Result<i32, i32>`\"\nmsgstr \"\"\n\n#: src/std.md:10\nmsgid \"heap allocated pointers: `Box<i32>`\"\nmsgstr \"\"\n\n#: src/std.md:14 src/std_misc.md:14\nmsgid \"\"\n\"[primitives](primitives.md) and [the std library](https://doc.rust-lang.org/\"\n\"std/)\"\nmsgstr \"\"\n\n#: src/std/box.md:3\nmsgid \"\"\n\"All values in Rust are stack allocated by default. Values can be _boxed_ \"\n\"(allocated on the heap) by creating a `Box<T>`. A box is a smart pointer to \"\n\"a heap allocated value of type `T`. When a box goes out of scope, its \"\n\"destructor is called, the inner object is destroyed, and the memory on the \"\n\"heap is freed.\"\nmsgstr \"\"\n\n#: src/std/box.md:8\nmsgid \"\"\n\"Boxed values can be dereferenced using the `*` operator; this removes one \"\n\"layer of indirection.\"\nmsgstr \"\"\n\n#: src/std/box.md:20\nmsgid \"\"\n\"// A Rectangle can be specified by where its top left and bottom right \\n\"\n\"// corners are in space\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:34\nmsgid \"// Allocate this point on the heap, and return a pointer to it\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:39\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // Stack allocated variables\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:47\nmsgid \"// Heap allocated rectangle\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:53\nmsgid \"// The output of functions can be boxed\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:56\nmsgid \"// Double indirection\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:59\nmsgid \"\\\"Point occupies {} bytes on the stack\\\"\"\nmsgstr \"\"\n\n#: src/std/box.md:61\nmsgid \"\\\"Rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\"\n\n#: src/std/box.md:64\nmsgid \"// box size == pointer size\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:65\nmsgid \"\\\"Boxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\"\n\n#: src/std/box.md:67\nmsgid \"\\\"Boxed rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\"\n\n#: src/std/box.md:69\nmsgid \"\\\"Boxed box occupies {} bytes on the stack\\\"\"\nmsgstr \"\"\n\n#: src/std/box.md:72\nmsgid \"// Copy the data contained in `boxed_point` into `unboxed_point`\\n\"\nmsgstr \"\"\n\n#: src/std/box.md:74\nmsgid \"\\\"Unboxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:3\nmsgid \"\"\n\"Vectors are re-sizable arrays. Like slices, their size is not known at \"\n\"compile time, but they can grow or shrink at any time. A vector is \"\n\"represented using 3 parameters:\"\nmsgstr \"\"\n\n#: src/std/vec.md:7\nmsgid \"pointer to the data\"\nmsgstr \"\"\n\n#: src/std/vec.md:8\nmsgid \"length\"\nmsgstr \"\"\n\n#: src/std/vec.md:9\nmsgid \"capacity\"\nmsgstr \"\"\n\n#: src/std/vec.md:11\nmsgid \"\"\n\"The capacity indicates how much memory is reserved for the vector. The \"\n\"vector can grow as long as the length is smaller than the capacity. When \"\n\"this threshold needs to be surpassed, the vector is reallocated with a \"\n\"larger capacity.\"\nmsgstr \"\"\n\n#: src/std/vec.md:17\nmsgid \"// Iterators can be collected into vectors\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:19\nmsgid \"\\\"Collected (0..10) into: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:21\nmsgid \"// The `vec!` macro can be used to initialize a vector\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:23\nmsgid \"\\\"Initial vector: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:25\nmsgid \"// Insert new element at the end of the vector\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:26\nmsgid \"\\\"Push 4 into the vector\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:28\nmsgid \"\\\"Vector: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:30\nmsgid \"// Error! Immutable vectors can't grow\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:34\nmsgid \"\"\n\"// The `len` method yields the number of elements currently stored in a \"\n\"vector\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:35\nmsgid \"\\\"Vector length: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:37\nmsgid \"// Indexing is done using the square brackets (indexing starts at 0)\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:38\nmsgid \"\\\"Second element: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:40\nmsgid \"// `pop` removes the last element from the vector and returns it\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:41\nmsgid \"\\\"Pop last element: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:43\nmsgid \"// Out of bounds indexing yields a panic\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:44\nmsgid \"\\\"Fourth element: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:47\nmsgid \"// `Vector`s can be easily iterated over\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:48\nmsgid \"\\\"Contents of xs:\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:53\nmsgid \"\"\n\"// A `Vector` can also be iterated over while the iteration\\n\"\n\"    // count is enumerated in a separate variable (`i`)\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:56\nmsgid \"\\\"In position {} we have value {}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:59\nmsgid \"\"\n\"// Thanks to `iter_mut`, mutable `Vector`s can also be iterated\\n\"\n\"    // over in a way that allows modifying each value\\n\"\nmsgstr \"\"\n\n#: src/std/vec.md:64\nmsgid \"\\\"Updated vector: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/vec.md:68\nmsgid \"\"\n\"More `Vec` methods can be found under the [std::vec](https://doc.rust-lang.\"\n\"org/std/vec/) module\"\nmsgstr \"\"\n\n#: src/std/str.md:3\nmsgid \"The two most used string types in Rust are `String` and `&str`.\"\nmsgstr \"\"\n\n#: src/std/str.md:5\nmsgid \"\"\n\"A `String` is stored as a vector of bytes (`Vec<u8>`), but guaranteed to \"\n\"always be a valid UTF-8 sequence. `String` is heap allocated, growable and \"\n\"not null terminated.\"\nmsgstr \"\"\n\n#: src/std/str.md:9\nmsgid \"\"\n\"`&str` is a slice (`&[u8]`) that always points to a valid UTF-8 sequence, \"\n\"and can be used to view into a `String`, just like `&[T]` is a view into \"\n\"`Vec<T>`.\"\nmsgstr \"\"\n\n#: src/std/str.md:14\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // A reference to a string allocated in read only memory\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:16\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:17\nmsgid \"\\\"Pangram: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:19\nmsgid \"// Iterate over words in reverse, no new string is allocated\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:20\nmsgid \"\\\"Words in reverse\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:25\nmsgid \"// Copy chars into a vector, sort and remove duplicates\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:30\nmsgid \"// Create an empty and growable `String`\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:33\nmsgid \"// Insert a char at the end of string\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:35\nmsgid \"// Insert a string at the end of string\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:39\nmsgid \"\"\n\"// The trimmed string is a slice to the original string, hence no new\\n\"\n\"    // allocation is performed\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:43\nmsgid \"\\\"Used characters: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:45\nmsgid \"// Heap allocate a string\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:46\nmsgid \"\\\"I like dogs\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:47\nmsgid \"// Allocate new memory and store the modified string there\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:48\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:48\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:50\nmsgid \"\\\"Alice says: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:51\nmsgid \"\\\"Bob says: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:55\nmsgid \"\"\n\"More `str`/`String` methods can be found under the [std::str](https://doc.\"\n\"rust-lang.org/std/str/) and [std::string](https://doc.rust-lang.org/std/\"\n\"string/) modules\"\nmsgstr \"\"\n\n#: src/std/str.md:60\nmsgid \"Literals and escapes\"\nmsgstr \"\"\n\n#: src/std/str.md:62\nmsgid \"\"\n\"There are multiple ways to write string literals with special characters in \"\n\"them. All result in a similar `&str` so it's best to use the form that is \"\n\"the most convenient to write. Similarly there are multiple ways to write \"\n\"byte string literals, which all result in `&[u8; N]`.\"\nmsgstr \"\"\n\n#: src/std/str.md:67\nmsgid \"\"\n\"Generally special characters are escaped with a backslash character: `\\\\`. \"\n\"This way you can add any character to your string, even unprintable ones and \"\n\"ones that you don't know how to type. If you want a literal backslash, \"\n\"escape it with another one: `\\\\\\\\`\"\nmsgstr \"\"\n\n#: src/std/str.md:72\nmsgid \"\"\n\"String or character literal delimiters occurring within a literal must be \"\n\"escaped: `\\\"\\\\\\\"\\\"`, `'\\\\''`.\"\nmsgstr \"\"\n\n#: src/std/str.md:76\nmsgid \"// You can use escapes to write bytes by their hexadecimal values...\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:77\nmsgid \"\\\"I'm writing \\\\x52\\\\x75\\\\x73\\\\x74!\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:78\nmsgid \"\\\"What are you doing\\\\x3F (\\\\\\\\x3F means ?) {}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:80\nmsgid \"// ...or Unicode code points.\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:81\nmsgid \"\\\"\\\\u{211D}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:82\nmsgid \"\\\"\\\\\\\"DOUBLE-STRUCK CAPITAL R\\\\\\\"\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:84\nmsgid \"\\\"Unicode character {} (U+211D) is called {}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:88\nmsgid \"\"\n\"\\\"String literals\\n\"\n\"                        can span multiple lines.\\n\"\n\"                        The linebreak and indentation here ->\\\\\\n\"\n\"                        <- can be escaped too!\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:96\nmsgid \"\"\n\"Sometimes there are just too many characters that need to be escaped or it's \"\n\"just much more convenient to write a string out as-is. This is where raw \"\n\"string literals come into play.\"\nmsgstr \"\"\n\n#: src/std/str.md:101\nmsgid \"r\\\"Escapes don't work here: \\\\x3F \\\\u{211D}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:104\nmsgid \"// If you need quotes in a raw string, add a pair of #s\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:105\nmsgid \"r#\\\"And then I said: \\\"There is no escape!\\\"\\\"#\"\nmsgstr \"\"\n\n#: src/std/str.md:108\nmsgid \"\"\n\"// If you need \\\"# in your string, just use more #s in the delimiter.\\n\"\n\"    // You can use up to 255 #s.\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:110\nmsgid \"r###\\\"A string with \\\"# in it. And even \\\"##!\\\"###\"\nmsgstr \"\"\n\n#: src/std/str.md:115\nmsgid \"\"\n\"Want a string that's not UTF-8? (Remember, `str` and `String` must be valid \"\n\"UTF-8). Or maybe you want an array of bytes that's mostly text? Byte strings \"\n\"to the rescue!\"\nmsgstr \"\"\n\n#: src/std/str.md:122\nmsgid \"// Note that this is not actually a `&str`\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:123\nmsgid \"b\\\"this is a byte string\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:125\nmsgid \"\"\n\"// Byte arrays don't have the `Display` trait, so printing them is a bit \"\n\"limited\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:126\nmsgid \"\\\"A byte string: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:128\nmsgid \"// Byte strings can have byte escapes...\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:129\nmsgid \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 as bytes\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:130\nmsgid \"\"\n\"// ...but no unicode escapes\\n\"\n\"    // let escaped = b\\\"\\\\u{211D} is not allowed\\\";\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:132\nmsgid \"\\\"Some escaped bytes: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:135\nmsgid \"// Raw byte strings work just like raw strings\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:136\nmsgid \"br\\\"\\\\u{211D} is not escaped here\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:139\nmsgid \"// Converting a byte array to `str` can fail\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:141\nmsgid \"\\\"And the same as text: '{}'\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:144\nmsgid \"\"\n\"br#\\\"You can also use \\\"fancier\\\" formatting, \\\\\\n\"\n\"                    like with normal raw strings\\\"#\"\nmsgstr \"\"\n\n#: src/std/str.md:147\nmsgid \"// Byte strings don't have to be UTF-8\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:148\nmsgid \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:148\nmsgid \"// \\\"ようこそ\\\" in SHIFT-JIS\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:150\nmsgid \"// But then they can't always be converted to `str`\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:152\nmsgid \"\\\"Conversion successful: '{}'\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:153\nmsgid \"\\\"Conversion failed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/str.md:158\nmsgid \"\"\n\"For conversions between character encodings check out the [encoding](https://\"\n\"crates.io/crates/encoding) crate.\"\nmsgstr \"\"\n\n#: src/std/str.md:160\nmsgid \"\"\n\"A more detailed listing of the ways to write string literals and escape \"\n\"characters is given in the ['Tokens' chapter](https://doc.rust-lang.org/\"\n\"reference/tokens.html) of the Rust Reference.\"\nmsgstr \"\"\n\n#: src/std/option.md:3\nmsgid \"\"\n\"Sometimes it's desirable to catch the failure of some parts of a program \"\n\"instead of calling `panic!`; this can be accomplished using the `Option` \"\n\"enum.\"\nmsgstr \"\"\n\n#: src/std/option.md:6\nmsgid \"The `Option<T>` enum has two variants:\"\nmsgstr \"\"\n\n#: src/std/option.md:8\nmsgid \"`None`, to indicate failure or lack of value, and\"\nmsgstr \"\"\n\n#: src/std/option.md:9\nmsgid \"`Some(value)`, a tuple struct that wraps a `value` with type `T`.\"\nmsgstr \"\"\n\n#: src/std/option.md:12\nmsgid \"// An integer division that doesn't `panic!`\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:15\nmsgid \"// Failure is represented as the `None` variant\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:18\nmsgid \"// Result is wrapped in a `Some` variant\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:22\nmsgid \"// This function handles a division that may not succeed\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:25\nmsgid \"// `Option` values can be pattern matched, just like other enums\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:27\nmsgid \"\\\"{} / {} failed!\\\"\"\nmsgstr \"\"\n\n#: src/std/option.md:29\nmsgid \"\\\"{} / {} = {}\\\"\"\nmsgstr \"\"\n\n#: src/std/option.md:38\nmsgid \"// Binding `None` to a variable needs to be type annotated\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:44\nmsgid \"// Unwrapping a `Some` variant will extract the value wrapped.\\n\"\nmsgstr \"\"\n\n#: src/std/option.md:45 src/std/option.md:48\nmsgid \"\\\"{:?} unwraps to {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/option.md:47\nmsgid \"// Unwrapping a `None` variant will `panic!`\\n\"\nmsgstr \"\"\n\n#: src/std/result.md:3\nmsgid \"\"\n\"We've seen that the `Option` enum can be used as a return value from \"\n\"functions that may fail, where `None` can be returned to indicate failure. \"\n\"However, sometimes it is important to express _why_ an operation failed. To \"\n\"do this we have the `Result` enum.\"\nmsgstr \"\"\n\n#: src/std/result.md:8\nmsgid \"The `Result<T, E>` enum has two variants:\"\nmsgstr \"\"\n\n#: src/std/result.md:10\nmsgid \"\"\n\"`Ok(value)` which indicates that the operation succeeded, and wraps the \"\n\"`value` returned by the operation. (`value` has type `T`)\"\nmsgstr \"\"\n\n#: src/std/result.md:12\nmsgid \"\"\n\"`Err(why)`, which indicates that the operation failed, and wraps `why`, \"\n\"which (hopefully) explains the cause of the failure. (`why` has type `E`)\"\nmsgstr \"\"\n\n#: src/std/result.md:17\nmsgid \"// Mathematical \\\"errors\\\" we want to catch\\n\"\nmsgstr \"\"\n\n#: src/std/result.md:29\nmsgid \"\"\n\"// This operation would `fail`, instead let's return the reason of\\n\"\n\"            // the failure wrapped in `Err`\\n\"\nmsgstr \"\"\n\n#: src/std/result.md:33\nmsgid \"// This operation is valid, return the result wrapped in `Ok`\\n\"\nmsgstr \"\"\n\n#: src/std/result.md:54\nmsgid \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\nmsgstr \"\"\n\n#: src/std/result.md:57\nmsgid \"// This is a three level match pyramid!\\n\"\nmsgstr \"\"\n\n#: src/std/result.md:71\nmsgid \"// Will this fail?\\n\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:3\nmsgid \"\"\n\"Chaining results using match can get pretty untidy; luckily, the `?` \"\n\"operator can be used to make things pretty again. `?` is used at the end of \"\n\"an expression returning a `Result`, and is equivalent to a match expression, \"\n\"where the `Err(err)` branch expands to an early `return Err(From::\"\n\"from(err))`, and the `Ok(ok)` branch expands to an `ok` expression.\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:44\nmsgid \"// Intermediate function\\n\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:46\nmsgid \"// if `div` \\\"fails\\\", then `DivisionByZero` will be `return`ed\\n\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:49\nmsgid \"// if `ln` \\\"fails\\\", then `NonPositiveLogarithm` will be `return`ed\\n\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:59\nmsgid \"\\\"logarithm of non-positive number\\\"\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:61 src/std/panic.md:15\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:63\nmsgid \"\\\"square root of negative number\\\"\"\nmsgstr \"\"\n\n#: src/std/result/question_mark.md:75\nmsgid \"\"\n\"Be sure to check the [documentation](https://doc.rust-lang.org/std/result/\"\n\"index.html), as there are many methods to map/compose `Result`.\"\nmsgstr \"\"\n\n#: src/std/panic.md:3\nmsgid \"\"\n\"The `panic!` macro can be used to generate a panic and start unwinding its \"\n\"stack. While unwinding, the runtime will take care of freeing all the \"\n\"resources _owned_ by the thread by calling the destructor of all its objects.\"\nmsgstr \"\"\n\n#: src/std/panic.md:7\nmsgid \"\"\n\"Since we are dealing with programs with only one thread, `panic!` will cause \"\n\"the program to report the panic message and exit.\"\nmsgstr \"\"\n\n#: src/std/panic.md:11\nmsgid \"// Re-implementation of integer division (/)\\n\"\nmsgstr \"\"\n\n#: src/std/panic.md:14\nmsgid \"// Division by zero triggers a panic\\n\"\nmsgstr \"\"\n\n#: src/std/panic.md:20\nmsgid \"// The `main` task\\n\"\nmsgstr \"\"\n\n#: src/std/panic.md:23\nmsgid \"// Heap allocated integer\\n\"\nmsgstr \"\"\n\n#: src/std/panic.md:26\nmsgid \"// This operation will trigger a task failure\\n\"\nmsgstr \"\"\n\n#: src/std/panic.md:29\nmsgid \"\\\"This point won't be reached!\\\"\"\nmsgstr \"\"\n\n#: src/std/panic.md:31\nmsgid \"// `_x` should get destroyed at this point\\n\"\nmsgstr \"\"\n\n#: src/std/panic.md:35\nmsgid \"Let's check that `panic!` doesn't leak memory.\"\nmsgstr \"\"\n\n#: src/std/hash.md:3\nmsgid \"\"\n\"Where vectors store values by an integer index, `HashMap`s store values by \"\n\"key. `HashMap` keys can be booleans, integers, strings, or any other type \"\n\"that implements the `Eq` and `Hash` traits. More on this in the next section.\"\nmsgstr \"\"\n\n#: src/std/hash.md:8\nmsgid \"\"\n\"Like vectors, `HashMap`s are growable, but HashMaps can also shrink \"\n\"themselves when they have excess space. You can create a HashMap with a \"\n\"certain starting capacity using `HashMap::with_capacity(uint)`, or use \"\n\"`HashMap::new()` to get a HashMap with a default initial capacity \"\n\"(recommended).\"\nmsgstr \"\"\n\n#: src/std/hash.md:19 src/std/hash.md:30\nmsgid \"\\\"798-1364\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:19\nmsgid \"\"\n\"\\\"We're sorry, the call cannot be completed as dialed. \\n\"\n\"            Please hang up and try again.\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:21 src/std/hash.md:31\nmsgid \"\\\"645-7689\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:21\nmsgid \"\"\n\"\\\"Hello, this is Mr. Awesome's Pizza. My name is Fred.\\n\"\n\"            What can I get for you today?\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:23\nmsgid \"\\\"Hi! Who is this again?\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:30 src/std/hash.md:36 src/std/hash.md:43\nmsgid \"\\\"Daniel\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:31 src/std/hash.md:45 src/std/hash.md:50\nmsgid \"\\\"Ashley\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"Katie\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"435-8291\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"Robert\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"956-1745\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:35\nmsgid \"// Takes a reference and returns Option<&V>\\n\"\nmsgstr \"\"\n\n#: src/std/hash.md:37\nmsgid \"\\\"Calling Daniel: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:38\nmsgid \"\\\"Don't have Daniel's number.\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:41\nmsgid \"\"\n\"// `HashMap::insert()` returns `None`\\n\"\n\"    // if the inserted value is new, `Some(value)` otherwise\\n\"\nmsgstr \"\"\n\n#: src/std/hash.md:43\nmsgid \"\\\"164-6743\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:46\nmsgid \"\\\"Calling Ashley: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:47\nmsgid \"\\\"Don't have Ashley's number.\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:52\nmsgid \"\"\n\"// `HashMap::iter()` returns an iterator that yields \\n\"\n\"    // (&'a key, &'a value) pairs in arbitrary order.\\n\"\nmsgstr \"\"\n\n#: src/std/hash.md:55\nmsgid \"\\\"Calling {}: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash.md:60\nmsgid \"\"\n\"For more information on how hashing and hash maps (sometimes called hash \"\n\"tables) work, have a look at [Hash Table Wikipedia](https://en.wikipedia.org/\"\n\"wiki/Hash_table)\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:3\nmsgid \"\"\n\"Any type that implements the `Eq` and `Hash` traits can be a key in \"\n\"`HashMap`. This includes:\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:6\nmsgid \"`bool` (though not very useful since there are only two possible keys)\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:7\nmsgid \"`int`, `uint`, and all variations thereof\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:8\nmsgid \"\"\n\"`String` and `&str` (protip: you can have a `HashMap` keyed by `String` and \"\n\"call `.get()` with an `&str`)\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:11\nmsgid \"\"\n\"Note that `f32` and `f64` do _not_ implement `Hash`, likely because \"\n\"[floating-point precision errors](https://en.wikipedia.org/wiki/\"\n\"Floating_point#Accuracy_problems) would make using them as hashmap keys \"\n\"horribly error-prone.\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:15\nmsgid \"\"\n\"All collection classes implement `Eq` and `Hash` if their contained type \"\n\"also respectively implements `Eq` and `Hash`. For example, `Vec<T>` will \"\n\"implement `Hash` if `T` implements `Hash`.\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:19\nmsgid \"\"\n\"You can easily implement `Eq` and `Hash` for a custom type with just one \"\n\"line: `#[derive(PartialEq, Eq, Hash)]`\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:22\nmsgid \"\"\n\"The compiler will do the rest. If you want more control over the details, \"\n\"you can implement `Eq` and/or `Hash` yourself. This guide will not cover the \"\n\"specifics of implementing `Hash`.\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:26\nmsgid \"\"\n\"To play around with using a `struct` in `HashMap`, let's try making a very \"\n\"simple user logon system:\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:31\nmsgid \"// Eq requires that you derive PartialEq on the type.\\n\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:48\nmsgid \"\\\"Username: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:49\nmsgid \"\\\"Password: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:50\nmsgid \"\\\"Attempting logon...\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:59\nmsgid \"\\\"Successful logon!\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:60\nmsgid \"\\\"Name: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:61\nmsgid \"\\\"Email: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:63\nmsgid \"\\\"Login failed!\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:71 src/std/hash/alt_key_types.md:82\n#: src/std/hash/alt_key_types.md:84\nmsgid \"\\\"j.everyman\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:72 src/std/hash/alt_key_types.md:84\nmsgid \"\\\"password123\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:76\nmsgid \"\\\"John Everyman\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:77\nmsgid \"\\\"j.everyman@email.com\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/alt_key_types.md:82\nmsgid \"\\\"psasword123\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:3\nmsgid \"\"\n\"Consider a `HashSet` as a `HashMap` where we just care about the keys \"\n\"( `HashSet<T>` is, in actuality, just a wrapper around `HashMap<T, ()>`).\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:6\nmsgid \"\"\n\"\\\"What's the point of that?\\\" you ask. \\\"I could just store the keys in a \"\n\"`Vec`.\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:8\nmsgid \"\"\n\"A `HashSet`'s unique feature is that it is guaranteed to not have duplicate \"\n\"elements. That's the contract that any set collection fulfills. `HashSet` is \"\n\"just one implementation. (see also: [`BTreeSet`](https://doc.rust-lang.org/\"\n\"std/collections/struct.BTreeSet.html))\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:13\nmsgid \"\"\n\"If you insert a value that is already present in the `HashSet`, (i.e. the \"\n\"new value is equal to the existing and they both have the same hash), then \"\n\"the new value will replace the old.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:17\nmsgid \"\"\n\"This is great for when you never want more than one of something, or when \"\n\"you want to know if you've already got something.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:20\nmsgid \"But sets can do more than that.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:22\nmsgid \"\"\n\"Sets have 4 primary operations (all of the following calls return an \"\n\"iterator):\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:24\nmsgid \"`union`: get all the unique elements in both sets.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:26\nmsgid \"\"\n\"`difference`: get all the elements that are in the first set but not the \"\n\"second.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:28\nmsgid \"`intersection`: get all the elements that are only in _both_ sets.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:30\nmsgid \"\"\n\"`symmetric_difference`: get all the elements that are in one set or the \"\n\"other, but _not_ both.\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:33\nmsgid \"Try all of these in the following example:\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:45\nmsgid \"\"\n\"// `HashSet::insert()` returns false if\\n\"\n\"    // there was a value already present.\\n\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:47\nmsgid \"\\\"Value 4 is already in set B!\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:52\nmsgid \"\"\n\"// If a collection's element type implements `Debug`,\\n\"\n\"    // then the collection implements `Debug`.\\n\"\n\"    // It usually prints its elements in the format `[elem1, elem2, ...]`\\n\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:55\nmsgid \"\\\"A: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:56\nmsgid \"\\\"B: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:58\nmsgid \"// Print [1, 2, 3, 4, 5] in arbitrary order\\n\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:59\nmsgid \"\\\"Union: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:61\nmsgid \"// This should print [1]\\n\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:62\nmsgid \"\\\"Difference: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:64\nmsgid \"// Print [2, 3, 4] in arbitrary order.\\n\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:65\nmsgid \"\\\"Intersection: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:67\nmsgid \"// Print [1, 5]\\n\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:68\nmsgid \"\\\"Symmetric Difference: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std/hash/hashset.md:73\nmsgid \"\"\n\"(Examples are adapted from the [documentation.](https://doc.rust-lang.org/\"\n\"std/collections/struct.HashSet.html#method.difference))\"\nmsgstr \"\"\n\n#: src/std/rc.md:3\nmsgid \"\"\n\"When multiple ownership is needed, `Rc`(Reference Counting) can be used. \"\n\"`Rc` keeps track of the number of the references which means the number of \"\n\"owners of the value wrapped inside an `Rc`.\"\nmsgstr \"\"\n\n#: src/std/rc.md:7\nmsgid \"\"\n\"Reference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and \"\n\"decreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an \"\n\"`Rc`'s reference count becomes zero (which means there are no remaining \"\n\"owners), both the `Rc` and the value are all dropped.\"\nmsgstr \"\"\n\n#: src/std/rc.md:12\nmsgid \"\"\n\"Cloning an `Rc` never performs a deep copy. Cloning creates just another \"\n\"pointer to the wrapped value, and increments the count.\"\nmsgstr \"\"\n\n#: src/std/rc.md:19\nmsgid \"\\\"Rc examples\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:21\nmsgid \"\\\"--- rc_a is created ---\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:24 src/std/rc.md:31 src/std/rc.md:43\nmsgid \"\\\"Reference Count of rc_a: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:27\nmsgid \"\\\"--- rc_a is cloned to rc_b ---\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:30\nmsgid \"\\\"Reference Count of rc_b: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:33\nmsgid \"// Two `Rc`s are equal if their inner values are equal\\n\"\nmsgstr \"\"\n\n#: src/std/rc.md:34\nmsgid \"\\\"rc_a and rc_b are equal: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:36\nmsgid \"// We can use methods of a value directly\\n\"\nmsgstr \"\"\n\n#: src/std/rc.md:37\nmsgid \"\\\"Length of the value inside rc_a: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:38\nmsgid \"\\\"Value of rc_b: {}\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:40\nmsgid \"\\\"--- rc_b is dropped out of scope ---\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:45\nmsgid \"\\\"--- rc_a is dropped out of scope ---\\\"\"\nmsgstr \"\"\n\n#: src/std/rc.md:48\nmsgid \"\"\n\"// Error! `rc_examples` already moved into `rc_a`\\n\"\n\"    // And when `rc_a` is dropped, `rc_examples` is dropped together\\n\"\n\"    // println!(\\\"rc_examples: {}\\\", rc_examples);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/std/rc.md:57\nmsgid \"\"\n\"[std::rc](https://doc.rust-lang.org/std/rc/index.html) and [std::sync::arc]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Arc.html).\"\nmsgstr \"\"\n\n#: src/std/arc.md:1\nmsgid \"Arc\"\nmsgstr \"\"\n\n#: src/std/arc.md:3\nmsgid \"\"\n\"When shared ownership between threads is needed, `Arc`(Atomically Reference \"\n\"Counted) can be used. This struct, via the `Clone` implementation can create \"\n\"a reference pointer for the location of a value in the memory heap while \"\n\"increasing the reference counter. As it shares ownership between threads, \"\n\"when the last reference pointer to a value is out of scope, the variable is \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/std/arc.md:15\nmsgid \"// This variable declaration is where its value is specified.\\n\"\nmsgstr \"\"\n\n#: src/std/arc.md:16\nmsgid \"\\\"the same apple\\\"\"\nmsgstr \"\"\n\n#: src/std/arc.md:19\nmsgid \"\"\n\"// Here there is no value specification as it is a pointer to a\\n\"\n\"        // reference in the memory heap.\\n\"\nmsgstr \"\"\n\n#: src/std/arc.md:24\nmsgid \"\"\n\"// As Arc was used, threads can be spawned using the value allocated\\n\"\n\"            // in the Arc variable pointer's location.\\n\"\nmsgstr \"\"\n\n#: src/std/arc.md:30\nmsgid \"// Make sure all Arc instances are printed from spawned threads.\\n\"\nmsgstr \"\"\n\n#: src/std_misc.md:3\nmsgid \"\"\n\"Many other types are provided by the std library to support things such as:\"\nmsgstr \"\"\n\n#: src/std_misc.md:10\nmsgid \"These expand beyond what the [primitives](primitives.md) provide.\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:3\nmsgid \"\"\n\"Rust provides a mechanism for spawning native OS threads via the `spawn` \"\n\"function, the argument of this function is a moving closure.\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:10 src/std_misc/threads/testcase_mapreduce.md:28\nmsgid \"// This is the `main` thread\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:13\nmsgid \"// Make a vector to hold the children which are spawned.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:17\nmsgid \"// Spin up another thread\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:19\nmsgid \"\\\"this is thread number {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:24\nmsgid \"// Wait for the thread to finish. Returns a result.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads.md:30\nmsgid \"These threads will be scheduled by the OS.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:3\nmsgid \"\"\n\"Rust makes it very easy to parallelize data processing, without many of the \"\n\"headaches traditionally associated with such an attempt.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:5\nmsgid \"\"\n\"The standard library provides great threading primitives out of the box. \"\n\"These, combined with Rust's concept of Ownership and aliasing rules, \"\n\"automatically prevent data races.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:9\nmsgid \"\"\n\"The aliasing rules (one writable reference XOR many readable references) \"\n\"automatically prevent you from manipulating state that is visible to other \"\n\"threads. (Where synchronization is needed, there are synchronization \"\n\"primitives like `Mutex`es or `Channel`s.)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:14\nmsgid \"\"\n\"In this example, we will calculate the sum of all digits in a block of \"\n\"numbers. We will do this by parcelling out chunks of the block into \"\n\"different threads. Each thread will sum its tiny block of digits, and \"\n\"subsequently we will sum the intermediate sums produced by each thread.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:19\nmsgid \"\"\n\"Note that, although we're passing references across thread boundaries, Rust \"\n\"understands that we're only passing read-only references, and that thus no \"\n\"unsafety or data races can occur. Also because the references we're passing \"\n\"have `'static` lifetimes, Rust understands that our data won't be destroyed \"\n\"while these threads are still running. (When you need to share non-`static` \"\n\"data between threads, you can use a smart pointer like `Arc` to keep the \"\n\"data alive and avoid non-`static` lifetimes.)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:32\nmsgid \"\"\n\"// This is our data to process.\\n\"\n\"    // We will calculate the sum of all digits via a threaded map-reduce \"\n\"algorithm.\\n\"\n\"    // Each whitespace separated chunk will be handled in a different \"\n\"thread.\\n\"\n\"    //\\n\"\n\"    // TODO: see what happens to the output if you insert spaces!\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:37\nmsgid \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:46\nmsgid \"// Make a vector to hold the child-threads which we will spawn.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:49\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Map\\\" phase\\n\"\n\"     *\\n\"\n\"     * Divide our data into segments, and apply initial processing\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:55\nmsgid \"\"\n\"// split our data into segments for individual calculation\\n\"\n\"    // each chunk will be a reference (&str) into the actual data\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:59\nmsgid \"\"\n\"// Iterate over the data segments.\\n\"\n\"    // .enumerate() adds the current loop index to whatever is iterated\\n\"\n\"    // the resulting tuple \\\"(index, element)\\\" is then immediately\\n\"\n\"    // \\\"destructured\\\" into two variables, \\\"i\\\" and \\\"data_segment\\\" with \"\n\"a\\n\"\n\"    // \\\"destructuring assignment\\\"\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:65\nmsgid \"\\\"data segment {} is \\\\\\\"{}\\\\\\\"\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:67\nmsgid \"\"\n\"// Process each data segment in a separate thread\\n\"\n\"        //\\n\"\n\"        // spawn() returns a handle to the new thread,\\n\"\n\"        // which we MUST keep to access the returned value\\n\"\n\"        //\\n\"\n\"        // 'move || -> u32' is syntax for a closure that:\\n\"\n\"        // * takes no arguments ('||')\\n\"\n\"        // * takes ownership of its captured variables ('move') and\\n\"\n\"        // * returns an unsigned 32-bit integer ('-> u32')\\n\"\n\"        //\\n\"\n\"        // Rust is smart enough to infer the '-> u32' from\\n\"\n\"        // the closure itself so we could have left that out.\\n\"\n\"        //\\n\"\n\"        // TODO: try removing the 'move' and see what happens\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:82\nmsgid \"// Calculate the intermediate sum of this segment:\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:84\nmsgid \"// iterate over the characters of our segment..\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:86\nmsgid \"// .. convert text-characters to their number value..\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:87\nmsgid \"\\\"should be a digit\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:88\nmsgid \"// .. and sum the resulting iterator of numbers\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:91\nmsgid \"// println! locks stdout, so no text-interleaving occurs\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:92\nmsgid \"\\\"processed segment {}, result={}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:94\nmsgid \"\"\n\"// \\\"return\\\" not needed, because Rust is an \\\"expression language\\\", the\\n\"\n\"            // last evaluated expression in each block is automatically its \"\n\"value.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:102\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Reduce\\\" phase\\n\"\n\"     *\\n\"\n\"     * Collect our intermediate results, and combine them into a final \"\n\"result\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:108\nmsgid \"\"\n\"// combine each thread's intermediate results into a single final sum.\\n\"\n\"    //\\n\"\n\"    // we use the \\\"turbofish\\\" ::<> to provide sum() with a type hint.\\n\"\n\"    //\\n\"\n\"    // TODO: try without the turbofish, by instead explicitly\\n\"\n\"    // specifying the type of final_result\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:116\nmsgid \"\\\"Final sum result: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:122\nmsgid \"Assignments\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:124\nmsgid \"\"\n\"It is not wise to let our number of threads depend on user inputted data. \"\n\"What if the user decides to insert a lot of spaces? Do we _really_ want to \"\n\"spawn 2,000 threads? Modify the program so that the data is always chunked \"\n\"into a limited number of chunks, defined by a static constant at the \"\n\"beginning of the program.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:131\nmsgid \"[Threads](../threads.md)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:132\nmsgid \"[vectors](../../std/vec.md) and [iterators](../../trait/iter.md)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:133\nmsgid \"\"\n\"[closures](../../fn/closures.md), [move](../../scope/move.md) semantics and \"\n\"[`move` closures](https://doc.rust-lang.org/book/ch13-01-closures.\"\n\"html#closures-can-capture-their-environment)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:134\nmsgid \"\"\n\"[destructuring](https://doc.rust-lang.org/book/ch18-03-pattern-syntax.\"\n\"html#destructuring-to-break-apart-values) assignments\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:135\nmsgid \"\"\n\"[turbofish notation](https://doc.rust-lang.org/book/appendix-02-operators.\"\n\"html?highlight=turbofish) to help type inference\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:136\nmsgid \"[unwrap vs. expect](../../error/option_unwrap.md)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:137\nmsgid \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:3\nmsgid \"\"\n\"Rust provides asynchronous `channels` for communication between threads. \"\n\"Channels allow a unidirectional flow of information between two end-points: \"\n\"the `Sender` and the `Receiver`.\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:15\nmsgid \"\"\n\"// Channels have two endpoints: the `Sender<T>` and the `Receiver<T>`,\\n\"\n\"    // where `T` is the type of the message to be transferred\\n\"\n\"    // (type annotation is superfluous)\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:22\nmsgid \"// The sender endpoint can be copied\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:25\nmsgid \"// Each thread will send its id via the channel\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:27\nmsgid \"\"\n\"// The thread takes ownership over `thread_tx`\\n\"\n\"            // Each thread queues a message in the channel\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:31\nmsgid \"\"\n\"// Sending is a non-blocking operation, the thread will continue\\n\"\n\"            // immediately after sending its message\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:33\nmsgid \"\\\"thread {} finished\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:39\nmsgid \"// Here, all the messages are collected\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:42\nmsgid \"\"\n\"// The `recv` method picks a message from the channel\\n\"\n\"        // `recv` will block the current thread if there are no messages \"\n\"available\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:47\nmsgid \"// Wait for the threads to complete any remaining work\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:49\nmsgid \"\\\"oops! the child thread panicked\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:52\nmsgid \"// Show the order in which the messages were sent\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:3\nmsgid \"\"\n\"The `Path` struct represents file paths in the underlying filesystem. There \"\n\"are two flavors of `Path`: `posix::Path`, for UNIX-like systems, and \"\n\"`windows::Path`, for Windows. The prelude exports the appropriate platform-\"\n\"specific `Path` variant.\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:8\nmsgid \"\"\n\"A `Path` can be created from an `OsStr`, and provides several methods to get \"\n\"information from the file/directory the path points to.\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:11\nmsgid \"\"\n\"A `Path` is immutable. The owned version of `Path` is `PathBuf`. The \"\n\"relation between `Path` and `PathBuf` is similar to that of `str` and \"\n\"`String`: a `PathBuf` can be mutated in-place, and can be dereferenced to a \"\n\"`Path`.\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:15\nmsgid \"\"\n\"Note that a `Path` is _not_ internally represented as an UTF-8 string, but \"\n\"instead is stored as an `OsString`. Therefore, converting a `Path` to a \"\n\"`&str` is _not_ free and may fail (an `Option` is returned). However, a \"\n\"`Path` can be freely converted to an `OsString` or `&OsStr` using \"\n\"`into_os_string` and `as_os_str`, respectively.\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:25\nmsgid \"// Create a `Path` from an `&'static str`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:26\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:28\nmsgid \"// The `display` method returns a `Display`able structure\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:31\nmsgid \"\"\n\"// `join` merges a path with a byte container using the OS specific\\n\"\n\"    // separator, and returns a `PathBuf`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:35\nmsgid \"// `push` extends the `PathBuf` with a `&Path`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:37\nmsgid \"\\\"myfile.tar.gz\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:39\nmsgid \"// `set_file_name` updates the file name of the `PathBuf`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:40\nmsgid \"\\\"package.tgz\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:42\nmsgid \"// Convert the `PathBuf` into a string slice\\n\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:44\nmsgid \"\\\"new path is not a valid UTF-8 sequence\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:45\nmsgid \"\\\"new path is {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:51\nmsgid \"\"\n\"Be sure to check at other `Path` methods (`posix::Path` or `windows::Path`) \"\n\"and the `Metadata` struct.\"\nmsgstr \"\"\n\n#: src/std_misc/path.md:56\nmsgid \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html).\"\nmsgstr \"\"\n\n#: src/std_misc/file.md:3\nmsgid \"\"\n\"The `File` struct represents a file that has been opened (it wraps a file \"\n\"descriptor), and gives read and/or write access to the underlying file.\"\nmsgstr \"\"\n\n#: src/std_misc/file.md:6\nmsgid \"\"\n\"Since many things can go wrong when doing file I/O, all the `File` methods \"\n\"return the `io::Result<T>` type, which is an alias for `Result<T, io::\"\n\"Error>`.\"\nmsgstr \"\"\n\n#: src/std_misc/file.md:9\nmsgid \"\"\n\"This makes the failure of all I/O operations _explicit_. Thanks to this, the \"\n\"programmer can see all the failure paths, and is encouraged to handle them \"\n\"in a proactive manner.\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:3\nmsgid \"The `open` function can be used to open a file in read-only mode.\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:5\nmsgid \"\"\n\"A `File` owns a resource, the file descriptor and takes care of closing the \"\n\"file when it is `drop`ed.\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:14\nmsgid \"// Create a path to the desired file\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:15\nmsgid \"\\\"hello.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:18\nmsgid \"// Open the path in read-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:20\nmsgid \"\\\"couldn't open {}: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:24\nmsgid \"// Read the file contents into a string, returns `io::Result<usize>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:27\nmsgid \"\\\"couldn't read {}: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:28\nmsgid \"\\\"{} contains:\\\\n{}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:31\nmsgid \"// `file` goes out of scope, and the \\\"hello.txt\\\" file gets closed\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:35 src/std_misc/file/create.md:39\n#: src/std_misc/fs.md:109\nmsgid \"Here's the expected successful output:\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:37\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt contains:\\n\"\n\"Hello World!\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/std_misc/file/open.md:44\nmsgid \"\"\n\"(You are encouraged to test the previous example under different failure \"\n\"conditions: `hello.txt` doesn't exist, or `hello.txt` is not readable, etc.)\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:3\nmsgid \"\"\n\"The `create` function opens a file in write-only mode. If the file already \"\n\"existed, the old content is destroyed. Otherwise, a new file is created.\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:9\nmsgid \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:22\nmsgid \"\\\"lorem_ipsum.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:25\nmsgid \"// Open a file in write-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:27\nmsgid \"\\\"couldn't create {}: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:31\nmsgid \"// Write the `LOREM_IPSUM` string to `file`, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:33\nmsgid \"\\\"couldn't write to {}: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:34\nmsgid \"\\\"successfully wrote to {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:54\nmsgid \"\"\n\"(As in the previous example, you are encouraged to test this example under \"\n\"failure conditions.)\"\nmsgstr \"\"\n\n#: src/std_misc/file/create.md:57\nmsgid \"\"\n\"The [`OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.\"\n\"html) struct can be used to configure how a file is opened.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:3\nmsgid \"A naive approach\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:5\nmsgid \"\"\n\"This might be a reasonable first attempt for a beginner's first \"\n\"implementation for reading lines from a file.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:22\nmsgid \"\"\n\"Since the method `lines()` returns an iterator over the lines in the file, \"\n\"we can also perform a map inline and collect the results, yielding a more \"\n\"concise and fluent expression.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:31\nmsgid \"// panic on possible file-reading errors\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:32\nmsgid \"// split the string into an iterator of string slices\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:33\nmsgid \"// make each slice into a string\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:34\nmsgid \"// gather them together into a vector\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:38\nmsgid \"\"\n\"Note that in both examples above, we must convert the `&str` reference \"\n\"returned from `lines()` to the owned type `String`, using `.to_string()` and \"\n\"`String::from` respectively.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:42\nmsgid \"A more efficient approach\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:44\nmsgid \"\"\n\"Here we pass ownership of the open `File` to a `BufReader` struct. \"\n\"`BufReader` uses an internal buffer to reduce intermediate allocations.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:47\nmsgid \"\"\n\"We also update `read_lines` to return an iterator instead of allocating new \"\n\"`String` objects in memory for each line.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:56\nmsgid \"// File hosts.txt must exist in the current path\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:57\nmsgid \"\\\"./hosts.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:58\nmsgid \"// Consumes the iterator, returns an (Optional) String\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:64\nmsgid \"\"\n\"// The output is wrapped in a Result to allow matching on errors.\\n\"\n\"// Returns an Iterator to the Reader of the lines of the file.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:74\nmsgid \"Running this program simply prints the lines individually.\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:76\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:83\nmsgid \"\"\n\"(Note that since `File::open` expects a generic `AsRef<Path>` as argument, \"\n\"we define our generic `read_lines()` method with the same generic \"\n\"constraint, using the `where` keyword.)\"\nmsgstr \"\"\n\n#: src/std_misc/file/read_lines.md:86\nmsgid \"\"\n\"This process is more efficient than creating a `String` in memory with all \"\n\"of the file's contents. This can especially cause performance issues when \"\n\"working with larger files.\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:3\nmsgid \"\"\n\"The `process::Output` struct represents the output of a finished child \"\n\"process, and the `process::Command` struct is a process builder.\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:10\nmsgid \"\\\"rustc\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:11\nmsgid \"\\\"--version\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:13\nmsgid \"\\\"failed to execute process: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:19\nmsgid \"\\\"rustc succeeded and stdout was:\\\\n{}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:23\nmsgid \"\\\"rustc failed and stderr was:\\\\n{}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process.md:28\nmsgid \"\"\n\"(You are encouraged to try the previous example with an incorrect flag \"\n\"passed to `rustc`)\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:3\nmsgid \"\"\n\"The `std::process::Child` struct represents a child process, and exposes the \"\n\"`stdin`, `stdout` and `stderr` handles for interaction with the underlying \"\n\"process via pipes.\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:11\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:15\nmsgid \"// Spawn the `wc` command\\n\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:16 src/std_misc/fs.md:12 src/std_misc/fs.md:73\n#: src/std_misc/ffi.md:11\nmsgid \"\\\"windows\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:17\nmsgid \"\\\"powershell\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"-Command\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:21\nmsgid \"\\\"wc\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:27\nmsgid \"\\\"couldn't spawn wc: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:31\nmsgid \"\"\n\"// Write a string to the `stdin` of `wc`.\\n\"\n\"    //\\n\"\n\"    // `stdin` has type `Option<ChildStdin>`, but since we know this \"\n\"instance\\n\"\n\"    // must have one, we can directly `unwrap` it.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:36\nmsgid \"\\\"couldn't write to wc stdin: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:37\nmsgid \"\\\"sent pangram to wc\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:40\nmsgid \"\"\n\"// Because `stdin` does not live after the above calls, it is `drop`ed,\\n\"\n\"    // and the pipe is closed.\\n\"\n\"    //\\n\"\n\"    // This is very important, otherwise `wc` wouldn't start processing the\\n\"\n\"    // input we just sent.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:46\nmsgid \"\"\n\"// The `stdout` field also has type `Option<ChildStdout>` so must be \"\n\"unwrapped.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:49\nmsgid \"\\\"couldn't read wc stdout: {}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/pipe.md:50\nmsgid \"\\\"wc responded with:\\\\n{}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/wait.md:3\nmsgid \"\"\n\"If you'd like to wait for a `process::Child` to finish, you must call \"\n\"`Child::wait`, which will return a `process::ExitStatus`.\"\nmsgstr \"\"\n\n#: src/std_misc/process/wait.md:10\nmsgid \"\\\"sleep\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/wait.md:13\nmsgid \"\\\"reached end of main\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/process/wait.md:18\nmsgid \"\"\n\"# `wait` keeps running for 5 seconds until the `sleep 5` command finishes\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:3\nmsgid \"\"\n\"The `std::fs` module contains several functions that deal with the \"\n\"filesystem.\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:10 src/std_misc/fs.md:68 src/std_misc/ffi.md:20\nmsgid \"\\\"unix\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:15\nmsgid \"// A simple implementation of `% cat path`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:25\nmsgid \"// A simple implementation of `% echo s > path`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:32\nmsgid \"// A simple implementation of `% touch path` (ignores existing files)\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:42\nmsgid \"\\\"`mkdir a`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:43\nmsgid \"// Create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:45 src/std_misc/fs.md:52 src/std_misc/fs.md:58\n#: src/std_misc/fs.md:63 src/std_misc/fs.md:70 src/std_misc/fs.md:75\n#: src/std_misc/fs.md:81 src/std_misc/fs.md:88 src/std_misc/fs.md:97\n#: src/std_misc/fs.md:103\nmsgid \"\\\"! {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:49\nmsgid \"\\\"`echo hello > a/b.txt`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:50\nmsgid \"\"\n\"// The previous match can be simplified using the `unwrap_or_else` method\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:51\nmsgid \"\\\"a/b.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:55\nmsgid \"\\\"`mkdir -p a/c/d`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:56\nmsgid \"// Recursively create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:57 src/std_misc/fs.md:102\nmsgid \"\\\"a/c/d\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:61\nmsgid \"\\\"`touch a/c/e.txt`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:62 src/std_misc/fs.md:96\nmsgid \"\\\"a/c/e.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:66\nmsgid \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:67\nmsgid \"// Create a symbolic link, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74\nmsgid \"\\\"../b.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74 src/std_misc/fs.md:80\nmsgid \"\\\"a/c/b.txt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:79\nmsgid \"\\\"`cat a/c/b.txt`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:85\nmsgid \"\\\"`ls a`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:86\nmsgid \"// Read the contents of a directory, returns `io::Result<Vec<Path>>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:94\nmsgid \"\\\"`rm a/c/e.txt`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:95\nmsgid \"// Remove a file, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:100\nmsgid \"\\\"`rmdir a/c/d`\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:101\nmsgid \"// Remove an empty directory, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:111\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:127\nmsgid \"And the final state of the `a` directory is:\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:139\nmsgid \"An alternative way to define the function `cat` is with `?` notation:\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:152\nmsgid \"[`cfg!`](../attribute/cfg.md)\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:3\nmsgid \"Standard Library\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:5\nmsgid \"\"\n\"The command line arguments can be accessed using `std::env::args`, which \"\n\"returns an iterator that yields a `String` for each argument:\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:14\nmsgid \"// The first argument is the path that was used to call the program.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:15\nmsgid \"\\\"My path is {}.\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:17\nmsgid \"\"\n\"// The rest of the arguments are the passed command line parameters.\\n\"\n\"    // Call the program like this:\\n\"\n\"    //   $ ./args arg1 arg2\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:20\nmsgid \"\\\"I got {:?} arguments: {:?}.\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:24\nmsgid \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"My path is ./args.\\n\"\n\"I got 3 arguments: [\\\"1\\\", \\\"2\\\", \\\"3\\\"].\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/std_misc/arg.md:32\nmsgid \"\"\n\"Alternatively, there are numerous crates that can provide extra \"\n\"functionality when creating command-line applications. One of the more \"\n\"popular command line argument crates being [`clap`](https://rust-cli.github.\"\n\"io/book/tutorial/cli-args.html#parsing-cli-arguments-with-clap).\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:3\nmsgid \"Matching can be used to parse simple arguments:\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:17\nmsgid \"\"\n\"\\\"usage:\\n\"\n\"match_args <string>\\n\"\n\"    Check whether given string is the answer.\\n\"\n\"match_args {{increase|decrease}} <integer>\\n\"\n\"    Increase or decrease given integer by one.\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:28\nmsgid \"// no arguments passed\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:30\nmsgid \"\\\"My name is 'match_args'. Try passing some arguments!\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:32\nmsgid \"// one argument passed\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:35\nmsgid \"\\\"This is the answer!\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:36\nmsgid \"\\\"This is not the answer.\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:39\nmsgid \"// one command and one argument passed\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:43\nmsgid \"// parse the number\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:49\nmsgid \"\\\"error: second argument not an integer\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:54\nmsgid \"// parse the command\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:56\nmsgid \"\\\"increase\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:57\nmsgid \"\\\"decrease\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:59\nmsgid \"\\\"error: invalid command\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:64\nmsgid \"// all the other cases\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:66\nmsgid \"// show a help message\\n\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:73\nmsgid \"\"\n\"If you named your program `match_args.rs` and compile it like this `rustc \"\n\"match_args.rs`, you can execute it as follows:\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:3\nmsgid \"\"\n\"Rust provides a Foreign Function Interface (FFI) to C libraries. Foreign \"\n\"functions must be declared inside an `extern` block annotated with a \"\n\"`#[link]` attribute containing the name of the foreign library.\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:9\nmsgid \"// this extern block links to the libm library\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:12\nmsgid \"\\\"msvcrt\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:14 src/std_misc/ffi.md:23\nmsgid \"\"\n\"// this is a foreign function\\n\"\n\"    // that computes the square root of a single precision complex number\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:21\nmsgid \"\\\"m\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:29\nmsgid \"\"\n\"// Since calling foreign functions is considered unsafe,\\n\"\n\"// it's common to write safe wrappers around them.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:37\nmsgid \"// z = -1 + 0i\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:40\nmsgid \"// calling a foreign function is an unsafe operation\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:43\nmsgid \"\\\"the square root of {:?} is {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:45\nmsgid \"// calling safe API wrapped around unsafe operation\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:46\nmsgid \"\\\"cos({:?}) = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:48\nmsgid \"// Minimal implementation of single precision complex numbers\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:60\nmsgid \"\\\"{}-{}i\\\"\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:62\nmsgid \"\\\"{}+{}i\\\"\"\nmsgstr \"\"\n\n#: src/testing.md:3\nmsgid \"\"\n\"Rust is a programming language that cares a lot about correctness and it \"\n\"includes support for writing software tests within the language itself.\"\nmsgstr \"\"\n\n#: src/testing.md:6\nmsgid \"Testing comes in three styles:\"\nmsgstr \"\"\n\n#: src/testing.md:8\nmsgid \"[Unit](testing/unit_testing.md) testing.\"\nmsgstr \"\"\n\n#: src/testing.md:9\nmsgid \"[Doc](testing/doc_testing.md) testing.\"\nmsgstr \"\"\n\n#: src/testing.md:10\nmsgid \"[Integration](testing/integration_testing.md) testing.\"\nmsgstr \"\"\n\n#: src/testing.md:12\nmsgid \"Also Rust has support for specifying additional dependencies for tests:\"\nmsgstr \"\"\n\n#: src/testing.md:14\nmsgid \"[Dev-dependencies](testing/dev_dependencies.md)\"\nmsgstr \"\"\n\n#: src/testing.md:18\nmsgid \"\"\n\"[The Book](https://doc.rust-lang.org/book/ch11-00-testing.html) chapter on \"\n\"testing\"\nmsgstr \"\"\n\n#: src/testing.md:19\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on doc-testing\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:3\nmsgid \"\"\n\"Tests are Rust functions that verify that the non-test code is functioning \"\n\"in the expected manner. The bodies of test functions typically perform some \"\n\"setup, run the code we want to test, then assert whether the results are \"\n\"what we expect.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:8\nmsgid \"\"\n\"Most unit tests go into a `tests` [mod](../mod.md) with the `#[cfg(test)]` \"\n\"[attribute](../attribute.md). Test functions are marked with the `#[test]` \"\n\"attribute.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:11\nmsgid \"\"\n\"Tests fail when something in the test function [panics](../std/panic.md). \"\n\"There are some helper [macros](../macros.md):\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:14\nmsgid \"`assert!(expression)` - panics if expression evaluates to `false`.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:15\nmsgid \"\"\n\"`assert_eq!(left, right)` and `assert_ne!(left, right)` - testing left and \"\n\"right expressions for equality and inequality respectively.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:22\nmsgid \"\"\n\"// This is a really bad adding function, its purpose is to fail in this\\n\"\n\"// example.\\n\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:32\nmsgid \"\"\n\"// Note this useful idiom: importing names from outer (for mod tests) \"\n\"scope.\\n\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:42\nmsgid \"\"\n\"// This assert would fire and test will fail.\\n\"\n\"        // Please note, that private functions can be tested too!\\n\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:49\nmsgid \"Tests can be run with `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:73\nmsgid \"Tests and `?`\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:75\nmsgid \"\"\n\"None of the previous unit test examples had a return type. But in Rust 2018, \"\n\"your unit tests can return `Result<()>`, which lets you use `?` in them! \"\n\"This can make them much more concise.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:84\nmsgid \"\\\"negative floats don't have square roots\\\"\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:101\nmsgid \"\"\n\"See [\\\"The Edition Guide\\\"](https://doc.rust-lang.org/edition-guide/\"\n\"rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html) \"\n\"for more details.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:103\nmsgid \"Testing panics\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:105\nmsgid \"\"\n\"To check functions that should panic under certain circumstances, use \"\n\"attribute `#[should_panic]`. This attribute accepts optional parameter \"\n\"`expected = ` with the text of the panic message. If your function can panic \"\n\"in multiple ways, it helps make sure your test is testing the correct panic.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:113 src/testing/doc_testing.md:45\nmsgid \"\\\"Divide-by-zero error\\\"\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:115 src/testing/unit_testing.md:136\nmsgid \"\\\"Divide result is zero\\\"\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:143\nmsgid \"Running these tests gives us:\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:162\nmsgid \"Running specific tests\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:164\nmsgid \"\"\n\"To run specific tests one may specify the test name to `cargo test` command.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:180\nmsgid \"\"\n\"To run multiple tests one may specify part of a test name that matches all \"\n\"the tests that should be run.\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:198\nmsgid \"Ignoring tests\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:200\nmsgid \"\"\n\"Tests can be marked with the `#[ignore]` attribute to exclude some tests. Or \"\n\"to run them with command `cargo test -- --ignored`\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:3\nmsgid \"\"\n\"The primary way of documenting a Rust project is through annotating the \"\n\"source code. Documentation comments are written in [CommonMark Markdown \"\n\"specification](https://commonmark.org/) and support code blocks in them. \"\n\"Rust takes care about correctness, so these code blocks are compiled and \"\n\"used as documentation tests.\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:10\nmsgid \"\"\n\"/// First line is a short summary describing function.\\n\"\n\"///\\n\"\n\"/// The next lines present detailed documentation. Code blocks start with\\n\"\n\"/// triple backquotes and have implicit `fn main()` inside\\n\"\n\"/// and `extern crate <cratename>`. Assume we're testing a `playground` library\\n\"\n\"/// crate or using the Playground's Test action:\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:23\nmsgid \"\"\n\"/// Usually doc comments may include sections \\\"Examples\\\", \\\"Panics\\\" and \"\n\"\\\"Failures\\\".\\n\"\n\"///\\n\"\n\"/// The next function divides two numbers.\\n\"\n\"///\\n\"\n\"/// # Examples\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # Panics\\n\"\n\"///\\n\"\n\"/// The function panics if the second argument is zero.\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // panics on division by zero\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:52\nmsgid \"\"\n\"Code blocks in documentation are automatically tested when running the \"\n\"regular `cargo test` command:\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:71\nmsgid \"Motivation behind documentation tests\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:73\nmsgid \"\"\n\"The main purpose of documentation tests is to serve as examples that \"\n\"exercise the functionality, which is one of the most important [guidelines]\"\n\"(https://rust-lang-nursery.github.io/api-guidelines/documentation.\"\n\"html#examples-use--not-try-not-unwrap-c-question-mark). It allows using \"\n\"examples from docs as complete code snippets. But using `?` makes \"\n\"compilation fail since `main` returns `unit`. The ability to hide some \"\n\"source lines from documentation comes to the rescue: one may write `fn \"\n\"try_main() -> Result<(), ErrorType>`, hide it and `unwrap` it in hidden \"\n\"`main`. Sounds complicated? Here's an example:\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:82\nmsgid \"\"\n\"/// Using hidden `try_main` in doc tests.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // hidden lines start with `#` symbol, but they're still compilable!\\n\"\n\"/// # fn try_main() -> Result<(), String> { // line that wraps the body \"\n\"shown in doc\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // returning from try_main\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // starting main that'll unwrap()\\n\"\n\"/// #    try_main().unwrap(); // calling try_main and unwrapping\\n\"\n\"/// #                         // so that test will panic in case of error\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:97\nmsgid \"\\\"Divide-by-zero\\\"\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:106\nmsgid \"\"\n\"[RFC505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-\"\n\"conventions.md) on documentation style\"\nmsgstr \"\"\n\n#: src/testing/doc_testing.md:107\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on documentation guidelines\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:3\nmsgid \"\"\n\"[Unit tests](unit_testing.md) are testing one module in isolation at a time: \"\n\"they're small and can test private code. Integration tests are external to \"\n\"your crate and use only its public interface in the same way any other code \"\n\"would. Their purpose is to test that many parts of your library work \"\n\"correctly together.\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:8\nmsgid \"Cargo looks for integration tests in `tests` directory next to `src`.\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:10 src/testing/dev_dependencies.md:17\nmsgid \"File `src/lib.rs`:\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:13\nmsgid \"// Define this in a crate called `adder`.\\n\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:19\nmsgid \"File with test: `tests/integration_test.rs`:\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:28\nmsgid \"Running tests with `cargo test` command:\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:50\nmsgid \"\"\n\"Each Rust source file in the `tests` directory is compiled as a separate \"\n\"crate. In order to share some code between integration tests we can make a \"\n\"module with public functions, importing and using it within tests.\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:54\nmsgid \"File `tests/common/mod.rs`:\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:58\nmsgid \"\"\n\"// some setup code, like creating required files/directories, starting\\n\"\n\"    // servers, etc.\\n\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:63\nmsgid \"File with test: `tests/integration_test.rs`\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:66\nmsgid \"// importing common module.\\n\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:71\nmsgid \"// using common code.\\n\"\nmsgstr \"\"\n\n#: src/testing/integration_testing.md:77\nmsgid \"\"\n\"Creating the module as `tests/common.rs` also works, but is not recommended \"\n\"because the test runner will treat the file as a test crate and try to run \"\n\"tests inside it.\"\nmsgstr \"\"\n\n#: src/testing/dev_dependencies.md:1\nmsgid \"Development dependencies\"\nmsgstr \"\"\n\n#: src/testing/dev_dependencies.md:3\nmsgid \"\"\n\"Sometimes there is a need to have dependencies for tests (or examples, or \"\n\"benchmarks) only. Such dependencies are added to `Cargo.toml` in the `[dev-\"\n\"dependencies]` section. These dependencies are not propagated to other \"\n\"packages which depend on this package.\"\nmsgstr \"\"\n\n#: src/testing/dev_dependencies.md:8\nmsgid \"\"\n\"One such example is [`pretty_assertions`](https://docs.rs/\"\n\"pretty_assertions/1.0.0/pretty_assertions/index.html), which extends \"\n\"standard `assert_eq!` and `assert_ne!` macros, to provide colorful diff.  \\n\"\n\"File `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/testing/dev_dependencies.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"# standard crate data is left out\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/testing/dev_dependencies.md:27\nmsgid \"// crate for test-only use. Cannot be used in non-test code.\\n\"\nmsgstr \"\"\n\n#: src/testing/dev_dependencies.md:38\nmsgid \"\"\n\"[Cargo](http://doc.crates.io/specifying-dependencies.html) docs on \"\n\"specifying dependencies.\"\nmsgstr \"\"\n\n#: src/unsafe.md:3\nmsgid \"\"\n\"As an introduction to this section, to borrow from [the official docs]\"\n\"(https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html), \\\"one should try \"\n\"to minimize the amount of unsafe code in a code base.\\\" With that in mind, \"\n\"let's get started! Unsafe annotations in Rust are used to bypass protections \"\n\"put in place by the compiler; specifically, there are four primary things \"\n\"that unsafe is used for:\"\nmsgstr \"\"\n\n#: src/unsafe.md:9\nmsgid \"dereferencing raw pointers\"\nmsgstr \"\"\n\n#: src/unsafe.md:10\nmsgid \"\"\n\"calling functions or methods which are `unsafe` (including calling a \"\n\"function over FFI, see [a previous chapter](std_misc/ffi.md) of the book)\"\nmsgstr \"\"\n\n#: src/unsafe.md:12\nmsgid \"accessing or modifying static mutable variables\"\nmsgstr \"\"\n\n#: src/unsafe.md:13\nmsgid \"implementing unsafe traits\"\nmsgstr \"\"\n\n#: src/unsafe.md:15\nmsgid \"Raw Pointers\"\nmsgstr \"\"\n\n#: src/unsafe.md:17\nmsgid \"\"\n\"Raw pointers `*` and references `&T` function similarly, but references are \"\n\"always safe because they are guaranteed to point to valid data due to the \"\n\"borrow checker. Dereferencing a raw pointer can only be done through an \"\n\"unsafe block.\"\nmsgstr \"\"\n\n#: src/unsafe.md:32\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe.md:34\nmsgid \"\"\n\"Some functions can be declared as `unsafe`, meaning it is the programmer's \"\n\"responsibility to ensure correctness instead of the compiler's. One example \"\n\"of this is [`std::slice::from_raw_parts`](https://doc.rust-lang.org/std/\"\n\"slice/fn.from_raw_parts.html) which will create a slice given a pointer to \"\n\"the first element and a length.\"\nmsgstr \"\"\n\n#: src/unsafe.md:56\nmsgid \"\"\n\"For `slice::from_raw_parts`, one of the assumptions which _must_ be upheld \"\n\"is that the pointer passed in points to valid memory and that the memory \"\n\"pointed to is of the correct type. If these invariants aren't upheld then \"\n\"the program's behaviour is undefined and there is no knowing what will \"\n\"happen.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:3\nmsgid \"\"\n\"Rust provides support for inline assembly via the `asm!` macro. It can be \"\n\"used to embed handwritten assembly in the assembly output generated by the \"\n\"compiler. Generally this should not be necessary, but might be where the \"\n\"required performance or timing cannot be otherwise achieved. Accessing low \"\n\"level hardware primitives, e.g. in kernel code, may also demand this \"\n\"functionality.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:8\nmsgid \"\"\n\"**Note**: the examples here are given in x86/x86-64 assembly, but other \"\n\"architectures are also supported.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:10\nmsgid \"Inline assembly is currently supported on the following architectures:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:12\nmsgid \"x86 and x86-64\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:13\nmsgid \"ARM\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:14\nmsgid \"AArch64\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:15\nmsgid \"RISC-V\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:17\nmsgid \"Basic usage\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:19\nmsgid \"Let us start with the simplest possible example:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:22 src/unsafe/asm.md:42 src/unsafe/asm.md:69\n#: src/unsafe/asm.md:107 src/unsafe/asm.md:124 src/unsafe/asm.md:149\n#: src/unsafe/asm.md:183 src/unsafe/asm.md:204 src/unsafe/asm.md:221\n#: src/unsafe/asm.md:260 src/unsafe/asm.md:296 src/unsafe/asm.md:312\n#: src/unsafe/asm.md:338 src/unsafe/asm.md:376 src/unsafe/asm.md:403\n#: src/unsafe/asm.md:427 src/unsafe/asm.md:465\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:26\nmsgid \"\\\"nop\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:31\nmsgid \"\"\n\"This will insert a NOP (no operation) instruction into the assembly \"\n\"generated by the compiler. Note that all `asm!` invocations have to be \"\n\"inside an `unsafe` block, as they could insert arbitrary instructions and \"\n\"break various invariants. The instructions to be inserted are listed in the \"\n\"first argument of the `asm!` macro as a string literal.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:36\nmsgid \"Inputs and outputs\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:38\nmsgid \"\"\n\"Now inserting an instruction that does nothing is rather boring. Let us do \"\n\"something that actually acts on data:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:47\nmsgid \"\\\"mov {}, 5\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:53\nmsgid \"\"\n\"This will write the value `5` into the `u64` variable `x`. You can see that \"\n\"the string literal we use to specify instructions is actually a template \"\n\"string. It is governed by the same rules as Rust [format strings](https://\"\n\"doc.rust-lang.org/std/fmt/#syntax). The arguments that are inserted into the \"\n\"template however look a bit different than you may be familiar with. First \"\n\"we need to specify if the variable is an input or an output of the inline \"\n\"assembly. In this case it is an output. We declared this by writing `out`. \"\n\"We also need to specify in what kind of register the assembly expects the \"\n\"variable. In this case we put it in an arbitrary general purpose register by \"\n\"specifying `reg`. The compiler will choose an appropriate register to insert \"\n\"into the template and will read the variable from there after the inline \"\n\"assembly finishes executing.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:66\nmsgid \"Let us see another example that also uses an input:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:76\nmsgid \"\\\"mov {0}, {1}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:77 src/unsafe/asm.md:112 src/unsafe/asm.md:130\nmsgid \"\\\"add {0}, 5\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:86\nmsgid \"\"\n\"This will add `5` to the input in variable `i` and write the result to \"\n\"variable `o`. The particular way this assembly does this is first copying \"\n\"the value from `i` to the output, and then adding `5` to it.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:90\nmsgid \"The example shows a few things:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:92\nmsgid \"\"\n\"First, we can see that `asm!` allows multiple template string arguments; \"\n\"each one is treated as a separate line of assembly code, as if they were all \"\n\"joined together with newlines between them. This makes it easy to format \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:97\nmsgid \"\"\n\"Second, we can see that inputs are declared by writing `in` instead of `out`.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:99\nmsgid \"\"\n\"Third, we can see that we can specify an argument number, or name as in any \"\n\"format string. For inline assembly templates this is particularly useful as \"\n\"arguments are often used more than once. For more complex inline assembly \"\n\"using this facility is generally recommended, as it improves readability, \"\n\"and allows reordering instructions without changing the argument order.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:104\nmsgid \"We can further refine the above example to avoid the `mov` instruction:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:118\nmsgid \"\"\n\"We can see that `inout` is used to specify an argument that is both input \"\n\"and output. This is different from specifying an input and output separately \"\n\"in that it is guaranteed to assign both to the same register.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:121\nmsgid \"\"\n\"It is also possible to specify different variables for the input and output \"\n\"parts of an `inout` operand:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:136\nmsgid \"Late output operands\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:138\nmsgid \"\"\n\"The Rust compiler is conservative with its allocation of operands. It is \"\n\"assumed that an `out` can be written at any time, and can therefore not \"\n\"share its location with any other argument. However, to guarantee optimal \"\n\"performance it is important to use as few registers as possible, so they \"\n\"won't have to be saved and reloaded around the inline assembly block. To \"\n\"achieve this Rust provides a `lateout` specifier. This can be used on any \"\n\"output that is written only after all inputs have been consumed. There is \"\n\"also an `inlateout` variant of this specifier.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:146\nmsgid \"\"\n\"Here is an example where `inlateout` _cannot_ be used in `release` mode or \"\n\"other optimized cases:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:157 src/unsafe/asm.md:189 src/unsafe/asm.md:472\nmsgid \"\\\"add {0}, {1}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:158\nmsgid \"\\\"add {0}, {2}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:168\nmsgid \"\"\n\"In unoptimized cases (e.g. `Debug` mode), replacing `inout(reg) a` with \"\n\"`inlateout(reg) a` in the above example can continue to give the expected \"\n\"result. However, with `release` mode or other optimized cases, using \"\n\"`inlateout(reg) a` can instead lead to the final value `a = 16`, causing the \"\n\"assertion to fail.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:173\nmsgid \"\"\n\"This is because in optimized cases, the compiler is free to allocate the \"\n\"same register for inputs `b` and `c` since it knows that they have the same \"\n\"value. Furthermore, when `inlateout` is used, `a` and `c` could be allocated \"\n\"to the same register, in which case the first `add` instruction would \"\n\"overwrite the initial load from variable `c`. This is in contrast to how \"\n\"using `inout(reg) a` ensures a separate register is allocated for `a`.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:179\nmsgid \"\"\n\"However, the following example can use `inlateout` since the output is only \"\n\"modified after all input registers have been read:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:195\nmsgid \"\"\n\"As you can see, this assembly fragment will still work correctly if `a` and \"\n\"`b` are assigned to the same register.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:197\nmsgid \"Explicit register operands\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:199\nmsgid \"\"\n\"Some instructions require that the operands be in a specific register. \"\n\"Therefore, Rust inline assembly provides some more specific constraint \"\n\"specifiers. While `reg` is generally available on any architecture, explicit \"\n\"registers are highly architecture specific. E.g. for x86 the general purpose \"\n\"registers `eax`, `ebx`, `ecx`, `edx`, `ebp`, `esi`, and `edi` among others \"\n\"can be addressed by their name.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:209\nmsgid \"\\\"out 0x64, eax\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:209 src/unsafe/asm.md:285\nmsgid \"\\\"eax\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:214\nmsgid \"\"\n\"In this example we call the `out` instruction to output the content of the \"\n\"`cmd` variable to port `0x64`. Since the `out` instruction only accepts \"\n\"`eax` (and its sub registers) as operand we had to use the `eax` constraint \"\n\"specifier.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:216\nmsgid \"\"\n\"**Note**: unlike other operand types, explicit register operands cannot be \"\n\"used in the template string: you can't use `{}` and should write the \"\n\"register name directly instead. Also, they must appear at the end of the \"\n\"operand list after all other operand types.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:218\nmsgid \"Consider this example which uses the x86 `mul` instruction:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:230\nmsgid \"\"\n\"// The x86 mul instruction takes rax as an implicit input and writes\\n\"\n\"            // the 128-bit result of the multiplication to rax:rdx.\\n\"\n\"            \\\"mul {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:234 src/unsafe/asm.md:356\nmsgid \"\\\"rax\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:235\nmsgid \"\\\"rdx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:244\nmsgid \"\"\n\"This uses the `mul` instruction to multiply two 64-bit inputs with a 128-bit \"\n\"result. The only explicit operand is a register, that we fill from the \"\n\"variable `a`. The second operand is implicit, and must be the `rax` \"\n\"register, which we fill from the variable `b`. The lower 64 bits of the \"\n\"result are stored in `rax` from which we fill the variable `lo`. The higher \"\n\"64 bits are stored in `rdx` from which we fill the variable `hi`.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:250\nmsgid \"Clobbered registers\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:252\nmsgid \"\"\n\"In many cases inline assembly will modify state that is not needed as an \"\n\"output. Usually this is either because we have to use a scratch register in \"\n\"the assembly or because instructions modify state that we don't need to \"\n\"further examine. This state is generally referred to as being \\\"clobbered\\\". \"\n\"We need to tell the compiler about this since it may need to save and \"\n\"restore this state around the inline assembly block.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:262\nmsgid \"// three entries of four bytes each\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:264\nmsgid \"\"\n\"// String is stored as ascii in ebx, edx, ecx in order\\n\"\n\"    // Because ebx is reserved, the asm needs to preserve the value of it.\\n\"\n\"    // So we push and pop it around the main asm.\\n\"\n\"    // 64 bit mode on 64 bit processors does not allow pushing/popping of\\n\"\n\"    // 32 bit registers (like ebx), so we have to use the extended rbx \"\n\"register instead.\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:272\nmsgid \"\\\"push rbx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:273\nmsgid \"\\\"cpuid\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:274\nmsgid \"\\\"mov [rdi], ebx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:275\nmsgid \"\\\"mov [rdi + 4], edx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:276\nmsgid \"\\\"mov [rdi + 8], ecx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:277\nmsgid \"\\\"pop rbx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:278\nmsgid \"\"\n\"// We use a pointer to an array for storing the values to simplify\\n\"\n\"            // the Rust code at the cost of a couple more asm instructions\\n\"\n\"            // This is more explicit with how the asm works however, as \"\n\"opposed\\n\"\n\"            // to explicit register outputs such as `out(\\\"ecx\\\") val`\\n\"\n\"            // The *pointer itself* is only an input even though it's \"\n\"written behind\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:283 src/unsafe/asm.md:354\nmsgid \"\\\"rdi\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:284\nmsgid \"// select cpuid 0, also specify eax as clobbered\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:286\nmsgid \"// cpuid clobbers these registers too\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:287\nmsgid \"\\\"ecx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:288\nmsgid \"\\\"edx\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:293\nmsgid \"\\\"CPU Manufacturer ID: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:300\nmsgid \"\"\n\"In the example above we use the `cpuid` instruction to read the CPU \"\n\"manufacturer ID. This instruction writes to `eax` with the maximum supported \"\n\"`cpuid` argument and `ebx`, `edx`, and `ecx` with the CPU manufacturer ID as \"\n\"ASCII bytes in that order.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:303\nmsgid \"\"\n\"Even though `eax` is never read we still need to tell the compiler that the \"\n\"register has been modified so that the compiler can save any values that \"\n\"were in these registers before the asm. This is done by declaring it as an \"\n\"output but with `_` instead of a variable name, which indicates that the \"\n\"output value is to be discarded.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:305\nmsgid \"\"\n\"This code also works around the limitation that `ebx` is a reserved register \"\n\"by LLVM. That means that LLVM assumes that it has full control over the \"\n\"register and it must be restored to its original state before exiting the \"\n\"asm block, so it cannot be used as an input or output **except** if the \"\n\"compiler uses it to fulfill a general register class (e.g. `in(reg)`). This \"\n\"makes `reg` operands dangerous when using reserved registers as we could \"\n\"unknowingly corrupt our input or output because they share the same register.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:307\nmsgid \"\"\n\"To work around this we use `rdi` to store the pointer to the output array, \"\n\"save `ebx` via `push`, read from `ebx` inside the asm block into the array \"\n\"and then restore `ebx` to its original state via `pop`. The `push` and `pop` \"\n\"use the full 64-bit `rbx` version of the register to ensure that the entire \"\n\"register is saved. On 32 bit targets the code would instead use `ebx` in the \"\n\"`push`/`pop`.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:309\nmsgid \"\"\n\"This can also be used with a general register class to obtain a scratch \"\n\"register for use inside the asm code:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:314\nmsgid \"// Multiply x by 6 using shifts and adds\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:319\nmsgid \"\\\"mov {tmp}, {x}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:320\nmsgid \"\\\"shl {tmp}, 1\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:321\nmsgid \"\\\"shl {x}, 2\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:322\nmsgid \"\\\"add {x}, {tmp}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:331\nmsgid \"Symbol operands and ABI clobbers\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:333\nmsgid \"\"\n\"By default, `asm!` assumes that any register not specified as an output will \"\n\"have its contents preserved by the assembly code. The [`clobber_abi`]\"\n\"(https://doc.rust-lang.org/stable/reference/inline-assembly.html#abi-\"\n\"clobbers) argument to `asm!` tells the compiler to automatically insert the \"\n\"necessary clobber operands according to the given calling convention ABI: \"\n\"any register which is not fully preserved in that ABI will be treated as \"\n\"clobbered.  Multiple `clobber_abi` arguments may be provided and all \"\n\"clobbers from all specified ABIs will be inserted.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:341 src/unsafe/asm.md:359\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:342\nmsgid \"\\\"arg = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:350\nmsgid \"\\\"call {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:351\nmsgid \"// Function pointer to call\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:353\nmsgid \"// 1st argument in rdi\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:355\nmsgid \"// Return value in rax\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:357\nmsgid \"\"\n\"// Mark all registers which are not preserved by the \\\"C\\\" calling\\n\"\n\"            // convention as clobbered.\\n\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:367\nmsgid \"Register template modifiers\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:369\nmsgid \"\"\n\"In some cases, fine control is needed over the way a register name is \"\n\"formatted when inserted into the template string. This is needed when an \"\n\"architecture's assembly language has several names for the same register, \"\n\"each typically being a \\\"view\\\" over a subset of the register (e.g. the low \"\n\"32 bits of a 64-bit register).\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:371\nmsgid \"\"\n\"By default the compiler will always choose the name that refers to the full \"\n\"register size (e.g. `rax` on x86-64, `eax` on x86, etc).\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:373\nmsgid \"\"\n\"This default can be overridden by using modifiers on the template string \"\n\"operands, just like you would with format strings:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:382\nmsgid \"\\\"mov {0:h}, {0:l}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:389\nmsgid \"\"\n\"In this example, we use the `reg_abcd` register class to restrict the \"\n\"register allocator to the 4 legacy x86 registers (`ax`, `bx`, `cx`, `dx`) of \"\n\"which the first two bytes can be addressed independently.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:391\nmsgid \"\"\n\"Let us assume that the register allocator has chosen to allocate `x` in the \"\n\"`ax` register. The `h` modifier will emit the register name for the high \"\n\"byte of that register and the `l` modifier will emit the register name for \"\n\"the low byte. The asm code will therefore be expanded as `mov ah, al` which \"\n\"copies the low byte of the value into the high byte.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:394\nmsgid \"\"\n\"If you use a smaller data type (e.g. `u16`) with an operand and forget to \"\n\"use template modifiers, the compiler will emit a warning and suggest the \"\n\"correct modifier to use.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:396\nmsgid \"Memory address operands\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:398\nmsgid \"\"\n\"Sometimes assembly instructions require operands passed via memory addresses/\"\n\"memory locations. You have to manually use the memory address syntax \"\n\"specified by the target architecture. For example, on x86/x86_64 using Intel \"\n\"assembly syntax, you should wrap inputs/outputs in `[]` to indicate they are \"\n\"memory operands:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:408\nmsgid \"\\\"fldcw [{}]\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:414\nmsgid \"Labels\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:416\nmsgid \"\"\n\"Any reuse of a named label, local or otherwise, can result in an assembler \"\n\"or linker error or may cause other strange behavior. Reuse of a named label \"\n\"can happen in a variety of ways including:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:418\nmsgid \"\"\n\"explicitly: using a label more than once in one `asm!` block, or multiple \"\n\"times across blocks.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:419\nmsgid \"\"\n\"implicitly via inlining: the compiler is allowed to instantiate multiple \"\n\"copies of an `asm!` block, for example when the function containing it is \"\n\"inlined in multiple places.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:420\nmsgid \"\"\n\"implicitly via LTO: LTO can cause code from _other crates_ to be placed in \"\n\"the same codegen unit, and so could bring in arbitrary labels.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:422\nmsgid \"\"\n\"As a consequence, you should only use GNU assembler **numeric** [local \"\n\"labels](https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-\"\n\"Labels) inside inline assembly code. Defining symbols in assembly code may \"\n\"lead to assembler and/or linker errors due to duplicate symbol definitions.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:424\nmsgid \"\"\n\"Moreover, on x86 when using the default Intel syntax, due to [an LLVM bug]\"\n\"(https://bugs.llvm.org/show_bug.cgi?id=36144), you shouldn't use labels \"\n\"exclusively made of `0` and `1` digits, e.g. `0`, `11` or `101010`, as they \"\n\"may end up being interpreted as binary values. Using `options(att_syntax)` \"\n\"will avoid any ambiguity, but that affects the syntax of the _entire_ `asm!` \"\n\"block. (See [Options](#options), below, for more on `options`.)\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:433\nmsgid \"\\\"mov {0}, 10\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:434 src/unsafe/asm.md:439\nmsgid \"\\\"2:\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:435\nmsgid \"\\\"sub {0}, 1\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:436\nmsgid \"\\\"cmp {0}, 3\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:437\nmsgid \"\\\"jle 2f\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:438\nmsgid \"\\\"jmp 2b\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:440\nmsgid \"\\\"add {0}, 2\\\"\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:448\nmsgid \"\"\n\"This will decrement the `{0}` register value from 10 to 3, then add 2 and \"\n\"store it in `a`.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:450\nmsgid \"This example shows a few things:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:452\nmsgid \"\"\n\"First, that the same number can be used as a label multiple times in the \"\n\"same inline block.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:453\nmsgid \"\"\n\"Second, that when a numeric label is used as a reference (as an instruction \"\n\"operand, for example), the suffixes “b” (“backward”) or ”f” (“forward”) \"\n\"should be added to the numeric label. It will then refer to the nearest \"\n\"label defined by this number in this direction.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:458\nmsgid \"Options\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:460\nmsgid \"\"\n\"By default, an inline assembly block is treated the same way as an external \"\n\"FFI function call with a custom calling convention: it may read/write \"\n\"memory, have observable side effects, etc. However, in many cases it is \"\n\"desirable to give the compiler more information about what the assembly code \"\n\"is actually doing so that it can optimize better.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:462\nmsgid \"Let's take our previous example of an `add` instruction:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:481\nmsgid \"\"\n\"Options can be provided as an optional final argument to the `asm!` macro. \"\n\"We specified three options here:\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:483\nmsgid \"\"\n\"`pure` means that the asm code has no observable side effects and that its \"\n\"output depends only on its inputs. This allows the compiler optimizer to \"\n\"call the inline asm fewer times or even eliminate it entirely.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:484\nmsgid \"\"\n\"`nomem` means that the asm code does not read or write to memory. By default \"\n\"the compiler will assume that inline assembly can read or write any memory \"\n\"address that is accessible to it (e.g. through a pointer passed as an \"\n\"operand, or a global).\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:485\nmsgid \"\"\n\"`nostack` means that the asm code does not push any data onto the stack. \"\n\"This allows the compiler to use optimizations such as the stack red zone on \"\n\"x86-64 to avoid stack pointer adjustments.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:487\nmsgid \"\"\n\"These allow the compiler to better optimize code using `asm!`, for example \"\n\"by eliminating pure `asm!` blocks whose outputs are not needed.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:489\nmsgid \"\"\n\"See the [reference](https://doc.rust-lang.org/stable/reference/inline-\"\n\"assembly.html) for the full list of available options and their effects.\"\nmsgstr \"\"\n\n#: src/compatibility.md:3\nmsgid \"\"\n\"The Rust language is evolving rapidly, and because of this certain \"\n\"compatibility issues can arise, despite efforts to ensure forwards-\"\n\"compatibility wherever possible.\"\nmsgstr \"\"\n\n#: src/compatibility.md:7\nmsgid \"[Raw identifiers](compatibility/raw_identifiers.md)\"\nmsgstr \"\"\n\n#: src/compatibility/raw_identifiers.md:3\nmsgid \"\"\n\"Rust, like many programming languages, has the concept of \\\"keywords\\\". \"\n\"These identifiers mean something to the language, and so you cannot use them \"\n\"in places like variable names, function names, and other places. Raw \"\n\"identifiers let you use keywords where they would not normally be allowed. \"\n\"This is particularly useful when Rust introduces new keywords, and a library \"\n\"using an older edition of Rust has a variable or function with the same name \"\n\"as a keyword introduced in a newer edition.\"\nmsgstr \"\"\n\n#: src/compatibility/raw_identifiers.md:11\nmsgid \"\"\n\"For example, consider a crate `foo` compiled with the 2015 edition of Rust \"\n\"that exports a function named `try`. This keyword is reserved for a new \"\n\"feature in the 2018 edition, so without raw identifiers, we would have no \"\n\"way to name the function.\"\nmsgstr \"\"\n\n#: src/compatibility/raw_identifiers.md:24\nmsgid \"You'll get this error:\"\nmsgstr \"\"\n\n#: src/compatibility/raw_identifiers.md:34\nmsgid \"You can write this with a raw identifier:\"\nmsgstr \"\"\n\n#: src/meta.md:3\nmsgid \"\"\n\"Some topics aren't exactly relevant to how you program runs but provide you \"\n\"tooling or infrastructure support which just makes things better for \"\n\"everyone. These topics include:\"\nmsgstr \"\"\n\n#: src/meta.md:7\nmsgid \"\"\n\"[Documentation](meta/doc.md): Generate library documentation for users via \"\n\"the included `rustdoc`.\"\nmsgstr \"\"\n\n#: src/meta.md:9\nmsgid \"\"\n\"[Playground](meta/playground.md): Integrate the Rust Playground in your \"\n\"documentation.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:3\nmsgid \"\"\n\"Use `cargo doc` to build documentation in `target/doc`, `cargo doc --open` \"\n\"will automatically open it in your web browser.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:6\nmsgid \"\"\n\"Use `cargo test` to run all tests (including documentation tests), and \"\n\"`cargo test --doc` to only run documentation tests.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:9\nmsgid \"\"\n\"These commands will appropriately invoke `rustdoc` (and `rustc`) as required.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:11\nmsgid \"Doc comments\"\nmsgstr \"\"\n\n#: src/meta/doc.md:13\nmsgid \"\"\n\"Doc comments are very useful for big projects that require documentation. \"\n\"When running `rustdoc`, these are the comments that get compiled into \"\n\"documentation. They are denoted by a `///`, and support [Markdown](https://\"\n\"en.wikipedia.org/wiki/Markdown).\"\nmsgstr \"\"\n\n#: src/meta/doc.md:18\nmsgid \"\\\"doc\\\"\"\nmsgstr \"\"\n\n#: src/meta/doc.md:19\nmsgid \"/// A human being is represented here\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:22\nmsgid \"/// A person must have a name, no matter how much Juliet may hate it\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:27\nmsgid \"\"\n\"/// Creates a person with the given name.\\n\"\n\"    ///\\n\"\n\"    /// # Examples\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // You can have rust code between fences inside the comments\\n\"\n\"    /// // If you pass --test to `rustdoc`, it will even test it for you!\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:43\nmsgid \"\"\n\"/// Gives a friendly hello!\\n\"\n\"    ///\\n\"\n\"    /// Says \\\"Hello, [name](Person::name)\\\" to the `Person` it is called \"\n\"on.\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:47\nmsgid \"\\\"Hello, {}!\\\"\"\nmsgstr \"\"\n\n#: src/meta/doc.md:52\nmsgid \"\\\"John\\\"\"\nmsgstr \"\"\n\n#: src/meta/doc.md:58\nmsgid \"\"\n\"To run the tests, first build the code as a library, then tell `rustdoc` \"\n\"where to find the library so it can link it into each doctest program:\"\nmsgstr \"\"\n\n#: src/meta/doc.md:61\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/meta/doc.md:66\nmsgid \"Doc attributes\"\nmsgstr \"\"\n\n#: src/meta/doc.md:68\nmsgid \"\"\n\"Below are a few examples of the most common `#[doc]` attributes used with \"\n\"`rustdoc`.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:71\nmsgid \"`inline`\"\nmsgstr \"\"\n\n#: src/meta/doc.md:73\nmsgid \"Used to inline docs, instead of linking out to separate page.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:78\nmsgid \"/// bar docs\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:81\nmsgid \"/// the docs for Bar\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:86\nmsgid \"`no_inline`\"\nmsgstr \"\"\n\n#: src/meta/doc.md:88\nmsgid \"Used to prevent linking out to separate page or anywhere.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:91\nmsgid \"// Example from libcore/prelude\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:96\nmsgid \"`hidden`\"\nmsgstr \"\"\n\n#: src/meta/doc.md:98\nmsgid \"Using this tells `rustdoc` not to include this in documentation:\"\nmsgstr \"\"\n\n#: src/meta/doc.md:101\nmsgid \"// Example from the futures-rs library\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:106\nmsgid \"\"\n\"For documentation, `rustdoc` is widely used by the community. It's what is \"\n\"used to generate the [std library docs](https://doc.rust-lang.org/std/).\"\nmsgstr \"\"\n\n#: src/meta/doc.md:111\nmsgid \"\"\n\"[The Rust Book: Making Useful Documentation Comments](https://doc.rust-lang.\"\n\"org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-\"\n\"comments)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:112\nmsgid \"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/index.html)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:113\nmsgid \"\"\n\"[The Reference: Doc comments](https://doc.rust-lang.org/stable/reference/\"\n\"comments.html#doc-comments)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:114\nmsgid \"\"\n\"[RFC 1574: API Documentation Conventions](https://rust-lang.github.io/\"\n\"rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-\"\n\"conventions-text)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:115\nmsgid \"\"\n\"[RFC 1946: Relative links to other items from doc comments (intra-rustdoc \"\n\"links)](https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:116\nmsgid \"\"\n\"[Is there any documentation style guide for comments? (reddit)](https://www.\"\n\"reddit.com/r/rust/comments/ahb50s/\"\n\"is_there_any_documentation_style_guide_for/)\"\nmsgstr \"\"\n\n#: src/meta/playground.md:3\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) is a way to experiment \"\n\"with Rust code through a web interface.\"\nmsgstr \"\"\n\n#: src/meta/playground.md:6\nmsgid \"Using it with `mdbook`\"\nmsgstr \"\"\n\n#: src/meta/playground.md:8\nmsgid \"\"\n\"In [`mdbook`](https://github.com/rust-lang/mdBook), you can make code \"\n\"examples playable and editable.\"\nmsgstr \"\"\n\n#: src/meta/playground.md:16\nmsgid \"\"\n\"This allows the reader to both run your code sample, but also modify and \"\n\"tweak it. The key here is the adding of the word `editable` to your \"\n\"codefence block separated by a comma.\"\nmsgstr \"\"\n\n#: src/meta/playground.md:26\nmsgid \"\"\n\"Additionally, you can add `ignore` if you want `mdbook` to skip your code \"\n\"when it builds and tests.\"\nmsgstr \"\"\n\n#: src/meta/playground.md:35\nmsgid \"Using it with docs\"\nmsgstr \"\"\n\n#: src/meta/playground.md:37\nmsgid \"\"\n\"You may have noticed in some of the [official Rust docs](https://doc.rust-\"\n\"lang.org/core/) a button that says \\\"Run\\\", which opens the code sample up \"\n\"in a new tab in Rust Playground. This feature is enabled if you use the \"\n\"`#[doc]` attribute called [`html_playground_url`](https://doc.rust-lang.org/\"\n\"rustdoc/write-documentation/the-doc-attribute.html#html_playground_url).\"\nmsgstr \"\"\n\n#: src/meta/playground.md:42\nmsgid \"\"\n\"````text\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\nmsgstr \"\"\n\n#: src/meta/playground.md:51\nmsgid \"[The Rust Playground](https://play.rust-lang.org/)\"\nmsgstr \"\"\n\n#: src/meta/playground.md:52\nmsgid \"\"\n\"[The Rust Playground On Github](https://github.com/integer32llc/rust-\"\n\"playground/)\"\nmsgstr \"\"\n\n#: src/meta/playground.md:53\nmsgid \"\"\n\"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)\"\nmsgstr \"\"\n"
  },
  {
    "path": "po/ja.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Rust By Example\\n\"\n\"POT-Creation-Date: 2024-06-14T21:07:36+09:00\\n\"\n\"PO-Revision-Date: 2023-12-19 09:55+0900\\n\"\n\"Last-Translator: Naoya Hatta <dalance@gmail.com>\\n\"\n\"Language-Team: Japanese https://github.com/rust-lang-ja/rust-by-example\\n\"\n\"Language: ja\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: src/SUMMARY.md:1\nmsgid \"Summary\"\nmsgstr \"Summary\"\n\n#: src/SUMMARY.md:3\nmsgid \"Introduction\"\nmsgstr \"はじめに\"\n\n#: src/SUMMARY.md:5 src/hello.md:1\nmsgid \"Hello World\"\nmsgstr \"Hello World\"\n\n#: src/SUMMARY.md:6 src/hello/comment.md:1\nmsgid \"Comments\"\nmsgstr \"コメント\"\n\n#: src/SUMMARY.md:7 src/hello/print.md:1\nmsgid \"Formatted print\"\nmsgstr \"フォーマットして出力\"\n\n#: src/SUMMARY.md:8 src/hello/print/print_debug.md:1\nmsgid \"Debug\"\nmsgstr \"Debug\"\n\n#: src/SUMMARY.md:9 src/hello/print/print_display.md:1\nmsgid \"Display\"\nmsgstr \"Display\"\n\n#: src/SUMMARY.md:10 src/hello/print/print_display/testcase_list.md:1\nmsgid \"Testcase: List\"\nmsgstr \"テストケース：リスト\"\n\n#: src/SUMMARY.md:11 src/hello/print/fmt.md:1\nmsgid \"Formatting\"\nmsgstr \"フォーマット\"\n\n#: src/SUMMARY.md:13 src/primitives.md:1\nmsgid \"Primitives\"\nmsgstr \"基本データ型\"\n\n#: src/SUMMARY.md:14 src/primitives/literals.md:1\nmsgid \"Literals and operators\"\nmsgstr \"リテラルと演算子\"\n\n#: src/SUMMARY.md:15 src/primitives/tuples.md:1\nmsgid \"Tuples\"\nmsgstr \"タプル\"\n\n#: src/SUMMARY.md:16 src/primitives/array.md:1\nmsgid \"Arrays and Slices\"\nmsgstr \"配列とスライス\"\n\n#: src/SUMMARY.md:18 src/custom_types.md:1\nmsgid \"Custom Types\"\nmsgstr \"カスタム型\"\n\n#: src/SUMMARY.md:19 src/custom_types/structs.md:1\nmsgid \"Structures\"\nmsgstr \"構造体\"\n\n#: src/SUMMARY.md:20 src/custom_types/enum.md:1\nmsgid \"Enums\"\nmsgstr \"列挙型\"\n\n#: src/SUMMARY.md:21 src/custom_types/enum/enum_use.md:1\nmsgid \"use\"\nmsgstr \"use\"\n\n#: src/SUMMARY.md:22 src/custom_types/enum/c_like.md:1\nmsgid \"C-like\"\nmsgstr \"C言語ライクな列挙型\"\n\n#: src/SUMMARY.md:23 src/custom_types/enum/testcase_linked_list.md:1\nmsgid \"Testcase: linked-list\"\nmsgstr \"テストケース：連結リスト\"\n\n#: src/SUMMARY.md:24 src/custom_types/constants.md:1\nmsgid \"constants\"\nmsgstr \"定数\"\n\n#: src/SUMMARY.md:26 src/variable_bindings.md:1\nmsgid \"Variable Bindings\"\nmsgstr \"変数束縛\"\n\n#: src/SUMMARY.md:27 src/SUMMARY.md:120 src/SUMMARY.md:123\n#: src/variable_bindings/mut.md:1 src/scope/move/mut.md:1\n#: src/scope/borrow/mut.md:1\nmsgid \"Mutability\"\nmsgstr \"ミュータビリティ\"\n\n#: src/SUMMARY.md:28 src/variable_bindings/scope.md:1\nmsgid \"Scope and Shadowing\"\nmsgstr \"スコープとシャドーイング\"\n\n#: src/SUMMARY.md:29 src/variable_bindings/declare.md:1\nmsgid \"Declare first\"\nmsgstr \"前方宣言\"\n\n#: src/SUMMARY.md:30 src/variable_bindings/freeze.md:1\nmsgid \"Freezing\"\nmsgstr \"値の凍結\"\n\n#: src/SUMMARY.md:32 src/types.md:1\nmsgid \"Types\"\nmsgstr \"型\"\n\n#: src/SUMMARY.md:33 src/types/cast.md:1\nmsgid \"Casting\"\nmsgstr \"型キャスト\"\n\n#: src/SUMMARY.md:34 src/types/literals.md:1\nmsgid \"Literals\"\nmsgstr \"リテラル\"\n\n#: src/SUMMARY.md:35 src/types/inference.md:1\nmsgid \"Inference\"\nmsgstr \"型推論\"\n\n#: src/SUMMARY.md:36 src/SUMMARY.md:124 src/types/alias.md:1\n#: src/scope/borrow/alias.md:1\nmsgid \"Aliasing\"\nmsgstr \"エイリアス\"\n\n#: src/SUMMARY.md:38 src/conversion.md:1\nmsgid \"Conversion\"\nmsgstr \"型変換\"\n\n#: src/SUMMARY.md:39 src/conversion/from_into.md:1\nmsgid \"`From` and `Into`\"\nmsgstr \"`From`と`Into`\"\n\n#: src/SUMMARY.md:40 src/conversion/try_from_try_into.md:1\nmsgid \"`TryFrom` and `TryInto`\"\nmsgstr \"`TryFrom`と`TryInto`\"\n\n#: src/SUMMARY.md:41\nmsgid \"To and from `String`s\"\nmsgstr \"`String`との型変換\"\n\n#: src/SUMMARY.md:43 src/expression.md:1\nmsgid \"Expressions\"\nmsgstr \"式\"\n\n#: src/SUMMARY.md:45 src/flow_control.md:1\nmsgid \"Flow of Control\"\nmsgstr \"制御フロー\"\n\n#: src/SUMMARY.md:46 src/flow_control/if_else.md:1\nmsgid \"if/else\"\nmsgstr \"if/else\"\n\n#: src/SUMMARY.md:47 src/flow_control/loop.md:1\nmsgid \"loop\"\nmsgstr \"loop\"\n\n#: src/SUMMARY.md:48 src/flow_control/loop/nested.md:1\nmsgid \"Nesting and labels\"\nmsgstr \"ネストとラベル\"\n\n#: src/SUMMARY.md:49 src/flow_control/loop/return.md:1\nmsgid \"Returning from loops\"\nmsgstr \"loopが返す値\"\n\n#: src/SUMMARY.md:50 src/flow_control/while.md:1\nmsgid \"while\"\nmsgstr \"while\"\n\n#: src/SUMMARY.md:51 src/flow_control/for.md:3\nmsgid \"for and range\"\nmsgstr \"for と range\"\n\n#: src/SUMMARY.md:52 src/flow_control/match.md:1\nmsgid \"match\"\nmsgstr \"match\"\n\n#: src/SUMMARY.md:53 src/flow_control/match/destructuring.md:1\nmsgid \"Destructuring\"\nmsgstr \"デストラクト\"\n\n#: src/SUMMARY.md:54\n#: src/flow_control/match/destructuring/destructure_tuple.md:1\nmsgid \"tuples\"\nmsgstr \"タプル\"\n\n#: src/SUMMARY.md:55\n#: src/flow_control/match/destructuring/destructure_slice.md:1\nmsgid \"arrays/slices\"\nmsgstr \"配列とスライス\"\n\n#: src/SUMMARY.md:56 src/flow_control/match/destructuring/destructure_enum.md:1\nmsgid \"enums\"\nmsgstr \"列挙型\"\n\n#: src/SUMMARY.md:57\n#: src/flow_control/match/destructuring/destructure_pointers.md:1\nmsgid \"pointers/ref\"\nmsgstr \"ポインタとref\"\n\n#: src/SUMMARY.md:58\n#: src/flow_control/match/destructuring/destructure_structures.md:1\nmsgid \"structs\"\nmsgstr \"構造体\"\n\n#: src/SUMMARY.md:59 src/flow_control/match/guard.md:1\nmsgid \"Guards\"\nmsgstr \"ガード\"\n\n#: src/SUMMARY.md:60 src/flow_control/match/binding.md:1\nmsgid \"Binding\"\nmsgstr \"束縛\"\n\n#: src/SUMMARY.md:61 src/flow_control/if_let.md:1\nmsgid \"if let\"\nmsgstr \"if let\"\n\n#: src/SUMMARY.md:62 src/flow_control/let_else.md:1\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/SUMMARY.md:63 src/flow_control/while_let.md:1\nmsgid \"while let\"\nmsgstr \"while let\"\n\n#: src/SUMMARY.md:65 src/SUMMARY.md:103 src/SUMMARY.md:128 src/fn.md:1\n#: src/generics/gen_fn.md:1 src/scope/lifetime/fn.md:1\nmsgid \"Functions\"\nmsgstr \"関数\"\n\n#: src/SUMMARY.md:66 src/SUMMARY.md:129 src/scope/lifetime/methods.md:1\nmsgid \"Methods\"\nmsgstr \"メソッド\"\n\n#: src/SUMMARY.md:67 src/fn/closures.md:1\nmsgid \"Closures\"\nmsgstr \"クロージャ\"\n\n#: src/SUMMARY.md:68 src/fn/closures/capture.md:1\nmsgid \"Capturing\"\nmsgstr \"要素の捕捉\"\n\n#: src/SUMMARY.md:69 src/fn/closures/input_parameters.md:1\nmsgid \"As input parameters\"\nmsgstr \"捕捉時の型推論\"\n\n#: src/SUMMARY.md:70 src/fn/closures/anonymity.md:1\nmsgid \"Type anonymity\"\nmsgstr \"匿名型\"\n\n#: src/SUMMARY.md:71 src/fn/closures/input_functions.md:1\nmsgid \"Input functions\"\nmsgstr \"関数を受け取る関数\"\n\n#: src/SUMMARY.md:72 src/fn/closures/output_parameters.md:1\nmsgid \"As output parameters\"\nmsgstr \"クロージャを返す関数\"\n\n#: src/SUMMARY.md:73 src/fn/closures/closure_examples.md:1\nmsgid \"Examples in `std`\"\nmsgstr \"`std`における使用例\"\n\n#: src/SUMMARY.md:74 src/fn/closures/closure_examples/iter_any.md:1\nmsgid \"Iterator::any\"\nmsgstr \"Iterator::any\"\n\n#: src/SUMMARY.md:75 src/fn/closures/closure_examples/iter_find.md:1\nmsgid \"Searching through iterators\"\nmsgstr \"イテレータによる検索\"\n\n#: src/SUMMARY.md:76 src/fn/hof.md:1\nmsgid \"Higher Order Functions\"\nmsgstr \"高階関数\"\n\n#: src/SUMMARY.md:77 src/fn/diverging.md:1\nmsgid \"Diverging functions\"\nmsgstr \"発散する関数\"\n\n#: src/SUMMARY.md:79 src/mod.md:1\nmsgid \"Modules\"\nmsgstr \"モジュール\"\n\n#: src/SUMMARY.md:80 src/mod/visibility.md:1\nmsgid \"Visibility\"\nmsgstr \"可視性\"\n\n#: src/SUMMARY.md:81 src/mod/struct_visibility.md:1\nmsgid \"Struct visibility\"\nmsgstr \"構造体の場合\"\n\n#: src/SUMMARY.md:82 src/mod/use.md:1\nmsgid \"The `use` declaration\"\nmsgstr \"`use`宣言\"\n\n#: src/SUMMARY.md:83 src/mod/super.md:1\nmsgid \"`super` and `self`\"\nmsgstr \"`super`と`self`\"\n\n#: src/SUMMARY.md:84 src/mod/split.md:1\nmsgid \"File hierarchy\"\nmsgstr \"ファイルの階層構造\"\n\n#: src/SUMMARY.md:86 src/SUMMARY.md:98 src/crates.md:1 src/attribute/crate.md:1\n#: src/std_misc/arg.md:30\nmsgid \"Crates\"\nmsgstr \"クレート\"\n\n#: src/SUMMARY.md:87 src/crates/lib.md:1\nmsgid \"Creating a Library\"\nmsgstr \"ライブラリの作成\"\n\n#: src/SUMMARY.md:88 src/crates/using_lib.md:1\nmsgid \"Using a Library\"\nmsgstr \"ライブラリの利用\"\n\n#: src/SUMMARY.md:90 src/cargo.md:1\nmsgid \"Cargo\"\nmsgstr \"Cargo\"\n\n#: src/SUMMARY.md:91 src/cargo/deps.md:1\nmsgid \"Dependencies\"\nmsgstr \"依存関係\"\n\n#: src/SUMMARY.md:92 src/cargo/conventions.md:1\nmsgid \"Conventions\"\nmsgstr \"規約\"\n\n#: src/SUMMARY.md:93\nmsgid \"Tests\"\nmsgstr \"テスト\"\n\n#: src/SUMMARY.md:94 src/cargo/build_scripts.md:1\nmsgid \"Build Scripts\"\nmsgstr \"ビルドスクリプト\"\n\n#: src/SUMMARY.md:96 src/attribute.md:1\nmsgid \"Attributes\"\nmsgstr \"アトリビュート\"\n\n#: src/SUMMARY.md:97 src/attribute/unused.md:1\nmsgid \"`dead_code`\"\nmsgstr \"`dead_code`\"\n\n#: src/SUMMARY.md:99 src/attribute/cfg.md:1\nmsgid \"`cfg`\"\nmsgstr \"`cfg`\"\n\n#: src/SUMMARY.md:100 src/attribute/cfg/custom.md:1\nmsgid \"Custom\"\nmsgstr \"条件の追加\"\n\n#: src/SUMMARY.md:102 src/generics.md:1\nmsgid \"Generics\"\nmsgstr \"ジェネリクス\"\n\n#: src/SUMMARY.md:104 src/generics/impl.md:1\nmsgid \"Implementation\"\nmsgstr \"実装\"\n\n#: src/SUMMARY.md:105 src/SUMMARY.md:131 src/SUMMARY.md:137\n#: src/generics/gen_trait.md:1 src/scope/lifetime/trait.md:1 src/trait.md:1\nmsgid \"Traits\"\nmsgstr \"トレイト\"\n\n#: src/SUMMARY.md:106 src/SUMMARY.md:132 src/generics/bounds.md:1\n#: src/scope/lifetime/lifetime_bounds.md:1\nmsgid \"Bounds\"\nmsgstr \"境界\"\n\n#: src/SUMMARY.md:107 src/generics/bounds/testcase_empty.md:1\nmsgid \"Testcase: empty bounds\"\nmsgstr \"テストケース：空トレイト\"\n\n#: src/SUMMARY.md:108 src/generics/multi_bounds.md:1\nmsgid \"Multiple bounds\"\nmsgstr \"複数の境界\"\n\n#: src/SUMMARY.md:109 src/generics/where.md:1\nmsgid \"Where clauses\"\nmsgstr \"Where句\"\n\n#: src/SUMMARY.md:110 src/generics/new_types.md:1\nmsgid \"New Type Idiom\"\nmsgstr \"ニュータイプイディオム\"\n\n#: src/SUMMARY.md:111 src/generics/assoc_items.md:1\nmsgid \"Associated items\"\nmsgstr \"関連要素\"\n\n#: src/SUMMARY.md:112 src/generics/assoc_items/the_problem.md:1\nmsgid \"The Problem\"\nmsgstr \"関連要素が必要になる状況\"\n\n#: src/SUMMARY.md:113 src/generics/assoc_items/types.md:1\nmsgid \"Associated types\"\nmsgstr \"関連型\"\n\n#: src/SUMMARY.md:114 src/generics/phantom.md:1\nmsgid \"Phantom type parameters\"\nmsgstr \"幽霊型パラメータ\"\n\n#: src/SUMMARY.md:115 src/generics/phantom/testcase_units.md:1\nmsgid \"Testcase: unit clarification\"\nmsgstr \"テストケース：単位を扱う\"\n\n#: src/SUMMARY.md:117 src/scope.md:1\nmsgid \"Scoping rules\"\nmsgstr \"スコープの規則\"\n\n#: src/SUMMARY.md:118 src/scope/raii.md:1\nmsgid \"RAII\"\nmsgstr \"RAII\"\n\n#: src/SUMMARY.md:119 src/scope/move.md:1\nmsgid \"Ownership and moves\"\nmsgstr \"所有権とムーブ\"\n\n#: src/SUMMARY.md:121 src/scope/move/partial_move.md:1\nmsgid \"Partial moves\"\nmsgstr \"部分的ムーブ\"\n\n#: src/SUMMARY.md:122 src/scope/borrow.md:1\nmsgid \"Borrowing\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md:125 src/scope/borrow/ref.md:1\nmsgid \"The ref pattern\"\nmsgstr \"refパターン\"\n\n#: src/SUMMARY.md:126 src/scope/lifetime.md:1\nmsgid \"Lifetimes\"\nmsgstr \"ライフタイム\"\n\n#: src/SUMMARY.md:127 src/scope/lifetime/explicit.md:1\nmsgid \"Explicit annotation\"\nmsgstr \"明示的アノテーション\"\n\n#: src/SUMMARY.md:130 src/scope/lifetime/struct.md:1\nmsgid \"Structs\"\nmsgstr \"構造体\"\n\n#: src/SUMMARY.md:133 src/scope/lifetime/lifetime_coercion.md:1\nmsgid \"Coercion\"\nmsgstr \"強制\"\n\n#: src/SUMMARY.md:134 src/scope/lifetime/static_lifetime.md:1\nmsgid \"Static\"\nmsgstr \"スタティックライフタイム\"\n\n#: src/SUMMARY.md:135 src/scope/lifetime/elision.md:1\nmsgid \"Elision\"\nmsgstr \"省略\"\n\n#: src/SUMMARY.md:138 src/trait/derive.md:1\nmsgid \"Derive\"\nmsgstr \"導出(Derive)\"\n\n#: src/SUMMARY.md:139 src/trait/dyn.md:1\nmsgid \"Returning Traits with `dyn`\"\nmsgstr \"`dyn`を利用してトレイトを返す\"\n\n#: src/SUMMARY.md:140 src/trait/ops.md:1\nmsgid \"Operator Overloading\"\nmsgstr \"演算子のオーバーロード\"\n\n#: src/SUMMARY.md:141 src/trait/drop.md:1\nmsgid \"Drop\"\nmsgstr \"ドロップ\"\n\n#: src/SUMMARY.md:142 src/trait/iter.md:1\nmsgid \"Iterators\"\nmsgstr \"イテレータ\"\n\n#: src/SUMMARY.md:143 src/trait/impl_trait.md:1\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md:144 src/trait/clone.md:1\nmsgid \"Clone\"\nmsgstr \"クローン\"\n\n#: src/SUMMARY.md:145 src/trait/supertraits.md:1\nmsgid \"Supertraits\"\nmsgstr \"スーパートレイト\"\n\n#: src/SUMMARY.md:146 src/trait/disambiguating.md:1\nmsgid \"Disambiguating overlapping traits\"\nmsgstr \"トレイトの曖昧性解決\"\n\n#: src/SUMMARY.md:148 src/macros.md:1\nmsgid \"macro_rules!\"\nmsgstr \"macro_rules!\"\n\n#: src/SUMMARY.md:149 src/macros/syntax.md:1\nmsgid \"Syntax\"\nmsgstr \"構文\"\n\n#: src/SUMMARY.md:150 src/macros/designators.md:1\nmsgid \"Designators\"\nmsgstr \"識別子\"\n\n#: src/SUMMARY.md:151 src/macros/overload.md:1\nmsgid \"Overload\"\nmsgstr \"オーバーロード\"\n\n#: src/SUMMARY.md:152 src/macros/repeat.md:1\nmsgid \"Repeat\"\nmsgstr \"繰り返し\"\n\n#: src/SUMMARY.md:153 src/macros/dry.md:1\nmsgid \"DRY (Don't Repeat Yourself)\"\nmsgstr \"DRY (Don't Repeat Yourself)\"\n\n#: src/SUMMARY.md:154\nmsgid \"DSL (Domain Specific Languages)\"\nmsgstr \"Domain Specific Languages (ドメイン特化言語、DSLs)\"\n\n#: src/SUMMARY.md:155\nmsgid \"Variadics\"\nmsgstr \"可変個引数\"\n\n#: src/SUMMARY.md:157 src/error.md:1\nmsgid \"Error handling\"\nmsgstr \"エラーハンドリング\"\n\n#: src/SUMMARY.md:158 src/error/panic.md:1\nmsgid \"`panic`\"\nmsgstr \"`panic`\"\n\n#: src/SUMMARY.md:159\nmsgid \"`abort` & `unwind`\"\nmsgstr \"`abort`と`unwind`\"\n\n#: src/SUMMARY.md:160 src/error/option_unwrap.md:1\nmsgid \"`Option` & `unwrap`\"\nmsgstr \"`Option`と`unwrap`\"\n\n#: src/SUMMARY.md:161 src/error/option_unwrap/question_mark.md:1\nmsgid \"Unpacking options with `?`\"\nmsgstr \"`?`による`Option`のアンパック\"\n\n#: src/SUMMARY.md:162 src/error/option_unwrap/map.md:1\nmsgid \"Combinators: `map`\"\nmsgstr \"コンビネータ：`map`\"\n\n#: src/SUMMARY.md:163 src/error/option_unwrap/and_then.md:1\nmsgid \"Combinators: `and_then`\"\nmsgstr \"コンビネータ：`and_then`\"\n\n#: src/SUMMARY.md:164\nmsgid \"Defaults: `or`, `or_else`, `get_or_insert`, `get_or_insert_with`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:165 src/SUMMARY.md:183 src/error/result.md:1\n#: src/std/result.md:1\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md:166 src/error/result/result_map.md:1\nmsgid \"`map` for `Result`\"\nmsgstr \"`Result`の`map`\"\n\n#: src/SUMMARY.md:167 src/error/result/result_alias.md:1\nmsgid \"aliases for `Result`\"\nmsgstr \"`Result`に対するエイリアス\"\n\n#: src/SUMMARY.md:168 src/error/result/early_returns.md:1\nmsgid \"Early returns\"\nmsgstr \"早期リターン\"\n\n#: src/SUMMARY.md:169 src/error/result/enter_question_mark.md:1\nmsgid \"Introducing `?`\"\nmsgstr \"`?`の導入\"\n\n#: src/SUMMARY.md:170 src/error/multiple_error_types.md:1\nmsgid \"Multiple error types\"\nmsgstr \"複数のエラー型\"\n\n#: src/SUMMARY.md:171 src/error/multiple_error_types/option_result.md:1\nmsgid \"Pulling `Result`s out of `Option`s\"\nmsgstr \"`Option`から`Result`を取り出す\"\n\n#: src/SUMMARY.md:172 src/error/multiple_error_types/define_error_type.md:1\nmsgid \"Defining an error type\"\nmsgstr \"エラー型を定義する\"\n\n#: src/SUMMARY.md:173 src/error/multiple_error_types/boxing_errors.md:1\nmsgid \"`Box`ing errors\"\nmsgstr \"エラーを`Box`する\"\n\n#: src/SUMMARY.md:174 src/error/multiple_error_types/reenter_question_mark.md:1\nmsgid \"Other uses of `?`\"\nmsgstr \"`?`の他の活用法\"\n\n#: src/SUMMARY.md:175 src/error/multiple_error_types/wrap_error.md:1\nmsgid \"Wrapping errors\"\nmsgstr \"エラーをラップする\"\n\n#: src/SUMMARY.md:176 src/error/iter_result.md:1\nmsgid \"Iterating over `Result`s\"\nmsgstr \"`Result`をイテレートする\"\n\n#: src/SUMMARY.md:178 src/std.md:1\nmsgid \"Std library types\"\nmsgstr \"標準ライブラリの型\"\n\n#: src/SUMMARY.md:179 src/std/box.md:1\nmsgid \"Box, stack and heap\"\nmsgstr \"Box、スタックとヒープ\"\n\n#: src/SUMMARY.md:180 src/std/vec.md:1\nmsgid \"Vectors\"\nmsgstr \"ベクタ型\"\n\n#: src/SUMMARY.md:181 src/std/str.md:1\nmsgid \"Strings\"\nmsgstr \"文字列\"\n\n#: src/SUMMARY.md:182 src/std/option.md:1\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md:184 src/std/result/question_mark.md:1\nmsgid \"`?`\"\nmsgstr \"`?`\"\n\n#: src/SUMMARY.md:185 src/std/panic.md:1\nmsgid \"`panic!`\"\nmsgstr \"`panic!`\"\n\n#: src/SUMMARY.md:186 src/std/hash.md:1\nmsgid \"HashMap\"\nmsgstr \"ハッシュマップ\"\n\n#: src/SUMMARY.md:187 src/std/hash/alt_key_types.md:1\nmsgid \"Alternate/custom key types\"\nmsgstr \"キー型の変種\"\n\n#: src/SUMMARY.md:188 src/std/hash/hashset.md:1\nmsgid \"HashSet\"\nmsgstr \"ハッシュ集合\"\n\n#: src/SUMMARY.md:189 src/std/rc.md:1\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md:190\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md:192 src/std_misc.md:1\nmsgid \"Std misc\"\nmsgstr \"標準ライブラリのその他\"\n\n#: src/SUMMARY.md:193 src/std_misc.md:6 src/std_misc/threads.md:1\nmsgid \"Threads\"\nmsgstr \"スレッド\"\n\n#: src/SUMMARY.md:194 src/std_misc/threads/testcase_mapreduce.md:1\nmsgid \"Testcase: map-reduce\"\nmsgstr \"テストケース：map-reduce\"\n\n#: src/SUMMARY.md:195 src/std_misc.md:7 src/std_misc/channels.md:1\nmsgid \"Channels\"\nmsgstr \"チャネル\"\n\n#: src/SUMMARY.md:196 src/std_misc/path.md:1\nmsgid \"Path\"\nmsgstr \"ファイルパス\"\n\n#: src/SUMMARY.md:197 src/std_misc.md:8 src/std_misc/file.md:1\nmsgid \"File I/O\"\nmsgstr \"ファイル I/O\"\n\n#: src/SUMMARY.md:198 src/std_misc/file/open.md:1\nmsgid \"`open`\"\nmsgstr \"`open`\"\n\n#: src/SUMMARY.md:199 src/std_misc/file/create.md:1\nmsgid \"`create`\"\nmsgstr \"`create`\"\n\n#: src/SUMMARY.md:200 src/std_misc/file/read_lines.md:1\nmsgid \"`read_lines`\"\nmsgstr \"`read lines`\"\n\n#: src/SUMMARY.md:201 src/std_misc/process.md:1\nmsgid \"Child processes\"\nmsgstr \"子プロセス\"\n\n#: src/SUMMARY.md:202 src/std_misc/process/pipe.md:1\nmsgid \"Pipes\"\nmsgstr \"パイプ\"\n\n#: src/SUMMARY.md:203 src/std_misc/process/wait.md:1\nmsgid \"Wait\"\nmsgstr \"ドロップの延期\"\n\n#: src/SUMMARY.md:204 src/std_misc/fs.md:1\nmsgid \"Filesystem Operations\"\nmsgstr \"ファイルシステムとのやり取り\"\n\n#: src/SUMMARY.md:205 src/std_misc/arg.md:1\nmsgid \"Program arguments\"\nmsgstr \"引数処理\"\n\n#: src/SUMMARY.md:206 src/std_misc/arg/matching.md:1\nmsgid \"Argument parsing\"\nmsgstr \"引数のパース\"\n\n#: src/SUMMARY.md:207 src/std_misc/ffi.md:1\nmsgid \"Foreign Function Interface\"\nmsgstr \"他言語関数インターフェイス\"\n\n#: src/SUMMARY.md:209 src/cargo/test.md:1 src/testing.md:1\nmsgid \"Testing\"\nmsgstr \"テスト\"\n\n#: src/SUMMARY.md:210 src/testing/unit_testing.md:1\nmsgid \"Unit testing\"\nmsgstr \"ユニットテスト\"\n\n#: src/SUMMARY.md:211 src/testing/doc_testing.md:1\nmsgid \"Documentation testing\"\nmsgstr \"ドキュメンテーションテスト\"\n\n#: src/SUMMARY.md:212 src/testing/integration_testing.md:1\nmsgid \"Integration testing\"\nmsgstr \"統合テスト\"\n\n#: src/SUMMARY.md:213\nmsgid \"Dev-dependencies\"\nmsgstr \"開発中の依存関係\"\n\n#: src/SUMMARY.md:215 src/unsafe.md:1\nmsgid \"Unsafe Operations\"\nmsgstr \"安全でない操作\"\n\n#: src/SUMMARY.md:216 src/unsafe/asm.md:1\nmsgid \"Inline assembly\"\nmsgstr \"インラインアセンブリ\"\n\n#: src/SUMMARY.md:218 src/compatibility.md:1\nmsgid \"Compatibility\"\nmsgstr \"互換性\"\n\n#: src/SUMMARY.md:219 src/compatibility/raw_identifiers.md:1\nmsgid \"Raw identifiers\"\nmsgstr \"生識別子\"\n\n#: src/SUMMARY.md:221 src/meta.md:1\nmsgid \"Meta\"\nmsgstr \"周辺情報\"\n\n#: src/SUMMARY.md:222 src/meta/doc.md:1\nmsgid \"Documentation\"\nmsgstr \"ドキュメンテーション\"\n\n#: src/SUMMARY.md:223 src/meta/playground.md:1\nmsgid \"Playground\"\nmsgstr \"プレイグラウンド\"\n\n#: src/index.md:1\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/index.md:3\nmsgid \"\"\n\"[Rust](https://www.rust-lang.org/) is a modern systems programming language \"\n\"focusing on safety, speed, and concurrency. It accomplishes these goals by \"\n\"being memory safe without using garbage collection.\"\nmsgstr \"\"\n\"[Rust](https://www.rust-lang.org/) は安全性、速度、並列性にフォーカスした現代\"\n\"的なシステムプログラミング用のプログラミング言語です。ガベージコレクション無\"\n\"しでメモリ安全であることが、これを可能にしています。\"\n\n#: src/index.md:7\nmsgid \"\"\n\"Rust by Example (RBE) is a collection of runnable examples that illustrate \"\n\"various Rust concepts and standard libraries. To get even more out of these \"\n\"examples, don't forget to [install Rust locally](https://www.rust-lang.org/\"\n\"tools/install) and check out the [official docs](https://doc.rust-lang.org/\"\n\"std/). Additionally for the curious, you can also [check out the source code \"\n\"for this site](https://github.com/rust-lang/rust-by-example).\"\nmsgstr \"\"\n\"Rust by Example(RBE)はRustの実行可能なサンプルスクリプト集で、ここではRustの\"\n\"様々なコンセプトと標準ライブラリを紹介していきます。この例をより活用するため\"\n\"には[Rustをローカルにインストール](https://www.rust-lang.org/tools/install)\"\n\"し、[公式ドキュメント](https://doc.rust-lang.org/std/)をチェックすることをお\"\n\"すすめします。興味がある方は[このサイト自体のソース](https://github.com/rust-\"\n\"lang/rust-by-example)のチェックもどうぞ。\"\n\n#: src/index.md:12\nmsgid \"Now let's begin!\"\nmsgstr \"それでははじめましょう!\"\n\n#: src/index.md:14\nmsgid \"[Hello World](hello.md) - Start with a traditional Hello World program.\"\nmsgstr \"\"\n\"[Hello World](hello.md) - お決まりのHello Worldプログラムから始めましょう。\"\n\n#: src/index.md:16\nmsgid \"\"\n\"[Primitives](primitives.md) - Learn about signed integers, unsigned integers \"\n\"and other primitives.\"\nmsgstr \"\"\n\"[基本データ型](primitives.md) - 符号付き整数や符号無し整数、その他の基本デー\"\n\"タ型について学びましょう。\"\n\n#: src/index.md:18\nmsgid \"[Custom Types](custom_types.md) - `struct` and `enum`.\"\nmsgstr \"[カスタム型](custom_types.md) - `struct`と`enum`について。\"\n\n#: src/index.md:20\nmsgid \"\"\n\"[Variable Bindings](variable_bindings.md) - mutable bindings, scope, \"\n\"shadowing.\"\nmsgstr \"\"\n\"[変数の束縛](variable_bindings.md) - ミュータブルな束縛、スコープ、シャドーイ\"\n\"ングについて。\"\n\n#: src/index.md:22\nmsgid \"[Types](types.md) - Learn about changing and defining types.\"\nmsgstr \"[型](types.md) - 型を変更したり定義したりすることを学びましょう。\"\n\n#: src/index.md:24\nmsgid \"\"\n\"[Conversion](conversion.md) - Convert between different types, such as \"\n\"strings, integers, and floats.\"\nmsgstr \"\"\n\"[型変換](conversion.md) - 文字列や整数、浮動小数点数など様々な型から型への変\"\n\"換について。\"\n\n#: src/index.md:26\nmsgid \"\"\n\"[Expressions](expression.md) - Learn about Expressions & how to use them.\"\nmsgstr \"[式](expression.md) - 式とその使い方について学びましょう。\"\n\n#: src/index.md:28\nmsgid \"[Flow of Control](flow_control.md) - `if`/`else`, `for`, and others.\"\nmsgstr \"[制御フロー](flow_control.md) - `if`や`else`、`for`など。\"\n\n#: src/index.md:30\nmsgid \"\"\n\"[Functions](fn.md) - Learn about Methods, Closures and Higher Order \"\n\"Functions.\"\nmsgstr \"[関数](fn.md) - メソッド、クロージャ、高階関数について。\"\n\n#: src/index.md:32\nmsgid \"[Modules](mod.md) - Organize code using modules\"\nmsgstr \"[モジュール](mod.md) - プログラムをモジュールを使って整理しましょう。\"\n\n#: src/index.md:34\nmsgid \"\"\n\"[Crates](crates.md) - A crate is a compilation unit in Rust. Learn to create \"\n\"a library.\"\nmsgstr \"\"\n\"[クレート](crates.md) - クレートは、Rustにおいてコンパイルされる単位です。ラ\"\n\"イブラリの作り方について学びます。\"\n\n#: src/index.md:36\nmsgid \"\"\n\"[Cargo](cargo.md) - Go through some basic features of the official Rust \"\n\"package management tool.\"\nmsgstr \"\"\n\"[Cargo](cargo.md) - Rustの公式パッケージマネージャの基本的な機能を学びます。\"\n\n#: src/index.md:38\nmsgid \"\"\n\"[Attributes](attribute.md) - An attribute is metadata applied to some \"\n\"module, crate or item.\"\nmsgstr \"\"\n\"[アトリビュート](attribute.md) - アトリビュートは、モジュールやクレート、要素\"\n\"に適用されるメタデータです。\"\n\n#: src/index.md:40\nmsgid \"\"\n\"[Generics](generics.md) - Learn about writing a function or data type which \"\n\"can work for multiple types of arguments.\"\nmsgstr \"\"\n\"[ジェネリクス](generics.md) - 様々な型の引数を取れる関数やデータ型を書く方法\"\n\"を学びましょう。\"\n\n#: src/index.md:42\nmsgid \"\"\n\"[Scoping rules](scope.md) - Scopes play an important part in ownership, \"\n\"borrowing, and lifetimes.\"\nmsgstr \"\"\n\"[スコープの規則](scope.md) - スコープは所有権、借用、ライフタイムにおいて重要\"\n\"な役割を果たします。\"\n\n#: src/index.md:44\nmsgid \"\"\n\"[Traits](trait.md) - A trait is a collection of methods defined for an \"\n\"unknown type: `Self`\"\nmsgstr \"\"\n\"[トレイト](trait.md) - トレイトとは、未知の型`Self`に対して定義された一連のメ\"\n\"ソッドです。\"\n\n#: src/index.md:46\nmsgid \"\"\n\"[Macros](macros.md) - Macros are a way of writing code that writes other \"\n\"code, which is known as metaprogramming.\"\nmsgstr \"\"\n\"[マクロ](macros.md) - マクロはコードを書くためのコードです。メタプログラミン\"\n\"グとしても知られています。\"\n\n#: src/index.md:48\nmsgid \"[Error handling](error.md) - Learn Rust way of handling failures.\"\nmsgstr \"\"\n\"[エラーハンドリング](error.md) - 失敗に対処するRust流のやり方を学びましょう。\"\n\n#: src/index.md:50\nmsgid \"\"\n\"[Std library types](std.md) - Learn about some custom types provided by \"\n\"`std` library.\"\nmsgstr \"\"\n\"[標準ライブラリの型](std.md) - `std`ライブラリによって提供されるいくつかのカ\"\n\"スタム型について学びます。\"\n\n#: src/index.md:52\nmsgid \"[Std misc](std_misc.md) - More custom types for file handling, threads.\"\nmsgstr \"\"\n\"[標準ライブラリのその他](std_misc.md) - ファイルハンドリングとスレッドのため\"\n\"のカスタム型について。\"\n\n#: src/index.md:54\nmsgid \"[Testing](testing.md) - All sorts of testing in Rust.\"\nmsgstr \"[テスト](testing.md) - Rustにおけるテストのすべて。\"\n\n#: src/index.md:56\nmsgid \"\"\n\"[Unsafe Operations](unsafe.md) - Learn about entering a block of unsafe \"\n\"operations.\"\nmsgstr \"[安全でない操作](unsafe.md) - 安全でない操作について学びましょう。\"\n\n#: src/index.md:58\nmsgid \"\"\n\"[Compatibility](compatibility.md) - Handling Rust's evolution and potential \"\n\"compatibility issues.\"\nmsgstr \"[互換性](compatibility.md) - Rustの進化と互換性について。\"\n\n#: src/index.md:60\nmsgid \"[Meta](meta.md) - Documentation, Benchmarking.\"\nmsgstr \"[周辺情報](meta.md) - ドキュメント、ベンチマークの方法。\"\n\n#: src/hello.md:3\nmsgid \"This is the source code of the traditional Hello World program.\"\nmsgstr \"ここでは伝統的な \\\"Hello World!\\\" プログラムのソースを紹介します。\"\n\n#: src/hello.md:6\nmsgid \"\"\n\"// This is a comment, and is ignored by the compiler.\\n\"\n\"// You can test this code by clicking the \\\"Run\\\" button over there ->\\n\"\n\"// or if you prefer to use your keyboard, you can use the \\\"Ctrl + Enter\\\"\\n\"\n\"// shortcut.\\n\"\nmsgstr \"\"\n\"// これはコメントです。コンパイラによって無視されます。\\n\"\n\"// 右にある「Run」ボタンからこのコードをテストできます。\\n\"\n\"// キーボードを使いたければ「Ctrl + Enter」もOKです。\\n\"\n\n#: src/hello.md:10\nmsgid \"\"\n\"// This code is editable, feel free to hack it!\\n\"\n\"// You can always return to the original code by clicking the \\\"Reset\\\" \"\n\"button ->\\n\"\nmsgstr \"\"\n\"// このコードは編集可能です。ぜひハックしてみましょう！\\n\"\n\"// 「Reset」ボタンでいつでも元のコードに戻すことができます ->\\n\"\n\n#: src/hello.md:13\nmsgid \"// This is the main function.\\n\"\nmsgstr \"// main関数です。\\n\"\n\n#: src/hello.md:16\nmsgid \"// Statements here are executed when the compiled binary is called.\\n\"\nmsgstr \"// コンパイルされたバイナリが実行されるとこの関数が呼び出されます。\\n\"\n\n#: src/hello.md:18\nmsgid \"// Print text to the console.\\n\"\nmsgstr \"// コンソールに文字列を出力します。\\n\"\n\n#: src/hello.md:19 src/error/result.md:55 src/meta/playground.md:12\nmsgid \"\\\"Hello World!\\\"\"\nmsgstr \"\\\"Hello World!\\\"\"\n\n#: src/hello.md:23\nmsgid \"`println!` is a [_macro_](macros.md) that prints text to the console.\"\nmsgstr \"\"\n\"`println!`は文字列をコンソールに出力するための[ *マクロ* ](macros.md)です。\"\n\n#: src/hello.md:26\nmsgid \"A binary can be generated using the Rust compiler: `rustc`.\"\nmsgstr \"\"\n\"バイナリファイルは`rustc`と呼ばれるRustコンパイラを用いて生成することができま\"\n\"す。\"\n\n#: src/hello.md:32\nmsgid \"`rustc` will produce a `hello` binary that can be executed.\"\nmsgstr \"すると`hello`という名前の実行可能なバイナリファイルができます。\"\n\n#: src/hello.md:39 src/hello/print/print_display.md:107\n#: src/hello/print/print_display/testcase_list.md:53 src/hello/print/fmt.md:70\n#: src/primitives/tuples.md:64 src/custom_types/structs.md:89\nmsgid \"Activity\"\nmsgstr \"演習\"\n\n#: src/hello.md:41\nmsgid \"\"\n\"Click 'Run' above to see the expected output. Next, add a new line with a \"\n\"second `println!` macro so that the output shows:\"\nmsgstr \"\"\n\"上に書いている 'Run' をクリックしてアウトプットを見てみましょう。次に、\"\n\"`println!`マクロをもう一行追加してアウトプットがどうなるか見てみましょう。\"\n\n#: src/hello/comment.md:3\nmsgid \"\"\n\"Any program requires comments, and Rust supports a few different varieties:\"\nmsgstr \"\"\n\"あらゆるプログラムにはコメントが必要です。Rustには何種類かのコメントがありま\"\n\"す\"\n\n#: src/hello/comment.md:6\nmsgid \"_Regular comments_ which are ignored by the compiler:\"\nmsgstr \"*通常のコメント* これはコンパイラによって完全に無視されます。\"\n\n#: src/hello/comment.md:7\nmsgid \"`// Line comments which go to the end of the line.`\"\nmsgstr \"`// 行末までコメントアウト`\"\n\n#: src/hello/comment.md:8\nmsgid \"`/* Block comments which go to the closing delimiter. */`\"\nmsgstr \"`/* ブロックによって囲まれた部分をコメントアウト */`\"\n\n#: src/hello/comment.md:9\nmsgid \"\"\n\"_Doc comments_ which are parsed into HTML library [documentation](../meta/\"\n\"doc.md):\"\nmsgstr \"\"\n\"*ドキュメンテーションコメント* ライブラリの[ドキュメンテーション](../meta/\"\n\"doc.md)としてHTMLにパースされます。\"\n\n#: src/hello/comment.md:10\nmsgid \"`/// Generate library docs for the following item.`\"\nmsgstr \"`/// このコメントの下の内容に関するドキュメントとなります。`\"\n\n#: src/hello/comment.md:11\nmsgid \"`//! Generate library docs for the enclosing item.`\"\nmsgstr \"`//! このコメントを含むソースのドキュメントになります。`\"\n\n#: src/hello/comment.md:15\nmsgid \"\"\n\"// This is an example of a line comment.\\n\"\n\"    // There are two slashes at the beginning of the line.\\n\"\n\"    // And nothing written after these will be read by the compiler.\\n\"\nmsgstr \"\"\n\"// こちらはラインコメントです。\\n\"\n\"    // 一番左にスラッシュが2つある行と、何も書かれていない行は\\n\"\n\"    // どちらもコンパイラによって無視されます。\\n\"\n\n#: src/hello/comment.md:19\nmsgid \"// println!(\\\"Hello, world!\\\");\\n\"\nmsgstr \"// println!(\\\"Hello, world!\\\");\\n\"\n\n#: src/hello/comment.md:21\nmsgid \"// Run it. See? Now try deleting the two slashes, and run it again.\\n\"\nmsgstr \"// でしょ？では次に、左のスラッシュを消去してから実行してください。\\n\"\n\n#: src/hello/comment.md:23\nmsgid \"\"\n\"/*\\n\"\n\"     * This is another type of comment, a block comment. In general,\\n\"\n\"     * line comments are the recommended comment style. But block comments\\n\"\n\"     * are extremely useful for temporarily disabling chunks of code.\\n\"\n\"     * /* Block comments can be /* nested, */ */ so it takes only a few\\n\"\n\"     * keystrokes to comment out everything in this main() function.\\n\"\n\"     * /*/*/* Try it yourself! */*/*/\\n\"\n\"     */\"\nmsgstr \"\"\n\"/*\\n\"\n\"     * こちらはもう一つのタイプのコメントでブロックコメントと呼ばれます。\\n\"\n\"     * 普通はラインコメントの方が優れているのですが、こちらはコード片を\\n\"\n\"     * 一時的に無効にするときに役立つかもしれません。\\n\"\n\"     * /* ブロックコメントは /* ネストすることができるので */ */\\n\"\n\"     * わずかなキー入力でこのmain関数全体をコメントアウトできます。\\n\"\n\"     * /*/*/* 試してみてください！ */*/*/\\n\"\n\"     */\"\n\n#: src/hello/comment.md:32\nmsgid \"\"\n\"/*\\n\"\n\"    Note: The previous column of `*` was entirely for style. There's\\n\"\n\"    no actual need for it.\\n\"\n\"    */\"\nmsgstr \"\"\n\"/*\\n\"\n\"    注: 上のコメントにおける`*`列は見栄えのためでした。実際には必要ありませ\"\n\"ん。\\n\"\n\"    */\"\n\n#: src/hello/comment.md:37\nmsgid \"\"\n\"// You can manipulate expressions more easily with block comments\\n\"\n\"    // than with line comments. Try deleting the comment delimiters\\n\"\n\"    // to change the result:\\n\"\nmsgstr \"\"\n\"// ではブロックコメントがどのようにデバッグに役立つか見てみましょう。\\n\"\n\"    // 例えば下の例の場合、ブロックコメントがなくなれば結果が変わります。\\n\"\n\n#: src/hello/comment.md:40\nmsgid \"/* 90 + */\"\nmsgstr \"/* 90 + */\"\n\n#: src/hello/comment.md:41\nmsgid \"\\\"Is `x` 10 or 100? x = {}\\\"\"\nmsgstr \"\\\"Is `x` 10 or 100? x = {}\\\"\"\n\n#: src/hello/comment.md:45 src/hello/print.md:103\n#: src/hello/print/print_debug.md:75 src/hello/print/print_display.md:118\n#: src/hello/print/print_display/testcase_list.md:62 src/hello/print/fmt.md:89\n#: src/primitives.md:55 src/custom_types/enum.md:100\n#: src/custom_types/enum/enum_use.md:45 src/custom_types/enum/c_like.md:33\n#: src/custom_types/enum/testcase_linked_list.md:77\n#: src/custom_types/constants.md:35 src/types/alias.md:30\n#: src/flow_control/for.md:121\n#: src/flow_control/match/destructuring/destructure_tuple.md:25\n#: src/flow_control/match/destructuring/destructure_slice.md:46\n#: src/flow_control/match/destructuring/destructure_enum.md:48\n#: src/flow_control/match/destructuring/destructure_pointers.md:63\n#: src/flow_control/match/destructuring/destructure_structures.md:45\n#: src/flow_control/match/guard.md:43 src/flow_control/match/binding.md:49\n#: src/flow_control/if_let.md:122 src/flow_control/let_else.md:57\n#: src/flow_control/while_let.md:56 src/fn/closures/capture.md:110\n#: src/fn/closures/input_parameters.md:84 src/fn/closures/anonymity.md:47\n#: src/fn/closures/input_functions.md:32\n#: src/fn/closures/output_parameters.md:49\n#: src/fn/closures/closure_examples/iter_any.md:50\n#: src/fn/closures/closure_examples/iter_find.md:68\n#: src/mod/struct_visibility.md:53 src/attribute/cfg.md:39 src/generics.md:59\n#: src/generics/gen_fn.md:54 src/generics/impl.md:48\n#: src/generics/gen_trait.md:39 src/generics/bounds.md:73\n#: src/generics/bounds/testcase_empty.md:37 src/generics/multi_bounds.md:32\n#: src/generics/where.md:49 src/generics/new_types.md:54\n#: src/generics/assoc_items.md:10 src/generics/assoc_items/the_problem.md:62\n#: src/generics/phantom.md:56 src/generics/phantom/testcase_units.md:75\n#: src/scope/raii.md:92 src/scope/move/partial_move.md:45\n#: src/scope/borrow/mut.md:56 src/scope/lifetime/explicit.md:68\n#: src/scope/lifetime/fn.md:58 src/scope/lifetime/methods.md:24\n#: src/scope/lifetime/struct.md:41 src/scope/lifetime/trait.md:28\n#: src/scope/lifetime/lifetime_bounds.md:46\n#: src/scope/lifetime/static_lifetime.md:131 src/scope/lifetime/elision.md:39\n#: src/trait/derive.md:64 src/trait/supertraits.md:40\n#: src/trait/disambiguating.md:60 src/error/option_unwrap/map.md:79\n#: src/error/option_unwrap/and_then.md:73\n#: src/error/option_unwrap/defaults.md:113 src/error/result/result_alias.md:41\n#: src/error/multiple_error_types/boxing_errors.md:57\n#: src/error/multiple_error_types/reenter_question_mark.md:74\n#: src/error/multiple_error_types/wrap_error.md:91 src/std.md:12\n#: src/std/rc.md:49 src/std_misc.md:12\n#: src/std_misc/threads/testcase_mapreduce.md:128 src/std_misc/path.md:54\n#: src/std_misc/fs.md:150 src/meta/doc.md:109 src/meta/playground.md:49\nmsgid \"See also:\"\nmsgstr \"参照\"\n\n#: src/hello/comment.md:47\nmsgid \"[Library documentation](../meta/doc.md)\"\nmsgstr \"[ライブラリドキュメンテーション](../meta/doc.md)\"\n\n#: src/hello/print.md:3\nmsgid \"\"\n\"Printing is handled by a series of [`macros`](../macros.md) defined in \"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) some of which include:\"\nmsgstr \"\"\n\"出力関係の機能は[`std::fmt`](https://doc.rust-lang.org/std/fmt/)で定義される\"\n\"幾つかの[マクロ](../macros.md)で扱うことができます。このマクロには以下が含ま\"\n\"れます。\"\n\n#: src/hello/print.md:6\nmsgid \"`format!`: write formatted text to [`String`](../std/str.md)\"\nmsgstr \"\"\n\"`format!`：フォーマットされたテキストを[`String`](../std/str.md)に書き込みま\"\n\"す。\"\n\n#: src/hello/print.md:7\nmsgid \"\"\n\"`print!`: same as `format!` but the text is printed to the console (io::\"\n\"stdout).\"\nmsgstr \"\"\n\"`print!`：`format!`と同様ですが、コンソール (io::stdout) にそのテキストを出力\"\n\"します。\"\n\n#: src/hello/print.md:9\nmsgid \"`println!`: same as `print!` but a newline is appended.\"\nmsgstr \"`println!`：`print!`と同じですが改行が付け加えられます。\"\n\n#: src/hello/print.md:10\nmsgid \"\"\n\"`eprint!`: same as `print!` but the text is printed to the standard error \"\n\"(io::stderr).\"\nmsgstr \"\"\n\"`eprint!`：`format!`と同様ですが、標準エラー出力 (io::stderr) にそのテキスト\"\n\"を出力します。\"\n\n#: src/hello/print.md:12\nmsgid \"`eprintln!`: same as `eprint!` but a newline is appended.\"\nmsgstr \"`eprintln!`：`eprint!`と同じですが改行が付け加えられます。\"\n\n#: src/hello/print.md:14\nmsgid \"\"\n\"All parse text in the same fashion. As a plus, Rust checks formatting \"\n\"correctness at compile time.\"\nmsgstr \"\"\n\"すべて同じやり方でテキストをパースし、正しくフォーマットできるかコンパイル時\"\n\"にチェックします。\"\n\n#: src/hello/print.md:19\nmsgid \"\"\n\"// In general, the `{}` will be automatically replaced with any\\n\"\n\"    // arguments. These will be stringified.\\n\"\nmsgstr \"\"\n\"// 一般的に`{}`はどんな引数であろうと自動的に置き換えられます。\\n\"\n\"    // 例えば以下は文字列に変換されます。\\n\"\n\n#: src/hello/print.md:21\nmsgid \"\\\"{} days\\\"\"\nmsgstr \"\\\"{} days\\\"\"\n\n#: src/hello/print.md:23\nmsgid \"\"\n\"// Positional arguments can be used. Specifying an integer inside `{}`\\n\"\n\"    // determines which additional argument will be replaced. Arguments \"\n\"start\\n\"\n\"    // at 0 immediately after the format string.\\n\"\nmsgstr \"\"\n\"// 位置引数を利用できます。\\n\"\n\"    // `{}`の内側に整数を指定することで、どの引数で置換されるかが決まりま\"\n\"す。\\n\"\n\"    // 引数は0から始まります。\\n\"\n\n#: src/hello/print.md:26\nmsgid \"\\\"{0}, this is {1}. {1}, this is {0}\\\"\"\nmsgstr \"\\\"{0}, this is {1}. {1}, this is {0}\\\"\"\n\n#: src/hello/print.md:26 src/scope/move/partial_move.md:20\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/hello/print.md:26 src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/hello/print.md:28\nmsgid \"// As can named arguments.\\n\"\nmsgstr \"// 名前での指定も可能です。\\n\"\n\n#: src/hello/print.md:29\nmsgid \"\\\"{subject} {verb} {object}\\\"\"\nmsgstr \"\\\"{subject} {verb} {object}\\\"\"\n\n#: src/hello/print.md:30\nmsgid \"\\\"the lazy dog\\\"\"\nmsgstr \"\\\"the lazy dog\\\"\"\n\n#: src/hello/print.md:31\nmsgid \"\\\"the quick brown fox\\\"\"\nmsgstr \"\\\"the quick brown fox\\\"\"\n\n#: src/hello/print.md:32\nmsgid \"\\\"jumps over\\\"\"\nmsgstr \"\\\"jumps over\\\"\"\n\n#: src/hello/print.md:34\nmsgid \"\"\n\"// Different formatting can be invoked by specifying the format character\\n\"\n\"    // after a `:`.\\n\"\nmsgstr \"\"\n\"// `:`のあとにフォーマット文字を指定して\\n\"\n\"    // 異なるフォーマットにすることも可能です。\\n\"\n\n#: src/hello/print.md:36\nmsgid \"\\\"Base 10:               {}\\\"\"\nmsgstr \"\\\"Base 10:               {}\\\"\"\n\n#: src/hello/print.md:36\nmsgid \"// 69420\\n\"\nmsgstr \"// 69420\\n\"\n\n#: src/hello/print.md:37\nmsgid \"\\\"Base 2 (binary):       {:b}\\\"\"\nmsgstr \"\\\"Base 2 (binary):       {:b}\\\"\"\n\n#: src/hello/print.md:37\nmsgid \"// 10000111100101100\\n\"\nmsgstr \"// 10000111100101100\\n\"\n\n#: src/hello/print.md:38\nmsgid \"\\\"Base 8 (octal):        {:o}\\\"\"\nmsgstr \"\\\"Base 8 (octal):        {:o}\\\"\"\n\n#: src/hello/print.md:38\nmsgid \"// 207454\\n\"\nmsgstr \"// 207454\\n\"\n\n#: src/hello/print.md:39\nmsgid \"\\\"Base 16 (hexadecimal): {:x}\\\"\"\nmsgstr \"\\\"Base 16 (hexadecimal): {:x}\\\"\"\n\n#: src/hello/print.md:39\nmsgid \"// 10f2c\\n\"\nmsgstr \"// 10f2c\\n\"\n\n#: src/hello/print.md:41\nmsgid \"\"\n\"// You can right-justify text with a specified width. This will\\n\"\n\"    // output \\\"    1\\\". (Four white spaces and a \\\"1\\\", for a total width \"\n\"of 5.)\\n\"\nmsgstr \"\"\n\"// 特定の幅に右詰めすることもできます。この出力は \\\"    1\\\" になります。\\n\"\n\"    // （4つの空白と\\\"1\\\"で合計幅は5です）\\n\"\n\n#: src/hello/print.md:43\nmsgid \"\\\"{number:>5}\\\"\"\nmsgstr \"\\\"{number:>5}\\\"\"\n\n#: src/hello/print.md:45\nmsgid \"// You can pad numbers with extra zeroes,\\n\"\nmsgstr \"// 数字を0埋めすることもできます。\\n\"\n\n#: src/hello/print.md:46\nmsgid \"\\\"{number:0>5}\\\"\"\nmsgstr \"\\\"{number:0>5}\\\"\"\n\n#: src/hello/print.md:46\nmsgid \"\"\n\"// 00001\\n\"\n\"    // and left-adjust by flipping the sign. This will output \\\"10000\\\".\\n\"\nmsgstr \"\"\n\"// 00001\\n\"\n\"    // 記号を反対にすると左寄せになり、\\\"10000\\\"が出力されます。\\n\"\n\n#: src/hello/print.md:48\nmsgid \"\\\"{number:0<5}\\\"\"\nmsgstr \"\\\"{number:0<5}\\\"\"\n\n#: src/hello/print.md:48\nmsgid \"// 10000\\n\"\nmsgstr \"// 10000\\n\"\n\n#: src/hello/print.md:50\nmsgid \"\"\n\"// You can use named arguments in the format specifier by appending a `$`.\\n\"\nmsgstr \"\"\n\"// フォーマット指定子の中に`$`をつけることで名前付き引数を利用できます。\\n\"\n\n#: src/hello/print.md:51\nmsgid \"\\\"{number:0>width$}\\\"\"\nmsgstr \"\\\"{number:0>width$}\\\"\"\n\n#: src/hello/print.md:53\nmsgid \"\"\n\"// Rust even checks to make sure the correct number of arguments are used.\\n\"\nmsgstr \"// 引数の数が正しいかのチェックも行ってくれます。\\n\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"My name is {0}, {1} {0}\\\"\"\nmsgstr \"\\\"My name is {0}, {1} {0}\\\"\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"Bond\\\"\"\nmsgstr \"\\\"Bond\\\"\"\n\n#: src/hello/print.md:55\nmsgid \"// FIXME ^ Add the missing argument: \\\"James\\\"\\n\"\nmsgstr \"// FIXME ^ 不足している引数 \\\"James\\\" を追加しましょう。\\n\"\n\n#: src/hello/print.md:57\nmsgid \"\"\n\"// Only types that implement fmt::Display can be formatted with `{}`. User-\\n\"\n\"    // defined types do not implement fmt::Display by default.\\n\"\nmsgstr \"\"\n\"// `{}`でフォーマットできるのは、fmt::Displayを実装している型のみです。\\n\"\n\"    // ユーザーが定義した型はデフォルトではfmt::Displayを実装していません。\\n\"\n\n#: src/hello/print.md:60\nmsgid \"// disable `dead_code` which warn against unused module\\n\"\nmsgstr \"// 未使用モジュールを警告する`dead_code`を無効化。\\n\"\n\n#: src/hello/print.md:63\nmsgid \"\"\n\"// This will not compile because `Structure` does not implement\\n\"\n\"    // fmt::Display.\\n\"\n\"    // println!(\\\"This struct `{}` won't print...\\\", Structure(3));\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// `Structure`はfmt::Displayを実装していないので、\\n\"\n\"    // 以下はコンパイルできません。\\n\"\n\"    // println!(\\\"This struct `{}` won't print...\\\", Structure(3));\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/hello/print.md:68\nmsgid \"\"\n\"// For Rust 1.58 and above, you can directly capture the argument from a\\n\"\n\"    // surrounding variable. Just like the above, this will output\\n\"\n\"    // \\\"    1\\\", 4 white spaces and a \\\"1\\\".\\n\"\nmsgstr \"\"\n\"// Rust 1.58以上では、周囲の変数から直接引数に取ることができます。\\n\"\n\"    // 上で見たように、以下のコードは4つのスペースと1を、\\\"    1\\\" と出力しま\"\n\"す。\\n\"\n\n#: src/hello/print.md:73\nmsgid \"\\\"{number:>width$}\\\"\"\nmsgstr \"\\\"{number:>width$}\\\"\"\n\n#: src/hello/print.md:77\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) contains many [`traits`]\"\n\"(https://doc.rust-lang.org/std/fmt/#formatting-traits) which govern the \"\n\"display of text. The base form of two important ones are listed below:\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)はいくつもの[トレイト]\"\n\"(https://doc.rust-lang.org/std/fmt/#formatting-traits)を持ち、それによってど\"\n\"のようにディスプレイに表示されるかが決まります。特に大事な形式は以下の2つで\"\n\"す。\"\n\n#: src/hello/print.md:80\nmsgid \"\"\n\"`fmt::Debug`: Uses the `{:?}` marker. Format text for debugging purposes.\"\nmsgstr \"`fmt::Debug`：`{:?}`というマーカーを使用し、デバッグ目的に使われます。\"\n\n#: src/hello/print.md:81\nmsgid \"\"\n\"`fmt::Display`: Uses the `{}` marker. Format text in a more elegant, user \"\n\"friendly fashion.\"\nmsgstr \"\"\n\"`fmt::Display`：`{}`というマーカーを使用し、より美しく、ユーザフレンドリーに\"\n\"表示します。\"\n\n#: src/hello/print.md:84\nmsgid \"\"\n\"Here, we used `fmt::Display` because the std library provides \"\n\"implementations for these types. To print text for custom types, more steps \"\n\"are required.\"\nmsgstr \"\"\n\"この例で用いられている型は、標準ライブラリに含まれているため、ここでは`fmt::\"\n\"Display`を使用しています。カスタム型をテキストとして表示する場合は、さらに手\"\n\"順が必要です。\"\n\n#: src/hello/print.md:87\nmsgid \"\"\n\"Implementing the `fmt::Display` trait automatically implements the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"which allows us to [convert](../conversion/string.md) the type to [`String`]\"\n\"(../std/str.md).\"\nmsgstr \"\"\n\"`fmt::Display`トレイトを実装すると、自動的に[`ToString`](https://doc.rust-\"\n\"lang.org/std/string/trait.ToString.html)トレイトが実装されます。これにより\"\n\"[`String`](../std/str.md)型への[型変換](../conversion/string.md)ができるよう\"\n\"になります。\"\n\n#: src/hello/print.md:90\nmsgid \"\"\n\"In _line 43_, `#[allow(dead_code)]` is an [attribute](../attribute.md) which \"\n\"only applies to the module after it.\"\nmsgstr \"\"\n\"*43行目* の`#[allow(dead_code)]`は、直後のモジュールにのみ適用される[アトリ\"\n\"ビュート](../attribute.md)です。\"\n\n#: src/hello/print.md:92\nmsgid \"Activities\"\nmsgstr \"演習\"\n\n#: src/hello/print.md:94\nmsgid \"\"\n\"Fix the issue in the above code (see FIXME) so that it runs without error.\"\nmsgstr \"上の例（FIXME を参照）を実行した際に生じるエラーを修復しましょう。\"\n\n#: src/hello/print.md:96\nmsgid \"\"\n\"Try uncommenting the line that attempts to format the `Structure` struct \"\n\"(see TODO)\"\nmsgstr \"\"\n\"`Structure`構造体をフォーマットする行をアンコメントしてみましょう。（TODO を\"\n\"参照）\"\n\n#: src/hello/print.md:98\nmsgid \"\"\n\"Add a `println!` macro call that prints: `Pi is roughly 3.142` by \"\n\"controlling the number of decimal places shown. For the purposes of this \"\n\"exercise, use `let pi = 3.141592` as an estimate for pi. (Hint: you may need \"\n\"to check the [`std::fmt`](https://doc.rust-lang.org/std/fmt/) documentation \"\n\"for setting the number of decimals to display)\"\nmsgstr \"\"\n\"`println!`マクロを追加し、表示される小数部の桁数を調整して`Pi is roughly \"\n\"3.142`という文字列を出力しましょう。ただし、円周率の値は`let pi = 3.141592`を\"\n\"使ってください。（ヒント：小数部の桁数を調整する方法については、[`std::fmt`]\"\n\"(https://doc.rust-lang.org/std/fmt/)をチェックする必要があるかもしれませ\"\n\"ん。）\"\n\n#: src/hello/print.md:105\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [`macros`](../macros.md), \"\n\"[`struct`](../custom_types/structs.md), [`traits`](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits), and [`dead_code`](../attribute/unused.md)\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [マクロ](../macros.md), [構\"\n\"造体](../custom_types/structs.md), [トレイト](https://doc.rust-lang.org/std/\"\n\"fmt/#formatting-traits), [`dead_code`](../attribute/unused.md)\"\n\n#: src/hello/print/print_debug.md:3\nmsgid \"\"\n\"All types which want to use `std::fmt` formatting `traits` require an \"\n\"implementation to be printable. Automatic implementations are only provided \"\n\"for types such as in the `std` library. All others _must_ be manually \"\n\"implemented somehow.\"\nmsgstr \"\"\n\"`std::fmt`のフォーマット用`トレイト`を使用したい型は、出力できるように実装さ\"\n\"れている必要があります。`std`ライブラリの型のように自動で出力可能なものもあり\"\n\"ますが、他はすべて *手動で実装する必要があります。*\"\n\n#: src/hello/print/print_debug.md:8\nmsgid \"\"\n\"The `fmt::Debug` `trait` makes this very straightforward. _All_ types can \"\n\"`derive` (automatically create) the `fmt::Debug` implementation. This is not \"\n\"true for `fmt::Display` which must be manually implemented.\"\nmsgstr \"\"\n\"`fmt::Debug`という`トレイト`はこれを簡略化します。 *すべての* 型は`fmt::\"\n\"Debug`の実装を`導出(derive)`、（すなわち自動で作成）することができるためで\"\n\"す。`fmt::Display`の場合はやはり手動で実装しなくてはなりません。\"\n\n#: src/hello/print/print_debug.md:13\nmsgid \"\"\n\"// This structure cannot be printed either with `fmt::Display` or\\n\"\n\"// with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// この構造体は`fmt::Display`、`fmt::Debug`のいずれによっても\\n\"\n\"// 出力することができません。\\n\"\n\n#: src/hello/print/print_debug.md:16\nmsgid \"\"\n\"// The `derive` attribute automatically creates the implementation\\n\"\n\"// required to make this `struct` printable with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// `derive`アトリビュートは、\\n\"\n\"// この構造体を`fmt::Debug`で出力するための実装を自動で提供します。\\n\"\n\n#: src/hello/print/print_debug.md:23\nmsgid \"All `std` library types are automatically printable with `{:?}` too:\"\nmsgstr \"\"\n\"`std`ライブラリの型の場合は、自動的に`{:?}`により出力可能になっています。\"\n\n#: src/hello/print/print_debug.md:26\nmsgid \"\"\n\"// Derive the `fmt::Debug` implementation for `Structure`. `Structure`\\n\"\n\"// is a structure which contains a single `i32`.\\n\"\nmsgstr \"\"\n\"// `Structure`という構造体のための`fmt::Debug`を導出しています。\\n\"\n\"// `Structure`は単一の`i32`をメンバに持っています。\\n\"\n\n#: src/hello/print/print_debug.md:30\nmsgid \"\"\n\"// Put a `Structure` inside of the structure `Deep`. Make it printable\\n\"\n\"// also.\\n\"\nmsgstr \"\"\n\"// `Deep`という構造体の中に`Structure`を入れ、これを出力可能にしています。\\n\"\n\n#: src/hello/print/print_debug.md:37\nmsgid \"// Printing with `{:?}` is similar to with `{}`.\\n\"\nmsgstr \"// `{:?}`による出力は`{}`に似ています。\\n\"\n\n#: src/hello/print/print_debug.md:38\nmsgid \"\\\"{:?} months in a year.\\\"\"\nmsgstr \"\\\"{:?} months in a year.\\\"\"\n\n#: src/hello/print/print_debug.md:39\nmsgid \"\\\"{1:?} {0:?} is the {actor:?} name.\\\"\"\nmsgstr \"\\\"{1:?} {0:?} is the {actor:?} name.\\\"\"\n\n#: src/hello/print/print_debug.md:40\nmsgid \"\\\"Slater\\\"\"\nmsgstr \"\\\"Slater\\\"\"\n\n#: src/hello/print/print_debug.md:41\nmsgid \"\\\"Christian\\\"\"\nmsgstr \"\\\"Christian\\\"\"\n\n#: src/hello/print/print_debug.md:42\nmsgid \"\\\"actor's\\\"\"\nmsgstr \"\\\"actor's\\\"\"\n\n#: src/hello/print/print_debug.md:44\nmsgid \"// `Structure` is printable!\\n\"\nmsgstr \"// `Structure`は出力可能です！\\n\"\n\n#: src/hello/print/print_debug.md:45 src/hello/print/print_debug.md:49\nmsgid \"\\\"Now {:?} will print!\\\"\"\nmsgstr \"\\\"Now {:?} will print!\\\"\"\n\n#: src/hello/print/print_debug.md:47\nmsgid \"\"\n\"// The problem with `derive` is there is no control over how\\n\"\n\"    // the results look. What if I want this to just show a `7`?\\n\"\nmsgstr \"\"\n\"// `derive`を用いることの問題は、結果がどのように見えるか\\n\"\n\"    // コントロールする方法がないことです。\\n\"\n\"    // 出力を`7`だけにするためにはどうしたらよいでしょう？\\n\"\n\n#: src/hello/print/print_debug.md:53\nmsgid \"\"\n\"So `fmt::Debug` definitely makes this printable but sacrifices some \"\n\"elegance. Rust also provides \\\"pretty printing\\\" with `{:#?}`.\"\nmsgstr \"\"\n\"`fmt::Debug`は確実に出力可能にしてくれるのですが、一方である種の美しさを犠牲\"\n\"にしています。Rustは`{:#?}`による「見栄えの良い出力」も提供します。\"\n\n#: src/hello/print/print_debug.md:64 src/custom_types/structs.md:42\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/hello/print/print_debug.md:68\nmsgid \"// Pretty print\\n\"\nmsgstr \"// 見栄えのよい出力\\n\"\n\n#: src/hello/print/print_debug.md:69\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/hello/print/print_debug.md:73\nmsgid \"One can manually implement `fmt::Display` to control the display.\"\nmsgstr \"手動で`fmt::Display`を実装することで出力結果を思い通りにできます。\"\n\n#: src/hello/print/print_debug.md:77\nmsgid \"\"\n\"[`attributes`](https://doc.rust-lang.org/reference/attributes.html), \"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), and [`struct`](../../custom_types/structs.md)\"\nmsgstr \"\"\n\"[アトリビュート](https://doc.rust-lang.org/reference/attributes.html), \"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [構造体](../../custom_types/structs.md)\"\n\n#: src/hello/print/print_display.md:3\nmsgid \"\"\n\"`fmt::Debug` hardly looks compact and clean, so it is often advantageous to \"\n\"customize the output appearance. This is done by manually implementing \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/), which uses the `{}` \"\n\"print marker. Implementing it looks like this:\"\nmsgstr \"\"\n\"`fmt::Debug`はコンパクトでクリーンであるようには見えませんね。大抵の場合は、\"\n\"アウトプットの見た目をカスタマイズしたほうが好ましいでしょう。これは`{}`を使\"\n\"用する[`fmt::Display`](https://doc.rust-lang.org/std/fmt/)を手動で実装するこ\"\n\"とで可能です。実装はこのようになります。\"\n\n#: src/hello/print/print_display.md:9\nmsgid \"// Import (via `use`) the `fmt` module to make it available.\\n\"\nmsgstr \"// （`use`を使用し、）`fmt`モジュールをインポートします。\\n\"\n\n#: src/hello/print/print_display.md:11\nmsgid \"\"\n\"// Define a structure for which `fmt::Display` will be implemented. This is\\n\"\n\"// a tuple struct named `Structure` that contains an `i32`.\\n\"\nmsgstr \"\"\n\"// `fmt::Display`を実装するための構造体を定義します。\\n\"\n\"// これは`Structure`と名付けられた、`i32`を含むタプル構造体です。\\n\"\n\n#: src/hello/print/print_display.md:15\nmsgid \"\"\n\"// To use the `{}` marker, the trait `fmt::Display` must be implemented\\n\"\n\"// manually for the type.\\n\"\nmsgstr \"\"\n\"// `{}` というマーカーを使用するためには、\\n\"\n\"// この型専用の`fmt::Display`というトレイトが実装されていなくてはなりませ\"\n\"ん。\\n\"\n\n#: src/hello/print/print_display.md:19\nmsgid \"// This trait requires `fmt` with this exact signature.\\n\"\nmsgstr \"\"\n\"// このトレイトは`fmt`が正確にこの通りのシグネチャであることを要求します。\\n\"\n\n#: src/hello/print/print_display.md:21\nmsgid \"\"\n\"// Write strictly the first element into the supplied output\\n\"\n\"        // stream: `f`. Returns `fmt::Result` which indicates whether the\\n\"\n\"        // operation succeeded or failed. Note that `write!` uses syntax \"\n\"which\\n\"\n\"        // is very similar to `println!`.\\n\"\nmsgstr \"\"\n\"// 最初の要素だけを、与えられた出力ストリーム`f`に書き込みます。\\n\"\n\"        // 操作が成功したかどうかを表す`fmt::Result`を返します。\\n\"\n\"        // `write!`は`println!`に非常によく似た文法を使用していることに注\"\n\"目。\\n\"\n\n#: src/hello/print/print_display.md:25\n#: src/hello/print/print_display/testcase_list.md:13\n#: src/hello/print/print_display/testcase_list.md:39\n#: src/hello/print/print_display/testcase_list.md:49 src/hello/print/fmt.md:53\n#: src/custom_types/enum/testcase_linked_list.md:73 src/conversion/string.md:25\n#: src/flow_control/loop.md:26 src/flow_control/while.md:21\n#: src/flow_control/for.md:23 src/flow_control/for.md:43 src/fn.md:40\n#: src/fn/closures/capture.md:96 src/fn/closures/capture.md:97\n#: src/fn/closures/anonymity.md:41 src/generics/bounds.md:12\n#: src/macros/repeat.md:24 src/macros/repeat.md:25 src/macros/repeat.md:26\n#: src/error/result.md:73 src/std/str.md:92 src/std/str.md:102\n#: src/std/str.md:106 src/std/str.md:111 src/std/result.md:72\n#: src/std/result/question_mark.md:57 src/std/result/question_mark.md:65\n#: src/std_misc/file/read_lines.md:60 src/std_misc/arg/matching.md:9\n#: src/std_misc/arg/matching.md:13\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/hello/print/print_display.md:30\nmsgid \"\"\n\"`fmt::Display` may be cleaner than `fmt::Debug` but this presents a problem \"\n\"for the `std` library. How should ambiguous types be displayed? For example, \"\n\"if the `std` library implemented a single style for all `Vec<T>`, what style \"\n\"should it be? Would it be either of these two?\"\nmsgstr \"\"\n\"`fmt::Display`は`fmt::Debug`より綺麗かもしれませんが、`std`ライブラリの場合は\"\n\"問題が生じます。曖昧な型はどのように表示すれば良いでしょう？例えば、`std`ライ\"\n\"ブラリがあらゆる`Vec<T>`に対して単一のスタイルを提供していた場合、どのような\"\n\"スタイルに整形すればよいでしょう？以下の2つのどちらかを選ぶべきでしょうか？\"\n\n#: src/hello/print/print_display.md:35\nmsgid \"`Vec<path>`: `/:/etc:/home/username:/bin` (split on `:`)\"\nmsgstr \"`Vec<path>`: `/:/etc:/home/username:/bin` （`:`で分割）\"\n\n#: src/hello/print/print_display.md:36\nmsgid \"`Vec<number>`: `1,2,3` (split on `,`)\"\nmsgstr \"`Vec<number>`: `1,2,3` （`,`で分割）\"\n\n#: src/hello/print/print_display.md:38\nmsgid \"\"\n\"No, because there is no ideal style for all types and the `std` library \"\n\"doesn't presume to dictate one. `fmt::Display` is not implemented for \"\n\"`Vec<T>` or for any other generic containers. `fmt::Debug` must then be used \"\n\"for these generic cases.\"\nmsgstr \"\"\n\"答えはNOです。あらゆる型に対して理想的なスタイルなどというものはありません\"\n\"し、`std`ライブラリによってそれが提供されているわけでもありません。`fmt::\"\n\"Display`は`Vec<T>`のようなジェネリックなコンテナ用に定義されているわけではあ\"\n\"りませんので、このような場合は`fmt::Debug`を使用するべきです。\"\n\n#: src/hello/print/print_display.md:43\nmsgid \"\"\n\"This is not a problem though because for any new _container_ type which is \"\n\"_not_ generic, `fmt::Display` can be implemented.\"\nmsgstr \"\"\n\"ジェネリック *でない* コンテナ型の場合は、このような問題は生じませんので問題\"\n\"なく`fmt::Display`を実装することができます。\"\n\n#: src/hello/print/print_display.md:47\nmsgid \"// Import `fmt`\\n\"\nmsgstr \"// `fmt`のインポート\\n\"\n\n#: src/hello/print/print_display.md:48\nmsgid \"\"\n\"// A structure holding two numbers. `Debug` will be derived so the results \"\n\"can\\n\"\n\"// be contrasted with `Display`.\\n\"\nmsgstr \"\"\n\"// 2つの数字を扱うための構造体です。出力を`Display`と比較するため`Debug`\\n\"\n\"// を導出しています。\\n\"\n\n#: src/hello/print/print_display.md:53\nmsgid \"// Implement `Display` for `MinMax`.\\n\"\nmsgstr \"// `MinMax`用の`Display`を実装しています。\\n\"\n\n#: src/hello/print/print_display.md:57\nmsgid \"// Use `self.number` to refer to each positional data point.\\n\"\nmsgstr \"// `self.number`でそれぞれのデータポイントを参照できます。\\n\"\n\n#: src/hello/print/print_display.md:58\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/hello/print/print_display.md:61\nmsgid \"// Define a structure where the fields are nameable for comparison.\\n\"\nmsgstr \"\"\n\"// 比較のため、フィールドに名前をつけられる様な構造体を定義しましょう。\\n\"\n\n#: src/hello/print/print_display.md:68\nmsgid \"// Similarly, implement `Display` for `Point2D`.\\n\"\nmsgstr \"// 先程と同様にして、`Point2D`用の`Display`を実装しています。\\n\"\n\n#: src/hello/print/print_display.md:72\nmsgid \"// Customize so only `x` and `y` are denoted.\\n\"\nmsgstr \"// `x`と`y`のみが明示的になるようにカスタマイズ。\\n\"\n\n#: src/hello/print/print_display.md:73\nmsgid \"\\\"x: {}, y: {}\\\"\"\nmsgstr \"\\\"x: {}, y: {}\\\"\"\n\n#: src/hello/print/print_display.md:80\nmsgid \"\\\"Compare structures:\\\"\"\nmsgstr \"\\\"Compare structures:\\\"\"\n\n#: src/hello/print/print_display.md:81 src/hello/print/print_display.md:94\nmsgid \"\\\"Display: {}\\\"\"\nmsgstr \"\\\"Display: {}\\\"\"\n\n#: src/hello/print/print_display.md:82 src/hello/print/print_display.md:95\nmsgid \"\\\"Debug: {:?}\\\"\"\nmsgstr \"\\\"Debug: {:?}\\\"\"\n\n#: src/hello/print/print_display.md:87\nmsgid \"\\\"The big range is {big} and the small is {small}\\\"\"\nmsgstr \"\\\"The big range is {big} and the small is {small}\\\"\"\n\n#: src/hello/print/print_display.md:93\nmsgid \"\\\"Compare points:\\\"\"\nmsgstr \"\\\"Compare points:\\\"\"\n\n#: src/hello/print/print_display.md:97\nmsgid \"\"\n\"// Error. Both `Debug` and `Display` were implemented, but `{:b}`\\n\"\n\"    // requires `fmt::Binary` to be implemented. This will not work.\\n\"\n\"    // println!(\\\"What does Point2D look like in binary: {:b}?\\\", point);\\n\"\nmsgstr \"\"\n\"// `Debug`と`Display`は実装されていますが、`fmt::Binary`はされていないため\\n\"\n\"    // `{:b}`使用している以下の例はエラーになります。\\n\"\n\"    // println!(\\\"What does Point2D look like in binary: {:b}?\\\", point);\\n\"\n\n#: src/hello/print/print_display.md:103\nmsgid \"\"\n\"So, `fmt::Display` has been implemented but `fmt::Binary` has not, and \"\n\"therefore cannot be used. `std::fmt` has many such [`traits`](https://doc.\"\n\"rust-lang.org/std/fmt/#formatting-traits) and each requires its own \"\n\"implementation. This is detailed further in [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/).\"\nmsgstr \"\"\n\"`fmt::Display`は実装されていますが、`fmt::Binary`はされていないので使用できま\"\n\"せん。`std::fmt`にはそのような[トレイト](https://doc.rust-lang.org/std/fmt/\"\n\"#formatting-traits)が数多くあり、それぞれに独自の実装が必要です。詳しくは\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)を参照してください。\"\n\n#: src/hello/print/print_display.md:109\nmsgid \"\"\n\"After checking the output of the above example, use the `Point2D` struct as \"\n\"a guide to add a `Complex` struct to the example. When printed in the same \"\n\"way, the output should be:\"\nmsgstr \"\"\n\"上記の例のアウトプットを確認し、`Point2D`構造体を参考として、複素数を格納する\"\n\"ための`Complex`構造体を定義しましょう。うまく行けば以下のように出力されるはず\"\n\"です。\"\n\n#: src/hello/print/print_display.md:120\nmsgid \"\"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [`macros`](../../macros.md), [`struct`](../../custom_types/\"\n\"structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-\"\n\"traits), and [`use`](../../mod/use.md)\"\nmsgstr \"\"\n\"[導出](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/std/\"\n\"fmt/), [マクロ](../../macros.md), [構造体](../../custom_types/structs.md), \"\n\"[トレイト](https://doc.rust-lang.org/std/fmt/#formatting-traits), [`use`]\"\n\"(../../mod/use.md)\"\n\n#: src/hello/print/print_display/testcase_list.md:3\nmsgid \"\"\n\"Implementing `fmt::Display` for a structure where the elements must each be \"\n\"handled sequentially is tricky. The problem is that each `write!` generates \"\n\"a `fmt::Result`. Proper handling of this requires dealing with _all_ the \"\n\"results. Rust provides the `?` operator for exactly this purpose.\"\nmsgstr \"\"\n\"構造体のそれぞれの要素を別々に扱う`fmt::Display`を実装するのはトリッキーで\"\n\"す。というのも、それぞれの`write!`が別々の`fmt::Result`を生成するためです。適\"\n\"切に処理するためには *すべての* 結果に対して処理を書かなくてはなりません。こ\"\n\"のような場合は`?`演算子が使えます。\"\n\n#: src/hello/print/print_display/testcase_list.md:8\nmsgid \"Using `?` on `write!` looks like this:\"\nmsgstr \"以下のように`?`を`write!`に対して使用します。\"\n\n#: src/hello/print/print_display/testcase_list.md:11\nmsgid \"\"\n\"// Try `write!` to see if it errors. If it errors, return\\n\"\n\"// the error. Otherwise continue.\\n\"\nmsgstr \"\"\n\"// `write!`を実行し、エラーが生じた場合はエラーを返します。そうでなければ実行\"\n\"を継続します。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:16\nmsgid \"\"\n\"With `?` available, implementing `fmt::Display` for a `Vec` is \"\n\"straightforward:\"\nmsgstr \"`?`を使用すれば、`Vec`用の`fmt::Display`はより簡単に実装できます。\"\n\n#: src/hello/print/print_display/testcase_list.md:20\nmsgid \"// Import the `fmt` module.\\n\"\nmsgstr \"// `fmt`モジュールのインポート\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:21\nmsgid \"// Define a structure named `List` containing a `Vec`.\\n\"\nmsgstr \"// `Vec`を含む`List`という名の構造体を定義。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:27\nmsgid \"\"\n\"// Extract the value using tuple indexing,\\n\"\n\"        // and create a reference to `vec`.\\n\"\nmsgstr \"\"\n\"// タプルインデックスを使って値を取り出し、それへの参照`vec`を作ります。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:31\nmsgid \"\\\"[\\\"\"\nmsgstr \"\\\"[\\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:33\nmsgid \"\"\n\"// Iterate over `v` in `vec` while enumerating the iteration\\n\"\n\"        // count in `count`.\\n\"\nmsgstr \"\"\n\"// `v`を介して`vec`をイテレートし、同時にカウントを\\n\"\n\"        // `enumerate`で取得します。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:36\nmsgid \"\"\n\"// For every element except the first, add a comma.\\n\"\n\"            // Use the ? operator to return on errors.\\n\"\nmsgstr \"\"\n\"// 先頭以外の全要素にカンマを付けます。\\n\"\n\"            // ?演算子を使ってエラーを返します。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:38 src/std/str.md:36\nmsgid \"\\\", \\\"\"\nmsgstr \"\\\", \\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:42\nmsgid \"// Close the opened bracket and return a fmt::Result value.\\n\"\nmsgstr \"// 開きっぱなしのブラケットを閉じて、`fmt::Result`の値を返します。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:43\nmsgid \"\\\"]\\\"\"\nmsgstr \"\\\"]\\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:55\nmsgid \"\"\n\"Try changing the program so that the index of each element in the vector is \"\n\"also printed. The new output should look like this:\"\nmsgstr \"\"\n\"上記のプログラムを変更して、ベクタの各要素のインデックスも表示するようにして\"\n\"みましょう。変更後の出力は次のようになります。\"\n\n#: src/hello/print/print_display/testcase_list.md:64\nmsgid \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/ref.\"\n\"md), [`Result`](../../../std/result.md), [`struct`](../../../custom_types/\"\n\"structs.md), [`?`](../../../std/result/question_mark.md), and [`vec!`]\"\n\"(../../../std/vec.md)\"\nmsgstr \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/ref.\"\n\"md), [`Result`](../../../std/result.md), [構造体](../../../custom_types/\"\n\"structs.md), [`?`](../../../std/result/question_mark.md), [`vec!`](../../../\"\n\"std/vec.md)\"\n\n#: src/hello/print/fmt.md:3\nmsgid \"We've seen that formatting is specified via a _format string_:\"\nmsgstr \"\"\n\"これまで、文字列がどのようにフォーマットされるかは *フォーマット文字列* に\"\n\"よって決まるということを見てきました 。\"\n\n#: src/hello/print/fmt.md:5\nmsgid \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\nmsgstr \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\n\n#: src/hello/print/fmt.md:6\nmsgid \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\nmsgstr \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\n\n#: src/hello/print/fmt.md:7\nmsgid \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\nmsgstr \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\n\n#: src/hello/print/fmt.md:9\nmsgid \"\"\n\"The same variable (`foo`) can be formatted differently depending on which \"\n\"_argument type_ is used: `X` vs `o` vs _unspecified_.\"\nmsgstr \"\"\n\"ここでは（`foo`）という単一の変数が`X`、`o`、 *指定なし* 、という様々な *引数\"\n\"タイプ* に応じてフォーマットされています。\"\n\n#: src/hello/print/fmt.md:12\nmsgid \"\"\n\"This formatting functionality is implemented via traits, and there is one \"\n\"trait for each argument type. The most common formatting trait is `Display`, \"\n\"which handles cases where the argument type is left unspecified: `{}` for \"\n\"instance.\"\nmsgstr \"\"\n\"フォーマットの機能はそれぞれの引数タイプごとに個別のトレイトを用いて実装され\"\n\"ています。最も一般的なトレイトは`Display`で、これは引数タイプが未指定（たとえ\"\n\"ば`{}`）の時に呼び出されます。\"\n\n#: src/hello/print/fmt.md:21\nmsgid \"// Latitude\\n\"\nmsgstr \"// 緯度\\n\"\n\n#: src/hello/print/fmt.md:23\nmsgid \"// Longitude\\n\"\nmsgstr \"// 経度\\n\"\n\n#: src/hello/print/fmt.md:28\nmsgid \"\"\n\"// `f` is a buffer, and this method must write the formatted string into \"\n\"it.\\n\"\nmsgstr \"\"\n\"// `f`はバッファです。このメソッドは\\n\"\n\"    // ここにフォーマットされた文字列を書き込みます。\\n\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'N'\"\nmsgstr \"'N'\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'S'\"\nmsgstr \"'S'\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'E'\"\nmsgstr \"'E'\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'W'\"\nmsgstr \"'W'\"\n\n#: src/hello/print/fmt.md:33\nmsgid \"\"\n\"// `write!` is like `format!`, but it will write the formatted string\\n\"\n\"        // into a buffer (the first argument).\\n\"\nmsgstr \"\"\n\"// `write!`は`format!`に似ていますが、フォーマットされた文字列を\\n\"\n\"        // バッファ（第一引数）に書き込みます。\\n\"\n\n#: src/hello/print/fmt.md:35\nmsgid \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\nmsgstr \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\n\n#: src/hello/print/fmt.md:49\nmsgid \"\\\"Dublin\\\"\"\nmsgstr \"\\\"Dublin\\\"\"\n\n#: src/hello/print/fmt.md:50\nmsgid \"\\\"Oslo\\\"\"\nmsgstr \"\\\"Oslo\\\"\"\n\n#: src/hello/print/fmt.md:51\nmsgid \"\\\"Vancouver\\\"\"\nmsgstr \"\\\"Vancouver\\\"\"\n\n#: src/hello/print/fmt.md:60\nmsgid \"\"\n\"// Switch this to use {} once you've added an implementation\\n\"\n\"        // for fmt::Display.\\n\"\nmsgstr \"\"\n\"// fmt::Displayに実装を追加したら、 {} を使用するように変更してください。\\n\"\n\n#: src/hello/print/fmt.md:62 src/primitives/tuples.md:60\n#: src/custom_types/structs.md:47 src/types/inference.md:23\n#: src/generics/bounds.md:49 src/generics/where.md:38 src/std/str.md:137\n#: src/std/result.md:59 src/std/result.md:61 src/std/result.md:63\n#: src/std/arc.md:26 src/std_misc/channels.md:53\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/hello/print/fmt.md:67\nmsgid \"\"\n\"You can view a [full list of formatting traits](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits) and their argument types in the [`std::fmt`]\"\n\"(https://doc.rust-lang.org/std/fmt/) documentation.\"\nmsgstr \"\"\n\"フォーマット用トレイトの全リストは[こちら](https://doc.rust-lang.org/std/fmt/\"\n\"#formatting-traits)から、引数タイプについては[`std::fmt`のドキュメンテーショ\"\n\"ン](https://doc.rust-lang.org/std/fmt/)から参照できます。\"\n\n#: src/hello/print/fmt.md:72\nmsgid \"\"\n\"Add an implementation of the `fmt::Display` trait for the `Color` struct \"\n\"above so that the output displays as:\"\nmsgstr \"\"\n\"上にあるソースコード中の`Color`という構造体のための`fmt::Display`トレイトの実\"\n\"装を追加しましょう。出力は以下のようになるはずです。\"\n\n#: src/hello/print/fmt.md:81\nmsgid \"Three hints if you get stuck:\"\nmsgstr \"詰まったら以下の3つがヒントになります。\"\n\n#: src/hello/print/fmt.md:83\nmsgid \"\"\n\"The formula for calculating a color in the RGB color space is: `RGB = \"\n\"(R*65536)+(G*256)+B , (when R is RED, G is GREEN and B is BLUE)`. For more \"\n\"see [RGB color format & calculation](https://www.rapidtables.com/web/color/\"\n\"RGB_Color.html#rgb-format).\"\nmsgstr \"\"\n\"RGB色空間で色を計算する式は`RGB = (R*65536)+(G*256)+B （R は RED, G は GREEN \"\n\"and B は BLUE）`です。詳細は[RGB color format & calculation](https://www.\"\n\"rapidtables.com/web/color/RGB_Color.html#rgb-format)を参照。\"\n\n#: src/hello/print/fmt.md:86\nmsgid \"\"\n\"You [may need to list each color more than once](https://doc.rust-lang.org/\"\n\"std/fmt/#named-parameters).\"\nmsgstr \"\"\n\"[それぞれの色を2回以上記述する必要があるかもしれません。](https://doc.rust-\"\n\"lang.org/std/fmt/#named-parameters)\"\n\n#: src/hello/print/fmt.md:87\nmsgid \"\"\n\"You can [pad with zeros to a width of 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width) with `:0>2`.\"\nmsgstr \"\"\n\"`:0>2`で、[幅を2に指定し、空白を0で埋める事ができます。](https://doc.rust-\"\n\"lang.org/std/fmt/#width)\"\n\n#: src/hello/print/fmt.md:91\nmsgid \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\nmsgstr \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\n\n#: src/primitives.md:3\nmsgid \"\"\n\"Rust provides access to a wide variety of `primitives`. A sample includes:\"\nmsgstr \"Rustは様々な基本データ型の使用をサポートしています。以下がその例です。\"\n\n#: src/primitives.md:5\nmsgid \"Scalar Types\"\nmsgstr \"スカラー型\"\n\n#: src/primitives.md:7\nmsgid \"\"\n\"Signed integers: `i8`, `i16`, `i32`, `i64`, `i128` and `isize` (pointer size)\"\nmsgstr \"\"\n\"符号付き整数：`i8`, `i16`, `i32`, `i64`, `i128`, `isize`（ポインタのサイズ）\"\n\n#: src/primitives.md:8\nmsgid \"\"\n\"Unsigned integers: `u8`, `u16`, `u32`, `u64`, `u128` and `usize` (pointer \"\n\"size)\"\nmsgstr \"\"\n\"符号無し整数：`u8`, `u16`, `u32`, `u64`, `u128`, `usize`（ポインタのサイズ）\"\n\n#: src/primitives.md:10\nmsgid \"Floating point: `f32`, `f64`\"\nmsgstr \"浮動小数点数：`f32`, `f64`\"\n\n#: src/primitives.md:11\nmsgid \"`char` Unicode scalar values like `'a'`, `'α'` and `'∞'` (4 bytes each)\"\nmsgstr \"\"\n\"`char`：`'a'`, `'α'`, `'∞'`などのUnicodeのスカラー値（それぞれ4バイト）\"\n\n#: src/primitives.md:12\nmsgid \"`bool` either `true` or `false`\"\nmsgstr \"`bool`：`true`または`false`\"\n\n#: src/primitives.md:13\nmsgid \"The unit type `()`, whose only possible value is an empty tuple: `()`\"\nmsgstr \"ユニット型 `()`：唯一の値として空のタプル`()`を持つ\"\n\n#: src/primitives.md:15\nmsgid \"\"\n\"Despite the value of a unit type being a tuple, it is not considered a \"\n\"compound type because it does not contain multiple values.\"\nmsgstr \"\"\n\"ユニット型はその値がタプルですが、複合型とはみなされません。内部に複数の値を\"\n\"含んでいるわけではないからです。\"\n\n#: src/primitives.md:18\nmsgid \"Compound Types\"\nmsgstr \"複合型\"\n\n#: src/primitives.md:20\nmsgid \"Arrays like `[1, 2, 3]`\"\nmsgstr \"配列： 例えば`[1, 2, 3]`\"\n\n#: src/primitives.md:21\nmsgid \"Tuples like `(1, true)`\"\nmsgstr \"タプル：例えば`(1, true)`\"\n\n#: src/primitives.md:23\nmsgid \"\"\n\"Variables can always be _type annotated_. Numbers may additionally be \"\n\"annotated via a _suffix_ or _by default_. Integers default to `i32` and \"\n\"floats to `f64`. Note that Rust can also infer types from context.\"\nmsgstr \"\"\n\"変数は常に *型指定* できます。数値型の場合はさらにサフィックスでの指定も可能\"\n\"です。指定しない場合デフォルトになります。整数は`i32`が、浮動小数点は`f64`が\"\n\"デフォルトです。また、Rustは文脈から型を推論することもできます。\"\n\n#: src/primitives.md:29\nmsgid \"// Variables can be type annotated.\\n\"\nmsgstr \"// 変数に型を指定。\\n\"\n\n#: src/primitives.md:32\nmsgid \"// Regular annotation\\n\"\nmsgstr \"// 通常の型指定\\n\"\n\n#: src/primitives.md:33\nmsgid \"// Suffix annotation\\n\"\nmsgstr \"// サフィックスによる型指定\\n\"\n\n#: src/primitives.md:35\nmsgid \"// Or a default will be used.\\n\"\nmsgstr \"// サフィックスを指定しない場合、デフォルトを選択。\\n\"\n\n#: src/primitives.md:36\nmsgid \"// `f64`\\n\"\nmsgstr \"// `f64`\\n\"\n\n#: src/primitives.md:37\nmsgid \"// `i32`\\n\"\nmsgstr \"// `i32`\\n\"\n\n#: src/primitives.md:39\nmsgid \"// A type can also be inferred from context.\\n\"\nmsgstr \"// 型を文脈から推論することも可能。\\n\"\n\n#: src/primitives.md:40\nmsgid \"// Type i64 is inferred from another line.\\n\"\nmsgstr \"// 型 i64 は次行の内容に基づいて推論。\\n\"\n\n#: src/primitives.md:43\nmsgid \"// A mutable variable's value can be changed.\\n\"\nmsgstr \"// ミュータブルな変数は値を変更できます。\\n\"\n\n#: src/primitives.md:44\nmsgid \"// Mutable `i32`\\n\"\nmsgstr \"// ミュータブルな`i32`\\n\"\n\n#: src/primitives.md:47\nmsgid \"// Error! The type of a variable can't be changed.\\n\"\nmsgstr \"// エラー！ミュータブルな変数でも型は不変。\\n\"\n\n#: src/primitives.md:50\nmsgid \"// Variables can be overwritten with shadowing.\\n\"\nmsgstr \"// 変数はシャドーイングによって上書きできます。\\n\"\n\n#: src/primitives.md:57\nmsgid \"\"\n\"[the `std` library](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [`inference`](types/inference.md), and \"\n\"[`shadowing`](variable_bindings/scope.md)\"\nmsgstr \"\"\n\"[`std` ライブラリ](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [型推論](types/inference.md), [シャドーイング]\"\n\"(variable_bindings/scope.md)\"\n\n#: src/primitives/literals.md:3\nmsgid \"\"\n\"Integers `1`, floats `1.2`, characters `'a'`, strings `\\\"abc\\\"`, booleans \"\n\"`true` and the unit type `()` can be expressed using literals.\"\nmsgstr \"\"\n\"整数`1`、浮動小数点数`1.2`、文字`'a'`、文字列`\\\"abc\\\"`、ブーリアン`true`、ユ\"\n\"ニット`()`は、リテラルを使って表すことが可能です。\"\n\n#: src/primitives/literals.md:6\nmsgid \"\"\n\"Integers can, alternatively, be expressed using hexadecimal, octal or binary \"\n\"notation using these prefixes respectively: `0x`, `0o` or `0b`.\"\nmsgstr \"\"\n\"また整数型の場合、プレフィックスに`0x`、`0o`、`0b`を指定することでそれぞれ16\"\n\"進数、8進数、2進数を使って表すことができます。\"\n\n#: src/primitives/literals.md:9\nmsgid \"\"\n\"Underscores can be inserted in numeric literals to improve readability, e.g. \"\n\"`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.\"\nmsgstr \"\"\n\"可読性のため、`_`（アンダースコア）を数値リテラルの間に挿入することができま\"\n\"す。例えば`1_000`は`1000`と、`0.000_001`は`0.000001`とそれぞれ同一です。\"\n\n#: src/primitives/literals.md:12\nmsgid \"\"\n\"Rust also supports scientific [E-notation](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation), e.g. `1e6`, `7.6e-4`. The associated type \"\n\"is `f64`.\"\nmsgstr \"\"\n\"また、Rustは`1e6`や`7.6e-4`などの科学的な[E表記](https://en.wikipedia.org/\"\n\"wiki/Scientific_notation#E_notation)をサポートしています。この表記は`f64`にな\"\n\"ります。\"\n\n#: src/primitives/literals.md:15\nmsgid \"\"\n\"We need to tell the compiler the type of the literals we use. For now, we'll \"\n\"use the `u32` suffix to indicate that the literal is an unsigned 32-bit \"\n\"integer, and the `i32` suffix to indicate that it's a signed 32-bit integer.\"\nmsgstr \"\"\n\"コンパイラに、リテラルの型を伝えたい場合があります。現在の仕様では、リテラル\"\n\"が32ビット符号無し整数であることを伝える場合、`u32`サフィックスを、符号付き32\"\n\"ビット整数であれば`i32`サフィックスを使用します。\"\n\n#: src/primitives/literals.md:19\nmsgid \"\"\n\"The operators available and their precedence [in Rust](https://doc.rust-lang.\"\n\"org/reference/expressions.html#expression-precedence) are similar to other \"\n\"[C-like languages](https://en.wikipedia.org/wiki/\"\n\"Operator_precedence#Programming_languages).\"\nmsgstr \"\"\n\"Rustで使用可能な[演算子とその優先順位](https://doc.rust-lang.org/reference/\"\n\"expressions.html#expression-precedence)は、[Cなどの言語のもの](https://en.\"\n\"wikipedia.org/wiki/Operator_precedence#Programming_languages)とほぼ同じです。\"\n\n#: src/primitives/literals.md:24\nmsgid \"// Integer addition\\n\"\nmsgstr \"// 整数の足し算\\n\"\n\n#: src/primitives/literals.md:25\nmsgid \"\\\"1 + 2 = {}\\\"\"\nmsgstr \"\\\"1 + 2 = {}\\\"\"\n\n#: src/primitives/literals.md:27\nmsgid \"// Integer subtraction\\n\"\nmsgstr \"// 整数の引き算\\n\"\n\n#: src/primitives/literals.md:28\nmsgid \"\\\"1 - 2 = {}\\\"\"\nmsgstr \"\\\"1 - 2 = {}\\\"\"\n\n#: src/primitives/literals.md:29\nmsgid \"\"\n\"// TODO ^ Try changing `1i32` to `1u32` to see why the type is important\\n\"\nmsgstr \"\"\n\"// TODO ^ 型が重要であることを実感するため`1i32`を`1u32`に変更してみましょ\"\n\"う。\\n\"\n\n#: src/primitives/literals.md:31\nmsgid \"// Scientific notation\\n\"\nmsgstr \"// 科学的表記\\n\"\n\n#: src/primitives/literals.md:32\nmsgid \"\\\"1e4 is {}, -2.5e-3 is {}\\\"\"\nmsgstr \"\\\"1e4 is {}, -2.5e-3 is {}\\\"\"\n\n#: src/primitives/literals.md:34\nmsgid \"// Short-circuiting boolean logic\\n\"\nmsgstr \"// 短絡評価できる論理演算子\\n\"\n\n#: src/primitives/literals.md:35\nmsgid \"\\\"true AND false is {}\\\"\"\nmsgstr \"\\\"true AND false is {}\\\"\"\n\n#: src/primitives/literals.md:36\nmsgid \"\\\"true OR false is {}\\\"\"\nmsgstr \"\\\"true OR false is {}\\\"\"\n\n#: src/primitives/literals.md:37\nmsgid \"\\\"NOT true is {}\\\"\"\nmsgstr \"\\\"NOT true is {}\\\"\"\n\n#: src/primitives/literals.md:39\nmsgid \"// Bitwise operations\\n\"\nmsgstr \"// ビットワイズ演算\\n\"\n\n#: src/primitives/literals.md:40\nmsgid \"\\\"0011 AND 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 AND 0101 is {:04b}\\\"\"\n\n#: src/primitives/literals.md:41\nmsgid \"\\\"0011 OR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 OR 0101 is {:04b}\\\"\"\n\n#: src/primitives/literals.md:42\nmsgid \"\\\"0011 XOR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 XOR 0101 is {:04b}\\\"\"\n\n#: src/primitives/literals.md:43\nmsgid \"\\\"1 << 5 is {}\\\"\"\nmsgstr \"\\\"1 << 5 is {}\\\"\"\n\n#: src/primitives/literals.md:44\nmsgid \"\\\"0x80 >> 2 is 0x{:x}\\\"\"\nmsgstr \"\\\"0x80 >> 2 is 0x{:x}\\\"\"\n\n#: src/primitives/literals.md:46\nmsgid \"// Use underscores to improve readability!\\n\"\nmsgstr \"// 可読性のための`_`（アンダースコア）の使用\\n\"\n\n#: src/primitives/literals.md:47\nmsgid \"\\\"One million is written as {}\\\"\"\nmsgstr \"\\\"One million is written as {}\\\"\"\n\n#: src/primitives/tuples.md:3\nmsgid \"\"\n\"A tuple is a collection of values of different types. Tuples are constructed \"\n\"using parentheses `()`, and each tuple itself is a value with type signature \"\n\"`(T1, T2, ...)`, where `T1`, `T2` are the types of its members. Functions \"\n\"can use tuples to return multiple values, as tuples can hold any number of \"\n\"values.\"\nmsgstr \"\"\n\"タプルは異なる型の値の集合です。括弧`()`を用いて生成します。タプル自体がその\"\n\"メンバに対する型シグネチャを保持していますので、明示すると`(T1, T2, ...)`のよ\"\n\"うになります。タプルは大きさに制限がありませんので、関数が複数の値を返したい\"\n\"時に使われます。\"\n\n#: src/primitives/tuples.md:9\nmsgid \"// Tuples can be used as function arguments and as return values.\\n\"\nmsgstr \"// タプルを関数の引数と返り値として使用しています。\\n\"\n\n#: src/primitives/tuples.md:11\nmsgid \"// `let` can be used to bind the members of a tuple to variables.\\n\"\nmsgstr \"// `let`でタプルの中の値を別の変数に束縛することができます。\\n\"\n\n#: src/primitives/tuples.md:16\nmsgid \"// The following struct is for the activity.\\n\"\nmsgstr \"// 以下の構造体は後ほど「演習」で用います。\\n\"\n\n#: src/primitives/tuples.md:22\nmsgid \"// A tuple with a bunch of different types.\\n\"\nmsgstr \"// 様々な型を値に持つタプル\\n\"\n\n#: src/primitives/tuples.md:26 src/generics.md:50 src/generics.md:55\n#: src/generics/gen_fn.md:47\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/primitives/tuples.md:28\nmsgid \"// Values can be extracted from the tuple using tuple indexing.\\n\"\nmsgstr \"// インデックスを用いて、タプル内の要素を参照できます。\\n\"\n\n#: src/primitives/tuples.md:29\nmsgid \"\\\"Long tuple first value: {}\\\"\"\nmsgstr \"\\\"Long tuple first value: {}\\\"\"\n\n#: src/primitives/tuples.md:30\nmsgid \"\\\"Long tuple second value: {}\\\"\"\nmsgstr \"\\\"Long tuple second value: {}\\\"\"\n\n#: src/primitives/tuples.md:32\nmsgid \"// Tuples can be tuple members.\\n\"\nmsgstr \"// タプルはタプルのメンバになれます。\\n\"\n\n#: src/primitives/tuples.md:35\nmsgid \"// Tuples are printable.\\n\"\nmsgstr \"// タプルは出力できます。\\n\"\n\n#: src/primitives/tuples.md:36\nmsgid \"\\\"tuple of tuples: {:?}\\\"\"\nmsgstr \"\\\"tuple of tuples: {:?}\\\"\"\n\n#: src/primitives/tuples.md:38\nmsgid \"\"\n\"// But long Tuples (more than 12 elements) cannot be printed.\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"Too long tuple: {:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ Uncomment the above 2 lines to see the compiler error\\n\"\nmsgstr \"\"\n\"// しかし長すぎるタプル（12要素より多いもの）は出力できません。\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"Too long tuple: {:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ 上記2行のコメントを外して、コンパイルエラーを確認しましょう。\\n\"\n\n#: src/primitives/tuples.md:44\nmsgid \"\\\"Pair is {:?}\\\"\"\nmsgstr \"\\\"Pair is {:?}\\\"\"\n\n#: src/primitives/tuples.md:46\nmsgid \"\\\"The reversed pair is {:?}\\\"\"\nmsgstr \"\\\"The reversed pair is {:?}\\\"\"\n\n#: src/primitives/tuples.md:48\nmsgid \"\"\n\"// To create one element tuples, the comma is required to tell them apart\\n\"\n\"    // from a literal surrounded by parentheses.\\n\"\nmsgstr \"\"\n\"// 要素を1つしか持たないタプルを作成する場合、括弧で囲まれたただのリテラル\\n\"\n\"    // と区別するため、カンマが必要になります。\\n\"\n\n#: src/primitives/tuples.md:50\nmsgid \"\\\"One element tuple: {:?}\\\"\"\nmsgstr \"\\\"One element tuple: {:?}\\\"\"\n\n#: src/primitives/tuples.md:51\nmsgid \"\\\"Just an integer: {:?}\\\"\"\nmsgstr \"\\\"Just an integer: {:?}\\\"\"\n\n#: src/primitives/tuples.md:53\nmsgid \"// Tuples can be destructured to create bindings.\\n\"\nmsgstr \"// タプルを分解して別の変数にそれぞれの値を代入。\\n\"\n\n#: src/primitives/tuples.md:54 src/conversion/from_into.md:17\n#: src/fn/closures/input_parameters.md:52 src/std_misc/fs.md:51\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/primitives/tuples.md:57\nmsgid \"\\\"{:?}, {:?}, {:?}, {:?}\\\"\"\nmsgstr \"\\\"{:?}, {:?}, {:?}, {:?}\\\"\"\n\n#: src/primitives/tuples.md:66\nmsgid \"\"\n\"_Recap_: Add the `fmt::Display` trait to the `Matrix` struct in the above \"\n\"example, so that if you switch from printing the debug format `{:?}` to the \"\n\"display format `{}`, you see the following output:\"\nmsgstr \"\"\n\"*復習* ：上にある`Matrix`という構造体に、`fmt::Display`トレイトを追加しましょ\"\n\"う。デバッグフォーマット`{:?}`ではなくディスプレイフォーマット`{}`で出力すれ\"\n\"ば次のようになるはずです。\"\n\n#: src/primitives/tuples.md:75\nmsgid \"\"\n\"You may want to refer back to the example for [print display](../hello/print/\"\n\"print_display.md).\"\nmsgstr \"\"\n\"必要に応じて[ディスプレイのページ](../hello/print/print_display.md)に戻りま\"\n\"しょう。\"\n\n#: src/primitives/tuples.md:76\nmsgid \"\"\n\"Add a `transpose` function using the `reverse` function as a template, which \"\n\"accepts a matrix as an argument, and returns a matrix in which two elements \"\n\"have been swapped. For example:\"\nmsgstr \"\"\n\"`reverse`関数を雛形にした`transpose`関数を実装してください。この関数は\"\n\"`Matrix`を引数として受け取り、要素のうち2つを入れ替えたものを返します。つまり\"\n\n#: src/primitives/tuples.md:81\nmsgid \"\\\"Matrix:\\\\n{}\\\"\"\nmsgstr \"\\\"Matrix:\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:82\nmsgid \"\\\"Transpose:\\\\n{}\\\"\"\nmsgstr \"\\\"Transpose:\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:85\nmsgid \"Results in the output:\"\nmsgstr \"は以下の様な出力になります。\"\n\n#: src/primitives/array.md:3\nmsgid \"\"\n\"An array is a collection of objects of the same type `T`, stored in \"\n\"contiguous memory. Arrays are created using brackets `[]`, and their length, \"\n\"which is known at compile time, is part of their type signature `[T; \"\n\"length]`.\"\nmsgstr \"\"\n\"配列は`T`という単一の型のオブジェクトの集合です。それらのオブジェクトはメモリ\"\n\"上の連続した領域に保存されます。配列は`[]`を用いて生成されます。長さはコンパ\"\n\"イル時には決定されていて、`[T; length]`という形で指定できます。\"\n\n#: src/primitives/array.md:7\nmsgid \"\"\n\"Slices are similar to arrays, but their length is not known at compile time. \"\n\"Instead, a slice is a two-word object; the first word is a pointer to the \"\n\"data, the second word is the length of the slice. The word size is the same \"\n\"as usize, determined by the processor architecture, e.g. 64 bits on an \"\n\"x86-64. Slices can be used to borrow a section of an array and have the type \"\n\"signature `&[T]`.\"\nmsgstr \"\"\n\"スライスは配列に似ていますが、コンパイル時に長さが決定されていません。スライ\"\n\"スは2ワードからなるオブジェクトであり、最初のワードがデータへのポインタ、2番\"\n\"目のワードがスライスの長さです。ワード長は`usize`と同一で、プロセッサのアーキ\"\n\"テクチャによって決まります。例えばx86-64では64ビットです。スライスは配列の一\"\n\"部を借用するのに使用され、`&[T]`という型シグネチャを持ちます。\"\n\n#: src/primitives/array.md:15\nmsgid \"// This function borrows a slice.\\n\"\nmsgstr \"// この関数はスライスを借用します。\\n\"\n\n#: src/primitives/array.md:18\nmsgid \"\\\"First element of the slice: {}\\\"\"\nmsgstr \"\\\"First element of the slice: {}\\\"\"\n\n#: src/primitives/array.md:19\nmsgid \"\\\"The slice has {} elements\\\"\"\nmsgstr \"\\\"The slice has {} elements\\\"\"\n\n#: src/primitives/array.md:23\nmsgid \"// Fixed-size array (type signature is superfluous).\\n\"\nmsgstr \"// 固定長の配列（型シグネチャは冗長なので、なくても可）\\n\"\n\n#: src/primitives/array.md:26\nmsgid \"// All elements can be initialized to the same value.\\n\"\nmsgstr \"// すべての要素を同じ値で初期化する場合\\n\"\n\n#: src/primitives/array.md:29\nmsgid \"// Indexing starts at 0.\\n\"\nmsgstr \"// インデックスは0から。\\n\"\n\n#: src/primitives/array.md:30\nmsgid \"\\\"First element of the array: {}\\\"\"\nmsgstr \"\\\"First element of the array: {}\\\"\"\n\n#: src/primitives/array.md:31\nmsgid \"\\\"Second element of the array: {}\\\"\"\nmsgstr \"\\\"Second element of the array: {}\\\"\"\n\n#: src/primitives/array.md:33\nmsgid \"// `len` returns the count of elements in the array.\\n\"\nmsgstr \"// `len`は配列の要素数を返します。\\n\"\n\n#: src/primitives/array.md:34\nmsgid \"\\\"Number of elements in array: {}\\\"\"\nmsgstr \"\\\"Number of elements in array: {}\\\"\"\n\n#: src/primitives/array.md:36\nmsgid \"// Arrays are stack allocated.\\n\"\nmsgstr \"// 配列はスタック上に置かれます。\\n\"\n\n#: src/primitives/array.md:37\nmsgid \"\\\"Array occupies {} bytes\\\"\"\nmsgstr \"\\\"Array occupies {} bytes\\\"\"\n\n#: src/primitives/array.md:39\nmsgid \"// Arrays can be automatically borrowed as slices.\\n\"\nmsgstr \"// 配列は自動的にスライスとして借用されます。\\n\"\n\n#: src/primitives/array.md:40\nmsgid \"\\\"Borrow the whole array as a slice.\\\"\"\nmsgstr \"\\\"Borrow the whole array as a slice.\\\"\"\n\n#: src/primitives/array.md:43\nmsgid \"\"\n\"// Slices can point to a section of an array.\\n\"\n\"    // They are of the form [starting_index..ending_index].\\n\"\n\"    // `starting_index` is the first position in the slice.\\n\"\n\"    // `ending_index` is one more than the last position in the slice.\\n\"\nmsgstr \"\"\n\"// スライスは配列の一部を指すことができます。\\n\"\n\"    // [starting_index..ending_index] の形をとり、\\n\"\n\"    // `starting_index`はスライスの先頭の位置を表し、\\n\"\n\"    // `ending_index`はスライスの末尾の1つ先の位置を表します。\\n\"\n\n#: src/primitives/array.md:47\nmsgid \"\\\"Borrow a section of the array as a slice.\\\"\"\nmsgstr \"\\\"Borrow a section of the array as a slice.\\\"\"\n\n#: src/primitives/array.md:50\nmsgid \"// Example of empty slice `&[]`:\\n\"\nmsgstr \"// 空のスライス`&[]`の例：\\n\"\n\n#: src/primitives/array.md:53\nmsgid \"// Same but more verbose\\n\"\nmsgstr \"// 同じ意味だがより冗長な書き方\\n\"\n\n#: src/primitives/array.md:55\nmsgid \"\"\n\"// Arrays can be safely accessed using `.get`, which returns an\\n\"\n\"    // `Option`. This can be matched as shown below, or used with\\n\"\n\"    // `.expect()` if you would like the program to exit with a nice\\n\"\n\"    // message instead of happily continue.\\n\"\nmsgstr \"\"\n\"// 配列は、`Option`を返す`.get`で安全にアクセスできます。\\n\"\n\"    // `Option`は以下のようにマッチさせることもできるし、\\n\"\n\"    // 運よく処理を続ける代わりに、`.expect()`で素敵なメッセージとともに\\n\"\n\"    // プログラムを終了することもできます。\\n\"\n\n#: src/primitives/array.md:59\nmsgid \"// Oops, one element too far!\\n\"\nmsgstr \"// おっと、1要素余分！\\n\"\n\n#: src/primitives/array.md:61\nmsgid \"\\\"{}: {}\\\"\"\nmsgstr \"\\\"{}: {}\\\"\"\n\n#: src/primitives/array.md:62\nmsgid \"\\\"Slow down! {} is too far!\\\"\"\nmsgstr \"\\\"Slow down! {} is too far!\\\"\"\n\n#: src/primitives/array.md:66\nmsgid \"\"\n\"// Out of bound indexing on array causes compile time error.\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // Out of bound indexing on slice causes runtime error.\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\nmsgstr \"\"\n\"// 配列のインデックスが範囲外のときはコンパイルエラー。\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // スライスのインデックスが範囲外のときはランタイムエラー。\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\n\n#: src/custom_types.md:3\nmsgid \"Rust custom data types are formed mainly through the two keywords:\"\nmsgstr \"\"\n\"Rustでのカスタムデータ型の作成は主に以下の2つのキーワードを介して行われます。\"\n\n#: src/custom_types.md:5\nmsgid \"`struct`: define a structure\"\nmsgstr \"`struct`：構造体を定義する\"\n\n#: src/custom_types.md:6\nmsgid \"`enum`: define an enumeration\"\nmsgstr \"`enum`：列挙型を定義する\"\n\n#: src/custom_types.md:8\nmsgid \"Constants can also be created via the `const` and `static` keywords.\"\nmsgstr \"\"\n\"`const`、あるいは`static`というキーワードによって定数を定義することもできま\"\n\"す。\"\n\n#: src/custom_types/structs.md:3\nmsgid \"\"\n\"There are three types of structures (\\\"structs\\\") that can be created using \"\n\"the `struct` keyword:\"\nmsgstr \"`struct`というキーワードを用いて作成できる構造体には3種類あります。\"\n\n#: src/custom_types/structs.md:6\nmsgid \"Tuple structs, which are, basically, named tuples.\"\nmsgstr \"タプル構造体。（すなわちタプルに名前が付いたようなもの）\"\n\n#: src/custom_types/structs.md:7\nmsgid \"\"\n\"The classic [C structs](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\nmsgstr \"\"\n\"クラシックな[C言語スタイルの構造体。](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\n\n#: src/custom_types/structs.md:8\nmsgid \"Unit structs, which are field-less, are useful for generics.\"\nmsgstr \"\"\n\"ユニット構造体。これはフィールドを持たず、ジェネリック型を扱う際に有効です。\"\n\n#: src/custom_types/structs.md:11 src/custom_types/enum/enum_use.md:6\n#: src/custom_types/enum/c_like.md:6\nmsgid \"// An attribute to hide warnings for unused code.\\n\"\nmsgstr \"// 使用されていないコードよる警告を隠すアトリビュート\\n\"\n\n#: src/custom_types/structs.md:19\nmsgid \"// A unit struct\\n\"\nmsgstr \"// ユニット構造体\\n\"\n\n#: src/custom_types/structs.md:22\nmsgid \"// A tuple struct\\n\"\nmsgstr \"// タプル構造体\\n\"\n\n#: src/custom_types/structs.md:25\nmsgid \"// A struct with two fields\\n\"\nmsgstr \"// 2つのフィールドを持つ（クラシックな）構造体\\n\"\n\n#: src/custom_types/structs.md:31\nmsgid \"// Structs can be reused as fields of another struct\\n\"\nmsgstr \"// 構造体は他の構造体のフィールドになることができます。\\n\"\n\n#: src/custom_types/structs.md:34\nmsgid \"\"\n\"// A rectangle can be specified by where the top left and bottom right\\n\"\n\"    // corners are in space.\\n\"\nmsgstr \"\"\n\"// 長方形は座標空間上における左上隅と右下隅の位置によって指定できます。\\n\"\n\n#: src/custom_types/structs.md:41\nmsgid \"// Create struct with field init shorthand\\n\"\nmsgstr \"// 構造体をフィールド初期化の簡略記法で生成。\\n\"\n\n#: src/custom_types/structs.md:46\nmsgid \"// Print debug struct\\n\"\nmsgstr \"// 構造体のデバッグ表示\\n\"\n\n#: src/custom_types/structs.md:49\nmsgid \"// Instantiate a `Point`\\n\"\nmsgstr \"// `Point`のインスタンス化\\n\"\n\n#: src/custom_types/structs.md:53\nmsgid \"// Access the fields of the point\\n\"\nmsgstr \"// pointのフィールドにアクセスします。\\n\"\n\n#: src/custom_types/structs.md:54\nmsgid \"\\\"point coordinates: ({}, {})\\\"\"\nmsgstr \"\\\"point coordinates: ({}, {})\\\"\"\n\n#: src/custom_types/structs.md:56\nmsgid \"\"\n\"// Make a new point by using struct update syntax to use the fields of our\\n\"\n\"    // other one\\n\"\nmsgstr \"\"\n\"// 構造体の更新記法を用いて、別の構造体のフィールドの値を基に\\n\"\n\"    // 新たなpointを生成。\\n\"\n\n#: src/custom_types/structs.md:60\nmsgid \"\"\n\"// `bottom_right.y` will be the same as `another_point.y` because we used \"\n\"that field\\n\"\n\"    // from `another_point`\\n\"\nmsgstr \"\"\n\"// `bottom_right.y`の値は`another_point.y`と同一ですが、\\n\"\n\"    // これは`another_point`のフィールドの値を用いて生成したためです。\\n\"\n\n#: src/custom_types/structs.md:62\nmsgid \"\\\"second point: ({}, {})\\\"\"\nmsgstr \"\\\"second point: ({}, {})\\\"\"\n\n#: src/custom_types/structs.md:64\nmsgid \"// Destructure the point using a `let` binding\\n\"\nmsgstr \"// `let`を使用してpointをデストラクトします。\\n\"\n\n#: src/custom_types/structs.md:68\nmsgid \"// struct instantiation is an expression too\\n\"\nmsgstr \"// 構造体の定義とインスタンスの作成を同時に行います。\\n\"\n\n#: src/custom_types/structs.md:73\nmsgid \"// Instantiate a unit struct\\n\"\nmsgstr \"// ユニット構造体のインスタンス化\\n\"\n\n#: src/custom_types/structs.md:76\nmsgid \"// Instantiate a tuple struct\\n\"\nmsgstr \"// タプル構造体のインスタンス化\\n\"\n\n#: src/custom_types/structs.md:79\nmsgid \"// Access the fields of a tuple struct\\n\"\nmsgstr \"// タプル構造体のフィールドにアクセス\\n\"\n\n#: src/custom_types/structs.md:80 src/custom_types/structs.md:85\nmsgid \"\\\"pair contains {:?} and {:?}\\\"\"\nmsgstr \"\\\"pair contains {:?} and {:?}\\\"\"\n\n#: src/custom_types/structs.md:82\nmsgid \"// Destructure a tuple struct\\n\"\nmsgstr \"// タプル構造体のデストラクト\\n\"\n\n#: src/custom_types/structs.md:91\nmsgid \"\"\n\"Add a function `rect_area` which calculates the area of a `Rectangle` (try \"\n\"using nested destructuring).\"\nmsgstr \"\"\n\"`Rectangle`の面積を計算する`rect_area`関数を追加してください。ネストしたデス\"\n\"トラクトを使ってみましょう。\"\n\n#: src/custom_types/structs.md:93\nmsgid \"\"\n\"Add a function `square` which takes a `Point` and a `f32` as arguments, and \"\n\"returns a `Rectangle` with its top left corner on the point, and a width and \"\n\"height corresponding to the `f32`.\"\nmsgstr \"\"\n\"`Point`と`f32`を引数とし、`Rectangle`を返す`square`関数を追加してください。\"\n\"`Rectangle`の左上の点が`Point`になり、`f32`が`Rectangle`の幅と高さになりま\"\n\"す。\"\n\n#: src/custom_types/structs.md:97\nmsgid \"See also\"\nmsgstr \"参照\"\n\n#: src/custom_types/structs.md:99\nmsgid \"\"\n\"[`attributes`](../attribute.md), [raw identifiers](../compatibility/\"\n\"raw_identifiers.md) and [destructuring](../flow_control/match/destructuring.\"\n\"md)\"\nmsgstr \"\"\n\"[アトリビュート](../attribute.md), [生識別子](../compatibility/\"\n\"raw_identifiers.md), [デストラクト](../flow_control/match/destructuring.md)\"\n\n#: src/custom_types/enum.md:3\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which may be one of a few \"\n\"different variants. Any variant which is valid as a `struct` is also valid \"\n\"in an `enum`.\"\nmsgstr \"\"\n\"列挙型（`enum`）はいくつかの異なる要素型の中から1つを選ぶような場合に使用しま\"\n\"す。構造体（`struct`）の定義を満たすものならば何でも`enum` の要素型として使用\"\n\"できます。\"\n\n#: src/custom_types/enum.md:8\nmsgid \"\"\n\"// Create an `enum` to classify a web event. Note how both\\n\"\n\"// names and type information together specify the variant:\\n\"\n\"// `PageLoad != PageUnload` and `KeyPress(char) != Paste(String)`.\\n\"\n\"// Each is different and independent.\\n\"\nmsgstr \"\"\n\"// `enum`を作成してwebイベントを分類します。\\n\"\n\"// 名前と型情報を併せたものが要素型になっていることに注意。\\n\"\n\"// `PageLoad != PageUnload`、\\n\"\n\"// `KeyPress(char) != Paste(String)`です。\\n\"\n\"// 要素型は互いに異なり、互いに非依存です。\\n\"\n\n#: src/custom_types/enum.md:13\nmsgid \"// An `enum` variant may either be `unit-like`,\\n\"\nmsgstr \"// `enum`要素型はユニット風でも構いません。\\n\"\n\n#: src/custom_types/enum.md:16\nmsgid \"// like tuple structs,\\n\"\nmsgstr \"// タプル構造体風\\n\"\n\n#: src/custom_types/enum.md:19\nmsgid \"// or c-like structures.\\n\"\nmsgstr \"// C言語スタイルの構造体風\\n\"\n\n#: src/custom_types/enum.md:22\nmsgid \"\"\n\"// A function which takes a `WebEvent` enum as an argument and\\n\"\n\"// returns nothing.\\n\"\nmsgstr \"// 引数として`WebEvent`列挙型をとり、何も返さない関数\\n\"\n\n#: src/custom_types/enum.md:27\nmsgid \"\\\"page loaded\\\"\"\nmsgstr \"\\\"page loaded\\\"\"\n\n#: src/custom_types/enum.md:28\nmsgid \"\\\"page unloaded\\\"\"\nmsgstr \"\\\"page unloaded\\\"\"\n\n#: src/custom_types/enum.md:29\nmsgid \"// Destructure `c` from inside the `enum` variant.\\n\"\nmsgstr \"// `enum`の要素型から`c`をデストラクトします。\\n\"\n\n#: src/custom_types/enum.md:30\nmsgid \"\\\"pressed '{}'.\\\"\"\nmsgstr \"\\\"pressed '{}'.\\\"\"\n\n#: src/custom_types/enum.md:31\nmsgid \"\\\"pasted \\\\\\\"{}\\\\\\\".\\\"\"\nmsgstr \"\\\"pasted \\\\\\\"{}\\\\\\\".\\\"\"\n\n#: src/custom_types/enum.md:32\nmsgid \"// Destructure `Click` into `x` and `y`.\\n\"\nmsgstr \"// `Click`を`x`と`y`にデストラクトします。\\n\"\n\n#: src/custom_types/enum.md:34\nmsgid \"\\\"clicked at x={}, y={}.\\\"\"\nmsgstr \"\\\"clicked at x={}, y={}.\\\"\"\n\n#: src/custom_types/enum.md:40\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/custom_types/enum.md:41\nmsgid \"// `to_owned()` creates an owned `String` from a string slice.\\n\"\nmsgstr \"\"\n\"// `to_owned()`は文字列スライスから所有権のある`String`を作成します。\\n\"\n\n#: src/custom_types/enum.md:42\nmsgid \"\\\"my text\\\"\"\nmsgstr \"\\\"my text\\\"\"\n\n#: src/custom_types/enum.md:56\nmsgid \"Type aliases\"\nmsgstr \"型エイリアス\"\n\n#: src/custom_types/enum.md:58\nmsgid \"\"\n\"If you use a type alias, you can refer to each enum variant via its alias. \"\n\"This might be useful if the enum's name is too long or too generic, and you \"\n\"want to rename it.\"\nmsgstr \"\"\n\"型エイリアスを用いると、列挙型の要素型を別名で参照できます。これは列挙型の名\"\n\"前があまりに長かったり、あまりに一般的だったりで改名したい場合に役立ちます。\"\n\n#: src/custom_types/enum.md:67\nmsgid \"// Creates a type alias\\n\"\nmsgstr \"// 型エイリアスを作成します。\\n\"\n\n#: src/custom_types/enum.md:72\nmsgid \"\"\n\"// We can refer to each variant via its alias, not its long and \"\n\"inconvenient\\n\"\n\"    // name.\\n\"\nmsgstr \"\"\n\"// 長くて不便な列挙型の名前ではなく、別名を使って要素型を参照できます。\\n\"\n\n#: src/custom_types/enum.md:78\nmsgid \"\"\n\"The most common place you'll see this is in `impl` blocks using the `Self` \"\n\"alias.\"\nmsgstr \"\"\n\"このやり方がもっともよく見られるのは、`impl`ブロックで`Self`という別名を使用\"\n\"する場合です。\"\n\n#: src/custom_types/enum.md:96\nmsgid \"\"\n\"To learn more about enums and type aliases, you can read the [stabilization \"\n\"report](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847) from when this feature was stabilized into Rust.\"\nmsgstr \"\"\n\"列挙型や型エイリアスについて詳しく学びたい人は、この機能が安定してRustに取り\"\n\"込まれたときの[stabilization report](https://github.com/rust-lang/rust/\"\n\"pull/61682/#issuecomment-502472847)を読んでください。\"\n\n#: src/custom_types/enum.md:102\nmsgid \"\"\n\"[`match`](../flow_control/match.md), [`fn`](../fn.md), and [`String`](../std/\"\n\"str.md), [\\\"Type alias enum variants\\\" RFC](https://rust-lang.github.io/\"\n\"rfcs/2338-type-alias-enum-variants.html)\"\nmsgstr \"\"\n\"[`match`](../flow_control/match.md), [関数](../fn.md), [文字列](../std/str.\"\n\"md), [\\\"Type alias enum variants\\\" RFC](https://rust-lang.github.io/\"\n\"rfcs/2338-type-alias-enum-variants.html)\"\n\n#: src/custom_types/enum/enum_use.md:3\nmsgid \"The `use` declaration can be used so manual scoping isn't needed:\"\nmsgstr \"`use`を使用すれば変数のスコープを絶対名で指定する必要がなくなります。\"\n\n#: src/custom_types/enum/enum_use.md:20\nmsgid \"\"\n\"// Explicitly `use` each name so they are available without\\n\"\n\"    // manual scoping.\\n\"\nmsgstr \"// `use`することで絶対名でなくとも使用可能になります。\\n\"\n\n#: src/custom_types/enum/enum_use.md:23\nmsgid \"// Automatically `use` each name inside `Role`.\\n\"\nmsgstr \"// `Role`の中の名前をすべて`use`します。\\n\"\n\n#: src/custom_types/enum/enum_use.md:26\nmsgid \"// Equivalent to `Stage::Beginner`.\\n\"\nmsgstr \"// `use`しているため、`Stage::Beginner`と同じです。\\n\"\n\n#: src/custom_types/enum/enum_use.md:28\nmsgid \"// Equivalent to `Role::Student`.\\n\"\nmsgstr \"// `Role::Student`と同じ\\n\"\n\n#: src/custom_types/enum/enum_use.md:32\nmsgid \"// Note the lack of scoping because of the explicit `use` above.\\n\"\nmsgstr \"// `use`しているのでスコープを明示していません。\\n\"\n\n#: src/custom_types/enum/enum_use.md:33\nmsgid \"\\\"Beginners are starting their learning journey!\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/enum_use.md:34\nmsgid \"\\\"Advanced learners are mastering their subjects...\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/enum_use.md:38\nmsgid \"// Note again the lack of scoping.\\n\"\nmsgstr \"// こちらも同じ\\n\"\n\n#: src/custom_types/enum/enum_use.md:39\nmsgid \"\\\"Students are acquiring knowledge!\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/enum_use.md:40\nmsgid \"\\\"Teachers are spreading knowledge!\\\"\"\nmsgstr \"\"\n\n#: src/custom_types/enum/enum_use.md:47\nmsgid \"[`match`](../../flow_control/match.md) and [`use`](../../mod/use.md)\"\nmsgstr \"[`match`](../../flow_control/match.md), [`use`](../../mod/use.md)\"\n\n#: src/custom_types/enum/c_like.md:3\nmsgid \"`enum` can also be used as C-like enums.\"\nmsgstr \"列挙型はC言語の列挙型のような使い方をする事もできます。\"\n\n#: src/custom_types/enum/c_like.md:8\nmsgid \"// enum with implicit discriminator (starts at 0)\\n\"\nmsgstr \"// 値を明示しない場合、0から整数が順に入ります。\\n\"\n\n#: src/custom_types/enum/c_like.md:15\nmsgid \"// enum with explicit discriminator\\n\"\nmsgstr \"// 値を明示する場合\\n\"\n\n#: src/custom_types/enum/c_like.md:24\nmsgid \"// `enums` can be cast as integers.\\n\"\nmsgstr \"// 列挙型の中身は整数としてキャストできます。\\n\"\n\n#: src/custom_types/enum/c_like.md:25\nmsgid \"\\\"zero is {}\\\"\"\nmsgstr \"\\\"zero is {}\\\"\"\n\n#: src/custom_types/enum/c_like.md:26\nmsgid \"\\\"one is {}\\\"\"\nmsgstr \"\\\"one is {}\\\"\"\n\n#: src/custom_types/enum/c_like.md:28\nmsgid \"\\\"roses are #{:06x}\\\"\"\nmsgstr \"\\\"roses are #{:06x}\\\"\"\n\n#: src/custom_types/enum/c_like.md:29\nmsgid \"\\\"violets are #{:06x}\\\"\"\nmsgstr \"\\\"violets are #{:06x}\\\"\"\n\n#: src/custom_types/enum/c_like.md:35\nmsgid \"[casting](../../types/cast.md)\"\nmsgstr \"[キャスト](../../types/cast.md)\"\n\n#: src/custom_types/enum/testcase_linked_list.md:3\nmsgid \"A common way to implement a linked-list is via `enums`:\"\nmsgstr \"\"\n\"`enum`の使用が適切なパターンのひとつに、連結リストを作成する場合があります。\"\n\n#: src/custom_types/enum/testcase_linked_list.md:9\nmsgid \"\"\n\"// Cons: Tuple struct that wraps an element and a pointer to the next node\\n\"\nmsgstr \"// Cons：要素をラップし、次の要素へのポインタを保持するタプル構造体\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:11\nmsgid \"// Nil: A node that signifies the end of the linked list\\n\"\nmsgstr \"// Nil：連結リストの終端であることを示すノード\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:14\nmsgid \"// Methods can be attached to an enum\\n\"\nmsgstr \"// 列挙型にはメソッドを付与することができます。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:17\nmsgid \"// Create an empty list\\n\"\nmsgstr \"// 空リストの作成\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:19\nmsgid \"// `Nil` has type `List`\\n\"\nmsgstr \"// `Nil`は`List`型を持ちます。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:23\nmsgid \"\"\n\"// Consume a list, and return the same list with a new element at its front\\n\"\nmsgstr \"// リストを受け取り、その始端に新しい要素を付加したものを返す関数\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:25\nmsgid \"// `Cons` also has type List\\n\"\nmsgstr \"// この`Cons`自体も、その第2要素もどちらもList型です。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:29\nmsgid \"// Return the length of the list\\n\"\nmsgstr \"// リストの長さを返すメソッド\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:31\nmsgid \"\"\n\"// `self` has to be matched, because the behavior of this method\\n\"\n\"        // depends on the variant of `self`\\n\"\n\"        // `self` has type `&List`, and `*self` has type `List`, matching on \"\n\"a\\n\"\n\"        // concrete type `T` is preferred over a match on a reference `&T`\\n\"\n\"        // after Rust 2018 you can use self here and tail (with no ref) \"\n\"below as well,\\n\"\n\"        // rust will infer &s and ref tail. \\n\"\n\"        // See https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\nmsgstr \"\"\n\"// このメソッドは、`self`の状態によって振る舞いが\\n\"\n\"        // 変化するため、matchをする必要があります。\\n\"\n\"        // `self`の型は`&List`なので、`*self`は`List`になります。マッチング\"\n\"は\\n\"\n\"        // 参照（`&T`）ではなく実体（`T`）に対して行うのが好ましいです。\\n\"\n\"        // Rust 2018以降ではここでselfと（refのない）tailを使うことができ、\\n\"\n\"        // &selfとref tailが推論されます。\\n\"\n\"        // 参照 https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:39\nmsgid \"\"\n\"// Can't take ownership of the tail, because `self` is borrowed;\\n\"\n\"            // instead take a reference to the tail\\n\"\nmsgstr \"\"\n\"// `self`をすでに借用しているので、tailの所有権を取ることができません。\\n\"\n\"            // 代わりに参照を使用します。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:42\nmsgid \"// Base Case: An empty list has zero length\\n\"\nmsgstr \"// 空リストならば長さは0\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:47\nmsgid \"// Return representation of the list as a (heap allocated) string\\n\"\nmsgstr \"// リストをヒープ上の文字列として表したものを返すメソッド\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:51\nmsgid \"\"\n\"// `format!` is similar to `print!`, but returns a heap\\n\"\n\"                // allocated string instead of printing to the console\\n\"\nmsgstr \"\"\n\"// `format!`は`print!`に似ていますが、コンソール上に出力\\n\"\n\"                // する代わりに、ヒープ上の文字列を返します。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:53 src/generics/impl.md:44\nmsgid \"\\\"{}, {}\\\"\"\nmsgstr \"\\\"{}, {}\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:56\nmsgid \"\\\"Nil\\\"\"\nmsgstr \"\\\"Nil\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:63\nmsgid \"// Create an empty linked list\\n\"\nmsgstr \"// 空の連結リストを作成。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:66\nmsgid \"// Prepend some elements\\n\"\nmsgstr \"// 要素を追加。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:71\nmsgid \"// Show the final state of the list\\n\"\nmsgstr \"// 追加後の状態を表示。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:72\nmsgid \"\\\"linked list has length: {}\\\"\"\nmsgstr \"\\\"linked list has length: {}\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:79\nmsgid \"[`Box`](../../std/box.md) and [methods](../../fn/methods.md)\"\nmsgstr \"[`Box`](../../std/box.md), [メソッド](../../fn/methods.md)\"\n\n#: src/custom_types/constants.md:3\nmsgid \"\"\n\"Rust has two different types of constants which can be declared in any scope \"\n\"including global. Both require explicit type annotation:\"\nmsgstr \"\"\n\"Rustには2種類の定数があり、いずれもグローバルスコープを含む任意のスコープで宣\"\n\"言することができます。また、いずれも型を明示しなくてはなりません。\"\n\n#: src/custom_types/constants.md:6\nmsgid \"`const`: An unchangeable value (the common case).\"\nmsgstr \"`const`：不変の値（通常はこちらを使用します）\"\n\n#: src/custom_types/constants.md:7\nmsgid \"\"\n\"`static`: A possibly mutable variable with [`'static`](../scope/lifetime/\"\n\"static_lifetime.md) lifetime. The static lifetime is inferred and does not \"\n\"have to be specified. Accessing or modifying a mutable static variable is \"\n\"[`unsafe`](../unsafe.md).\"\nmsgstr \"\"\n\"`static`：[`'static`](../scope/lifetime/static_lifetime.md)ライフタイムを持つ\"\n\"変更可能な値。スタティックライフタイムは推論され、明示する必要はありません。\"\n\"可変なスタティック値へのアクセスや変更は[安全ではありません](../unsafe.md)。\"\n\n#: src/custom_types/constants.md:12\nmsgid \"// Globals are declared outside all other scopes.\\n\"\nmsgstr \"// グローバル変数はあらゆるスコープの外で宣言します。\\n\"\n\n#: src/custom_types/constants.md:13\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/custom_types/constants.md:17\nmsgid \"// Access constant in some function\\n\"\nmsgstr \"// 関数内から定数を参照。\\n\"\n\n#: src/custom_types/constants.md:24\nmsgid \"// Access constant in the main thread\\n\"\nmsgstr \"// main 関数の中から定数を参照。\\n\"\n\n#: src/custom_types/constants.md:25\nmsgid \"\\\"This is {}\\\"\"\nmsgstr \"\\\"This is {}\\\"\"\n\n#: src/custom_types/constants.md:26\nmsgid \"\\\"The threshold is {}\\\"\"\nmsgstr \"\\\"The threshold is {}\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"{} is {}\\\"\"\nmsgstr \"\\\"{} is {}\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"big\\\"\"\nmsgstr \"\\\"big\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"small\\\"\"\n\n#: src/custom_types/constants.md:29\nmsgid \"// Error! Cannot modify a `const`.\\n\"\nmsgstr \"// エラー！const`は変更できません。\\n\"\n\n#: src/custom_types/constants.md:31 src/variable_bindings/scope.md:21\n#: src/variable_bindings/declare.md:25 src/variable_bindings/freeze.md:16\n#: src/types/cast.md:19 src/types/cast.md:28 src/flow_control/for.md:95\n#: src/scope/borrow.md:41 src/scope/borrow/mut.md:52 src/std/vec.md:31\n#: src/std/vec.md:44 src/std/hash/hashset.md:48\nmsgid \"// FIXME ^ Comment out this line\\n\"\nmsgstr \"// FIXME ^ この行をコメントアウトしましょう\\n\"\n\n#: src/custom_types/constants.md:37\nmsgid \"\"\n\"[The `const`/`static` RFC](https://github.com/rust-lang/rfcs/blob/master/\"\n\"text/0246-const-vs-static.md), [`'static` lifetime](../scope/lifetime/\"\n\"static_lifetime.md)\"\nmsgstr \"\"\n\"[`const`/`static` のRFC](https://github.com/rust-lang/rfcs/blob/master/\"\n\"text/0246-const-vs-static.md), [`'static` ライフタイム](../scope/lifetime/\"\n\"static_lifetime.md)\"\n\n#: src/variable_bindings.md:3\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings can be type \"\n\"annotated when declared. However, in most cases, the compiler will be able \"\n\"to infer the type of the variable from the context, heavily reducing the \"\n\"annotation burden.\"\nmsgstr \"\"\n\"Rustは静的な型付けによる型安全性を提供します。変数束縛は宣言時に型を指定でき\"\n\"ます。とはいえたいていの場合は、コンパイラは変数の型をコンテキストから推測す\"\n\"ることができますので、型指定の負担を大幅に軽減できます。\"\n\n#: src/variable_bindings.md:8\nmsgid \"\"\n\"Values (like literals) can be bound to variables, using the `let` binding.\"\nmsgstr \"値（リテラルなど）は`let`を用いて変数に束縛することができます。\"\n\n#: src/variable_bindings.md:16\nmsgid \"// copy `an_integer` into `copied_integer`\\n\"\nmsgstr \"// `an_integer`を`copied_integer`へとコピー。\\n\"\n\n#: src/variable_bindings.md:19\nmsgid \"\\\"An integer: {:?}\\\"\"\nmsgstr \"\\\"An integer: {:?}\\\"\"\n\n#: src/variable_bindings.md:20\nmsgid \"\\\"A boolean: {:?}\\\"\"\nmsgstr \"\\\"A boolean: {:?}\\\"\"\n\n#: src/variable_bindings.md:21\nmsgid \"\\\"Meet the unit value: {:?}\\\"\"\nmsgstr \"\\\"Meet the unit value: {:?}\\\"\"\n\n#: src/variable_bindings.md:23\nmsgid \"\"\n\"// The compiler warns about unused variable bindings; these warnings can\\n\"\n\"    // be silenced by prefixing the variable name with an underscore\\n\"\nmsgstr \"\"\n\"// 使用されていない変数があると、コンパイラは警告を出します。\\n\"\n\"    // 変数名の頭に`_`（アンダーバー）を付けると警告を消すことができます。\\n\"\n\n#: src/variable_bindings.md:28\nmsgid \"\"\n\"// FIXME ^ Prefix with an underscore to suppress the warning\\n\"\n\"    // Please note that warnings may not be shown in a browser\\n\"\nmsgstr \"\"\n\"// FIXME ^ 頭にアンダーバーを付けて、警告を抑えましょう。\\n\"\n\"    // 警告はブラウザ上では表示されないかもしれません。\\n\"\n\n#: src/variable_bindings/mut.md:3\nmsgid \"\"\n\"Variable bindings are immutable by default, but this can be overridden using \"\n\"the `mut` modifier.\"\nmsgstr \"\"\n\"変数はデフォルトでイミュータブル（変更不可能）ですが`mut`構文を使用することで\"\n\"変更可能になります。\"\n\n#: src/variable_bindings/mut.md:11\nmsgid \"\\\"Before mutation: {}\\\"\"\nmsgstr \"\\\"Before mutation: {}\\\"\"\n\n#: src/variable_bindings/mut.md:13\nmsgid \"// Ok\\n\"\nmsgstr \"// 問題ありません。\\n\"\n\n#: src/variable_bindings/mut.md:16\nmsgid \"\\\"After mutation: {}\\\"\"\nmsgstr \"\\\"After mutation: {}\\\"\"\n\n#: src/variable_bindings/mut.md:18\nmsgid \"// Error! Cannot assign a new value to an immutable variable\\n\"\nmsgstr \"\"\n\"// エラー！イミュータブルな変数に新しい値を代入することはできません。\\n\"\n\n#: src/variable_bindings/mut.md:23\nmsgid \"The compiler will throw a detailed diagnostic about mutability errors.\"\nmsgstr \"コンパイラはミュータビリティに関するエラーの詳細を出してくれます。\"\n\n#: src/variable_bindings/scope.md:3\nmsgid \"\"\n\"Variable bindings have a scope, and are constrained to live in a _block_. A \"\n\"block is a collection of statements enclosed by braces `{}`.\"\nmsgstr \"\"\n\"変数はスコープを持つため、 **ブロック** の中に閉じ込められています。ブロック\"\n\"とは`{}`で囲まれた領域のことです。\"\n\n#: src/variable_bindings/scope.md:7\nmsgid \"// This binding lives in the main function\\n\"\nmsgstr \"// この変数はmain関数の間、生存しています。\\n\"\n\n#: src/variable_bindings/scope.md:10\nmsgid \"// This is a block, and has a smaller scope than the main function\\n\"\nmsgstr \"// ここから下がmain関数より小さいスコープを持つブロックとなります。\\n\"\n\n#: src/variable_bindings/scope.md:12\nmsgid \"// This binding only exists in this block\\n\"\nmsgstr \"// この変数はこのブロック内のみに存在します。\\n\"\n\n#: src/variable_bindings/scope.md:15\nmsgid \"\\\"inner short: {}\\\"\"\nmsgstr \"\\\"inner short: {}\\\"\"\n\n#: src/variable_bindings/scope.md:17\nmsgid \"// End of the block\\n\"\nmsgstr \"// ブロックの終わり\\n\"\n\n#: src/variable_bindings/scope.md:19\nmsgid \"// Error! `short_lived_binding` doesn't exist in this scope\\n\"\nmsgstr \"// エラー！`short_lived_binding`はこのスコープ内には存在しません。\\n\"\n\n#: src/variable_bindings/scope.md:20\nmsgid \"\\\"outer short: {}\\\"\"\nmsgstr \"\\\"outer short: {}\\\"\"\n\n#: src/variable_bindings/scope.md:23\nmsgid \"\\\"outer long: {}\\\"\"\nmsgstr \"\\\"outer long: {}\\\"\"\n\n#: src/variable_bindings/scope.md:26\nmsgid \"\"\n\"Also, [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) \"\n\"is allowed.\"\nmsgstr \"\"\n\"[変数のシャドーイング](https://en.wikipedia.org/wiki/Variable_shadowing)も可\"\n\"能です。\"\n\n#: src/variable_bindings/scope.md:32\nmsgid \"\\\"before being shadowed: {}\\\"\"\nmsgstr \"\\\"before being shadowed: {}\\\"\"\n\n#: src/variable_bindings/scope.md:34\nmsgid \"// This binding *shadows* the outer one\\n\"\nmsgstr \"// この変数はスコープ外の同名の変数を *シャドーイング* します。\\n\"\n\n#: src/variable_bindings/scope.md:35\nmsgid \"\\\"abc\\\"\"\nmsgstr \"\\\"abc\\\"\"\n\n#: src/variable_bindings/scope.md:37\nmsgid \"\\\"shadowed in inner block: {}\\\"\"\nmsgstr \"\\\"shadowed in inner block: {}\\\"\"\n\n#: src/variable_bindings/scope.md:39\nmsgid \"\\\"outside inner block: {}\\\"\"\nmsgstr \"\\\"outside inner block: {}\\\"\"\n\n#: src/variable_bindings/scope.md:41\nmsgid \"// This binding *shadows* the previous binding\\n\"\nmsgstr \"// この変数束縛は以前に定義した変数を *シャドーイング* します。\\n\"\n\n#: src/variable_bindings/scope.md:43\nmsgid \"\\\"shadowed in outer block: {}\\\"\"\nmsgstr \"\\\"shadowed in outer block: {}\\\"\"\n\n#: src/variable_bindings/declare.md:3\nmsgid \"\"\n\"It's possible to declare variable bindings first, and initialize them later. \"\n\"However, this form is seldom used, as it may lead to the use of \"\n\"uninitialized variables.\"\nmsgstr \"\"\n\"変数の宣言だけを行っておき、初期化をのちに行うことも可能です。しかし、最後ま\"\n\"で初期化されない変数が生じる可能性があるため、ふつうは同時に行われます。\"\n\n#: src/variable_bindings/declare.md:9\nmsgid \"// Declare a variable binding\\n\"\nmsgstr \"// 変数を宣言。\\n\"\n\n#: src/variable_bindings/declare.md:15\nmsgid \"// Initialize the binding\\n\"\nmsgstr \"// 変数を初期化。\\n\"\n\n#: src/variable_bindings/declare.md:19\nmsgid \"\\\"a binding: {}\\\"\"\nmsgstr \"\\\"a binding: {}\\\"\"\n\n#: src/variable_bindings/declare.md:23\nmsgid \"// Error! Use of uninitialized binding\\n\"\nmsgstr \"// エラー！初期化していない変数の使用\\n\"\n\n#: src/variable_bindings/declare.md:24 src/variable_bindings/declare.md:29\nmsgid \"\\\"another binding: {}\\\"\"\nmsgstr \"\\\"another binding: {}\\\"\"\n\n#: src/variable_bindings/declare.md:33\nmsgid \"\"\n\"The compiler forbids use of uninitialized variables, as this would lead to \"\n\"undefined behavior.\"\nmsgstr \"\"\n\"未初期化の変数があると予期せぬ動作をする場合があるため、コンパイラは変数を初\"\n\"期化してから使用するよう強制します。\"\n\n#: src/variable_bindings/freeze.md:3\nmsgid \"\"\n\"When data is bound by the same name immutably, it also _freezes_. _Frozen_ \"\n\"data can't be modified until the immutable binding goes out of scope:\"\nmsgstr \"\"\n\"データを同じ名前のイミュータブルな変数に束縛しなおすと、データは*凍結*されま\"\n\"す。*凍結*したデータは、イミュータブルな束縛がスコープ外になるまで変更できま\"\n\"せん。\"\n\n#: src/variable_bindings/freeze.md:11\nmsgid \"// Shadowing by immutable `_mutable_integer`\\n\"\nmsgstr \"// イミュータブルな`_mutable_integer`でシャドーイングします。\\n\"\n\n#: src/variable_bindings/freeze.md:14\nmsgid \"// Error! `_mutable_integer` is frozen in this scope\\n\"\nmsgstr \"// エラー！`_mutable_integer`はこのスコープでは凍結しています。\\n\"\n\n#: src/variable_bindings/freeze.md:18\nmsgid \"// `_mutable_integer` goes out of scope\\n\"\nmsgstr \"// `_mutable_integer`はスコープを抜けます。\\n\"\n\n#: src/variable_bindings/freeze.md:21\nmsgid \"// Ok! `_mutable_integer` is not frozen in this scope\\n\"\nmsgstr \"// OK！`_mutable_integer`はこのスコープでは凍結していません。\\n\"\n\n#: src/types.md:3\nmsgid \"\"\n\"Rust provides several mechanisms to change or define the type of primitive \"\n\"and user defined types. The following sections cover:\"\nmsgstr \"\"\n\"Rustには、基本データ型やユーザ定義型を定義したり変換したりする様々な方法があ\"\n\"ります。この章は以下の内容を扱います。\"\n\n#: src/types.md:5\nmsgid \"[Casting](types/cast.md) between primitive types\"\nmsgstr \"基本データ型の間で[キャスト](types/cast.md)を行う。\"\n\n#: src/types.md:6\nmsgid \"Specifying the desired type of [literals](types/literals.md)\"\nmsgstr \"[リテラル](types/literals.md)の型をどれにしたいか指定する。\"\n\n#: src/types.md:7\nmsgid \"Using [type inference](types/inference.md)\"\nmsgstr \"[型推論](types/inference.md)を使う。\"\n\n#: src/types.md:8\nmsgid \"[Aliasing](types/alias.md) types\"\nmsgstr \"型を[エイリアス](types/alias.md)する。\"\n\n#: src/types/cast.md:3\nmsgid \"\"\n\"Rust provides no implicit type conversion (coercion) between primitive \"\n\"types. But, explicit type conversion (casting) can be performed using the \"\n\"`as` keyword.\"\nmsgstr \"\"\n\"Rustは基本データ型について暗黙的な型変換（`coerction`）を行うことはありませ\"\n\"ん。しかし明示的な型変換（`casting`）は可能です。その場合`as`キーワードを使用\"\n\"します。\"\n\n#: src/types/cast.md:6\nmsgid \"\"\n\"Rules for converting between integral types follow C conventions generally, \"\n\"except in cases where C has undefined behavior. The behavior of all casts \"\n\"between integral types is well defined in Rust.\"\nmsgstr \"\"\n\"整数型から整数型へ型変換する場合、C言語で可能なケースの場合はC言語と同じで\"\n\"す。C言語で未定義の場合の挙動も、Rustでは完全に定義されています。\"\n\n#: src/types/cast.md:11\nmsgid \"// Suppress all warnings from casts which overflow.\\n\"\nmsgstr \"// オーバーフローを起こすようなキャストによる警告を無視します。\\n\"\n\n#: src/types/cast.md:17\nmsgid \"// Error! No implicit conversion\\n\"\nmsgstr \"// エラー！暗黙的な型変換はできません。\\n\"\n\n#: src/types/cast.md:21\nmsgid \"// Explicit conversion\\n\"\nmsgstr \"// 明示的な型変換\\n\"\n\n#: src/types/cast.md:25\nmsgid \"\"\n\"// Error! There are limitations in conversion rules.\\n\"\n\"    // A float cannot be directly converted to a char.\\n\"\nmsgstr \"\"\n\"// エラー！変換ルールには制限があります。\\n\"\n\"    // 浮動小数点数を文字に直接変換することはできません。\\n\"\n\n#: src/types/cast.md:30\nmsgid \"\\\"Casting: {} -> {} -> {}\\\"\"\nmsgstr \"\\\"Casting: {} -> {} -> {}\\\"\"\n\n#: src/types/cast.md:32\nmsgid \"\"\n\"// when casting any value to an unsigned type, T,\\n\"\n\"    // T::MAX + 1 is added or subtracted until the value\\n\"\n\"    // fits into the new type\\n\"\nmsgstr \"\"\n\"// 何らかの値を符号なしの型（仮にTとする）へキャストすると\\n\"\n\"    // 値がTに収まるまで、T::MAX + 1 が加算あるいは減算されます。\\n\"\n\n#: src/types/cast.md:36\nmsgid \"// 1000 already fits in a u16\\n\"\nmsgstr \"// 1000はすでにu16に収まっているため変化しません。\\n\"\n\n#: src/types/cast.md:37\nmsgid \"\\\"1000 as a u16 is: {}\\\"\"\nmsgstr \"\\\"1000 as a u16 is: {}\\\"\"\n\n#: src/types/cast.md:39\nmsgid \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // Under the hood, the first 8 least significant bits (LSB) are kept,\\n\"\n\"    // while the rest towards the most significant bit (MSB) get truncated.\\n\"\nmsgstr \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // 詳しく見てみると、最下位ビットから8bitが保持され、\\n\"\n\"    // 残りの上位ビットが切り取られる形になります。\\n\"\n\n#: src/types/cast.md:42 src/types/cast.md:61\nmsgid \"\\\"1000 as a u8 is : {}\\\"\"\nmsgstr \"\\\"1000 as a u8 is : {}\\\"\"\n\n#: src/types/cast.md:43\nmsgid \"// -1 + 256 = 255\\n\"\nmsgstr \"// -1 + 256 = 255\\n\"\n\n#: src/types/cast.md:44\nmsgid \"\\\"  -1 as a u8 is : {}\\\"\"\nmsgstr \"\\\"  -1 as a u8 is : {}\\\"\"\n\n#: src/types/cast.md:46\nmsgid \"// For positive numbers, this is the same as the modulus\\n\"\nmsgstr \"// 正の数では、これは剰余と同じです。\\n\"\n\n#: src/types/cast.md:47\nmsgid \"\\\"1000 mod 256 is : {}\\\"\"\nmsgstr \"\\\"1000 mod 256 is : {}\\\"\"\n\n#: src/types/cast.md:49\nmsgid \"\"\n\"// When casting to a signed type, the (bitwise) result is the same as\\n\"\n\"    // first casting to the corresponding unsigned type. If the most \"\n\"significant\\n\"\n\"    // bit of that value is 1, then the value is negative.\\n\"\nmsgstr \"\"\n\"// 符号付きの型にキャストする場合、（ビットとして見た）結果は対応する\\n\"\n\"    // 符号無し型へのキャストを行った結果と同じです。\\n\"\n\"    // 最上位ビットが1であれば、その値は負であることを示しています。\\n\"\n\n#: src/types/cast.md:53\nmsgid \"// Unless it already fits, of course.\\n\"\nmsgstr \"// すでに収まっている場合はそのままです。\\n\"\n\n#: src/types/cast.md:54\nmsgid \"\\\" 128 as a i16 is: {}\\\"\"\nmsgstr \"\\\" 128 as a i16 is: {}\\\"\"\n\n#: src/types/cast.md:56\nmsgid \"\"\n\"// In boundary case 128 value in 8-bit two's complement representation is \"\n\"-128\\n\"\nmsgstr \"\"\n\"// 境界値のケースを考えると、128の8ビットにおける2の補数は -128です。\\n\"\n\n#: src/types/cast.md:57\nmsgid \"\\\" 128 as a i8 is : {}\\\"\"\nmsgstr \"\\\" 128 as a i8 is : {}\\\"\"\n\n#: src/types/cast.md:59\nmsgid \"\"\n\"// repeating the example above\\n\"\n\"    // 1000 as u8 -> 232\\n\"\nmsgstr \"\"\n\"// 上で示した例を繰り返すと\\n\"\n\"    // 1000 as u8 -> 232\\n\"\n\n#: src/types/cast.md:62\nmsgid \"\"\n\"// and the value of 232 in 8-bit two's complement representation is -24\\n\"\nmsgstr \"// 232の8ビットにおける補数は -24。\\n\"\n\n#: src/types/cast.md:63\nmsgid \"\\\" 232 as a i8 is : {}\\\"\"\nmsgstr \"\\\" 232 as a i8 is : {}\\\"\"\n\n#: src/types/cast.md:65\nmsgid \"\"\n\"// Since Rust 1.45, the `as` keyword performs a *saturating cast*\\n\"\n\"    // when casting from float to int. If the floating point value exceeds\\n\"\n\"    // the upper bound or is less than the lower bound, the returned value\\n\"\n\"    // will be equal to the bound crossed.\\n\"\nmsgstr \"\"\n\"// Rust 1.45以降、浮動小数点数を整数にキャストするとき、\\n\"\n\"    // `as`キーワードが *飽和的キャスト* を行います。\\n\"\n\"    // 浮動小数点数の値が上限を超えたり下限を下回ったりする場合は、\\n\"\n\"    // 戻り値は越えられた境界の値となります。\\n\"\n\n#: src/types/cast.md:70\nmsgid \"// 300.0 as u8 is 255\\n\"\nmsgstr \"// 300.0 as u8 は 255\\n\"\n\n#: src/types/cast.md:71 src/types/cast.md:82\nmsgid \"\\\" 300.0 as u8 is : {}\\\"\"\nmsgstr \"\\\" 300.0 as u8 is : {}\\\"\"\n\n#: src/types/cast.md:72\nmsgid \"// -100.0 as u8 is 0\\n\"\nmsgstr \"// -100.0 as u8 は 0\\n\"\n\n#: src/types/cast.md:73 src/types/cast.md:84\nmsgid \"\\\"-100.0 as u8 is : {}\\\"\"\nmsgstr \"\\\"-100.0 as u8 is : {}\\\"\"\n\n#: src/types/cast.md:74 src/types/cast.md:85\nmsgid \"// nan as u8 is 0\\n\"\nmsgstr \"// nan as u8 は 0\\n\"\n\n#: src/types/cast.md:75 src/types/cast.md:86\nmsgid \"\\\"   nan as u8 is : {}\\\"\"\nmsgstr \"\\\"   nan as u8 is : {}\\\"\"\n\n#: src/types/cast.md:77\nmsgid \"\"\n\"// This behavior incurs a small runtime cost and can be avoided\\n\"\n\"    // with unsafe methods, however the results might overflow and\\n\"\n\"    // return **unsound values**. Use these methods wisely:\\n\"\nmsgstr \"\"\n\"// この挙動は実行時にややコストがかかるため、安全でない方法で回避できます。\\n\"\n\"    // ただし、結果はオーバーフローしたり *不正確な値* を返す場合がありま\"\n\"す。\\n\"\n\"    // この方法は賢く使いましょう。\\n\"\n\n#: src/types/cast.md:81\nmsgid \"// 300.0 as u8 is 44\\n\"\nmsgstr \"// 300.0 as u8 は 44\\n\"\n\n#: src/types/cast.md:83\nmsgid \"// -100.0 as u8 is 156\\n\"\nmsgstr \"// -100.0 as u8 は 156\\n\"\n\n#: src/types/literals.md:3\nmsgid \"\"\n\"Numeric literals can be type annotated by adding the type as a suffix. As an \"\n\"example, to specify that the literal `42` should have the type `i32`, write \"\n\"`42i32`.\"\nmsgstr \"\"\n\"数値型リテラルはサフィックスにより型を指定することが可能です。例えば、`42`と\"\n\"いうリテラルに対して`i32`型を指定するには`42i32`とします。\"\n\n#: src/types/literals.md:6\nmsgid \"\"\n\"The type of unsuffixed numeric literals will depend on how they are used. If \"\n\"no constraint exists, the compiler will use `i32` for integers, and `f64` \"\n\"for floating-point numbers.\"\nmsgstr \"\"\n\"サフィックスを指定しない数値型リテラルの場合、その型がどのように使用されるか\"\n\"に依存して決められます。デフォルトでは整数型の場合`i32`が、浮動小数点数型には\"\n\"`f64`が使われます。\"\n\n#: src/types/literals.md:12\nmsgid \"// Suffixed literals, their types are known at initialization\\n\"\nmsgstr \"// サフィックスを指定したリテラル。型は初期化とともに確定します。\\n\"\n\n#: src/types/literals.md:17\nmsgid \"// Unsuffixed literals, their types depend on how they are used\\n\"\nmsgstr \"// サフィックスを指定しないリテラル。型は使用方法に依存します。\\n\"\n\n#: src/types/literals.md:21\nmsgid \"// `size_of_val` returns the size of a variable in bytes\\n\"\nmsgstr \"// `size_of_val`関数は変数のサイズをバイトで返します。\\n\"\n\n#: src/types/literals.md:22\nmsgid \"\\\"size of `x` in bytes: {}\\\"\"\nmsgstr \"\\\"size of `x` in bytes: {}\\\"\"\n\n#: src/types/literals.md:23\nmsgid \"\\\"size of `y` in bytes: {}\\\"\"\nmsgstr \"\\\"size of `y` in bytes: {}\\\"\"\n\n#: src/types/literals.md:24\nmsgid \"\\\"size of `z` in bytes: {}\\\"\"\nmsgstr \"\\\"size of `z` in bytes: {}\\\"\"\n\n#: src/types/literals.md:25\nmsgid \"\\\"size of `i` in bytes: {}\\\"\"\nmsgstr \"\\\"size of `i` in bytes: {}\\\"\"\n\n#: src/types/literals.md:26\nmsgid \"\\\"size of `f` in bytes: {}\\\"\"\nmsgstr \"\\\"size of `f` in bytes: {}\\\"\"\n\n#: src/types/literals.md:30\nmsgid \"\"\n\"There are some concepts used in the previous code that haven't been \"\n\"explained yet, here's a brief explanation for the impatient readers:\"\nmsgstr \"\"\n\"上のコードには現時点では解説していない考えがいくつか使用されています。気にな\"\n\"る方のために簡単に説明をしておきましょう。\"\n\n#: src/types/literals.md:33\nmsgid \"\"\n\"`std::mem::size_of_val` is a function, but called with its _full path_. Code \"\n\"can be split in logical units called _modules_. In this case, the \"\n\"`size_of_val` function is defined in the `mem` module, and the `mem` module \"\n\"is defined in the `std` _crate_. For more details, see [modules](../mod.md) \"\n\"and [crates](../crates.md).\"\nmsgstr \"\"\n\"`std::mem::size_of_val`は関数ですが、 *絶対パス* で呼び出されています。ソース\"\n\"コードは論理的に区切られた *モジュール* と呼ばれるものにわけられることができ\"\n\"ます。今回の場合は`size_of_val`関数は`mem`モジュール内で定義されており、`mem`\"\n\"モジュールは`std` *クレート* 内で定義されています。より詳しくは[モジュール]\"\n\"(../mod.md)と[クレート](../crates.md)を参照してください。\"\n\n#: src/types/inference.md:3\nmsgid \"\"\n\"The type inference engine is pretty smart. It does more than looking at the \"\n\"type of the value expression during an initialization. It also looks at how \"\n\"the variable is used afterwards to infer its type. Here's an advanced \"\n\"example of type inference:\"\nmsgstr \"\"\n\"Rustの型推論エンジンはなかなか賢くできています。初期化の際に評価値の型を\"\n\"チェックするだけでなく、その後にどのような使われ方をしているかを見て推論しま\"\n\"す。以下がその例です。\"\n\n#: src/types/inference.md:10\nmsgid \"\"\n\"// Because of the annotation, the compiler knows that `elem` has type u8.\\n\"\nmsgstr \"\"\n\"// アノテーションのおかげで、コンパイラは`elem`がu8型であることがわかりま\"\n\"す。\\n\"\n\n#: src/types/inference.md:13\nmsgid \"// Create an empty vector (a growable array).\\n\"\nmsgstr \"// 空のベクタ（可変長の配列）を生成。\\n\"\n\n#: src/types/inference.md:15\nmsgid \"\"\n\"// At this point the compiler doesn't know the exact type of `vec`, it\\n\"\n\"    // just knows that it's a vector of something (`Vec<_>`).\\n\"\nmsgstr \"\"\n\"// この時点でコンパイラは`vec`の型を知りませんが、\\n\"\n\"    // 何らかの値のベクタ（`Vec<_>`）であるということだけは把握しています。\\n\"\n\n#: src/types/inference.md:18\nmsgid \"// Insert `elem` in the vector.\\n\"\nmsgstr \"// `elem`をベクタに挿入。\\n\"\n\n#: src/types/inference.md:20\nmsgid \"\"\n\"// Aha! Now the compiler knows that `vec` is a vector of `u8`s (`Vec<u8>`)\\n\"\n\"    // TODO ^ Try commenting out the `vec.push(elem)` line\\n\"\nmsgstr \"\"\n\"// よし！これでコンパイラは`vec`が`u8`のベクタ（`Vec<u8>`）\\n\"\n\"    // であることを把握しました。\\n\"\n\"    // TODO ^ 上の`vec.push(elem)`をコメントアウトしてみましょう。\\n\"\n\n#: src/types/inference.md:27\nmsgid \"\"\n\"No type annotation of variables was needed, the compiler is happy and so is \"\n\"the programmer!\"\nmsgstr \"\"\n\"このように、変数の型アノテーションは必要ありません。これでコンパイラもプログ\"\n\"ラマもハッピーですね！\"\n\n#: src/types/alias.md:3\nmsgid \"\"\n\"The `type` statement can be used to give a new name to an existing type. \"\n\"Types must have `UpperCamelCase` names, or the compiler will raise a \"\n\"warning. The exception to this rule are the primitive types: `usize`, `f32`, \"\n\"etc.\"\nmsgstr \"\"\n\"`type`文を使用することで既存の型に新しい名前を付けることができます。その場\"\n\"合、名前は`UpperCamelCase`でなくてはなりません。さもなくばコンパイラがエラー\"\n\"を出します。唯一の例外は`usize`や`f32`のような基本データ型です。\"\n\n#: src/types/alias.md:8\nmsgid \"// `NanoSecond`, `Inch`, and `U64` are new names for `u64`.\\n\"\nmsgstr \"// `NanoSecond` `Inch` `U64` を`u64`の別名として使用します。\\n\"\n\n#: src/types/alias.md:14\nmsgid \"// `NanoSecond` = `Inch` = `U64` = `u64`.\\n\"\nmsgstr \"// `NanoSecond` = `Inch` = `U64` = `u64`\\n\"\n\n#: src/types/alias.md:18\nmsgid \"\"\n\"// Note that type aliases *don't* provide any extra type safety, because\\n\"\n\"    // aliases are *not* new types\\n\"\nmsgstr \"\"\n\"// 型のエイリアスは、元の型をより型安全する **わけではない** ことに注意。\\n\"\n\"    // なぜならば、エイリアスは新たな型を定義している **わけではない** からで\"\n\"す。\\n\"\n\n#: src/types/alias.md:20\nmsgid \"\\\"{} nanoseconds + {} inches = {} unit?\\\"\"\nmsgstr \"\\\"{} nanoseconds + {} inches = {} unit?\\\"\"\n\n#: src/types/alias.md:27\nmsgid \"\"\n\"The main use of aliases is to reduce boilerplate; for example the `io::\"\n\"Result<T>` type is an alias for the `Result<T, io::Error>` type.\"\nmsgstr \"\"\n\"このようにエイリアスを付ける一番の理由はボイラープレートを減らすことです。例\"\n\"えば`io::Result<T>`型は`Result<T, io::Error>`の別名です。\"\n\n#: src/types/alias.md:32\nmsgid \"[Attributes](../attribute.md)\"\nmsgstr \"[アトリビュート](../attribute.md)\"\n\n#: src/conversion.md:3\nmsgid \"\"\n\"Primitive types can be converted to each other through [casting](types/cast.\"\n\"md).\"\nmsgstr \"基本データ型同士は[キャスト](types/cast.md)を用いて変換できます。\"\n\n#: src/conversion.md:5\nmsgid \"\"\n\"Rust addresses conversion between custom types (i.e., `struct` and `enum`) \"\n\"by the use of [traits](trait.md). The generic conversions will use the \"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`Into`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.Into.html) traits. However \"\n\"there are more specific ones for the more common cases, in particular when \"\n\"converting to and from `String`s.\"\nmsgstr \"\"\n\"Rustはカスタム型（例えば`struct`や`enum`）間の変換を[トレイト](trait.md)を用\"\n\"いて行います。ジェネリックな型変換には[`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html)および[`Into`](https://doc.rust-lang.org/std/convert/\"\n\"trait.Into.html)トレイトを使用します。しかし、よくあるケースにおいて、特に\"\n\"`String`との相互の型変換では、特殊なトレイトが使用されます。\"\n\n#: src/conversion/from_into.md:3\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) traits are \"\n\"inherently linked, and this is actually part of its implementation. If you \"\n\"are able to convert type A from type B, then it should be easy to believe \"\n\"that we should be able to convert type B to type A.\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html)トレイトと\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html)トレイトは本質\"\n\"的に結びついており、そのことが実際の実装に反映されています。もし型Aが型Bから\"\n\"の型変換をサポートしているのであれば、型Bは型Aへの型変換ができると思うのが自\"\n\"然です。\"\n\n#: src/conversion/from_into.md:7\nmsgid \"`From`\"\nmsgstr \"`From`\"\n\n#: src/conversion/from_into.md:9\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) trait \"\n\"allows for a type to define how to create itself from another type, hence \"\n\"providing a very simple mechanism for converting between several types. \"\n\"There are numerous implementations of this trait within the standard library \"\n\"for conversion of primitive and common types.\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html)トレイトは、あ\"\n\"る型に対し、別の型からその型を作る方法を定義できるようにするものです。そのた\"\n\"め、複数の型の間で型変換を行うための非常にシンプルな仕組みを提供しています。\"\n\"標準ライブラリでは、基本データ型やよく使われる型に対して、このトレイトが多数\"\n\"実装されています。\"\n\n#: src/conversion/from_into.md:14\nmsgid \"For example we can easily convert a `str` into a `String`\"\nmsgstr \"例えば、`str`から`String`への型変換は簡単です。\"\n\n#: src/conversion/from_into.md:21\nmsgid \"We can do similar for defining a conversion for our own type.\"\nmsgstr \"自作の型に対しても、型変換を定義すれば同じように行えます。\"\n\n#: src/conversion/from_into.md:39 src/conversion/from_into.md:68\n#: src/conversion/from_into.md:98\nmsgid \"\\\"My number is {:?}\\\"\"\nmsgstr \"\\\"My number is {:?}\\\"\"\n\n#: src/conversion/from_into.md:43\nmsgid \"`Into`\"\nmsgstr \"`Into`\"\n\n#: src/conversion/from_into.md:45\nmsgid \"\"\n\"The [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) trait is \"\n\"simply the reciprocal of the `From` trait. It defines how to convert a type \"\n\"into another type.\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html)トレイトは、単\"\n\"に`From`トレイトの逆の働きをし、ある型を他の型に変換する方法を定義します。\"\n\n#: src/conversion/from_into.md:48\nmsgid \"\"\n\"Calling `into()` typically requires us to specify the result type as the \"\n\"compiler is unable to determine this most of the time.\"\nmsgstr \"\"\n\"`into()` の呼び出し時にはほとんどの場合戻り値の型をコンパイラが決定できません。\"\n\"そのため戻り値の型は明示的に指定する必要があります。\"\n\n#: src/conversion/from_into.md:66\nmsgid \"// Try removing the type annotation\\n\"\nmsgstr \"// ここの型アノテーションを消してみましょう。\\n\"\n\n#: src/conversion/from_into.md:72\nmsgid \"`From` and `Into` are interchangable\"\nmsgstr \"`From`と`Into` は交換可能\"\n\n#: src/conversion/from_into.md:74\nmsgid \"\"\n\"`From` and `Into` are designed to be complementary. We do not need to \"\n\"provide an implementation for both traits. If you have implemented the \"\n\"`From` trait for your type, `Into` will call it when necessary. Note, \"\n\"however, that the converse is not true: implementing `Into` for your type \"\n\"will not automatically provide it with an implementation of `From`.\"\nmsgstr \"\"\n\"`From` と `Into` は相補的にデザインされているので両方のトレイトを実装する必要はありません。\"\n\"`From` トレイトを実装すれば、 `Into` は必要なときに呼ばれます。\"\n\"ただし、逆は真ではない点に注意してください。 `Into` が実装されていても、 `From` が自動的に提供されるわけではありません。\"\n\n#: src/conversion/from_into.md:86\nmsgid \"// Define `From`\\n\"\nmsgstr \"// Define `From`\\n\"\n\n#: src/conversion/from_into.md:96\nmsgid \"// use `Into`\\n\"\nmsgstr \"// use `Into`\\n\"\n\n#: src/conversion/try_from_try_into.md:3\nmsgid \"\"\n\"Similar to [`From` and `Into`](from_into.html), [`TryFrom`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryFrom.html) and [`TryInto`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryInto.html) are generic traits for converting \"\n\"between types. Unlike `From`/`Into`, the `TryFrom`/`TryInto` traits are used \"\n\"for fallible conversions, and as such, return [`Result`](https://doc.rust-\"\n\"lang.org/std/result/enum.Result.html)s.\"\nmsgstr \"\"\n\"[`From`と`Into`](from_into.html)と同様に、[`TryFrom`](https://doc.rust-lang.\"\n\"org/std/convert/trait.TryFrom.html)と[`TryInto`](https://doc.rust-lang.org/\"\n\"std/convert/trait.TryInto.html)も型変換を行うジェネリックなトレイトです。\"\n\"`From`/`Into`と異なり、`TryFrom`/`TryInto`トレイトは失敗する可能性のある型変\"\n\"換に用いられるので、[`Result`](https://doc.rust-lang.org/std/result/enum.\"\n\"Result.html)を返します。\"\n\n#: src/conversion/try_from_try_into.md:33\nmsgid \"// TryFrom\\n\"\nmsgstr \"// TryFrom\\n\"\n\n#: src/conversion/try_from_try_into.md:38\nmsgid \"// TryInto\\n\"\nmsgstr \"// TryInto\\n\"\n\n#: src/conversion/string.md:1\nmsgid \"To and from Strings\"\nmsgstr \"Stringとの型変換\"\n\n#: src/conversion/string.md:3\nmsgid \"Converting to String\"\nmsgstr \"Stringへの型変換\"\n\n#: src/conversion/string.md:5\nmsgid \"\"\n\"To convert any type to a `String` is as simple as implementing the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"for the type. Rather than doing so directly, you should implement the [`fmt::\"\n\"Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html) trait which \"\n\"automagically provides [`ToString`](https://doc.rust-lang.org/std/string/\"\n\"trait.ToString.html) and also allows printing the type as discussed in the \"\n\"section on [`print!`](../hello/print.md).\"\nmsgstr \"\"\n\"任意の型を`String`に変換するのは簡単で、その型に[`ToString`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html)トレイトを実装するだけです。これ\"\n\"を直接実装するよりも、[`fmt::Display`](https://doc.rust-lang.org/std/fmt/\"\n\"trait.Display.html)トレイトを実装するのがよいでしょう。そうすることで自動的に\"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html)が提供\"\n\"されるだけでなく、[`print!`](../hello/print.md)の章で説明したように、その型を\"\n\"表示できるようにもなります。\"\n\n#: src/conversion/string.md:19\nmsgid \"\\\"Circle of radius {}\\\"\"\nmsgstr \"\\\"Circle of radius {}\\\"\"\n\n#: src/conversion/string.md:29\nmsgid \"Parsing a String\"\nmsgstr \"Stringの解析\"\n\n#: src/conversion/string.md:31\nmsgid \"\"\n\"It's useful to convert strings into many types, but one of the more common \"\n\"string operations is to convert them from string to number. The idiomatic \"\n\"approach to this is to use the [`parse`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) function and either to arrange for type \"\n\"inference or to specify the type to parse using the 'turbofish' syntax. Both \"\n\"alternatives are shown in the following example.\"\nmsgstr \"\"\n\"文字列からの型変換において、数値への型変換はよく行われるものの一つです。これ\"\n\"を行うイディオムは[`parse`](https://doc.rust-lang.org/std/primitive.str.\"\n\"html#method.parse)関数を使用することですが、このときに型を推論できるようにす\"\n\"るか、もしくはターボフィッシュ構文（`::<>`）を使用して型を指定するかのいずれ\"\n\"かを行います。以下の例では、どちらの方法も紹介しています。\"\n\n#: src/conversion/string.md:37\nmsgid \"\"\n\"This will convert the string into the type specified as long as the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait is \"\n\"implemented for that type. This is implemented for numerous types within the \"\n\"standard library. To obtain this functionality on a user defined type simply \"\n\"implement the [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.\"\n\"html) trait for that type.\"\nmsgstr \"\"\n\"`parse`関数は、指定された型に[`FromStr`](https://doc.rust-lang.org/std/str/\"\n\"trait.FromStr.html)トレイトが実装されていれば、文字列をその型に変換します。こ\"\n\"のトレイトは標準ライブラリの多くの型に対して実装されています。ユーザー定義の\"\n\"型でこの機能を利用するには、その型に対して[`FromStr`](https://doc.rust-lang.\"\n\"org/std/str/trait.FromStr.html)トレイトを実装するだけです。\"\n\n#: src/conversion/string.md:44 src/std_misc/process/wait.md:10\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/conversion/string.md:45 src/error/result.md:33 src/error/result.md:68\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:75\n#: src/error/result/result_alias.md:36 src/error/result/early_returns.md:36\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:67\nmsgid \"\\\"10\\\"\"\nmsgstr \"\\\"10\\\"\"\n\n#: src/conversion/string.md:48\nmsgid \"\\\"Sum: {:?}\\\"\"\nmsgstr \"\\\"Sum: {:?}\\\"\"\n\n#: src/expression.md:3\nmsgid \"A Rust program is (mostly) made up of a series of statements:\"\nmsgstr \"Rustのプログラムは（ほとんどの場合）文の連続でできています\"\n\n#: src/expression.md:7\nmsgid \"\"\n\"// statement\\n\"\n\"    // statement\\n\"\n\"    // statement\\n\"\nmsgstr \"\"\n\"// statement\\n\"\n\"    // statement\\n\"\n\"    // statement\\n\"\n\n#: src/expression.md:13\nmsgid \"\"\n\"There are a few kinds of statements in Rust. The most common two are \"\n\"declaring a variable binding, and using a `;` with an expression:\"\nmsgstr \"\"\n\"文にはいくつかの種類があります。最も一般的なのは変数の束縛と`;`付きの式です。\"\n\n#: src/expression.md:18\nmsgid \"// variable binding\\n\"\nmsgstr \"// 変数束縛\\n\"\n\n#: src/expression.md:21\nmsgid \"// expression;\\n\"\nmsgstr \"// 式;\\n\"\n\n#: src/expression.md:28\nmsgid \"\"\n\"Blocks are expressions too, so they can be used as values in assignments. \"\n\"The last expression in the block will be assigned to the place expression \"\n\"such as a local variable. However, if the last expression of the block ends \"\n\"with a semicolon, the return value will be `()`.\"\nmsgstr \"\"\n\"コードブロックも式の一種です。よってブロックを丸ごと値として扱うことができま\"\n\"す。その場合ブロック内の最後の式が場所を表す式（例えばローカル変数）に代入さ\"\n\"れます。ただし、ブロック内の最後の式が`;`で終わる場合は返り値は`()`になりま\"\n\"す。\"\n\n#: src/expression.md:41\nmsgid \"// This expression will be assigned to `y`\\n\"\nmsgstr \"// この式は`y`に代入されます。\\n\"\n\n#: src/expression.md:46\nmsgid \"\"\n\"// The semicolon suppresses this expression and `()` is assigned to `z`\\n\"\nmsgstr \"// セミコロンがあるので`z`には`()`が入ります。\\n\"\n\n#: src/expression.md:50\nmsgid \"\\\"x is {:?}\\\"\"\nmsgstr \"\\\"x is {:?}\\\"\"\n\n#: src/expression.md:51\nmsgid \"\\\"y is {:?}\\\"\"\nmsgstr \"\\\"y is {:?}\\\"\"\n\n#: src/expression.md:52\nmsgid \"\\\"z is {:?}\\\"\"\nmsgstr \"\\\"z is {:?}\\\"\"\n\n#: src/flow_control.md:3\nmsgid \"\"\n\"An integral part of any programming language are ways to modify control \"\n\"flow: `if`/`else`, `for`, and others. Let's talk about them in Rust.\"\nmsgstr \"\"\n\"処理の流れをコントロールすることはあらゆるプログラミング言語において重要な要\"\n\"素です。`if`/`else`、`for`等です。Rustの文法を見ていきましょう。\"\n\n#: src/flow_control/if_else.md:3\nmsgid \"\"\n\"Branching with `if`\\\\-`else` is similar to other languages. Unlike many of \"\n\"them, the boolean condition doesn't need to be surrounded by parentheses, \"\n\"and each condition is followed by a block. `if`\\\\-`else` conditionals are \"\n\"expressions, and, all branches must return the same type.\"\nmsgstr \"\"\n\"`if`\\\\-`else`を用いた条件分岐は他の言語に似ています。多くの言語では条件式の中\"\n\"を括弧でくくる必要がありますが、Rustではその必要はありません。条件式の直後に\"\n\"はブロックが続きます。`if`\\\\-`else`は式の一種で、いずれの分岐先でも返り値の型\"\n\"は同一でなくてはなりません。\"\n\n#: src/flow_control/if_else.md:13\nmsgid \"\\\"{} is negative\\\"\"\nmsgstr \"\\\"{} is negative\\\"\"\n\n#: src/flow_control/if_else.md:15\nmsgid \"\\\"{} is positive\\\"\"\nmsgstr \"\\\"{} is positive\\\"\"\n\n#: src/flow_control/if_else.md:17\nmsgid \"\\\"{} is zero\\\"\"\nmsgstr \"\\\"{} is zero\\\"\"\n\n#: src/flow_control/if_else.md:22\nmsgid \"\\\", and is a small number, increase ten-fold\\\"\"\nmsgstr \"\\\", and is a small number, increase ten-fold\\\"\"\n\n#: src/flow_control/if_else.md:24\nmsgid \"// This expression returns an `i32`.\\n\"\nmsgstr \"// この式は`i32`を返します。\\n\"\n\n#: src/flow_control/if_else.md:27\nmsgid \"\\\", and is a big number, halve the number\\\"\"\nmsgstr \"\\\", and is a big number, halve the number\\\"\"\n\n#: src/flow_control/if_else.md:29\nmsgid \"// This expression must return an `i32` as well.\\n\"\nmsgstr \"// ここでも返り値の型は`i32`でなくてはなりません。\\n\"\n\n#: src/flow_control/if_else.md:31\nmsgid \"// TODO ^ Try suppressing this expression with a semicolon.\\n\"\nmsgstr \"// TODO ^ セミコロン`;`をつけて返り値を返さないようにしてみましょう\\n\"\n\n#: src/flow_control/if_else.md:33\nmsgid \"\"\n\"//   ^ Don't forget to put a semicolon here! All `let` bindings need it.\\n\"\nmsgstr \"\"\n\"//   ^ ここにセミコロンを付けるのを忘れないように！\\n\"\n\"    //   `let`による変数束縛の際には必ず必要です。\\n\"\n\n#: src/flow_control/if_else.md:35 src/flow_control/match.md:35\nmsgid \"\\\"{} -> {}\\\"\"\nmsgstr \"\\\"{} -> {}\\\"\"\n\n#: src/flow_control/loop.md:3\nmsgid \"Rust provides a `loop` keyword to indicate an infinite loop.\"\nmsgstr \"\"\n\"Rustには`loop`というキーワードが存在します。これは無限ループを作成するのに使\"\n\"用します。\"\n\n#: src/flow_control/loop.md:5\nmsgid \"\"\n\"The `break` statement can be used to exit a loop at anytime, whereas the \"\n\"`continue` statement can be used to skip the rest of the iteration and start \"\n\"a new one.\"\nmsgstr \"\"\n\"ループから抜けだす時は`break`、即座に次のループに移るときは`continue`が使用で\"\n\"きます。\"\n\n#: src/flow_control/loop.md:13\nmsgid \"\\\"Let's count until infinity!\\\"\"\nmsgstr \"\\\"Let's count until infinity!\\\"\"\n\n#: src/flow_control/loop.md:15\nmsgid \"// Infinite loop\\n\"\nmsgstr \"// 無限ループ\\n\"\n\n#: src/flow_control/loop.md:20\nmsgid \"\\\"three\\\"\"\nmsgstr \"\\\"three\\\"\"\n\n#: src/flow_control/loop.md:22\nmsgid \"// Skip the rest of this iteration\\n\"\nmsgstr \"// 残りの処理をスキップ。\\n\"\n\n#: src/flow_control/loop.md:29\nmsgid \"\\\"OK, that's enough\\\"\"\nmsgstr \"\\\"OK, that's enough\\\"\"\n\n#: src/flow_control/loop.md:31\nmsgid \"// Exit this loop\\n\"\nmsgstr \"// ループを抜ける。\\n\"\n\n#: src/flow_control/loop/nested.md:3\nmsgid \"\"\n\"It's possible to `break` or `continue` outer loops when dealing with nested \"\n\"loops. In these cases, the loops must be annotated with some `'label`, and \"\n\"the label must be passed to the `break`/`continue` statement.\"\nmsgstr \"\"\n\"ネストしたループを回している時に外側のループを`break`または`continue`したい場\"\n\"合があります。こういった場合には`'label`を用いてループにラベルを貼り、\"\n\"`break`/`continue`にそのラベルを渡します。\"\n\n#: src/flow_control/loop/nested.md:12\nmsgid \"\\\"Entered the outer loop\\\"\"\nmsgstr \"\\\"Entered the outer loop\\\"\"\n\n#: src/flow_control/loop/nested.md:15\nmsgid \"\\\"Entered the inner loop\\\"\"\nmsgstr \"\\\"Entered the inner loop\\\"\"\n\n#: src/flow_control/loop/nested.md:17\nmsgid \"\"\n\"// This would break only the inner loop\\n\"\n\"            //break;\\n\"\nmsgstr \"\"\n\"// これは内側のループのみを中断します。\\n\"\n\"            //break;\\n\"\n\n#: src/flow_control/loop/nested.md:20\nmsgid \"// This breaks the outer loop\\n\"\nmsgstr \"// こちらは外側を中断します。\\n\"\n\n#: src/flow_control/loop/nested.md:24\nmsgid \"\\\"This point will never be reached\\\"\"\nmsgstr \"\\\"This point will never be reached\\\"\"\n\n#: src/flow_control/loop/nested.md:27\nmsgid \"\\\"Exited the outer loop\\\"\"\nmsgstr \"\\\"Exited the outer loop\\\"\"\n\n#: src/flow_control/loop/return.md:3\nmsgid \"\"\n\"One of the uses of a `loop` is to retry an operation until it succeeds. If \"\n\"the operation returns a value though, you might need to pass it to the rest \"\n\"of the code: put it after the `break`, and it will be returned by the `loop` \"\n\"expression.\"\nmsgstr \"\"\n\"`loop`の用途のひとつに「成功するまである処理を再試行する」ことがあります。も\"\n\"しその処理が値を返すならば、それをコードの他の部分に渡す必要があるでしょう。\"\n\"`break`の後に値を置くと、それが`loop`式の値として返されます。\"\n\n#: src/flow_control/while.md:3\nmsgid \"\"\n\"The `while` keyword can be used to run a loop while a condition is true.\"\nmsgstr \"\"\n\"`while`キーワードは条件が真である限り実行され続けるループのために使用します。\"\n\n#: src/flow_control/while.md:5\nmsgid \"\"\n\"Let's write the infamous [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) \"\n\"using a `while` loop.\"\nmsgstr \"\"\n\"悪名高い[FizzBuzz問題](https://en.wikipedia.org/wiki/Fizz_buzz)を`while`を用\"\n\"いて解いてみましょう。\"\n\n#: src/flow_control/while.md:9\nmsgid \"// A counter variable\\n\"\nmsgstr \"// カウンタとなる変数\\n\"\n\n#: src/flow_control/while.md:12\nmsgid \"// Loop while `n` is less than 101\\n\"\nmsgstr \"// `n`が101より小さい場合のループ\\n\"\n\n#: src/flow_control/while.md:15 src/flow_control/for.md:17\n#: src/flow_control/for.md:37 src/fn.md:34\nmsgid \"\\\"fizzbuzz\\\"\"\nmsgstr \"\\\"fizzbuzz\\\"\"\n\n#: src/flow_control/while.md:17 src/flow_control/for.md:19\n#: src/flow_control/for.md:39 src/fn.md:36\nmsgid \"\\\"fizz\\\"\"\nmsgstr \"\\\"fizz\\\"\"\n\n#: src/flow_control/while.md:19 src/flow_control/for.md:21\n#: src/flow_control/for.md:41 src/fn.md:38\nmsgid \"\\\"buzz\\\"\"\nmsgstr \"\\\"buzz\\\"\"\n\n#: src/flow_control/while.md:24\nmsgid \"// Increment counter\\n\"\nmsgstr \"// カウンタに1を追加。\\n\"\n\n#: src/flow_control/for.md:1\nmsgid \"for loops\"\nmsgstr \"forループ\"\n\n#: src/flow_control/for.md:5\nmsgid \"\"\n\"The `for in` construct can be used to iterate through an `Iterator`. One of \"\n\"the easiest ways to create an iterator is to use the range notation `a..b`. \"\n\"This yields values from `a` (inclusive) to `b` (exclusive) in steps of one.\"\nmsgstr \"\"\n\"`for in`構文を用いることで、イテレータのそれぞれの要素に対して処理をすること\"\n\"が可能です。イテレータを作る最も単純な方法は`a..b`のような範囲記法です。これ\"\n\"は「`a`」から「`b`のひとつ前」までの要素を順に生成します。\"\n\n#: src/flow_control/for.md:10\nmsgid \"Let's write FizzBuzz using `for` instead of `while`.\"\nmsgstr \"では`while`の代わりに`for`を用いてFizzBuzzを書いてみましょう。\"\n\n#: src/flow_control/for.md:14 src/flow_control/for.md:34\nmsgid \"// `n` will take the values: 1, 2, ..., 100 in each iteration\\n\"\nmsgstr \"// `n`は1, 2, ...., 100のそれぞれの値を取ります。\\n\"\n\n#: src/flow_control/for.md:29\nmsgid \"\"\n\"Alternatively, `a..=b` can be used for a range that is inclusive on both \"\n\"ends. The above can be written as:\"\nmsgstr \"\"\n\"上記の代わりに`a..=b`を用いると、両端の値を含む範囲を指定できます。上記の例は\"\n\"次のように書けます。\"\n\n#: src/flow_control/for.md:49\nmsgid \"for and iterators\"\nmsgstr \"forとイテレータ\"\n\n#: src/flow_control/for.md:51\nmsgid \"\"\n\"The `for in` construct is able to interact with an `Iterator` in several \"\n\"ways. As discussed in the section on the [Iterator](../trait/iter.md) trait, \"\n\"by default the `for` loop will apply the `into_iter` function to the \"\n\"collection. However, this is not the only means of converting collections \"\n\"into iterators.\"\nmsgstr \"\"\n\"`for in`構文はイテレータとさまざまな方法でやり取りできます。[Iterator](../\"\n\"trait/iter.md)トレイトの章で説明したように、デフォルトでは`for`ループにおいて\"\n\"`into_iter`関数がコレクションに対して適用されます。しかし、コレクションをイテ\"\n\"レータに変換する方法はこれだけではありません。\"\n\n#: src/flow_control/for.md:56\nmsgid \"\"\n\"`into_iter`, `iter` and `iter_mut` all handle the conversion of a collection \"\n\"into an iterator in different ways, by providing different views on the data \"\n\"within.\"\nmsgstr \"\"\n\"`into_iter`、`iter`、`iter_mut`はいずれもコレクションのイテレータへの変換を行\"\n\"いますが、データの「見せ方」の違いにより、そのやり方はそれぞれ異なります。\"\n\n#: src/flow_control/for.md:60\nmsgid \"\"\n\"`iter` - This borrows each element of the collection through each iteration. \"\n\"Thus leaving the collection untouched and available for reuse after the loop.\"\nmsgstr \"\"\n\"`iter` - この関数は、各周回においてコレクションの要素を借用します。よってコレ\"\n\"クションには手を加えないので、ループの実行後もコレクションを再利用できます。\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Frank\\\"\"\nmsgstr \"\\\"Frank\\\"\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:69\n#: src/flow_control/for.md:85 src/flow_control/for.md:89\n#: src/flow_control/for.md:104 src/flow_control/for.md:108\nmsgid \"\\\"Ferris\\\"\"\nmsgstr \"\\\"Ferris\\\"\"\n\n#: src/flow_control/for.md:69 src/flow_control/for.md:89\n#: src/flow_control/for.md:108\nmsgid \"\\\"There is a rustacean among us!\\\"\"\nmsgstr \"\\\"There is a rustacean among us!\\\"\"\n\n#: src/flow_control/for.md:70\nmsgid \"// TODO ^ Try deleting the & and matching just \\\"Ferris\\\"\\n\"\nmsgstr \"\"\n\n#: src/flow_control/for.md:71 src/flow_control/for.md:90\nmsgid \"\\\"Hello {}\\\"\"\nmsgstr \"\\\"Hello {}\\\"\"\n\n#: src/flow_control/for.md:75 src/flow_control/for.md:94\n#: src/flow_control/for.md:113\nmsgid \"\\\"names: {:?}\\\"\"\nmsgstr \"\\\"names: {:?}\\\"\"\n\n#: src/flow_control/for.md:79\nmsgid \"\"\n\"`into_iter` - This consumes the collection so that on each iteration the \"\n\"exact data is provided. Once the collection has been consumed it is no \"\n\"longer available for reuse as it has been 'moved' within the loop.\"\nmsgstr \"\"\n\"`into_iter` - この関数はコレクションからデータを取り出すので、各周回において\"\n\"要素のデータそのものが提供されます。データを取り出してしまうと、データはルー\"\n\"プ内に「移動」してしまうので、ループ実行後にコレクションを再利用することはで\"\n\"きません。\"\n\n#: src/flow_control/for.md:99\nmsgid \"\"\n\"`iter_mut` - This mutably borrows each element of the collection, allowing \"\n\"for the collection to be modified in place.\"\nmsgstr \"\"\n\"`iter_mut` - この関数はコレクションの各要素をミュータブル（変更可能）で借用す\"\n\"るので、コレクションの要素をその場で変更できます。\"\n\n#: src/flow_control/for.md:109\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Hello\\\"\"\n\n#: src/flow_control/for.md:117\nmsgid \"\"\n\"In the above snippets note the type of `match` branch, that is the key \"\n\"difference in the types of iteration. The difference in type then of course \"\n\"implies differing actions that are able to be performed.\"\nmsgstr \"\"\n\"上記に示した3つのコードにおいて、`match`の選択肢の型の違いに注意してくださ\"\n\"い。ここがそれぞれの方法の違いを生む鍵になっています。型が異なれば、当然なが\"\n\"らそれに対して行える処理も変わります。\"\n\n#: src/flow_control/for.md:123\nmsgid \"[Iterator](../trait/iter.md)\"\nmsgstr \"[イテレータ](../trait/iter.md)\"\n\n#: src/flow_control/match.md:3\nmsgid \"\"\n\"Rust provides pattern matching via the `match` keyword, which can be used \"\n\"like a C `switch`. The first matching arm is evaluated and all possible \"\n\"values must be covered.\"\nmsgstr \"\"\n\"Rustは`match`を用いて、C言語における`switch`のようなパターンマッチングを行う\"\n\"ことができます。マッチする最初のアームが評価され、取りうるすべての値はカバー\"\n\"されていなければなりません。\"\n\n#: src/flow_control/match.md:10\nmsgid \"// TODO ^ Try different values for `number`\\n\"\nmsgstr \"// TODO ^ `number` の値を変えて試してみましょう。\\n\"\n\n#: src/flow_control/match.md:12\nmsgid \"\\\"Tell me about {}\\\"\"\nmsgstr \"\\\"Tell me about {}\\\"\"\n\n#: src/flow_control/match.md:14\nmsgid \"// Match a single value\\n\"\nmsgstr \"// 単一の値とのマッチをチェック。\\n\"\n\n#: src/flow_control/match.md:15\nmsgid \"\\\"One!\\\"\"\nmsgstr \"\\\"One!\\\"\"\n\n#: src/flow_control/match.md:16\nmsgid \"// Match several values\\n\"\nmsgstr \"// いくつかの値とのマッチをチェック。\\n\"\n\n#: src/flow_control/match.md:17\nmsgid \"\\\"This is a prime\\\"\"\nmsgstr \"\\\"This is a prime\\\"\"\n\n#: src/flow_control/match.md:18\nmsgid \"\"\n\"// TODO ^ Try adding 13 to the list of prime values\\n\"\n\"        // Match an inclusive range\\n\"\nmsgstr \"\"\n\"// TODO ^ 素数のリストに13を加えてみましょう。\\n\"\n\"        // 特定の範囲の値とのマッチをチェック。\\n\"\n\n#: src/flow_control/match.md:20\nmsgid \"\\\"A teen\\\"\"\nmsgstr \"\\\"A teen\\\"\"\n\n#: src/flow_control/match.md:21\nmsgid \"// Handle the rest of cases\\n\"\nmsgstr \"// その他の場合の処理\\n\"\n\n#: src/flow_control/match.md:22\nmsgid \"\\\"Ain't special\\\"\"\nmsgstr \"\\\"Ain't special\\\"\"\n\n#: src/flow_control/match.md:23\nmsgid \"// TODO ^ Try commenting out this catch-all arm\\n\"\nmsgstr \"\"\n\"// TODO ^ この全てをキャッチするアームをコメントアウトしてみましょう。\\n\"\n\n#: src/flow_control/match.md:27\nmsgid \"// Match is an expression too\\n\"\nmsgstr \"// マッチは式でもあります。\\n\"\n\n#: src/flow_control/match.md:29\nmsgid \"// The arms of a match must cover all the possible values\\n\"\nmsgstr \"// マッチは全ての可能な値をカバーしなくてはなりません。\\n\"\n\n#: src/flow_control/match.md:32\nmsgid \"// TODO ^ Try commenting out one of these arms\\n\"\nmsgstr \"// TODO ^ 試しに片方をコメントアウトしてみましょう。\\n\"\n\n#: src/flow_control/match/destructuring.md:3\nmsgid \"A `match` block can destructure items in a variety of ways.\"\nmsgstr \"`match`は値をさまざまなやり方でデストラクトすることができます。\"\n\n#: src/flow_control/match/destructuring.md:5\nmsgid \"[Destructuring Tuples](destructuring/destructure_tuple.md)\"\nmsgstr \"[タプルのデストラクト](destructuring/destructure_tuple.md)\"\n\n#: src/flow_control/match/destructuring.md:6\nmsgid \"[Destructuring Arrays and Slices](destructuring/destructure_slice.md)\"\nmsgstr \"[配列とスライスのデストラクト](destructuring/destructure_slice.md)\"\n\n#: src/flow_control/match/destructuring.md:7\nmsgid \"[Destructuring Enums](destructuring/destructure_enum.md)\"\nmsgstr \"[列挙型のデストラクト](destructuring/destructure_enum.md)\"\n\n#: src/flow_control/match/destructuring.md:8\nmsgid \"[Destructuring Pointers](destructuring/destructure_pointers.md)\"\nmsgstr \"[ポインタのデストラクト](destructuring/destructure_pointers.md)\"\n\n#: src/flow_control/match/destructuring.md:9\nmsgid \"[Destructuring Structures](destructuring/destructure_structures.md)\"\nmsgstr \"[構造体のデストラクト](destructuring/destructure_structures.md)\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:3\nmsgid \"Tuples can be destructured in a `match` as follows:\"\nmsgstr \"以下のように、タプルは`match`を用いてデストラクトすることができます。\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:8\nmsgid \"// TODO ^ Try different values for `triple`\\n\"\nmsgstr \"// TODO ^ `triple`に別の値を入れてみましょう。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:10\nmsgid \"\\\"Tell me about {:?}\\\"\"\nmsgstr \"\\\"Tell me about {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:11\nmsgid \"// Match can be used to destructure a tuple\\n\"\nmsgstr \"// `match`を用いてタプルをデストラクトしてみましょう。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:13\nmsgid \"// Destructure the second and third elements\\n\"\nmsgstr \"// 2つ目と3つ目の要素をデストラクト。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:14\nmsgid \"\\\"First is `0`, `y` is {:?}, and `z` is {:?}\\\"\"\nmsgstr \"\\\"First is `0`, `y` is {:?}, and `z` is {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:15\nmsgid \"\\\"First is `1` and the rest doesn't matter\\\"\"\nmsgstr \"\\\"First is `1` and the rest doesn't matter\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:16\nmsgid \"\\\"last is `2` and the rest doesn't matter\\\"\"\nmsgstr \"\\\"last is `2` and the rest doesn't matter\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:17\nmsgid \"\\\"First is `3`, last is `4`, and the rest doesn't matter\\\"\"\nmsgstr \"\\\"First is `3`, last is `4`, and the rest doesn't matter\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:18\nmsgid \"// `..` can be used to ignore the rest of the tuple\\n\"\nmsgstr \"// `..`を使うと、タプルの残りの部分を無視できます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:19\nmsgid \"\\\"It doesn't matter what they are\\\"\"\nmsgstr \"\\\"It doesn't matter what they are\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:20\nmsgid \"// `_` means don't bind the value to a variable\\n\"\nmsgstr \"// ここでは`_`は、値を変数に束縛しないことを意味します。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:27\nmsgid \"[Tuples](../../../primitives/tuples.md)\"\nmsgstr \"[タプル](../../../primitives/tuples.md)\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:3\nmsgid \"Like tuples, arrays and slices can be destructured this way:\"\nmsgstr \"タプル同様、配列とスライスも以下のようにデストラクトできます。\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:7\nmsgid \"// Try changing the values in the array, or make it a slice!\\n\"\nmsgstr \"\"\n\"// 配列中の値を変更してみましょう。または、スライスにしてみましょう。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:11\nmsgid \"\"\n\"// Binds the second and the third elements to the respective variables\\n\"\nmsgstr \"// 2番目と3番目の要素を変数に束縛します。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:13\nmsgid \"\\\"array[0] = 0, array[1] = {}, array[2] = {}\\\"\"\nmsgstr \"\\\"array[0] = 0, array[1] = {}, array[2] = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:15\nmsgid \"// Single values can be ignored with _\\n\"\nmsgstr \"// _で値を無視できます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:17\nmsgid \"\\\"array[0] = 1, array[2] = {} and array[1] was ignored\\\"\"\nmsgstr \"\\\"array[0] = 1, array[2] = {} and array[1] was ignored\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:21\nmsgid \"// You can also bind some and ignore the rest\\n\"\nmsgstr \"// いくつかの値を束縛して残りを無視できます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:23\nmsgid \"\\\"array[0] = -1, array[1] = {} and all the other ones were ignored\\\"\"\nmsgstr \"\\\"array[0] = -1, array[1] = {} and all the other ones were ignored\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:26\nmsgid \"\"\n\"// The code below would not compile\\n\"\n\"        // [-1, second] => ...\\n\"\nmsgstr \"\"\n\"// 以下のコードはコンパイルできません。\\n\"\n\"        // [-1, second] => ...\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:29\nmsgid \"\"\n\"// Or store them in another array/slice (the type depends on\\n\"\n\"        // that of the value that is being matched against)\\n\"\nmsgstr \"\"\n\"// 別の配列やスライスに値を持たせることもできます。\\n\"\n\"        // (配列かスライスかは、マッチする値の型により異なります)\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:32\nmsgid \"\\\"array[0] = 3, array[1] = {} and the other elements were {:?}\\\"\"\nmsgstr \"\\\"array[0] = 3, array[1] = {} and the other elements were {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:36\nmsgid \"\"\n\"// Combining these patterns, we can, for example, bind the first and\\n\"\n\"        // last values, and store the rest of them in a single array\\n\"\nmsgstr \"\"\n\"// 例えば、これらのパターンを組み合わせて、\\n\"\n\"        // 最初と最後の値を束縛し、残りの値を配列に持たせることもできます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:39\nmsgid \"\\\"array[0] = {}, middle = {:?}, array[2] = {}\\\"\"\nmsgstr \"\\\"array[0] = {}, middle = {:?}, array[2] = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:48\nmsgid \"\"\n\"[Arrays and Slices](../../../primitives/array.md) and [Binding](../binding.\"\n\"md) for `@` sigil\"\nmsgstr \"\"\n\"[配列とスライス](../../../primitives/array.md), @マークについては[束縛](../\"\n\"binding.md)\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:3\nmsgid \"An `enum` is destructured similarly:\"\nmsgstr \"列挙型も似たやり方でデストラクトすることができます。\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:6\nmsgid \"\"\n\"// `allow` required to silence warnings because only\\n\"\n\"// one variant is used.\\n\"\nmsgstr \"\"\n\"// `allow`は値を一つだけ使用したことによる警告を抑えるために存在します。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:10\nmsgid \"// These 3 are specified solely by their name.\\n\"\nmsgstr \"// これら3つの値は名前のみで扱うことができます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:14\nmsgid \"// These likewise tie `u32` tuples to different names: color models.\\n\"\nmsgstr \"\"\n\"// 以下の値は名前と`u32`のタプルをペアにしています。\\n\"\n\"    // カラーモデルと呼ばれます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:24\nmsgid \"// TODO ^ Try different variants for `color`\\n\"\nmsgstr \"// TODO ^ `color`に別の値を入れてみましょう。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:26\nmsgid \"\\\"What color is it?\\\"\"\nmsgstr \"\\\"What color is it?\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:27\nmsgid \"// An `enum` can be destructured using a `match`.\\n\"\nmsgstr \"// `enum`は`match`を利用してデストラクトすることができます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:29\nmsgid \"\\\"The color is Red!\\\"\"\nmsgstr \"\\\"The color is Red!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:30\nmsgid \"\\\"The color is Blue!\\\"\"\nmsgstr \"\\\"The color is Blue!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:31\nmsgid \"\\\"The color is Green!\\\"\"\nmsgstr \"\\\"The color is Green!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:33\nmsgid \"\\\"Red: {}, green: {}, and blue: {}!\\\"\"\nmsgstr \"\\\"Red: {}, green: {}, and blue: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:35\nmsgid \"\\\"Hue: {}, saturation: {}, value: {}!\\\"\"\nmsgstr \"\\\"Hue: {}, saturation: {}, value: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:37\nmsgid \"\\\"Hue: {}, saturation: {}, lightness: {}!\\\"\"\nmsgstr \"\\\"Hue: {}, saturation: {}, lightness: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:39\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}!\\\"\"\nmsgstr \"\\\"Cyan: {}, magenta: {}, yellow: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:41\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}, key (black): {}!\\\"\"\nmsgstr \"\\\"Cyan: {}, magenta: {}, yellow: {}, key (black): {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:43\nmsgid \"// Don't need another arm because all variants have been examined\\n\"\nmsgstr \"// 全ての値を列挙したのでその他の場合の処理は必要ありません。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:50\nmsgid \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md), [color models](https://en.\"\n\"wikipedia.org/wiki/Color_model) and [`enum`](../../../custom_types/enum.md)\"\nmsgstr \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md), [カラーモデル](https://en.\"\n\"wikipedia.org/wiki/Color_model), [列挙型](../../../custom_types/enum.md)\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:3\nmsgid \"\"\n\"For pointers, a distinction needs to be made between destructuring and \"\n\"dereferencing as they are different concepts which are used differently from \"\n\"languages like C/C++.\"\nmsgstr \"\"\n\"Rustのポインタは、C/C++のポインタとは異なる概念なので、デストラクトとデリファ\"\n\"レンスを同じようなやり方で扱うことはできません。\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:7\nmsgid \"Dereferencing uses `*`\"\nmsgstr \"デリファレンスには`*`を用います。\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:8\nmsgid \"Destructuring uses `&`, `ref`, and `ref mut`\"\nmsgstr \"デストラクトには`&`, `ref`, `ref mut`を用います。\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:12\nmsgid \"\"\n\"// Assign a reference of type `i32`. The `&` signifies there\\n\"\n\"    // is a reference being assigned.\\n\"\nmsgstr \"\"\n\"// `i32`型への参照を代入します。\\n\"\n\"    // `&`によって参照であることを明示しています。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:17\nmsgid \"\"\n\"// If `reference` is pattern matched against `&val`, it results\\n\"\n\"        // in a comparison like:\\n\"\n\"        // `&i32`\\n\"\n\"        // `&val`\\n\"\n\"        // ^ We see that if the matching `&`s are dropped, then the `i32`\\n\"\n\"        // should be assigned to `val`.\\n\"\nmsgstr \"\"\n\"// 上で定義した`reference`という変数が`&val`とのパターンマッチ\\n\"\n\"        // に用いられた場合、以下の2つの値が比較されていることになります。\\n\"\n\"        // `&i32`\\n\"\n\"        // `&val`\\n\"\n\"        // ^ よって`&`を落とせば、`i32`が`val`に代入されることがわかりま\"\n\"す。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:23\nmsgid \"\\\"Got a value via destructuring: {:?}\\\"\"\nmsgstr \"\\\"Got a value via destructuring: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:26\nmsgid \"// To avoid the `&`, you dereference before matching.\\n\"\nmsgstr \"// `&`を使用したくない場合は、マッチングの前にデリファレンスします。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:28\nmsgid \"\\\"Got a value via dereferencing: {:?}\\\"\"\nmsgstr \"\\\"Got a value via dereferencing: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:31\nmsgid \"\"\n\"// What if you don't start with a reference? `reference` was a `&`\\n\"\n\"    // because the right side was already a reference. This is not\\n\"\n\"    // a reference because the right side is not one.\\n\"\nmsgstr \"\"\n\"// いきなり参照を変数に代入するのではない場合はどうでしょう。\\n\"\n\"    // 先ほどは右辺値が`&`で始まっていたので参照でしたが、\\n\"\n\"    // これは違います。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:36\nmsgid \"\"\n\"// Rust provides `ref` for exactly this purpose. It modifies the\\n\"\n\"    // assignment so that a reference is created for the element; this\\n\"\n\"    // reference is assigned.\\n\"\nmsgstr \"\"\n\"// このような場合、Rustでは変数束縛時に`ref`を宣言します。\\n\"\n\"    // 要素の参照が作られて、それが束縛対象になります。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:41\nmsgid \"\"\n\"// Accordingly, by defining 2 values without references, references\\n\"\n\"    // can be retrieved via `ref` and `ref mut`.\\n\"\nmsgstr \"\"\n\"// 同様にミュータブルな値の場合`ref mut`を使用することで参照を\\n\"\n\"    // 取得できます。イミュータブルの場合と合わせてみていきましょう。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:46\nmsgid \"// Use `ref` keyword to create a reference.\\n\"\nmsgstr \"// `ref`を使用して参照を作成。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:48\nmsgid \"\\\"Got a reference to a value: {:?}\\\"\"\nmsgstr \"\\\"Got a reference to a value: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:51\nmsgid \"// Use `ref mut` similarly.\\n\"\nmsgstr \"// 同様に`ref mut`を使用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:54\nmsgid \"\"\n\"// Got a reference. Gotta dereference it before we can\\n\"\n\"            // add anything to it.\\n\"\nmsgstr \"// 参照を取得、値を変更するためにはデリファレンスします。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:57\nmsgid \"\\\"We added 10. `mut_value`: {:?}\\\"\"\nmsgstr \"\\\"We added 10. `mut_value`: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:65\nmsgid \"[The ref pattern](../../../scope/borrow/ref.md)\"\nmsgstr \"[ref パターン](../../../scope/borrow/ref.md)\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:3\nmsgid \"Similarly, a `struct` can be destructured as shown:\"\nmsgstr \"以下のようにして、構造体も同様にデストラクトすることができます。\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:12\nmsgid \"// Try changing the values in the struct to see what happens\\n\"\nmsgstr \"// 構造体の中の値を変えて、何が起きるか見てみましょう。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:16\nmsgid \"\\\"First of x is 1, b = {},  y = {} \\\"\"\nmsgstr \"\\\"First of x is 1, b = {},  y = {} \\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:18\nmsgid \"\"\n\"// you can destructure structs and rename the variables,\\n\"\n\"        // the order is not important\\n\"\nmsgstr \"\"\n\"// 構造体をデストラクトして変数をリネーム。\\n\"\n\"        // 順番は重要ではありません。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:20\nmsgid \"\\\"y is 2, i = {:?}\\\"\"\nmsgstr \"\\\"y is 2, i = {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:22\nmsgid \"// and you can also ignore some variables:\\n\"\nmsgstr \"// 一部の変数を無視することもできます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:23\nmsgid \"\\\"y = {}, we don't care about x\\\"\"\nmsgstr \"\\\"y = {}, we don't care about x\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:24\nmsgid \"\"\n\"// this will give an error: pattern does not mention field `x`\\n\"\n\"        //Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\nmsgstr \"\"\n\"// `x`に言及していないため、以下はエラーになります。\\n\"\n\"        //Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:30\nmsgid \"// You do not need a match block to destructure structs:\\n\"\nmsgstr \"// matchを使わずとも構造体はデストラクトできます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:32\nmsgid \"\\\"Outside: x0 = {x0:?}, y0 = {y0}\\\"\"\nmsgstr \"\\\"Outside: x0 = {x0:?}, y0 = {y0}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:34\nmsgid \"// Destructuring works with nested structs as well:\\n\"\nmsgstr \"// ネストした構造体もデストラクトできます。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:41\nmsgid \"\\\"Nested: nested_x = {nested_x:?}, nested_y = {nested_y:?}\\\"\"\nmsgstr \"\\\"Nested: nested_x = {nested_x:?}, nested_y = {nested_y:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:47\nmsgid \"[Structs](../../../custom_types/structs.md)\"\nmsgstr \"[構造体](../../../custom_types/structs.md)\"\n\n#: src/flow_control/match/guard.md:3\nmsgid \"A `match` _guard_ can be added to filter the arm.\"\nmsgstr \"\"\n\"`match`内の条件文をフィルタリングするために、 *ガード* を使用することができま\"\n\"す。\"\n\n#: src/flow_control/match/guard.md:14\nmsgid \"// ^ TODO try different values for `temperature`\\n\"\nmsgstr \"// ^ TODO `temperature`の値を変更してみましょう。\\n\"\n\n#: src/flow_control/match/guard.md:17\nmsgid \"\\\"{}C is above 30 Celsius\\\"\"\nmsgstr \"\\\"{}C is above 30 Celsius\\\"\"\n\n#: src/flow_control/match/guard.md:18\nmsgid \"// The `if condition` part ^ is a guard\\n\"\nmsgstr \"//                         ^ `if`とそれに続く条件式がガードです。\\n\"\n\n#: src/flow_control/match/guard.md:19\nmsgid \"\\\"{}C is equal to or below 30 Celsius\\\"\"\nmsgstr \"\\\"{}C is equal to or below 30 Celsius\\\"\"\n\n#: src/flow_control/match/guard.md:21\nmsgid \"\\\"{}F is above 86 Fahrenheit\\\"\"\nmsgstr \"\\\"{}F is above 86 Fahrenheit\\\"\"\n\n#: src/flow_control/match/guard.md:22\nmsgid \"\\\"{}F is equal to or below 86 Fahrenheit\\\"\"\nmsgstr \"\\\"{}F is equal to or below 86 Fahrenheit\\\"\"\n\n#: src/flow_control/match/guard.md:27\nmsgid \"\"\n\"Note that the compiler won't take guard conditions into account when \"\n\"checking if all patterns are covered by the match expression.\"\nmsgstr \"\"\n\"パターンが全てカバーされているかどうかを判断する際に、ガード条件は考慮されな\"\n\"いことに注意してください。\"\n\n#: src/flow_control/match/guard.md:35\nmsgid \"\\\"Zero\\\"\"\nmsgstr \"\\\"Zero\\\"\"\n\n#: src/flow_control/match/guard.md:36\nmsgid \"\\\"Greater than zero\\\"\"\nmsgstr \"\\\"Greater than zero\\\"\"\n\n#: src/flow_control/match/guard.md:37\nmsgid \"\"\n\"// _ => unreachable!(\\\"Should never happen.\\\"),\\n\"\n\"        // TODO ^ uncomment to fix compilation\\n\"\nmsgstr \"\"\n\"// _ => unreachable!(\\\"Should never happen.\\\"),\\n\"\n\"        // TODO ^ アンコメントしてコンパイルエラーを直してみましょう。\\n\"\n\n#: src/flow_control/match/guard.md:45\nmsgid \"\"\n\"[Tuples](../../primitives/tuples.md) [Enums](../../custom_types/enum.md)\"\nmsgstr \"\"\n\"[タプル](../../primitives/tuples.md) [列挙型](../../custom_types/enum.md)\"\n\n#: src/flow_control/match/binding.md:3\nmsgid \"\"\n\"Indirectly accessing a variable makes it impossible to branch and use that \"\n\"variable without re-binding. `match` provides the `@` sigil for binding \"\n\"values to names:\"\nmsgstr \"\"\n\"いくつかの変数をまとめてマッチ対象とした場合、そのうちの一つを分岐先で使用す\"\n\"ることはそのままでは不可能です。`match`内では`@`マークを使用して変数を束縛す\"\n\"ることができます。\"\n\n#: src/flow_control/match/binding.md:8\nmsgid \"// A function `age` which returns a `u32`.\\n\"\nmsgstr \"// `age`関数は`u32`の値を返します。\\n\"\n\n#: src/flow_control/match/binding.md:14\nmsgid \"\\\"Tell me what type of person you are\\\"\"\nmsgstr \"\\\"Tell me what type of person you are\\\"\"\n\n#: src/flow_control/match/binding.md:17\nmsgid \"\\\"I haven't celebrated my first birthday yet\\\"\"\nmsgstr \"\\\"I haven't celebrated my first birthday yet\\\"\"\n\n#: src/flow_control/match/binding.md:18\nmsgid \"\"\n\"// Could `match` 1 ..= 12 directly but then what age\\n\"\n\"        // would the child be? Instead, bind to `n` for the\\n\"\n\"        // sequence of 1 ..= 12. Now the age can be reported.\\n\"\nmsgstr \"\"\n\"// `1 ..= 12`の値を一挙に`match`させることができます。\\n\"\n\"        // しかしその場合、子供は何歳でしょうか？\\n\"\n\"        // マッチした値を`n`に束縛することで値を使用できます。\\n\"\n\n#: src/flow_control/match/binding.md:21\nmsgid \"\\\"I'm a child of age {:?}\\\"\"\nmsgstr \"\\\"I'm a child of age {:?}\\\"\"\n\n#: src/flow_control/match/binding.md:22\nmsgid \"\\\"I'm a teen of age {:?}\\\"\"\nmsgstr \"\\\"I'm a teen of age {:?}\\\"\"\n\n#: src/flow_control/match/binding.md:23\nmsgid \"// Nothing bound. Return the result.\\n\"\nmsgstr \"// マッチしなかった場合の処理\\n\"\n\n#: src/flow_control/match/binding.md:24\nmsgid \"\\\"I'm an old person of age {:?}\\\"\"\nmsgstr \"\\\"I'm an old person of age {:?}\\\"\"\n\n#: src/flow_control/match/binding.md:29\nmsgid \"\"\n\"You can also use binding to \\\"destructure\\\" `enum` variants, such as \"\n\"`Option`:\"\nmsgstr \"\"\n\"`Option`のような、列挙型の値をデストラクトするためにも、束縛を利用できます。\"\n\n#: src/flow_control/match/binding.md:38\nmsgid \"\"\n\"// Got `Some` variant, match if its value, bound to `n`,\\n\"\n\"        // is equal to 42.\\n\"\nmsgstr \"// `n`に束縛された`Some`の値が42に等しいときにマッチ。\\n\"\n\n#: src/flow_control/match/binding.md:40\nmsgid \"\\\"The Answer: {}!\\\"\"\nmsgstr \"\\\"The Answer: {}!\\\"\"\n\n#: src/flow_control/match/binding.md:41\nmsgid \"// Match any other number.\\n\"\nmsgstr \"// それ以外の数値にマッチ。\\n\"\n\n#: src/flow_control/match/binding.md:42\nmsgid \"\\\"Not interesting... {}\\\"\"\nmsgstr \"\\\"Not interesting... {}\\\"\"\n\n#: src/flow_control/match/binding.md:43\nmsgid \"// Match anything else (`None` variant).\\n\"\nmsgstr \"// それ以外にマッチ（`None`の値）。\\n\"\n\n#: src/flow_control/match/binding.md:50\nmsgid \"\"\n\"[`functions`](../../fn.md), [`enums`](../../custom_types/enum.md) and \"\n\"[`Option`](../../std/option.md)\"\nmsgstr \"\"\n\"[関数](../../fn.md), [列挙型](../../custom_types/enum.md), [`Option`](../../\"\n\"std/option.md)\"\n\n#: src/flow_control/if_let.md:3\nmsgid \"\"\n\"For some use cases, when matching enums, `match` is awkward. For example:\"\nmsgstr \"\"\n\"列挙型をマッチさせるとき、場合によっては`match`を使用すると不自然な書き方に\"\n\"なってしまう場合があります。例えば\"\n\n#: src/flow_control/if_let.md:6 src/flow_control/while_let.md:7\n#: src/flow_control/while_let.md:35\nmsgid \"// Make `optional` of type `Option<i32>`\\n\"\nmsgstr \"// `optional`という変数の型を`Option<i32>`に指定。\\n\"\n\n#: src/flow_control/if_let.md:11\nmsgid \"\\\"This is a really long string and `{:?}`\\\"\"\nmsgstr \"\\\"This is a really long string and `{:?}`\\\"\"\n\n#: src/flow_control/if_let.md:12\nmsgid \"\"\n\"// ^ Needed 2 indentations just so we could destructure\\n\"\n\"        // `i` from the option.\\n\"\nmsgstr \"\"\n\"// ^ `i`をOption型からデストラクトするためだけに\\n\"\n\"        // インデントが一つ増えてしまっている。\\n\"\n\n#: src/flow_control/if_let.md:16\nmsgid \"\"\n\"// ^ Required because `match` is exhaustive. Doesn't it seem\\n\"\n\"    // like wasted space?\\n\"\nmsgstr \"\"\n\"// ^ `match`は全てのパターンに対して網羅的でなくてはならないので必要。\\n\"\n\"    // 冗長に見えませんか？\\n\"\n\n#: src/flow_control/if_let.md:22\nmsgid \"\"\n\"`if let` is cleaner for this use case and in addition allows various failure \"\n\"options to be specified:\"\nmsgstr \"\"\n\"この場合は`if let`を用いたほうが美しく、失敗時の処理も柔軟に行うことができま\"\n\"す。\"\n\n#: src/flow_control/if_let.md:27\nmsgid \"// All have type `Option<i32>`\\n\"\nmsgstr \"// 全て`Option<i32>`型\\n\"\n\n#: src/flow_control/if_let.md:32\nmsgid \"\"\n\"// The `if let` construct reads: \\\"if `let` destructures `number` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`).\\n\"\nmsgstr \"\"\n\"// `if let`文は以下と同じ意味。\\n\"\n\"    // もしletがnumberをデストラクトした結果が`Some(i)`になるならば\\n\"\n\"    // ブロック内（`{}`）を実行します。\\n\"\n\n#: src/flow_control/if_let.md:35 src/flow_control/if_let.md:40\n#: src/flow_control/if_let.md:50\nmsgid \"\\\"Matched {:?}!\\\"\"\nmsgstr \"\\\"Matched {:?}!\\\"\"\n\n#: src/flow_control/if_let.md:38\nmsgid \"// If you need to specify a failure, use an else:\\n\"\nmsgstr \"\"\n\"// デストラクトした結果が`Some()`にならない場合の処理を明示したい場合、\\n\"\n\"    // `else`を使用します。\\n\"\n\n#: src/flow_control/if_let.md:42\nmsgid \"// Destructure failed. Change to the failure case.\\n\"\nmsgstr \"// デストラクト失敗の場合。このブロック内を実行。\\n\"\n\n#: src/flow_control/if_let.md:43 src/flow_control/if_let.md:54\nmsgid \"\\\"Didn't match a number. Let's go with a letter!\\\"\"\nmsgstr \"\\\"Didn't match a number. Let's go with a letter!\\\"\"\n\n#: src/flow_control/if_let.md:46\nmsgid \"// Provide an altered failing condition.\\n\"\nmsgstr \"// デストラクト失敗時の処理を更に分岐させることもできます。\\n\"\n\n#: src/flow_control/if_let.md:51\nmsgid \"\"\n\"// Destructure failed. Evaluate an `else if` condition to see if the\\n\"\n\"    // alternate failure branch should be taken:\\n\"\nmsgstr \"// デストラクト失敗。`else if`を評価し、処理をさらに分岐させます。\\n\"\n\n#: src/flow_control/if_let.md:56\nmsgid \"// The condition evaluated false. This branch is the default:\\n\"\nmsgstr \"// 今回は`else if`の評価がfalseなので、このブロック内がデフォルト。\\n\"\n\n#: src/flow_control/if_let.md:57\nmsgid \"\\\"I don't like letters. Let's go with an emoticon :)!\\\"\"\nmsgstr \"\\\"I don't like letters. Let's go with an emoticon :)!\\\"\"\n\n#: src/flow_control/if_let.md:62\nmsgid \"In the same way, `if let` can be used to match any enum value:\"\nmsgstr \"同様に`if let`は任意の列挙型のマッチに使えます。\"\n\n#: src/flow_control/if_let.md:65\nmsgid \"// Our example enum\\n\"\nmsgstr \"// 列挙型の例\\n\"\n\n#: src/flow_control/if_let.md:73\nmsgid \"// Create example variables\\n\"\nmsgstr \"// 変数の作成\\n\"\n\n#: src/flow_control/if_let.md:78 src/flow_control/if_let.md:114\nmsgid \"// Variable a matches Foo::Bar\\n\"\nmsgstr \"// Foo::Barにマッチする変数\\n\"\n\n#: src/flow_control/if_let.md:80 src/flow_control/if_let.md:117\nmsgid \"\\\"a is foobar\\\"\"\nmsgstr \"\\\"a is foobar\\\"\"\n\n#: src/flow_control/if_let.md:83\nmsgid \"\"\n\"// Variable b does not match Foo::Bar\\n\"\n\"    // So this will print nothing\\n\"\nmsgstr \"// 変数bはFoo::Barにマッチしないので出力されません。\\n\"\n\n#: src/flow_control/if_let.md:86\nmsgid \"\\\"b is foobar\\\"\"\nmsgstr \"\\\"b is foobar\\\"\"\n\n#: src/flow_control/if_let.md:89\nmsgid \"\"\n\"// Variable c matches Foo::Qux which has a value\\n\"\n\"    // Similar to Some() in the previous example\\n\"\nmsgstr \"\"\n\"// 変数cはFoo::Quxにマッチしつつ値を取り出せます。\\n\"\n\"    // これはSome()と同様です。\\n\"\n\n#: src/flow_control/if_let.md:92\nmsgid \"\\\"c is {}\\\"\"\nmsgstr \"\\\"c is {}\\\"\"\n\n#: src/flow_control/if_let.md:95\nmsgid \"// Binding also works with `if let`\\n\"\nmsgstr \"// 束縛も可能です。\\n\"\n\n#: src/flow_control/if_let.md:97\nmsgid \"\\\"c is one hundred\\\"\"\nmsgstr \"\\\"c is one hundred\\\"\"\n\n#: src/flow_control/if_let.md:102\nmsgid \"\"\n\"Another benefit is that `if let` allows us to match non-parameterized enum \"\n\"variants. This is true even in cases where the enum doesn't implement or \"\n\"derive `PartialEq`. In such cases `if Foo::Bar == a` would fail to compile, \"\n\"because instances of the enum cannot be equated, however `if let` will \"\n\"continue to work.\"\nmsgstr \"\"\n\"もう一つのメリットは`if let`がパラメータを持たない列挙型にも使えることです。\"\n\"列挙型が`PartialEq`を実装または導出していなくても問題ありません。その場合、列\"\n\"挙型のインスタンスは比較できないので`if Foo::Bar == a`はコンパイルエラーとな\"\n\"りますが、`if let`は引き続き使えます。\"\n\n#: src/flow_control/if_let.md:104\nmsgid \"Would you like a challenge? Fix the following example to use `if let`:\"\nmsgstr \"試してみましょう。以下の例を`if let`を使って直してみてください。\"\n\n#: src/flow_control/if_let.md:107\nmsgid \"\"\n\"// This enum purposely neither implements nor derives PartialEq.\\n\"\n\"// That is why comparing Foo::Bar == a fails below.\\n\"\nmsgstr \"\"\n\"// この列挙型はPartialEqを実装も導出もしていません。\\n\"\n\"// そのためFoo::Bar == aはエラーとなります。\\n\"\n\n#: src/flow_control/if_let.md:116\nmsgid \"// ^-- this causes a compile-time error. Use `if let` instead.\\n\"\nmsgstr \"// ^-- ここでコンパイルエラー。`if let`を使ってみましょう。\\n\"\n\n#: src/flow_control/if_let.md:124\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/160)\"\nmsgstr \"\"\n\"[列挙型](../custom_types/enum.md), [`Option`](../std/option.md), [RFC]\"\n\"(https://github.com/rust-lang/rfcs/pull/160)\"\n\n#: src/flow_control/let_else.md:4\nmsgid \"🛈 stable since: rust 1.65\"\nmsgstr \"🛈 Rust 1.65で安定化。\"\n\n#: src/flow_control/let_else.md:6\nmsgid \"\"\n\"🛈 you can target specific edition by compiling like this `rustc --\"\n\"edition=2021 main.rs`\"\nmsgstr \"\"\n\"🛈 エディションを指定するには`rustc --edition=2021 main.rs`のようにします。\"\n\n#: src/flow_control/let_else.md:10\nmsgid \"\"\n\"With `let`\\\\-`else`, a refutable pattern can match and bind variables in the \"\n\"surrounding scope like a normal `let`, or else diverge (e.g. `break`, \"\n\"`return`, `panic!`) when the pattern doesn't match.\"\nmsgstr \"\"\n\"`let`\\\\-`else`を使うと反駁できるパターンにマッチさせつつ、通常の`let`のように\"\n\"変数束縛することができます。マッチしなかった場合は（`break`、`return`、\"\n\"`panic!`のように）処理を分岐させます。\"\n\n#: src/flow_control/let_else.md:18 src/flow_control/let_else.md:41\n#: src/std/str.md:41\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/flow_control/let_else.md:20 src/flow_control/let_else.md:44\nmsgid \"\\\"Can't segment count item pair: '{s}'\\\"\"\nmsgstr \"\\\"Can't segment count item pair: '{s}'\\\"\"\n\n#: src/flow_control/let_else.md:23 src/flow_control/let_else.md:49\nmsgid \"\\\"Can't parse integer: '{count_str}'\\\"\"\nmsgstr \"\\\"Can't parse integer: '{count_str}'\\\"\"\n\n#: src/flow_control/let_else.md:29 src/flow_control/let_else.md:54\nmsgid \"\\\"3 chairs\\\"\"\nmsgstr \"\\\"3 chairs\\\"\"\n\n#: src/flow_control/let_else.md:29 src/flow_control/let_else.md:54\nmsgid \"\\\"chairs\\\"\"\nmsgstr \"\\\"chairs\\\"\"\n\n#: src/flow_control/let_else.md:33\nmsgid \"\"\n\"The scope of name bindings is the main thing that makes this different from \"\n\"`match` or `if let`\\\\-`else` expressions. You could previously approximate \"\n\"these patterns with an unfortunate bit of repetition and an outer `let`:\"\nmsgstr \"\"\n\"束縛した変数名のスコープが`match`や`if let`\\\\-`else`式との主な違いです。\"\n\"`match`や`if let`\\\\-`else`でも似たようなことができますが、残念ながらコードの\"\n\"繰り返しや追加の`let`が必要になってしまいます。\"\n\n#: src/flow_control/let_else.md:59\nmsgid \"\"\n\"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) and \"\n\"the [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html).\"\nmsgstr \"\"\n\"[Option](../std/option.md), [match](./match.md), [if let](./if_let.md), [let-\"\n\"else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html).\"\n\n#: src/flow_control/while_let.md:3\nmsgid \"\"\n\"Similar to `if let`, `while let` can make awkward `match` sequences more \"\n\"tolerable. Consider the following sequence that increments `i`:\"\nmsgstr \"\"\n\"`if let`と同様に、`while let`も不格好な`match`処理を多少マシにしてくれます。\"\n\"例えば、以下の`i`をインクリメントする処理を見てください。\"\n\n#: src/flow_control/while_let.md:9\nmsgid \"// Repeatedly try this test.\\n\"\nmsgstr \"// 変数の照合を繰り返し行います。\\n\"\n\n#: src/flow_control/while_let.md:13\nmsgid \"// If `optional` destructures, evaluate the block.\\n\"\nmsgstr \"\"\n\"// もし`optional`のデストラクトに成功した場合、値に応じて処理を分岐。\\n\"\n\n#: src/flow_control/while_let.md:16 src/flow_control/while_let.md:42\nmsgid \"\\\"Greater than 9, quit!\\\"\"\nmsgstr \"\\\"Greater than 9, quit!\\\"\"\n\n#: src/flow_control/while_let.md:19 src/flow_control/while_let.md:45\nmsgid \"\\\"`i` is `{:?}`. Try again.\\\"\"\nmsgstr \"\\\"`i` is `{:?}`. Try again.\\\"\"\n\n#: src/flow_control/while_let.md:22\nmsgid \"// ^ Requires 3 indentations!\\n\"\nmsgstr \"// ^ 3つものインデントが必要。\\n\"\n\n#: src/flow_control/while_let.md:24\nmsgid \"// Quit the loop when the destructure fails:\\n\"\nmsgstr \"// デストラクトに失敗した場合、ループを脱出。\\n\"\n\n#: src/flow_control/while_let.md:26\nmsgid \"// ^ Why should this be required? There must be a better way!\\n\"\nmsgstr \"// ^ どうしてこんな行を書く必要が？もっと良い方法があるはずです！\\n\"\n\n#: src/flow_control/while_let.md:31\nmsgid \"Using `while let` makes this sequence much nicer:\"\nmsgstr \"`while let`を使ってすっきり書くことができます。\"\n\n#: src/flow_control/while_let.md:38\nmsgid \"\"\n\"// This reads: \\\"while `let` destructures `optional` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`). Else `break`.\\n\"\nmsgstr \"\"\n\"// これは次のように読めます。「`let`が`optional`を`Some(i)`にデストラクト\\n\"\n\"    // している間はブロック内（`{}`）を評価せよ。さもなくば`break`せよ。」\\n\"\n\n#: src/flow_control/while_let.md:48\nmsgid \"\"\n\"// ^ Less rightward drift and doesn't require\\n\"\n\"        // explicitly handling the failing case.\\n\"\nmsgstr \"\"\n\"// ^ インデントが少なく、デストラクト失敗時の処理を追加する必要がありませ\"\n\"ん。\\n\"\n\n#: src/flow_control/while_let.md:51\nmsgid \"\"\n\"// ^ `if let` had additional optional `else`/`else if`\\n\"\n\"    // clauses. `while let` does not have these.\\n\"\nmsgstr \"\"\n\"// ^ `if let`の場合は`else`/`else if`句が一つ余分にありましたが、\\n\"\n\"    // `while let`では必要ありません。\\n\"\n\n#: src/flow_control/while_let.md:58\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/214)\"\nmsgstr \"\"\n\"[列挙型](../custom_types/enum.md), [`Option`](../std/option.md), [RFC]\"\n\"(https://github.com/rust-lang/rfcs/pull/214)\"\n\n#: src/fn.md:3\nmsgid \"\"\n\"Functions are declared using the `fn` keyword. Its arguments are type \"\n\"annotated, just like variables, and, if the function returns a value, the \"\n\"return type must be specified after an arrow `->`.\"\nmsgstr \"\"\n\"関数は`fn`キーワードを用いて定義することができます。引数は変数と同様に型を指\"\n\"定する必要があり、もし関数が値を返すならば`->`の後にその型も指定する必要があ\"\n\"ります。\"\n\n#: src/fn.md:7\nmsgid \"\"\n\"The final expression in the function will be used as return value. \"\n\"Alternatively, the `return` statement can be used to return a value earlier \"\n\"from within the function, even from inside loops or `if` statements.\"\nmsgstr \"\"\n\"関数内の最後の式が返り値となります。関数の途中で値を返したい場合は`return`文\"\n\"を使用します。ループの最中や`if`文の中からも値を返すことができます。\"\n\n#: src/fn.md:11\nmsgid \"Let's rewrite FizzBuzz using functions!\"\nmsgstr \"では、今度は関数を使ってFizzBuzz問題を解いてみましょう！\"\n\n#: src/fn.md:14\nmsgid \"\"\n\"// Unlike C/C++, there's no restriction on the order of function \"\n\"definitions\\n\"\nmsgstr \"// C/C++とは違い、関数の定義を行う順番に制限はありません。\\n\"\n\n#: src/fn.md:16\nmsgid \"// We can use this function here, and define it somewhere later\\n\"\nmsgstr \"// ここで関数を使用し、後ほど定義してもかまいません。\\n\"\n\n#: src/fn.md:19\nmsgid \"// Function that returns a boolean value\\n\"\nmsgstr \"// ブーリアン型を返す関数\\n\"\n\n#: src/fn.md:22\nmsgid \"// Corner case, early return\\n\"\nmsgstr \"// 例外的な引数を受けた場合、早めに返します。\\n\"\n\n#: src/fn.md:27\nmsgid \"// This is an expression, the `return` keyword is not necessary here\\n\"\nmsgstr \"// これは式であり、`return`キーワードは必要ありません。\\n\"\n\n#: src/fn.md:30\nmsgid \"\"\n\"// Functions that \\\"don't\\\" return a value, actually return the unit type \"\n\"`()`\\n\"\nmsgstr \"// 値を「返さない」関数、実際にはユニット型（`()`）を返しています。\\n\"\n\n#: src/fn.md:43\nmsgid \"\"\n\"// When a function returns `()`, the return type can be omitted from the\\n\"\n\"// signature\\n\"\nmsgstr \"// 関数が`()`を返すとき、返り値の型は省略できます。\\n\"\n\n#: src/fn/methods.md:1\nmsgid \"Associated functions & Methods\"\nmsgstr \"関連関数とメソッド\"\n\n#: src/fn/methods.md:3\nmsgid \"\"\n\"Some functions are connected to a particular type. These come in two forms: \"\n\"associated functions, and methods. Associated functions are functions that \"\n\"are defined on a type generally, while methods are associated functions that \"\n\"are called on a particular instance of a type.\"\nmsgstr \"\"\n\"関数には特定の型に紐づいたものがあります。これには関連関数とメソッドの2つの形\"\n\"式があります。メソッドは特定のインスタンスに関連付けて呼ばれる関数であるのに\"\n\"対し、関連関数は型全体に対して定義される関数です。\"\n\n#: src/fn/methods.md:13\nmsgid \"\"\n\"// Implementation block, all `Point` associated functions & methods go in \"\n\"here\\n\"\nmsgstr \"\"\n\"// 実装のためのブロック。`Point`の持つ関連関数とメソッドを全て定義します。\\n\"\n\n#: src/fn/methods.md:16\nmsgid \"\"\n\"// This is an \\\"associated function\\\" because this function is associated \"\n\"with\\n\"\n\"    // a particular type, that is, Point.\\n\"\n\"    //\\n\"\n\"    // Associated functions don't need to be called with an instance.\\n\"\n\"    // These functions are generally used like constructors.\\n\"\nmsgstr \"\"\n\"// これは特定の型（すなわち Point）に関連した関数なので関連関数\\n\"\n\"    //\\n\"\n\"    // 関連関数はインスタンスからでなく呼び出すことができます。\\n\"\n\"    // 以下のようにコンストラクタとしてよく使用されます。\\n\"\n\n#: src/fn/methods.md:25\nmsgid \"// Another associated function, taking two arguments:\\n\"\nmsgstr \"// 引数を2つ取る関連関数\\n\"\n\n#: src/fn/methods.md:37\nmsgid \"\"\n\"// This is a method\\n\"\n\"    // `&self` is sugar for `self: &Self`, where `Self` is the type of the\\n\"\n\"    // caller object. In this case `Self` = `Rectangle`\\n\"\nmsgstr \"\"\n\"// こちらはメソッド。`&self`は`self: &Self`の糖衣構文。\\n\"\n\"    // `Self`は呼び出し元オブジェクトの型。この場合は`Rectangle`。\\n\"\n\n#: src/fn/methods.md:41\nmsgid \"// `self` gives access to the struct fields via the dot operator\\n\"\nmsgstr \"// `self`はドット演算子によって構造体のフィールドを参照できます。\\n\"\n\n#: src/fn/methods.md:45\nmsgid \"\"\n\"// `abs` is a `f64` method that returns the absolute value of the\\n\"\n\"        // caller\\n\"\nmsgstr \"// `abs`は`f64`のメソッドで、呼び出し元の値の絶対値を返します。\\n\"\n\n#: src/fn/methods.md:57\nmsgid \"\"\n\"// This method requires the caller object to be mutable\\n\"\n\"    // `&mut self` desugars to `self: &mut Self`\\n\"\nmsgstr \"\"\n\"// このメソッドは呼び出し元オブジェクトがミュータブルであることを\\n\"\n\"    // 必要とします。`&mut self`は`self: &mut Self`の糖衣構文です。\\n\"\n\n#: src/fn/methods.md:67\nmsgid \"// `Pair` owns resources: two heap allocated integers\\n\"\nmsgstr \"// `Pair`はヒープ上の整数を2つ保持します。\\n\"\n\n#: src/fn/methods.md:72\nmsgid \"\"\n\"// This method \\\"consumes\\\" the resources of the caller object\\n\"\n\"    // `self` desugars to `self: Self`\\n\"\nmsgstr \"\"\n\"// このメソッドは呼び出し元オブジェクトを「消費」します。\\n\"\n\"    // `self`は`self: Self`の糖衣構文です。\\n\"\n\n#: src/fn/methods.md:75\nmsgid \"// Destructure `self`\\n\"\nmsgstr \"// `self`をデストラクト。\\n\"\n\n#: src/fn/methods.md:78\nmsgid \"\\\"Destroying Pair({}, {})\\\"\"\nmsgstr \"\\\"Destroying Pair({}, {})\\\"\"\n\n#: src/fn/methods.md:80\nmsgid \"// `first` and `second` go out of scope and get freed\\n\"\nmsgstr \"// `first`、`second`はスコープから抜け出すと同時に、解放されます。\\n\"\n\n#: src/fn/methods.md:86\nmsgid \"// Associated functions are called using double colons\\n\"\nmsgstr \"// 関連関数はコロンを2つ挟んで呼び出すことができます。\\n\"\n\n#: src/fn/methods.md:91\nmsgid \"\"\n\"// Methods are called using the dot operator\\n\"\n\"    // Note that the first argument `&self` is implicitly passed, i.e.\\n\"\n\"    // `rectangle.perimeter()` === `Rectangle::perimeter(&rectangle)`\\n\"\nmsgstr \"\"\n\"// メソッドはドット演算子を用いて呼び出されます。\\n\"\n\"    // 最初の引数`&self`は明示せずに受け渡されていることに注目。つまり\\n\"\n\"    // `rectangle.perimeter()` === `Rectangle::perimeter(&rectangle)`\\n\"\n\n#: src/fn/methods.md:94\nmsgid \"\\\"Rectangle perimeter: {}\\\"\"\nmsgstr \"\\\"Rectangle perimeter: {}\\\"\"\n\n#: src/fn/methods.md:95\nmsgid \"\\\"Rectangle area: {}\\\"\"\nmsgstr \"\\\"Rectangle area: {}\\\"\"\n\n#: src/fn/methods.md:102\nmsgid \"\"\n\"// Error! `rectangle` is immutable, but this method requires a mutable\\n\"\n\"    // object\\n\"\n\"    //rectangle.translate(1.0, 0.0);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`rectangle`はイミュータブルですがこのメソッドは\\n\"\n\"    // ミュータブルなオブジェクトを必要とします。\\n\"\n\"    //rectangle.translate(1.0, 0.0);\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/fn/methods.md:107\nmsgid \"// Okay! Mutable objects can call mutable methods\\n\"\nmsgstr \"\"\n\"// OK！ミュータブルなオブジェクトはミュータブルなメソッドを呼び出せます。\\n\"\n\n#: src/fn/methods.md:114\nmsgid \"\"\n\"// Error! Previous `destroy` call \\\"consumed\\\" `pair`\\n\"\n\"    //pair.destroy();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！先ほどの`destroy`で`pair`はすでに消費されてしまっています。\\n\"\n\"    //pair.destroy();\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/fn/closures.md:3\nmsgid \"\"\n\"Closures are functions that can capture the enclosing environment. For \"\n\"example, a closure that captures the `x` variable:\"\nmsgstr \"\"\n\"Rustにおけるクロージャは、その外側の環境を捕捉した関数のことです。例えば、次\"\n\"のコードは変数`x`を捕捉したクロージャです。\"\n\n#: src/fn/closures.md:10\nmsgid \"\"\n\"The syntax and capabilities of closures make them very convenient for on the \"\n\"fly usage. Calling a closure is exactly like calling a function. However, \"\n\"both input and return types _can_ be inferred and input variable names \"\n\"_must_ be specified.\"\nmsgstr \"\"\n\"クロージャの構文や機能は、その場限りの用途で何かを作るのに便利です。クロー\"\n\"ジャの呼び出しは関数の呼び出しと全く同じです。しかし、入力の型と戻り値の型は\"\n\"推論させることができますが、入力変数の名前は必ず指定しなくてはなりません。\"\n\n#: src/fn/closures.md:15\nmsgid \"Other characteristics of closures include:\"\nmsgstr \"クロージャの他の特徴を以下に示します。\"\n\n#: src/fn/closures.md:16\nmsgid \"using `||` instead of `()` around input variables.\"\nmsgstr \"入力変数を囲むのに、`()`の代わりに`||`を用います。\"\n\n#: src/fn/closures.md:17\nmsgid \"\"\n\"optional body delimitation (`{}`) for a single line expression (mandatory \"\n\"otherwise).\"\nmsgstr \"\"\n\"本体が単一の式の場合は、本体の区切り文字（`{}`）を省略できます。（それ以外の\"\n\"場合は必須です）\"\n\n#: src/fn/closures.md:18\nmsgid \"the ability to capture the outer environment variables.\"\nmsgstr \"外側の環境にある変数を捕捉することができます。\"\n\n#: src/fn/closures.md:24\nmsgid \"\"\n\"// A regular function can't refer to variables in the enclosing environment\\n\"\n\"    //fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"    // TODO: uncomment the line above and see the compiler error. The \"\n\"compiler\\n\"\n\"    // suggests that we define a closure instead.\\n\"\nmsgstr \"\"\n\"// 通常の関数は周辺の環境の変数を参照できません。\\n\"\n\"    //fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"    // TODO: 上の行をアンコメントしてコンパイルエラーを見てみましょう。\\n\"\n\"    // 代わりにクロージャを定義することをコンパイラが提案してくれます。\\n\"\n\n#: src/fn/closures.md:29\nmsgid \"\"\n\"// Closures are anonymous, here we are binding them to references.\\n\"\n\"    // Annotation is identical to function annotation but is optional\\n\"\n\"    // as are the `{}` wrapping the body. These nameless functions\\n\"\n\"    // are assigned to appropriately named variables.\\n\"\nmsgstr \"\"\n\"// クロージャは匿名なので、参照に束縛して使います。\\n\"\n\"    // 型アノテーションは、通常の関数と同様の方法で行えますが、必須ではありま\"\n\"せん。\\n\"\n\"    // `{}`も必須ではありません。\\n\"\n\"    // このように定義した無名関数を適切な名前の変数に代入します。\\n\"\n\n#: src/fn/closures.md:36\nmsgid \"// Call the closures.\\n\"\nmsgstr \"// クロージャを呼び出す。\\n\"\n\n#: src/fn/closures.md:37\nmsgid \"\\\"closure_annotated: {}\\\"\"\nmsgstr \"\\\"closure_annotated: {}\\\"\"\n\n#: src/fn/closures.md:38\nmsgid \"\\\"closure_inferred: {}\\\"\"\nmsgstr \"\\\"closure_inferred: {}\\\"\"\n\n#: src/fn/closures.md:39\nmsgid \"\"\n\"// Once closure's type has been inferred, it cannot be inferred again with \"\n\"another type.\\n\"\n\"    //println!(\\\"cannot reuse closure_inferred with another type: {}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"    // TODO: uncomment the line above and see the compiler error.\\n\"\nmsgstr \"\"\n\"// クロージャの型が一度推論されると、別の型にあらためて推論することはできませ\"\n\"ん。\\n\"\n\"    //println!(\\\"cannot reuse closure_inferred with another type: {}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"    // TODO: 上の行をアンコメントしてコンパイルエラーを見てみましょう。\\n\"\n\n#: src/fn/closures.md:43\nmsgid \"\"\n\"// A closure taking no arguments which returns an `i32`.\\n\"\n\"    // The return type is inferred.\\n\"\nmsgstr \"\"\n\"// 引数なしで`i32`を返すクロージャ。\\n\"\n\"    // 戻り値の型は推論されます。\\n\"\n\n#: src/fn/closures.md:46\nmsgid \"\\\"closure returning one: {}\\\"\"\nmsgstr \"\\\"closure returning one: {}\\\"\"\n\n#: src/fn/closures/capture.md:3\nmsgid \"\"\n\"Closures are inherently flexible and will do what the functionality requires \"\n\"to make the closure work without annotation. This allows capturing to \"\n\"flexibly adapt to the use case, sometimes moving and sometimes borrowing. \"\n\"Closures can capture variables:\"\nmsgstr \"\"\n\"クロージャはとてもフレキシブルに動作するように出来ています。クロージャにおい\"\n\"て型アノテーションをする必要が無いのは前述の仕組みのためですが、この仕組みの\"\n\"おかげでユースケースに応じて参照を取得したり値そのものを取得したりといった動\"\n\"作が可能になります。クロージャは外側の環境にある要素を、以下の形で取得するこ\"\n\"とができます。\"\n\n#: src/fn/closures/capture.md:8\nmsgid \"by reference: `&T`\"\nmsgstr \"参照：`&T`\"\n\n#: src/fn/closures/capture.md:9\nmsgid \"by mutable reference: `&mut T`\"\nmsgstr \"ミュータブルな参照：`&mut T`\"\n\n#: src/fn/closures/capture.md:10\nmsgid \"by value: `T`\"\nmsgstr \"値そのもの：`T`\"\n\n#: src/fn/closures/capture.md:12\nmsgid \"\"\n\"They preferentially capture variables by reference and only go lower when \"\n\"required.\"\nmsgstr \"\"\n\"クロージャは出来る限り参照を取得しようとし、その他2つは必要なときのみ取得しま\"\n\"す。\"\n\n#: src/fn/closures/capture.md:19\nmsgid \"\\\"green\\\"\"\nmsgstr \"\\\"green\\\"\"\n\n#: src/fn/closures/capture.md:21\nmsgid \"\"\n\"// A closure to print `color` which immediately borrows (`&`) `color` and\\n\"\n\"    // stores the borrow and closure in the `print` variable. It will \"\n\"remain\\n\"\n\"    // borrowed until `print` is used the last time. \\n\"\n\"    //\\n\"\n\"    // `println!` only requires arguments by immutable reference so it \"\n\"doesn't\\n\"\n\"    // impose anything more restrictive.\\n\"\nmsgstr \"\"\n\"// `color`を出力するためのクロージャ。\\n\"\n\"    // これは`color`を借用（`&`）し、その借用とクロージャを`print`\\n\"\n\"    // という名の変数に保持します。\\n\"\n\"    // 借用は`print`がスコープから出るまで続きます。\\n\"\n\"    //\\n\"\n\"    // `println!`は参照を与えれば機能するので、\\n\"\n\"    // これ以上なにかする必要はありません。\\n\"\n\n#: src/fn/closures/capture.md:27\nmsgid \"\\\"`color`: {}\\\"\"\nmsgstr \"\\\"`color`: {}\\\"\"\n\n#: src/fn/closures/capture.md:29\nmsgid \"// Call the closure using the borrow.\\n\"\nmsgstr \"// 借用を行ったクロージャを呼び出します。\\n\"\n\n#: src/fn/closures/capture.md:32\nmsgid \"\"\n\"// `color` can be borrowed immutably again, because the closure only holds\\n\"\n\"    // an immutable reference to `color`. \\n\"\nmsgstr \"\"\n\"// `color`を再びイミュータブルで借用することができます。\\n\"\n\"    // これはクロージャが`color`に対するイミュータブルな\\n\"\n\"    // 参照しか保持しないためです。\\n\"\n\n#: src/fn/closures/capture.md:37\nmsgid \"// A move or reborrow is allowed after the final use of `print`\\n\"\nmsgstr \"// 最後に`print`を使用した後は移動や再借用が許可されます。\\n\"\n\n#: src/fn/closures/capture.md:42\nmsgid \"\"\n\"// A closure to increment `count` could take either `&mut count` or `count`\\n\"\n\"    // but `&mut count` is less restrictive so it takes that. Immediately\\n\"\n\"    // borrows `count`.\\n\"\n\"    //\\n\"\n\"    // A `mut` is required on `inc` because a `&mut` is stored inside. \"\n\"Thus,\\n\"\n\"    // calling the closure mutates `count` which requires a `mut`.\\n\"\nmsgstr \"\"\n\"// `count`をインクリメントするためのクロージャ。`count`と`&mut count`\\n\"\n\"    // の両方を取ることができますが、後者のほうが制限が少ないため、\\n\"\n\"    // （訳注: `count`だと`&mut count`と違い、一度しか呼ぶことができな\"\n\"い。）\\n\"\n\"    // そちらを取ります。直後に`count`を借用します。\\n\"\n\"    //\\n\"\n\"    // `inc`には`mut`をつける必要があります。なぜならミュータブルな型が\\n\"\n\"    // 中で使用されているからです。ミュータブルなクロージャは呼ぶたびに\\n\"\n\"    // 内部変数を変更します。\\n\"\n\n#: src/fn/closures/capture.md:50\nmsgid \"\\\"`count`: {}\\\"\"\nmsgstr \"\\\"`count`: {}\\\"\"\n\n#: src/fn/closures/capture.md:53\nmsgid \"// Call the closure using a mutable borrow.\\n\"\nmsgstr \"// ミュータブルな借用を使ってクロージャを実行。\\n\"\n\n#: src/fn/closures/capture.md:56\nmsgid \"\"\n\"// The closure still mutably borrows `count` because it is called later.\\n\"\n\"    // An attempt to reborrow will lead to an error.\\n\"\n\"    // let _reborrow = &count; \\n\"\n\"    // ^ TODO: try uncommenting this line.\\n\"\nmsgstr \"\"\n\"// クロージャは後で呼ばれるため、まだ `count` をミュータブルで借用していま\"\n\"す。\\n\"\n\"    // 再借用しようとするとエラーになります。\\n\"\n\"    // let _reborrow = &count; \\n\"\n\"    // ^ TODO: この行のコメントアウトを解除しましょう。\\n\"\n\n#: src/fn/closures/capture.md:62\nmsgid \"\"\n\"// The closure no longer needs to borrow `&mut count`. Therefore, it is\\n\"\n\"    // possible to reborrow without an error\\n\"\nmsgstr \"\"\n\"// クロージャはもう`&mut count`を借用する必要がありません。\\n\"\n\"    // なので、エラーを起こさず再借用することができます。\\n\"\n\n#: src/fn/closures/capture.md:67\nmsgid \"// A non-copy type.\\n\"\nmsgstr \"// コピー不可能な型\\n\"\n\n#: src/fn/closures/capture.md:70\nmsgid \"\"\n\"// `mem::drop` requires `T` so this must take by value. A copy type\\n\"\n\"    // would copy into the closure leaving the original untouched.\\n\"\n\"    // A non-copy must move and so `movable` immediately moves into\\n\"\n\"    // the closure.\\n\"\nmsgstr \"\"\n\"// `mem::drop`は`T`（ジェネリック型）を取る必要があるため、このクロージャは\\n\"\n\"    // 参照ではなく値を取ります。その場合、もしもコピー可能な値ならば、\\n\"\n\"    // 元の値はそのままでコピーのみを取ります。\\n\"\n\"    // 不可能ならば値そのものを移動させます。\\n\"\n\n#: src/fn/closures/capture.md:75\nmsgid \"\\\"`movable`: {:?}\\\"\"\nmsgstr \"\\\"`movable`: {:?}\\\"\"\n\n#: src/fn/closures/capture.md:79\nmsgid \"// `consume` consumes the variable so this can only be called once.\\n\"\nmsgstr \"\"\n\"// `consume`は変数を消費（開放）するため、一度しか呼び出すことができませ\"\n\"ん。\\n\"\n\n#: src/fn/closures/capture.md:81\nmsgid \"\"\n\"// consume();\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\"// consume();\\n\"\n\"    // ^ TODO: この行のコメントアウトを解除しましょう。\\n\"\n\n#: src/fn/closures/capture.md:86\nmsgid \"\"\n\"Using `move` before vertical pipes forces closure to take ownership of \"\n\"captured variables:\"\nmsgstr \"\"\n\"バーティカルパイプ（訳注：縦線記号`||`）の前に`move`を使用することで、キャプ\"\n\"チャする変数の所有権を取ることをクロージャに強制します。\"\n\n#: src/fn/closures/capture.md:91\nmsgid \"// `Vec` has non-copy semantics.\\n\"\nmsgstr \"// `Vec`はコピーセマンティクスではない。\\n\"\n\n#: src/fn/closures/capture.md:99\nmsgid \"\"\n\"// println!(\\\"There're {} elements in vec\\\", haystack.len());\\n\"\n\"    // ^ Uncommenting above line will result in compile-time error\\n\"\n\"    // because borrow checker doesn't allow re-using variable after it\\n\"\n\"    // has been moved.\\n\"\nmsgstr \"\"\n\"// println!(\\\"There're {} elements in vec\\\", haystack.len());\\n\"\n\"    // ^ 上の行のコメントアウトを解除すると、コンパイル時エラーになります。\\n\"\n\"    // これは変数の所有権が移った後の再利用を借用チェッカーが許可しないからで\"\n\"す。\\n\"\n\n#: src/fn/closures/capture.md:104\nmsgid \"\"\n\"// Removing `move` from closure's signature will cause closure\\n\"\n\"    // to borrow _haystack_ variable immutably, hence _haystack_ is still\\n\"\n\"    // available and uncommenting above line will not cause an error.\\n\"\nmsgstr \"\"\n\"// クロージャのシグネチャから`move`を削除すると、クロージャは\\n\"\n\"    // _haystack_ 変数をイミュータブルで借用するようになります。\\n\"\n\"    // そのため _haystack_ はまだ利用可能となり、上の行のコメントアウトを\\n\"\n\"    // 解除してもエラーが発生しなくなります。\\n\"\n\n#: src/fn/closures/capture.md:112\nmsgid \"\"\n\"[`Box`](../../std/box.md) and [`std::mem::drop`](https://doc.rust-lang.org/\"\n\"std/mem/fn.drop.html)\"\nmsgstr \"\"\n\"[`Box`](../../std/box.md), [`std::mem::drop`](https://doc.rust-lang.org/std/\"\n\"mem/fn.drop.html)\"\n\n#: src/fn/closures/input_parameters.md:3\nmsgid \"\"\n\"While Rust chooses how to capture variables on the fly mostly without type \"\n\"annotation, this ambiguity is not allowed when writing functions. When \"\n\"taking a closure as an input parameter, the closure's complete type must be \"\n\"annotated using one of a few `traits`, and they're determined by what the \"\n\"closure does with captured value. In order of decreasing restriction, they \"\n\"are:\"\nmsgstr \"\"\n\"Rustはたいていの場合、型アノテーションなしでも変数を捕捉する方法を臨機応変に\"\n\"選択してくれますが、関数を書く場合にはこの曖昧さは許されません。引数のパラ\"\n\"メータとしてクロージャを取る場合、そのクロージャの完全な型はいくつかの\"\n\"`traits`の中の1つを使って明示されなければなりません。どれが使われるかは、捕捉\"\n\"された値でクロージャが何をするかによって決まります。制限の少ない順に並べる\"\n\"と、下記の通りです。\"\n\n#: src/fn/closures/input_parameters.md:10\nmsgid \"`Fn`: the closure uses the captured value by reference (`&T`)\"\nmsgstr \"`Fn`：参照（`&T`）によって捕捉するクロージャ\"\n\n#: src/fn/closures/input_parameters.md:11\nmsgid \"\"\n\"`FnMut`: the closure uses the captured value by mutable reference (`&mut T`)\"\nmsgstr \"`FnMut`：ミュータブルな参照（`&mut T`）によって捕捉するクロージャ\"\n\n#: src/fn/closures/input_parameters.md:12\nmsgid \"`FnOnce`: the closure uses the captured value by value (`T`)\"\nmsgstr \"`FnOnce`：値（`T`）によって捕捉するクロージャ\"\n\n#: src/fn/closures/input_parameters.md:14\nmsgid \"\"\n\"On a variable-by-variable basis, the compiler will capture variables in the \"\n\"least restrictive manner possible.\"\nmsgstr \"\"\n\"変数ごとに、コンパイラは可能な限り制約の少ない方法でその変数を捕捉します。\"\n\n#: src/fn/closures/input_parameters.md:17\nmsgid \"\"\n\"For instance, consider a parameter annotated as `FnOnce`. This specifies \"\n\"that the closure _may_ capture by `&T`, `&mut T`, or `T`, but the compiler \"\n\"will ultimately choose based on how the captured variables are used in the \"\n\"closure.\"\nmsgstr \"\"\n\"例えば、`FnOnce`というアノテーションの付けられたパラメータを考えてみましょ\"\n\"う。これはそのクロージャが`&T`、`&mut T`もしくは`T`の *どれか* で捕捉すること\"\n\"を指定するものですが、コンパイラは捕捉した変数がそのクロージャの中でどのよう\"\n\"に使用されるかに基づき、最終的に捕捉する方法を選択することになります。\"\n\n#: src/fn/closures/input_parameters.md:22\nmsgid \"\"\n\"This is because if a move is possible, then any type of borrow should also \"\n\"be possible. Note that the reverse is not true. If the parameter is \"\n\"annotated as `Fn`, then capturing variables by `&mut T` or `T` are not \"\n\"allowed. However, `&T` is allowed.\"\nmsgstr \"\"\n\"これは、もし移動が可能であれば、いずれの種類の借用であっても同様に可能だから\"\n\"です。その逆は正しくないことに注意してください。パラメータが`Fn`としてアノ\"\n\"テーションされている場合、変数を`&mut T`や`T`で捕捉することは許可されません。\"\n\"しかし`&T`は許可されます。\"\n\n#: src/fn/closures/input_parameters.md:27\nmsgid \"\"\n\"In the following example, try swapping the usage of `Fn`, `FnMut`, and \"\n\"`FnOnce` to see what happens:\"\nmsgstr \"\"\n\"以下の例で、`Fn`、`FnMut`、および`FnOnce`を入れ替えて、何が起こるのかを見てみ\"\n\"ましょう。\"\n\n#: src/fn/closures/input_parameters.md:31\nmsgid \"\"\n\"// A function which takes a closure as an argument and calls it.\\n\"\n\"// <F> denotes that F is a \\\"Generic type parameter\\\"\\n\"\nmsgstr \"\"\n\"// クロージャを引数として取り、クロージャを呼び出す関数。\\n\"\n\"// <F>はFが「ジェネリックな型パラメータ」であることを示します。\\n\"\n\n#: src/fn/closures/input_parameters.md:34\nmsgid \"// The closure takes no input and returns nothing.\\n\"\nmsgstr \"// クロージャには引数も返り値もありません。\\n\"\n\n#: src/fn/closures/input_parameters.md:36\nmsgid \"// ^ TODO: Try changing this to `Fn` or `FnMut`.\\n\"\nmsgstr \"// ^ TODO: ここを`Fn`あるいは`FnMut`に変えてみましょう。\\n\"\n\n#: src/fn/closures/input_parameters.md:40\nmsgid \"// A function which takes a closure and returns an `i32`.\\n\"\nmsgstr \"// クロージャを引数に取り、`i32`を返す関数\\n\"\n\n#: src/fn/closures/input_parameters.md:43\nmsgid \"// The closure takes an `i32` and returns an `i32`.\\n\"\nmsgstr \"// このクロージャは引数、返り値ともに`i32`。\\n\"\n\n#: src/fn/closures/input_parameters.md:53\nmsgid \"\"\n\"// A non-copy type.\\n\"\n\"    // `to_owned` creates owned data from borrowed one\\n\"\nmsgstr \"// コピーではなくmoveが起きる型\\n\"\n\n#: src/fn/closures/input_parameters.md:55\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"goodbye\\\"\"\n\n#: src/fn/closures/input_parameters.md:57\nmsgid \"\"\n\"// Capture 2 variables: `greeting` by reference and\\n\"\n\"    // `farewell` by value.\\n\"\nmsgstr \"\"\n\"// 変数を2つ捕捉。`greeting`は参照を、\\n\"\n\"    // `farewell`は値をそれぞれ捕捉します。\\n\"\n\n#: src/fn/closures/input_parameters.md:60\nmsgid \"// `greeting` is by reference: requires `Fn`.\\n\"\nmsgstr \"// `greeting`は参照なので、`Fn`が必要です。\\n\"\n\n#: src/fn/closures/input_parameters.md:61\nmsgid \"\\\"I said {}.\\\"\"\nmsgstr \"\\\"I said {}.\\\"\"\n\n#: src/fn/closures/input_parameters.md:63\nmsgid \"\"\n\"// Mutation forces `farewell` to be captured by\\n\"\n\"        // mutable reference. Now requires `FnMut`.\\n\"\nmsgstr \"\"\n\"// `farewell`の値を変更するので、この時点で`FnMut`\\n\"\n\"        // が必要になります。\\n\"\n\n#: src/fn/closures/input_parameters.md:65\nmsgid \"\\\"!!!\\\"\"\nmsgstr \"\\\"!!!\\\"\"\n\n#: src/fn/closures/input_parameters.md:66\nmsgid \"\\\"Then I screamed {}.\\\"\"\nmsgstr \"\\\"Then I screamed {}.\\\"\"\n\n#: src/fn/closures/input_parameters.md:67\nmsgid \"\\\"Now I can sleep. zzzzz\\\"\"\nmsgstr \"\\\"Now I can sleep. zzzzz\\\"\"\n\n#: src/fn/closures/input_parameters.md:69\nmsgid \"\"\n\"// Manually calling drop forces `farewell` to\\n\"\n\"        // be captured by value. Now requires `FnOnce`.\\n\"\nmsgstr \"\"\n\"// `mem::drop`を明示的に呼ぶと`farewell`が値で\\n\"\n\"        // 捕捉される必要性が発生します。よって`FnOnce`が必要になります。\\n\"\n\n#: src/fn/closures/input_parameters.md:74\nmsgid \"// Call the function which applies the closure.\\n\"\nmsgstr \"// クロージャを適用する関数を実行。\\n\"\n\n#: src/fn/closures/input_parameters.md:77\nmsgid \"// `double` satisfies `apply_to_3`'s trait bound\\n\"\nmsgstr \"// `double`は`apply_to_3`のトレイト境界を満たす。\\n\"\n\n#: src/fn/closures/input_parameters.md:80\nmsgid \"\\\"3 doubled: {}\\\"\"\nmsgstr \"\\\"3 doubled: {}\\\"\"\n\n#: src/fn/closures/input_parameters.md:86\nmsgid \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html), [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://doc.\"\n\"rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md), \"\n\"[where](../../generics/where.md) and [`FnOnce`](https://doc.rust-lang.org/\"\n\"std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html), [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://doc.\"\n\"rust-lang.org/std/ops/trait.FnMut.html), [ジェネリクス](../../generics.md), \"\n\"[where](../../generics/where.md), [`FnOnce`](https://doc.rust-lang.org/std/\"\n\"ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/anonymity.md:3\nmsgid \"\"\n\"Closures succinctly capture variables from enclosing scopes. Does this have \"\n\"any consequences? It surely does. Observe how using a closure as a function \"\n\"parameter requires [generics](../../generics.md), which is necessary because \"\n\"of how they are defined:\"\nmsgstr \"\"\n\"クロージャが周辺の環境から変数を取得するやり方は非常に明瞭です。何か注意すべ\"\n\"き点はあるのでしょうか？もちろんです。関数内でクロージャを使う場合、[ジェネリ\"\n\"クス](../../generics.md)を使用する必要があります。詳しく見ていきましょう。\"\n\n#: src/fn/closures/anonymity.md:9\nmsgid \"// `F` must be generic.\\n\"\nmsgstr \"// `F` はジェネリック型でなくてはなりません。\\n\"\n\n#: src/fn/closures/anonymity.md:16\nmsgid \"\"\n\"When a closure is defined, the compiler implicitly creates a new anonymous \"\n\"structure to store the captured variables inside, meanwhile implementing the \"\n\"functionality via one of the `traits`: `Fn`, `FnMut`, or `FnOnce` for this \"\n\"unknown type. This type is assigned to the variable which is stored until \"\n\"calling.\"\nmsgstr \"\"\n\"クロージャが定義されると、コンパイラは裏側で、無名の構造体を作り、そこにク\"\n\"ロージャによって使用される外側の変数を入れます。同時に`Fn`、`FnMut`、`FnOnce`\"\n\"という名のトレイトのいずれか一つを介してこの構造体に関数としての機能を実装\"\n\"し、実際に呼び出されるまで待ちます。\"\n\n#: src/fn/closures/anonymity.md:22\nmsgid \"\"\n\"Since this new type is of unknown type, any usage in a function will require \"\n\"generics. However, an unbounded type parameter `<T>` would still be \"\n\"ambiguous and not be allowed. Thus, bounding by one of the `traits`: `Fn`, \"\n\"`FnMut`, or `FnOnce` (which it implements) is sufficient to specify its type.\"\nmsgstr \"\"\n\"この無名構造体は型が未指定なため、関数を実行する際にはジェネリクスが必要とさ\"\n\"れます。とはいえ、`<T>`で指定するだけでは、まだ曖昧です。（訳注：`&self`、\"\n\"`&mut self`、`self`のいずれをとるのかがわからないため）そのため、`Fn`、\"\n\"`FnMut`、`FnOnce`のいずれか一つを実装することで対応しています。\"\n\n#: src/fn/closures/anonymity.md:28\nmsgid \"\"\n\"// `F` must implement `Fn` for a closure which takes no\\n\"\n\"// inputs and returns nothing - exactly what is required\\n\"\n\"// for `print`.\\n\"\nmsgstr \"\"\n\"// `F`は引数と戻り値を持たないクロージャ`Fn`を実装していなくてはなりませ\"\n\"ん。\\n\"\n\"// これはまさに`print`に必要とされるものです。\\n\"\n\n#: src/fn/closures/anonymity.md:39\nmsgid \"\"\n\"// Capture `x` into an anonymous type and implement\\n\"\n\"    // `Fn` for it. Store it in `print`.\\n\"\nmsgstr \"\"\n\"// `x`を無名の構造体に入れ、それに対し`Fn`を実装します。\\n\"\n\"    // （訳注: ここでは`Fn`は`fn Fn(&self) -> {println!(\\\"{}\\\", &self)}`）\\n\"\n\"    // その構造体を`print`に代入します。\\n\"\n\n#: src/fn/closures/anonymity.md:49\nmsgid \"\"\n\"[A thorough analysis](https://huonw.github.io/blog/2015/05/finding-closure-\"\n\"in-rust/), [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[徹底解説](https://huonw.github.io/blog/2015/05/finding-closure-in-rust/), \"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/input_functions.md:3\nmsgid \"\"\n\"Since closures may be used as arguments, you might wonder if the same can be \"\n\"said about functions. And indeed they can! If you declare a function that \"\n\"takes a closure as parameter, then any function that satisfies the trait \"\n\"bound of that closure can be passed as a parameter.\"\nmsgstr \"\"\n\"これまで、クロージャを引数として渡せることを見てきました。すると次の疑問が浮\"\n\"かんできます。「クロージャではない普通の関数を引数として渡すことは可能なのだ\"\n\"ろうか？」可能です！もしパラメータとしてクロージャを取る関数を定義すれば、そ\"\n\"のクロージャのトレイト境界を満たす任意の関数をパラメータとして渡すことができ\"\n\"ます。\"\n\n#: src/fn/closures/input_functions.md:9\nmsgid \"\"\n\"// Define a function which takes a generic `F` argument\\n\"\n\"// bounded by `Fn`, and calls it\\n\"\nmsgstr \"// 関数を引数として取り、即座に実行する関数を定義。\\n\"\n\n#: src/fn/closures/input_functions.md:14\nmsgid \"// Define a wrapper function satisfying the `Fn` bound\\n\"\nmsgstr \"// `Fn`境界を満たすラッパ関数を定義。\\n\"\n\n#: src/fn/closures/input_functions.md:17\nmsgid \"\\\"I'm a function!\\\"\"\nmsgstr \"\\\"I'm a function!\\\"\"\n\n#: src/fn/closures/input_functions.md:21\nmsgid \"// Define a closure satisfying the `Fn` bound\\n\"\nmsgstr \"// `Fn`境界を満たすクロージャを定義。\\n\"\n\n#: src/fn/closures/input_functions.md:22\nmsgid \"\\\"I'm a closure!\\\"\"\nmsgstr \"\\\"I'm a closure!\\\"\"\n\n#: src/fn/closures/input_functions.md:29\nmsgid \"\"\n\"As an additional note, the `Fn`, `FnMut`, and `FnOnce` `traits` dictate how \"\n\"a closure captures variables from the enclosing scope.\"\nmsgstr \"\"\n\"クロージャによる変数の捕捉がどのように行われているかを詳しく見たいときは\"\n\"`Fn`、`FnMut`、`FnOnce`を参照してください。\"\n\n#: src/fn/closures/input_functions.md:34\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/output_parameters.md:3\nmsgid \"\"\n\"Closures as input parameters are possible, so returning closures as output \"\n\"parameters should also be possible. However, anonymous closure types are, by \"\n\"definition, unknown, so we have to use `impl Trait` to return them.\"\nmsgstr \"\"\n\"クロージャを引数のパラメータとして用いることができるのと同様に、クロージャを\"\n\"戻り値として返すことも可能です。しかし無名のクロージャの型はその定義上、不明\"\n\"であるため、クロージャを返すためには`impl Trait`を使用する必要があります。\"\n\n#: src/fn/closures/output_parameters.md:8\nmsgid \"The valid traits for returning a closure are:\"\nmsgstr \"クロージャを返すために有効なトレイトは下記の通りです。\"\n\n#: src/fn/closures/output_parameters.md:10\nmsgid \"`Fn`\"\nmsgstr \"`Fn`\"\n\n#: src/fn/closures/output_parameters.md:11\nmsgid \"`FnMut`\"\nmsgstr \"`FnMut`\"\n\n#: src/fn/closures/output_parameters.md:12\nmsgid \"`FnOnce`\"\nmsgstr \"`FnOnce`\"\n\n#: src/fn/closures/output_parameters.md:14\nmsgid \"\"\n\"Beyond this, the `move` keyword must be used, which signals that all \"\n\"captures occur by value. This is required because any captures by reference \"\n\"would be dropped as soon as the function exited, leaving invalid references \"\n\"in the closure.\"\nmsgstr \"\"\n\"更に、`move`というキーワードを使用し、全ての捕捉が値でおこなわれることを明示\"\n\"しなければなりません。これは、関数を抜けると同時に参照による捕捉がドロップさ\"\n\"れ、無効な参照がクロージャに残ってしまうのを防ぐためです。\"\n\n#: src/fn/closures/output_parameters.md:21\nmsgid \"\\\"Fn\\\"\"\nmsgstr \"\\\"Fn\\\"\"\n\n#: src/fn/closures/output_parameters.md:23\n#: src/fn/closures/output_parameters.md:29\n#: src/fn/closures/output_parameters.md:35\nmsgid \"\\\"This is a: {}\\\"\"\nmsgstr \"\\\"This is a: {}\\\"\"\n\n#: src/fn/closures/output_parameters.md:27\nmsgid \"\\\"FnMut\\\"\"\nmsgstr \"\\\"FnMut\\\"\"\n\n#: src/fn/closures/output_parameters.md:33\nmsgid \"\\\"FnOnce\\\"\"\nmsgstr \"\\\"FnOnce\\\"\"\n\n#: src/fn/closures/output_parameters.md:51\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md) \"\n\"and [impl Trait](../../trait/impl_trait.md).\"\nmsgstr \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [ジェネリクス](../../generics.\"\n\"md), [impl Trait](../../trait/impl_trait.md).\"\n\n#: src/fn/closures/closure_examples.md:3\nmsgid \"\"\n\"This section contains a few examples of using closures from the `std` \"\n\"library.\"\nmsgstr \"\"\n\"この節では`std`ライブラリを用いて、クロージャの利用例を幾つかお見せします。\"\n\n#: src/fn/closures/closure_examples/iter_any.md:3\nmsgid \"\"\n\"`Iterator::any` is a function which when passed an iterator, will return \"\n\"`true` if any element satisfies the predicate. Otherwise `false`. Its \"\n\"signature:\"\nmsgstr \"\"\n\"`iterator::any`は、イテレータ内に一つでも条件を満たす要素があれば、`true`を返\"\n\"し、さもなくば`false`を返すイテレータです。以下がそのシグネチャです\"\n\n#: src/fn/closures/closure_examples/iter_any.md:9\n#: src/fn/closures/closure_examples/iter_find.md:9\nmsgid \"// The type being iterated over.\\n\"\nmsgstr \"// イテレートされる値の型\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:12\nmsgid \"\"\n\"// `any` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\"// `any`は`&mut self`を取るため、イテレータを呼び出した値を借用し\\n\"\n\"    // 変更しますが、消費することはありません。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `Self::Item` states it takes\\n\"\n\"        // arguments to the closure by value.\\n\"\nmsgstr \"\"\n\"// `FnMut`はクロージャによって捕捉される変数が変更される\\n\"\n\"        // 事はあっても消費されることはないということを示します。\\n\"\n\"        // `Self::Item`はクロージャが変数を値として取ることを示します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:27\nmsgid \"// `iter()` for vecs yields `&i32`. Destructure to `i32`.\\n\"\nmsgstr \"\"\n\"// ベクタ型に対する`iter()`は`&i32`を生成するので、`i32`へとデストラクト。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:28\nmsgid \"\\\"2 in vec1: {}\\\"\"\nmsgstr \"\\\"2 in vec1: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:29\nmsgid \"// `into_iter()` for vecs yields `i32`. No destructuring required.\\n\"\nmsgstr \"\"\n\"// `into_iter()`の場合は`i32`を生成するので、デストラクトは必要ありません。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:30\nmsgid \"\\\"2 in vec2: {}\\\"\"\nmsgstr \"\\\"2 in vec2: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:32\nmsgid \"\"\n\"// `iter()` only borrows `vec1` and its elements, so they can be used again\\n\"\nmsgstr \"\"\n\"// `iter()`は`vec1`とその要素を借用するだけなので、再び利用できます。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:33\nmsgid \"\\\"vec1 len: {}\\\"\"\nmsgstr \"\\\"vec1 len: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:34\nmsgid \"\\\"First element of vec1 is: {}\\\"\"\nmsgstr \"\\\"First element of vec1 is: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:35\nmsgid \"\"\n\"// `into_iter()` does move `vec2` and its elements, so they cannot be used \"\n\"again\\n\"\n\"    // println!(\\\"First element of vec2 is: {}\\\", vec2[0]);\\n\"\n\"    // println!(\\\"vec2 len: {}\\\", vec2.len());\\n\"\n\"    // TODO: uncomment two lines above and see compiler errors.\\n\"\nmsgstr \"\"\n\"// `into_iter()`は`vec2`とその要素をムーブするので、再利用できません。\\n\"\n\"    // println!(\\\"First element of vec2 is: {}\\\", vec2[0]);\\n\"\n\"    // println!(\\\"vec2 len: {}\\\", vec2.len());\\n\"\n\"    // TODO: 上の2行をアンコメントしてコンパイルエラーを確認しましょう。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:43\nmsgid \"// `iter()` for arrays yields `&i32`.\\n\"\nmsgstr \"// 配列に対する`iter()`は`&i32`を生成します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:44\nmsgid \"\\\"2 in array1: {}\\\"\"\nmsgstr \"\\\"2 in array1: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:45\nmsgid \"// `into_iter()` for arrays yields `i32`.\\n\"\nmsgstr \"// 配列に`into_iter()`を使うと`&i32`を生成します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:46\nmsgid \"\\\"2 in array2: {}\\\"\"\nmsgstr \"\\\"2 in array2: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:52\nmsgid \"\"\n\"[`std::iter::Iterator::any`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.any)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::any`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.any)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:3\nmsgid \"\"\n\"`Iterator::find` is a function which iterates over an iterator and searches \"\n\"for the first value which satisfies some condition. If none of the values \"\n\"satisfy the condition, it returns `None`. Its signature:\"\nmsgstr \"\"\n\"`Iterator::find`はイテレータを辿る関数で、条件を満たす最初の値を探します。も\"\n\"し条件を満たす値がなければ`None`を返します。型シグネチャは以下のようになりま\"\n\"す。\"\n\n#: src/fn/closures/closure_examples/iter_find.md:12\nmsgid \"\"\n\"// `find` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\"// `find`は`&mut self`を取るため、イテレータを呼び出した値を借用し\\n\"\n\"    // 変更しますが、消費することはありません。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `&Self::Item` states it takes\\n\"\n\"        // arguments to the closure by reference.\\n\"\nmsgstr \"\"\n\"// `FnMut`はクロージャによって捕捉される変数が変更される\\n\"\n\"        // 事はあっても消費されることはないということを示します。\\n\"\n\"        // `&Self::Item`はクロージャが変数を参照として取ることを示します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:27\nmsgid \"// `iter()` for vecs yields `&i32`.\\n\"\nmsgstr \"// ベクタ型に対する`iter`は`&i32`を生成します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:29\nmsgid \"// `into_iter()` for vecs yields `i32`.\\n\"\nmsgstr \"// `inter_iter()`の場合は`i32`を生成します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:32\nmsgid \"\"\n\"// `iter()` for vecs yields `&i32`, and we want to reference one of its\\n\"\n\"    // items, so we have to destructure `&&i32` to `i32`\\n\"\nmsgstr \"\"\n\"// `iter()`は`&i32`を生成し、ここではその参照が必要なので\\n\"\n\"    // `&&i32`を`i32`へとデストラクトします。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:34\nmsgid \"\\\"Find 2 in vec1: {:?}\\\"\"\nmsgstr \"\\\"Find 2 in vec1: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:35\nmsgid \"\"\n\"// `into_iter()` for vecs yields `i32`, and we want to reference one of\\n\"\n\"    // its items, so we have to destructure `&i32` to `i32`\\n\"\nmsgstr \"\"\n\"// `into_iter()`は`i32`を生成し、ここではその参照が必要なので\\n\"\n\"    // `&i32`を`i32`へとデストラクトします。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:37\nmsgid \"\\\"Find 2 in vec2: {:?}\\\"\"\nmsgstr \"\\\"Find 2 in vec2: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:42\nmsgid \"// `iter()` for arrays yields `&&i32`\\n\"\nmsgstr \"// 配列に対する`iter()`も`&i32`を生成します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:43\nmsgid \"\\\"Find 2 in array1: {:?}\\\"\"\nmsgstr \"\\\"Find 2 in array1: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:44\nmsgid \"// `into_iter()` for arrays yields `&i32`\\n\"\nmsgstr \"// 配列に`into_iter()`を使うと`&i32`を生成します。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:45\nmsgid \"\\\"Find 2 in array2: {:?}\\\"\"\nmsgstr \"\\\"Find 2 in array2: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:49\nmsgid \"\"\n\"`Iterator::find` gives you a reference to the item. But if you want the \"\n\"_index_ of the item, use `Iterator::position`.\"\nmsgstr \"\"\n\"`Iterator::find`は要素への参照を返します。要素の _インデックス_ を使用したい\"\n\"場合、`Iterator::position`を使用してください。\"\n\n#: src/fn/closures/closure_examples/iter_find.md:56\nmsgid \"\"\n\"// `iter()` for vecs yields `&i32` and `position()` does not take a \"\n\"reference, so\\n\"\n\"    // we have to destructure `&i32` to `i32`\\n\"\nmsgstr \"\"\n\"// `iter()`は`&i32`を生成しますが`position()`は参照を取らないので\\n\"\n\"    // `&i32`を`i32`へとデストラクトします。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:61\nmsgid \"\"\n\"// `into_iter()` for vecs yields `i32` and `position()` does not take a \"\n\"reference, so\\n\"\n\"    // we do not have to destructure    \\n\"\nmsgstr \"\"\n\"// `into_iter()`は`i32`を生成し、`position()`は参照を取らないので\\n\"\n\"    // `デストラクトする必要はありません。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:70\nmsgid \"\"\n\"[`std::iter::Iterator::find`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.find)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::find`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.find)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:72\nmsgid \"\"\n\"[`std::iter::Iterator::find_map`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.find_map)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::find_map`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.find_map)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:74\nmsgid \"\"\n\"[`std::iter::Iterator::position`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.position)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::position`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.position)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:76\nmsgid \"\"\n\"[`std::iter::Iterator::rposition`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.rposition)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::rposition`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html#method.rposition)\"\n\n#: src/fn/hof.md:3\nmsgid \"\"\n\"Rust provides Higher Order Functions (HOF). These are functions that take \"\n\"one or more functions and/or produce a more useful function. HOFs and lazy \"\n\"iterators give Rust its functional flavor.\"\nmsgstr \"\"\n\"Rustには高階関数（`Higher Order Functions, HOF`）を扱う機能が備わっています。\"\n\n#: src/fn/hof.md:13\nmsgid \"\\\"Find the sum of all the numbers with odd squares under 1000\\\"\"\nmsgstr \"\\\"Find the sum of all the numbers with odd squares under 1000\\\"\"\n\n#: src/fn/hof.md:16\nmsgid \"\"\n\"// Imperative approach\\n\"\n\"    // Declare accumulator variable\\n\"\nmsgstr \"\"\n\"// 宣言型プログラミングによるアプローチ\\n\"\n\"    // 値を蓄積する変数を宣言。\\n\"\n\n#: src/fn/hof.md:19\nmsgid \"// Iterate: 0, 1, 2, ... to infinity\\n\"\nmsgstr \"// 0から無限までイテレートします。\\n\"\n\n#: src/fn/hof.md:21\nmsgid \"// Square the number\\n\"\nmsgstr \"// 値を2乗。\\n\"\n\n#: src/fn/hof.md:25\nmsgid \"// Break loop if exceeded the upper limit\\n\"\nmsgstr \"// 上限に達した場合、ループを終了。\\n\"\n\n#: src/fn/hof.md:28\nmsgid \"// Accumulate value, if it's odd\\n\"\nmsgstr \"// 奇数ならば値を値を足しあわせていきます。\\n\"\n\n#: src/fn/hof.md:32\nmsgid \"\\\"imperative style: {}\\\"\"\nmsgstr \"\\\"imperative style: {}\\\"\"\n\n#: src/fn/hof.md:34\nmsgid \"// Functional approach\\n\"\nmsgstr \"// 関数型プログラミングによるアプローチ\\n\"\n\n#: src/fn/hof.md:36\nmsgid \"// All natural numbers squared\\n\"\nmsgstr \"// 全自然数を2乗し\\n\"\n\n#: src/fn/hof.md:37\nmsgid \"// Below upper limit\\n\"\nmsgstr \"// 上限より小さい値で\\n\"\n\n#: src/fn/hof.md:38\nmsgid \"// That are odd\\n\"\nmsgstr \"// かつ奇数のものを\\n\"\n\n#: src/fn/hof.md:39\nmsgid \"// Sum them\\n\"\nmsgstr \"// 合計します。\\n\"\n\n#: src/fn/hof.md:40\nmsgid \"\\\"functional style: {}\\\"\"\nmsgstr \"\\\"functional style: {}\\\"\"\n\n#: src/fn/hof.md:44\nmsgid \"\"\n\"[Option](https://doc.rust-lang.org/core/option/enum.Option.html) and \"\n\"[Iterator](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"implement their fair share of HOFs.\"\nmsgstr \"\"\n\"[Option](https://doc.rust-lang.org/core/option/enum.Option.html) と [イテレー\"\n\"タ](https://doc.rust-lang.org/core/iter/trait.Iterator.html) には高階関数が使\"\n\"用されています。\"\n\n#: src/fn/diverging.md:3\nmsgid \"\"\n\"Diverging functions never return. They are marked using `!`, which is an \"\n\"empty type.\"\nmsgstr \"\"\n\"発散する関数は決してリターンしない関数です。こうした関数は `!` を使って、空の\"\n\"型であることが示されます。\"\n\n#: src/fn/diverging.md:7 src/fn/diverging.md:35\nmsgid \"\\\"This call never returns.\\\"\"\nmsgstr \"\\\"This call never returns.\\\"\"\n\n#: src/fn/diverging.md:11\nmsgid \"\"\n\"As opposed to all the other types, this one cannot be instantiated, because \"\n\"the set of all possible values this type can have is empty. Note that, it is \"\n\"different from the `()` type, which has exactly one possible value.\"\nmsgstr \"\"\n\"他の全ての型と異なり、この型はインスタンス化できません。この型が持ちうる全て\"\n\"の値の集合は空です。この型は`()`型とは異なることに注意してください。`()`型は\"\n\"値をただ1つだけ持つ型です。\"\n\n#: src/fn/diverging.md:15\nmsgid \"\"\n\"For example, this function returns as usual, although there is no \"\n\"information in the return value.\"\nmsgstr \"\"\n\"例えば、この関数は通常どおりリターンしますが、戻り値には何の情報も含みませ\"\n\"ん。\"\n\n#: src/fn/diverging.md:25\nmsgid \"\\\"This function returns and you can see this line.\\\"\"\nmsgstr \"\\\"This function returns and you can see this line.\\\"\"\n\n#: src/fn/diverging.md:29\nmsgid \"\"\n\"As opposed to this function, which will never return the control back to the \"\n\"caller.\"\nmsgstr \"一方、この関数は呼び出し元に決してリターンしません。\"\n\n#: src/fn/diverging.md:36\nmsgid \"\\\"You will never see this line!\\\"\"\nmsgstr \"\\\"You will never see this line!\\\"\"\n\n#: src/fn/diverging.md:40\nmsgid \"\"\n\"Although this might seem like an abstract concept, it is in fact very useful \"\n\"and often handy. The main advantage of this type is that it can be cast to \"\n\"any other one and therefore used at places where an exact type is required, \"\n\"for instance in `match` branches. This allows us to write code like this:\"\nmsgstr \"\"\n\"これは抽象的な概念に見えるかもしれませんが、実際のところはとても実用的で、便\"\n\"利なことも多いのです。この型の主な利点は、他のどのような型にもキャストできる\"\n\"ことです。そのため、例えば`match`の分岐の中のような正確な型が要求される場所で\"\n\"も使用できます。\"\n\n#: src/fn/diverging.md:50\nmsgid \"\"\n\"// Notice that the return type of this match expression must be u32\\n\"\n\"            // because of the type of the \\\"addition\\\" variable.\\n\"\nmsgstr \"\"\n\"// 変数\\\"addition\\\"の型がu32であるため、\\n\"\n\"            // このmatch式はu32をリターンしなければならないことに注意。\\n\"\n\n#: src/fn/diverging.md:53\nmsgid \"// The \\\"i\\\" variable is of type u32, which is perfectly fine.\\n\"\nmsgstr \"// 変数\\\"i\\\"はu32型であるため、全く問題ありません。\\n\"\n\n#: src/fn/diverging.md:55\nmsgid \"\"\n\"// On the other hand, the \\\"continue\\\" expression does not return\\n\"\n\"                // u32, but it is still fine, because it never returns and \"\n\"therefore\\n\"\n\"                // does not violate the type requirements of the match \"\n\"expression.\\n\"\nmsgstr \"\"\n\"// 一方、\\\"continue\\\"式はu32をリターンしませんが、これでも問題ありません。\\n\"\n\"                // 決してリターンしないため、このmatch式が要求する型に違反し\"\n\"ないからです。\\n\"\n\n#: src/fn/diverging.md:64\nmsgid \"\\\"Sum of odd numbers up to 9 (excluding): {}\\\"\"\nmsgstr \"\\\"Sum of odd numbers up to 9 (excluding): {}\\\"\"\n\n#: src/fn/diverging.md:68\nmsgid \"\"\n\"It is also the return type of functions that loop forever (e.g. `loop {}`) \"\n\"like network servers or functions that terminate the process (e.g. `exit()`).\"\nmsgstr \"\"\n\"この型は、ネットワークサーバのような永遠にループする関数（例：`loop {}`）の戻\"\n\"り値の型や、プロセスを終了させる関数（例：`exit()`）の戻り値の型としても使用\"\n\"されます。\"\n\n#: src/mod.md:3\nmsgid \"\"\n\"Rust provides a powerful module system that can be used to hierarchically \"\n\"split code in logical units (modules), and manage visibility (public/\"\n\"private) between them.\"\nmsgstr \"\"\n\"Rustにはコードを階層的に分割し、お互いの機能を隠蔽・公開するための強力なモ\"\n\"ジュールシステムがあります。\"\n\n#: src/mod.md:7\nmsgid \"\"\n\"A module is a collection of items: functions, structs, traits, `impl` \"\n\"blocks, and even other modules.\"\nmsgstr \"\"\n\"モジュールは関数、構造体、トレイト、`impl`ブロック、さらには他のモジュールな\"\n\"どの要素の集合です。\"\n\n#: src/mod/visibility.md:3\nmsgid \"\"\n\"By default, the items in a module have private visibility, but this can be \"\n\"overridden with the `pub` modifier. Only the public items of a module can be \"\n\"accessed from outside the module scope.\"\nmsgstr \"\"\n\"デフォルトでは、モジュール内の要素はプライベートですが、これは`pub`で修飾する\"\n\"ことでパブリックな属性にすることができます。パブリックな属性のみがモジュール\"\n\"の外のスコープからアクセスできます。\"\n\n#: src/mod/visibility.md:8\nmsgid \"// A module named `my_mod`\\n\"\nmsgstr \"// `my_mod`という名前のモジュール\\n\"\n\n#: src/mod/visibility.md:10\nmsgid \"// Items in modules default to private visibility.\\n\"\nmsgstr \"// モジュール内の要素はデフォルトでプライベート。\\n\"\n\n#: src/mod/visibility.md:12\nmsgid \"\\\"called `my_mod::private_function()`\\\"\"\nmsgstr \"\\\"called `my_mod::private_function()`\\\"\"\n\n#: src/mod/visibility.md:15\nmsgid \"// Use the `pub` modifier to override default visibility.\\n\"\nmsgstr \"// `pub`を用いてパブリックに変更。\\n\"\n\n#: src/mod/visibility.md:17\nmsgid \"\\\"called `my_mod::function()`\\\"\"\nmsgstr \"\\\"called `my_mod::function()`\\\"\"\n\n#: src/mod/visibility.md:20\nmsgid \"\"\n\"// Items can access other items in the same module,\\n\"\n\"    // even when private.\\n\"\nmsgstr \"// モジュール内からならば、プライベートな属性にアクセスできます。\\n\"\n\n#: src/mod/visibility.md:23\nmsgid \"\\\"called `my_mod::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"called `my_mod::indirect_access()`, that\\\\n> \\\"\"\n\n#: src/mod/visibility.md:27\nmsgid \"// Modules can also be nested\\n\"\nmsgstr \"// モジュールもネストできます。\\n\"\n\n#: src/mod/visibility.md:30\nmsgid \"\\\"called `my_mod::nested::function()`\\\"\"\nmsgstr \"\\\"called `my_mod::nested::function()`\\\"\"\n\n#: src/mod/visibility.md:35\nmsgid \"\\\"called `my_mod::nested::private_function()`\\\"\"\nmsgstr \"\\\"called `my_mod::nested::private_function()`\\\"\"\n\n#: src/mod/visibility.md:38\nmsgid \"\"\n\"// Functions declared using `pub(in path)` syntax are only visible\\n\"\n\"        // within the given path. `path` must be a parent or ancestor \"\n\"module\\n\"\nmsgstr \"\"\n\"// `pub(in path)`形式で宣言された関数は該当のパス内でのみアクセスできます。\\n\"\n\"        // `path`は親や先祖のモジュールでなくてはなりません。\\n\"\n\n#: src/mod/visibility.md:41\nmsgid \"\\\"called `my_mod::nested::public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\\\"called `my_mod::nested::public_function_in_my_mod()`, that\\\\n> \\\"\"\n\n#: src/mod/visibility.md:45\nmsgid \"\"\n\"// Functions declared using `pub(self)` syntax are only visible within\\n\"\n\"        // the current module, which is the same as leaving them private\\n\"\nmsgstr \"\"\n\"// `pub(self)`形式で宣言された関数は現在のモジュール内でのみアクセスできま\"\n\"す。\\n\"\n\"        // つまり、プライベートにするのと同じです。\\n\"\n\n#: src/mod/visibility.md:48\nmsgid \"\\\"called `my_mod::nested::public_function_in_nested()`\\\"\"\nmsgstr \"\\\"called `my_mod::nested::public_function_in_nested()`\\\"\"\n\n#: src/mod/visibility.md:51\nmsgid \"\"\n\"// Functions declared using `pub(super)` syntax are only visible within\\n\"\n\"        // the parent module\\n\"\nmsgstr \"\"\n\"// `pub(super)`形式で宣言された関数は親モジュール内でのみアクセスできます。\\n\"\n\n#: src/mod/visibility.md:54\nmsgid \"\\\"called `my_mod::nested::public_function_in_super_mod()`\\\"\"\nmsgstr \"\\\"called `my_mod::nested::public_function_in_super_mod()`\\\"\"\n\n#: src/mod/visibility.md:59\nmsgid \"\\\"called `my_mod::call_public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\\\"called `my_mod::call_public_function_in_my_mod()`, that\\\\n> \\\"\"\n\n#: src/mod/visibility.md:61\nmsgid \"\\\"> \\\"\"\nmsgstr \"\\\"> \\\"\"\n\n#: src/mod/visibility.md:65\nmsgid \"// pub(crate) makes functions visible only within the current crate\\n\"\nmsgstr \"// pub(crate)により関数は現在のクレート内でのみアクセスできます。\\n\"\n\n#: src/mod/visibility.md:67\nmsgid \"\\\"called `my_mod::public_function_in_crate()`\\\"\"\nmsgstr \"\\\"called `my_mod::public_function_in_crate()`\\\"\"\n\n#: src/mod/visibility.md:70\nmsgid \"// Nested modules follow the same rules for visibility\\n\"\nmsgstr \"// ネストしたモジュールも、同様の性質を示します。\\n\"\n\n#: src/mod/visibility.md:74\nmsgid \"\\\"called `my_mod::private_nested::function()`\\\"\"\nmsgstr \"\\\"called `my_mod::private_nested::function()`\\\"\"\n\n#: src/mod/visibility.md:77\nmsgid \"\"\n\"// Private parent items will still restrict the visibility of a child item,\\n\"\n\"        // even if it is declared as visible within a bigger scope.\\n\"\nmsgstr \"\"\n\"// 親がプライベートな場合、子要素がより大きなスコープでアクセスできるように宣\"\n\"言されていても、\\n\"\n\"        // 子要素にアクセス可能な範囲は制限されます。\\n\"\n\n#: src/mod/visibility.md:81\nmsgid \"\\\"called `my_mod::private_nested::restricted_function()`\\\"\"\nmsgstr \"\\\"called `my_mod::private_nested::restricted_function()`\\\"\"\n\n#: src/mod/visibility.md:87 src/mod/use.md:25 src/mod/super.md:8\n#: src/mod/split.md:24\nmsgid \"\\\"called `function()`\\\"\"\nmsgstr \"\\\"called `function()`\\\"\"\n\n#: src/mod/visibility.md:91\nmsgid \"\"\n\"// Modules allow disambiguation between items that have the same name.\\n\"\nmsgstr \"// モジュールによって、同名の関数を区別することができます。\\n\"\n\n#: src/mod/visibility.md:95\nmsgid \"\"\n\"// Public items, including those inside nested modules, can be\\n\"\n\"    // accessed from outside the parent module.\\n\"\nmsgstr \"\"\n\"// パブリックな要素ならば、たとえネストしたものでも、\\n\"\n\"    // モジュールの外からアクセスすることができます。\\n\"\n\n#: src/mod/visibility.md:101\nmsgid \"// pub(crate) items can be called from anywhere in the same crate\\n\"\nmsgstr \"\"\n\"// pub(crate)の要素は同じクレートのどこからでも呼び出すことができます。\\n\"\n\n#: src/mod/visibility.md:104\nmsgid \"\"\n\"// pub(in path) items can only be called from within the module specified\\n\"\n\"    // Error! function `public_function_in_my_mod` is private\\n\"\n\"    //my_mod::nested::public_function_in_my_mod();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// pub(in path)の要素は指定されたモジュールからのみ呼び出すことができます。\\n\"\n\"    // エラー！`public_function_in_my_mod`関数はプライベート。\\n\"\n\"    //my_mod::nested::public_function_in_my_mod();\\n\"\n\"    // TODO ^ 試しにこの行をアンコメントしてみましょう。\\n\"\n\n#: src/mod/visibility.md:109\nmsgid \"\"\n\"// Private items of a module cannot be directly accessed, even if\\n\"\n\"    // nested in a public module:\\n\"\nmsgstr \"\"\n\"// プライベートな要素は、たとえパブリックなモジュール内に存在していても\\n\"\n\"    // 直接アクセスすることはできません。\\n\"\n\n#: src/mod/visibility.md:112\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`private_function`はプライベート。\\n\"\n\"    //my_mod::private_function();\\n\"\n\"    // TODO ^ 試しにこの行をアンコメントしてみましょう。\\n\"\n\n#: src/mod/visibility.md:116\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::nested::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`private_function`はプライベート。\\n\"\n\"    //my_mod::nested::private_function();\\n\"\n\"    // TODO ^ 試しにこの行をアンコメントしてみましょう。\\n\"\n\n#: src/mod/visibility.md:120\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`private_nested`はプライベートなモジュール。\\n\"\n\"    //my_mod::private_nested::function();\\n\"\n\"    // TODO ^ 試しにこの行をアンコメントしてみましょう。\\n\"\n\n#: src/mod/visibility.md:124\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::restricted_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`private_nested`はプライベートなモジュール。\\n\"\n\"    //my_mod::private_nested::restricted_function();\\n\"\n\"    // TODO ^ 試しにこの行をアンコメントしてみましょう。\\n\"\n\n#: src/mod/struct_visibility.md:3\nmsgid \"\"\n\"Structs have an extra level of visibility with their fields. The visibility \"\n\"defaults to private, and can be overridden with the `pub` modifier. This \"\n\"visibility only matters when a struct is accessed from outside the module \"\n\"where it is defined, and has the goal of hiding information (encapsulation).\"\nmsgstr \"\"\n\"構造体はそれ自身に加え、フィールドごとにもパブリック・プライベートを設定する\"\n\"ことができます。デフォルトではプライベートですが、`pub`宣言をすることで、\"\n\"フィールドをパブリックにすることができます。これは、構造体がモジュールの外か\"\n\"ら参照される時に限り意味のあるもので、情報の隠蔽（カプセル化）を達成するため\"\n\"の機能です。\"\n\n#: src/mod/struct_visibility.md:10\nmsgid \"// A public struct with a public field of generic type `T`\\n\"\nmsgstr \"\"\n\"// パブリックなフィールド`T`（ジェネリック型）を持つパブリックな構造体\\n\"\n\n#: src/mod/struct_visibility.md:15\nmsgid \"// A public struct with a private field of generic type `T`\\n\"\nmsgstr \"\"\n\"// プライベートなフィールド`T`（ジェネリック型）を持つパブリックな構造体\\n\"\n\n#: src/mod/struct_visibility.md:21\nmsgid \"// A public constructor method\\n\"\nmsgstr \"// パブリックなコンストラクタメソッドを持つ構造体\\n\"\n\n#: src/mod/struct_visibility.md:31\nmsgid \"// Public structs with public fields can be constructed as usual\\n\"\nmsgstr \"\"\n\"// パブリックなフィールドを持つパブリックな構造体は、通常通り\\n\"\n\"    // インスタンス化できます。\\n\"\n\n#: src/mod/struct_visibility.md:32\nmsgid \"\\\"public information\\\"\"\nmsgstr \"\\\"public information\\\"\"\n\n#: src/mod/struct_visibility.md:34\nmsgid \"// and their fields can be normally accessed.\\n\"\nmsgstr \"// フィールドにも普通にアクセスできます。\\n\"\n\n#: src/mod/struct_visibility.md:35\nmsgid \"\\\"The open box contains: {}\\\"\"\nmsgstr \"\\\"The open box contains: {}\\\"\"\n\n#: src/mod/struct_visibility.md:37\nmsgid \"\"\n\"// Public structs with private fields cannot be constructed using field \"\n\"names.\\n\"\n\"    // Error! `ClosedBox` has private fields\\n\"\n\"    //let closed_box = my::ClosedBox { contents: \\\"classified information\"\n\"\\\" };\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// プライベートなフィールドを持つ構造体は、インスタンス化する際に\\n\"\n\"    // フィールド名を指定することができません。\\n\"\n\"    // エラー！`ClosedBox`にはプライベートなフィールドがあります。\\n\"\n\"    //let closed_box = my::ClosedBox { contents: \\\"classified information\"\n\"\\\" };\\n\"\n\"    // TODO ^ 試しにここをアンコメントしてみましょう。\\n\"\n\n#: src/mod/struct_visibility.md:42\nmsgid \"\"\n\"// However, structs with private fields can be created using\\n\"\n\"    // public constructors\\n\"\nmsgstr \"\"\n\"// そのような場合でも、パブリックなコンストラクタを介して作成\\n\"\n\"    // することはできます。\\n\"\n\n#: src/mod/struct_visibility.md:44\nmsgid \"\\\"classified information\\\"\"\nmsgstr \"\\\"classified information\\\"\"\n\n#: src/mod/struct_visibility.md:46\nmsgid \"\"\n\"// and the private fields of a public struct cannot be accessed.\\n\"\n\"    // Error! The `contents` field is private\\n\"\n\"    //println!(\\\"The closed box contains: {}\\\", _closed_box.contents);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// パブリックな構造体でも、プライベートなフィールドにはアクセスできません。\\n\"\n\"    // エラー！`contents`フィールドはプライベートです。\\n\"\n\"    //println!(\\\"The closed box contains: {}\\\", _closed_box.contents);\\n\"\n\"    // TODO ^ ここをアンコメントしてみましょう。\\n\"\n\n#: src/mod/struct_visibility.md:55\nmsgid \"[generics](../generics.md) and [methods](../fn/methods.md)\"\nmsgstr \"[ジェネリクス](../generics.md), [メソッド](../fn/methods.md)\"\n\n#: src/mod/use.md:3\nmsgid \"\"\n\"The `use` declaration can be used to bind a full path to a new name, for \"\n\"easier access. It is often used like this:\"\nmsgstr \"\"\n\"`use`宣言をすることで、要素の絶対パスを新しい名前に束縛することができ、より簡\"\n\"潔な記述が可能になります。例えば以下のように使えます。\"\n\n#: src/mod/use.md:18\nmsgid \"You can use the `as` keyword to bind imports to a different name:\"\nmsgstr \"\"\n\"`as`キーワードを使用することで、インポートを別名に束縛することができます。\"\n\n#: src/mod/use.md:21\nmsgid \"// Bind the `deeply::nested::function` path to `other_function`.\\n\"\nmsgstr \"// `deeply::nested::function`を`other_function`に束縛\\n\"\n\n#: src/mod/use.md:31\nmsgid \"\\\"called `deeply::nested::function()`\\\"\"\nmsgstr \"\\\"called `deeply::nested::function()`\\\"\"\n\n#: src/mod/use.md:37\nmsgid \"// Easier access to `deeply::nested::function`\\n\"\nmsgstr \"// `deeply::nested::function`へ、より簡潔にアクセス。\\n\"\n\n#: src/mod/use.md:40\nmsgid \"\\\"Entering block\\\"\"\nmsgstr \"\\\"Entering block\\\"\"\n\n#: src/mod/use.md:42\nmsgid \"\"\n\"// This is equivalent to `use deeply::nested::function as function`.\\n\"\n\"        // This `function()` will shadow the outer one.\\n\"\nmsgstr \"\"\n\"// これは`use deeply::nested::function as function`と同等\\n\"\n\"        // この`function()`は外の`function()`をシャドウイングします。\\n\"\n\n#: src/mod/use.md:46\nmsgid \"\"\n\"// `use` bindings have a local scope. In this case, the\\n\"\n\"        // shadowing of `function()` is only in this block.\\n\"\nmsgstr \"\"\n\"// `use`束縛は局所的なスコープを持ちます。\\n\"\n\"        // この場合には`function()`のシャドーイングはこのブロック内のみとなり\"\n\"ます。\\n\"\n\n#: src/mod/use.md:50\nmsgid \"\\\"Leaving block\\\"\"\nmsgstr \"\\\"Leaving block\\\"\"\n\n#: src/mod/super.md:3\nmsgid \"\"\n\"The `super` and `self` keywords can be used in the path to remove ambiguity \"\n\"when accessing items and to prevent unnecessary hardcoding of paths.\"\nmsgstr \"\"\n\"`super`及び`self`キーワードは、要素にアクセスする際に、曖昧さをなくし、不必要\"\n\"なハードコーディングを避けるために使用できます。\"\n\n#: src/mod/super.md:13\nmsgid \"\\\"called `cool::function()`\\\"\"\nmsgstr \"\\\"called `cool::function()`\\\"\"\n\n#: src/mod/super.md:19 src/mod/split.md:49\nmsgid \"\\\"called `my::function()`\\\"\"\nmsgstr \"\\\"called `my::function()`\\\"\"\n\n#: src/mod/super.md:24\nmsgid \"\\\"called `my::cool::function()`\\\"\"\nmsgstr \"\\\"called `my::cool::function()`\\\"\"\n\n#: src/mod/super.md:29\nmsgid \"// Let's access all the functions named `function` from this scope!\\n\"\nmsgstr \"\"\n\"// `function`という名の様々な関数をこのスコープ内から参照してみましょう。\\n\"\n\n#: src/mod/super.md:30\nmsgid \"\\\"called `my::indirect_call()`, that\\\\n> \\\"\"\nmsgstr \"\\\"called `my::indirect_call()`, that\\\\n> \\\"\"\n\n#: src/mod/super.md:32\nmsgid \"\"\n\"// The `self` keyword refers to the current module scope - in this case \"\n\"`my`.\\n\"\n\"        // Calling `self::function()` and calling `function()` directly both \"\n\"give\\n\"\n\"        // the same result, because they refer to the same function.\\n\"\nmsgstr \"\"\n\"// `self`キーワードは現在のモジュールスコープを示します。\\n\"\n\"        // この場合は`my`です。`self::function()`と`funcition()`は\\n\"\n\"        // 同じ関数であるため、同じ結果になります。\\n\"\n\n#: src/mod/super.md:38\nmsgid \"// We can also use `self` to access another module inside `my`:\\n\"\nmsgstr \"\"\n\"// `my`以下の別のモジュールを呼び出す際に\\n\"\n\"        // `self`を用いて明示的に参照できます。\\n\"\n\n#: src/mod/super.md:41\nmsgid \"\"\n\"// The `super` keyword refers to the parent scope (outside the `my` \"\n\"module).\\n\"\nmsgstr \"// `super`は親スコープ（`my`の外側）を参照します。\\n\"\n\n#: src/mod/super.md:44\nmsgid \"\"\n\"// This will bind to the `cool::function` in the *crate* scope.\\n\"\n\"        // In this case the crate scope is the outermost scope.\\n\"\nmsgstr \"\"\n\"// 以下は *クレート* スコープ内の`cool::function`を束縛します。\\n\"\n\"        // この場合、クレートスコープは一番外側のスコープです。\\n\"\n\n#: src/mod/split.md:3\nmsgid \"\"\n\"Modules can be mapped to a file/directory hierarchy. Let's break down the \"\n\"[visibility example](visibility.md) in files:\"\nmsgstr \"\"\n\"モジュールはファイル・ディレクトリの階層構造と対応関係にあります。以下の様な\"\n\"ファイルで[可視性の例](visibility.md)を詳しく見ていきましょう。\"\n\n#: src/mod/split.md:16\nmsgid \"In `split.rs`:\"\nmsgstr \"`split.rs`は以下のようになります。\"\n\n#: src/mod/split.md:19\nmsgid \"\"\n\"// This declaration will look for a file named `my.rs` and will\\n\"\n\"// insert its contents inside a module named `my` under this scope\\n\"\nmsgstr \"\"\n\"// このように宣言すると、`my.rs`という名のファイルを探し、\\n\"\n\"// その内容をこのファイル中で`my`という名から使用することができるようにしま\"\n\"す。\\n\"\n\n#: src/mod/split.md:39\nmsgid \"In `my.rs`:\"\nmsgstr \"`my.rs`は以下のようになります。\"\n\n#: src/mod/split.md:42\nmsgid \"\"\n\"// Similarly `mod inaccessible` and `mod nested` will locate the `nested.\"\n\"rs`\\n\"\n\"// and `inaccessible.rs` files and insert them here under their respective\\n\"\n\"// modules\\n\"\nmsgstr \"\"\n\"// 同様に`mod inaccessible`、`mod nested`によって、`nested.rs`、\"\n\"`inaccessible.rs`\\n\"\n\"// の内容をこの中で使用することができるようになります。\\n\"\n\"// 訳注：`pub`をつけないかぎり、この中でしか使用できません。\\n\"\n\n#: src/mod/split.md:53\nmsgid \"\\\"called `my::private_function()`\\\"\"\nmsgstr \"\\\"called `my::private_function()`\\\"\"\n\n#: src/mod/split.md:57\nmsgid \"\\\"called `my::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"called `my::indirect_access()`, that\\\\n> \\\"\"\n\n#: src/mod/split.md:63\nmsgid \"In `my/nested.rs`:\"\nmsgstr \"`my/nested.rs`は以下のようになります。\"\n\n#: src/mod/split.md:67\nmsgid \"\\\"called `my::nested::function()`\\\"\"\nmsgstr \"\\\"called `my::nested::function()`\\\"\"\n\n#: src/mod/split.md:72\nmsgid \"\\\"called `my::nested::private_function()`\\\"\"\nmsgstr \"\\\"called `my::nested::private_function()`\\\"\"\n\n#: src/mod/split.md:76\nmsgid \"In `my/inaccessible.rs`:\"\nmsgstr \"`my/inaccessible.rs`は以下のようになります。\"\n\n#: src/mod/split.md:81\nmsgid \"\\\"called `my::inaccessible::public_function()`\\\"\"\nmsgstr \"\\\"called `my::inaccessible::public_function()`\\\"\"\n\n#: src/mod/split.md:85\nmsgid \"Let's check that things still work as before:\"\nmsgstr \"では、以前と同じように実行できるか確認しましょう。\"\n\n#: src/crates.md:3\nmsgid \"\"\n\"A crate is a compilation unit in Rust. Whenever `rustc some_file.rs` is \"\n\"called, `some_file.rs` is treated as the _crate file_. If `some_file.rs` has \"\n\"`mod` declarations in it, then the contents of the module files would be \"\n\"inserted in places where `mod` declarations in the crate file are found, \"\n\"_before_ running the compiler over it. In other words, modules do _not_ get \"\n\"compiled individually, only crates get compiled.\"\nmsgstr \"\"\n\"クレートはRustにおけるコンパイルの単位です。`rustc some_file.rs`が呼ばれる\"\n\"と、`some_file.rs`は必ず *クレートファイル* として扱われます。もし`some_file.\"\n\"rs`が`mod`宣言を含んでいるのならば、コンパイルの *前に* 、そのモジュールファ\"\n\"イルの中身が`mod`の位置に挿入されます。言い換えると、それぞれのモジュールが独\"\n\"立にコンパイルされるということはありませんが、それぞれのクレートは互いに独立\"\n\"にコンパイルされるということです。\"\n\n#: src/crates.md:10\nmsgid \"\"\n\"A crate can be compiled into a binary or into a library. By default, `rustc` \"\n\"will produce a binary from a crate. This behavior can be overridden by \"\n\"passing the `--crate-type` flag to `lib`.\"\nmsgstr \"\"\n\"クレートはバイナリあるいはライブラリ形式でコンパイルされることが可能です。デ\"\n\"フォルトでは`rustc`はクレートからバイナリを作り出しますが、この振る舞いは`--\"\n\"crate-type`フラグに`lib`を渡すことでオーバーライドできます。\"\n\n#: src/crates/lib.md:3\nmsgid \"Let's create a library, and then see how to link it to another crate.\"\nmsgstr \"\"\n\"ではライブラリを作成し、それを別のクレートにリンクする方法を見ていきましょ\"\n\"う。\"\n\n#: src/crates/lib.md:5\nmsgid \"In `rary.rs`:\"\nmsgstr \"`rary.rs`は以下のようになります。\"\n\n#: src/crates/lib.md:9 src/attribute/crate.md:19\nmsgid \"\\\"called rary's `public_function()`\\\"\"\nmsgstr \"\\\"called rary's `public_function()`\\\"\"\n\n#: src/crates/lib.md:13 src/attribute/crate.md:23\nmsgid \"\\\"called rary's `private_function()`\\\"\"\nmsgstr \"\\\"called rary's `private_function()`\\\"\"\n\n#: src/crates/lib.md:17 src/attribute/crate.md:27\nmsgid \"\\\"called rary's `indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"called rary's `indirect_access()`, that\\\\n> \\\"\"\n\n#: src/crates/lib.md:29\nmsgid \"\"\n\"Libraries get prefixed with \\\"lib\\\", and by default they get named after \"\n\"their crate file, but this default name can be overridden by passing the `--\"\n\"crate-name` option to `rustc` or by using the [`crate_name` attribute](../\"\n\"attribute/crate.md).\"\nmsgstr \"\"\n\"ライブラリは「lib」が頭につき、デフォルトでは、その後ろに元となったクレート\"\n\"ファイル名をつけます。（訳注: ここでは`lib` + `rary`）この振る舞いは\"\n\"[`crate_name`アトリビュート](../attribute/crate.md)を用いてオーバーライドでき\"\n\"ます。\"\n\n#: src/crates/using_lib.md:3\nmsgid \"\"\n\"To link a crate to this new library you may use `rustc`'s `--extern` flag. \"\n\"All of its items will then be imported under a module named the same as the \"\n\"library. This module generally behaves the same way as any other module.\"\nmsgstr \"\"\n\"クレートをこの新しいライブラリにリンクするには、`rustc`の`--extern`フラグを利\"\n\"用します。クレートの要素を全てライブラリと同じ名前のモジュールにインポートし\"\n\"ます。一般に、このモジュールは他のモジュールと同じように振る舞います。\"\n\n#: src/crates/using_lib.md:8\nmsgid \"\"\n\"// extern crate rary; // May be required for Rust 2015 edition or earlier\\n\"\nmsgstr \"// extern crate rary; // Rust 2015以前で必要。\\n\"\n\n#: src/crates/using_lib.md:13\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //rary::private_function();\\n\"\nmsgstr \"\"\n\"// エラー！`private_function`はプライベート。\\n\"\n\"    //rary::private_function();\\n\"\n\n#: src/cargo.md:3\nmsgid \"\"\n\"`cargo` is the official Rust package management tool. It has lots of really \"\n\"useful features to improve code quality and developer velocity! These include\"\nmsgstr \"\"\n\"`cargo`はRustの公式パッケージ管理ツールです。とても便利な機能が多くあり、コー\"\n\"ドの品質や開発速度の向上に役立ちます。以下はその例です。\"\n\n#: src/cargo.md:6\nmsgid \"\"\n\"Dependency management and integration with [crates.io](https://crates.io) \"\n\"(the official Rust package registry)\"\nmsgstr \"\"\n\"依存関係の管理と[crates.io](https://crates.io)（Rustの公式パッケージレジスト\"\n\"リ）との統合\"\n\n#: src/cargo.md:8\nmsgid \"Awareness of unit tests\"\nmsgstr \"ユニットテスト\"\n\n#: src/cargo.md:9\nmsgid \"Awareness of benchmarks\"\nmsgstr \"ベンチマーク\"\n\n#: src/cargo.md:11\nmsgid \"\"\n\"This chapter will go through some quick basics, but you can find the \"\n\"comprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/).\"\nmsgstr \"\"\n\"この章では、簡単な基本機能を説明します。包括的なドキュメントは[The Cargo \"\n\"Book](https://doc.rust-lang.org/cargo/)を参照してください。\"\n\n#: src/cargo/deps.md:3\nmsgid \"\"\n\"Most programs have dependencies on some libraries. If you have ever managed \"\n\"dependencies by hand, you know how much of a pain this can be. Luckily, the \"\n\"Rust ecosystem comes standard with `cargo`! `cargo` can manage dependencies \"\n\"for a project.\"\nmsgstr \"\"\n\"ほとんどのプログラムはライブラリに依存関係を持ちます。もし依存関係を手動で管\"\n\"理したことがあれば、それがどれだけ苦痛であるか分かるでしょう。幸運なことに、\"\n\"Rustのエコシステムには`cargo`が標準装備されています！`cargo`によってプロジェ\"\n\"クトの依存関係を管理することができます。\"\n\n#: src/cargo/deps.md:8\nmsgid \"To create a new Rust project,\"\nmsgstr \"Rustのプロジェクトを新しく作るには下記のようにします。\"\n\n#: src/cargo/deps.md:11\nmsgid \"# A binary\\n\"\nmsgstr \"# バイナリ\\n\"\n\n#: src/cargo/deps.md:13\nmsgid \"# A library\\n\"\nmsgstr \"# ライブラリ\\n\"\n\n#: src/cargo/deps.md:18\nmsgid \"\"\n\"For the rest of this chapter, let's assume we are making a binary, rather \"\n\"than a library, but all of the concepts are the same.\"\nmsgstr \"\"\n\"この章の残りでは、ライブラリではなくバイナリを作ることを想定しますが、コンセ\"\n\"プトはすべて同じです。\"\n\n#: src/cargo/deps.md:21\nmsgid \"After the above commands, you should see a file hierarchy like this:\"\nmsgstr \"上のコマンドを実行すると、次のようなファイル階層ができます。\"\n\n#: src/cargo/deps.md:35\nmsgid \"\"\n\"The `main.rs` is the root source file for your new `foo` project -- nothing \"\n\"new there. The `Cargo.toml` is the config file for `cargo` for this project. \"\n\"If you look inside it, you should see something like this:\"\nmsgstr \"\"\n\"`main.rs`がこの新規プロジェクト `foo` のルートのソースファイルです。なにも新\"\n\"しいことはありませんね。`Cargo.toml`はこのプロジェクトの`cargo`の設定ファイル\"\n\"です。中を見てみるとこのようになっています。\"\n\n#: src/cargo/deps.md:39\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:48\nmsgid \"\"\n\"The `name` field under `[package]` determines the name of the project. This \"\n\"is used by `crates.io` if you publish the crate (more later). It is also the \"\n\"name of the output binary when you compile.\"\nmsgstr \"\"\n\"`[package]`の下の`name`フィールドがプロジェクトの名前を決定します。これはク\"\n\"レートを公開するときに`crates.io`によって使われます（詳細は後述）。またコンパ\"\n\"イルしたときの出力ファイルの名前でもあります。\"\n\n#: src/cargo/deps.md:52\nmsgid \"\"\n\"The `version` field is a crate version number using [Semantic Versioning]\"\n\"(http://semver.org/).\"\nmsgstr \"\"\n\"`version`フィールドはクレートのバージョン番号で、[セマンティックバージョニン\"\n\"グ](http://semver.org/)を使っています。\"\n\n#: src/cargo/deps.md:55\nmsgid \"\"\n\"The `authors` field is a list of authors used when publishing the crate.\"\nmsgstr \"\"\n\"`authors`フィールドは作者のリストで、クレートを公開するときに使われます。\"\n\n#: src/cargo/deps.md:57\nmsgid \"\"\n\"The `[dependencies]` section lets you add dependencies for your project.\"\nmsgstr \"`[dependencies]`セクションにはプロジェクトの依存関係を追加できます。\"\n\n#: src/cargo/deps.md:59\nmsgid \"\"\n\"For example, suppose that we want our program to have a great CLI. You can \"\n\"find lots of great packages on [crates.io](https://crates.io) (the official \"\n\"Rust package registry). One popular choice is [clap](https://crates.io/\"\n\"crates/clap). As of this writing, the most recent published version of \"\n\"`clap` is `2.27.1`. To add a dependency to our program, we can simply add \"\n\"the following to our `Cargo.toml` under `[dependencies]`: `clap = \"\n\"\\\"2.27.1\\\"`. And that's it! You can start using `clap` in your program.\"\nmsgstr \"\"\n\"例えば、プログラムに素晴らしいCLIが欲しいとします。[crates.io](https://\"\n\"crates.io)（Rustの公式パッケージレジストリ）には素晴らしいパッケージがたくさ\"\n\"んあります。よくある選択肢の1つは[clap](https://crates.io/crates/clap)です。\"\n\"この記事を書いている時点での`clap`の最新の公開バージョンは`2.27.1`です。依存\"\n\"関係をプログラムに追加するには、`Cargo.toml`の`[dependencies]`の下に`clap = \"\n\"\\\"2.27.1\\\"`と単に書き加えます。これだけです！`clap`をプログラム内で使用できま\"\n\"す。\"\n\n#: src/cargo/deps.md:67\nmsgid \"\"\n\"`cargo` also supports [other types of dependencies](https://doc.rust-lang.\"\n\"org/cargo/reference/specifying-dependencies.html). Here is just a small \"\n\"sampling:\"\nmsgstr \"\"\n\"`cargo`は[他の形式の依存関係](https://doc.rust-lang.org/cargo/reference/\"\n\"specifying-dependencies.html)もサポートしています。その一部を示します。\"\n\n#: src/cargo/deps.md:70\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"clap = \\\"2.27.1\\\" # from crates.io\\n\"\n\"rand = { git = \\\"https://github.com/rust-lang-nursery/rand\\\" } # from online \"\n\"repo\\n\"\n\"bar = { path = \\\"../bar\\\" } # from a path in the local filesystem\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/cargo/deps.md:82\nmsgid \"\"\n\"`cargo` is more than a dependency manager. All of the available \"\n\"configuration options are listed in the [format specification](https://doc.\"\n\"rust-lang.org/cargo/reference/manifest.html) of `Cargo.toml`.\"\nmsgstr \"\"\n\"`cargo`は依存管理ツール以上のこともできます。`Cargo.toml`の[format \"\n\"specification](https://doc.rust-lang.org/cargo/reference/manifest.html)に全て\"\n\"の設定オプションがリストアップされています。\"\n\n#: src/cargo/deps.md:86\nmsgid \"\"\n\"To build our project we can execute `cargo build` anywhere in the project \"\n\"directory (including subdirectories!). We can also do `cargo run` to build \"\n\"and run. Notice that these commands will resolve all dependencies, download \"\n\"crates if needed, and build everything, including your crate. (Note that it \"\n\"only rebuilds what it has not already built, similar to `make`).\"\nmsgstr \"\"\n\"プロジェクトをビルドするには、プロジェクトディレクトリのどこか（サブディレク\"\n\"トでも！）で`cargo build`を実行します。また`cargo run`でビルドと実行をできま\"\n\"す。これらのコマンドは、全ての依存関係の解決、必要なクレートのダウンロード、\"\n\"自分のクレートを含む全てのビルドを行うことに注意してください。（`make`と同\"\n\"様、まだビルドしていないものだけをビルドします。）\"\n\n#: src/cargo/deps.md:92\nmsgid \"Voila! That's all there is to it!\"\nmsgstr \"Voila！これで完成です！\"\n\n#: src/cargo/conventions.md:3\nmsgid \"In the previous chapter, we saw the following directory hierarchy:\"\nmsgstr \"前の章ではこのようなディレクトリ階層がありました。\"\n\n#: src/cargo/conventions.md:12\nmsgid \"\"\n\"Suppose that we wanted to have two binaries in the same project, though. \"\n\"What then?\"\nmsgstr \"しかし同じプロジェクトで2つのバイナリが欲しいとします。その場合は？\"\n\n#: src/cargo/conventions.md:15\nmsgid \"\"\n\"It turns out that `cargo` supports this. The default binary name is `main`, \"\n\"as we saw before, but you can add additional binaries by placing them in a \"\n\"`bin/` directory:\"\nmsgstr \"\"\n\"`cargo`はこれもサポートしています。以前見た通りデフォルトのバイナリ名は`main`\"\n\"ですが、`bin/`ディレクトリに置くことで他のバイナリを追加できます。\"\n\n#: src/cargo/conventions.md:28\nmsgid \"\"\n\"To tell `cargo` to only compile or run this binary, we just pass `cargo` the \"\n\"`--bin my_other_bin` flag, where `my_other_bin` is the name of the binary we \"\n\"want to work with.\"\nmsgstr \"\"\n\"このバイナリだけをコンパイルや実行するように`cargo`に伝えるには、`cargo`に`--\"\n\"bin my_other_bin`フラグを渡します。ここでは`my_other_bin`が対象のバイナリの名\"\n\"前です。\"\n\n#: src/cargo/conventions.md:32\nmsgid \"\"\n\"In addition to extra binaries, `cargo` supports [more features](https://doc.\"\n\"rust-lang.org/cargo/guide/project-layout.html) such as benchmarks, tests, \"\n\"and examples.\"\nmsgstr \"\"\n\"バイナリの追加に加えて、`cargo`はベンチマークやテスト、サンプルなどの[その他\"\n\"の機能](https://doc.rust-lang.org/cargo/guide/project-layout.html)もサポート\"\n\"しています。\"\n\n#: src/cargo/conventions.md:35\nmsgid \"In the next chapter, we will look more closely at tests.\"\nmsgstr \"次の章ではテストについてより詳しく見ていきます。\"\n\n#: src/cargo/test.md:3\nmsgid \"\"\n\"As we know testing is integral to any piece of software! Rust has first-\"\n\"class support for unit and integration testing ([see this chapter](https://\"\n\"doc.rust-lang.org/book/ch11-00-testing.html) in TRPL).\"\nmsgstr \"\"\n\"知っての通り、テストはどんなソフトウェアにも不可欠です！Rustはユニットテスト\"\n\"と統合テストを第一級にサポートしています（TRPLの[この章を参照してください]\"\n\"(https://doc.rust-lang.org/book/ch11-00-testing.html)）。\"\n\n#: src/cargo/test.md:8\nmsgid \"\"\n\"From the testing chapters linked above, we see how to write unit tests and \"\n\"integration tests. Organizationally, we can place unit tests in the modules \"\n\"they test and integration tests in their own `tests/` directory:\"\nmsgstr \"\"\n\"上のリンク先のテストの章では、ユニットテストと統合テストの書き方を紹介してい\"\n\"ます。ユニットテストはテスト対象のモジュール内に、統合テストは`tests/`ディレ\"\n\"クトリ内に置きます。\"\n\n#: src/cargo/test.md:23\nmsgid \"\"\n\"Each file in `tests` is a separate [integration test](https://doc.rust-lang.\"\n\"org/book/ch11-03-test-organization.html#integration-tests), i.e. a test that \"\n\"is meant to test your library as if it were being called from a dependent \"\n\"crate.\"\nmsgstr \"\"\n\"`tests`内の各ファイルは個別の[統合テスト](https://doc.rust-lang.org/book/\"\n\"ch11-03-test-organization.html#integration-tests)です。これはライブラリを依存\"\n\"クレートから呼ばれたかのようにテストできます。\"\n\n#: src/cargo/test.md:28\nmsgid \"\"\n\"The [Testing](../testing.md) chapter elaborates on the three different \"\n\"testing styles: [Unit](../testing/unit_testing.md), [Doc](../testing/\"\n\"doc_testing.md), and [Integration](../testing/integration_testing.md).\"\nmsgstr \"\"\n\"[テスト](../testing.md)の章は3つの異なるテストスタイルについて解説していま\"\n\"す。[単体テスト](../testing/unit_testing.md)、[ドキュメンテーションテスト]\"\n\"(../testing/doc_testing.md)、そして[結合テスト](../testing/\"\n\"integration_testing.md)です。\"\n\n#: src/cargo/test.md:31\nmsgid \"`cargo` naturally provides an easy way to run all of your tests!\"\nmsgstr \"`cargo`は、全てのテストを簡単に実行する方法を提供します。\"\n\n#: src/cargo/test.md:37\nmsgid \"You should see output like this:\"\nmsgstr \"出力はこのようになります。\"\n\n#: src/cargo/test.md:39\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\n\n#: src/cargo/test.md:54\nmsgid \"You can also run tests whose name matches a pattern:\"\nmsgstr \"パターンにマッチする名前のテストを実行することもできます。\"\n\n#: src/cargo/test.md:60\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\n\n#: src/cargo/test.md:73\nmsgid \"\"\n\"One word of caution: Cargo may run multiple tests concurrently, so make sure \"\n\"that they don't race with each other.\"\nmsgstr \"\"\n\"注意：Cargoは複数のテストを並列で実行することがありますので、それらが互いに競\"\n\"合しないようにしてください。\"\n\n#: src/cargo/test.md:76\nmsgid \"\"\n\"One example of this concurrency causing issues is if two tests output to a \"\n\"file, such as below:\"\nmsgstr \"\"\n\"並行性が問題を引き起こす一例として、以下のように、2つのテストが1つのファイル\"\n\"に出力するケースがあります。\"\n\n#: src/cargo/test.md:82\nmsgid \"// Import the necessary modules\\n\"\nmsgstr \"// 必要なモジュールをインポートします。\\n\"\n\n#: src/cargo/test.md:86\nmsgid \"// This test writes to a file\\n\"\nmsgstr \"// ファイルに書き込むテスト\\n\"\n\n#: src/cargo/test.md:89 src/cargo/test.md:106\nmsgid \"// Opens the file ferris.txt or creates one if it doesn't exist.\\n\"\nmsgstr \"// ferris.txtというファイルを開くか、存在しない場合は作成します。\\n\"\n\n#: src/cargo/test.md:93 src/cargo/test.md:110\nmsgid \"\\\"ferris.txt\\\"\"\nmsgstr \"\\\"ferris.txt\\\"\"\n\n#: src/cargo/test.md:94 src/cargo/test.md:111\nmsgid \"\\\"Failed to open ferris.txt\\\"\"\nmsgstr \"\\\"Failed to open ferris.txt\\\"\"\n\n#: src/cargo/test.md:96\nmsgid \"// Print \\\"Ferris\\\" 5 times.\\n\"\nmsgstr \"// \\\"Ferris\\\"と5回書き込みます。\\n\"\n\n#: src/cargo/test.md:98\nmsgid \"\\\"Ferris\\\\n\\\"\"\nmsgstr \"\\\"Ferris\\\\n\\\"\"\n\n#: src/cargo/test.md:99 src/cargo/test.md:116\nmsgid \"\\\"Could not write to ferris.txt\\\"\"\nmsgstr \"\\\"Could not write to ferris.txt\\\"\"\n\n#: src/cargo/test.md:103\nmsgid \"// This test tries to write to the same file\\n\"\nmsgstr \"// 同じファイルに書き込むテスト\\n\"\n\n#: src/cargo/test.md:113\nmsgid \"// Print \\\"Corro\\\" 5 times.\\n\"\nmsgstr \"// \\\"Corro\\\"と5回書き込みます。\\n\"\n\n#: src/cargo/test.md:115\nmsgid \"\\\"Corro\\\\n\\\"\"\nmsgstr \"\\\"Corro\\\\n\\\"\"\n\n#: src/cargo/test.md:122\nmsgid \"Although the intent is to get the following:\"\nmsgstr \"以下のような結果を得ようと意図しています。\"\n\n#: src/cargo/test.md:136\nmsgid \"What actually gets put into `ferris.txt` is this:\"\nmsgstr \"しかし、実際に`ferris.txt`に出力されるのは、以下の通りです。\"\n\n#: src/cargo/build_scripts.md:3\nmsgid \"\"\n\"Sometimes a normal build from `cargo` is not enough. Perhaps your crate \"\n\"needs some pre-requisites before `cargo` will successfully compile, things \"\n\"like code generation, or some native code that needs to be compiled. To \"\n\"solve this problem we have build scripts that Cargo can run.\"\nmsgstr \"\"\n\"`cargo`による通常のビルドでは十分でないことが時々あります。コード生成や、コン\"\n\"パイルが必要なネイティブコードなど、`cargo`がクレートをうまくコンパイルするに\"\n\"はなんらかの前提条件が必要かもしれません。この問題を解決するため、Cargoが実行\"\n\"できるビルドスクリプトがあります。\"\n\n#: src/cargo/build_scripts.md:8\nmsgid \"\"\n\"To add a build script to your package it can either be specified in the \"\n\"`Cargo.toml` as follows:\"\nmsgstr \"\"\n\"ビルドスクリプトをパッケージに追加するには、以下のように`Cargo.toml`の中で指\"\n\"定できます。\"\n\n#: src/cargo/build_scripts.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\n\n#: src/cargo/build_scripts.md:17\nmsgid \"\"\n\"Otherwise Cargo will look for a `build.rs` file in the project directory by \"\n\"default.\"\nmsgstr \"\"\n\"それ以外の場合、Cargoはデフォルトでプロジェクトディレクトリから`build.rs`を探\"\n\"します。\"\n\n#: src/cargo/build_scripts.md:20\nmsgid \"How to use a build script\"\nmsgstr \"ビルドスクリプトの使い方\"\n\n#: src/cargo/build_scripts.md:22\nmsgid \"\"\n\"The build script is simply another Rust file that will be compiled and \"\n\"invoked prior to compiling anything else in the package. Hence it can be \"\n\"used to fulfill pre-requisites of your crate.\"\nmsgstr \"\"\n\"ビルドスクリプトは単にRustのファイルの1つで、パッケージ内の他のファイルをコン\"\n\"パイルする前にコンパイルされて起動されます。そのため、クレートの前提条件を満\"\n\"たすために使用できます。\"\n\n#: src/cargo/build_scripts.md:26\nmsgid \"\"\n\"Cargo provides the script with inputs via environment variables [specified \"\n\"here](https://doc.rust-lang.org/cargo/reference/environment-variables.\"\n\"html#environment-variables-cargo-sets-for-build-scripts) that can be used.\"\nmsgstr \"\"\n\"Cargoは、[ここで指定された](https://doc.rust-lang.org/cargo/reference/\"\n\"environment-variables.html#environment-variables-cargo-sets-for-build-\"\n\"scripts)環境変数を介してスクリプトに入力を与えます。\"\n\n#: src/cargo/build_scripts.md:29\nmsgid \"\"\n\"The script provides output via stdout. All lines printed are written to \"\n\"`target/debug/build/<pkg>/output`. Further, lines prefixed with `cargo:` \"\n\"will be interpreted by Cargo directly and hence can be used to define \"\n\"parameters for the package's compilation.\"\nmsgstr \"\"\n\"スクリプトは標準出力に出力します。出力される行は全て、`target/debug/build/\"\n\"<pkg>/output`に書き込まれます。さらに、行頭に`cargo:`がついた行はCargoに直接\"\n\"解釈されるため、パッケージのコンパイル時のパラメーターを定義するのに使用でき\"\n\"ます。\"\n\n#: src/cargo/build_scripts.md:34\nmsgid \"\"\n\"For further specification and examples have a read of the [Cargo \"\n\"specification](https://doc.rust-lang.org/cargo/reference/build-scripts.html).\"\nmsgstr \"\"\n\"より詳細な仕様や例については、[Cargo specification](https://doc.rust-lang.\"\n\"org/cargo/reference/build-scripts.html)を参照してください。\"\n\n#: src/attribute.md:3\nmsgid \"\"\n\"An attribute is metadata applied to some module, crate or item. This \"\n\"metadata can be used to/for:\"\nmsgstr \"\"\n\"アトリビュートはモジュール、クレート、要素に対するメタデータです。以下がその\"\n\"使用目的です。\"\n\n#: src/attribute.md:8\nmsgid \"[conditional compilation of code](attribute/cfg.md)\"\nmsgstr \"[コンパイル時の条件分岐](attribute/cfg.md)\"\n\n#: src/attribute.md:9\nmsgid \"\"\n\"[set crate name, version and type (binary or library)](attribute/crate.md)\"\nmsgstr \"\"\n\"[クレート名、バージョン、種類（バイナリか、ライブラリか）の設定](attribute/\"\n\"crate.md)\"\n\n#: src/attribute.md:10\nmsgid \"\"\n\"disable [lints](https://en.wikipedia.org/wiki/Lint_%28software%29) (warnings)\"\nmsgstr \"[リント](https://en.wikipedia.org/wiki/Lint_%28software%29)の無効化\"\n\n#: src/attribute.md:11\nmsgid \"enable compiler features (macros, glob imports, etc.)\"\nmsgstr \"コンパイラ付属の機能（マクロ、グロブ、インポートなど）の使用\"\n\n#: src/attribute.md:12\nmsgid \"link to a foreign library\"\nmsgstr \"外部ライブラリへのリンク\"\n\n#: src/attribute.md:13\nmsgid \"mark functions as unit tests\"\nmsgstr \"ユニットテスト用の関数を明示\"\n\n#: src/attribute.md:14\nmsgid \"mark functions that will be part of a benchmark\"\nmsgstr \"ベンチマーク用の関数を明示\"\n\n#: src/attribute.md:15\nmsgid \"\"\n\"[attribute like macros](https://doc.rust-lang.org/book/ch19-06-macros.\"\n\"html#attribute-like-macros)\"\nmsgstr \"\"\n\"[アトリビュートマクロ](https://doc.rust-lang.org/book/ch19-06-macros.\"\n\"html#attribute-like-macros)\"\n\n#: src/attribute.md:17\nmsgid \"\"\n\"Attributes look like `#[outer_attribute]` or `#![inner_attribute]`, with the \"\n\"difference between them being where they apply.\"\nmsgstr \"\"\n\n#: src/attribute.md:20\nmsgid \"\"\n\"`#[outer_attribute]` applies to the [item](https://doc.rust-lang.org/stable/\"\n\"reference/items.html) immediately following it. Some examples of items are: \"\n\"a function, a module declaration, a constant, a structure, an enum. Here is \"\n\"an example where attribute `#[derive(Debug)]` applies to the struct \"\n\"`Rectangle`:\"\nmsgstr \"\"\n\n#: src/attribute.md:33\nmsgid \"\"\n\"`#![inner_attribute]` applies to the enclosing [item](https://doc.rust-lang.\"\n\"org/stable/reference/items.html) (typically a module or a crate). In other \"\n\"words, this attribute is interpreted as applying to the entire scope in \"\n\"which it's placed. Here is an example where `#![allow(unused_variables)]` \"\n\"applies to the whole crate (if placed in `main.rs`):\"\nmsgstr \"\"\n\n#: src/attribute.md:42\nmsgid \"// This would normally warn about an unused variable.\\n\"\nmsgstr \"\"\n\n#: src/attribute.md:46\nmsgid \"Attributes can take arguments with different syntaxes:\"\nmsgstr \"アトリビュートは以下の様な書き方で引数を取ることができます。\"\n\n#: src/attribute.md:48\nmsgid \"`#[attribute = \\\"value\\\"]`\"\nmsgstr \"`#[attribute = \\\"value\\\"]`\"\n\n#: src/attribute.md:49\nmsgid \"`#[attribute(key = \\\"value\\\")]`\"\nmsgstr \"`#[attribute(key = \\\"value\\\")]`\"\n\n#: src/attribute.md:50\nmsgid \"`#[attribute(value)]`\"\nmsgstr \"`#[attribute(value)]`\"\n\n#: src/attribute.md:52\nmsgid \"\"\n\"Attributes can have multiple values and can be separated over multiple \"\n\"lines, too:\"\nmsgstr \"\"\n\"アトリビュートは複数の値を取ることができ、複数の行に分割することもできます。\"\n\n#: src/attribute/unused.md:3\nmsgid \"\"\n\"The compiler provides a `dead_code` [_lint_](https://en.wikipedia.org/wiki/\"\n\"Lint_%28software%29) that will warn about unused functions. An _attribute_ \"\n\"can be used to disable the lint.\"\nmsgstr \"\"\n\"コンパイラは`dead_code`と呼ばれる[リント](https://en.wikipedia.org/wiki/Lint_\"\n\"%28software%29)機能を持つため、使用されていない関数が存在するときに警告を出し\"\n\"ます。*アトリビュート* によってこの機能を無効化することができます。\"\n\n#: src/attribute/unused.md:9\nmsgid \"\"\n\"// `#[allow(dead_code)]` is an attribute that disables the `dead_code` lint\\n\"\nmsgstr \"\"\n\"/ `#[allow(dead_code)]`は`dead_code`リントを抑制するアトリビュートです。\\n\"\n\n#: src/attribute/unused.md:14\nmsgid \"// FIXME ^ Add an attribute to suppress the warning\\n\"\nmsgstr \"// FIXME ^ 警告を抑制するアトリビュートを追加しましょう。\\n\"\n\n#: src/attribute/unused.md:22\nmsgid \"\"\n\"Note that in real programs, you should eliminate dead code. In these \"\n\"examples we'll allow dead code in some places because of the interactive \"\n\"nature of the examples.\"\nmsgstr \"\"\n\"実際のコード中では、使用されていないコードが有る場合はそれを除外するべきで\"\n\"す。この文書中では随所でアトリビュートによって警告を抑制していますが、それは\"\n\"あくまでインタラクティブな例を皆さんに提供するためです。\"\n\n#: src/attribute/crate.md:3\nmsgid \"\"\n\"The `crate_type` attribute can be used to tell the compiler whether a crate \"\n\"is a binary or a library (and even which type of library), and the \"\n\"`crate_name` attribute can be used to set the name of the crate.\"\nmsgstr \"\"\n\"`crate_type`アトリビュートは、そのクレートがライブラリ、バイナリのいずれにコ\"\n\"ンパイルされるべきかをコンパイラに伝えるために使用します。ライブラリの場合\"\n\"は、どのタイプのライブラリであるかも伝えることができます。`crate_name`はク\"\n\"レートの名前を決定するのに使用します。\"\n\n#: src/attribute/crate.md:7\nmsgid \"\"\n\"However, it is important to note that both the `crate_type` and `crate_name` \"\n\"attributes have **no** effect whatsoever when using Cargo, the Rust package \"\n\"manager. Since Cargo is used for the majority of Rust projects, this means \"\n\"real-world uses of `crate_type` and `crate_name` are relatively limited.\"\nmsgstr \"\"\n\"しかし、`crate_type`アトリビュートも`crate_name`アトリビュートも、Rustのパッ\"\n\"ケージマネージャCargoを利用している場合は**何の**影響もないと知っておくことは\"\n\"重要です。Cargoは大半のRustプロジェクトで利用されており、実世界での\"\n\"`crate_type`と`crate_name`の利用は比較的限られています。\"\n\n#: src/attribute/crate.md:13\nmsgid \"// This crate is a library\\n\"\nmsgstr \"// このクレートはライブラリです。\\n\"\n\n#: src/attribute/crate.md:14\nmsgid \"\\\"lib\\\"\"\nmsgstr \"\\\"lib\\\"\"\n\n#: src/attribute/crate.md:14\nmsgid \"// The library is named \\\"rary\\\"\\n\"\nmsgstr \"// このライブラリの名前は「rary」です。\\n\"\n\n#: src/attribute/crate.md:16\nmsgid \"\\\"rary\\\"\"\nmsgstr \"\\\"rary\\\"\"\n\n#: src/attribute/crate.md:33\nmsgid \"\"\n\"When the `crate_type` attribute is used, we no longer need to pass the `--\"\n\"crate-type` flag to `rustc`.\"\nmsgstr \"\"\n\"`crate_type`アトリビュートが使用されているときは、`rustc`に`--crate-type`フラ\"\n\"グを伝える必要はありません。\"\n\n#: src/attribute/cfg.md:3\nmsgid \"\"\n\"Configuration conditional checks are possible through two different \"\n\"operators:\"\nmsgstr \"環境に応じたコンパイルをするには2種類の方法があります。\"\n\n#: src/attribute/cfg.md:5\nmsgid \"the `cfg` attribute: `#[cfg(...)]` in attribute position\"\nmsgstr \"`cfg`アトリビュート：`#[cfg(...)]`をアトリビュートとして使用する。\"\n\n#: src/attribute/cfg.md:6\nmsgid \"the `cfg!` macro: `cfg!(...)` in boolean expressions\"\nmsgstr \"`cfg!`マクロ：`cfg!(...)`をブーリアンとして評価する。\"\n\n#: src/attribute/cfg.md:8\nmsgid \"\"\n\"While the former enables conditional compilation, the latter conditionally \"\n\"evaluates to `true` or `false` literals allowing for checks at run-time. \"\n\"Both utilize identical argument syntax.\"\nmsgstr \"\"\n\"前者は条件付きコンパイルを行いますが、後者は`true`または`false`リテラルに評価\"\n\"され実行時にチェックすることが可能です。いずれの場合も適切なシンタックスで記\"\n\"述する必要があります。\"\n\n#: src/attribute/cfg.md:12\nmsgid \"\"\n\"`cfg!`, unlike `#[cfg]`, does not remove any code and only evaluates to true \"\n\"or false. For example, all blocks in an if/else expression need to be valid \"\n\"when `cfg!` is used for the condition, regardless of what `cfg!` is \"\n\"evaluating.\"\nmsgstr \"\"\n\"`#[cfg]`と異なり、`cfg!`はコードを削除せず、trueまたはfalseに評価されるだけで\"\n\"す。例えば、`cfg!`が何を評価しているかに関係なく、`cfg!`が条件に利用されると\"\n\"き、if/else式の中のすべてのブロックが有効でなくてはなりません。\"\n\n#: src/attribute/cfg.md:15\nmsgid \"// This function only gets compiled if the target OS is linux\\n\"\nmsgstr \"// この関数はターゲットOSがLinuxの時のみコンパイルされます。\\n\"\n\n#: src/attribute/cfg.md:16 src/attribute/cfg.md:22 src/attribute/cfg.md:31\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\\\"linux\\\"\"\n\n#: src/attribute/cfg.md:18\nmsgid \"\\\"You are running linux!\\\"\"\nmsgstr \"\\\"You are running linux!\\\"\"\n\n#: src/attribute/cfg.md:20\nmsgid \"\"\n\"// And this function only gets compiled if the target OS is *not* linux\\n\"\nmsgstr \"\"\n\"// そしてこの関数はターゲットOSがLinux *ではない* ときのみコンパイルされま\"\n\"す。\\n\"\n\n#: src/attribute/cfg.md:24\nmsgid \"\\\"You are *not* running linux!\\\"\"\nmsgstr \"\\\"You are *not* running linux!\\\"\"\n\n#: src/attribute/cfg.md:30\nmsgid \"\\\"Are you sure?\\\"\"\nmsgstr \"\\\"Are you sure?\\\"\"\n\n#: src/attribute/cfg.md:32\nmsgid \"\\\"Yes. It's definitely linux!\\\"\"\nmsgstr \"\\\"Yes. It's definitely linux!\\\"\"\n\n#: src/attribute/cfg.md:34\nmsgid \"\\\"Yes. It's definitely *not* linux!\\\"\"\nmsgstr \"\\\"Yes. It's definitely *not* linux!\\\"\"\n\n#: src/attribute/cfg.md:41\nmsgid \"\"\n\"[the reference](https://doc.rust-lang.org/reference/attributes.\"\n\"html#conditional-compilation), [`cfg!`](https://doc.rust-lang.org/std/macro.\"\n\"cfg!.html), and [macros](../macros.md).\"\nmsgstr \"\"\n\"[リファレンス](https://doc.rust-lang.org/reference/attributes.\"\n\"html#conditional-compilation), [`cfg!`](https://doc.rust-lang.org/std/macro.\"\n\"cfg!.html), [マクロ](../macros.md).\"\n\n#: src/attribute/cfg/custom.md:3\nmsgid \"\"\n\"Some conditionals like `target_os` are implicitly provided by `rustc`, but \"\n\"custom conditionals must be passed to `rustc` using the `--cfg` flag.\"\nmsgstr \"\"\n\"`target_os`のように、いくつかの条件分岐は`rustc`が暗黙のうちに提供していま\"\n\"す。条件を独自に追加する場合には`--cfg`フラグを用いて`rustc`に伝える必要があ\"\n\"ります。\"\n\n#: src/attribute/cfg/custom.md:9\nmsgid \"\\\"condition met!\\\"\"\nmsgstr \"\\\"condition met!\\\"\"\n\n#: src/attribute/cfg/custom.md:17\nmsgid \"Try to run this to see what happens without the custom `cfg` flag.\"\nmsgstr \"独自の`cfg`フラグを用いない場合、何が起きるかやってみてください。\"\n\n#: src/attribute/cfg/custom.md:19\nmsgid \"With the custom `cfg` flag:\"\nmsgstr \"`cfg`フラグがある場合：\"\n\n#: src/generics.md:3\nmsgid \"\"\n\"_Generics_ is the topic of generalizing types and functionalities to broader \"\n\"cases. This is extremely useful for reducing code duplication in many ways, \"\n\"but can call for rather involved syntax. Namely, being generic requires \"\n\"taking great care to specify over which types a generic type is actually \"\n\"considered valid. The simplest and most common use of generics is for type \"\n\"parameters.\"\nmsgstr \"\"\n\"ジェネリクスとは、型と関数の機能をより汎用的に使えるようにするための機能で\"\n\"す。これはあらゆる局面でコードの重複を避けるために非常に役立ちますが、多少構\"\n\"文が複雑になります。すなわち、ジェネリック型を使いこなすには、どのようなジェ\"\n\"ネリック型がきちんと機能するかに細心の注意を払う必要があります。最もシンプル\"\n\"で一般的なジェネリクスの利用法は型パラメータです。\"\n\n#: src/generics.md:10\nmsgid \"\"\n\"A type parameter is specified as generic by the use of angle brackets and \"\n\"upper [camel case](https://en.wikipedia.org/wiki/CamelCase): `<Aaa, Bbb, ...\"\n\">`. \\\"Generic type parameters\\\" are typically represented as `<T>`. In Rust, \"\n\"\\\"generic\\\" also describes anything that accepts one or more generic type \"\n\"parameters `<T>`. Any type specified as a generic type parameter is generic, \"\n\"and everything else is concrete (non-generic).\"\nmsgstr \"\"\n\"ジェネリック型の型パラメータにはかぎ括弧とアッパー[キャメルケース](https://\"\n\"en.wikipedia.org/wiki/CamelCase)（`<Aaa, Bbb, ...>`）が使われます。ジェネリッ\"\n\"クな型パラメータはたいていの場合`<T>`で示されます。Rustの場合、「ジェネリク\"\n\"ス」には「１つ以上のジェネリックな型パラメータ`<T>`を受け付けるもの」という意\"\n\"味もあります。ジェネリックな型パラメータを指定された場合、それは必ずジェネ\"\n\"リック型になり、そうでなければ必ず非ジェネリック型、すなわち具象型になりま\"\n\"す。\"\n\n#: src/generics.md:16\nmsgid \"\"\n\"For example, defining a _generic function_ named `foo` that takes an \"\n\"argument `T` of any type:\"\nmsgstr \"\"\n\"例として、あらゆる型の引数`T`をとる *ジェネリック関数* `foo`を定義すると\"\n\n#: src/generics.md:23\nmsgid \"\"\n\"Because `T` has been specified as a generic type parameter using `<T>`, it \"\n\"is considered generic when used here as `(arg: T)`. This is the case even if \"\n\"`T` has previously been defined as a `struct`.\"\nmsgstr \"\"\n\"となります。`T`はジェネリックな型パラメータに指定されているので、この場所で\"\n\"`(arg: T)`のように使用するとジェネリック型として扱われます。これは`T`という構\"\n\"造体がそれ以前に定義されていても同様です。\"\n\n#: src/generics.md:27\nmsgid \"This example shows some of the syntax in action:\"\nmsgstr \"では、手を動かしながらジェネリック型の構文を体験していきましょう。\"\n\n#: src/generics.md:30\nmsgid \"// A concrete type `A`.\\n\"\nmsgstr \"// `A`という具象型\\n\"\n\n#: src/generics.md:32\nmsgid \"\"\n\"// In defining the type `Single`, the first use of `A` is not preceded by \"\n\"`<A>`.\\n\"\n\"// Therefore, `Single` is a concrete type, and `A` is defined as above.\\n\"\nmsgstr \"\"\n\"// `Single`という型を定義する際に`A`を使用していますが、その最初の使用よりも\"\n\"先に\\n\"\n\"// `<A>`がないため、また、`A`自身も具象型であるため、`Single`は具象型となりま\"\n\"す。\\n\"\n\n#: src/generics.md:35\nmsgid \"//            ^ Here is `Single`s first use of the type `A`.\\n\"\nmsgstr \"//            ^ `Single`による`A`の一番最初の使用はここ。\\n\"\n\n#: src/generics.md:37\nmsgid \"\"\n\"// Here, `<T>` precedes the first use of `T`, so `SingleGen` is a generic \"\n\"type.\\n\"\n\"// Because the type parameter `T` is generic, it could be anything, \"\n\"including\\n\"\n\"// the concrete type `A` defined at the top.\\n\"\nmsgstr \"\"\n\"// ここでは`<T>`が一番初めの`T`の使用よりも先に来ています。\\n\"\n\"// よって`SingleGen`はジェネリック型となります。\\n\"\n\"// なぜならば型パラメータ`T`がジェネリックだからです。\\n\"\n\"// `T`はどんな型にもなりえるため、上で定義した`A`を受け取ることもできます。\\n\"\n\n#: src/generics.md:44\nmsgid \"// `Single` is concrete and explicitly takes `A`.\\n\"\nmsgstr \"// `Single`は具象型で、`A`のみを受け取ります。\\n\"\n\n#: src/generics.md:47\nmsgid \"\"\n\"// Create a variable `_char` of type `SingleGen<char>`\\n\"\n\"    // and give it the value `SingleGen('a')`.\\n\"\n\"    // Here, `SingleGen` has a type parameter explicitly specified.\\n\"\nmsgstr \"\"\n\"// `_char`という名の変数を生成します。これは`SingleGen<char>`\\n\"\n\"    // という型で、値は`SingleGen('a')`となります。\\n\"\n\"    // ここでは、`SingleGen`には明示的な型パラメータが与えられています。\\n\"\n\n#: src/generics.md:52\nmsgid \"// `SingleGen` can also have a type parameter implicitly specified:\\n\"\nmsgstr \"\"\n\"// `SingleGen`型の変数には明示的に型パラメータを与えなくても構いません。\\n\"\n\n#: src/generics.md:53\nmsgid \"// Uses `A` defined at the top.\\n\"\nmsgstr \"// 上で定義した`A`を使用。\\n\"\n\n#: src/generics.md:54\nmsgid \"// Uses `i32`.\\n\"\nmsgstr \"// `i32`を使用。\\n\"\n\n#: src/generics.md:55\nmsgid \"// Uses `char`.\\n\"\nmsgstr \"// `char`を使用。\\n\"\n\n#: src/generics.md:61\nmsgid \"[`structs`](custom_types/structs.md)\"\nmsgstr \"[構造体](custom_types/structs.md)\"\n\n#: src/generics/gen_fn.md:3\nmsgid \"\"\n\"The same set of rules can be applied to functions: a type `T` becomes \"\n\"generic when preceded by `<T>`.\"\nmsgstr \"\"\n\"「型`T`はその前に`<T>`があるとジェネリック型になる」というルールは関数に対し\"\n\"ても当てはまります。\"\n\n#: src/generics/gen_fn.md:6\nmsgid \"\"\n\"Using generic functions sometimes requires explicitly specifying type \"\n\"parameters. This may be the case if the function is called where the return \"\n\"type is generic, or if the compiler doesn't have enough information to infer \"\n\"the necessary type parameters.\"\nmsgstr \"\"\n\"ジェネリック関数を使用する際、型パラメータを明示する必要がある場合がありま\"\n\"す。返り値がジェネリック型である場合や、コンパイラが型パラメータを推論するの\"\n\"に十分な情報がない場合です。\"\n\n#: src/generics/gen_fn.md:11\nmsgid \"\"\n\"A function call with explicitly specified type parameters looks like: `fun::\"\n\"<A, B, ...>()`.\"\nmsgstr \"\"\n\"型パラメータを明示したうえでの関数呼び出しの構文は`fun::<A, B, ...>()`のよう\"\n\"になります。\"\n\n#: src/generics/gen_fn.md:15\nmsgid \"// Concrete type `A`.\\n\"\nmsgstr \"// 具象型`A`\\n\"\n\n#: src/generics/gen_fn.md:16\nmsgid \"// Concrete type `S`.\\n\"\nmsgstr \"// 具象型`S`\\n\"\n\n#: src/generics/gen_fn.md:17\nmsgid \"// Generic type `SGen`.\\n\"\nmsgstr \"// ジェネリック型`SGen`\\n\"\n\n#: src/generics/gen_fn.md:18\nmsgid \"\"\n\"// The following functions all take ownership of the variable passed into\\n\"\n\"// them and immediately go out of scope, freeing the variable.\\n\"\nmsgstr \"\"\n\"// 以下の関数は全て変数の所有権をとった後すぐにスコープを抜けて\\n\"\n\"// 変数をメモリ上から開放します。\\n\"\n\n#: src/generics/gen_fn.md:21\nmsgid \"\"\n\"// Define a function `reg_fn` that takes an argument `_s` of type `S`.\\n\"\n\"// This has no `<T>` so this is not a generic function.\\n\"\nmsgstr \"\"\n\"// `S`という型の引数`_s`をとる`reg_fn`という関数を定義。\\n\"\n\"// `<T>`がないのでジェネリック関数ではありません。\\n\"\n\n#: src/generics/gen_fn.md:25\nmsgid \"\"\n\"// Define a function `gen_spec_t` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// It has been explicitly given the type parameter `A`, but because `A` has \"\n\"not \\n\"\n\"// been specified as a generic type parameter for `gen_spec_t`, it is not \"\n\"generic.\\n\"\nmsgstr \"\"\n\"// `gen_spec_t`という関数を定義。これは`A`という型を与えられた`SGen<T>`\\n\"\n\"// という型の引数`_s`を取ります。関数名の直後に`<A>`という型パラメータでAが\\n\"\n\"// ジェネリックであることを明示していないので、この関数はAをジェネリック型\\n\"\n\"// としては取りません\\n\"\n\n#: src/generics/gen_fn.md:30\nmsgid \"\"\n\"// Define a function `gen_spec_i32` that takes an argument `_s` of type \"\n\"`SGen<i32>`.\\n\"\n\"// It has been explicitly given the type parameter `i32`, which is a \"\n\"specific type.\\n\"\n\"// Because `i32` is not a generic type, this function is also not generic.\\n\"\nmsgstr \"\"\n\"// `gen_spec_i32`という関数を定義。\\n\"\n\"// これは明示的な型パラメータとして`i32`を与えられた\\n\"\n\"// `SGen<i32>`型の引数`_s`を取ります。\\n\"\n\"// この関数もジェネリックではありません。\\n\"\n\n#: src/generics/gen_fn.md:35\nmsgid \"\"\n\"// Define a function `generic` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// Because `SGen<T>` is preceded by `<T>`, this function is generic over \"\n\"`T`.\\n\"\nmsgstr \"\"\n\"// `generic`という関数を定義。`SGen<T>`という型の引数`_s`を取ります。\\n\"\n\"// `<T>`が`SGen<T>`に先行しているため、これはTに対してジェネリックな関数で\"\n\"す。\\n\"\n\n#: src/generics/gen_fn.md:41\nmsgid \"// Using the non-generic functions\\n\"\nmsgstr \"// ジェネリックでない関数を使用します。\\n\"\n\n#: src/generics/gen_fn.md:42\nmsgid \"// Concrete type.\\n\"\nmsgstr \"// 具象型\\n\"\n\n#: src/generics/gen_fn.md:43\nmsgid \"// Implicitly specified type parameter `A`.\\n\"\nmsgstr \"// 型パラメータ`A`を暗黙のうちに受け取ります。\\n\"\n\n#: src/generics/gen_fn.md:44\nmsgid \"// Implicitly specified type parameter `i32`.\\n\"\nmsgstr \"// 型パラメータ`i32`を暗黙のうちに受け取ります。\\n\"\n\n#: src/generics/gen_fn.md:46\nmsgid \"// Explicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"// 型パラメータ`char`を明示的に`generic()`に渡します。\\n\"\n\n#: src/generics/gen_fn.md:49\nmsgid \"// Implicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"// 型パラメータ`char`を暗黙的に`generic()`に渡します。\\n\"\n\n#: src/generics/gen_fn.md:50\nmsgid \"'c'\"\nmsgstr \"'c'\"\n\n#: src/generics/gen_fn.md:56\nmsgid \"[functions](../fn.md) and [`struct`s](../custom_types/structs.md)\"\nmsgstr \"[関数](../fn.md), [構造体](../custom_types/structs.md)\"\n\n#: src/generics/impl.md:3\nmsgid \"Similar to functions, implementations require care to remain generic.\"\nmsgstr \"\"\n\"関数と同様、`impl`でメソッドを実装する際にもジェネリック型特有の記法が必要で\"\n\"す。\"\n\n#: src/generics/impl.md:6\nmsgid \"// Concrete type `S`\\n\"\nmsgstr \"// 具象型`S`\\n\"\n\n#: src/generics/impl.md:7\nmsgid \"// Generic type `GenericVal`\\n\"\nmsgstr \"// ジェネリック型`GenericVal`\\n\"\n\n#: src/generics/impl.md:8\nmsgid \"// impl of GenericVal where we explicitly specify type parameters:\\n\"\nmsgstr \"// 型パラメータを指定したうえで、GenericValにメソッドを実装。\\n\"\n\n#: src/generics/impl.md:10\nmsgid \"// Specify `f32`\\n\"\nmsgstr \"// `f32`の場合のメソッド\\n\"\n\n#: src/generics/impl.md:11\nmsgid \"// Specify `S` as defined above\\n\"\nmsgstr \"// 上で定義した`S`への実装\\n\"\n\n#: src/generics/impl.md:12\nmsgid \"// `<T>` Must precede the type to remain generic\\n\"\nmsgstr \"// ジェネリック型のまま扱うには`<T>`が先に来る必要があります。\\n\"\n\n#: src/generics/impl.md:25\nmsgid \"// impl of Val\\n\"\nmsgstr \"// Valに対して実装。\\n\"\n\n#: src/generics/impl.md:32\nmsgid \"// impl of GenVal for a generic type `T`\\n\"\nmsgstr \"// ジェネリック型`T`の場合のメソッドをGenValに対して実装。\\n\"\n\n#: src/generics/impl.md:50\nmsgid \"\"\n\"[functions returning references](../scope/lifetime/fn.md), [`impl`](../fn/\"\n\"methods.md), and [`struct`](../custom_types/structs.md)\"\nmsgstr \"\"\n\"[参照を返す関数](../scope/lifetime/fn.md), [`impl`](../fn/methods.md), [構造\"\n\"体](../custom_types/structs.md)\"\n\n#: src/generics/gen_trait.md:3\nmsgid \"\"\n\"Of course `trait`s can also be generic. Here we define one which \"\n\"reimplements the `Drop` `trait` as a generic method to `drop` itself and an \"\n\"input.\"\nmsgstr \"\"\n\"もちろんトレイトもジェネリクスを活用することができます。ここでは`Drop`トレイ\"\n\"トをジェネリックメソッドとして再実装し、自身と引数として受け取った値の両方を\"\n\"`drop`するようなメソッドにします。\"\n\n#: src/generics/gen_trait.md:7\nmsgid \"// Non-copyable types.\\n\"\nmsgstr \"\"\n\"// コピー不可な型\\n\"\n\"// 訳注: `clone()`メソッドを用いないかぎり、値のコピーではなくムーブが起きる\"\n\"型\\n\"\n\n#: src/generics/gen_trait.md:10\nmsgid \"// A trait generic over `T`.\\n\"\nmsgstr \"// ジェネリック型 `T`に対するトレイト\\n\"\n\n#: src/generics/gen_trait.md:13\nmsgid \"\"\n\"// Define a method on the caller type which takes an\\n\"\n\"    // additional single parameter `T` and does nothing with it.\\n\"\nmsgstr \"\"\n\"// `self`に加えてもう一つジェネリック型を受け取り、\\n\"\n\"    // 何もしないメソッドのシグネチャを定義。\\n\"\n\n#: src/generics/gen_trait.md:17\nmsgid \"\"\n\"// Implement `DoubleDrop<T>` for any generic parameter `T` and\\n\"\n\"// caller `U`.\\n\"\nmsgstr \"\"\n\"// `U`を`self`として、`T`をもう一つの引数として受け取る`DoubleDrop<T>`\\n\"\n\"// を実装する。`U`,`T`はいずれもジェネリック型。\\n\"\n\n#: src/generics/gen_trait.md:21\nmsgid \"\"\n\"// This method takes ownership of both passed arguments,\\n\"\n\"    // deallocating both.\\n\"\nmsgstr \"// このメソッドは2つの引数の所有権を取り、メモリ上から開放します。\\n\"\n\n#: src/generics/gen_trait.md:30\nmsgid \"// Deallocate `empty` and `null`.\\n\"\nmsgstr \"// `empty`と`null`を開放。\\n\"\n\n#: src/generics/gen_trait.md:33\nmsgid \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO: Try uncommenting these lines.\\n\"\nmsgstr \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO: これらの行をアンコメントしてみましょう。\\n\"\n\n#: src/generics/gen_trait.md:41\nmsgid \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html), [`struct`](../\"\n\"custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html), [構造体](../\"\n\"custom_types/structs.md), [トレイト](../trait.md)\"\n\n#: src/generics/bounds.md:3\nmsgid \"\"\n\"When working with generics, the type parameters often must use traits as \"\n\"_bounds_ to stipulate what functionality a type implements. For example, the \"\n\"following example uses the trait `Display` to print and so it requires `T` \"\n\"to be bound by `Display`; that is, `T` _must_ implement `Display`.\"\nmsgstr \"\"\n\"ジェネリックプログラミングをしていると、型パラメータが特定の機能を持っている\"\n\"ことを規定するため、トレイトに境界を設ける必要があることがよくあります。例え\"\n\"ば、以下の例では、引数の`Display`トレイトを用いて出力を行うため、`T`が\"\n\"`Display`を持っていることを規定しています。つまり、「`T`は`Display`を実装 *し\"\n\"ていなくてはならない* 」という意味です。\"\n\n#: src/generics/bounds.md:9\nmsgid \"\"\n\"// Define a function `printer` that takes a generic type `T` which\\n\"\n\"// must implement trait `Display`.\\n\"\nmsgstr \"\"\n\"// `Display`トレイトを実装している`T`を引数として取ります。\\n\"\n\"// `printer`という関数を定義。\\n\"\n\n#: src/generics/bounds.md:16\nmsgid \"\"\n\"Bounding restricts the generic to types that conform to the bounds. That is:\"\nmsgstr \"\"\n\"境界は、ジェネリクスを全ての型ではなく、一定条件を満たす型に対してのみ適用す\"\n\"るためにあります。つまり\"\n\n#: src/generics/bounds.md:20\nmsgid \"\"\n\"// Error! `Vec<T>` does not implement `Display`. This\\n\"\n\"// specialization will fail.\\n\"\nmsgstr \"\"\n\"// エラー！`Vec<T>`は`Display`を実装していないため、この特殊化\\n\"\n\"// は失敗します。\\n\"\n\n#: src/generics/bounds.md:26\nmsgid \"\"\n\"Another effect of bounding is that generic instances are allowed to access \"\n\"the [methods](../fn/methods.md) of traits specified in the bounds. For \"\n\"example:\"\nmsgstr \"\"\n\"境界のもう一つの効果は、ジェネリック型のインスタンスが、境界条件となるトレイ\"\n\"トの[メソッド](../fn/methods.md)にアクセスすることができるようになる点です。\"\n\"以下がその例です。\"\n\n#: src/generics/bounds.md:30\nmsgid \"// A trait which implements the print marker: `{:?}`.\\n\"\nmsgstr \"// 出力時のマーカー`{:?}`を実装するトレイト\\n\"\n\n#: src/generics/bounds.md:45\nmsgid \"\"\n\"// The generic `T` must implement `Debug`. Regardless\\n\"\n\"// of the type, this will work properly.\\n\"\nmsgstr \"\"\n\"// ジェネリック型`T`は`Debug`トレイトを実装していなくてはなりません。\\n\"\n\"// その限りにおいて、`T`がどのような具象型であろうとも次の関数は動作しま\"\n\"す。\\n\"\n\n#: src/generics/bounds.md:51\nmsgid \"\"\n\"// `T` must implement `HasArea`. Any type which meets\\n\"\n\"// the bound can access `HasArea`'s function `area`.\\n\"\nmsgstr \"\"\n\"// 「`T`は`HasArea`を実装していなくてはならない」という境界条件を\\n\"\n\"// 満たしていれば、`HasArea`の関数`area`にアクセスできます。\\n\"\n\n#: src/generics/bounds.md:61\nmsgid \"\\\"Area: {}\\\"\"\nmsgstr \"\\\"Area: {}\\\"\"\n\n#: src/generics/bounds.md:63\nmsgid \"\"\n\"//print_debug(&_triangle);\\n\"\n\"    //println!(\\\"Area: {}\\\", area(&_triangle));\\n\"\n\"    // ^ TODO: Try uncommenting these.\\n\"\n\"    // | Error: Does not implement either `Debug` or `HasArea`. \\n\"\nmsgstr \"\"\n\"//print_debug(&_triangle);\\n\"\n\"    //println!(\\\"Area: {}\\\", area(&_triangle));\\n\"\n\"    // ^ TODO: これらの行をアンコメントしてみましょう。\\n\"\n\"    // | Error: `Debug` も `HasArea`もどちらも実装されていません！\\n\"\n\n#: src/generics/bounds.md:70\nmsgid \"\"\n\"As an additional note, [`where`](../generics/where.md) clauses can also be \"\n\"used to apply bounds in some cases to be more expressive.\"\nmsgstr \"\"\n\"付け加えておくと、[`where`](../generics/where.md)句を用いて境界を適用すること\"\n\"もできます。場合によってはこちらの記法を使用したほうが読みやすくなる場合もあ\"\n\"ります。\"\n\n#: src/generics/bounds.md:75\nmsgid \"\"\n\"[`std::fmt`](../hello/print.md), [`struct`s](../custom_types/structs.md), \"\n\"and [`trait`s](../trait.md)\"\nmsgstr \"\"\n\"[`std::fmt`](../hello/print.md), [構造体](../custom_types/structs.md), [トレ\"\n\"イト](../trait.md)\"\n\n#: src/generics/bounds/testcase_empty.md:3\nmsgid \"\"\n\"A consequence of how bounds work is that even if a `trait` doesn't include \"\n\"any functionality, you can still use it as a bound. `Eq` and `Copy` are \"\n\"examples of such `trait`s from the `std` library.\"\nmsgstr \"\"\n\"トレイト境界の仕組みから、「トレイトがなにも機能を持っていなくとも境界条件と\"\n\"して使用できることには変わりはない」という帰結がもたらされます。`Eq`と`Copy`\"\n\"は`std`ライブラリにおけるそのような例です。\"\n\n#: src/generics/bounds/testcase_empty.md:17\nmsgid \"\"\n\"// These functions are only valid for types which implement these\\n\"\n\"// traits. The fact that the traits are empty is irrelevant.\\n\"\nmsgstr \"\"\n\"// 以下の関数はトレイト境界を設けていますが、そのトレイトが空である\\n\"\n\"// か否かとは関係ありません。\\n\"\n\n#: src/generics/bounds/testcase_empty.md:20\nmsgid \"\\\"red\\\"\"\nmsgstr \"\\\"red\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:21\nmsgid \"\\\"blue\\\"\"\nmsgstr \"\\\"blue\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:28\nmsgid \"\"\n\"// `red()` won't work on a blue jay nor vice versa\\n\"\n\"    // because of the bounds.\\n\"\nmsgstr \"\"\n\"// トレイト境界のため、`red`は`blue_jay`に対しては使用できません。\\n\"\n\"    // `blue`と`Cardinal`も同様です。\\n\"\n\n#: src/generics/bounds/testcase_empty.md:30\nmsgid \"\\\"A cardinal is {}\\\"\"\nmsgstr \"\\\"A cardinal is {}\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:31\nmsgid \"\\\"A blue jay is {}\\\"\"\nmsgstr \"\\\"A blue jay is {}\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:32\nmsgid \"\"\n\"//println!(\\\"A turkey is {}\\\", red(&_turkey));\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\"//println!(\\\"A turkey is {}\\\", red(&_turkey));\\n\"\n\"    // ^ TODO: この行をアンコメントしてみましょう。\\n\"\n\n#: src/generics/bounds/testcase_empty.md:39\nmsgid \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), [`std::\"\n\"marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html), and \"\n\"[`trait`s](../../trait.md)\"\nmsgstr \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), [`std::\"\n\"marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html), [トレイ\"\n\"ト](../../trait.md)\"\n\n#: src/generics/multi_bounds.md:3\nmsgid \"\"\n\"Multiple bounds for a single type can be applied with a `+`. Like normal, \"\n\"different types are separated with `,`.\"\nmsgstr \"\"\n\"`+`を用いて1つの型に複数のトレイト境界を設けることができます。複数の引数を受\"\n\"け取るときは、通常時と同様、`,`で区切ります。\"\n\n#: src/generics/multi_bounds.md:10\nmsgid \"\\\"Debug: `{:?}`\\\"\"\nmsgstr \"\\\"Debug: `{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:11\nmsgid \"\\\"Display: `{}`\\\"\"\nmsgstr \"\\\"Display: `{}`\\\"\"\n\n#: src/generics/multi_bounds.md:15\nmsgid \"\\\"t: `{:?}`\\\"\"\nmsgstr \"\\\"t: `{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:16\nmsgid \"\\\"u: `{:?}`\\\"\"\nmsgstr \"\\\"u: `{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:20\nmsgid \"\\\"words\\\"\"\nmsgstr \"\\\"words\\\"\"\n\n#: src/generics/multi_bounds.md:25\nmsgid \"\"\n\"//compare_prints(&array);\\n\"\n\"    // TODO ^ Try uncommenting this.\\n\"\nmsgstr \"\"\n\"//compare_prints(&array);\\n\"\n\"    // TODO ^ ここをアンコメントしてみましょう。\\n\"\n\n#: src/generics/multi_bounds.md:34\nmsgid \"[`std::fmt`](../hello/print.md) and [`trait`s](../trait.md)\"\nmsgstr \"[`std::fmt`](../hello/print.md), [トレイト](../trait.md)\"\n\n#: src/generics/where.md:3\nmsgid \"\"\n\"A bound can also be expressed using a `where` clause immediately before the \"\n\"opening `{`, rather than at the type's first mention. Additionally, `where` \"\n\"clauses can apply bounds to arbitrary types, rather than just to type \"\n\"parameters.\"\nmsgstr \"\"\n\"トレイト境界は、`{`の直前に`where`句を導入することでも設けることができます。\"\n\"`where`はさらに、型パラメータだけでなく任意の型に対して適用できます。\"\n\n#: src/generics/where.md:8\nmsgid \"Some cases that a `where` clause is useful:\"\nmsgstr \"`where`句のほうが有効なケースには例えば以下のようなものがあります。\"\n\n#: src/generics/where.md:10\nmsgid \"When specifying generic types and bounds separately is clearer:\"\nmsgstr \"\"\n\"ジェネリック型とジェネリック境界に別々に制限を加えたほうが明瞭になる場合\"\n\n#: src/generics/where.md:14\nmsgid \"// Expressing bounds with a `where` clause\\n\"\nmsgstr \"// `where`を用いてジェネリック境界を設けます。\\n\"\n\n#: src/generics/where.md:21\nmsgid \"\"\n\"When using a `where` clause is more expressive than using normal syntax. The \"\n\"`impl` in this example cannot be directly expressed without a `where` clause:\"\nmsgstr \"\"\n\"`where`句の方が通常の構文より表現力が高い場合。この例では`where`句を使わずに\"\n\"書くことはできません。\"\n\n#: src/generics/where.md:30\nmsgid \"\"\n\"// Because we would otherwise have to express this as `T: Debug` or \\n\"\n\"// use another method of indirect approach, this requires a `where` clause:\\n\"\nmsgstr \"\"\n\"// `where`句を用いない場合、以下と等価な機能を実装するには、\\n\"\n\"// `T: Debug`という形で表現するか、別の直接的でない方法\\n\"\n\"// を使用するかしなくてはなりません。\\n\"\n\n#: src/generics/where.md:35\nmsgid \"\"\n\"// We want `Option<T>: Debug` as our bound because that is what's\\n\"\n\"    // being printed. Doing otherwise would be using the wrong bound.\\n\"\nmsgstr \"\"\n\"// 出力されるのが`Some(self)`であるため、この関数の\\n\"\n\"    // ジェネリック境界として`Option<T>: Debug`を使用したい。\\n\"\n\n#: src/generics/where.md:51\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md), \"\n\"[`struct`](../custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md), [構\"\n\"造体](../custom_types/structs.md), [トレイト](../trait.md)\"\n\n#: src/generics/new_types.md:3\nmsgid \"\"\n\"The `newtype` idiom gives compile time guarantees that the right type of \"\n\"value is supplied to a program.\"\nmsgstr \"\"\n\"ニュータイプイディオムは正しい型の値が与えられていることをコンパイル時に保証\"\n\"することができます。\"\n\n#: src/generics/new_types.md:6\nmsgid \"\"\n\"For example, an age verification function that checks age in years, _must_ \"\n\"be given a value of type `Years`.\"\nmsgstr \"\"\n\"例えば、年齢を年単位で確認する`is_adult`には「Years」という型の値を *与えな\"\n\"ければならない* ようにすることが可能です。\"\n\n#: src/generics/new_types.md:22\nmsgid \"/// truncates partial years\\n\"\nmsgstr \"/// 1年に満たない日付は切り捨て。\\n\"\n\n#: src/generics/new_types.md:35 src/generics/new_types.md:36\nmsgid \"\\\"Is an adult? {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/new_types.md:37\nmsgid \"// println!(\\\"Is an adult? {}\\\", is_adult(&age_days));\\n\"\nmsgstr \"// println!(\\\"Is an adult? {}\\\", is_adult(&age_days));\\n\"\n\n#: src/generics/new_types.md:41\nmsgid \"\"\n\"Uncomment the last print statement to observe that the type supplied must be \"\n\"`Years`.\"\nmsgstr \"\"\n\"最後の print文 のコメントを外して、与えられた型が `Years` でなければならない\"\n\"ことを確認してください。\"\n\n#: src/generics/new_types.md:43\nmsgid \"\"\n\"To obtain the `newtype`'s value as the base type, you may use the tuple or \"\n\"destructuring syntax like so:\"\nmsgstr \"\"\n\"`newtype`の元に使われている型のデータを取得するには、以下のようにタプルやデス\"\n\"トラクト構文を用いることで取得できます。\"\n\n#: src/generics/new_types.md:49\nmsgid \"// Tuple\\n\"\nmsgstr \"// タプル\\n\"\n\n#: src/generics/new_types.md:50\nmsgid \"// Destructuring\\n\"\nmsgstr \"// デストラクト\\n\"\n\n#: src/generics/new_types.md:56\nmsgid \"[`structs`](../custom_types/structs.md)\"\nmsgstr \"[構造体](../custom_types/structs.md)\"\n\n#: src/generics/assoc_items.md:3\nmsgid \"\"\n\"\\\"Associated Items\\\" refers to a set of rules pertaining to [`item`](https://\"\n\"doc.rust-lang.org/reference/items.html)s of various types. It is an \"\n\"extension to `trait` generics, and allows `trait`s to internally define new \"\n\"items.\"\nmsgstr \"\"\n\"関連要素とは複数の型の[要素](https://doc.rust-lang.org/reference/items.html)\"\n\"に関係のある規則の総称です。トレイトの拡張機能であり、トレイトの中で新しい要\"\n\"素を定義することを可能にします。\"\n\n#: src/generics/assoc_items.md:7\nmsgid \"\"\n\"One such item is called an _associated type_, providing simpler usage \"\n\"patterns when the `trait` is generic over its container type.\"\nmsgstr \"\"\n\"そのように定義する要素の一つに **関連型** があります。これにより、ジェネリッ\"\n\"クなコンテナ型に対するトレイトを使用する際に、よりシンプルな書き方ができるよ\"\n\"うになります。\"\n\n#: src/generics/assoc_items.md:12\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\nmsgstr \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\n\n#: src/generics/assoc_items/the_problem.md:3\nmsgid \"\"\n\"A `trait` that is generic over its container type has type specification \"\n\"requirements - users of the `trait` _must_ specify all of its generic types.\"\nmsgstr \"\"\n\"コンテナ型に、その要素に対してジェネリックなトレイトを実装した場合、そのトレ\"\n\"イトを使用する者は全てのジェネリック型を明記 *しなくてはなりません* 。\"\n\n#: src/generics/assoc_items/the_problem.md:6\nmsgid \"\"\n\"In the example below, the `Contains` `trait` allows the use of the generic \"\n\"types `A` and `B`. The trait is then implemented for the `Container` type, \"\n\"specifying `i32` for `A` and `B` so that it can be used with `fn \"\n\"difference()`.\"\nmsgstr \"\"\n\"以下の例では`Contains`トレイトはジェネリック型`A`と`B`の使用を許しています。\"\n\"その後、`Container`型に対して`Contains`を実装していますが、その際後に`fn \"\n\"difference()`が使用できるように、`A`、`B`はそれぞれ`i32`と明記されています。\"\n\n#: src/generics/assoc_items/the_problem.md:10\nmsgid \"\"\n\"Because `Contains` is generic, we are forced to explicitly state _all_ of \"\n\"the generic types for `fn difference()`. In practice, we want a way to \"\n\"express that `A` and `B` are determined by the _input_ `C`. As you will see \"\n\"in the next section, associated types provide exactly that capability.\"\nmsgstr \"\"\n\"`Contains`はジェネリックトレイトなので、`fn difference()`では **全ての** ジェ\"\n\"ネリック型を宣言しなくてはなりません。実際のところ、`A`と`B`は **引数** であ\"\n\"る`C`によって決定されていて欲しいにも関わらず、です。これは次のページで紹介す\"\n\"る関連型と呼ばれる機能によって可能です。\"\n\n#: src/generics/assoc_items/the_problem.md:17\n#: src/generics/assoc_items/types.md:36\nmsgid \"\"\n\"// A trait which checks if 2 items are stored inside of container.\\n\"\n\"// Also retrieves first or last value.\\n\"\nmsgstr \"\"\n\"// ２つの要素がコンテナ型の中にあることをチェックするトレイト\\n\"\n\"// また、最初と最後の値を取得することもできます。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:21\nmsgid \"// Explicitly requires `A` and `B`.\\n\"\nmsgstr \"// `A`と`B`両方を明示的に要求します。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:22\n#: src/generics/assoc_items/the_problem.md:23\nmsgid \"// Doesn't explicitly require `A` or `B`.\\n\"\nmsgstr \"// `A`、`B`いずれも要求しません。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:27\nmsgid \"// True if the numbers stored are equal.\\n\"\nmsgstr \"// コンテナ内の２つの要素が等しければTrueを返します。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:32\n#: src/generics/assoc_items/types.md:60\nmsgid \"// Grab the first number.\\n\"\nmsgstr \"// ひとつ目の値を取得。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:35\n#: src/generics/assoc_items/types.md:63\nmsgid \"// Grab the last number.\\n\"\nmsgstr \"// 最後（2つめ）の値を取得。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:38\nmsgid \"\"\n\"// `C` contains `A` and `B`. In light of that, having to express `A` and\\n\"\n\"// `B` again is a nuisance.\\n\"\nmsgstr \"\"\n\"// `A`と`B`は`C`に保持されていることを考慮すると、`A`と`B`を\\n\"\n\"// ２度も書くのは面倒。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:52\n#: src/generics/assoc_items/types.md:77\nmsgid \"\\\"Does container contain {} and {}: {}\\\"\"\nmsgstr \"\\\"Does container contain {} and {}: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:55\n#: src/generics/assoc_items/types.md:80\nmsgid \"\\\"First number: {}\\\"\"\nmsgstr \"\\\"First number: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:56\n#: src/generics/assoc_items/types.md:81\nmsgid \"\\\"Last number: {}\\\"\"\nmsgstr \"\\\"Last number: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:58\n#: src/generics/assoc_items/types.md:83\nmsgid \"\\\"The difference is: {}\\\"\"\nmsgstr \"\\\"The difference is: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:64\nmsgid \"\"\n\"[`struct`s](../../custom_types/structs.md), and [`trait`s](../../trait.md)\"\nmsgstr \"[構造体](../../custom_types/structs.md), [トレイト](../../trait.md)\"\n\n#: src/generics/assoc_items/types.md:3\nmsgid \"\"\n\"The use of \\\"Associated types\\\" improves the overall readability of code by \"\n\"moving inner types locally into a trait as _output_ types. Syntax for the \"\n\"`trait` definition is as follows:\"\nmsgstr \"\"\n\"関連型を使用すると、コンテナ型の中の要素をトレイトの中に *出力型* として書く\"\n\"ことで、全体の可読性を上げることができます。トレイトを定義する際の構文は以下\"\n\"のようになります。\"\n\n#: src/generics/assoc_items/types.md:8\nmsgid \"\"\n\"// `A` and `B` are defined in the trait via the `type` keyword.\\n\"\n\"// (Note: `type` in this context is different from `type` when used for\\n\"\n\"// aliases).\\n\"\nmsgstr \"\"\n\"// `A`と`B`は`type`キーワードを用いてトレイト内で宣言されています。\\n\"\n\"// （注意：この文脈で使用する`type`は型エイリアスを宣言する際の`type`とは\\n\"\n\"// 異なることに注意しましょう。）\\n\"\n\n#: src/generics/assoc_items/types.md:15\nmsgid \"// Updated syntax to refer to these new types generically.\\n\"\nmsgstr \"\"\n\"// これらの新しい型をジェネリックに使用するために、構文が\\n\"\n\"    // アップデートされています。\\n\"\n\n#: src/generics/assoc_items/types.md:20\nmsgid \"\"\n\"Note that functions that use the `trait` `Contains` are no longer required \"\n\"to express `A` or `B` at all:\"\nmsgstr \"\"\n\"`Contains`トレイトを使用する関数において、`A`と`B`を明示する必要がなくなって\"\n\"いることに注目しましょう。\"\n\n#: src/generics/assoc_items/types.md:24\nmsgid \"// Without using associated types\\n\"\nmsgstr \"// 関連型を使用しない場合\\n\"\n\n#: src/generics/assoc_items/types.md:27\nmsgid \"// Using associated types\\n\"\nmsgstr \"// 使用する場合\\n\"\n\n#: src/generics/assoc_items/types.md:32\nmsgid \"\"\n\"Let's rewrite the example from the previous section using associated types:\"\nmsgstr \"前セクションの例を関連型を使用して書きなおしてみましょう。\"\n\n#: src/generics/assoc_items/types.md:40\nmsgid \"// Define generic types here which methods will be able to utilize.\\n\"\nmsgstr \"// メソッドが使用できるジェネリック型を定義。\\n\"\n\n#: src/generics/assoc_items/types.md:50\nmsgid \"\"\n\"// Specify what types `A` and `B` are. If the `input` type\\n\"\n\"    // is `Container(i32, i32)`, the `output` types are determined\\n\"\n\"    // as `i32` and `i32`.\\n\"\nmsgstr \"\"\n\"// `A`と`B`がどの型であるかを明示。入力型（訳注：つまり`Self`の型）\\n\"\n\"    // が`Container(i32, i32)`である場合、出力型は`i32`と`i32`となります。\\n\"\n\n#: src/generics/assoc_items/types.md:56\nmsgid \"// `&Self::A` and `&Self::B` are also valid here.\\n\"\nmsgstr \"// `&i32`の代わりに`&Self::A`または`&Self::B`と書いても構いません\\n\"\n\n#: src/generics/phantom.md:3\nmsgid \"\"\n\"A phantom type parameter is one that doesn't show up at runtime, but is \"\n\"checked statically (and only) at compile time.\"\nmsgstr \"\"\n\"幽霊型とは実行時には存在しないけれども、コンパイル時に静的に型チェックされる\"\n\"ような型のことです。\"\n\n#: src/generics/phantom.md:6\nmsgid \"\"\n\"Data types can use extra generic type parameters to act as markers or to \"\n\"perform type checking at compile time. These extra parameters hold no \"\n\"storage values, and have no runtime behavior.\"\nmsgstr \"\"\n\"構造体などのデータ型は、ジェネリック型パラメータを一つ余分に持ち、それをマー\"\n\"カーとして使ったりコンパイル時の型検査に使ったりすることができます。このマー\"\n\"カーは実際の値を何も持たず、したがって実行時の挙動そのものにはいかなる影響も\"\n\"もたらしません。\"\n\n#: src/generics/phantom.md:10\nmsgid \"\"\n\"In the following example, we combine [std::marker::PhantomData](https://doc.\"\n\"rust-lang.org/std/marker/struct.PhantomData.html) with the phantom type \"\n\"parameter concept to create tuples containing different data types.\"\nmsgstr \"\"\n\"以下の例では、そのようなマーカーとして幽霊型（[std::marker::PhantomData]\"\n\"(https://doc.rust-lang.org/std/marker/struct.PhantomData.html)）を用い、それ\"\n\"ぞれ異なった型の値を持つタプルを作成します。\"\n\n#: src/generics/phantom.md:16\nmsgid \"\"\n\"// A phantom tuple struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"// ジェネリックなタプル構造体。2つ目のパラメータは幽霊型。\\n\"\n\n#: src/generics/phantom.md:18 src/generics/phantom.md:22\nmsgid \"// Allow equality test for this type.\\n\"\nmsgstr \"// 比較演算子（`==`）での比較を可能にします。\\n\"\n\n#: src/generics/phantom.md:20\nmsgid \"\"\n\"// A phantom type struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"// 同様に構造体を定義。\\n\"\n\n#: src/generics/phantom.md:24\nmsgid \"\"\n\"// Note: Storage is allocated for generic type `A`, but not for `B`.\\n\"\n\"//       Therefore, `B` cannot be used in computations.\\n\"\nmsgstr \"\"\n\"// 注意点:  ジェネリック型Aに対してはメモリが割り当てられていますが、\\n\"\n\"//          Bには割り当てられていないため、計算に使うことはできません。\\n\"\n\n#: src/generics/phantom.md:29\nmsgid \"\"\n\"// Here, `f32` and `f64` are the hidden parameters.\\n\"\n\"    // PhantomTuple type specified as `<char, f32>`.\\n\"\nmsgstr \"\"\n\"// ここで `f32` と `f64` は隠しパラメータです。\\n\"\n\"    // <char, f32>と型宣言されたPhantomTupleを作成。\\n\"\n\n#: src/generics/phantom.md:31 src/generics/phantom.md:33\n#: src/generics/phantom.md:37 src/generics/phantom.md:42\n#: src/scope/borrow/ref.md:12\nmsgid \"'Q'\"\nmsgstr \"'Q'\"\n\n#: src/generics/phantom.md:32\nmsgid \"// PhantomTuple type specified as `<char, f64>`.\\n\"\nmsgstr \"// <char, f64>と型宣言されたPhantomTupleを作成。\\n\"\n\n#: src/generics/phantom.md:35\nmsgid \"// Type specified as `<char, f32>`.\\n\"\nmsgstr \"// <char, f32>の型が与えられた構造体を作成。\\n\"\n\n#: src/generics/phantom.md:40\nmsgid \"// Type specified as `<char, f64>`.\\n\"\nmsgstr \"// 同様に<char, f64>の構造体\\n\"\n\n#: src/generics/phantom.md:46\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 yields: {}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\nmsgstr \"\"\n\"// コンパイルエラー！型が違うので比較することができません！\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 yields: {}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\n\n#: src/generics/phantom.md:50\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_struct1 == _struct2 yields: {}\\\",\\n\"\n\"    //           _struct1 == _struct2);\\n\"\nmsgstr \"\"\n\"// コンパイルエラー! 型が違うので比較することができません!\\n\"\n\"    // println!(\\\"_struct1 == _struct2 yields: {}\\\",\\n\"\n\"    //           _struct1 == _struct2);\\n\"\n\n#: src/generics/phantom.md:58\nmsgid \"\"\n\"[Derive](../trait/derive.md), [struct](../custom_types/structs.md), and \"\n\"[TupleStructs](../custom_types/structs.md)\"\nmsgstr \"\"\n\"[導出](../trait/derive.md), [構造体](../custom_types/structs.md), [タプル構造\"\n\"体](../custom_types/structs.md)\"\n\n#: src/generics/phantom/testcase_units.md:3\nmsgid \"\"\n\"A useful method of unit conversions can be examined by implementing `Add` \"\n\"with a phantom type parameter. The `Add` `trait` is examined below:\"\nmsgstr \"\"\n\"共通の単位同士を扱う際のチェックのために、`Add`を幽霊型を用いた実装にすると便\"\n\"利な場合があります。その場合`Add`トレイトは以下のようになります。\"\n\n#: src/generics/phantom/testcase_units.md:7\nmsgid \"\"\n\"// This construction would impose: `Self + RHS = Output`\\n\"\n\"// where RHS defaults to Self if not specified in the implementation.\\n\"\nmsgstr \"\"\n\"// このように定義しておくと、`Self + RHS = Output`であることが保証され、\\n\"\n\"// かつ、impl時にRHSの型が明示されていない場合、デフォルトでSelfと同じに\\n\"\n\"// なります。\\n\"\n\n#: src/generics/phantom/testcase_units.md:14\nmsgid \"// `Output` must be `T<U>` so that `T<U> + T<U> = T<U>`.\\n\"\nmsgstr \"\"\n\"// `Output`は`T<U>`でなくてはならないので`T<U> + T<U> = T<U>`となります。\\n\"\n\n#: src/generics/phantom/testcase_units.md:22\nmsgid \"The whole implementation:\"\nmsgstr \"以下は全体を示した例です。\"\n\n#: src/generics/phantom/testcase_units.md:27\nmsgid \"/// Create void enumerations to define unit types.\\n\"\nmsgstr \"/// 単位を定義するため、空の列挙型を作成。\\n\"\n\n#: src/generics/phantom/testcase_units.md:33\nmsgid \"\"\n\"/// `Length` is a type with phantom type parameter `Unit`,\\n\"\n\"/// and is not generic over the length type (that is `f64`).\\n\"\n\"///\\n\"\n\"/// `f64` already implements the `Clone` and `Copy` traits.\\n\"\nmsgstr \"\"\n\"/// `Length`は`Unit`という幽霊型パラメータを持つ型ですが\\n\"\n\"/// 長さを表す型はジェネリック型ではなく`f64`です。\\n\"\n\"///\\n\"\n\"/// `f64`ははじめから`Clone`、`Copy`トレイトを持っています。\\n\"\n\n#: src/generics/phantom/testcase_units.md:40\nmsgid \"/// The `Add` trait defines the behavior of the `+` operator.\\n\"\nmsgstr \"/// `Add`トレイトは加算演算子(`+`)の挙動を定義します。\\n\"\n\n#: src/generics/phantom/testcase_units.md:45\nmsgid \"// add() returns a new `Length` struct containing the sum.\\n\"\nmsgstr \"\"\n\"// add()は`Length`の新しいインスタンスを返します。\\n\"\n\"    // Lengthの中の値は合計値になっています。\\n\"\n\n#: src/generics/phantom/testcase_units.md:47\nmsgid \"// `+` calls the `Add` implementation for `f64`.\\n\"\nmsgstr \"// ここでの`+`は`f64`の`Add`実装を呼び出します。\\n\"\n\n#: src/generics/phantom/testcase_units.md:53\nmsgid \"// Specifies `one_foot` to have phantom type parameter `Inch`.\\n\"\nmsgstr \"// `one_foot`が幽霊型`Inch`を持つように明示します。\\n\"\n\n#: src/generics/phantom/testcase_units.md:55\nmsgid \"// `one_meter` has phantom type parameter `Mm`.\\n\"\nmsgstr \"// `one_meter`が幽霊型`Mm`を持つように明示します。\\n\"\n\n#: src/generics/phantom/testcase_units.md:58\nmsgid \"\"\n\"// `+` calls the `add()` method we implemented for `Length<Unit>`.\\n\"\n\"    //\\n\"\n\"    // Since `Length` implements `Copy`, `add()` does not consume\\n\"\n\"    // `one_foot` and `one_meter` but copies them into `self` and `rhs`.\\n\"\nmsgstr \"\"\n\"// 以下の`+`は上で定義した`Length<Unit>`用の`add()`メソッドを呼び出します。\\n\"\n\"    //\\n\"\n\"    // `Length`は`Copy`トレイトを持っているため、`add()`は`one_foot`と\"\n\"`one_meter`\\n\"\n\"    // を消費する代わりにそのコピーを作り、`self`、`rhs`として扱います。\\n\"\n\n#: src/generics/phantom/testcase_units.md:65\nmsgid \"// Addition works.\\n\"\nmsgstr \"// 加算が問題なく実行されていることを確認。\\n\"\n\n#: src/generics/phantom/testcase_units.md:66\nmsgid \"\\\"one foot + one_foot = {:?} in\\\"\"\nmsgstr \"\\\"one foot + one_foot = {:?} in\\\"\"\n\n#: src/generics/phantom/testcase_units.md:67\nmsgid \"\\\"one meter + one_meter = {:?} mm\\\"\"\nmsgstr \"\\\"one meter + one_meter = {:?} mm\\\"\"\n\n#: src/generics/phantom/testcase_units.md:69\nmsgid \"\"\n\"// Nonsensical operations fail as they should:\\n\"\n\"    // Compile-time Error: type mismatch.\\n\"\n\"    //let one_feter = one_foot + one_meter;\\n\"\nmsgstr \"\"\n\"// 異なる単位間の加算は意味を成さないので、\\n\"\n\"    // 以下はきちんとコンパイルエラーになります。\\n\"\n\"    // コンパイルエラー：タイプミスマッチ\\n\"\n\"    //let one_feter = one_foot + one_meter;\\n\"\n\n#: src/generics/phantom/testcase_units.md:77\nmsgid \"\"\n\"[Borrowing (`&`)](../../scope/borrow.md), [Bounds (`X: Y`)](../../generics/\"\n\"bounds.md), [enum](../../custom_types/enum.md), [impl & self](../../fn/\"\n\"methods.md), [Overloading](../../trait/ops.md), [ref](../../scope/borrow/ref.\"\n\"md), [Traits (`X for Y`)](../../trait.md), and [TupleStructs](../../\"\n\"custom_types/structs.md).\"\nmsgstr \"\"\n\"[借用 (`&`)](../../scope/borrow.md), [境界 (`X: Y`)](../../generics/bounds.\"\n\"md), [列挙型](../../custom_types/enum.md), [impl & self](../../fn/methods.\"\n\"md), [演算子のオーバーロード](../../trait/ops.md), [ref](../../scope/borrow/\"\n\"ref.md), [トレイト (`X for Y`)](../../trait.md), [タプル構造体](../../\"\n\"custom_types/structs.md).\"\n\n#: src/scope.md:3\nmsgid \"\"\n\"Scopes play an important part in ownership, borrowing, and lifetimes. That \"\n\"is, they indicate to the compiler when borrows are valid, when resources can \"\n\"be freed, and when variables are created or destroyed.\"\nmsgstr \"\"\n\"所有権、借用、ライフタイムといったRustに特有の概念において、変数のスコープは\"\n\"重要な役割を果たします。すなわち、スコープの存在によってコンパイラは借用は可\"\n\"能か否か、メモリ上の資源は解放可能か、変数はいつ作成され、いつ破棄されるか。\"\n\"といったことを知るのです。\"\n\n#: src/scope/raii.md:3\nmsgid \"\"\n\"Variables in Rust do more than just hold data in the stack: they also _own_ \"\n\"resources, e.g. `Box<T>` owns memory in the heap. Rust enforces [RAII]\"\n\"(https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization) \"\n\"(Resource Acquisition Is Initialization), so whenever an object goes out of \"\n\"scope, its destructor is called and its owned resources are freed.\"\nmsgstr \"\"\n\"Rustの変数は単にデータをスタック上に保持するだけのものではありません。例えば\"\n\"ヒープメモリを確保する`Box<T>`のように、変数はメモリ上の資源を *保有* する場\"\n\"合もあるのです。Rustは[RAII](https://en.wikipedia.org/wiki/\"\n\"Resource_Acquisition_Is_Initialization)(Resource Acquisition Is \"\n\"Initialization)を強制するので、オブジェクトがスコープを抜けると、必ずデストラ\"\n\"クタが呼び出されてそのオブジェクトが保持していた資源が解放されます。\"\n\n#: src/scope/raii.md:8\nmsgid \"\"\n\"This behavior shields against _resource leak_ bugs, so you'll never have to \"\n\"manually free memory or worry about memory leaks again! Here's a quick \"\n\"showcase:\"\nmsgstr \"\"\n\"この振る舞いは *リソースリーク* バグを防ぐのに役立ちます。手動でメモリを解放\"\n\"したり、メモリリークバグにわずらわされたりすることはなくなるのです！簡単な例\"\n\"で説明しましょう。\"\n\n#: src/scope/raii.md:12\nmsgid \"// raii.rs\\n\"\nmsgstr \"// raii.rs\\n\"\n\n#: src/scope/raii.md:14 src/scope/raii.md:21 src/scope/raii.md:26\nmsgid \"// Allocate an integer on the heap\\n\"\nmsgstr \"// 整数をヒープ上に確保。\\n\"\n\n#: src/scope/raii.md:17\nmsgid \"// `_box1` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box1`はここで破棄され、メモリは解放されます。\\n\"\n\n#: src/scope/raii.md:24\nmsgid \"// A nested scope:\\n\"\nmsgstr \"// ネストしたスコープ\\n\"\n\n#: src/scope/raii.md:29\nmsgid \"// `_box3` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box3`はここで破棄され、メモリは解放されます。\\n\"\n\n#: src/scope/raii.md:32\nmsgid \"\"\n\"// Creating lots of boxes just for fun\\n\"\n\"    // There's no need to manually free memory!\\n\"\nmsgstr \"\"\n\"// お遊びで大量のボックスを作ります。\\n\"\n\"    // もちろん手動で開放する必要はないよ！\\n\"\n\n#: src/scope/raii.md:38\nmsgid \"// `_box2` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box2`はここで破棄され、メモリは解放されます。\\n\"\n\n#: src/scope/raii.md:42\nmsgid \"\"\n\"Of course, we can double check for memory errors using [`valgrind`](http://\"\n\"valgrind.org/info/):\"\nmsgstr \"\"\n\"[`valgrind`](http://valgrind.org/info/)を用いて、メモリエラーが起きていないか\"\n\"2重チェックすることももちろん可能です。\"\n\n#: src/scope/raii.md:65\nmsgid \"No leaks here!\"\nmsgstr \"リークはないみたいですね！\"\n\n#: src/scope/raii.md:67\nmsgid \"Destructor\"\nmsgstr \"デストラクタ\"\n\n#: src/scope/raii.md:69\nmsgid \"\"\n\"The notion of a destructor in Rust is provided through the [`Drop`](https://\"\n\"doc.rust-lang.org/std/ops/trait.Drop.html) trait. The destructor is called \"\n\"when the resource goes out of scope. This trait is not required to be \"\n\"implemented for every type, only implement it for your type if you require \"\n\"its own destructor logic.\"\nmsgstr \"\"\n\"Rustにおけるデストラクタの概念は[`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html)トレイトによって提供されています。デストラクタは資源がスコー\"\n\"プを抜けるときに呼び出されます。`Drop`トレイトは型定義のたびに必ず実装する必\"\n\"要があるわけではなく、デストラクタに独自のロジックが必要な場合にのみ実装しま\"\n\"す。\"\n\n#: src/scope/raii.md:74\nmsgid \"\"\n\"Run the below example to see how the [`Drop`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Drop.html) trait works. When the variable in the `main` function \"\n\"goes out of scope the custom destructor will be invoked.\"\nmsgstr \"\"\n\"下のコードを実行して、[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html)トレイトの動作を確認してみましょう。`main`関数内の変数がスコープを抜ける\"\n\"ときにカスタムデストラクタが呼び出されるはずです。\"\n\n#: src/scope/raii.md:82\nmsgid \"\\\"ToDrop is being dropped\\\"\"\nmsgstr \"\\\"ToDrop is being dropped\\\"\"\n\n#: src/scope/raii.md:88\nmsgid \"\\\"Made a ToDrop!\\\"\"\nmsgstr \"\\\"Made a ToDrop!\\\"\"\n\n#: src/scope/raii.md:94\nmsgid \"[Box](../std/box.md)\"\nmsgstr \"[Box](../std/box.md)\"\n\n#: src/scope/move.md:3\nmsgid \"\"\n\"Because variables are in charge of freeing their own resources, **resources \"\n\"can only have one owner**. This prevents resources from being freed more \"\n\"than once. Note that not all variables own resources (e.g. [references](../\"\n\"flow_control/match/destructuring/destructure_pointers.md)).\"\nmsgstr \"\"\n\"変数には自身の保持する資源を開放する責任があるため、**資源は一度に一つの所有\"\n\"者** しか持つことができません。これはまた、資源を2度以上開放することができな\"\n\"いということでもあります。ここで、全ての変数が資源を所有するわけではないとい\"\n\"うことに注意しましょう。（e.g. [参照](../flow_control/match/destructuring/\"\n\"destructure_pointers.md)）\"\n\n#: src/scope/move.md:8\nmsgid \"\"\n\"When doing assignments (`let x = y`) or passing function arguments by value \"\n\"(`foo(x)`), the _ownership_ of the resources is transferred. In Rust-speak, \"\n\"this is known as a _move_.\"\nmsgstr \"\"\n\"変数を代入する（`let x = y`）際や、関数に引数を値渡しする（`foo(x)`）際は、資\"\n\"源の *所有権* が移動します。Rustっぽく言うと、「 *ムーブ* 」です。\"\n\n#: src/scope/move.md:12\nmsgid \"\"\n\"After moving resources, the previous owner can no longer be used. This \"\n\"avoids creating dangling pointers.\"\nmsgstr \"\"\n\"資源を移動すると、それまでの所有者（訳注：変数などのこと）を使用することはで\"\n\"きなくなります。これによりダングリングポインタの発生を防げます。\"\n\n#: src/scope/move.md:16\nmsgid \"// This function takes ownership of the heap allocated memory\\n\"\nmsgstr \"// この関数はヒープメモリ上の資源の所有権を取ります。\\n\"\n\n#: src/scope/move.md:18\nmsgid \"\\\"Destroying a box that contains {}\\\"\"\nmsgstr \"\\\"Destroying a box that contains {}\\\"\"\n\n#: src/scope/move.md:20\nmsgid \"// `c` is destroyed and the memory freed\\n\"\nmsgstr \"// `c`は破棄されメモリは開放されます。\\n\"\n\n#: src/scope/move.md:24\nmsgid \"// _Stack_ allocated integer\\n\"\nmsgstr \"// _スタック_上に置かれた整数\\n\"\n\n#: src/scope/move.md:27\nmsgid \"// *Copy* `x` into `y` - no resources are moved\\n\"\nmsgstr \"// `x`を`y`に *コピー* します。元の値が移動するわけではありません。\\n\"\n\n#: src/scope/move.md:30\nmsgid \"// Both values can be independently used\\n\"\nmsgstr \"// 両方の値はそれぞれ独立に使うことができます。\\n\"\n\n#: src/scope/move.md:31\nmsgid \"\\\"x is {}, and y is {}\\\"\"\nmsgstr \"\\\"x is {}, and y is {}\\\"\"\n\n#: src/scope/move.md:33\nmsgid \"// `a` is a pointer to a _heap_ allocated integer\\n\"\nmsgstr \"// `a`は_ヒープ_上の整数へのポインタ。\\n\"\n\n#: src/scope/move.md:36\nmsgid \"\\\"a contains: {}\\\"\"\nmsgstr \"\\\"a contains: {}\\\"\"\n\n#: src/scope/move.md:38\nmsgid \"// *Move* `a` into `b`\\n\"\nmsgstr \"// `a`を`b`に *ムーブ* します。\\n\"\n\n#: src/scope/move.md:40\nmsgid \"\"\n\"// The pointer address of `a` is copied (not the data) into `b`.\\n\"\n\"    // Both are now pointers to the same heap allocated data, but\\n\"\n\"    // `b` now owns it.\\n\"\nmsgstr \"\"\n\"// すなわち、`a`の指すメモリ上の番地が`b`にコピーされるため\\n\"\n\"    // いずれもヒープ上の同じ値を指すポインタとなります。\\n\"\n\"    // しかし所有権は`b`にあります。\\n\"\n\n#: src/scope/move.md:44\nmsgid \"\"\n\"// Error! `a` can no longer access the data, because it no longer owns the\\n\"\n\"    // heap memory\\n\"\n\"    //println!(\\\"a contains: {}\\\", a);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`a`は所有権を持たないため、ヒープ上のデータにアクセスできませ\"\n\"ん。\\n\"\n\"    //println!(\\\"a contains: {}\\\", a);\\n\"\n\"    // TODO ^ 試しにここをアンコメントしてみましょう。\\n\"\n\n#: src/scope/move.md:49\nmsgid \"\"\n\"// This function takes ownership of the heap allocated memory from `b`\\n\"\nmsgstr \"// この関数はヒープメモリ上の所有権を`b`から取ります。\\n\"\n\n#: src/scope/move.md:52\nmsgid \"\"\n\"// Since the heap memory has been freed at this point, this action would\\n\"\n\"    // result in dereferencing freed memory, but it's forbidden by the \"\n\"compiler\\n\"\n\"    // Error! Same reason as the previous Error\\n\"\n\"    //println!(\\\"b contains: {}\\\", b);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// この時点でヒープメモリ上の資源は開放されているので、次の操作は\\n\"\n\"    // 解放済みメモリをデリファレンスすることになります。\\n\"\n\"    // しかしそれはコンパイラが許しません。\\n\"\n\"    // エラー！上述の理由より\\n\"\n\"    //println!(\\\"b contains: {}\\\", b);\\n\"\n\"    // TODO ^ 試しにここをアンコメントしてみましょう。\\n\"\n\n#: src/scope/move/mut.md:3\nmsgid \"Mutability of data can be changed when ownership is transferred.\"\nmsgstr \"データのミュータビリティは所有権を移譲した際に変更できます。\"\n\n#: src/scope/move/mut.md:9\nmsgid \"\\\"immutable_box contains {}\\\"\"\nmsgstr \"\\\"immutable_box contains {}\\\"\"\n\n#: src/scope/move/mut.md:11\nmsgid \"\"\n\"// Mutability error\\n\"\n\"    //*immutable_box = 4;\\n\"\nmsgstr \"\"\n\"// ミュータビリティエラー\\n\"\n\"    //*immutable_box = 4;\\n\"\n\n#: src/scope/move/mut.md:14\nmsgid \"// *Move* the box, changing the ownership (and mutability)\\n\"\nmsgstr \"// boxを *ムーブ* する、同時に所有権とミュータビリティを変更します。\\n\"\n\n#: src/scope/move/mut.md:17\nmsgid \"\\\"mutable_box contains {}\\\"\"\nmsgstr \"\\\"mutable_box contains {}\\\"\"\n\n#: src/scope/move/mut.md:19\nmsgid \"// Modify the contents of the box\\n\"\nmsgstr \"// boxの内容を変更。\\n\"\n\n#: src/scope/move/mut.md:22\nmsgid \"\\\"mutable_box now contains {}\\\"\"\nmsgstr \"\\\"mutable_box now contains {}\\\"\"\n\n#: src/scope/move/partial_move.md:3\nmsgid \"\"\n\"Within the [destructuring](../../flow_control/match/destructuring.md) of a \"\n\"single variable, both `by-move` and `by-reference` pattern bindings can be \"\n\"used at the same time. Doing this will result in a _partial move_ of the \"\n\"variable, which means that parts of the variable will be moved while other \"\n\"parts stay. In such a case, the parent variable cannot be used afterwards as \"\n\"a whole, however the parts that are only referenced (and not moved) can \"\n\"still be used.\"\nmsgstr \"\"\n\"1つの変数の [デストラクト](../../flow_control/match/destructuring.md) の中\"\n\"で、`ムーブ` と `参照` の両方のパターン束縛を同時に使用することができます。両\"\n\"方を使用すると、変数の一部がムーブされ、他の部分が参照として残るという変数の\"\n\"部分的ムーブが発生した状態になります。変数の部分的ムーブが発生すると親変数は\"\n\"その後使用できませんが、参照されているだけの部分（ムーブされていない部分）は\"\n\"使用することができます。\"\n\n#: src/scope/move/partial_move.md:24\nmsgid \"// `name` is moved out of person, but `age` is referenced\\n\"\nmsgstr \"// `name` は person からムーブしたが、 `age` は参照されています。\\n\"\n\n#: src/scope/move/partial_move.md:27\nmsgid \"\\\"The person's age is {}\\\"\"\nmsgstr \"\\\"The person's age is {}\\\"\"\n\n#: src/scope/move/partial_move.md:29\nmsgid \"\\\"The person's name is {}\\\"\"\nmsgstr \"\\\"The person's name is {}\\\"\"\n\n#: src/scope/move/partial_move.md:31\nmsgid \"\"\n\"// Error! borrow of partially moved value: `person` partial move occurs\\n\"\n\"    //println!(\\\"The person struct is {:?}\\\", person);\\n\"\nmsgstr \"\"\n\"// エラー！部分的ムーブした値の借用：`person` では部分的ムーブが発生していま\"\n\"す。\\n\"\n\"    //println!(\\\"The person struct is {:?}\\\", person);\\n\"\n\n#: src/scope/move/partial_move.md:34\nmsgid \"\"\n\"// `person` cannot be used but `person.age` can be used as it is not moved\\n\"\nmsgstr \"\"\n\"// `person` は使用できませんが、\\n\"\n\"    // `person.age` はムーブしていないので使用できます。\\n\"\n\n#: src/scope/move/partial_move.md:35\nmsgid \"\\\"The person's age from person struct is {}\\\"\"\nmsgstr \"\\\"The person's age from person struct is {}\\\"\"\n\n#: src/scope/move/partial_move.md:38\nmsgid \"\"\n\"(In this example, we store the `age` variable on the heap to illustrate the \"\n\"partial move: deleting `ref` in the above code would give an error as the \"\n\"ownership of `person.age` would be moved to the variable `age`. If `Person.\"\n\"age` were stored on the stack, `ref` would not be required as the definition \"\n\"of `age` would copy the data from `person.age` without moving it.)\"\nmsgstr \"\"\n\"この例では、`age`変数をヒープ上に保持し、部分的ムーブを説明しています。上記\"\n\"コードで`ref`を削除すると、`person.age`の所有権が`age`変数にムーブされるた\"\n\"め、エラーになります。もしも`Person.age`がスタック上に保持されていたら、`age`\"\n\"の定義が`person.age`をムーブすることなくデータをコピーするので、`ref`は必須で\"\n\"はないのですが、実際にはヒープ上に保持されているため`ref`は必須です。\"\n\n#: src/scope/move/partial_move.md:46\nmsgid \"[destructuring](../../flow_control/match/destructuring.md)\"\nmsgstr \"[デストラクト](../../flow_control/match/destructuring.md)\"\n\n#: src/scope/borrow.md:3\nmsgid \"\"\n\"Most of the time, we'd like to access data without taking ownership over it. \"\n\"To accomplish this, Rust uses a _borrowing_ mechanism. Instead of passing \"\n\"objects by value (`T`), objects can be passed by reference (`&T`).\"\nmsgstr \"\"\n\"実際には、データの所有権を完全に受け渡すことなく一時的にアクセスしたいという\"\n\"場合がほとんどです。そのために、Rustでは *借用* という仕組みを用います。値そ\"\n\"のもの（`T`）を受け渡すのではなく、その参照（`&T`）を渡すのです。\"\n\n#: src/scope/borrow.md:7\nmsgid \"\"\n\"The compiler statically guarantees (via its borrow checker) that references \"\n\"_always_ point to valid objects. That is, while references to an object \"\n\"exist, the object cannot be destroyed.\"\nmsgstr \"\"\n\"コンパイラは借用チェッカを用いて参照が *常に* 有効なオブジェクトへの参照であ\"\n\"ることを、コンパイル時に保証します。つまり、あるオブジェクトへの参照が存在し\"\n\"ているならば、そのオブジェクトを破壊することはできないということです。\"\n\n#: src/scope/borrow.md:12\nmsgid \"// This function takes ownership of a box and destroys it\\n\"\nmsgstr \"// この関数はボックスの所有権を奪い、破棄します。\\n\"\n\n#: src/scope/borrow.md:14\nmsgid \"\\\"Destroying box that contains {}\\\"\"\nmsgstr \"\\\"Destroying box that contains {}\\\"\"\n\n#: src/scope/borrow.md:16\nmsgid \"// This function borrows an i32\\n\"\nmsgstr \"// この関数はi32を借用します。\\n\"\n\n#: src/scope/borrow.md:19\nmsgid \"\\\"This int is: {}\\\"\"\nmsgstr \"\\\"This int is: {}\\\"\"\n\n#: src/scope/borrow.md:23\nmsgid \"\"\n\"// Create a boxed i32 in the heap, and a i32 on the stack\\n\"\n\"    // Remember: numbers can have arbitrary underscores added for \"\n\"readability\\n\"\n\"    // 5_i32 is the same as 5i32\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:29\nmsgid \"\"\n\"// Borrow the contents of the box. Ownership is not taken,\\n\"\n\"    // so the contents can be borrowed again.\\n\"\nmsgstr \"\"\n\"// Boxの中身を借用。所有権を奪うわけではないため、\\n\"\n\"    // 直後にもう一度借用できます。\\n\"\n\n#: src/scope/borrow.md:35\nmsgid \"// Take a reference to the data contained inside the box\\n\"\nmsgstr \"// ボックス内の要素に対する参照を取得。\\n\"\n\n#: src/scope/borrow.md:38\nmsgid \"\"\n\"// Error!\\n\"\n\"        // Can't destroy `boxed_i32` while the inner value is borrowed later \"\n\"in scope.\\n\"\nmsgstr \"\"\n\"// エラー!\\n\"\n\"        // ボックス内の要素が借用されているため、`boxed_i32`を破棄する\\n\"\n\"        // ことはできません。\\n\"\n\n#: src/scope/borrow.md:43\nmsgid \"// Attempt to borrow `_ref_to_i32` after inner value is destroyed\\n\"\nmsgstr \"\"\n\n#: src/scope/borrow.md:45\nmsgid \"// `_ref_to_i32` goes out of scope and is no longer borrowed.\\n\"\nmsgstr \"// ここで`_ref_to_i32`はスコープを抜け、借用もなくなります。\\n\"\n\n#: src/scope/borrow.md:48\nmsgid \"\"\n\"// `boxed_i32` can now give up ownership to `eat_box_32` and be destroyed\\n\"\nmsgstr \"\"\n\"// ここでようやく、`boxed_i32`は所有権を`eat_box_32`に移譲し、破棄することが\"\n\"できます。\\n\"\n\n#: src/scope/borrow/mut.md:3\nmsgid \"\"\n\"Mutable data can be mutably borrowed using `&mut T`. This is called a \"\n\"_mutable reference_ and gives read/write access to the borrower. In \"\n\"contrast, `&T` borrows the data via an immutable reference, and the borrower \"\n\"can read the data but not modify it:\"\nmsgstr \"\"\n\"ミュータブルなデータは`&mut T`でミュータブルに（変更可能な形で）借用すること\"\n\"ができます。これは *ミュータブルな参照* と呼ばれ、読み込み・書き込みの権限を\"\n\"借用者に与えます。対照的に`&T`はデータをイミュータブルな参照を介して借用し、\"\n\"借用した側はデータを読み込みはできますが書き込みはできません。\"\n\n#: src/scope/borrow/mut.md:12\nmsgid \"\"\n\"// `&'static str` is a reference to a string allocated in read only memory\\n\"\nmsgstr \"// `&'static str`はread-onlyメモリ上の文字列への参照。\\n\"\n\n#: src/scope/borrow/mut.md:17\nmsgid \"// This function takes a reference to a book\\n\"\nmsgstr \"// この関数はBook型への参照を取ります。\\n\"\n\n#: src/scope/borrow/mut.md:20\nmsgid \"\\\"I immutably borrowed {} - {} edition\\\"\"\nmsgstr \"\\\"I immutably borrowed {} - {} edition\\\"\"\n\n#: src/scope/borrow/mut.md:22\nmsgid \"\"\n\"// This function takes a reference to a mutable book and changes `year` to \"\n\"2014\\n\"\nmsgstr \"\"\n\"// この関数はミュータブルなBook型へのミュータブルな参照を取り、\\n\"\n\"// `year`を2014へ変更します。\\n\"\n\n#: src/scope/borrow/mut.md:26\nmsgid \"\\\"I mutably borrowed {} - {} edition\\\"\"\nmsgstr \"\\\"I mutably borrowed {} - {} edition\\\"\"\n\n#: src/scope/borrow/mut.md:30\nmsgid \"// Create an immutable Book named `immutabook`\\n\"\nmsgstr \"// `immutabook`という名のイミュータブルなBookを作成。\\n\"\n\n#: src/scope/borrow/mut.md:32\nmsgid \"// string literals have type `&'static str`\\n\"\nmsgstr \"// 文字列リテラルは`&'static str`型になります。\\n\"\n\n#: src/scope/borrow/mut.md:33\nmsgid \"\\\"Douglas Hofstadter\\\"\"\nmsgstr \"\\\"Douglas Hofstadter\\\"\"\n\n#: src/scope/borrow/mut.md:34\nmsgid \"\\\"Gödel, Escher, Bach\\\"\"\nmsgstr \"\\\"Gödel, Escher, Bach\\\"\"\n\n#: src/scope/borrow/mut.md:38\nmsgid \"// Create a mutable copy of `immutabook` and call it `mutabook`\\n\"\nmsgstr \"\"\n\"// `immutabook`のミュータブルなコピーを作成し、`mutabook`と名付けます。\\n\"\n\n#: src/scope/borrow/mut.md:41\nmsgid \"// Immutably borrow an immutable object\\n\"\nmsgstr \"// イミュータブルなオブジェクトをイミュータブルに借用します。\\n\"\n\n#: src/scope/borrow/mut.md:44\nmsgid \"// Immutably borrow a mutable object\\n\"\nmsgstr \"// ミュータブルなオブジェクトをイミュータブルに借用します。\\n\"\n\n#: src/scope/borrow/mut.md:47\nmsgid \"// Borrow a mutable object as mutable\\n\"\nmsgstr \"// ミュータブルなオブジェクトをミュータブルに借用します。\\n\"\n\n#: src/scope/borrow/mut.md:50\nmsgid \"// Error! Cannot borrow an immutable object as mutable\\n\"\nmsgstr \"\"\n\"// エラー！イミュータブルなオブジェクトをミュータブルに借用できません。\\n\"\n\n#: src/scope/borrow/mut.md:57\nmsgid \"[`static`](../lifetime/static_lifetime.md)\"\nmsgstr \"[`static`](../lifetime/static_lifetime.md)\"\n\n#: src/scope/borrow/alias.md:3\nmsgid \"\"\n\"Data can be immutably borrowed any number of times, but while immutably \"\n\"borrowed, the original data can't be mutably borrowed. On the other hand, \"\n\"only _one_ mutable borrow is allowed at a time. The original data can be \"\n\"borrowed again only _after_ the mutable reference has been used for the last \"\n\"time.\"\nmsgstr \"\"\n\"データは一度にいくつでもイミュータブルに借用することができますが、その間オリ\"\n\"ジナルのデータをミュータブルに借用することはできません。一方でミュータブルな\"\n\"借用は一度に *一つ* しか借用することができません。オリジナルのデータをもう一\"\n\"度借用できるのはミュータブルな参照が最後に使われた場所より *あとで* なければ\"\n\"いけません。\"\n\n#: src/scope/borrow/alias.md:17\nmsgid \"// Data can be accessed via the references and the original owner\\n\"\nmsgstr \"// データは元々の持ち主と参照の両方からアクセスすることができます。\\n\"\n\n#: src/scope/borrow/alias.md:18 src/scope/borrow/alias.md:27\n#: src/scope/borrow/alias.md:49\nmsgid \"\\\"Point has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\\\"Point has coordinates: ({}, {}, {})\\\"\"\n\n#: src/scope/borrow/alias.md:21\nmsgid \"\"\n\"// Error! Can't borrow `point` as mutable because it's currently\\n\"\n\"    // borrowed as immutable.\\n\"\n\"    // let mutable_borrow = &mut point;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！pointはすでにイミュータブルに借用されているため、\\n\"\n\"    // ミュータブルに借用することができません。\\n\"\n\"    // let mutable_borrow = &mut point;\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/scope/borrow/alias.md:26\nmsgid \"// The borrowed values are used again here\\n\"\nmsgstr \"// 借用された値はここで再び利用されます。\\n\"\n\n#: src/scope/borrow/alias.md:30\nmsgid \"\"\n\"// The immutable references are no longer used for the rest of the code so\\n\"\n\"    // it is possible to reborrow with a mutable reference.\\n\"\nmsgstr \"\"\n\"// イミュータブルな参照がこれ以降のコードで利用されていないため、\\n\"\n\"    // ミュータブルな参照として再借用できます。\\n\"\n\n#: src/scope/borrow/alias.md:34\nmsgid \"// Change data via mutable reference\\n\"\nmsgstr \"// ミュータブルな参照を介してデータを変更します。\\n\"\n\n#: src/scope/borrow/alias.md:39\nmsgid \"\"\n\"// Error! Can't borrow `point` as immutable because it's currently\\n\"\n\"    // borrowed as mutable.\\n\"\n\"    // let y = &point.y;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`point`はすでにミュータブルに借用されているため、\\n\"\n\"    // イミュータブルに借用することはできません。\\n\"\n\"    // let y = &point.y;\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/scope/borrow/alias.md:44\nmsgid \"\"\n\"// Error! Can't print because `println!` takes an immutable reference.\\n\"\n\"    // println!(\\\"Point Z coordinate is {}\\\", point.z);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`println!`はイミュータブルな参照を取るため、printできません。\\n\"\n\"    // println!(\\\"Point Z coordinate is {}\\\", point.z);\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/scope/borrow/alias.md:48\nmsgid \"// Ok! Mutable references can be passed as immutable to `println!`\\n\"\nmsgstr \"\"\n\"// OK！ミュータブルな参照は`println!`にイミュータブルな参照として渡せます。\\n\"\n\n#: src/scope/borrow/alias.md:52\nmsgid \"\"\n\"// The mutable reference is no longer used for the rest of the code so it\\n\"\n\"    // is possible to reborrow\\n\"\nmsgstr \"\"\n\"// ミュータブルな参照がこれ以降のコードで未使用なので、再借用できます。\\n\"\n\n#: src/scope/borrow/alias.md:55\nmsgid \"\\\"Point now has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\\\"Point now has coordinates: ({}, {}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:3\nmsgid \"\"\n\"When doing pattern matching or destructuring via the `let` binding, the \"\n\"`ref` keyword can be used to take references to the fields of a struct/\"\n\"tuple. The example below shows a few instances where this can be useful:\"\nmsgstr \"\"\n\"`let`を介してデストラクトやパターンマッチングを行う場合、`ref`キーワードを用\"\n\"いて構造体・タプルのフィールドへの参照を取得することができます。以下の例では\"\n\"これが有用になる例を幾つかお見せします。\"\n\n#: src/scope/borrow/ref.md:14\nmsgid \"\"\n\"// A `ref` borrow on the left side of an assignment is equivalent to\\n\"\n\"    // an `&` borrow on the right side.\\n\"\nmsgstr \"\"\n\"// 左辺に`ref`をつけることによる借用と、右辺に`&`をつけることによる借用は等\"\n\"価。\\n\"\n\n#: src/scope/borrow/ref.md:19\nmsgid \"\\\"ref_c1 equals ref_c2: {}\\\"\"\nmsgstr \"\\\"ref_c1 equals ref_c2: {}\\\"\"\n\n#: src/scope/borrow/ref.md:23\nmsgid \"// `ref` is also valid when destructuring a struct.\\n\"\nmsgstr \"// `ref`は構造体をデストラクトする際にも有用。\\n\"\n\n#: src/scope/borrow/ref.md:25\nmsgid \"// `ref_to_x` is a reference to the `x` field of `point`.\\n\"\nmsgstr \"// `ref_to_x`は`point`の`x`フィールドへの参照。\\n\"\n\n#: src/scope/borrow/ref.md:28\nmsgid \"// Return a copy of the `x` field of `point`.\\n\"\nmsgstr \"// `point`の`x`フィールドへのコピーを返します。\\n\"\n\n#: src/scope/borrow/ref.md:32\nmsgid \"// A mutable copy of `point`\\n\"\nmsgstr \"// `point`へのミュータブルなコピー\\n\"\n\n#: src/scope/borrow/ref.md:36\nmsgid \"// `ref` can be paired with `mut` to take mutable references.\\n\"\nmsgstr \"\"\n\"// `ref`は`mut`とともに使い、ミュータブルな参照を取ることもできます。\\n\"\n\n#: src/scope/borrow/ref.md:39\nmsgid \"// Mutate the `y` field of `mutable_point` via a mutable reference.\\n\"\nmsgstr \"\"\n\"// `mutable_point`の`y`というミュータブルなフィールドの値を変更します。\\n\"\n\n#: src/scope/borrow/ref.md:43\nmsgid \"\\\"point is ({}, {})\\\"\"\nmsgstr \"\\\"point is ({}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:44\nmsgid \"\\\"mutable_point is ({}, {})\\\"\"\nmsgstr \"\\\"mutable_point is ({}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:46\nmsgid \"// A mutable tuple that includes a pointer\\n\"\nmsgstr \"// ポインタを含むミュータブルなタプル\\n\"\n\n#: src/scope/borrow/ref.md:50\nmsgid \"// Destructure `mutable_tuple` to change the value of `last`.\\n\"\nmsgstr \"// `mutable_tuple`をデストラクトして、`last`の値を変更。\\n\"\n\n#: src/scope/borrow/ref.md:55\nmsgid \"\\\"tuple is {:?}\\\"\"\nmsgstr \"\\\"tuple is {:?}\\\"\"\n\n#: src/scope/lifetime.md:3\nmsgid \"\"\n\"A _lifetime_ is a construct the compiler (or more specifically, its _borrow \"\n\"checker_) uses to ensure all borrows are valid. Specifically, a variable's \"\n\"lifetime begins when it is created and ends when it is destroyed. While \"\n\"lifetimes and scopes are often referred to together, they are not the same.\"\nmsgstr \"\"\n\"*ライフタイム* はコンパイラ（借用チェッカーと呼ばれる場合もあります）が、全て\"\n\"の借用に問題がないことを確認するために使用する仕組みです。正確にいうと、変数\"\n\"のライフタイムは作成時に開始し、破棄された時に終了します。ライフタイムとス\"\n\"コープは同時に語られることが多いですが、同じものではありません。\"\n\n#: src/scope/lifetime.md:8\nmsgid \"\"\n\"Take, for example, the case where we borrow a variable via `&`. The borrow \"\n\"has a lifetime that is determined by where it is declared. As a result, the \"\n\"borrow is valid as long as it ends before the lender is destroyed. However, \"\n\"the scope of the borrow is determined by where the reference is used.\"\nmsgstr \"\"\n\"例として`&`を用いて変数を借用する場合をあげましょう。借用のライフタイムは宣言\"\n\"時に決定し、そこから貸し手が破棄されるまで続きます。しかしながら、借用のス\"\n\"コープは参照が使われる際に決定します。\"\n\n#: src/scope/lifetime.md:13\nmsgid \"\"\n\"In the following example and in the rest of this section, we will see how \"\n\"lifetimes relate to scopes, as well as how the two differ.\"\nmsgstr \"\"\n\"以下の例からこのセクションの残りでは、ライフタイムとスコープの関係、そしてそ\"\n\"れらがいかに異なるものであるかを見ていきます。\"\n\n#: src/scope/lifetime.md:17\nmsgid \"\"\n\"// Lifetimes are annotated below with lines denoting the creation\\n\"\n\"// and destruction of each variable.\\n\"\n\"// `i` has the longest lifetime because its scope entirely encloses \\n\"\n\"// both `borrow1` and `borrow2`. The duration of `borrow1` compared \\n\"\n\"// to `borrow2` is irrelevant since they are disjoint.\\n\"\nmsgstr \"\"\n\"// 以下では、変数の作成から破棄までのライフタイムを線で示しています。\\n\"\n\"// `i`は最長のライフタイムを持ち、そのスコープは`borrow1`および`borrow2`\\n\"\n\"// のスコープを完全に包含します。\\n\"\n\"// `borrow1`と`borrow2`の存続期間は一切重なりません。\\n\"\n\n#: src/scope/lifetime.md:23\nmsgid \"\"\n\"// Lifetime for `i` starts. ────────────────┐\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `i`のライフタイム開始 ───────────────────┐\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:25 src/scope/lifetime.md:32\nmsgid \"//                                                   │\\n\"\nmsgstr \"//                                                   │\\n\"\n\n#: src/scope/lifetime.md:26\nmsgid \"\"\n\"// `borrow1` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\"// `borrow1`のライフタイム開始──┐│\\n\"\n\"        //                                                ││\\n\"\n\n#: src/scope/lifetime.md:28\nmsgid \"\\\"borrow1: {}\\\"\"\nmsgstr \"\\\"borrow1: {}\\\"\"\n\n#: src/scope/lifetime.md:28 src/scope/lifetime.md:35\nmsgid \"//              ││\\n\"\nmsgstr \"//              ││\\n\"\n\n#: src/scope/lifetime.md:29\nmsgid \"\"\n\"// `borrow1` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `borrow1` 終了 ──────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:33\nmsgid \"\"\n\"// `borrow2` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\"// `borrow2`のライフタイム開始──┐│\\n\"\n\"        //                                                ││\\n\"\n\n#: src/scope/lifetime.md:35\nmsgid \"\\\"borrow2: {}\\\"\"\nmsgstr \"\\\"borrow2: {}\\\"\"\n\n#: src/scope/lifetime.md:36\nmsgid \"\"\n\"// `borrow2` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `borrow2` 終了 ──────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:38\nmsgid \"// Lifetime ends. ─────────────────────────────────────┘\\n\"\nmsgstr \"// ライフタイム終了 ───────────────────────────────────┘\\n\"\n\n#: src/scope/lifetime.md:41\nmsgid \"\"\n\"Note that no names or types are assigned to label lifetimes. This restricts \"\n\"how lifetimes will be able to be used as we will see.\"\nmsgstr \"\"\n\"ここで、一切の名前や型がライフタイムに代入されていないことに注意しましょう。\"\n\"これにより、ライフタイムの使われ方がこれから見ていくようなやり方に制限されま\"\n\"す。\"\n\n#: src/scope/lifetime/explicit.md:3\nmsgid \"\"\n\"The borrow checker uses explicit lifetime annotations to determine how long \"\n\"references should be valid. In cases where lifetimes are not elided[^1], \"\n\"Rust requires explicit annotations to determine what the lifetime of a \"\n\"reference should be. The syntax for explicitly annotating a lifetime uses an \"\n\"apostrophe character as follows:\"\nmsgstr \"\"\n\"借用チェッカーは参照がどれだけの間有効かを決定するために、明示的なアノテー\"\n\"ションを使用します。ライフタイムが省略[^1]されなかった場合、Rustは参照のライ\"\n\"フタイムがどのようなものであるか、明示的なアノテーションを必要とします。\"\n\n#: src/scope/lifetime/explicit.md:10\nmsgid \"// `foo` has a lifetime parameter `'a`\\n\"\nmsgstr \"// `foo`は`'a`というライフタイムパラメータを持ちます。\\n\"\n\n#: src/scope/lifetime/explicit.md:14\nmsgid \"\"\n\"Similar to [closures](../../fn/closures/anonymity.md), using lifetimes \"\n\"requires generics. Additionally, this lifetime syntax indicates that the \"\n\"lifetime of `foo` may not exceed that of `'a`. Explicit annotation of a type \"\n\"has the form `&'a T` where `'a` has already been introduced.\"\nmsgstr \"\"\n\"[クロージャ](../../fn/closures/anonymity.md)と同様、ライフタイムの使用はジェ\"\n\"ネリクスを必要とします。もう少し詳しく言うと、この書き方は「`foo`のライフタイ\"\n\"ムは`'a`のそれを超えることはない。」ということを示しており、型を明示した場合\"\n\"`'a`は`&'a T`となるということです。\"\n\n#: src/scope/lifetime/explicit.md:19\nmsgid \"In cases with multiple lifetimes, the syntax is similar:\"\nmsgstr \"ライフタイムが複数ある場合も、同じような構文になります。\"\n\n#: src/scope/lifetime/explicit.md:22\nmsgid \"// `foo` has lifetime parameters `'a` and `'b`\\n\"\nmsgstr \"// `foo`は`'a`と`'b`というライフタイムパラメータを持ちます。\\n\"\n\n#: src/scope/lifetime/explicit.md:26\nmsgid \"\"\n\"In this case, the lifetime of `foo` cannot exceed that of either `'a` _or_ \"\n\"`'b`.\"\nmsgstr \"\"\n\"この場合は、`foo`のライフタイムは`'a`、`'b`の *いずれよりも* 長くなってはなり\"\n\"ません。\"\n\n#: src/scope/lifetime/explicit.md:28\nmsgid \"See the following example for explicit lifetime annotation in use:\"\nmsgstr \"以下はライフタイムを明示的に書く場合の例です。\"\n\n#: src/scope/lifetime/explicit.md:31\nmsgid \"\"\n\"// `print_refs` takes two references to `i32` which have different\\n\"\n\"// lifetimes `'a` and `'b`. These two lifetimes must both be at\\n\"\n\"// least as long as the function `print_refs`.\\n\"\nmsgstr \"\"\n\"// `print_refs`は`i32`への参照を2つとり、それぞれ`'a`と`'b`という\\n\"\n\"// ライフタイムを持ちます。これらのライフタイムは最短でも`print_refs`\\n\"\n\"// 関数と同じになります。\\n\"\n\n#: src/scope/lifetime/explicit.md:35\nmsgid \"\\\"x is {} and y is {}\\\"\"\nmsgstr \"\\\"x is {} and y is {}\\\"\"\n\n#: src/scope/lifetime/explicit.md:37\nmsgid \"\"\n\"// A function which takes no arguments, but has a lifetime parameter `'a`.\\n\"\nmsgstr \"// 引数を取らないがライフタイムパラメータ`'a`を持つ関数\\n\"\n\n#: src/scope/lifetime/explicit.md:42\nmsgid \"// ERROR: `_x` does not live long enough\\n\"\nmsgstr \"// エラー：`_x`の寿命が短すぎる。\\n\"\n\n#: src/scope/lifetime/explicit.md:44\nmsgid \"\"\n\"// Attempting to use the lifetime `'a` as an explicit type annotation \\n\"\n\"    // inside the function will fail because the lifetime of `&_x` is \"\n\"shorter\\n\"\n\"    // than that of `_y`. A short lifetime cannot be coerced into a longer \"\n\"one.\\n\"\nmsgstr \"\"\n\"// `&_x`のライフタイムは`y`のそれよりも短いため、関数内で`'a`を使用して\\n\"\n\"    // 変数のライフタイムを指定しようとすると失敗します。つまり、短いライフタ\"\n\"イム\\n\"\n\"    // を持つ参照をより長いものに強制的に代入することはできません。\\n\"\n\n#: src/scope/lifetime/explicit.md:50\nmsgid \"// Create variables to be borrowed below.\\n\"\nmsgstr \"// 下で借用するための変数を作成。\\n\"\n\n#: src/scope/lifetime/explicit.md:53\nmsgid \"// Borrows (`&`) of both variables are passed into the function.\\n\"\nmsgstr \"// 2つの変数の借用（`&`）が関数に渡されます。\\n\"\n\n#: src/scope/lifetime/explicit.md:55\nmsgid \"\"\n\"// Any input which is borrowed must outlive the borrower. \\n\"\n\"    // In other words, the lifetime of `four` and `nine` must \\n\"\n\"    // be longer than that of `print_refs`.\\n\"\nmsgstr \"\"\n\"// 借用された変数の寿命は、借り手のそれよりも長くなくてはなりません。\\n\"\n\"    // つまり、`four`、`nine`のライフタイムは`print_refs`のそれよりも\\n\"\n\"    // 長くなくてはなりません。\\n\"\n\n#: src/scope/lifetime/explicit.md:60\nmsgid \"\"\n\"// `failed_borrow` contains no references to force `'a` to be \\n\"\n\"    // longer than the lifetime of the function, but `'a` is longer.\\n\"\n\"    // Because the lifetime is never constrained, it defaults to `'static`.\\n\"\nmsgstr \"\"\n\"// `failed_borrow`は関数のライフタイムよりも`'a`を長くさせるような\\n\"\n\"    // 参照を持ちませんが、それでも`'a`のほうが長くなります。なぜならそのよう\"\n\"な\\n\"\n\"    // 場合`'a`はデフォルトで`'static`になるからです。\\n\"\n\n#: src/scope/lifetime/explicit.md:66\nmsgid \"\"\n\"[elision](elision.md) implicitly annotates lifetimes and so is different.\"\nmsgstr \"\"\n\"[省略](elision.md) はライフタイムが暗黙のうちに（プログラマから見えない形で）\"\n\"アノテートされることを指します。\"\n\n#: src/scope/lifetime/explicit.md:70\nmsgid \"[generics](../../generics.md) and [closures](../../fn/closures.md)\"\nmsgstr \"[ジェネリクス](../../generics.md), [クロージャ](../../fn/closures.md)\"\n\n#: src/scope/lifetime/fn.md:3\nmsgid \"\"\n\"Ignoring [elision](elision.md), function signatures with lifetimes have a \"\n\"few constraints:\"\nmsgstr \"\"\n\"[省略](elision.md)をしない場合、ライフタイムのシグネチャ（e.g. `<'a>`）を持つ\"\n\"関数にはいくつかの制限があります。\"\n\n#: src/scope/lifetime/fn.md:5\nmsgid \"any reference _must_ have an annotated lifetime.\"\nmsgstr \"全ての参照においてライフタイムを明示しなくてはなりません。\"\n\n#: src/scope/lifetime/fn.md:6\nmsgid \"\"\n\"any reference being returned _must_ have the same lifetime as an input or be \"\n\"`static`.\"\nmsgstr \"\"\n\"返り値となる参照はすべて引数と同じライフタイムか、`static`ライフタイムを持た\"\n\"なくてはなりません\"\n\n#: src/scope/lifetime/fn.md:9\nmsgid \"\"\n\"Additionally, note that returning references without input is banned if it \"\n\"would result in returning references to invalid data. The following example \"\n\"shows off some valid forms of functions with lifetimes:\"\nmsgstr \"\"\n\"加えて、引数のない関数から参照を返すことは、それが結果的に無効なデータへの参\"\n\"照になるならば、禁止されています。ライフタイムを持つ関数の例をいくつか示しま\"\n\"す。\"\n\n#: src/scope/lifetime/fn.md:14\nmsgid \"\"\n\"// One input reference with lifetime `'a` which must live\\n\"\n\"// at least as long as the function.\\n\"\nmsgstr \"\"\n\"// 引数として`'a`のライフタイムで参照を一つ取ります。最低でもこの関数\\n\"\n\"// と同じだけの長さでなくてはなりません。\\n\"\n\n#: src/scope/lifetime/fn.md:17\nmsgid \"\\\"`print_one`: x is {}\\\"\"\nmsgstr \"\\\"`print_one`: x is {}\\\"\"\n\n#: src/scope/lifetime/fn.md:19\nmsgid \"// Mutable references are possible with lifetimes as well.\\n\"\nmsgstr \"// ミュータブルな参照でも同様。\\n\"\n\n#: src/scope/lifetime/fn.md:24\nmsgid \"\"\n\"// Multiple elements with different lifetimes. In this case, it\\n\"\n\"// would be fine for both to have the same lifetime `'a`, but\\n\"\n\"// in more complex cases, different lifetimes may be required.\\n\"\nmsgstr \"\"\n\"// 異なるライフタイムを持つ複数の引数がある場合。\\n\"\n\"// ここでは1種類のライフタイムでも問題ありませんが、より複雑なケースでは\\n\"\n\"// 異なるライフタイムが必要になる場合があります。\\n\"\n\n#: src/scope/lifetime/fn.md:29\nmsgid \"\\\"`print_multi`: x is {}, y is {}\\\"\"\nmsgstr \"\\\"`print_multi`: x is {}, y is {}\\\"\"\n\n#: src/scope/lifetime/fn.md:31\nmsgid \"\"\n\"// Returning references that have been passed in is acceptable.\\n\"\n\"// However, the correct lifetime must be returned.\\n\"\nmsgstr \"\"\n\"// 受け取った参照をそのまま返すことに問題ありませんが、適切なライフタイム\\n\"\n\"// でなくてはなりません。\\n\"\n\n#: src/scope/lifetime/fn.md:35\nmsgid \"\"\n\"//fn invalid_output<'a>() -> &'a String { &String::from(\\\"foo\\\") }\\n\"\n\"// The above is invalid: `'a` must live longer than the function.\\n\"\n\"// Here, `&String::from(\\\"foo\\\")` would create a `String`, followed by a\\n\"\n\"// reference. Then the data is dropped upon exiting the scope, leaving\\n\"\n\"// a reference to invalid data to be returned.\\n\"\nmsgstr \"\"\n\"// `'a`は関数より長くなくてはならないため上の関数は正しくありません。\\n\"\n\"// ここでは、`&String::from(\\\"foo\\\")`は`String`のデータとそれへの参照を作りま\"\n\"す。\\n\"\n\"// その後データはスコープを抜けるとともに破棄されます。そのため、\\n\"\n\"// 不適切なデータに対する参照を返すことになってしまいます。\\n\"\n\n#: src/scope/lifetime/fn.md:60\nmsgid \"[Functions](../../fn.md)\"\nmsgstr \"[関数](../../fn.md)\"\n\n#: src/scope/lifetime/methods.md:3\nmsgid \"Methods are annotated similarly to functions:\"\nmsgstr \"メソッドのライフタイムは関数に似ています。\"\n\n#: src/scope/lifetime/methods.md:9\nmsgid \"// Annotate lifetimes as in a standalone function.\\n\"\nmsgstr \"// 通常の関数と同様にライフタイムを明示。\\n\"\n\n#: src/scope/lifetime/methods.md:12\nmsgid \"\\\"`print`: {}\\\"\"\nmsgstr \"\\\"`print`: {}\\\"\"\n\n#: src/scope/lifetime/methods.md:26\nmsgid \"[methods](../../fn/methods.md)\"\nmsgstr \"[メソッド](../../fn/methods.md)\"\n\n#: src/scope/lifetime/struct.md:3\nmsgid \"Annotation of lifetimes in structures are also similar to functions:\"\nmsgstr \"構造体におけるライフタイムも関数のそれと似ています。\"\n\n#: src/scope/lifetime/struct.md:6\nmsgid \"\"\n\"// A type `Borrowed` which houses a reference to an\\n\"\n\"// `i32`. The reference to `i32` must outlive `Borrowed`.\\n\"\nmsgstr \"\"\n\"// `i32`への参照をメンバに持つ`Borrowed`型。\\n\"\n\"// 参照は`Borrowed`自体よりも長生きでなくてはなりません。\\n\"\n\n#: src/scope/lifetime/struct.md:10\nmsgid \"// Similarly, both references here must outlive this structure.\\n\"\nmsgstr \"// 同様に、ここでも参照は構造体よりも長生きでなくてはなりません。\\n\"\n\n#: src/scope/lifetime/struct.md:17\nmsgid \"// An enum which is either an `i32` or a reference to one.\\n\"\nmsgstr \"// `i32`、あるいは`i32`への参照のいずれかとなる列挙型\\n\"\n\n#: src/scope/lifetime/struct.md:34 src/scope/lifetime/struct.md:36\nmsgid \"\\\"x is borrowed in {:?}\\\"\"\nmsgstr \"\\\"x is borrowed in {:?}\\\"\"\n\n#: src/scope/lifetime/struct.md:35\nmsgid \"\\\"x and y are borrowed in {:?}\\\"\"\nmsgstr \"\\\"x and y are borrowed in {:?}\\\"\"\n\n#: src/scope/lifetime/struct.md:37\nmsgid \"\\\"y is *not* borrowed in {:?}\\\"\"\nmsgstr \"\\\"y is *not* borrowed in {:?}\\\"\"\n\n#: src/scope/lifetime/struct.md:43\nmsgid \"[`struct`s](../../custom_types/structs.md)\"\nmsgstr \"[構造体](../../custom_types/structs.md)\"\n\n#: src/scope/lifetime/trait.md:3\nmsgid \"\"\n\"Annotation of lifetimes in trait methods basically are similar to functions. \"\n\"Note that `impl` may have annotation of lifetimes too.\"\nmsgstr \"\"\n\"トレイトのメソッドにおけるライフタイムのアノテーションは、基本的には関数に似\"\n\"ています。`impl`にもライフタイムのアノテーションがあることに注意してくださ\"\n\"い。\"\n\n#: src/scope/lifetime/trait.md:7\nmsgid \"// A struct with annotation of lifetimes.\\n\"\nmsgstr \"// ライフタイムのアノテーションつき構造体\\n\"\n\n#: src/scope/lifetime/trait.md:12\nmsgid \"// Annotate lifetimes to impl.\\n\"\nmsgstr \"// ライフタイムのアノテーションつきimpl\\n\"\n\n#: src/scope/lifetime/trait.md:24\nmsgid \"\\\"b is {:?}\\\"\"\nmsgstr \"\\\"b is {:?}\\\"\"\n\n#: src/scope/lifetime/trait.md:30\nmsgid \"[`trait`s](../../trait.md)\"\nmsgstr \"[トレイト](../../trait.md)\"\n\n#: src/scope/lifetime/lifetime_bounds.md:3\nmsgid \"\"\n\"Just like generic types can be bounded, lifetimes (themselves generic) use \"\n\"bounds as well. The `:` character has a slightly different meaning here, but \"\n\"`+` is the same. Note how the following read:\"\nmsgstr \"\"\n\"ジェネリック型に境界を与え、特定のトレイトを実装していることを保証できるのと\"\n\"同様、ライフタイム（それ自身ジェネリック型）にも境界を与えることができます。\"\n\"`:`は、ここでは多少異なる意味を持ちますが`+`は同じです。以下の構文の意味を\"\n\"チェックしてください。\"\n\n#: src/scope/lifetime/lifetime_bounds.md:7\nmsgid \"`T: 'a`: _All_ references in `T` must outlive lifetime `'a`.\"\nmsgstr \"`T: 'a`：`T`内の *全ての* 参照は`'a`よりも長生きでなくてはなりません。\"\n\n#: src/scope/lifetime/lifetime_bounds.md:8\nmsgid \"\"\n\"`T: Trait + 'a`: Type `T` must implement trait `Trait` and _all_ references \"\n\"in `T` must outlive `'a`.\"\nmsgstr \"\"\n\"`T: Trait + 'a`：上に加えて`T`は`Trait`という名のトレイトを実装してなくてはな\"\n\"りません。\"\n\n#: src/scope/lifetime/lifetime_bounds.md:11\nmsgid \"\"\n\"The example below shows the above syntax in action used after keyword \"\n\"`where`:\"\nmsgstr \"\"\n\"上記の構文を実際に動く例で見ていきましょう。`where`キーワードの後に注目してく\"\n\"ださい。\"\n\n#: src/scope/lifetime/lifetime_bounds.md:14\nmsgid \"// Trait to bound with.\\n\"\nmsgstr \"// ライフタイムを紐付けるトレイト\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:17\nmsgid \"\"\n\"// `Ref` contains a reference to a generic type `T` that has\\n\"\n\"// an unknown lifetime `'a`. `T` is bounded such that any\\n\"\n\"// *references* in `T` must outlive `'a`. Additionally, the lifetime\\n\"\n\"// of `Ref` may not exceed `'a`.\\n\"\nmsgstr \"\"\n\"// `Ref`は`'a`というライフタイムを持つジェネリック型`T`に対する参照を持ち、\\n\"\n\"// `T`の値に対する *参照* は必ず`'a`よりも長生きでなくてはなりません。\\n\"\n\"// さらに、`Ref`のライフタイムは`'a`を超えてはなりません。\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:22\nmsgid \"// A generic function which prints using the `Debug` trait.\\n\"\nmsgstr \"// `Debug`トレイトを利用して出力を行うジェネリック関数\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:26\nmsgid \"\\\"`print`: t is {:?}\\\"\"\nmsgstr \"\\\"`print`: t is {:?}\\\"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:28\nmsgid \"\"\n\"// Here a reference to `T` is taken where `T` implements\\n\"\n\"// `Debug` and all *references* in `T` outlive `'a`. In\\n\"\n\"// addition, `'a` must outlive the function.\\n\"\nmsgstr \"\"\n\"// `Debug`を実装している`T`への参照を取りません。`T`への *参照* は\\n\"\n\"// 必ず`'a`よりも長生きでなくてはなりません。さらに、`'a`は\\n\"\n\"// 関数自体よりも長生きでなくてはなりません。\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:34\nmsgid \"\\\"`print_ref`: t is {:?}\\\"\"\nmsgstr \"\\\"`print_ref`: t is {:?}\\\"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:48\nmsgid \"\"\n\"[generics](../../generics.md), [bounds in generics](../../generics/bounds.\"\n\"md), and [multiple bounds in generics](../../generics/multi_bounds.md)\"\nmsgstr \"\"\n\"[ジェネリクス](../../generics.md), [ジェネリック境界](../../generics/bounds.\"\n\"md), [複数の境界](../../generics/multi_bounds.md)\"\n\n#: src/scope/lifetime/lifetime_coercion.md:3\nmsgid \"\"\n\"A longer lifetime can be coerced into a shorter one so that it works inside \"\n\"a scope it normally wouldn't work in. This comes in the form of inferred \"\n\"coercion by the Rust compiler, and also in the form of declaring a lifetime \"\n\"difference:\"\nmsgstr \"\"\n\"長いライフタイムは、短いものに圧縮することで、そのままでは動作しないスコープ\"\n\"の中でも使用できるようになります。これは、Rustコンパイラが推論の結果として圧\"\n\"縮する場合と、複数のライフタイムを比較して圧縮する場合があります。\"\n\n#: src/scope/lifetime/lifetime_coercion.md:9\nmsgid \"\"\n\"// Here, Rust infers a lifetime that is as short as possible.\\n\"\n\"// The two references are then coerced to that lifetime.\\n\"\nmsgstr \"\"\n\"// ここではRustはライフタイムを出来る限り短く見積もり、\\n\"\n\"// 2つの参照をそのライフタイムに押し込めます。\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:14\nmsgid \"\"\n\"// `<'a: 'b, 'b>` reads as lifetime `'a` is at least as long as `'b`.\\n\"\n\"// Here, we take in an `&'a i32` and return a `&'b i32` as a result of \"\n\"coercion.\\n\"\nmsgstr \"\"\n\"// `<'a: 'b, 'b>`は「ライフタイム`'a`は最低でも`'b`と同じ長さ」と読めます。\\n\"\n\"// ここでは、`&'a i32`をとり、`&'b i32`に圧縮して返します。\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:22\nmsgid \"// Longer lifetime\\n\"\nmsgstr \"// 長いライフタイム\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:25\nmsgid \"// Shorter lifetime\\n\"\nmsgstr \"// 短いライフタイム\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:27\nmsgid \"\\\"The product is {}\\\"\"\nmsgstr \"\\\"The product is {}\\\"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:28\nmsgid \"\\\"{} is the first\\\"\"\nmsgstr \"\\\"{} is the first\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:3\nmsgid \"\"\n\"Rust has a few reserved lifetime names. One of those is `'static`. You might \"\n\"encounter it in two situations:\"\nmsgstr \"\"\n\"Rustにはいくつかの予約されたライフタイム名があります。その1つが`static`で、2\"\n\"つの状況で使用することがあります。\"\n\n#: src/scope/lifetime/static_lifetime.md:7\nmsgid \"// A reference with 'static lifetime:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:8\nmsgid \"\\\"hello world\\\"\"\nmsgstr \"\\\"hello world\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:9\nmsgid \"// 'static as part of a trait bound:\\n\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:14\nmsgid \"\"\n\"Both are related but subtly different and this is a common source for \"\n\"confusion when learning Rust. Here are some examples for each situation:\"\nmsgstr \"\"\n\"2つの状況における`static`は微妙に異なる意味を持っており、Rustを学ぶときの混乱\"\n\"の元になっています。いくつかの例とともにそれぞれの使い方を見てみましょう。\"\n\n#: src/scope/lifetime/static_lifetime.md:17\nmsgid \"Reference lifetime\"\nmsgstr \"参照のライフタイム\"\n\n#: src/scope/lifetime/static_lifetime.md:19\nmsgid \"\"\n\"As a reference lifetime `'static` indicates that the data pointed to by the \"\n\"reference lives for the remaining lifetime of the running program. It can \"\n\"still be coerced to a shorter lifetime.\"\nmsgstr \"\"\n\"参照のライフタイムが`'static`であることは、参照が指し示す値がプログラムの実行\"\n\"中に渡って生き続けることを示します。また、より短いライフタイムに圧縮すること\"\n\"も可能です。\"\n\n#: src/scope/lifetime/static_lifetime.md:23\nmsgid \"\"\n\"There are two common ways to make a variable with `'static` lifetime, and \"\n\"both are stored in the read-only memory of the binary:\"\nmsgstr \"\"\n\"`'static`ライフタイムを持つ変数を作るには下記の2つ方法があります。どちらの場\"\n\"合も、値は読み取り専用のメモリ領域に格納されます。\"\n\n#: src/scope/lifetime/static_lifetime.md:26\nmsgid \"Make a constant with the `static` declaration.\"\nmsgstr \"`static`宣言とともに定数を作成します。\"\n\n#: src/scope/lifetime/static_lifetime.md:27\nmsgid \"Make a `string` literal which has type: `&'static str`.\"\nmsgstr \"文字列リテラルで`&'static str`型を持つ変数を作成します。\"\n\n#: src/scope/lifetime/static_lifetime.md:29\nmsgid \"See the following example for a display of each method:\"\nmsgstr \"では、それぞれの方法の例を見ていきましょう。\"\n\n#: src/scope/lifetime/static_lifetime.md:32\nmsgid \"// Make a constant with `'static` lifetime.\\n\"\nmsgstr \"// `'static`ライフタイムを持つ定数を作成。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:34\nmsgid \"\"\n\"// Returns a reference to `NUM` where its `'static`\\n\"\n\"// lifetime is coerced to that of the input argument.\\n\"\nmsgstr \"\"\n\"// `NUM`への参照を返します。ライフタイムは`'static`から引数の\\n\"\n\"// ライフタイムへと圧縮されています。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:43\nmsgid \"// Make a `string` literal and print it:\\n\"\nmsgstr \"// 文字列リテラルを用いて変数を作成し、出力します。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:44\nmsgid \"\\\"I'm in read-only memory\\\"\"\nmsgstr \"\\\"I'm in read-only memory\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:45\nmsgid \"\\\"static_string: {}\\\"\"\nmsgstr \"\\\"static_string: {}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:47\nmsgid \"\"\n\"// When `static_string` goes out of scope, the reference\\n\"\n\"        // can no longer be used, but the data remains in the binary.\\n\"\nmsgstr \"\"\n\"// `static_string`がスコープから抜けると、参照は使用することが\\n\"\n\"        // できなくなりますが、データはバイナリ中に残ります。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:52\nmsgid \"// Make an integer to use for `coerce_static`:\\n\"\nmsgstr \"// `coerce_static`関数を呼び出すために、整数を作成。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:55\nmsgid \"// Coerce `NUM` to lifetime of `lifetime_num`:\\n\"\nmsgstr \"// `NUM`を`lifetime_num`のライフタイムへと圧縮。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:58\nmsgid \"\\\"coerced_static: {}\\\"\"\nmsgstr \"\\\"coerced_static: {}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:61\nmsgid \"\\\"NUM: {} stays accessible!\\\"\"\nmsgstr \"\\\"NUM: {} stays accessible!\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:65\nmsgid \"\"\n\"Since `'static` references only need to be valid for the _remainder_ of a \"\n\"program's life, they can be created while the program is executed. Just to \"\n\"demonstrate, the below example uses [`Box::leak`](https://doc.rust-lang.org/\"\n\"std/boxed/struct.Box.html#method.leak) to dynamically create `'static` \"\n\"references. In that case it definitely doesn't live for the entire duration, \"\n\"but only for the leaking point onward.\"\nmsgstr \"\"\n\n#: src/scope/lifetime/static_lifetime.md:90\nmsgid \"Trait bound\"\nmsgstr \"トレイト境界\"\n\n#: src/scope/lifetime/static_lifetime.md:92\nmsgid \"\"\n\"As a trait bound, it means the type does not contain any non-static \"\n\"references. Eg. the receiver can hold on to the type for as long as they \"\n\"want and it will never become invalid until they drop it.\"\nmsgstr \"\"\n\"トレイト境界としての`'static`は型が非静的な参照を含まないことを意味します。言\"\n\"い換えると、レシーバはその型をいくらでも長く保持することができ、意図的にド\"\n\"ロップするまでは決して無効になることはないということです。\"\n\n#: src/scope/lifetime/static_lifetime.md:96\nmsgid \"\"\n\"It's important to understand this means that any owned data always passes a \"\n\"`'static` lifetime bound, but a reference to that owned data generally does \"\n\"not:\"\nmsgstr \"\"\n\"次のポイントを押さえておきましょう。所有権のある値が`'static`ライフタイム境界\"\n\"をパスするとしても、その値への参照が`'static`ライフタイム境界をパスするとは限\"\n\"りません。\"\n\n#: src/scope/lifetime/static_lifetime.md:104\nmsgid \"\\\"'static value passed in is: {:?}\\\"\"\nmsgstr \"\\\"'static value passed in is: {:?}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:108\nmsgid \"// i is owned and contains no references, thus it's 'static:\\n\"\nmsgstr \"// i は所有されていて、かつ参照を含まないので 'static。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:112\nmsgid \"\"\n\"// oops, &i only has the lifetime defined by the scope of\\n\"\n\"    // main(), so it's not 'static:\\n\"\nmsgstr \"\"\n\"// おっと、&i は main() のスコープで定義された\\n\"\n\"    // ライフタイムしかもたないため 'static ではありません。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:117\nmsgid \"The compiler will tell you:\"\nmsgstr \"コンパイラのメッセージはこのようになります。\"\n\n#: src/scope/lifetime/static_lifetime.md:133\nmsgid \"[`'static` constants](../../custom_types/constants.md)\"\nmsgstr \"[`'static` 定数](../../custom_types/constants.md)\"\n\n#: src/scope/lifetime/elision.md:3\nmsgid \"\"\n\"Some lifetime patterns are overwhelmingly common and so the borrow checker \"\n\"will allow you to omit them to save typing and to improve readability. This \"\n\"is known as elision. Elision exists in Rust solely because these patterns \"\n\"are common.\"\nmsgstr \"\"\n\"ライフタイムのパターンのうちのいくつかは、他と比べてあまりにも一般的に使用さ\"\n\"れるため、タイプ量を減らし可読性を上げるために省くことができます。これは省略\"\n\"として知られており、それらのパターンが一般的であるというだけの理由で存在して\"\n\"います。\"\n\n#: src/scope/lifetime/elision.md:8\nmsgid \"\"\n\"The following code shows a few examples of elision. For a more comprehensive \"\n\"description of elision, see [lifetime elision](https://doc.rust-lang.org/\"\n\"book/ch10-03-lifetime-syntax.html#lifetime-elision) in the book.\"\nmsgstr \"\"\n\"以下のコードでは省略の例を幾つかお見せします。より完全な説明を見たい場合は、\"\n\"「プログラミング言語Rust」の[ライフタイムの省略](https://doc.rust-lang.org/\"\n\"book/ch10-03-lifetime-syntax.html#lifetime-elision)の項を見てください。\"\n\n#: src/scope/lifetime/elision.md:12\nmsgid \"\"\n\"// `elided_input` and `annotated_input` essentially have identical \"\n\"signatures\\n\"\n\"// because the lifetime of `elided_input` is inferred by the compiler:\\n\"\nmsgstr \"\"\n\"// `elided_input`のライフタイムはコンパイラによって自動的に付与されるため\\n\"\n\"// 以下の2つは同一のライフタイムシグネチャを持ちます。\\n\"\n\n#: src/scope/lifetime/elision.md:15\nmsgid \"\\\"`elided_input`: {}\\\"\"\nmsgstr \"\\\"`elided_input`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:19\nmsgid \"\\\"`annotated_input`: {}\\\"\"\nmsgstr \"\\\"`annotated_input`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:21\nmsgid \"\"\n\"// Similarly, `elided_pass` and `annotated_pass` have identical signatures\\n\"\n\"// because the lifetime is added implicitly to `elided_pass`:\\n\"\nmsgstr \"\"\n\"// 同様に、以下の2つの関数も全く同じライフタイムシグネチャを持ちます。\\n\"\n\n#: src/scope/lifetime/elision.md:34\nmsgid \"\\\"`elided_pass`: {}\\\"\"\nmsgstr \"\\\"`elided_pass`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:35\nmsgid \"\\\"`annotated_pass`: {}\\\"\"\nmsgstr \"\\\"`annotated_pass`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:41\nmsgid \"\"\n\"[elision](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.\"\n\"html#lifetime-elision)\"\nmsgstr \"\"\n\"[省略](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#lifetime-\"\n\"elision)\"\n\n#: src/trait.md:3\nmsgid \"\"\n\"A `trait` is a collection of methods defined for an unknown type: `Self`. \"\n\"They can access other methods declared in the same trait.\"\nmsgstr \"\"\n\"トレイトとは任意の型となりうる`Self`に対して定義されたメソッドの集合のことで\"\n\"す。同じトレイト内で宣言されたメソッド同士はお互いにアクセスすることができま\"\n\"す。\"\n\n#: src/trait.md:6\nmsgid \"\"\n\"Traits can be implemented for any data type. In the example below, we define \"\n\"`Animal`, a group of methods. The `Animal` `trait` is then implemented for \"\n\"the `Sheep` data type, allowing the use of methods from `Animal` with a \"\n\"`Sheep`.\"\nmsgstr \"\"\n\"トレイトはあらゆるデータ型に実装することができます。以下の例ではまず`Animal`\"\n\"というメソッドの集合を定義し、その後`Animal`トレイトを`Sheep`というデータ型に\"\n\"対して実装します。これにより`Animal`のメソッドを`Sheep`が使用することが可能に\"\n\"なります。\"\n\n#: src/trait.md:15\nmsgid \"\"\n\"// Associated function signature; `Self` refers to the implementor type.\\n\"\nmsgstr \"\"\n\"// 関連関数のシグネチャ\\n\"\n\"    // `Self` はこのトレイトを実装している型になります。\\n\"\n\n#: src/trait.md:18\nmsgid \"// Method signatures; these will return a string.\\n\"\nmsgstr \"\"\n\"// メソッドのシグネチャ\\n\"\n\"    // これらの関数は文字列を返します。\\n\"\n\n#: src/trait.md:22\nmsgid \"// Traits can provide default method definitions.\\n\"\nmsgstr \"// メソッドのデフォルトの挙動を定義することもできます。\\n\"\n\n#: src/trait.md:24\nmsgid \"\\\"{} says {}\\\"\"\nmsgstr \"\\\"{} says {}\\\"\"\n\n#: src/trait.md:35\nmsgid \"// Implementor methods can use the implementor's trait methods.\\n\"\nmsgstr \"\"\n\"// メソッドをある型に実装する際に、その型のトレイトメソッドを\\n\"\n\"            // 使用することができます。\\n\"\n\n#: src/trait.md:36\nmsgid \"\\\"{} is already naked...\\\"\"\nmsgstr \"\\\"{} is already naked...\\\"\"\n\n#: src/trait.md:38\nmsgid \"\\\"{} gets a haircut!\\\"\"\nmsgstr \"\\\"{} gets a haircut!\\\"\"\n\n#: src/trait.md:44 src/trait/dyn.md:17\nmsgid \"// Implement the `Animal` trait for `Sheep`.\\n\"\nmsgstr \"// `Animal`というトレイトを`Sheep`に実装します。\\n\"\n\n#: src/trait.md:47\nmsgid \"// `Self` is the implementor type: `Sheep`.\\n\"\nmsgstr \"// `Self`は実装対象の型：ここでは`Sheep`\\n\"\n\n#: src/trait.md:58\nmsgid \"\\\"baaaaah?\\\"\"\nmsgstr \"\\\"baaaaah?\\\"\"\n\n#: src/trait.md:60 src/trait/dyn.md:21\nmsgid \"\\\"baaaaah!\\\"\"\nmsgstr \"\\\"baaaaah!\\\"\"\n\n#: src/trait.md:64\nmsgid \"// Default trait methods can be overridden.\\n\"\nmsgstr \"// デフォルトのトレイトメソッドはオーバーライドすることができます。\\n\"\n\n#: src/trait.md:66\nmsgid \"// For example, we can add some quiet contemplation.\\n\"\nmsgstr \"// 例えば、静かに熟考させてみます。\\n\"\n\n#: src/trait.md:67\nmsgid \"\\\"{} pauses briefly... {}\\\"\"\nmsgstr \"\\\"{} pauses briefly... {}\\\"\"\n\n#: src/trait.md:72\nmsgid \"// Type annotation is necessary in this case.\\n\"\nmsgstr \"// この場合、型アノテーションが必須。\\n\"\n\n#: src/trait.md:73\nmsgid \"\\\"Dolly\\\"\"\nmsgstr \"\\\"Dolly\\\"\"\n\n#: src/trait.md:74\nmsgid \"// TODO ^ Try removing the type annotations.\\n\"\nmsgstr \"// TODO ^ ここの型アノテーションを消してみましょう。\\n\"\n\n#: src/trait/derive.md:3\nmsgid \"\"\n\"The compiler is capable of providing basic implementations for some traits \"\n\"via the `#[derive]` [attribute](../attribute.md). These traits can still be \"\n\"manually implemented if a more complex behavior is required.\"\nmsgstr \"\"\n\"コンパイラには、`#[derive]`[アトリビュート](../attribute.md)を用いることで型\"\n\"に対して特定のトレイトの標準的な実装を提供する機能があります。より複雑なこと\"\n\"を行わせたい場合には、同名のトレイトを手動で実装することも可能です。\"\n\n#: src/trait/derive.md:7\nmsgid \"The following is a list of derivable traits:\"\nmsgstr \"以下はderive可能なトレイトの一覧です。\"\n\n#: src/trait/derive.md:8\nmsgid \"\"\n\"Comparison traits: [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html), \"\n\"[`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html), [`PartialOrd`]\"\n\"(https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html).\"\nmsgstr \"\"\n\"型の比較に関連するトレイト: [`Eq`](https://doc.rust-lang.org/std/cmp/trait.\"\n\"Eq.html), [`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.\"\n\"html), [`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html), \"\n\"[`PartialOrd`](https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html).\"\n\n#: src/trait/derive.md:10\nmsgid \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html), to create \"\n\"`T` from `&T` via a copy.\"\nmsgstr \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html)：これはコピー\"\n\"によって`&T`から`T`を作成するトレイト\"\n\n#: src/trait/derive.md:11\nmsgid \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html), to give a \"\n\"type 'copy semantics' instead of 'move semantics'.\"\nmsgstr \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html)：これはムーブ\"\n\"セマンティクスの代わりにコピーセマンティクスにするためのトレイト\"\n\n#: src/trait/derive.md:12\nmsgid \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html), to compute a \"\n\"hash from `&T`.\"\nmsgstr \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html)：これは`&T`から\"\n\"ハッシュ値を計算するためのトレイト\"\n\n#: src/trait/derive.md:13\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html), to \"\n\"create an empty instance of a data type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html)：これは\"\n\"空っぽのインスタンスを作成するためのトレイト\"\n\n#: src/trait/derive.md:14\nmsgid \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html), to format a \"\n\"value using the `{:?}` formatter.\"\nmsgstr \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html)：これは`{:?}`\"\n\"フォーマッタを利用して値をフォーマットするためのトレイト\"\n\n#: src/trait/derive.md:17\nmsgid \"// `Centimeters`, a tuple struct that can be compared\\n\"\nmsgstr \"// `Centimeters`は比較可能なタプルになります。\\n\"\n\n#: src/trait/derive.md:20\nmsgid \"// `Inches`, a tuple struct that can be printed\\n\"\nmsgstr \"// `Inches`は出力可能なタプルになります。\\n\"\n\n#: src/trait/derive.md:32\nmsgid \"// `Seconds`, a tuple struct with no additional attributes\\n\"\nmsgstr \"// `Seconds`には特にアトリビュートを付け加えません。\\n\"\n\n#: src/trait/derive.md:39\nmsgid \"\"\n\"// Error: `Seconds` can't be printed; it doesn't implement the `Debug` \"\n\"trait\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー：`Debug`トレイトを実装していないため`Seconds`は出力できません。\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/trait/derive.md:43\nmsgid \"\"\n\"// Error: `Seconds` can't be compared; it doesn't implement the `PartialEq` \"\n\"trait\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー`PartialEq`トレイトを実装していないため`Seconds`は比較できません。\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/trait/derive.md:49\nmsgid \"\\\"One foot equals {:?}\\\"\"\nmsgstr \"\\\"One foot equals {:?}\\\"\"\n\n#: src/trait/derive.md:55\nmsgid \"\\\"smaller\\\"\"\nmsgstr \"\\\"smaller\\\"\"\n\n#: src/trait/derive.md:57\nmsgid \"\\\"bigger\\\"\"\nmsgstr \"\\\"bigger\\\"\"\n\n#: src/trait/derive.md:60\nmsgid \"\\\"One foot is {} than one meter.\\\"\"\nmsgstr \"\\\"One foot is {} than one meter.\\\"\"\n\n#: src/trait/derive.md:65\nmsgid \"[`derive`](https://doc.rust-lang.org/reference/attributes.html#derive)\"\nmsgstr \"[導出](https://doc.rust-lang.org/reference/attributes.html#derive)\"\n\n#: src/trait/dyn.md:3\nmsgid \"\"\n\"The Rust compiler needs to know how much space every function's return type \"\n\"requires. This means all your functions have to return a concrete type. \"\n\"Unlike other languages, if you have a trait like `Animal`, you can't write a \"\n\"function that returns `Animal`, because its different implementations will \"\n\"need different amounts of memory.\"\nmsgstr \"\"\n\"Rustのコンパイラはあらゆる関数のリターン型に必要なスペースを知っておく必要が\"\n\"あります。つまり、すべての関数は具体的な型を返す必要があるのです。他の言語と\"\n\"違って、`Animal`のようなトレイトがある場合に、`Animal`を返す関数を書くことは\"\n\"できません。なぜなら、そのトレイトの異なる実装はそれぞれ別の量のメモリを必要\"\n\"とするからです。\"\n\n#: src/trait/dyn.md:5\nmsgid \"\"\n\"However, there's an easy workaround. Instead of returning a trait object \"\n\"directly, our functions return a `Box` which _contains_ some `Animal`. A \"\n\"`box` is just a reference to some memory in the heap. Because a reference \"\n\"has a statically-known size, and the compiler can guarantee it points to a \"\n\"heap-allocated `Animal`, we can return a trait from our function!\"\nmsgstr \"\"\n\"しかし、簡単な回避策があります。直接トレイトオブジェクトを返す代わりに、\"\n\"`Animal`を _含む_ `Box`を返すのです。`Box`はヒープ中のメモリへの単なる参照で\"\n\"す。参照のサイズは静的に知ることができ、コンパイラは参照がヒープに割り当てら\"\n\"れた`Animal`を指していると保証できるので、私たちは関数からトレイトを返すこと\"\n\"ができます。\"\n\n#: src/trait/dyn.md:7\nmsgid \"\"\n\"Rust tries to be as explicit as possible whenever it allocates memory on the \"\n\"heap. So if your function returns a pointer-to-trait-on-heap in this way, \"\n\"you need to write the return type with the `dyn` keyword, e.g. `Box<dyn \"\n\"Animal>`.\"\nmsgstr \"\"\n\"ヒープにメモリを割り当てる際、Rustは可能な限り明示的であろうとします。なの\"\n\"で、もしあなたの関数がヒープ上のトレイトへのポインタを返す場合、例えば\"\n\"`Box<dyn Animal>`のように、リターン型に`dyn`キーワードをつける必要がありま\"\n\"す。\"\n\n#: src/trait/dyn.md:14\nmsgid \"// Instance method signature\\n\"\nmsgstr \"// インスタンスメソッドのシグネチャ\\n\"\n\n#: src/trait/dyn.md:24\nmsgid \"// Implement the `Animal` trait for `Cow`.\\n\"\nmsgstr \"// `Cow`に`Animal`トレイトを実装します。\\n\"\n\n#: src/trait/dyn.md:28\nmsgid \"\\\"moooooo!\\\"\"\nmsgstr \"\\\"moooooo!\\\"\"\n\n#: src/trait/dyn.md:31\nmsgid \"\"\n\"// Returns some struct that implements Animal, but we don't know which one \"\n\"at compile time.\\n\"\nmsgstr \"\"\n\"// Animalを実装した何らかの構造体を返します。\\n\"\n\"// ただし、コンパイル時にはどの実装か分かりません。\\n\"\n\n#: src/trait/dyn.md:44\nmsgid \"\\\"You've randomly chosen an animal, and it says {}\\\"\"\nmsgstr \"\\\"You've randomly chosen an animal, and it says {}\\\"\"\n\n#: src/trait/ops.md:3\nmsgid \"\"\n\"In Rust, many of the operators can be overloaded via traits. That is, some \"\n\"operators can be used to accomplish different tasks based on their input \"\n\"arguments. This is possible because operators are syntactic sugar for method \"\n\"calls. For example, the `+` operator in `a + b` calls the `add` method (as \"\n\"in `a.add(b)`). This `add` method is part of the `Add` trait. Hence, the `+` \"\n\"operator can be used by any implementor of the `Add` trait.\"\nmsgstr \"\"\n\"Rustでは、多くの演算子はトレイトによってオーバーロードすることができます。つ\"\n\"まり、一部の演算子は引数となる値の型に応じて異なる役割を果たすことができると\"\n\"いうことです。これが可能なのは、演算子が実際にはメソッド呼び出しの糖衣構文に\"\n\"すぎないからです。例えば`a + b`における`+`演算子は`add`メソッドを（`a.add(b)`\"\n\"の形で）呼び出します。この`add`メソッドは`Add`トレイトの一部です。それ故、`+`\"\n\"は`Add`トレイトを実装している全ての型に対して有効なのです。\"\n\n#: src/trait/ops.md:9\nmsgid \"\"\n\"A list of the traits, such as `Add`, that overload operators can be found in \"\n\"[`core::ops`](https://doc.rust-lang.org/core/ops/).\"\nmsgstr \"\"\n\"`Add`などの、演算子をオーバーロードするトレイトの一覧は[`core::ops`](https://\"\n\"doc.rust-lang.org/core/ops/)にあります。\"\n\n#: src/trait/ops.md:22\nmsgid \"\"\n\"// The `std::ops::Add` trait is used to specify the functionality of `+`.\\n\"\n\"// Here, we make `Add<Bar>` - the trait for addition with a RHS of type \"\n\"`Bar`.\\n\"\n\"// The following block implements the operation: Foo + Bar = FooBar\\n\"\nmsgstr \"\"\n\"// `std::ops::Add`トレイトは`+`の振る舞いを規定するために使用されます。\\n\"\n\"// ここでは`Foo`に対して`Add<Bar>`を実装します。これは加算時の右辺が`Bar`型\\n\"\n\"// の時に呼び出されるトレイトです。\\n\"\n\"// つまり以下は`Foo + Bar = FooBar`という振る舞いをもたらします。\\n\"\n\n#: src/trait/ops.md:30\nmsgid \"\\\"> Foo.add(Bar) was called\\\"\"\nmsgstr \"\\\"> Foo.add(Bar) was called\\\"\"\n\n#: src/trait/ops.md:35\nmsgid \"\"\n\"// By reversing the types, we end up implementing non-commutative addition.\\n\"\n\"// Here, we make `Add<Foo>` - the trait for addition with a RHS of type \"\n\"`Foo`.\\n\"\n\"// This block implements the operation: Bar + Foo = BarFoo\\n\"\nmsgstr \"\"\n\"// 型を反転することで、非可換の加算を実装できます。ここでは`Bar`に対して\\n\"\n\"// `Add<Foo>`を実装します。\\n\"\n\"// これは加算時の右辺が`Foo`型の時に呼び出されるメソッドです。\\n\"\n\"// つまり以下は`Bar + Foo = BarFoo`という結果をもたらします。\\n\"\n\n#: src/trait/ops.md:43\nmsgid \"\\\"> Bar.add(Foo) was called\\\"\"\nmsgstr \"\\\"> Bar.add(Foo) was called\\\"\"\n\n#: src/trait/ops.md:50\nmsgid \"\\\"Foo + Bar = {:?}\\\"\"\nmsgstr \"\\\"Foo + Bar = {:?}\\\"\"\n\n#: src/trait/ops.md:51\nmsgid \"\\\"Bar + Foo = {:?}\\\"\"\nmsgstr \"\\\"Bar + Foo = {:?}\\\"\"\n\n#: src/trait/ops.md:55 src/testing.md:16 src/testing/doc_testing.md:104\n#: src/testing/dev_dependencies.md:36\nmsgid \"See Also\"\nmsgstr \"参照\"\n\n#: src/trait/ops.md:57\nmsgid \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html), [Syntax Index]\"\n\"(https://doc.rust-lang.org/book/appendix-02-operators.html)\"\nmsgstr \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html), [構文の索引]\"\n\"(https://doc.rust-lang.org/book/appendix-02-operators.html)\"\n\n#: src/trait/drop.md:3\nmsgid \"\"\n\"The [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) trait only \"\n\"has one method: `drop`, which is called automatically when an object goes \"\n\"out of scope. The main use of the `Drop` trait is to free the resources that \"\n\"the implementor instance owns.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html)トレイトにはメソッ\"\n\"ドが一つだけしかありません。`drop`です。これは、オブジェクトがスコープから抜\"\n\"けた時に自動で呼ばれます。`Drop`トレイトの主な使用目的は、インスタンスが所有\"\n\"する資源を開放することです。\"\n\n#: src/trait/drop.md:7\nmsgid \"\"\n\"`Box`, `Vec`, `String`, `File`, and `Process` are some examples of types \"\n\"that implement the `Drop` trait to free resources. The `Drop` trait can also \"\n\"be manually implemented for any custom data type.\"\nmsgstr \"\"\n\"`Drop`トレイトを実装している型の例としては`Box`、`Vec`、`String`、`File`、\"\n\"`Process`等があげられます。`Drop`トレイトは任意の型に対して手動で実装すること\"\n\"ができます。\"\n\n#: src/trait/drop.md:11\nmsgid \"\"\n\"The following example adds a print to console to the `drop` function to \"\n\"announce when it is called.\"\nmsgstr \"\"\n\"以下の例では`drop`メソッドにコンソールへの出力を追加することで、`drop`が呼ば\"\n\"れたタイミングが分かるようにしています。\"\n\n#: src/trait/drop.md:18\nmsgid \"// This trivial implementation of `drop` adds a print to console.\\n\"\nmsgstr \"// このちょっとした実装で、`drop`にコンソール出力機能がつきます。\\n\"\n\n#: src/trait/drop.md:22\nmsgid \"\\\"> Dropping {}\\\"\"\nmsgstr \"\\\"> Dropping {}\\\"\"\n\n#: src/trait/drop.md:27 src/std_misc/path.md:33 src/std_misc/fs.md:44\n#: src/std_misc/fs.md:87\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/trait/drop.md:29\nmsgid \"// block A\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:31 src/std_misc/path.md:33\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/trait/drop.md:33\nmsgid \"// block B\\n\"\nmsgstr \"\"\n\n#: src/trait/drop.md:35 src/std_misc/path.md:36\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/trait/drop.md:36\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/trait/drop.md:38\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Exiting block B\\\"\"\n\n#: src/trait/drop.md:40\nmsgid \"\\\"Just exited block B\\\"\"\nmsgstr \"\\\"Just exited block B\\\"\"\n\n#: src/trait/drop.md:42\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Exiting block A\\\"\"\n\n#: src/trait/drop.md:44\nmsgid \"\\\"Just exited block A\\\"\"\nmsgstr \"\\\"Just exited block A\\\"\"\n\n#: src/trait/drop.md:46\nmsgid \"// Variable can be manually dropped using the `drop` function\\n\"\nmsgstr \"// `drop`関数を用いて変数を手動で開放することもできます。\\n\"\n\n#: src/trait/drop.md:48\nmsgid \"// TODO ^ Try commenting this line\\n\"\nmsgstr \"// TODO ^ この行をコメントアウトしてみましょう。\\n\"\n\n#: src/trait/drop.md:50\nmsgid \"\\\"end of the main function\\\"\"\nmsgstr \"\\\"end of the main function\\\"\"\n\n#: src/trait/drop.md:52\nmsgid \"\"\n\"// `_a` *won't* be `drop`ed again here, because it already has been\\n\"\n\"    // (manually) `drop`ed\\n\"\nmsgstr \"\"\n\"// `_a`はここで`drop`されることは *ありません* 。なぜならば、上ですでに\\n\"\n\"    // （手動で）`drop`されているためです。\\n\"\n\n#: src/trait/iter.md:3\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"trait is used to implement iterators over collections such as arrays.\"\nmsgstr \"\"\n\"[`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html)トレイト\"\n\"は、例えば配列のような、要素の集合に対してイテレータを実装するためのトレイト\"\n\"です。\"\n\n#: src/trait/iter.md:6\nmsgid \"\"\n\"The trait requires only a method to be defined for the `next` element, which \"\n\"may be manually defined in an `impl` block or automatically defined (as in \"\n\"arrays and ranges).\"\nmsgstr \"\"\n\"このトレイトは`next`の要素に相当するものを決定するためのメソッドのみを要求し\"\n\"ます。このメソッドは`impl`ブロック内で手動で実装するか、あるいは（配列やrange\"\n\"のように）自動で定義されます。\"\n\n#: src/trait/iter.md:10\nmsgid \"\"\n\"As a point of convenience for common situations, the `for` construct turns \"\n\"some collections into iterators using the [`.into_iter()`](https://doc.rust-\"\n\"lang.org/std/iter/trait.IntoIterator.html) method.\"\nmsgstr \"\"\n\"サッとイテレータを使いたい時は、`for`文で集合からイテレータを作成することが良\"\n\"くあります。これは[`.into_iter()`](https://doc.rust-lang.org/std/iter/trait.\"\n\"IntoIterator.html)メソッドを呼び出しています。\"\n\n#: src/trait/iter.md:18\nmsgid \"\"\n\"// Implement `Iterator` for `Fibonacci`.\\n\"\n\"// The `Iterator` trait only requires a method to be defined for the `next` \"\n\"element.\\n\"\nmsgstr \"\"\n\"// `Iterator`を`Fibonacci`に対して実装します。\\n\"\n\"// `Iterator`トレイトは次の要素を取得するメソッドの定義だけを要求します。\\n\"\n\n#: src/trait/iter.md:22\nmsgid \"// We can refer to this type using Self::Item\\n\"\nmsgstr \"\"\n\n#: src/trait/iter.md:25\nmsgid \"\"\n\"// Here, we define the sequence using `.curr` and `.next`.\\n\"\n\"    // The return type is `Option<T>`:\\n\"\n\"    //     * When the `Iterator` is finished, `None` is returned.\\n\"\n\"    //     * Otherwise, the next value is wrapped in `Some` and returned.\\n\"\n\"    // We use Self::Item in the return type, so we can change\\n\"\n\"    // the type without having to update the function signatures.\\n\"\nmsgstr \"\"\n\"// ここではイテレーションの流れを`.curr`と`.next`を使用して定義しています。\\n\"\n\"    // 返り値の型は`Option<T>`で、これは：\\n\"\n\"    //     * `Iterator`が終了した時は`None`を返します。\\n\"\n\"    //     * そうでなければ`Some`でラップされた値を返します。\\n\"\n\n#: src/trait/iter.md:37\nmsgid \"\"\n\"// Since there's no endpoint to a Fibonacci sequence, the `Iterator` \\n\"\n\"        // will never return `None`, and `Some` is always returned.\\n\"\nmsgstr \"\"\n\"// フィボナッチ数列には終端がないので、`Iterator`は決して\\n\"\n\"        // `None`を返さず、常に`Some`が返されます。\\n\"\n\n#: src/trait/iter.md:42\nmsgid \"// Returns a Fibonacci sequence generator\\n\"\nmsgstr \"// フィボナッチ数列のジェネレータを返します。\\n\"\n\n#: src/trait/iter.md:49\nmsgid \"// `0..3` is an `Iterator` that generates: 0, 1, and 2.\\n\"\nmsgstr \"// `0..3`は0, 1, 2をジェネレートする`Iterator`。\\n\"\n\n#: src/trait/iter.md:52\nmsgid \"\\\"Four consecutive `next` calls on 0..3\\\"\"\nmsgstr \"\\\"Four consecutive `next` calls on 0..3\\\"\"\n\n#: src/trait/iter.md:53 src/trait/iter.md:54 src/trait/iter.md:55\n#: src/trait/iter.md:56 src/std_misc/fs.md:90\nmsgid \"\\\"> {:?}\\\"\"\nmsgstr \"\\\"> {:?}\\\"\"\n\n#: src/trait/iter.md:58\nmsgid \"\"\n\"// `for` works through an `Iterator` until it returns `None`.\\n\"\n\"    // Each `Some` value is unwrapped and bound to a variable (here, `i`).\\n\"\nmsgstr \"\"\n\"// `for`は`None`を返すまで、イテレータを舐めていき、出てきた`Some`を\\n\"\n\"    // アンラップして変数（ここでは`i`）に束縛します。\\n\"\n\n#: src/trait/iter.md:60\nmsgid \"\\\"Iterate through 0..3 using `for`\\\"\"\nmsgstr \"\\\"Iterate through 0..3 using `for`\\\"\"\n\n#: src/trait/iter.md:62 src/trait/iter.md:68 src/trait/iter.md:74\n#: src/trait/iter.md:82 src/std/vec.md:49 src/std/str.md:22\n#: src/std_misc/fs.md:82\nmsgid \"\\\"> {}\\\"\"\nmsgstr \"\\\"> {}\\\"\"\n\n#: src/trait/iter.md:65\nmsgid \"// The `take(n)` method reduces an `Iterator` to its first `n` terms.\\n\"\nmsgstr \"\"\n\"// `take(n)`メソッドは`Iterator`を先頭から`n`番目の要素までに減らします。\\n\"\n\n#: src/trait/iter.md:66\nmsgid \"\\\"The first four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\\\"The first four terms of the Fibonacci sequence are: \\\"\"\n\n#: src/trait/iter.md:71\nmsgid \"\"\n\"// The `skip(n)` method shortens an `Iterator` by dropping its first `n` \"\n\"terms.\\n\"\nmsgstr \"\"\n\"// `skip(n)`メソッドは`Iterator`の先頭から`n`番目までの要素をとばします。\\n\"\n\n#: src/trait/iter.md:72\nmsgid \"\\\"The next four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\\\"The next four terms of the Fibonacci sequence are: \\\"\"\n\n#: src/trait/iter.md:79\nmsgid \"// The `iter` method produces an `Iterator` over an array/slice.\\n\"\nmsgstr \"// `iter`メソッドは配列やスライスからイテレータを作成します。\\n\"\n\n#: src/trait/iter.md:80\nmsgid \"\\\"Iterate the following array {:?}\\\"\"\nmsgstr \"\\\"Iterate the following array {:?}\\\"\"\n\n#: src/trait/impl_trait.md:3\nmsgid \"`impl Trait` can be used in two locations:\"\nmsgstr \"`impl Trait`は2つの利用方法があります：\"\n\n#: src/trait/impl_trait.md:5\nmsgid \"as an argument type\"\nmsgstr \"引数の型\"\n\n#: src/trait/impl_trait.md:6\nmsgid \"as a return type\"\nmsgstr \"リターン型\"\n\n#: src/trait/impl_trait.md:8\nmsgid \"As an argument type\"\nmsgstr \"引数の型\"\n\n#: src/trait/impl_trait.md:10\nmsgid \"\"\n\"If your function is generic over a trait but you don't mind the specific \"\n\"type, you can simplify the function declaration using `impl Trait` as the \"\n\"type of the argument.\"\nmsgstr \"\"\n\"あなたの関数がジェネリックなトレイトを使用していて、特定の型を意識していない\"\n\"場合、`impl Trait`を引数の型として利用して、関数宣言をシンプルにできます。\"\n\n#: src/trait/impl_trait.md:12\nmsgid \"For example, consider the following code:\"\nmsgstr \"例えば、次のコードを考えてみましょう：\"\n\n#: src/trait/impl_trait.md:18 src/trait/impl_trait.md:37\nmsgid \"// For each line in the source\\n\"\nmsgstr \"// ソースのそれぞれの行について\\n\"\n\n#: src/trait/impl_trait.md:20 src/trait/impl_trait.md:39\nmsgid \"\"\n\"// If the line was read successfully, process it, if not, return the error\\n\"\nmsgstr \"// 行を読み込んだら処理します。そうでなければエラーを返します。\\n\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40 src/std/str.md:41\nmsgid \"','\"\nmsgstr \"','\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40\nmsgid \"// Split the line separated by commas\\n\"\nmsgstr \"// 行をカンマで分割します。\\n\"\n\n#: src/trait/impl_trait.md:22 src/trait/impl_trait.md:41\nmsgid \"// Remove leading and trailing whitespace\\n\"\nmsgstr \"// 前後の空白を削除します。\\n\"\n\n#: src/trait/impl_trait.md:23 src/trait/impl_trait.md:42\nmsgid \"// Collect all strings in a row into a Vec<String>\\n\"\nmsgstr \"// 各行の全ての文字列をVec<String>に集めます。\\n\"\n\n#: src/trait/impl_trait.md:26 src/trait/impl_trait.md:45\nmsgid \"// Collect all lines into a Vec<Vec<String>>\\n\"\nmsgstr \"// 全ての行をVec<Vec<String>>に集めます。\\n\"\n\n#: src/trait/impl_trait.md:30\nmsgid \"\"\n\"`parse_csv_document` is generic, allowing it to take any type which \"\n\"implements BufRead, such as `BufReader<File>` or `[u8]`, but it's not \"\n\"important what type `R` is, and `R` is only used to declare the type of \"\n\"`src`, so the function can also be written as:\"\nmsgstr \"\"\n\"`parse_csv_document`はジェネリックなので、BufReadを実装する任意の型を取ること\"\n\"ができます。例えば、`BufReader<File>`や`[u8]`です。`R`がどんな型かは重要では\"\n\"なく、`src`の型宣言に使われているだけなので、この関数は以下のように書くことも\"\n\"できます：\"\n\n#: src/trait/impl_trait.md:49\nmsgid \"\"\n\"Note that using `impl Trait` as an argument type means that you cannot \"\n\"explicitly state what form of the function you use, i.e. \"\n\"`parse_csv_document::<std::io::Empty>(std::io::empty())` will not work with \"\n\"the second example.\"\nmsgstr \"\"\n\"`impl Trait`を引数の型として利用するということは、どのような形式の関数である\"\n\"か明示できないので、注意してください。例えば、`parse_csv_document::<std::io::\"\n\"Empty>(std::io::empty())`は2番目の例では動作しません。\"\n\n#: src/trait/impl_trait.md:52\nmsgid \"As a return type\"\nmsgstr \"リターン型\"\n\n#: src/trait/impl_trait.md:54\nmsgid \"\"\n\"If your function returns a type that implements `MyTrait`, you can write its \"\n\"return type as `-> impl MyTrait`. This can help simplify your type \"\n\"signatures quite a lot!\"\nmsgstr \"\"\n\"あなたの関数が`MyTrait`を実装する型を返す場合、リターン型を`-> impl MyTrait`\"\n\"のように書けます。これで型シグネチャをとてもシンプルにできます。\"\n\n#: src/trait/impl_trait.md:60\nmsgid \"\"\n\"// This function combines two `Vec<i32>` and returns an iterator over it.\\n\"\n\"// Look how complicated its return type is!\\n\"\nmsgstr \"\"\n\"// この関数は2つの`Vec<i32>を組み合わせて、そのイテレータを返します。\\n\"\n\"// リターン型がとても複雑です！\\n\"\n\n#: src/trait/impl_trait.md:69\nmsgid \"\"\n\"// This is the exact same function, but its return type uses `impl Trait`.\\n\"\n\"// Look how much simpler it is!\\n\"\nmsgstr \"\"\n\"// これは全く同じ関数ですが、リターン型に`impl Trait`を使っています。\\n\"\n\"// とてもシンプルですね！\\n\"\n\n#: src/trait/impl_trait.md:88\nmsgid \"\\\"all done\\\"\"\nmsgstr \"\\\"all done\\\"\"\n\n#: src/trait/impl_trait.md:92\nmsgid \"\"\n\"More importantly, some Rust types can't be written out. For example, every \"\n\"closure has its own unnamed concrete type. Before `impl Trait` syntax, you \"\n\"had to allocate on the heap in order to return a closure. But now you can do \"\n\"it all statically, like this:\"\nmsgstr \"\"\n\"より重要なことに、Rustの型には書き表せないものがあるのです。例えば、あらゆる\"\n\"クロージャは独自の無名な具象型を持ちます。`impl Trait`構文がない時は、クロー\"\n\"ジャを返すにはヒープ上に置かねばなりませんでした。しかし今では次のようにすべ\"\n\"て静的に行えます。\"\n\n#: src/trait/impl_trait.md:98\nmsgid \"// Returns a function that adds `y` to its input\\n\"\nmsgstr \"// 入力に`y`を加える関数を返します。\\n\"\n\n#: src/trait/impl_trait.md:110\nmsgid \"\"\n\"You can also use `impl Trait` to return an iterator that uses `map` or \"\n\"`filter` closures! This makes using `map` and `filter` easier. Because \"\n\"closure types don't have names, you can't write out an explicit return type \"\n\"if your function returns iterators with closures. But with `impl Trait` you \"\n\"can do this easily:\"\nmsgstr \"\"\n\"`impl Trait`を使って、`map`や`filter`クロージャを使うイテレータを返すこともで\"\n\"きます。おかげで`map`や`filter`を簡単に使えます。クロージャ型は名前を持たない\"\n\"ので、あなたの関数がクロージャを持つイテレータを返す場合、明示的なリターン型\"\n\"を書くことはできません。しかし`impl Trait`を使うことで簡単にできます：\"\n\n#: src/trait/clone.md:3\nmsgid \"\"\n\"When dealing with resources, the default behavior is to transfer them during \"\n\"assignments or function calls. However, sometimes we need to make a copy of \"\n\"the resource as well.\"\nmsgstr \"\"\n\"メモリ上の資源を扱う際、変数束縛や関数呼び出しを介して移動させるのがデフォル\"\n\"トの挙動です。しかしながら、場合によっては資源のコピーを作るのが適切なことも\"\n\"あります。\"\n\n#: src/trait/clone.md:7\nmsgid \"\"\n\"The [`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html) trait \"\n\"helps us do exactly this. Most commonly, we can use the `.clone()` method \"\n\"defined by the `Clone` trait.\"\nmsgstr \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html)トレイトはまさ\"\n\"にこのためにあります。普通は`Clone`トレイトで定義されている`.clone()`を用いま\"\n\"す。\"\n\n#: src/trait/clone.md:11\nmsgid \"// A unit struct without resources\\n\"\nmsgstr \"// いかなる資源も持たない構造体\\n\"\n\n#: src/trait/clone.md:14\nmsgid \"// A tuple struct with resources that implements the `Clone` trait\\n\"\nmsgstr \"// `Clone`トレイトを実装する型の変数を資源として持つタプル\\n\"\n\n#: src/trait/clone.md:20\nmsgid \"// Instantiate `Unit`\\n\"\nmsgstr \"// `Unit`のインスタンスを作成。\\n\"\n\n#: src/trait/clone.md:22\nmsgid \"// Copy `Unit`, there are no resources to move\\n\"\nmsgstr \"// `Unit`をコピー、移動させる資源は存在しません。\\n\"\n\n#: src/trait/clone.md:25\nmsgid \"// Both `Unit`s can be used independently\\n\"\nmsgstr \"// いずれの`Unit`も独立に使用できます。\\n\"\n\n#: src/trait/clone.md:26 src/trait/clone.md:31\nmsgid \"\\\"original: {:?}\\\"\"\nmsgstr \"\\\"original: {:?}\\\"\"\n\n#: src/trait/clone.md:27\nmsgid \"\\\"copy: {:?}\\\"\"\nmsgstr \"\\\"copy: {:?}\\\"\"\n\n#: src/trait/clone.md:29\nmsgid \"// Instantiate `Pair`\\n\"\nmsgstr \"// `Pair`のインスタンスを作成。\\n\"\n\n#: src/trait/clone.md:33\nmsgid \"// Move `pair` into `moved_pair`, moves resources\\n\"\nmsgstr \"// `pair`を`moved_pair`に移動、資源は移動します。\\n\"\n\n#: src/trait/clone.md:35\nmsgid \"\\\"moved: {:?}\\\"\"\nmsgstr \"\\\"moved: {:?}\\\"\"\n\n#: src/trait/clone.md:37\nmsgid \"\"\n\"// Error! `pair` has lost its resources\\n\"\n\"    //println!(\\\"original: {:?}\\\", pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`pair`は資源を失っています。\\n\"\n\"    //println!(\\\"original: {:?}\\\", pair);\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/trait/clone.md:41\nmsgid \"// Clone `moved_pair` into `cloned_pair` (resources are included)\\n\"\nmsgstr \"\"\n\"// `moved_pair`を`cloned_pair`にクローンします。（資源もクローンされま\"\n\"す。）\\n\"\n\n#: src/trait/clone.md:43\nmsgid \"// Drop the moved original pair using std::mem::drop\\n\"\nmsgstr \"// std::mem::dropを用いて元のpairをドロップします。\\n\"\n\n#: src/trait/clone.md:46\nmsgid \"\"\n\"// Error! `moved_pair` has been dropped\\n\"\n\"    //println!(\\\"moved and dropped: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// エラー！`moved_pair`はドロップされています。\\n\"\n\"    //println!(\\\"moved and dropped: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ この行をアンコメントしてみましょう。\\n\"\n\n#: src/trait/clone.md:50\nmsgid \"// The result from .clone() can still be used!\\n\"\nmsgstr \"// .clone()した値はまだ使用可能！\\n\"\n\n#: src/trait/clone.md:51\nmsgid \"\\\"clone: {:?}\\\"\"\nmsgstr \"\\\"clone: {:?}\\\"\"\n\n#: src/trait/supertraits.md:3\nmsgid \"\"\n\"Rust doesn't have \\\"inheritance\\\", but you can define a trait as being a \"\n\"superset of another trait. For example:\"\nmsgstr \"\"\n\"Rustには\\\"継承\\\"はありませんが、あるトレイトを別のトレイトの上位集合として定\"\n\"義できます。例えば：\"\n\n#: src/trait/supertraits.md:10\nmsgid \"\"\n\"// Person is a supertrait of Student.\\n\"\n\"// Implementing Student requires you to also impl Person.\\n\"\nmsgstr \"\"\n\"// PersonはStudentのスーパートレイトです。\\n\"\n\"// Studentを実装するにはPersonも実装する必要があります。\\n\"\n\n#: src/trait/supertraits.md:20\nmsgid \"\"\n\"// CompSciStudent (computer science student) is a subtrait of both \"\n\"Programmer \\n\"\n\"// and Student. Implementing CompSciStudent requires you to impl both \"\n\"supertraits.\\n\"\nmsgstr \"\"\n\"// CompSciStudent（コンピュータサイエンスの学生）はProgrammerとStudent両方の\"\n\"サブトレイトです。\\n\"\n\"// CompSciStudentを実装するには、両方のスーパートレイトを実装する必要がありま\"\n\"す。\\n\"\n\n#: src/trait/supertraits.md:29\nmsgid \"\"\n\"\\\"My name is {} and I attend {}. My favorite language is {}. My Git username \"\n\"is {}\\\"\"\nmsgstr \"\"\n\"\\\"My name is {} and I attend {}. My favorite language is {}. My Git username \"\n\"is {}\\\"\"\n\n#: src/trait/supertraits.md:42\nmsgid \"\"\n\"[The Rust Programming Language chapter on supertraits](https://doc.rust-lang.\"\n\"org/book/ch19-03-advanced-traits.html#using-supertraits-to-require-one-\"\n\"traits-functionality-within-another-trait)\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:3\nmsgid \"\"\n\"A type can implement many different traits. What if two traits both require \"\n\"the same name for a function? For example, many traits might have a method \"\n\"named `get()`. They might even have different return types!\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:7\nmsgid \"\"\n\"Good news: because each trait implementation gets its own `impl` block, it's \"\n\"clear which trait's `get` method you're implementing.\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:10\nmsgid \"\"\n\"What about when it comes time to _call_ those methods? To disambiguate \"\n\"between them, we have to use Fully Qualified Syntax.\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:15\nmsgid \"// Get the selected username out of this widget\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:20\nmsgid \"// Get the selected age out of this widget\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:23\nmsgid \"// A form with both a UsernameWidget and an AgeWidget\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:44 src/trait/disambiguating.md:54\nmsgid \"\\\"rustacean\\\"\"\nmsgstr \"\\\"rustacean\\\"\"\n\n#: src/trait/disambiguating.md:48\nmsgid \"\"\n\"// If you uncomment this line, you'll get an error saying\\n\"\n\"    // \\\"multiple `get` found\\\". Because, after all, there are multiple \"\n\"methods\\n\"\n\"    // named `get`.\\n\"\n\"    // println!(\\\"{}\\\", form.get());\\n\"\nmsgstr \"\"\n\n#: src/trait/disambiguating.md:62\nmsgid \"\"\n\"[The Rust Programming Language chapter on Fully Qualified syntax](https://\"\n\"doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-\"\n\"for-disambiguation-calling-methods-with-the-same-name)\"\nmsgstr \"\"\n\n#: src/macros.md:3\nmsgid \"\"\n\"Rust provides a powerful macro system that allows metaprogramming. As you've \"\n\"seen in previous chapters, macros look like functions, except that their \"\n\"name ends with a bang `!`, but instead of generating a function call, macros \"\n\"are expanded into source code that gets compiled with the rest of the \"\n\"program. However, unlike macros in C and other languages, Rust macros are \"\n\"expanded into abstract syntax trees, rather than string preprocessing, so \"\n\"you don't get unexpected precedence bugs.\"\nmsgstr \"\"\n\"Rustはメタプログラミングを可能にする、パワフルなマクロシステムを備えていま\"\n\"す。これまで見てきたように、マクロは`!`で終わることを除けば関数のように見えま\"\n\"す。関数と違うのは関数呼び出しを生成する代わりに、ソースコード中に展開され、\"\n\"周囲のプログラムとともにコンパイルされる点です。しかし、Cやその他の言語のマク\"\n\"ロが文字列のプリプロセッシングをするのと異なり、Rustのマクロは抽象構文木へと\"\n\"展開されるので、予期せぬ演算子の優先順位のバグに出くわすことがありません。\"\n\n#: src/macros.md:11\nmsgid \"Macros are created using the `macro_rules!` macro.\"\nmsgstr \"マクロを作成するには`macro_rules!`というマクロを使用します。\"\n\n#: src/macros.md:14\nmsgid \"// This is a simple macro named `say_hello`.\\n\"\nmsgstr \"// `say_hello`という名のシンプルなマクロ\\n\"\n\n#: src/macros.md:16\nmsgid \"// `()` indicates that the macro takes no argument.\\n\"\nmsgstr \"// `()`はマクロが引数をとらないことを示します。\\n\"\n\n#: src/macros.md:18\nmsgid \"// The macro will expand into the contents of this block.\\n\"\nmsgstr \"\"\n\"// マクロは（訳注: プリコンパイルの段階で）\\n\"\n\"        // このブロックの内容に展開されます。\\n\"\n\n#: src/macros.md:19\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Hello!\\\"\"\n\n#: src/macros.md:24\nmsgid \"// This call will expand into `println!(\\\"Hello!\\\")`\\n\"\nmsgstr \"// この呼び出しは`println!(\\\"Hello!\\\");`に置き換えられます。\\n\"\n\n#: src/macros.md:29\nmsgid \"So why are macros useful?\"\nmsgstr \"ではどうしてマクロは便利なのでしょうか？\"\n\n#: src/macros.md:31\nmsgid \"\"\n\"Don't repeat yourself. There are many cases where you may need similar \"\n\"functionality in multiple places but with different types. Often, writing a \"\n\"macro is a useful way to avoid repeating code. (More on this later)\"\nmsgstr \"\"\n\"同じことを繰り返し書いてはいけないから。複数の場所で、別の型だけれど似たよう\"\n\"な機能が必要な時がよくあります。しばしば、マクロはコードを繰り返し書くのを避\"\n\"ける有用な手段なのです（あとで詳述）。\"\n\n#: src/macros.md:35\nmsgid \"\"\n\"Domain-specific languages. Macros allow you to define special syntax for a \"\n\"specific purpose. (More on this later)\"\nmsgstr \"\"\n\"ドメイン特化言語であるから。マクロを使うと、特定の目的のための特定の構文を定\"\n\"義することができます（あとで詳述）。\"\n\n#: src/macros.md:38\nmsgid \"\"\n\"Variadic interfaces. Sometimes you want to define an interface that takes a \"\n\"variable number of arguments. An example is `println!` which could take any \"\n\"number of arguments, depending on the format string. (More on this later)\"\nmsgstr \"\"\n\"可変個引数によるインターフェース。取る引数の数が可変であるようなインター\"\n\"フェースを定義したくなることもあるでしょう。例えば、`println!`は、フォーマッ\"\n\"ト文字列に依存した任意の数の引数を取ることができます（あとで詳述）！\"\n\n#: src/macros/syntax.md:3\nmsgid \"\"\n\"In following subsections, we will show how to define macros in Rust. There \"\n\"are three basic ideas:\"\nmsgstr \"\"\n\"以下のサブセクションでは、Rustにおいてマクロを定義する方法を示します。3つの基\"\n\"本的な考え方があります：\"\n\n#: src/macros/syntax.md:6\nmsgid \"[Patterns and Designators](designators.md)\"\nmsgstr \"[パターンと識別子](designators.md)\"\n\n#: src/macros/syntax.md:7\nmsgid \"[Overloading](overload.md)\"\nmsgstr \"[オーバーロード](overload.md)\"\n\n#: src/macros/syntax.md:8\nmsgid \"[Repetition](repeat.md)\"\nmsgstr \"[繰り返し](repeat.md)\"\n\n#: src/macros/designators.md:3\nmsgid \"\"\n\"The arguments of a macro are prefixed by a dollar sign `$` and type \"\n\"annotated with a _designator_:\"\nmsgstr \"\"\n\"macroの引数は`$`が頭につきます。型は *識別子* でアノテーションされます。\"\n\n#: src/macros/designators.md:8\nmsgid \"\"\n\"// This macro takes an argument of designator `ident` and\\n\"\n\"    // creates a function named `$func_name`.\\n\"\n\"    // The `ident` designator is used for variable/function names.\\n\"\nmsgstr \"\"\n\"// このマクロは`ident`識別子に対応する値を引数として取り\\n\"\n\"    // `$func_name`という名の関数を作成します。\\n\"\n\"    // `ident`識別子は関数・変数の名前用の識別子です。\\n\"\n\n#: src/macros/designators.md:13\nmsgid \"// The `stringify!` macro converts an `ident` into a string.\\n\"\nmsgstr \"// `stringify!`というマクロは`ident`を文字列に変えます。\\n\"\n\n#: src/macros/designators.md:14\nmsgid \"\\\"You called {:?}()\\\"\"\nmsgstr \"\\\"You called {:?}()\\\"\"\n\n#: src/macros/designators.md:19\nmsgid \"// Create functions named `foo` and `bar` with the above macro.\\n\"\nmsgstr \"// 上のマクロを利用して`foo`、`bar`という名の関数を作成します。\\n\"\n\n#: src/macros/designators.md:25\nmsgid \"\"\n\"// This macro takes an expression of type `expr` and prints\\n\"\n\"    // it as a string along with its result.\\n\"\n\"    // The `expr` designator is used for expressions.\\n\"\nmsgstr \"\"\n\"// このマクロは`expr`識別子に対応する値を引数として取り、\\n\"\n\"    // その結果を文字列として出力します。\\n\"\n\"    // `expr`識別子は式に対応します。\\n\"\n\n#: src/macros/designators.md:29\nmsgid \"// `stringify!` will convert the expression *as it is* into a string.\\n\"\nmsgstr \"// `stringify!`は式を *そのままの形で* 文字列に変換します\\n\"\n\n#: src/macros/designators.md:30\nmsgid \"\\\"{:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} = {:?}\\\"\"\n\n#: src/macros/designators.md:42\nmsgid \"// Recall that blocks are expressions too!\\n\"\nmsgstr \"// ブロックも式の一種であることを思い出しましょう！\\n\"\n\n#: src/macros/designators.md:51\nmsgid \"These are some of the available designators:\"\nmsgstr \"使用できる識別子には以下のようなものがあります。\"\n\n#: src/macros/designators.md:53\nmsgid \"`block`\"\nmsgstr \"`block`\"\n\n#: src/macros/designators.md:54\nmsgid \"`expr` is used for expressions\"\nmsgstr \"`expr` 式に使用。\"\n\n#: src/macros/designators.md:55\nmsgid \"`ident` is used for variable/function names\"\nmsgstr \"`ident` 関数、変数の名前に使用。\"\n\n#: src/macros/designators.md:56\nmsgid \"`item`\"\nmsgstr \"`item`\"\n\n#: src/macros/designators.md:57\nmsgid \"`literal` is used for literal constants\"\nmsgstr \"`literal` はリテラル定数。\"\n\n#: src/macros/designators.md:58\nmsgid \"`pat` (_pattern_)\"\nmsgstr \"`pat`（*パターン*）\"\n\n#: src/macros/designators.md:59\nmsgid \"`path`\"\nmsgstr \"`path`\"\n\n#: src/macros/designators.md:60\nmsgid \"`stmt` (_statement_)\"\nmsgstr \"`stmt`（*宣言*）\"\n\n#: src/macros/designators.md:61\nmsgid \"`tt` (_token tree_)\"\nmsgstr \"`tt`（*トークンツリー*）\"\n\n#: src/macros/designators.md:62\nmsgid \"`ty` (_type_)\"\nmsgstr \"`ty`（*型*）\"\n\n#: src/macros/designators.md:63\nmsgid \"`vis` (_visibility qualifier_)\"\nmsgstr \"`vis`（*可視性修飾子*）（訳注：`pub (crate)`とか）\"\n\n#: src/macros/designators.md:65\nmsgid \"\"\n\"For a complete list, see the [Rust Reference](https://doc.rust-lang.org/\"\n\"reference/macros-by-example.html).\"\nmsgstr \"\"\n\"完全なリストを見るには、[Rustリファレンス](https://doc.rust-lang.org/\"\n\"reference/macros-by-example.html)を読んでください。\"\n\n#: src/macros/overload.md:3\nmsgid \"\"\n\"Macros can be overloaded to accept different combinations of arguments. In \"\n\"that regard, `macro_rules!` can work similarly to a match block:\"\nmsgstr \"\"\n\"マクロは異なる引数の組み合わせを取るようにオーバーロードすることができるた\"\n\"め、`macro_rules!`はマッチと似たような使い方をすることができます。\"\n\n#: src/macros/overload.md:7\nmsgid \"\"\n\"// `test!` will compare `$left` and `$right`\\n\"\n\"// in different ways depending on how you invoke it:\\n\"\nmsgstr \"\"\n\"// `test!`は`$left`と`$right`を異なる呼び出し方に応じて\\n\"\n\"// 比較します。\\n\"\n\n#: src/macros/overload.md:10\nmsgid \"\"\n\"// Arguments don't need to be separated by a comma.\\n\"\n\"    // Any template can be used!\\n\"\nmsgstr \"\"\n\"// 引数はカンマで区切らなくても構いません。\\n\"\n\"    // テンプレートの形態は自由！\\n\"\n\n#: src/macros/overload.md:13\nmsgid \"\\\"{:?} and {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} and {:?} is {:?}\\\"\"\n\n#: src/macros/overload.md:18\nmsgid \"// ^ each arm must end with a semicolon.\\n\"\nmsgstr \"// ^ それぞれの`=>`節はセミコロンで終わる必要があります。\\n\"\n\n#: src/macros/overload.md:20\nmsgid \"\\\"{:?} or {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} or {:?} is {:?}\\\"\"\n\n#: src/macros/repeat.md:3\nmsgid \"\"\n\"Macros can use `+` in the argument list to indicate that an argument may \"\n\"repeat at least once, or `*`, to indicate that the argument may repeat zero \"\n\"or more times.\"\nmsgstr \"\"\n\"マクロは引数のリストの中で`+`を使うことができ、そうすることによって、引数が少\"\n\"なくとも1回以上繰り返されるということを示すことができます。同様に`*`の場合\"\n\"は、0以上を示します。\"\n\n#: src/macros/repeat.md:7\nmsgid \"\"\n\"In the following example, surrounding the matcher with `$(...),+` will match \"\n\"one or more expression, separated by commas. Also note that the semicolon is \"\n\"optional on the last case.\"\nmsgstr \"\"\n\"以下の例では、マッチ対象を `$(...),+`で囲むことにより、カンマで区切られた1つ\"\n\"以上の式とマッチします。最後のセミコロンは必須ではないことに注目しましょう。\"\n\n#: src/macros/repeat.md:12\nmsgid \"// `find_min!` will calculate the minimum of any number of arguments.\\n\"\nmsgstr \"// `find_min!`は引数として与えられた数字の中の最低の値を計算します。\\n\"\n\n#: src/macros/repeat.md:14\nmsgid \"// Base case:\\n\"\nmsgstr \"// 基本となるケース\\n\"\n\n#: src/macros/repeat.md:16\nmsgid \"// `$x` followed by at least one `$y,`\\n\"\nmsgstr \"// `$x`に少なくとも1つの`$y`が続く場合\\n\"\n\n#: src/macros/repeat.md:18\nmsgid \"// Call `find_min!` on the tail `$y`\\n\"\nmsgstr \"// `find_min!`を残りの`$y`に対して再帰的に適用。\\n\"\n\n#: src/macros/dry.md:3\nmsgid \"\"\n\"Macros allow writing DRY code by factoring out the common parts of functions \"\n\"and/or test suites. Here is an example that implements and tests the `+=`, \"\n\"`*=` and `-=` operators on `Vec<T>`:\"\nmsgstr \"\"\n\"マクロは関数やテストなどにおいて、共通の部分を抽出することでDRYなコードを書く\"\n\"のに役立ちます。ここでは`Vec<T>`に`+=`、`*=`、`-=`を実装、テストするにあたっ\"\n\"て、マクロがどのように役立つかを見ていきます。\"\n\n#: src/macros/dry.md:11\nmsgid \"\"\n\"// The `tt` (token tree) designator is used for\\n\"\n\"    // operators and tokens.\\n\"\nmsgstr \"// `tt` （トークン木）識別子は演算子とトークン用の識別子です。\\n\"\n\n#: src/macros/dry.md:15\nmsgid \"\\\"{:?}: dimension mismatch: {:?} {:?} {:?}\\\"\"\nmsgstr \"\\\"{:?}: dimension mismatch: {:?} {:?} {:?}\\\"\"\n\n#: src/macros/dry.md:30\nmsgid \"// *x = x.$method(*y);\\n\"\nmsgstr \"// *x = x.$method(*y);\\n\"\n\n#: src/macros/dry.md:35\nmsgid \"// Implement `add_assign`, `mul_assign`, and `sub_assign` functions.\\n\"\nmsgstr \"// `add_assign`、`mul_assign`、`sub_assign`、関数を実装\\n\"\n\n#: src/macros/dry.md:60\nmsgid \"// Test `add_assign`, `mul_assign`, and `sub_assign`.\\n\"\nmsgstr \"// `add_assign`と`mul_assign`と`sub_assign`をテスト\\n\"\n\n#: src/macros/dsl.md:1\nmsgid \"Domain Specific Languages (DSLs)\"\nmsgstr \"Domain Specific Languages (ドメイン特化言語、DSLs)\"\n\n#: src/macros/dsl.md:3\nmsgid \"\"\n\"A DSL is a mini \\\"language\\\" embedded in a Rust macro. It is completely \"\n\"valid Rust because the macro system expands into normal Rust constructs, but \"\n\"it looks like a small language. This allows you to define concise or \"\n\"intuitive syntax for some special functionality (within bounds).\"\nmsgstr \"\"\n\"ここで言うDSLとはRustマクロに埋め込まれた小さな「言語」のことです。マクロ機能\"\n\"は通常のRustのプログラムへと展開されるので、これは完全に正当なRustなのです\"\n\"が、まるで小さな言語であるかのように見えます。これにより、（一定の条件のもと\"\n\"で）なんらかの特定の機能のための簡潔・直感的な構文を定義することができるよう\"\n\"になります。\"\n\n#: src/macros/dsl.md:8\nmsgid \"\"\n\"Suppose that I want to define a little calculator API. I would like to \"\n\"supply an expression and have the output printed to console.\"\nmsgstr \"\"\n\"ちょっとした計算機APIを定義したいとしましょう。式を与えると、出力がコンソール\"\n\"に書き出されるようにしたいです。\"\n\n#: src/macros/dsl.md:15\nmsgid \"// Force types to be unsigned integers\\n\"\nmsgstr \"// 型を整数に制約。\\n\"\n\n#: src/macros/dsl.md:16 src/macros/variadics.md:15\nmsgid \"\\\"{} = {}\\\"\"\nmsgstr \"\\\"{} = {}\\\"\"\n\n#: src/macros/dsl.md:23\nmsgid \"// hehehe `eval` is _not_ a Rust keyword!\\n\"\nmsgstr \"// `eval`はRustのキーワード *じゃない* よね！\\n\"\n\n#: src/macros/dsl.md:32 src/macros/variadics.md:35\nmsgid \"Output:\"\nmsgstr \"出力はこうなります：\"\n\n#: src/macros/dsl.md:39\nmsgid \"\"\n\"This was a very simple example, but much more complex interfaces have been \"\n\"developed, such as [`lazy_static`](https://crates.io/crates/lazy_static) or \"\n\"[`clap`](https://crates.io/crates/clap).\"\nmsgstr \"\"\n\"これはとても単純な例ですが、[`lazy_static`](https://crates.io/crates/\"\n\"lazy_static)や[`clap`](https://crates.io/crates/clap)のように、もっと複雑なイ\"\n\"ンターフェースも開発されています。\"\n\n#: src/macros/dsl.md:43\nmsgid \"\"\n\"Also, note the two pairs of braces in the macro. The outer ones are part of \"\n\"the syntax of `macro_rules!`, in addition to `()` or `[]`.\"\nmsgstr \"\"\n\"また、マクロの中に2組の括弧があることにも注目してください。外側のは、`()`や\"\n\"`[]`に加え、`macro_rules!`の構文の一部です。\"\n\n#: src/macros/variadics.md:1\nmsgid \"Variadic Interfaces\"\nmsgstr \"可変個引数によるインターフェース\"\n\n#: src/macros/variadics.md:3\nmsgid \"\"\n\"A _variadic_ interface takes an arbitrary number of arguments. For example, \"\n\"`println!` can take an arbitrary number of arguments, as determined by the \"\n\"format string.\"\nmsgstr \"\"\n\"*可変個引数の*インターフェースとは、任意の数の引数を取るものです。例えば、\"\n\"`println!`は、フォーマット文字列の定義に従い、任意の数の引数を取ることができ\"\n\"ます。\"\n\n#: src/macros/variadics.md:7\nmsgid \"\"\n\"We can extend our `calculate!` macro from the previous section to be \"\n\"variadic:\"\nmsgstr \"\"\n\"前のセクションの`calculate!`マクロを、可変個引数に拡張することができます：\"\n\n#: src/macros/variadics.md:11\nmsgid \"// The pattern for a single `eval`\\n\"\nmsgstr \"// 単一の`eval`のためのパターン\\n\"\n\n#: src/macros/variadics.md:14\nmsgid \"// Force types to be integers\\n\"\nmsgstr \"// 強制的に型を整数にします。\\n\"\n\n#: src/macros/variadics.md:19\nmsgid \"// Decompose multiple `eval`s recursively\\n\"\nmsgstr \"// 複数の`eval`を再帰的に分解します。\\n\"\n\n#: src/macros/variadics.md:27\nmsgid \"// Look ma! Variadic `calculate!`!\\n\"\nmsgstr \"// ほら！可変な`calculate!`だよ！\\n\"\n\n#: src/error.md:3\nmsgid \"\"\n\"Error handling is the process of handling the possibility of failure. For \"\n\"example, failing to read a file and then continuing to use that _bad_ input \"\n\"would clearly be problematic. Noticing and explicitly managing those errors \"\n\"saves the rest of the program from various pitfalls.\"\nmsgstr \"\"\n\"エラーハンドリングとは失敗の起きる可能性を扱うプロセスのことです。例えば、\"\n\"ファイルを読み込むのに失敗した際、その *誤った* インプットを使い続けるのは明\"\n\"らかに問題です。そのようなエラーを通知して明示的に扱うことで、残りのプログラ\"\n\"ムに問題が波及することを防ぐことができるようになります。\"\n\n#: src/error.md:8\nmsgid \"\"\n\"There are various ways to deal with errors in Rust, which are described in \"\n\"the following subchapters. They all have more or less subtle differences and \"\n\"different use cases. As a rule of thumb:\"\nmsgstr \"\"\n\"Rustには、これからこの章で見ていく通り、エラーを処理するための様々な方法が存\"\n\"在します。それらは全て僅かに異なり、ユースケースも異なります。経験則として：\"\n\n#: src/error.md:12\nmsgid \"\"\n\"An explicit `panic` is mainly useful for tests and dealing with \"\n\"unrecoverable errors. For prototyping it can be useful, for example when \"\n\"dealing with functions that haven't been implemented yet, but in those cases \"\n\"the more descriptive `unimplemented` is better. In tests `panic` is a \"\n\"reasonable way to explicitly fail.\"\nmsgstr \"\"\n\"明示的な`panic`はテストや復旧不可能なエラーに対して効果的です。プロトタイプに\"\n\"も便利で、例えば未実装の関数を扱う時などに有効ですが、このような場合にはより\"\n\"叙述的な`unimplemented`の方が良いでしょう。テストにおいては`panic`は明示的に\"\n\"テストを失敗させるための良い手法になるでしょう。\"\n\n#: src/error.md:17\nmsgid \"\"\n\"The `Option` type is for when a value is optional or when the lack of a \"\n\"value is not an error condition. For example the parent of a directory - `/` \"\n\"and `C:` don't have one. When dealing with `Option`s, `unwrap` is fine for \"\n\"prototyping and cases where it's absolutely certain that there is guaranteed \"\n\"to be a value. However `expect` is more useful since it lets you specify an \"\n\"error message in case something goes wrong anyway.\"\nmsgstr \"\"\n\"`Option`型は値があるとは限らない場合や、値が無いことがエラーの条件とならない\"\n\"場合に有効です。例えば親ディレクトリ（`/`や`C:`はそれを持ちません）などです。\"\n\"`Option`を扱う際は、`unwrap`がプロトタイプや値が確実に存在することが約束され\"\n\"るケースに使えます。しかし、`expect`の方が何かが上手くいかなかった際にエラー\"\n\"メッセージを指定することができるため、より便利でしょう。\"\n\n#: src/error.md:24\nmsgid \"\"\n\"When there is a chance that things do go wrong and the caller has to deal \"\n\"with the problem, use `Result`. You can `unwrap` and `expect` them as well \"\n\"(please don't do that unless it's a test or quick prototype).\"\nmsgstr \"\"\n\"何かが上手くいかない可能性があったり、呼び出し元が問題を処理しなければならな\"\n\"い時は、`Result`を使いましょう。`unwrap`や`expect`を実行することもできます\"\n\"（テストや短期的なプロトタイプ以外では使わないでください）。\"\n\n#: src/error.md:28\nmsgid \"\"\n\"For a more rigorous discussion of error handling, refer to the error \"\n\"handling section in the [official book](https://doc.rust-lang.org/book/\"\n\"ch09-00-error-handling.html).\"\nmsgstr \"\"\n\"より詳細なエラーハンドリングに関する議論については、[オフィシャルブック]\"\n\"(https://doc.rust-lang.org/book/ch09-00-error-handling.html)の該当の章を参考\"\n\"にしてください。\"\n\n#: src/error/panic.md:3\nmsgid \"\"\n\"The simplest error handling mechanism we will see is `panic`. It prints an \"\n\"error message, starts unwinding the stack, and usually exits the program. \"\n\"Here, we explicitly call `panic` on our error condition:\"\nmsgstr \"\"\n\"`panic`は、最もシンプルなエラーハンドリングの仕組みです。エラーメッセージの出\"\n\"力、スタックの巻き戻し、そして多くの場合プログラムの終了を実行します。例とし\"\n\"て、エラー条件に対して明示的に`panic`を呼び出してみましょう。\"\n\n#: src/error/panic.md:9 src/error/abort_unwind.md:10\nmsgid \"// You shouldn't drink too much sugary beverages.\\n\"\nmsgstr \"// 甘すぎる飲み物を飲むべきではありません。\\n\"\n\n#: src/error/panic.md:10 src/error/panic.md:17 src/error/abort_unwind.md:11\n#: src/error/abort_unwind.md:24 src/error/abort_unwind.md:42\n#: src/error/abort_unwind.md:51 src/error/option_unwrap.md:32\n#: src/error/option_unwrap.md:43 src/error/option_unwrap.md:50\nmsgid \"\\\"lemonade\\\"\"\nmsgstr \"\\\"lemonade\\\"\"\n\n#: src/error/panic.md:10 src/error/option_unwrap.md:43\nmsgid \"\\\"AAAaaaaa!!!!\\\"\"\nmsgstr \"\\\"AAAaaaaa!!!!\\\"\"\n\n#: src/error/panic.md:12 src/error/abort_unwind.md:18\n#: src/error/abort_unwind.md:45\nmsgid \"\\\"Some refreshing {} is all I need.\\\"\"\nmsgstr \"\\\"Some refreshing {} is all I need.\\\"\"\n\n#: src/error/panic.md:16 src/error/abort_unwind.md:23\n#: src/error/abort_unwind.md:50 src/error/option_unwrap.md:49\nmsgid \"\\\"water\\\"\"\nmsgstr \"\\\"water\\\"\"\n\n#: src/error/panic.md:18\nmsgid \"\\\"still water\\\"\"\nmsgstr \"\\\"still water\\\"\"\n\n#: src/error/panic.md:22\nmsgid \"\"\n\"The first call to `drink` works. The second panics and thus the third is \"\n\"never called.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:1\nmsgid \"`abort` and `unwind`\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:3\nmsgid \"\"\n\"The previous section illustrates the error handling mechanism `panic`.  \"\n\"Different code paths can be conditionally compiled based on the panic \"\n\"setting. The current values available are `unwind` and `abort`.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:6\nmsgid \"\"\n\"Building on the prior lemonade example, we explicitly use the panic strategy \"\n\"to exercise different lines of code.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:12\nmsgid \"\\\"abort\\\"\"\nmsgstr \"\\\"abort\\\"\"\n\n#: src/error/abort_unwind.md:13 src/error/abort_unwind.md:38\nmsgid \"\\\"This is not your party. Run!!!!\\\"\"\nmsgstr \"\\\"This is not your party. Run!!!!\\\"\"\n\n#: src/error/abort_unwind.md:15 src/error/abort_unwind.md:33\nmsgid \"\\\"Spit it out!!!!\\\"\"\nmsgstr \"\\\"Spit it out!!!!\\\"\"\n\n#: src/error/abort_unwind.md:28\nmsgid \"\"\n\"Here is another example focusing on rewriting `drink()` and explicitly use \"\n\"the `unwind` keyword.\"\nmsgstr \"\"\n\n#: src/error/abort_unwind.md:31 src/error/abort_unwind.md:36\nmsgid \"\\\"unwind\\\"\"\nmsgstr \"\\\"unwind\\\"\"\n\n#: src/error/abort_unwind.md:55\nmsgid \"\"\n\"The panic strategy can be set from the command line by using `abort` or \"\n\"`unwind`.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:3\nmsgid \"\"\n\"In the last example, we showed that we can induce program failure at will. \"\n\"We told our program to `panic` if we drink a sugary lemonade. But what if we \"\n\"expect _some_ drink but don't receive one? That case would be just as bad, \"\n\"so it needs to be handled!\"\nmsgstr \"\"\n\"以前の例では、甘いレモネードを飲んだ際に`panic`を呼び出すことによって、自由に\"\n\"プログラムの実行を失敗させられることが分かりました。では、何らかの飲み物を期\"\n\"待しているにもかかわらず、何も受け取らなかったらどうなるでしょう？これは悲惨\"\n\"なケースになるので、エラーハンドリングする必要があります！\"\n\n#: src/error/option_unwrap.md:8\nmsgid \"\"\n\"We _could_ test this against the null string (`\\\"\\\"`) as we do with a \"\n\"lemonade. Since we're using Rust, let's instead have the compiler point out \"\n\"cases where there's no drink.\"\nmsgstr \"\"\n\"このケースに対して、レモネードと同じように、空文字列（`\\\"\\\"`）と比較すること\"\n\"もできますが、せっかくRustを使っているので、その代わりにコンパイラに飲み物が\"\n\"ないケースを指摘させてみましょう。\"\n\n#: src/error/option_unwrap.md:12\nmsgid \"\"\n\"An `enum` called `Option<T>` in the `std` library is used when absence is a \"\n\"possibility. It manifests itself as one of two \\\"options\\\":\"\nmsgstr \"\"\n\"`std`ライブラリの中の、`Option<T>`と呼ばれる`enum`は、任意の型`T`である変数の\"\n\"値が存在しない可能性がある場合に用いられます。値の状態によって、下記２つのパ\"\n\"ターンのうちの１つとして扱われます。\"\n\n#: src/error/option_unwrap.md:15\nmsgid \"`Some(T)`: An element of type `T` was found\"\nmsgstr \"`Some(T)`：型`T`の値がある場合\"\n\n#: src/error/option_unwrap.md:16\nmsgid \"`None`: No element was found\"\nmsgstr \"`None`：値が存在しない場合\"\n\n#: src/error/option_unwrap.md:18\nmsgid \"\"\n\"These cases can either be explicitly handled via `match` or implicitly with \"\n\"`unwrap`. Implicit handling will either return the inner element or `panic`.\"\nmsgstr \"\"\n\"これらは`match`を用いて明示的に扱うこともできますし、`unwrap`で暗黙に処理する\"\n\"こともできます。後者は`Some`の中の値を返すか`panic`するかのどちらかです。\"\n\n#: src/error/option_unwrap.md:21\nmsgid \"\"\n\"Note that it's possible to manually customize `panic` with [expect](https://\"\n\"doc.rust-lang.org/std/option/enum.Option.html#method.expect), but `unwrap` \"\n\"otherwise leaves us with a less meaningful output than explicit handling. In \"\n\"the following example, explicit handling yields a more controlled result \"\n\"while retaining the option to `panic` if desired.\"\nmsgstr \"\"\n\"[expect](https://doc.rust-lang.org/std/option/enum.Option.html#method.expect)\"\n\"メソッドを用いて、`panic`を手動でカスタマイズできることに触れておきましょう。\"\n\"これは（`unwrap`をそのまま用いた場合よりも）内容が理解しやすいエラーメッセー\"\n\"ジを出力するのに役立ちます。次の例では、結果をより明示的に、可能ならいつでも\"\n\"`panic`できるように扱っていきます。\"\n\n#: src/error/option_unwrap.md:27\nmsgid \"\"\n\"// The adult has seen it all, and can handle any drink well.\\n\"\n\"// All drinks are handled explicitly using `match`.\\n\"\nmsgstr \"\"\n\"// 大人は経験豊富なので、大体どんな飲み物にも対処できます。\\n\"\n\"// あらゆる飲み物は`match`を用いて手動で処理されます。\\n\"\n\n#: src/error/option_unwrap.md:30\nmsgid \"// Specify a course of action for each case.\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap.md:32\nmsgid \"\\\"Yuck! Too sugary.\\\"\"\nmsgstr \"\\\"Yuck! Too sugary.\\\"\"\n\n#: src/error/option_unwrap.md:33\nmsgid \"\\\"{}? How nice.\\\"\"\nmsgstr \"\\\"{}? How nice.\\\"\"\n\n#: src/error/option_unwrap.md:34\nmsgid \"\\\"No drink? Oh well.\\\"\"\nmsgstr \"\\\"No drink? Oh well.\\\"\"\n\n#: src/error/option_unwrap.md:37\nmsgid \"\"\n\"// Others will `panic` before drinking sugary drinks.\\n\"\n\"// All drinks are handled implicitly using `unwrap`.\\n\"\nmsgstr \"\"\n\"// 他の人たちは甘い飲み物を飲む前に`panic`します。\\n\"\n\"// 全ての飲み物は`unwrap`を使って暗黙的に処理されます。\\n\"\n\n#: src/error/option_unwrap.md:41\nmsgid \"// `unwrap` returns a `panic` when it receives a `None`.\\n\"\nmsgstr \"// `unwrap`を使用すると値が`None`だった際に`panic`を返します。\\n\"\n\n#: src/error/option_unwrap.md:45\nmsgid \"\\\"I love {}s!!!!!\\\"\"\nmsgstr \"\\\"I love {}s!!!!!\\\"\"\n\n#: src/error/option_unwrap.md:57\nmsgid \"\\\"coffee\\\"\"\nmsgstr \"\\\"coffee\\\"\"\n\n#: src/error/option_unwrap/question_mark.md:3\nmsgid \"\"\n\"You can unpack `Option`s by using `match` statements, but it's often easier \"\n\"to use the `?` operator. If `x` is an `Option`, then evaluating `x?` will \"\n\"return the underlying value if `x` is `Some`, otherwise it will terminate \"\n\"whatever function is being executed and return `None`.\"\nmsgstr \"\"\n\"`Option`をアンパックするには`match`文を使うこともできますが、`?`を使う方が簡\"\n\"単になることが多いでしょう。`Option`の`x`があるとすると、`x?`を評価した値は、\"\n\"`x`が`Some`の場合は`x`に格納された値となり、そうでなければ実行中の関数を終了\"\n\"させ、`None`を返します。\"\n\n#: src/error/option_unwrap/question_mark.md:10\nmsgid \"\"\n\"// If `current_age` is `None`, this returns `None`.\\n\"\n\"\\t// If `current_age` is `Some`, the inner `u8` value + 1\\n\"\n\"    // gets assigned to `next_age`\\n\"\nmsgstr \"\"\n\"// `current_age`が`None`の場合、`None`を返します。\\n\"\n\"    // `current_age`が`Some`の場合、内部の`u8`型の値が`next_age`に代入されま\"\n\"す。\\n\"\n\n#: src/error/option_unwrap/question_mark.md:14\nmsgid \"\\\"Next year I will be {}\\\"\"\nmsgstr \"\\\"Next year I will be {}\\\"\"\n\n#: src/error/option_unwrap/question_mark.md:18\nmsgid \"You can chain many `?`s together to make your code much more readable.\"\nmsgstr \"多くの`?`を共に使うことで、リーダブルなコードを書くことができます。\"\n\n#: src/error/option_unwrap/question_mark.md:38\nmsgid \"\"\n\"// Gets the area code of the phone number of the person's job, if it \"\n\"exists.\\n\"\nmsgstr \"// その人の市外局番が存在する場合、取得します。\\n\"\n\n#: src/error/option_unwrap/question_mark.md:40\nmsgid \"\"\n\"// This would need many nested `match` statements without the `?` operator.\\n\"\n\"        // It would take a lot more code - try writing it yourself and see \"\n\"which\\n\"\n\"        // is easier.\\n\"\nmsgstr \"\"\n\"// `?`がなければ、多くのネストされた`match`文を必要とするため、\\n\"\n\"        // より長いコードとなります。\\n\"\n\"        // 実際に書いて、どちらの方が簡単か確かめてみましょう。\\n\"\n\n#: src/error/option_unwrap/map.md:3\nmsgid \"\"\n\"`match` is a valid method for handling `Option`s. However, you may \"\n\"eventually find heavy usage tedious, especially with operations only valid \"\n\"with an input. In these cases, [combinators](https://doc.rust-lang.org/\"\n\"reference/glossary.html#combinator) can be used to manage control flow in a \"\n\"modular fashion.\"\nmsgstr \"\"\n\"`match`は`Option`を扱うのに適したメソッドです。しかし、大量にこれを使用してい\"\n\"るとじきに億劫になってくるでしょう。引数の値が有効である（訳注: この場合は\"\n\"`None`でない）必要がある関数を扱う際には特にそうです。そうした場合には、[コン\"\n\"ビネータ](https://doc.rust-lang.org/reference/glossary.html#combinator)を使う\"\n\"と、処理の流れをモジュール化されたやり方で管理できます。\"\n\n#: src/error/option_unwrap/map.md:8\nmsgid \"\"\n\"`Option` has a built in method called `map()`, a combinator for the simple \"\n\"mapping of `Some -> Some` and `None -> None`. Multiple `map()` calls can be \"\n\"chained together for even more flexibility.\"\nmsgstr \"\"\n\"`Some -> Some`あるいは`None -> None`の単純な操作を適用する必要がある場合に\"\n\"は、`Option`は`map()`というビルトインのメソッドを提供していますので、これを使\"\n\"用しましょう。`map()`のフレキシビリティは、複数の`map()`をチェインしなければ\"\n\"ならない場合にさらに際立ちます。\"\n\n#: src/error/option_unwrap/map.md:12\nmsgid \"\"\n\"In the following example, `process()` replaces all functions previous to it \"\n\"while staying compact.\"\nmsgstr \"\"\n\"以下の例では、`process()`が直前の関数全てを用いた場合と同じ機能を、よりコンパ\"\n\"クトに果たしているのがわかります。\"\n\n#: src/error/option_unwrap/map.md:23\nmsgid \"\"\n\"// Peeling food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the peeled food.\\n\"\nmsgstr \"\"\n\"// 食べ物の皮をむく。存在しない場合は単純に`None`を返します。\\n\"\n\"// そうでなければ皮を向いた食べ物を返します。\\n\"\n\n#: src/error/option_unwrap/map.md:32\nmsgid \"\"\n\"// Chopping food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the chopped food.\\n\"\nmsgstr \"\"\n\"// 上と同じように、食べ物を切る前に、皮を向いた食べ物の有無を知る必要がありま\"\n\"す。\\n\"\n\n#: src/error/option_unwrap/map.md:41\nmsgid \"\"\n\"// Cooking food. Here, we showcase `map()` instead of `match` for case \"\n\"handling.\\n\"\nmsgstr \"\"\n\"// 上のチェックと同様ですが`match`の代わりに`map()`を使用しています。\\n\"\n\n#: src/error/option_unwrap/map.md:46\nmsgid \"\"\n\"// A function to peel, chop, and cook food all in sequence.\\n\"\n\"// We chain multiple uses of `map()` to simplify the code.\\n\"\nmsgstr \"\"\n\"// 複数の`map()`をチェインさせて、上のプロセスをシンプルにすることもできま\"\n\"す。\\n\"\n\n#: src/error/option_unwrap/map.md:54\nmsgid \"// Check whether there's food or not before trying to eat it!\\n\"\nmsgstr \"// 食べる前に、食べ物の有無をチェックするのは大事ですよね!\\n\"\n\n#: src/error/option_unwrap/map.md:58\nmsgid \"\\\"Mmm. I love {:?}\\\"\"\nmsgstr \"\\\"Mmm. I love {:?}\\\"\"\n\n#: src/error/option_unwrap/map.md:59\nmsgid \"\\\"Oh no! It wasn't edible.\\\"\"\nmsgstr \"\\\"Oh no! It wasn't edible.\\\"\"\n\n#: src/error/option_unwrap/map.md:70\nmsgid \"// Let's try the simpler looking `process()` now.\\n\"\nmsgstr \"// よりシンプルな見た目の`process()`を使用しましょう。\\n\"\n\n#: src/error/option_unwrap/map.md:81\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\nmsgstr \"\"\n\"[クロージャ](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\n\n#: src/error/option_unwrap/and_then.md:3\nmsgid \"\"\n\"`map()` was described as a chainable way to simplify `match` statements. \"\n\"However, using `map()` on a function that returns an `Option<T>` results in \"\n\"the nested `Option<Option<T>>`. Chaining multiple calls together can then \"\n\"become confusing. That's where another combinator called `and_then()`, known \"\n\"in some languages as flatmap, comes in.\"\nmsgstr \"\"\n\"先ほどは`map()`を、チェイン構文を用いて`match`文を単純化する物として説明しま\"\n\"した。しかし`Option<T>`を返す関数に対しての`map()`の使用はネストした\"\n\"`Option<Option<T>>`を生じさせます。ですので、複数の関数呼び出しをチェインさせ\"\n\"ることは混乱を招く場合があります。そんな時こそ`and_then()`の出番です。他の言\"\n\"語ではflatmapと呼ばれることもあります。\"\n\n#: src/error/option_unwrap/and_then.md:9\nmsgid \"\"\n\"`and_then()` calls its function input with the wrapped value and returns the \"\n\"result. If the `Option` is `None`, then it returns `None` instead.\"\nmsgstr \"\"\n\"`and_then()`は引数として与えられた関数にラップされた値を渡しますが、その値が\"\n\"`None`だった場合は`None`を返します。\"\n\n#: src/error/option_unwrap/and_then.md:11\nmsgid \"\"\n\"In the following example, `cookable_v3()` results in an `Option<Food>`. \"\n\"Using `map()` instead of `and_then()` would have given an \"\n\"`Option<Option<Food>>`, which is an invalid type for `eat()`.\"\nmsgstr \"\"\n\"以下の例では`cookable_v3()`は`Option<Food>`を返すため、`and_then()`ではなく\"\n\"`map()`を使用すると最終的に`Option<Option<Food>>`になります。これは`eat()`に\"\n\"は不適切な型です。\"\n\n#: src/error/option_unwrap/and_then.md:20\nmsgid \"// We don't have the ingredients to make Sushi.\\n\"\nmsgstr \"// 我々は寿司の材料を持っていません。\\n\"\n\n#: src/error/option_unwrap/and_then.md:28\nmsgid \"// We have the recipe for everything except Cordon Bleu.\\n\"\nmsgstr \"// コルドン・ブルーのレシピも持っていません。\\n\"\n\n#: src/error/option_unwrap/and_then.md:36\nmsgid \"\"\n\"// To make a dish, we need both the recipe and the ingredients.\\n\"\n\"// We can represent the logic with a chain of `match`es:\\n\"\nmsgstr \"\"\n\"// 料理を作るためには、材料とレシピの両方が必要。\\n\"\n\"// ロジックの流れを`match`のチェインで表します。\\n\"\n\n#: src/error/option_unwrap/and_then.md:45\nmsgid \"\"\n\"// This can conveniently be rewritten more compactly with `and_then()`:\\n\"\nmsgstr \"\"\n\"// `and_then()`を用いることで、同じことをよりコンパクトに表現できます。\\n\"\n\n#: src/error/option_unwrap/and_then.md:50\nmsgid \"\"\n\"// Otherwise we'd need to `flatten()` an `Option<Option<Food>>`\\n\"\n\"// to get an `Option<Food>`:\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/and_then.md:59\nmsgid \"\\\"Yay! On {:?} we get to eat {:?}.\\\"\"\nmsgstr \"\\\"Yay! On {:?} we get to eat {:?}.\\\"\"\n\n#: src/error/option_unwrap/and_then.md:60\nmsgid \"\\\"Oh no. We don't get to eat on {:?}?\\\"\"\nmsgstr \"\\\"Oh no. We don't get to eat on {:?}?\\\"\"\n\n#: src/error/option_unwrap/and_then.md:75\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then), and [`Option::flatten()`]\"\n\"(https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\nmsgstr \"\"\n\"[クロージャ](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then), [`Option::flatten()`](https://\"\n\"doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\n\n#: src/error/option_unwrap/defaults.md:1\nmsgid \"Unpacking options and defaults\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:3\nmsgid \"\"\n\"There is more than one way to unpack an `Option` and fall back on a default \"\n\"if it is `None`. To choose the one that meets our needs, we need to consider \"\n\"the following:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:4\nmsgid \"do we need eager or lazy evaluation?\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:5\nmsgid \"\"\n\"do we need to keep the original empty value intact, or modify it in place?\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:7\nmsgid \"`or()` is chainable, evaluates eagerly, keeps empty value intact\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:9\nmsgid \"\"\n\"`or()`is chainable and eagerly evaluates its argument, as is shown in the \"\n\"following example. Note that because `or`'s arguments are evaluated eagerly, \"\n\"the variable passed to `or` is moved.\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:21\n#: src/error/option_unwrap/defaults.md:54\nmsgid \"\\\"first_available_fruit: {:?}\\\"\"\nmsgstr \"\\\"first_available_fruit: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:22\nmsgid \"// first_available_fruit: Some(Orange)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:24\nmsgid \"\"\n\"// `or` moves its argument.\\n\"\n\"    // In the example above, `or(orange)` returned a `Some`, so `or(apple)` \"\n\"was not invoked.\\n\"\n\"    // But the variable named `apple` has been moved regardless, and cannot \"\n\"be used anymore.\\n\"\n\"    // println!(\\\"Variable apple was moved, so this line won't compile: \"\n\"{:?}\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:32\nmsgid \"`or_else()` is chainable, evaluates lazily, keeps empty value intact\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:34\nmsgid \"\"\n\"Another alternative is to use `or_else`, which is also chainable, and \"\n\"evaluates lazily, as is shown in the following example:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:43\nmsgid \"\\\"Providing kiwi as fallback\\\"\"\nmsgstr \"\\\"Providing kiwi as fallback\\\"\"\n\n#: src/error/option_unwrap/defaults.md:47\n#: src/error/option_unwrap/defaults.md:91\nmsgid \"\\\"Providing lemon as fallback\\\"\"\nmsgstr \"\\\"Providing lemon as fallback\\\"\"\n\n#: src/error/option_unwrap/defaults.md:55\nmsgid \"\"\n\"// Providing kiwi as fallback\\n\"\n\"    // first_available_fruit: Some(Kiwi)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:60\nmsgid \"`get_or_insert()` evaluates eagerly, modifies empty value in place\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:62\nmsgid \"\"\n\"To make sure that an `Option` contains a value, we can use `get_or_insert` \"\n\"to modify it in place with a fallback value, as is shown in the following \"\n\"example. Note that `get_or_insert` eagerly evaluates its parameter, so \"\n\"variable `apple` is moved:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:72\n#: src/error/option_unwrap/defaults.md:96\nmsgid \"\\\"first_available_fruit is: {:?}\\\"\"\nmsgstr \"\\\"first_available_fruit is: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:73\n#: src/error/option_unwrap/defaults.md:97\nmsgid \"\\\"my_fruit is: {:?}\\\"\"\nmsgstr \"\\\"my_fruit is: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:74\nmsgid \"\"\n\"// first_available_fruit is: Apple\\n\"\n\"    // my_fruit is: Some(Apple)\\n\"\n\"    //println!(\\\"Variable named `apple` is moved: {:?}\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:81\nmsgid \"`get_or_insert_with()` evaluates lazily, modifies empty value in place\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:83\nmsgid \"\"\n\"Instead of explicitly providing a value to fall back on, we can pass a \"\n\"closure to `get_or_insert_with`, as follows:\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:98\nmsgid \"\"\n\"// Providing lemon as fallback\\n\"\n\"    // first_available_fruit is: Lemon\\n\"\n\"    // my_fruit is: Some(Lemon)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:102\nmsgid \"\"\n\"// If the Option has a value, it is left unchanged, and the closure is not \"\n\"invoked\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:105\nmsgid \"\\\"should_be_apple is: {:?}\\\"\"\nmsgstr \"\\\"should_be_apple is: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:106\nmsgid \"\\\"my_apple is unchanged: {:?}\\\"\"\nmsgstr \"\\\"my_apple is unchanged: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:107\nmsgid \"\"\n\"// The output is a follows. Note that the closure `get_lemon_as_fallback` is \"\n\"not invoked\\n\"\n\"    // should_be_apple is: Apple\\n\"\n\"    // my_apple is unchanged: Some(Apple)\\n\"\nmsgstr \"\"\n\n#: src/error/option_unwrap/defaults.md:115\nmsgid \"\"\n\"[`closures`](https://doc.rust-lang.org/book/ch13-01-closures.html), \"\n\"[`get_or_insert`](https://doc.rust-lang.org/core/option/enum.Option.\"\n\"html#method.get_or_insert), [`get_or_insert_with`](https://doc.rust-lang.org/\"\n\"core/option/enum.Option.html#method.get_or_insert_with), [`moved variables`]\"\n\"(https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html), \"\n\"[`or`](https://doc.rust-lang.org/core/option/enum.Option.html#method.or), \"\n\"[`or_else`](https://doc.rust-lang.org/core/option/enum.Option.html#method.\"\n\"or_else)\"\nmsgstr \"\"\n\n#: src/error/result.md:3\nmsgid \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html) is a \"\n\"richer version of the [`Option`](https://doc.rust-lang.org/std/option/enum.\"\n\"Option.html) type that describes possible _error_ instead of possible \"\n\"_absence_.\"\nmsgstr \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html)は、リッチな\"\n\"バージョンの[`Option`](https://doc.rust-lang.org/std/option/enum.Option.html)\"\n\"型で*値の不在*の可能性の代わりに*エラー*の可能性を示します。\"\n\n#: src/error/result.md:6\nmsgid \"That is, `Result<T, E>` could have one of two outcomes:\"\nmsgstr \"つまり、`Result<T, E>`は以下の２つの結果を持ちます。\"\n\n#: src/error/result.md:8\nmsgid \"`Ok(T)`: An element `T` was found\"\nmsgstr \"`Ok<T>`：要素`T`が見つかった場合\"\n\n#: src/error/result.md:9\nmsgid \"`Err(E)`: An error was found with element `E`\"\nmsgstr \"`Err<E>`：要素`E`とともにエラーが見つかった場合\"\n\n#: src/error/result.md:11\nmsgid \"\"\n\"By convention, the expected outcome is `Ok` while the unexpected outcome is \"\n\"`Err`.\"\nmsgstr \"慣例により、`Ok`が期待される結果であり、`Err`は期待されない結果です。\"\n\n#: src/error/result.md:13\nmsgid \"\"\n\"Like `Option`, `Result` has many methods associated with it. `unwrap()`, for \"\n\"example, either yields the element `T` or `panic`s. For case handling, there \"\n\"are many combinators between `Result` and `Option` that overlap.\"\nmsgstr \"\"\n\"`Option`と同様、`Result`は多くのメソッドを持ちます。例えば`unwrap()`は、`T`も\"\n\"しくは`panic`をもたらします。エラーハンドリングでは、`Result`と`Option`で重複\"\n\"するコンビネータが多くあります。\"\n\n#: src/error/result.md:17\nmsgid \"\"\n\"In working with Rust, you will likely encounter methods that return the \"\n\"`Result` type, such as the [`parse()`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) method. It might not always be possible to \"\n\"parse a string into the other type, so `parse()` returns a `Result` \"\n\"indicating possible failure.\"\nmsgstr \"\"\n\"Rustを書いていく中で、[`parse()`](https://doc.rust-lang.org/std/primitive.\"\n\"str.html#method.parse)メソッドなど、`Result`型を返すメソッドを目にするでしょ\"\n\"う。文字列を他の型にパースすることは必ずしも成功する訳ではないため、`Result`\"\n\"を返すことで失敗するケースについてもカバーできるのです。\"\n\n#: src/error/result.md:22\nmsgid \"\"\n\"Let's see what happens when we successfully and unsuccessfully `parse()` a \"\n\"string:\"\nmsgstr \"早速、文字列を`parse()`した場合の成功例と失敗例を見てみましょう。\"\n\n#: src/error/result.md:26\nmsgid \"// Let's try using `unwrap()` to get the number out. Will it bite us?\\n\"\nmsgstr \"// `unwrap()`で数字を取り出してみましょう。痛い目を見るでしょうか？\\n\"\n\n#: src/error/result.md:33 src/error/result.md:36\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:75 src/error/result/result_map.md:79\n#: src/error/result/result_alias.md:36 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:36 src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:67\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/error/result.md:34 src/error/result.md:37\nmsgid \"\\\"double is {}\\\"\"\nmsgstr \"\\\"double is {}\\\"\"\n\n#: src/error/result.md:36 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:79 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"t\\\"\"\nmsgstr \"\\\"t\\\"\"\n\n#: src/error/result.md:41\nmsgid \"\"\n\"In the unsuccessful case, `parse()` leaves us with an error for `unwrap()` \"\n\"to `panic` on. Additionally, the `panic` exits our program and provides an \"\n\"unpleasant error message.\"\nmsgstr \"\"\n\"失敗例では、`parse()`がエラーを返すため`unwrap()`がパニックします。そして、\"\n\"`panic`はプログラムを終了させて不快なエラーメッセージを出力します。\"\n\n#: src/error/result.md:45\nmsgid \"\"\n\"To improve the quality of our error message, we should be more specific \"\n\"about the return type and consider explicitly handling the error.\"\nmsgstr \"\"\n\"エラーメッセージを改善するために、リターン型に対してもっと明確になるべきで、\"\n\"またエラーを明示的に処理することを考えるべきです。\"\n\n#: src/error/result.md:48\nmsgid \"Using `Result` in `main`\"\nmsgstr \"`main`内で使う`Result`\"\n\n#: src/error/result.md:50\nmsgid \"\"\n\"The `Result` type can also be the return type of the `main` function if \"\n\"specified explicitly. Typically the `main` function will be of the form:\"\nmsgstr \"\"\n\"`Result`型は、明示的な指定により`main`関数のリターン型にもなります。一般に、\"\n\"`main`関数は以下のような形になるでしょう。\"\n\n#: src/error/result.md:59\nmsgid \"\"\n\"However `main` is also able to have a return type of `Result`. If an error \"\n\"occurs within the `main` function it will return an error code and print a \"\n\"debug representation of the error (using the [`Debug`](https://doc.rust-lang.\"\n\"org/std/fmt/trait.Debug.html) trait). The following example shows such a \"\n\"scenario and touches on aspects covered in [the following section](result/\"\n\"early_returns.md).\"\nmsgstr \"\"\n\"一方`main`で`Result`をリターン型とすることも可能です。エラーが`main`関数内で\"\n\"発生した時、エラーコードを返し、エラーに関するデバッグ表記を（[`Debug`]\"\n\"(https://doc.rust-lang.org/std/fmt/trait.Debug.html)トレイトを使って）出力し\"\n\"ます。以下の例ではそのようなシナリオを示し、[この先の節](result/\"\n\"early_returns.md)でカバーする内容に触れていきます。\"\n\n#: src/error/result/result_map.md:3\nmsgid \"\"\n\"Panicking in the previous example's `multiply` does not make for robust \"\n\"code. Generally, we want to return the error to the caller so it can decide \"\n\"what is the right way to respond to errors.\"\nmsgstr \"\"\n\"前の例で見た`multiply`でのパニックは、コードを強固にするためには書きません。\"\n\"一般に、呼び出した側がエラーをどのように対処するべきかを自由に決められるよう\"\n\"に、エラーを呼び出した場所に返すのが好ましいです。\"\n\n#: src/error/result/result_map.md:7\nmsgid \"\"\n\"We first need to know what kind of error type we are dealing with. To \"\n\"determine the `Err` type, we look to [`parse()`](https://doc.rust-lang.org/\"\n\"std/primitive.str.html#method.parse), which is implemented with the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"[`i32`](https://doc.rust-lang.org/std/primitive.i32.html). As a result, the \"\n\"`Err` type is specified as [`ParseIntError`](https://doc.rust-lang.org/std/\"\n\"num/struct.ParseIntError.html).\"\nmsgstr \"\"\n\"まずは、どのようなエラー型を扱っているのかを知る必要があります。`Err`型を定め\"\n\"るために、[`i32`](https://doc.rust-lang.org/std/primitive.i32.html)に対し\"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html)トレイトを\"\n\"使って実装された[`parse()`](https://doc.rust-lang.org/std/primitive.str.\"\n\"html#method.parse)を見てみましょう。結果、`Err`型は[`ParseIntError`](https://\"\n\"doc.rust-lang.org/std/num/struct.ParseIntError.html)というものであることが分\"\n\"かります。\"\n\n#: src/error/result/result_map.md:12\nmsgid \"\"\n\"In the example below, the straightforward `match` statement leads to code \"\n\"that is overall more cumbersome.\"\nmsgstr \"\"\n\"以下の例では、単純な`match`文が全体として扱いづらいコードにしています。\"\n\n#: src/error/result/result_map.md:17\nmsgid \"\"\n\"// With the return type rewritten, we use pattern matching without \"\n\"`unwrap()`.\\n\"\nmsgstr \"\"\n\"// リターン型を再度記述することで、パターンマッチングを`unwrap()`なしで行いま\"\n\"す。\\n\"\n\n#: src/error/result/result_map.md:35 src/error/result/result_map.md:68\n#: src/error/result/result_alias.md:30 src/error/result/early_returns.md:30\n#: src/error/result/enter_question_mark.md:28\n#: src/error/result/enter_question_mark.md:61\nmsgid \"\\\"n is {}\\\"\"\nmsgstr \"\\\"n is {}\\\"\"\n\n#: src/error/result/result_map.md:36 src/error/result/result_map.md:69\n#: src/error/result/result_alias.md:31 src/error/result/early_returns.md:31\n#: src/error/result/enter_question_mark.md:29\n#: src/error/result/enter_question_mark.md:62\n#: src/error/multiple_error_types/define_error_type.md:55\n#: src/error/multiple_error_types/boxing_errors.md:42\n#: src/error/multiple_error_types/reenter_question_mark.md:54\n#: src/error/multiple_error_types/wrap_error.md:68\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Error: {}\\\"\"\n\n#: src/error/result/result_map.md:41 src/error/result/result_map.md:74\nmsgid \"// This still presents a reasonable answer.\\n\"\nmsgstr \"// ここは以前と変わらず、妥当な解を与えます。\\n\"\n\n#: src/error/result/result_map.md:45 src/error/result/result_map.md:78\nmsgid \"// The following now provides a much more helpful error message.\\n\"\nmsgstr \"// こちらは今度は有益なエラーメッセージを与えます。\\n\"\n\n#: src/error/result/result_map.md:51\nmsgid \"\"\n\"Luckily, `Option`'s `map`, `and_then`, and many other combinators are also \"\n\"implemented for `Result`. [`Result`](https://doc.rust-lang.org/std/result/\"\n\"enum.Result.html) contains a complete listing.\"\nmsgstr \"\"\n\"幸運にも、`Option`の`map`、`and_then`、その他多くのコンビネータも`Result`のた\"\n\"めに実装されています。[`Result`](https://doc.rust-lang.org/std/result/enum.\"\n\"Result.html)に全てのリストが記載されています。\"\n\n#: src/error/result/result_map.md:56\nmsgid \"\"\n\"// As with `Option`, we can use combinators such as `map()`.\\n\"\n\"// This function is otherwise identical to the one above and reads:\\n\"\n\"// Multiply if both values can be parsed from str, otherwise pass on the \"\n\"error.\\n\"\nmsgstr \"\"\n\"// `Option`と同様、`map()`などのコンビネータを使うことができます。\\n\"\n\"// この関数は`map()`を使っている点以外は上記の関数と同じで、\\n\"\n\"// 両方の値がstrからパース可能であればそれらを乗算し、無効であればエラーをそ\"\n\"のまま見送ります。\\n\"\n\n#: src/error/result/result_alias.md:3\nmsgid \"\"\n\"How about when we want to reuse a specific `Result` type many times? Recall \"\n\"that Rust allows us to create [aliases](../../types/alias.md). Conveniently, \"\n\"we can define one for the specific `Result` in question.\"\nmsgstr \"\"\n\"特定の`Result`型を何度も使いたくなるのはどんな時でしょう？Rustは[エイリアス]\"\n\"(../../types/alias.md)の作成をサポートしていたことを思い出してください。便利\"\n\"なことに、特定の`Result`型に対しても定義することができます。\"\n\n#: src/error/result/result_alias.md:7\nmsgid \"\"\n\"At a module level, creating aliases can be particularly helpful. Errors \"\n\"found in a specific module often have the same `Err` type, so a single alias \"\n\"can succinctly define _all_ associated `Results`. This is so useful that the \"\n\"`std` library even supplies one: [`io::Result`](https://doc.rust-lang.org/\"\n\"std/io/type.Result.html)!\"\nmsgstr \"\"\n\"モジュールレベルでは、エイリアスの作成は非常に役に立ちます。特定のモジュール\"\n\"で見られるエラーは同じ`Err`型を持つため、単一のエイリアスで簡潔に`Results`に\"\n\"関わる*全て*を定義できます。`std`ライブラリが提供するもの（[`io::Result`]\"\n\"(https://doc.rust-lang.org/std/io/type.Result.html)）もあるほど有益なのです！\"\n\n#: src/error/result/result_alias.md:12\nmsgid \"Here's a quick example to show off the syntax:\"\nmsgstr \"簡単な例で構文を見てみましょう。\"\n\n#: src/error/result/result_alias.md:16\nmsgid \"\"\n\"// Define a generic alias for a `Result` with the error type \"\n\"`ParseIntError`.\\n\"\nmsgstr \"\"\n\"// `ParseIntError`を`Err`の型として持つ全ての`Result`のジェネリックエイリア\"\n\"ス\\n\"\n\n#: src/error/result/result_alias.md:19\nmsgid \"// Use the above alias to refer to our specific `Result` type.\\n\"\nmsgstr \"// 上で定義したエイリアス（この場所特有の`Result`型）を使用。\\n\"\n\n#: src/error/result/result_alias.md:26\nmsgid \"// Here, the alias again allows us to save some space.\\n\"\nmsgstr \"// もう一度使用。エイリアスによって再度明記する必要性がありません。\\n\"\n\n#: src/error/result/result_alias.md:43\nmsgid \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\nmsgstr \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\n\n#: src/error/result/early_returns.md:3\nmsgid \"\"\n\"In the previous example, we explicitly handled the errors using combinators. \"\n\"Another way to deal with this case analysis is to use a combination of \"\n\"`match` statements and _early returns_.\"\nmsgstr \"\"\n\"前の例では、コンビネータの活用によりエラーを明示的に処理しました。場合分けに\"\n\"対する別の対処法として、`match`文と早期リターンを組み合わせて使うこともできま\"\n\"す。\"\n\n#: src/error/result/early_returns.md:7\nmsgid \"\"\n\"That is, we can simply stop executing the function and return the error if \"\n\"one occurs. For some, this form of code can be easier to both read and \"\n\"write. Consider this version of the previous example, rewritten using early \"\n\"returns:\"\nmsgstr \"\"\n\"つまり、エラーが発生した時点で関数の実行を止め、エラーを返してしまうという単\"\n\"純な方法が使えるということです。この方法の方がより読みやすく書きやすい場合が\"\n\"あります。早期リターンを使って実装された、前の例の新たなバージョンを考えてみ\"\n\"ましょう。\"\n\n#: src/error/result/early_returns.md:41\nmsgid \"\"\n\"At this point, we've learned to explicitly handle errors using combinators \"\n\"and early returns. While we generally want to avoid panicking, explicitly \"\n\"handling all of our errors is cumbersome.\"\nmsgstr \"\"\n\"ここまでで、コンビネータと早期リターンによる明示的なエラーハンドリングについ\"\n\"て学びました。しかし、パニックは一般に避けたいですが、全てのエラーを明示的に\"\n\"処理するのも厄介でしょう。\"\n\n#: src/error/result/early_returns.md:45\nmsgid \"\"\n\"In the next section, we'll introduce `?` for the cases where we simply need \"\n\"to `unwrap` without possibly inducing `panic`.\"\nmsgstr \"\"\n\"次の節では、`panic`を発生させずに`unwrap`する必要があるケースのための`?`につ\"\n\"いて紹介していきます。\"\n\n#: src/error/result/enter_question_mark.md:3\nmsgid \"\"\n\"Sometimes we just want the simplicity of `unwrap` without the possibility of \"\n\"a `panic`. Until now, `unwrap` has forced us to nest deeper and deeper when \"\n\"what we really wanted was to get the variable _out_. This is exactly the \"\n\"purpose of `?`.\"\nmsgstr \"\"\n\"時には`panic`の可能性を無視して、`unwrap`のシンプルさを活用したいこともあるで\"\n\"しょう。今までの`unwrap`は、値を*取り出す*ためだけであろうとも、ネストを深く\"\n\"書くことを要求しました。そして、これがまさに`?`の目的です。\"\n\n#: src/error/result/enter_question_mark.md:7\nmsgid \"Upon finding an `Err`, there are two valid actions to take:\"\nmsgstr \"`Err`を見つけるにあたり、２つのとるべき行動があります。\"\n\n#: src/error/result/enter_question_mark.md:9\nmsgid \"`panic!` which we already decided to try to avoid if possible\"\nmsgstr \"可能な限り避けたいと決めた`panic!`\"\n\n#: src/error/result/enter_question_mark.md:10\nmsgid \"`return` because an `Err` means it cannot be handled\"\nmsgstr \"`Err`は処理できないことを意味するため`return`\"\n\n#: src/error/result/enter_question_mark.md:12\nmsgid \"\"\n\"`?` is _almost_[^†] exactly equivalent to an `unwrap` which `return`s \"\n\"instead of `panic`king on `Err`s. Let's see how we can simplify the earlier \"\n\"example that used combinators:\"\nmsgstr \"\"\n\"`?`は*ほぼ*[^†]まさしく、`Err`に対して`panic`するより`return`するという点で\"\n\"`unwrap`と同等です。コンビネータを使った以前の例をどれだけ簡潔に書けるか見て\"\n\"みましょう。\"\n\n#: src/error/result/enter_question_mark.md:39\nmsgid \"The `try!` macro\"\nmsgstr \"`try!`マクロ\"\n\n#: src/error/result/enter_question_mark.md:41\nmsgid \"\"\n\"Before there was `?`, the same functionality was achieved with the `try!` \"\n\"macro. The `?` operator is now recommended, but you may still find `try!` \"\n\"when looking at older code. The same `multiply` function from the previous \"\n\"example would look like this using `try!`:\"\nmsgstr \"\"\n\"`?`ができる前、同様の動作を`try!`マクロによって行うことができました。現在は`?\"\n\"`演算子が推奨されていますが、古いコードでは`try!`に出会うこともあります。\"\n\"`try!`を使って前の例と同じ`multiply`関数を実装すると、以下のようになるでしょ\"\n\"う。\"\n\n#: src/error/result/enter_question_mark.md:47\nmsgid \"\"\n\"// To compile and run this example without errors, while using Cargo, change \"\n\"the value \\n\"\n\"// of the `edition` field, in the `[package]` section of the `Cargo.toml` \"\n\"file, to \\\"2015\\\".\\n\"\nmsgstr \"\"\n\"// Cargoを使いながらこの例をエラーなくコンパイル、及び実行する場合、\\n\"\n\"// `Cargo.toml`ファイル内、`[package]`セクションの`edition`の値を\\\"2015\\\"に変\"\n\"更してください。\\n\"\n\n#: src/error/result/enter_question_mark.md:73\nmsgid \"\"\n\"See [re-enter ?](../multiple_error_types/reenter_question_mark.md) for more \"\n\"details.\"\nmsgstr \"\"\n\"詳細は[re-enter ?](../multiple_error_types/reenter_question_mark.md)を参照。\"\n\n#: src/error/multiple_error_types.md:3\nmsgid \"\"\n\"The previous examples have always been very convenient; `Result`s interact \"\n\"with other `Result`s and `Option`s interact with other `Option`s.\"\nmsgstr \"\"\n\"`Result`が他の`Result`と連携したり、`Option`が他の`Option`と連携するなど、今\"\n\"までの例はとても便利な物でした。\"\n\n#: src/error/multiple_error_types.md:6\nmsgid \"\"\n\"Sometimes an `Option` needs to interact with a `Result`, or a `Result<T, \"\n\"Error1>` needs to interact with a `Result<T, Error2>`. In those cases, we \"\n\"want to manage our different error types in a way that makes them composable \"\n\"and easy to interact with.\"\nmsgstr \"\"\n\"時には`Option`が`Result`と連携したり、`Result<T, Error1>`が`Result<T, \"\n\"Error2>`と連携する必要もあるでしょう。そのような場面では、異なるエラー型を構\"\n\"成しやすく、かつ連携しやすく管理したいです。\"\n\n#: src/error/multiple_error_types.md:11\nmsgid \"\"\n\"In the following code, two instances of `unwrap` generate different error \"\n\"types. `Vec::first` returns an `Option`, while `parse::<i32>` returns a \"\n\"`Result<i32, ParseIntError>`:\"\nmsgstr \"\"\n\"以下のコードは`unwrap`の２つのインスタンスが異なるエラー型を生成します。\"\n\"`Vec::first`は`Option`を返し、一方で`parse::<i32>`は`Result<i32, \"\n\"ParseIntError>`を返しています。\"\n\n#: src/error/multiple_error_types.md:17\nmsgid \"// Generate error 1\\n\"\nmsgstr \"// エラー１の生成\\n\"\n\n#: src/error/multiple_error_types.md:18\nmsgid \"// Generate error 2\\n\"\nmsgstr \"// エラー２の生成\\n\"\n\n#: src/error/multiple_error_types.md:22\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:46\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/wrap_error.md:77 src/error/iter_result.md:40\nmsgid \"\\\"42\\\"\"\nmsgstr \"\\\"42\\\"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:46\n#: src/error/multiple_error_types/option_result.md:48\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"93\\\"\"\nmsgstr \"\\\"93\\\"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:46\n#: src/error/multiple_error_types/option_result.md:48\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"18\\\"\"\nmsgstr \"\\\"18\\\"\"\n\n#: src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:48\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"tofu\\\"\"\nmsgstr \"\\\"tofu\\\"\"\n\n#: src/error/multiple_error_types.md:26 src/error/multiple_error_types.md:28\n#: src/error/multiple_error_types.md:31\n#: src/error/multiple_error_types/define_error_type.md:54\n#: src/error/multiple_error_types/boxing_errors.md:41\n#: src/error/multiple_error_types/reenter_question_mark.md:53\n#: src/error/multiple_error_types/wrap_error.md:66\nmsgid \"\\\"The first doubled is {}\\\"\"\nmsgstr \"\\\"The first doubled is {}\\\"\"\n\n#: src/error/multiple_error_types.md:29\n#: src/error/multiple_error_types/option_result.md:23\nmsgid \"// Error 1: the input vector is empty\\n\"\nmsgstr \"// エラー１：入力が空ベクタ\\n\"\n\n#: src/error/multiple_error_types.md:32\n#: src/error/multiple_error_types/option_result.md:26\nmsgid \"// Error 2: the element doesn't parse to a number\\n\"\nmsgstr \"// エラー２：要素が数字としてパースできない。\\n\"\n\n#: src/error/multiple_error_types.md:36\nmsgid \"\"\n\"Over the next sections, we'll see several strategies for handling these kind \"\n\"of problems.\"\nmsgstr \"この先の節では、これらの問題を処理する方法について見ていきます。\"\n\n#: src/error/multiple_error_types/option_result.md:3\nmsgid \"\"\n\"The most basic way of handling mixed error types is to just embed them in \"\n\"each other.\"\nmsgstr \"\"\n\"混在するエラー型に対する最も基本的な対処法は、単にお互いを埋め込んでしまうこ\"\n\"とです。\"\n\n#: src/error/multiple_error_types/option_result.md:20\n#: src/error/multiple_error_types/option_result.md:22\n#: src/error/multiple_error_types/option_result.md:25\n#: src/error/multiple_error_types/option_result.md:50\n#: src/error/multiple_error_types/option_result.md:51\n#: src/error/multiple_error_types/option_result.md:52\nmsgid \"\\\"The first doubled is {:?}\\\"\"\nmsgstr \"\\\"The first doubled is {:?}\\\"\"\n\n#: src/error/multiple_error_types/option_result.md:30\nmsgid \"\"\n\"There are times when we'll want to stop processing on errors (like with [`?`]\"\n\"(../result/enter_question_mark.md)) but keep going when the `Option` is \"\n\"`None`. A couple of combinators come in handy to swap the `Result` and \"\n\"`Option`.\"\nmsgstr \"\"\n\"中には、`Option`の中身が`None`の場合はそのまま処理を進め、エラーの検出に限り\"\n\"実行を止めたいという場合もあるでしょう（[`?`](../result/enter_question_mark.\"\n\"md)を使った時のように）。いくつかのコンビネータによって簡単に`Result`と\"\n\"`Option`をスワップすることができます。\"\n\n#: src/error/multiple_error_types/define_error_type.md:3\nmsgid \"\"\n\"Sometimes it simplifies the code to mask all of the different errors with a \"\n\"single type of error.  We'll show this with a custom error.\"\nmsgstr \"\"\n\"異なるエラー型をマスクし単一のエラー型として扱えるようにすると、コードがシン\"\n\"プルになる場合があります。ここでは自前のエラー型でそれを示してみます。\"\n\n#: src/error/multiple_error_types/define_error_type.md:6\nmsgid \"\"\n\"Rust allows us to define our own error types. In general, a \\\"good\\\" error \"\n\"type:\"\nmsgstr \"\"\n\"Rustはユーザーによる新たなエラー型の定義をサポートします。一般に「良い」エ\"\n\"ラー型は、\"\n\n#: src/error/multiple_error_types/define_error_type.md:8\nmsgid \"Represents different errors with the same type\"\nmsgstr \"異なるエラーをまとめて同じ型として扱う。\"\n\n#: src/error/multiple_error_types/define_error_type.md:9\nmsgid \"Presents nice error messages to the user\"\nmsgstr \"ユーザーに優しいエラーメッセージを提供する。\"\n\n#: src/error/multiple_error_types/define_error_type.md:10\nmsgid \"Is easy to compare with other types\"\nmsgstr \"他の型との比較を楽にする。\"\n\n#: src/error/multiple_error_types/define_error_type.md:11\nmsgid \"Good: `Err(EmptyVec)`\"\nmsgstr \"良い例：`Err(EmptyVec)`\"\n\n#: src/error/multiple_error_types/define_error_type.md:12\nmsgid \"\"\n\"Bad: `Err(\\\"Please use a vector with at least one element\\\".to_owned())`\"\nmsgstr \"\"\n\"悪い例：`Err(\\\"Please use a vector with at least one element\\\".to_owned())`\"\n\n#: src/error/multiple_error_types/define_error_type.md:13\nmsgid \"Can hold information about the error\"\nmsgstr \"エラーについての情報を保持できる。\"\n\n#: src/error/multiple_error_types/define_error_type.md:14\nmsgid \"Good: `Err(BadChar(c, position))`\"\nmsgstr \"良い例：`Err(BadChar(c, position))`\"\n\n#: src/error/multiple_error_types/define_error_type.md:15\nmsgid \"Bad: `Err(\\\"+ cannot be used here\\\".to_owned())`\"\nmsgstr \"悪い例：`Err(\\\"+ cannot be used here\\\".to_owned())`\"\n\n#: src/error/multiple_error_types/define_error_type.md:16\nmsgid \"Composes well with other errors\"\nmsgstr \"他のエラーと問題なく連携できる。\"\n\n#: src/error/multiple_error_types/define_error_type.md:22\nmsgid \"\"\n\"// Define our error types. These may be customized for our error handling \"\n\"cases.\\n\"\n\"// Now we will be able to write our own errors, defer to an underlying \"\n\"error\\n\"\n\"// implementation, or do something in between.\\n\"\nmsgstr \"\"\n\"// 自前のエラー型の定義。エラーハンドリングのケースの応じてカスタマイズできま\"\n\"す。\\n\"\n\"// ここで新たなエラーを書くことができ、元のエラーの実装に処理を委譲したり、\\n\"\n\"// その手前で何らかの処理を挟むことができます。\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:28\nmsgid \"\"\n\"// Generation of an error is completely separate from how it is displayed.\\n\"\n\"// There's no need to be concerned about cluttering complex logic with the \"\n\"display style.\\n\"\n\"//\\n\"\n\"// Note that we don't store any extra info about the errors. This means we \"\n\"can't state\\n\"\n\"// which string failed to parse without modifying our types to carry that \"\n\"information.\\n\"\nmsgstr \"\"\n\"// エラーの生成は、それがどのように表示されるかとは別物です。\\n\"\n\"// そのため、エラーの表示スタイルに関する複雑なロジックを煩雑になる\\n\"\n\"// などと気にする必要はありません。\\n\"\n\"//\\n\"\n\"// エラーに関する余分な情報を持たせていないことに注意してください。\\n\"\n\"// どの文字列がパースに失敗したかなどを出力することは、\\n\"\n\"// その情報を保持させるようにエラーの定義を修正しない限りできません。\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:36\n#: src/error/multiple_error_types/boxing_errors.md:23\n#: src/error/multiple_error_types/reenter_question_mark.md:37\nmsgid \"\\\"invalid first item to double\\\"\"\nmsgstr \"\\\"invalid first item to double\\\"\"\n\n#: src/error/multiple_error_types/define_error_type.md:42\nmsgid \"// Change the error to our new type.\\n\"\nmsgstr \"// エラーを新たな型に変更します。\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:46\nmsgid \"// Update to the new error type here also.\\n\"\nmsgstr \"// ここでも新たなエラー型に更新します。\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:3\nmsgid \"\"\n\"A way to write simple code while preserving the original errors is to [`Box`]\"\n\"(https://doc.rust-lang.org/std/boxed/struct.Box.html) them.  The drawback is \"\n\"that the underlying error type is only known at runtime and not [statically \"\n\"determined](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#trait-\"\n\"objects-perform-dynamic-dispatch).\"\nmsgstr \"\"\n\"元のエラーを維持しながらシンプルなコードを書くには、[`Box`](https://doc.rust-\"\n\"lang.org/std/boxed/struct.Box.html)してしまうと良いでしょう。欠点として、元の\"\n\"エラー型はランタイムまで判明せず、[静的に決定](https://doc.rust-lang.org/\"\n\"book/ch17-02-trait-objects.html#trait-objects-perform-dynamic-dispatch)されな\"\n\"いことが挙げられます。\"\n\n#: src/error/multiple_error_types/boxing_errors.md:7\nmsgid \"\"\n\"The stdlib helps in boxing our errors by having `Box` implement conversion \"\n\"from any type that implements the `Error` trait into the trait object \"\n\"`Box<Error>`, via [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html).\"\nmsgstr \"\"\n\"標準ライブラリは`Box`に、[`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html)を介してあらゆる`Error`トレイトを実装した型から`Box<Error>`ト\"\n\"レイトオブジェクトへの変換を実装させることで、エラーをboxしやすくしてくれま\"\n\"す。\"\n\n#: src/error/multiple_error_types/boxing_errors.md:14\n#: src/error/multiple_error_types/reenter_question_mark.md:28\nmsgid \"// Change the alias to use `Box<dyn error::Error>`.\\n\"\nmsgstr \"// エイリアスを`Box<error::Error>`に変更します。\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:31\n#: src/error/multiple_error_types/boxing_errors.md:34\nmsgid \"// Converts to Box\\n\"\nmsgstr \"// Boxに変換。\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:59\nmsgid \"\"\n\"[Dynamic dispatch](https://doc.rust-lang.org/book/ch17-02-trait-objects.\"\n\"html#trait-objects-perform-dynamic-dispatch) and [`Error` trait](https://doc.\"\n\"rust-lang.org/std/error/trait.Error.html)\"\nmsgstr \"\"\n\"[動的ディスパッチ](https://doc.rust-lang.org/book/ch17-02-trait-objects.\"\n\"html#trait-objects-perform-dynamic-dispatch), [`Error` トレイト](https://doc.\"\n\"rust-lang.org/std/error/trait.Error.html)\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:3\nmsgid \"\"\n\"Notice in the previous example that our immediate reaction to calling \"\n\"`parse` is to `map` the error from a library error into a boxed error:\"\nmsgstr \"\"\n\"以前の例では`parse`の呼び出しに対するその場での対応として、エラーをライブラリ\"\n\"のエラーからboxされたエラーへと`map`していました。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:12\nmsgid \"\"\n\"Since this is a simple and common operation, it would be convenient if it \"\n\"could be elided. Alas, because `and_then` is not sufficiently flexible, it \"\n\"cannot. However, we can instead use `?`.\"\nmsgstr \"\"\n\"簡単でよくあるオペレーションのため、可能なら省略してしまえると便利だったで\"\n\"しょう。でも残念、`and_then`が十分にフレキシブルでないため、それはできませ\"\n\"ん。ただその代わり、`?`なら使えます。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:16\nmsgid \"\"\n\"`?` was previously explained as either `unwrap` or `return Err(err)`. This \"\n\"is only mostly true. It actually means `unwrap` or `return Err(From::\"\n\"from(err))`. Since `From::from` is a conversion utility between different \"\n\"types, this means that if you `?` where the error is convertible to the \"\n\"return type, it will convert automatically.\"\nmsgstr \"\"\n\"`?`の挙動は、`unwrap`または`return Err(err)`として説明されていました。これは\"\n\"ほぼ正解で、本当は`unwrap`、もしくは`return Err(From::from(err))`という意味が\"\n\"あります。`From::from`は異なる型の間での変換ユーティリティであることから、エ\"\n\"ラーがリターン型に変換可能な場合に`?`を使うことで、その変換を自動的に行ってく\"\n\"れます。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:22\nmsgid \"\"\n\"Here, we rewrite the previous example using `?`. As a result, the `map_err` \"\n\"will go away when `From::from` is implemented for our error type:\"\nmsgstr \"\"\n\"前の例を`?`を使ったものに書き換えてみましょう。その結果、`From::from`がエラー\"\n\"型に実装されている時`map_err`は消えてなくなります。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:42\nmsgid \"\"\n\"// The same structure as before but rather than chain all `Results`\\n\"\n\"// and `Options` along, we `?` to get the inner value out immediately.\\n\"\nmsgstr \"\"\n\"// 前と同じ構造ですが、`Results`と`Option`を繋げていく代わりに、\\n\"\n\"// `?`で内部の値をその場で取得します。\\n\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:69\nmsgid \"\"\n\"This is actually fairly clean now. Compared with the original `panic`, it is \"\n\"very similar to replacing the `unwrap` calls with `?` except that the return \"\n\"types are `Result`. As a result, they must be destructured at the top level.\"\nmsgstr \"\"\n\"これでかなり綺麗になりました。元の`panic`と比べ、リターン型が`Result`であるこ\"\n\"とを除けば、`unwrap`の呼び出しを`?`で置き換えたものに非常に似ています。結果、\"\n\"その`Result`は上のレベルで分解されなければなりません。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:76\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`?\"\n\"`](https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\nmsgstr \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html), [`?`]\"\n\"(https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\n\n#: src/error/multiple_error_types/wrap_error.md:3\nmsgid \"An alternative to boxing errors is to wrap them in your own error type.\"\nmsgstr \"\"\n\"Boxする方法の代替として、エラーを自前のエラー型としてラップする方法もありま\"\n\"す。\"\n\n#: src/error/multiple_error_types/wrap_error.md:16\nmsgid \"\"\n\"// We will defer to the parse error implementation for their error.\\n\"\n\"    // Supplying extra info requires adding more data to the type.\\n\"\nmsgstr \"\"\n\"// パースエラーの実装まで処理を委譲します。\\n\"\n\"    // 追加の情報を提供するには、型により多くのデータを追加する必要がありま\"\n\"す。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:25\nmsgid \"\\\"please use a vector with at least one element\\\"\"\nmsgstr \"\\\"please use a vector with at least one element\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:26\nmsgid \"\"\n\"// The wrapped error contains additional information and is available\\n\"\n\"            // via the source() method.\\n\"\nmsgstr \"\"\n\"// ラップされたエラーは追加情報を含み、\\n\"\n\"            // source メソッドから取り出すことができます。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:29\nmsgid \"\\\"the provided string could not be parsed as int\\\"\"\nmsgstr \"\\\"the provided string could not be parsed as int\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:38\nmsgid \"\"\n\"// The cause is the underlying implementation error type. Is implicitly\\n\"\n\"            // cast to the trait object `&error::Error`. This works because \"\n\"the\\n\"\n\"            // underlying type already implements the `Error` trait.\\n\"\nmsgstr \"\"\n\"// 元の実装のエラー型が原因。\\n\"\n\"            // `&error::Error`トレイトオブジェクトに暗にキャストされます。\\n\"\n\"            // 元となる型が`Error`トレイトをすでに実装しているため問題ありま\"\n\"せん。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:45\nmsgid \"\"\n\"// Implement the conversion from `ParseIntError` to `DoubleError`.\\n\"\n\"// This will be automatically called by `?` if a `ParseIntError`\\n\"\n\"// needs to be converted into a `DoubleError`.\\n\"\nmsgstr \"\"\n\"// `ParseIntError`から`DoubleError`への変換の実装。\\n\"\n\"// `ParseIntError`が`DoubleError`に変換される必要がある時、\\n\"\n\"// 自動的に`?`から呼び出されます。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:57\nmsgid \"\"\n\"// Here we implicitly use the `ParseIntError` implementation of `From` \"\n\"(which\\n\"\n\"    // we defined above) in order to create a `DoubleError`.\\n\"\nmsgstr \"\"\n\n#: src/error/multiple_error_types/wrap_error.md:70\nmsgid \"\\\"  Caused by: {}\\\"\"\nmsgstr \"\\\"  Caused by: {}\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:87\nmsgid \"\"\n\"This adds a bit more boilerplate for handling errors and might not be needed \"\n\"in all applications. There are some libraries that can take care of the \"\n\"boilerplate for you.\"\nmsgstr \"\"\n\"これはエラーの処理のボイラープレートを増やしてしまい、全てのアプリケーション\"\n\"で必要になる訳では無いでしょう。これらのボイラープレートの処理を代わりにやっ\"\n\"てくれるようなライブラリもあります。\"\n\n#: src/error/multiple_error_types/wrap_error.md:93\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Enums`](../../custom_types/enum.md)\"\nmsgstr \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html), [列挙\"\n\"型](../../custom_types/enum.md)\"\n\n#: src/error/multiple_error_types/wrap_error.md:96\nmsgid \"\"\n\"[`Crates for handling errors`](https://crates.io/keywords/error-handling)\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:3\nmsgid \"An `Iter::map` operation might fail, for example:\"\nmsgstr \"`Iter::map`オペレーションは失敗することもあります。例えば、\"\n\n#: src/error/iter_result.md:12 src/error/iter_result.md:29\n#: src/error/iter_result.md:65\nmsgid \"\\\"Results: {:?}\\\"\"\nmsgstr \"\\\"Results: {:?}\\\"\"\n\n#: src/error/iter_result.md:16\nmsgid \"Let's step through strategies for handling this.\"\nmsgstr \"ここでは、この対処法についてみてみましょう。\"\n\n#: src/error/iter_result.md:18\nmsgid \"Ignore the failed items with `filter_map()`\"\nmsgstr \"`filter_map()`を使って失敗した要素のみを無視する\"\n\n#: src/error/iter_result.md:20\nmsgid \"\"\n\"`filter_map` calls a function and filters out the results that are `None`.\"\nmsgstr \"`filter_map`は関数を呼び出し、結果が`None`になるものだけ取り除きます。\"\n\n#: src/error/iter_result.md:33\nmsgid \"Collect the failed items with `map_err()` and `filter_map()`\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:35\nmsgid \"\"\n\"`map_err` calls a function with the error, so by adding that to the previous \"\n\"`filter_map` solution we can save them off to the side while iterating.\"\nmsgstr \"\"\n\n#: src/error/iter_result.md:40\nmsgid \"\\\"999\\\"\"\nmsgstr \"\\\"999\\\"\"\n\n#: src/error/iter_result.md:47 src/error/iter_result.md:80\n#: src/error/iter_result.md:97\nmsgid \"\\\"Numbers: {:?}\\\"\"\nmsgstr \"\\\"Numbers: {:?}\\\"\"\n\n#: src/error/iter_result.md:48 src/error/iter_result.md:81\n#: src/error/iter_result.md:98\nmsgid \"\\\"Errors: {:?}\\\"\"\nmsgstr \"\\\"Errors: {:?}\\\"\"\n\n#: src/error/iter_result.md:52\nmsgid \"Fail the entire operation with `collect()`\"\nmsgstr \"`collect()`で処理全体を失敗させる\"\n\n#: src/error/iter_result.md:54\nmsgid \"\"\n\"`Result` implements `FromIterator` so that a vector of results \"\n\"(`Vec<Result<T, E>>`) can be turned into a result with a vector \"\n\"(`Result<Vec<T>, E>`). Once an `Result::Err` is found, the iteration will \"\n\"terminate.\"\nmsgstr \"\"\n\"`Result`は、それらのベクタ(`Vec<Result<T, E>>`)からベクタのそれ\"\n\"(`Result<Vec<T>, E>`)へと変換できるようにするため、`FromIterator`を実装しま\"\n\"す。`Result::Err`が見つかり次第、イテレーションは終了します。\"\n\n#: src/error/iter_result.md:69\nmsgid \"This same technique can be used with `Option`.\"\nmsgstr \"同じテクニックは、`Option`を用いて行うこともできます。\"\n\n#: src/error/iter_result.md:71\nmsgid \"Collect all valid values and failures with `partition()`\"\nmsgstr \"`partition()`を使って全ての正常な値と失敗をまとめる\"\n\n#: src/error/iter_result.md:85\nmsgid \"\"\n\"When you look at the results, you'll note that everything is still wrapped \"\n\"in `Result`.  A little more boilerplate is needed for this.\"\nmsgstr \"\"\n\"結果を見てみると、まだ全て`Result`にラップされていることに気づくでしょう。も\"\n\"う少しのボイラープレートが必要です。\"\n\n#: src/std.md:3\nmsgid \"\"\n\"The `std` library provides many custom types which expands drastically on \"\n\"the `primitives`. Some of these include:\"\nmsgstr \"\"\n\"`std`ライブラリは、基本データ型を劇的に拡張するカスタム型を数多く提供します。\"\n\"例えば以下です。\"\n\n#: src/std.md:6\nmsgid \"growable `String`s like: `\\\"hello world\\\"`\"\nmsgstr \"拡張可能な文字列である`String`。例えば：`\\\"hello world\\\"`\"\n\n#: src/std.md:7\nmsgid \"growable vectors: `[1, 2, 3]`\"\nmsgstr \"\"\n\n#: src/std.md:8\nmsgid \"optional types: `Option<i32>`\"\nmsgstr \"オプション型：`Option<i32>`\"\n\n#: src/std.md:9\nmsgid \"error handling types: `Result<i32, i32>`\"\nmsgstr \"エラーハンドリング用の`Result<i32, i32>`\"\n\n#: src/std.md:10\nmsgid \"heap allocated pointers: `Box<i32>`\"\nmsgstr \"ヒープ上の資源へのポインタ：`Box<i32>`\"\n\n#: src/std.md:14 src/std_misc.md:14\nmsgid \"\"\n\"[primitives](primitives.md) and [the std library](https://doc.rust-lang.org/\"\n\"std/)\"\nmsgstr \"\"\n\"[基本データ型](primitives.md), [`std` ライブラリ](https://doc.rust-lang.org/\"\n\"std/)\"\n\n#: src/std/box.md:3\nmsgid \"\"\n\"All values in Rust are stack allocated by default. Values can be _boxed_ \"\n\"(allocated on the heap) by creating a `Box<T>`. A box is a smart pointer to \"\n\"a heap allocated value of type `T`. When a box goes out of scope, its \"\n\"destructor is called, the inner object is destroyed, and the memory on the \"\n\"heap is freed.\"\nmsgstr \"\"\n\"Rustにおいて、すべての値はデフォルトでスタックに割り当てられます。`Box<T>`を\"\n\"作成することで、値を *ボックス化* 、すなわちヒープ上に割り当てることができま\"\n\"す。ボックスとは正確にはヒープ上におかれた`T`の値へのスマートポインタです。\"\n\"ボックスがスコープを抜けると、デストラクタが呼ばれて内包するオブジェクトが破\"\n\"棄され、ヒープメモリが解放されます。\"\n\n#: src/std/box.md:8\nmsgid \"\"\n\"Boxed values can be dereferenced using the `*` operator; this removes one \"\n\"layer of indirection.\"\nmsgstr \"\"\n\"ボックス化された値は`*`演算子を用いてデリファレンスすることができます。これに\"\n\"より一段と直接的な操作が可能になります。\"\n\n#: src/std/box.md:20\nmsgid \"\"\n\"// A Rectangle can be specified by where its top left and bottom right \\n\"\n\"// corners are in space\\n\"\nmsgstr \"// 長方形は左上の角と右下の角がどこにあるかによって特定できます。\\n\"\n\n#: src/std/box.md:34\nmsgid \"// Allocate this point on the heap, and return a pointer to it\\n\"\nmsgstr \"// このPointをヒープ上に割り当て、ポインタを返します。\\n\"\n\n#: src/std/box.md:39\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // Stack allocated variables\\n\"\nmsgstr \"\"\n\"// （以下では型を全て明示していますが、必須ではありません。）\\n\"\n\"    // この変数ははすべてスタック上に割り当てられます。\\n\"\n\n#: src/std/box.md:47\nmsgid \"// Heap allocated rectangle\\n\"\nmsgstr \"// ヒープ上に割り当てられたRectangle\\n\"\n\n#: src/std/box.md:53\nmsgid \"// The output of functions can be boxed\\n\"\nmsgstr \"// 関数の返り値をボックス化。\\n\"\n\n#: src/std/box.md:56\nmsgid \"// Double indirection\\n\"\nmsgstr \"// 間にもう一つポインタを挟みます。\\n\"\n\n#: src/std/box.md:59\nmsgid \"\\\"Point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Point occupies {} bytes on the stack\\\"\"\n\n#: src/std/box.md:61\nmsgid \"\\\"Rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Rectangle occupies {} bytes on the stack\\\"\"\n\n#: src/std/box.md:64\nmsgid \"// box size == pointer size\\n\"\nmsgstr \"// ボックスのサイズはポインタのサイズに等しい。\\n\"\n\n#: src/std/box.md:65\nmsgid \"\\\"Boxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Boxed point occupies {} bytes on the stack\\\"\"\n\n#: src/std/box.md:67\nmsgid \"\\\"Boxed rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Boxed rectangle occupies {} bytes on the stack\\\"\"\n\n#: src/std/box.md:69\nmsgid \"\\\"Boxed box occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Boxed box occupies {} bytes on the stack\\\"\"\n\n#: src/std/box.md:72\nmsgid \"// Copy the data contained in `boxed_point` into `unboxed_point`\\n\"\nmsgstr \"// `boxed_point`の保持するデータを`unboxed_point`にコピーします。\\n\"\n\n#: src/std/box.md:74\nmsgid \"\\\"Unboxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Unboxed point occupies {} bytes on the stack\\\"\"\n\n#: src/std/vec.md:3\nmsgid \"\"\n\"Vectors are re-sizable arrays. Like slices, their size is not known at \"\n\"compile time, but they can grow or shrink at any time. A vector is \"\n\"represented using 3 parameters:\"\nmsgstr \"\"\n\"「ベクタ」はサイズを変更可能な配列です。スライスと同様、そのサイズはコンパイ\"\n\"ル時には不定ですが、いつでも要素を追加したり削除したりすることができます。ベ\"\n\"クタは3つの要素で、その特徴が完全に決まります。\"\n\n#: src/std/vec.md:6\nmsgid \"pointer to the data\"\nmsgstr \"データへのポインタ\"\n\n#: src/std/vec.md:7\nmsgid \"length\"\nmsgstr \"長さ\"\n\n#: src/std/vec.md:8\nmsgid \"capacity\"\nmsgstr \"容量\"\n\n#: src/std/vec.md:10\nmsgid \"\"\n\"The capacity indicates how much memory is reserved for the vector. The \"\n\"vector can grow as long as the length is smaller than the capacity. When \"\n\"this threshold needs to be surpassed, the vector is reallocated with a \"\n\"larger capacity.\"\nmsgstr \"\"\n\"ベクタはその容量を超えない限りにおいて長くしていくことができます。超えた場合\"\n\"には、より大きな容量を持つように割り当てなおされます。\"\n\n#: src/std/vec.md:16\nmsgid \"// Iterators can be collected into vectors\\n\"\nmsgstr \"// イテレータは要素を収集してベクタにすることができます。\\n\"\n\n#: src/std/vec.md:18\nmsgid \"\\\"Collected (0..10) into: {:?}\\\"\"\nmsgstr \"\\\"Collected (0..10) into: {:?}\\\"\"\n\n#: src/std/vec.md:20\nmsgid \"// The `vec!` macro can be used to initialize a vector\\n\"\nmsgstr \"// ベクタの初期化には`vec!`マクロが使用できます。\\n\"\n\n#: src/std/vec.md:22\nmsgid \"\\\"Initial vector: {:?}\\\"\"\nmsgstr \"\\\"Initial vector: {:?}\\\"\"\n\n#: src/std/vec.md:24\nmsgid \"// Insert new element at the end of the vector\\n\"\nmsgstr \"// 新しい要素をベクタの最後に挿入することができます。\\n\"\n\n#: src/std/vec.md:25\nmsgid \"\\\"Push 4 into the vector\\\"\"\nmsgstr \"\\\"Push 4 into the vector\\\"\"\n\n#: src/std/vec.md:27\nmsgid \"\\\"Vector: {:?}\\\"\"\nmsgstr \"\\\"Vector: {:?}\\\"\"\n\n#: src/std/vec.md:29\nmsgid \"// Error! Immutable vectors can't grow\\n\"\nmsgstr \"// エラー！イミュータブルなベクタは成長できません\\n\"\n\n#: src/std/vec.md:33\nmsgid \"\"\n\"// The `len` method yields the number of elements currently stored in a \"\n\"vector\\n\"\nmsgstr \"// `len`メソッドは現在のベクタのサイズを返します。\\n\"\n\n#: src/std/vec.md:34\nmsgid \"\\\"Vector length: {}\\\"\"\nmsgstr \"\\\"Vector length: {}\\\"\"\n\n#: src/std/vec.md:36\nmsgid \"// Indexing is done using the square brackets (indexing starts at 0)\\n\"\nmsgstr \"\"\n\"// 鍵括弧を用いてインデックスによる要素へのアクセスができます。\\n\"\n\"    // （インデックスは0から開始する）\\n\"\n\n#: src/std/vec.md:37\nmsgid \"\\\"Second element: {}\\\"\"\nmsgstr \"\\\"Second element: {}\\\"\"\n\n#: src/std/vec.md:39\nmsgid \"// `pop` removes the last element from the vector and returns it\\n\"\nmsgstr \"// `pop`はベクタの最後の要素を削除すると同時に返します。\\n\"\n\n#: src/std/vec.md:40\nmsgid \"\\\"Pop last element: {:?}\\\"\"\nmsgstr \"\\\"Pop last element: {:?}\\\"\"\n\n#: src/std/vec.md:42\nmsgid \"// Out of bounds indexing yields a panic\\n\"\nmsgstr \"// 不正なインデックスアクセスはpanicを引き起こします。\\n\"\n\n#: src/std/vec.md:43\nmsgid \"\\\"Fourth element: {}\\\"\"\nmsgstr \"\\\"Fourth element: {}\\\"\"\n\n#: src/std/vec.md:46\nmsgid \"// `Vector`s can be easily iterated over\\n\"\nmsgstr \"// `Vector`は簡単にイテレートできます。\\n\"\n\n#: src/std/vec.md:47\nmsgid \"\\\"Contents of xs:\\\"\"\nmsgstr \"\\\"Contents of xs:\\\"\"\n\n#: src/std/vec.md:52\nmsgid \"\"\n\"// A `Vector` can also be iterated over while the iteration\\n\"\n\"    // count is enumerated in a separate variable (`i`)\\n\"\nmsgstr \"\"\n\"// `Vector`をイテレートしながら、\\n\"\n\"    // イテレーションの回数を別の変数（`i`）に列挙することもできます。\\n\"\n\n#: src/std/vec.md:55\nmsgid \"\\\"In position {} we have value {}\\\"\"\nmsgstr \"\\\"In position {} we have value {}\\\"\"\n\n#: src/std/vec.md:58\nmsgid \"\"\n\"// Thanks to `iter_mut`, mutable `Vector`s can also be iterated\\n\"\n\"    // over in a way that allows modifying each value\\n\"\nmsgstr \"\"\n\"// `iter_mut`を使うと、ミュータブルな`Vector`をイテレートし、\\n\"\n\"    // それぞれの値を修正することができます。\\n\"\n\n#: src/std/vec.md:63\nmsgid \"\\\"Updated vector: {:?}\\\"\"\nmsgstr \"\\\"Updated vector: {:?}\\\"\"\n\n#: src/std/vec.md:67\nmsgid \"\"\n\"More `Vec` methods can be found under the [std::vec](https://doc.rust-lang.\"\n\"org/std/vec/) module\"\nmsgstr \"\"\n\"`Vec`型のメソッドの一覧は[std::vec](https://doc.rust-lang.org/std/vec/)モ\"\n\"ジュールを見てください。\"\n\n#: src/std/str.md:3\nmsgid \"The two most used string types in Rust are `String` and `&str`.\"\nmsgstr \"Rustには文字列を扱う型が2つあります。`String`と`&str`です。\"\n\n#: src/std/str.md:5\nmsgid \"\"\n\"A `String` is stored as a vector of bytes (`Vec<u8>`), but guaranteed to \"\n\"always be a valid UTF-8 sequence. `String` is heap allocated, growable and \"\n\"not null terminated.\"\nmsgstr \"\"\n\"`String`は有効なUTF-8の配列であることを保証されたバイトのベクタ(`Vec<u8>`)と\"\n\"して保持されます。ヒープ上に保持され、伸長可能で、末端にnull文字を含みませ\"\n\"ん。\"\n\n#: src/std/str.md:9\nmsgid \"\"\n\"`&str` is a slice (`&[u8]`) that always points to a valid UTF-8 sequence, \"\n\"and can be used to view into a `String`, just like `&[T]` is a view into \"\n\"`Vec<T>`.\"\nmsgstr \"\"\n\"`&str`は有効なUTF-8の配列のスライス（`&[u8]`）で、いつでも`String`に変換する\"\n\"ことができます。`&[T]`がいつでも`Vec<T>`に変換できるのと同様です。\"\n\n#: src/std/str.md:14\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // A reference to a string allocated in read only memory\\n\"\nmsgstr \"\"\n\"// （以下の例では型を明示していますが、これらは必須ではありません。）\\n\"\n\"    // read only memory上に割り当てられた文字列への参照\\n\"\n\n#: src/std/str.md:16\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\"\"\nmsgstr \"\\\"the quick brown fox jumps over the lazy dog\\\"\"\n\n#: src/std/str.md:17\nmsgid \"\\\"Pangram: {}\\\"\"\nmsgstr \"\\\"Pangram: {}\\\"\"\n\n#: src/std/str.md:19\nmsgid \"// Iterate over words in reverse, no new string is allocated\\n\"\nmsgstr \"\"\n\"// 単語を逆順にイテレートします。新しい文字列の割り当ては起こりません。\\n\"\n\n#: src/std/str.md:20\nmsgid \"\\\"Words in reverse\\\"\"\nmsgstr \"\\\"Words in reverse\\\"\"\n\n#: src/std/str.md:25\nmsgid \"// Copy chars into a vector, sort and remove duplicates\\n\"\nmsgstr \"// 文字をベクタにコピー。ソートして重複を除去。\\n\"\n\n#: src/std/str.md:30\nmsgid \"// Create an empty and growable `String`\\n\"\nmsgstr \"// 中身が空で、伸長可能な`String`を作成。\\n\"\n\n#: src/std/str.md:33\nmsgid \"// Insert a char at the end of string\\n\"\nmsgstr \"// 文字を文字列の末端に挿入。\\n\"\n\n#: src/std/str.md:35\nmsgid \"// Insert a string at the end of string\\n\"\nmsgstr \"// 文字列を文字列の末端に挿入。\\n\"\n\n#: src/std/str.md:39\nmsgid \"\"\n\"// The trimmed string is a slice to the original string, hence no new\\n\"\n\"    // allocation is performed\\n\"\nmsgstr \"\"\n\"// 文字列のトリミング（特定文字種の除去）はオリジナルの文字列のスライスを\\n\"\n\"    // 返すので、新規のメモリ割り当ては発生しません。\\n\"\n\n#: src/std/str.md:43\nmsgid \"\\\"Used characters: {}\\\"\"\nmsgstr \"\\\"Used characters: {}\\\"\"\n\n#: src/std/str.md:45\nmsgid \"// Heap allocate a string\\n\"\nmsgstr \"// 文字列をヒープに割り当てます。\\n\"\n\n#: src/std/str.md:46\nmsgid \"\\\"I like dogs\\\"\"\nmsgstr \"\\\"I like dogs\\\"\"\n\n#: src/std/str.md:47\nmsgid \"// Allocate new memory and store the modified string there\\n\"\nmsgstr \"// 新しくメモリを確保し、変更を加えた文字列をそこに割り当てます。\\n\"\n\n#: src/std/str.md:48\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"dog\\\"\"\n\n#: src/std/str.md:48\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/std/str.md:50\nmsgid \"\\\"Alice says: {}\\\"\"\nmsgstr \"\\\"Alice says: {}\\\"\"\n\n#: src/std/str.md:51\nmsgid \"\\\"Bob says: {}\\\"\"\nmsgstr \"\\\"Bob says: {}\\\"\"\n\n#: src/std/str.md:55\nmsgid \"\"\n\"More `str`/`String` methods can be found under the [std::str](https://doc.\"\n\"rust-lang.org/std/str/) and [std::string](https://doc.rust-lang.org/std/\"\n\"string/) modules\"\nmsgstr \"\"\n\"`str`/`String`のメソッドをもっと見たい場合は[std::str](https://doc.rust-lang.\"\n\"org/std/str/)、[std::string](https://doc.rust-lang.org/std/string/)モジュール\"\n\"を参照してください。\"\n\n#: src/std/str.md:60\nmsgid \"Literals and escapes\"\nmsgstr \"\"\n\n#: src/std/str.md:62\nmsgid \"\"\n\"There are multiple ways to write string literals with special characters in \"\n\"them. All result in a similar `&str` so it's best to use the form that is \"\n\"the most convenient to write. Similarly there are multiple ways to write \"\n\"byte string literals, which all result in `&[u8; N]`.\"\nmsgstr \"\"\n\n#: src/std/str.md:67\nmsgid \"\"\n\"Generally special characters are escaped with a backslash character: `\\\\`. \"\n\"This way you can add any character to your string, even unprintable ones and \"\n\"ones that you don't know how to type. If you want a literal backslash, \"\n\"escape it with another one: `\\\\\\\\`\"\nmsgstr \"\"\n\n#: src/std/str.md:72\nmsgid \"\"\n\"String or character literal delimiters occurring within a literal must be \"\n\"escaped: `\\\"\\\\\\\"\\\"`, `'\\\\''`.\"\nmsgstr \"\"\n\n#: src/std/str.md:76\nmsgid \"// You can use escapes to write bytes by their hexadecimal values...\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:77\nmsgid \"\\\"I'm writing \\\\x52\\\\x75\\\\x73\\\\x74!\\\"\"\nmsgstr \"\\\"I'm writing \\\\x52\\\\x75\\\\x73\\\\x74!\\\"\"\n\n#: src/std/str.md:78\nmsgid \"\\\"What are you doing\\\\x3F (\\\\\\\\x3F means ?) {}\\\"\"\nmsgstr \"\\\"What are you doing\\\\x3F (\\\\\\\\x3F means ?) {}\\\"\"\n\n#: src/std/str.md:80\nmsgid \"// ...or Unicode code points.\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:81\nmsgid \"\\\"\\\\u{211D}\\\"\"\nmsgstr \"\\\"\\\\u{211D}\\\"\"\n\n#: src/std/str.md:82\nmsgid \"\\\"\\\\\\\"DOUBLE-STRUCK CAPITAL R\\\\\\\"\\\"\"\nmsgstr \"\\\"\\\\\\\"DOUBLE-STRUCK CAPITAL R\\\\\\\"\\\"\"\n\n#: src/std/str.md:84\nmsgid \"\\\"Unicode character {} (U+211D) is called {}\\\"\"\nmsgstr \"\\\"Unicode character {} (U+211D) is called {}\\\"\"\n\n#: src/std/str.md:88\nmsgid \"\"\n\"\\\"String literals\\n\"\n\"                        can span multiple lines.\\n\"\n\"                        The linebreak and indentation here ->\\\\\\n\"\n\"                        <- can be escaped too!\\\"\"\nmsgstr \"\"\n\"\\\"String literals\\n\"\n\"                        can span multiple lines.\\n\"\n\"                        The linebreak and indentation here ->\\\\\\n\"\n\"                        <- can be escaped too!\\\"\"\n\n#: src/std/str.md:96\nmsgid \"\"\n\"Sometimes there are just too many characters that need to be escaped or it's \"\n\"just much more convenient to write a string out as-is. This is where raw \"\n\"string literals come into play.\"\nmsgstr \"\"\n\n#: src/std/str.md:101\nmsgid \"r\\\"Escapes don't work here: \\\\x3F \\\\u{211D}\\\"\"\nmsgstr \"r\\\"Escapes don't work here: \\\\x3F \\\\u{211D}\\\"\"\n\n#: src/std/str.md:104\nmsgid \"// If you need quotes in a raw string, add a pair of #s\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:105\nmsgid \"r#\\\"And then I said: \\\"There is no escape!\\\"\\\"#\"\nmsgstr \"r#\\\"And then I said: \\\"There is no escape!\\\"\\\"#\"\n\n#: src/std/str.md:108\nmsgid \"\"\n\"// If you need \\\"# in your string, just use more #s in the delimiter.\\n\"\n\"    // You can use up to 255 #s.\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:110\nmsgid \"r###\\\"A string with \\\"# in it. And even \\\"##!\\\"###\"\nmsgstr \"r###\\\"A string with \\\"# in it. And even \\\"##!\\\"###\"\n\n#: src/std/str.md:115\nmsgid \"\"\n\"Want a string that's not UTF-8? (Remember, `str` and `String` must be valid \"\n\"UTF-8). Or maybe you want an array of bytes that's mostly text? Byte strings \"\n\"to the rescue!\"\nmsgstr \"\"\n\n#: src/std/str.md:122\nmsgid \"// Note that this is not actually a `&str`\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:123\nmsgid \"b\\\"this is a byte string\\\"\"\nmsgstr \"b\\\"this is a byte string\\\"\"\n\n#: src/std/str.md:125\nmsgid \"\"\n\"// Byte arrays don't have the `Display` trait, so printing them is a bit \"\n\"limited\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:126\nmsgid \"\\\"A byte string: {:?}\\\"\"\nmsgstr \"\\\"A byte string: {:?}\\\"\"\n\n#: src/std/str.md:128\nmsgid \"// Byte strings can have byte escapes...\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:129\nmsgid \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 as bytes\\\"\"\nmsgstr \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 as bytes\\\"\"\n\n#: src/std/str.md:130\nmsgid \"\"\n\"// ...but no unicode escapes\\n\"\n\"    // let escaped = b\\\"\\\\u{211D} is not allowed\\\";\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:132\nmsgid \"\\\"Some escaped bytes: {:?}\\\"\"\nmsgstr \"\\\"Some escaped bytes: {:?}\\\"\"\n\n#: src/std/str.md:135\nmsgid \"// Raw byte strings work just like raw strings\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:136\nmsgid \"br\\\"\\\\u{211D} is not escaped here\\\"\"\nmsgstr \"br\\\"\\\\u{211D} is not escaped here\\\"\"\n\n#: src/std/str.md:139\nmsgid \"// Converting a byte array to `str` can fail\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:141\nmsgid \"\\\"And the same as text: '{}'\\\"\"\nmsgstr \"\\\"And the same as text: '{}'\\\"\"\n\n#: src/std/str.md:144\nmsgid \"\"\n\"br#\\\"You can also use \\\"fancier\\\" formatting, \\\\\\n\"\n\"                    like with normal raw strings\\\"#\"\nmsgstr \"\"\n\"br#\\\"You can also use \\\"fancier\\\" formatting, \\\\\\n\"\n\"                    like with normal raw strings\\\"#\"\n\n#: src/std/str.md:147\nmsgid \"// Byte strings don't have to be UTF-8\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:148\nmsgid \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\nmsgstr \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\n\n#: src/std/str.md:148\nmsgid \"// \\\"ようこそ\\\" in SHIFT-JIS\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:150\nmsgid \"// But then they can't always be converted to `str`\\n\"\nmsgstr \"\"\n\n#: src/std/str.md:152\nmsgid \"\\\"Conversion successful: '{}'\\\"\"\nmsgstr \"\\\"Conversion successful: '{}'\\\"\"\n\n#: src/std/str.md:153\nmsgid \"\\\"Conversion failed: {:?}\\\"\"\nmsgstr \"\\\"Conversion failed: {:?}\\\"\"\n\n#: src/std/str.md:158\nmsgid \"\"\n\"For conversions between character encodings check out the [encoding](https://\"\n\"crates.io/crates/encoding) crate.\"\nmsgstr \"\"\n\n#: src/std/str.md:160\nmsgid \"\"\n\"A more detailed listing of the ways to write string literals and escape \"\n\"characters is given in the ['Tokens' chapter](https://doc.rust-lang.org/\"\n\"reference/tokens.html) of the Rust Reference.\"\nmsgstr \"\"\n\n#: src/std/option.md:3\nmsgid \"\"\n\"Sometimes it's desirable to catch the failure of some parts of a program \"\n\"instead of calling `panic!`; this can be accomplished using the `Option` \"\n\"enum.\"\nmsgstr \"\"\n\"プログラムの一部が失敗した際、`panic!`するよりも、エラーを捕捉する方が望まし\"\n\"い場合があります。これは`Option`という列挙型を用いることで可能になります。\"\n\n#: src/std/option.md:6\nmsgid \"The `Option<T>` enum has two variants:\"\nmsgstr \"列挙型`Option<T>`には2つの値があります。\"\n\n#: src/std/option.md:8\nmsgid \"`None`, to indicate failure or lack of value, and\"\nmsgstr \"`None`、これは実行の失敗か値の欠如を示します。\"\n\n#: src/std/option.md:9\nmsgid \"`Some(value)`, a tuple struct that wraps a `value` with type `T`.\"\nmsgstr \"`Some(value)`、型`T`の`value`をラップするタプルです。\"\n\n#: src/std/option.md:12\nmsgid \"// An integer division that doesn't `panic!`\\n\"\nmsgstr \"// `panic!`を起こさない整数の割り算\\n\"\n\n#: src/std/option.md:15\nmsgid \"// Failure is represented as the `None` variant\\n\"\nmsgstr \"// 失敗は`None`としてあらわされます。\\n\"\n\n#: src/std/option.md:18\nmsgid \"// Result is wrapped in a `Some` variant\\n\"\nmsgstr \"// 結果は`Some`にラップされます。\\n\"\n\n#: src/std/option.md:22\nmsgid \"// This function handles a division that may not succeed\\n\"\nmsgstr \"// この関数は失敗する割り算を扱うことができます。\\n\"\n\n#: src/std/option.md:25\nmsgid \"// `Option` values can be pattern matched, just like other enums\\n\"\nmsgstr \"\"\n\"// `Option` の値は、他のあらゆる列挙型と同様パターンマッチに使用できます。\\n\"\n\n#: src/std/option.md:27\nmsgid \"\\\"{} / {} failed!\\\"\"\nmsgstr \"\\\"{} / {} failed!\\\"\"\n\n#: src/std/option.md:29\nmsgid \"\\\"{} / {} = {}\\\"\"\nmsgstr \"\\\"{} / {} = {}\\\"\"\n\n#: src/std/option.md:38\nmsgid \"// Binding `None` to a variable needs to be type annotated\\n\"\nmsgstr \"// `None`を変数に代入する際は、型を明示しなくてはなりません。\\n\"\n\n#: src/std/option.md:44\nmsgid \"// Unwrapping a `Some` variant will extract the value wrapped.\\n\"\nmsgstr \"// `Some`をアンラップすると中の値を取得できます。\\n\"\n\n#: src/std/option.md:45 src/std/option.md:48\nmsgid \"\\\"{:?} unwraps to {:?}\\\"\"\nmsgstr \"\\\"{:?} unwraps to {:?}\\\"\"\n\n#: src/std/option.md:47\nmsgid \"// Unwrapping a `None` variant will `panic!`\\n\"\nmsgstr \"// `None`をアンラップしようとすると`panic!`します。\\n\"\n\n#: src/std/result.md:3\nmsgid \"\"\n\"We've seen that the `Option` enum can be used as a return value from \"\n\"functions that may fail, where `None` can be returned to indicate failure. \"\n\"However, sometimes it is important to express _why_ an operation failed. To \"\n\"do this we have the `Result` enum.\"\nmsgstr \"\"\n\"これまでの例で、失敗する可能性のある関数の返り値として、列挙型`Option`が使用\"\n\"でき、失敗時の返り値には`None`を用いることを見てきました。しかし、時には **な\"\n\"ぜ** そのオペレーションが失敗したのかを明示することが重要な場合があります。そ\"\n\"のためには`Result`列挙型を使用します。\"\n\n#: src/std/result.md:8\nmsgid \"The `Result<T, E>` enum has two variants:\"\nmsgstr \"列挙型`Result<T, E>`は2つの値をとりえます。\"\n\n#: src/std/result.md:10\nmsgid \"\"\n\"`Ok(value)` which indicates that the operation succeeded, and wraps the \"\n\"`value` returned by the operation. (`value` has type `T`)\"\nmsgstr \"\"\n\"`Ok(value)` ... これはオペレーションが成功したことを意味し、返り値`value`を\"\n\"ラップします。（`value`は型`T`を持ちます。）\"\n\n#: src/std/result.md:12\nmsgid \"\"\n\"`Err(why)`, which indicates that the operation failed, and wraps `why`, \"\n\"which (hopefully) explains the cause of the failure. (`why` has type `E`)\"\nmsgstr \"\"\n\"`Err(why)` ... これはオペレーションの失敗を意味します。`why`をラップしてお\"\n\"り、ここには失敗した理由が（必ずではありませんが）書かれています。（`why`の型\"\n\"は`E`です。）\"\n\n#: src/std/result.md:17\nmsgid \"// Mathematical \\\"errors\\\" we want to catch\\n\"\nmsgstr \"// 捕捉対象としたい、数学的な「エラー」\\n\"\n\n#: src/std/result.md:29\nmsgid \"\"\n\"// This operation would `fail`, instead let's return the reason of\\n\"\n\"            // the failure wrapped in `Err`\\n\"\nmsgstr \"\"\n\"// 分母が0なので、このオペレーションは普通に行えば失敗します。\\n\"\n\"            // 代わりに`Err`でラップされた失敗の理由を返しましょう。\\n\"\n\n#: src/std/result.md:33\nmsgid \"// This operation is valid, return the result wrapped in `Ok`\\n\"\nmsgstr \"\"\n\"// このオペレーションは問題がないので、\\n\"\n\"            // 結果を`Ok`でラップして返しましょう。\\n\"\n\n#: src/std/result.md:54\nmsgid \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\nmsgstr \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\n\n#: src/std/result.md:57\nmsgid \"// This is a three level match pyramid!\\n\"\nmsgstr \"// 3段階の`match`ピラミッド！\\n\"\n\n#: src/std/result.md:71\nmsgid \"// Will this fail?\\n\"\nmsgstr \"// これは失敗するでしょうか？\\n\"\n\n#: src/std/result/question_mark.md:3\nmsgid \"\"\n\"Chaining results using match can get pretty untidy; luckily, the `?` \"\n\"operator can be used to make things pretty again. `?` is used at the end of \"\n\"an expression returning a `Result`, and is equivalent to a match expression, \"\n\"where the `Err(err)` branch expands to an early `return Err(From::\"\n\"from(err))`, and the `Ok(ok)` branch expands to an `ok` expression.\"\nmsgstr \"\"\n\"マッチを利用して結果をチェインするのは中々面倒です。幸いなことに、`?`マクロを\"\n\"使用すればイケてるコードに戻すことができます。`?`は`Result`を返す式の末尾で使\"\n\"います。`Err(err)`の分岐が`return Err(From::from(err))`という早期リターンに展\"\n\"開され、`Ok(ok)`の分岐が`ok`の式に展開されるようなマッチ式と等価です。\"\n\n#: src/std/result/question_mark.md:44\nmsgid \"// Intermediate function\\n\"\nmsgstr \"// 中間関数\\n\"\n\n#: src/std/result/question_mark.md:46\nmsgid \"// if `div` \\\"fails\\\", then `DivisionByZero` will be `return`ed\\n\"\nmsgstr \"// `div`が\\\"失敗\\\"したら、`DivisionByZero`が`return`されます。\\n\"\n\n#: src/std/result/question_mark.md:49\nmsgid \"// if `ln` \\\"fails\\\", then `NonPositiveLogarithm` will be `return`ed\\n\"\nmsgstr \"\"\n\"// もし`ln`が\\\"失敗\\\"したら、`NonPositiveLogarithm`が`return`されます。\\n\"\n\n#: src/std/result/question_mark.md:59\nmsgid \"\\\"logarithm of non-positive number\\\"\"\nmsgstr \"\\\"logarithm of non-positive number\\\"\"\n\n#: src/std/result/question_mark.md:61 src/std/panic.md:15\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"division by zero\\\"\"\n\n#: src/std/result/question_mark.md:63\nmsgid \"\\\"square root of negative number\\\"\"\nmsgstr \"\\\"square root of negative number\\\"\"\n\n#: src/std/result/question_mark.md:75\nmsgid \"\"\n\"Be sure to check the [documentation](https://doc.rust-lang.org/std/result/\"\n\"index.html), as there are many methods to map/compose `Result`.\"\nmsgstr \"\"\n\"[公式ドキュメント](https://doc.rust-lang.org/std/result/index.html)をチェック\"\n\"することをオススメします。`Result`型を扱う関数や`Result`型のメソッドが多く挙\"\n\"げられています。\"\n\n#: src/std/panic.md:3\nmsgid \"\"\n\"The `panic!` macro can be used to generate a panic and start unwinding its \"\n\"stack. While unwinding, the runtime will take care of freeing all the \"\n\"resources _owned_ by the thread by calling the destructor of all its objects.\"\nmsgstr \"\"\n\"`panic!`マクロはパニックを生成し、スタックの巻き戻しを開始するために使用する\"\n\"ことができます。巻き戻しの間、ランタイムは、（訳注: panicを起こした）スレッド\"\n\"が **所有権を持つ** 全ての資源のデストラクタを呼び出し、メモリ上から解放しま\"\n\"す。\"\n\n#: src/std/panic.md:7\nmsgid \"\"\n\"Since we are dealing with programs with only one thread, `panic!` will cause \"\n\"the program to report the panic message and exit.\"\nmsgstr \"\"\n\"今回はシングルスレッドのプログラムを実行しているので、`panic!`はプログラムに\"\n\"パニックメッセージを表示させ、exitします。\"\n\n#: src/std/panic.md:11\nmsgid \"// Re-implementation of integer division (/)\\n\"\nmsgstr \"// 整数の除法(/)の再実装\\n\"\n\n#: src/std/panic.md:14\nmsgid \"// Division by zero triggers a panic\\n\"\nmsgstr \"// ゼロによる除算はパニックを引き起こします。\\n\"\n\n#: src/std/panic.md:20\nmsgid \"// The `main` task\\n\"\nmsgstr \"// `main`のタスク\\n\"\n\n#: src/std/panic.md:23\nmsgid \"// Heap allocated integer\\n\"\nmsgstr \"// ヒープ上の整数\\n\"\n\n#: src/std/panic.md:26\nmsgid \"// This operation will trigger a task failure\\n\"\nmsgstr \"// このオペレーションはタスクの失敗を引き起こします。\\n\"\n\n#: src/std/panic.md:29\nmsgid \"\\\"This point won't be reached!\\\"\"\nmsgstr \"\\\"This point won't be reached!\\\"\"\n\n#: src/std/panic.md:31\nmsgid \"// `_x` should get destroyed at this point\\n\"\nmsgstr \"// `_x`はここに到達する前に破棄されます。\\n\"\n\n#: src/std/panic.md:35\nmsgid \"Let's check that `panic!` doesn't leak memory.\"\nmsgstr \"`panic!`がメモリリークを引き起こさないことを確認しましょう。\"\n\n#: src/std/hash.md:3\nmsgid \"\"\n\"Where vectors store values by an integer index, `HashMap`s store values by \"\n\"key. `HashMap` keys can be booleans, integers, strings, or any other type \"\n\"that implements the `Eq` and `Hash` traits. More on this in the next section.\"\nmsgstr \"\"\n\"ベクタ型が値を整数のインデックスで保持するのに対し、`HashMap`ではキーで保持し\"\n\"ます。`HashMap`のキーはブーリアン、整数、文字列等の`Eq`と`Hash`トレイトを保持\"\n\"する型なら何でもOKです。次のセクションでより詳しく見ていきます。\"\n\n#: src/std/hash.md:8\nmsgid \"\"\n\"Like vectors, `HashMap`s are growable, but HashMaps can also shrink \"\n\"themselves when they have excess space. You can create a HashMap with a \"\n\"certain starting capacity using `HashMap::with_capacity(uint)`, or use \"\n\"`HashMap::new()` to get a HashMap with a default initial capacity \"\n\"(recommended).\"\nmsgstr \"\"\n\"ベクタ型と同様、伸長可能ですが、`HashMap`の場合さらに、スペースが余っていると\"\n\"きには小さくすることも可能です。`HashMap`を一定の容量のエリアに作成するときは\"\n\"`HashMap::with_capacity(uint)`を、デフォルトの容量で作成するときは`HashMap::\"\n\"new()`を用います。後者が推奨されています。\"\n\n#: src/std/hash.md:19 src/std/hash.md:30\nmsgid \"\\\"798-1364\\\"\"\nmsgstr \"\\\"798-1364\\\"\"\n\n#: src/std/hash.md:19\nmsgid \"\"\n\"\\\"We're sorry, the call cannot be completed as dialed. \\n\"\n\"            Please hang up and try again.\\\"\"\nmsgstr \"\"\n\"\\\"We're sorry, the call cannot be completed as dialed. \\n\"\n\"            Please hang up and try again.\\\"\"\n\n#: src/std/hash.md:21 src/std/hash.md:31\nmsgid \"\\\"645-7689\\\"\"\nmsgstr \"\\\"645-7689\\\"\"\n\n#: src/std/hash.md:21\nmsgid \"\"\n\"\\\"Hello, this is Mr. Awesome's Pizza. My name is Fred.\\n\"\n\"            What can I get for you today?\\\"\"\nmsgstr \"\"\n\"\\\"Hello, this is Mr. Awesome's Pizza. My name is Fred.\\n\"\n\"            What can I get for you today?\\\"\"\n\n#: src/std/hash.md:23\nmsgid \"\\\"Hi! Who is this again?\\\"\"\nmsgstr \"\\\"Hi! Who is this again?\\\"\"\n\n#: src/std/hash.md:30 src/std/hash.md:36 src/std/hash.md:43\nmsgid \"\\\"Daniel\\\"\"\nmsgstr \"\\\"Daniel\\\"\"\n\n#: src/std/hash.md:31 src/std/hash.md:45 src/std/hash.md:50\nmsgid \"\\\"Ashley\\\"\"\nmsgstr \"\\\"Ashley\\\"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"Katie\\\"\"\nmsgstr \"\\\"Katie\\\"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"435-8291\\\"\"\nmsgstr \"\\\"435-8291\\\"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"Robert\\\"\"\nmsgstr \"\\\"Robert\\\"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"956-1745\\\"\"\nmsgstr \"\\\"956-1745\\\"\"\n\n#: src/std/hash.md:35\nmsgid \"// Takes a reference and returns Option<&V>\\n\"\nmsgstr \"// 参照をとり、Option<&V>を返します。\\n\"\n\n#: src/std/hash.md:37\nmsgid \"\\\"Calling Daniel: {}\\\"\"\nmsgstr \"\\\"Calling Daniel: {}\\\"\"\n\n#: src/std/hash.md:38\nmsgid \"\\\"Don't have Daniel's number.\\\"\"\nmsgstr \"\\\"Don't have Daniel's number.\\\"\"\n\n#: src/std/hash.md:41\nmsgid \"\"\n\"// `HashMap::insert()` returns `None`\\n\"\n\"    // if the inserted value is new, `Some(value)` otherwise\\n\"\nmsgstr \"\"\n\"// `HashMap::insert()`は\\n\"\n\"    // insertされた値が新しい場合は`None`を\\n\"\n\"    // そうでなければ`Some(value)`を返します。\\n\"\n\n#: src/std/hash.md:43\nmsgid \"\\\"164-6743\\\"\"\nmsgstr \"\\\"164-6743\\\"\"\n\n#: src/std/hash.md:46\nmsgid \"\\\"Calling Ashley: {}\\\"\"\nmsgstr \"\\\"Calling Ashley: {}\\\"\"\n\n#: src/std/hash.md:47\nmsgid \"\\\"Don't have Ashley's number.\\\"\"\nmsgstr \"\\\"Don't have Ashley's number.\\\"\"\n\n#: src/std/hash.md:52\nmsgid \"\"\n\"// `HashMap::iter()` returns an iterator that yields \\n\"\n\"    // (&'a key, &'a value) pairs in arbitrary order.\\n\"\nmsgstr \"\"\n\"// `HashMap::iter()`は(&'a key, &'a value)\\n\"\n\"    // のペアを順不同で産出するイテレータを返します。\\n\"\n\n#: src/std/hash.md:55\nmsgid \"\\\"Calling {}: {}\\\"\"\nmsgstr \"\\\"Calling {}: {}\\\"\"\n\n#: src/std/hash.md:60\nmsgid \"\"\n\"For more information on how hashing and hash maps (sometimes called hash \"\n\"tables) work, have a look at [Hash Table Wikipedia](https://en.wikipedia.org/\"\n\"wiki/Hash_table)\"\nmsgstr \"\"\n\"ハッシングやハッシュマップ（ハッシュテーブルと呼ばれることもあります）の仕組\"\n\"みについて、より詳しく知りたい場合は[Wikipediaのハッシュテーブルのページ]\"\n\"(https://en.wikipedia.org/wiki/Hash_table)を見てください。\"\n\n#: src/std/hash/alt_key_types.md:3\nmsgid \"\"\n\"Any type that implements the `Eq` and `Hash` traits can be a key in \"\n\"`HashMap`. This includes:\"\nmsgstr \"\"\n\"`Eq`と`Hash`トレイトを実装している型ならば、なんでも`HashMap`のキーになること\"\n\"ができます。例えば以下です。\"\n\n#: src/std/hash/alt_key_types.md:6\nmsgid \"`bool` (though not very useful since there are only two possible keys)\"\nmsgstr \"`bool` （キーになりうる値が2つしかないので実用的ではないですが…）\"\n\n#: src/std/hash/alt_key_types.md:7\nmsgid \"`int`, `uint`, and all variations thereof\"\nmsgstr \"`int`、`uint`、あるいは他の整数型\"\n\n#: src/std/hash/alt_key_types.md:8\nmsgid \"\"\n\"`String` and `&str` (protip: you can have a `HashMap` keyed by `String` and \"\n\"call `.get()` with an `&str`)\"\nmsgstr \"\"\n\"`String`と`&str`（Tips：`String`をキーにしたハッシュマップを作製した場合、`.\"\n\"get()`メソッドの引数に`&str`を与えて値を取得することができます。）\"\n\n#: src/std/hash/alt_key_types.md:11\nmsgid \"\"\n\"Note that `f32` and `f64` do _not_ implement `Hash`, likely because \"\n\"[floating-point precision errors](https://en.wikipedia.org/wiki/\"\n\"Floating_point#Accuracy_problems) would make using them as hashmap keys \"\n\"horribly error-prone.\"\nmsgstr \"\"\n\"`f32`と`f64`は`Hash`を実装して **いない** ことに注意しましょう。おそらくこれ\"\n\"は[浮動小数点演算時に誤差が発生する](https://en.wikipedia.org/wiki/\"\n\"Floating_point#Accuracy_problems)ため、キーとして使用すると、恐ろしいほどエ\"\n\"ラーの元となるためです。\"\n\n#: src/std/hash/alt_key_types.md:15\nmsgid \"\"\n\"All collection classes implement `Eq` and `Hash` if their contained type \"\n\"also respectively implements `Eq` and `Hash`. For example, `Vec<T>` will \"\n\"implement `Hash` if `T` implements `Hash`.\"\nmsgstr \"\"\n\"集合型は、その要素となっている全ての型が`Eq`を、あるいは`Hash`を実装している\"\n\"場合、必ず同じトレイトを実装しています。例えば、`Vec<T>`は`T`が`Hash`を実装し\"\n\"ている場合、`Hash`を実装します。\"\n\n#: src/std/hash/alt_key_types.md:19\nmsgid \"\"\n\"You can easily implement `Eq` and `Hash` for a custom type with just one \"\n\"line: `#[derive(PartialEq, Eq, Hash)]`\"\nmsgstr \"\"\n\"独自の型に`Eq`あるいは`Hash`を実装するのは簡単です。以下の一行で済みます。\"\n\"`#[derive(PartialEq, Eq, Hash)]`\"\n\n#: src/std/hash/alt_key_types.md:22\nmsgid \"\"\n\"The compiler will do the rest. If you want more control over the details, \"\n\"you can implement `Eq` and/or `Hash` yourself. This guide will not cover the \"\n\"specifics of implementing `Hash`.\"\nmsgstr \"\"\n\"後はコンパイラがよしなにしてくれます。これらのトレイトの詳細をコントロールし\"\n\"たい場合、`Eq`や`Hash`を自分で実装することもできます。この文書では`Hash`トレ\"\n\"イトを実装する方法の詳細については触れません。\"\n\n#: src/std/hash/alt_key_types.md:26\nmsgid \"\"\n\"To play around with using a `struct` in `HashMap`, let's try making a very \"\n\"simple user logon system:\"\nmsgstr \"\"\n\"`struct`を`HashMap`で扱う際の例として、とてもシンプルなユーザーログインシステ\"\n\"ムを作成してみましょう。\"\n\n#: src/std/hash/alt_key_types.md:31\nmsgid \"// Eq requires that you derive PartialEq on the type.\\n\"\nmsgstr \"// Eqトレイトを使用する時は、PartialEqをderiveする必要があります。\\n\"\n\n#: src/std/hash/alt_key_types.md:48\nmsgid \"\\\"Username: {}\\\"\"\nmsgstr \"\\\"Username: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:49\nmsgid \"\\\"Password: {}\\\"\"\nmsgstr \"\\\"Password: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:50\nmsgid \"\\\"Attempting logon...\\\"\"\nmsgstr \"\\\"Attempting logon...\\\"\"\n\n#: src/std/hash/alt_key_types.md:59\nmsgid \"\\\"Successful logon!\\\"\"\nmsgstr \"\\\"Successful logon!\\\"\"\n\n#: src/std/hash/alt_key_types.md:60\nmsgid \"\\\"Name: {}\\\"\"\nmsgstr \"\\\"Name: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:61\nmsgid \"\\\"Email: {}\\\"\"\nmsgstr \"\\\"Email: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:63\nmsgid \"\\\"Login failed!\\\"\"\nmsgstr \"\\\"Login failed!\\\"\"\n\n#: src/std/hash/alt_key_types.md:71 src/std/hash/alt_key_types.md:82\n#: src/std/hash/alt_key_types.md:84\nmsgid \"\\\"j.everyman\\\"\"\nmsgstr \"\\\"j.everyman\\\"\"\n\n#: src/std/hash/alt_key_types.md:72 src/std/hash/alt_key_types.md:84\nmsgid \"\\\"password123\\\"\"\nmsgstr \"\\\"password123\\\"\"\n\n#: src/std/hash/alt_key_types.md:76\nmsgid \"\\\"John Everyman\\\"\"\nmsgstr \"\\\"John Everyman\\\"\"\n\n#: src/std/hash/alt_key_types.md:77\nmsgid \"\\\"j.everyman@email.com\\\"\"\nmsgstr \"\\\"j.everyman@email.com\\\"\"\n\n#: src/std/hash/alt_key_types.md:82\nmsgid \"\\\"psasword123\\\"\"\nmsgstr \"\\\"psasword123\\\"\"\n\n#: src/std/hash/hashset.md:3\nmsgid \"\"\n\"Consider a `HashSet` as a `HashMap` where we just care about the keys \"\n\"( `HashSet<T>` is, in actuality, just a wrapper around `HashMap<T, ()>`).\"\nmsgstr \"\"\n\"値がなく、キーだけの`HashMap`を想像してみてください。これはハッシュ集合\"\n\"（`HashSet`）と呼ばれるものです。（`HashSet<T>`は、実際には`HashMap<T, ()>`の\"\n\"ラッパーです。）\"\n\n#: src/std/hash/hashset.md:6\nmsgid \"\"\n\"\\\"What's the point of that?\\\" you ask. \\\"I could just store the keys in a \"\n\"`Vec`.\\\"\"\nmsgstr \"\"\n\"「何の意味があるの？フツーにキーを`Vec`に入れればいいじゃん」そう思いました\"\n\"ね？\"\n\n#: src/std/hash/hashset.md:8\nmsgid \"\"\n\"A `HashSet`'s unique feature is that it is guaranteed to not have duplicate \"\n\"elements. That's the contract that any set collection fulfills. `HashSet` is \"\n\"just one implementation. (see also: [`BTreeSet`](https://doc.rust-lang.org/\"\n\"std/collections/struct.BTreeSet.html))\"\nmsgstr \"\"\n\"それは、`HashSet`独自の機能として、要素に重複がないということが保証されるため\"\n\"です。これは全ての集合型がもつ機能です。`HashSet`はその実装の1つであり、他に\"\n\"は[`BTreeSet`](https://doc.rust-lang.org/std/collections/struct.BTreeSet.\"\n\"html)等があります。\"\n\n#: src/std/hash/hashset.md:13\nmsgid \"\"\n\"If you insert a value that is already present in the `HashSet`, (i.e. the \"\n\"new value is equal to the existing and they both have the same hash), then \"\n\"the new value will replace the old.\"\nmsgstr \"\"\n\"`HashSet`に、すでに存在する値を加えようとすると、（すなわち、加えようとしてい\"\n\"る値のハッシュ値と、要素中のいずれかの値のハッシュ値が等しい場合、）新しい値\"\n\"によって古い値が上書きされます。\"\n\n#: src/std/hash/hashset.md:17\nmsgid \"\"\n\"This is great for when you never want more than one of something, or when \"\n\"you want to know if you've already got something.\"\nmsgstr \"\"\n\"これは、同じ値を2つ以上欲しくない場合や、すでにある値を持っているか知りたい場\"\n\"合にとても有効です。\"\n\n#: src/std/hash/hashset.md:20\nmsgid \"But sets can do more than that.\"\nmsgstr \"しかし、集合型の機能はそれだけではありません。\"\n\n#: src/std/hash/hashset.md:22\nmsgid \"\"\n\"Sets have 4 primary operations (all of the following calls return an \"\n\"iterator):\"\nmsgstr \"集合型には4つの主要なメソッドがあり、（すべてイテレータを返します。）\"\n\n#: src/std/hash/hashset.md:24\nmsgid \"`union`: get all the unique elements in both sets.\"\nmsgstr \"`union`：2つの集合型のどちらか一方にある値を全て取得。\"\n\n#: src/std/hash/hashset.md:26\nmsgid \"\"\n\"`difference`: get all the elements that are in the first set but not the \"\n\"second.\"\nmsgstr \"`difference`：1つ目の集合にあり、かつ2つ目には存在しない値を全て取得。\"\n\n#: src/std/hash/hashset.md:28\nmsgid \"`intersection`: get all the elements that are only in _both_ sets.\"\nmsgstr \"`intersection`：両方の集合にある値のみを取得。\"\n\n#: src/std/hash/hashset.md:30\nmsgid \"\"\n\"`symmetric_difference`: get all the elements that are in one set or the \"\n\"other, but _not_ both.\"\nmsgstr \"\"\n\"`symmetric_difference`：どちらか一方の集合には存在するが、両方には **ない** \"\n\"値を取得。\"\n\n#: src/std/hash/hashset.md:33\nmsgid \"Try all of these in the following example:\"\nmsgstr \"以下の例でこれらをすべて見ていきましょう。\"\n\n#: src/std/hash/hashset.md:45\nmsgid \"\"\n\"// `HashSet::insert()` returns false if\\n\"\n\"    // there was a value already present.\\n\"\nmsgstr \"\"\n\"// 既に存在する値を追加しようとすると\\n\"\n\"    // `HashSet::insert()`はfalseを返します。\\n\"\n\n#: src/std/hash/hashset.md:47\nmsgid \"\\\"Value 4 is already in set B!\\\"\"\nmsgstr \"\\\"Value 4 is already in set B!\\\"\"\n\n#: src/std/hash/hashset.md:52\nmsgid \"\"\n\"// If a collection's element type implements `Debug`,\\n\"\n\"    // then the collection implements `Debug`.\\n\"\n\"    // It usually prints its elements in the format `[elem1, elem2, ...]`\\n\"\nmsgstr \"\"\n\"// 集合の要素が、`Debug`を実装している型の場合、\\n\"\n\"    // 集合そのものも`Debug`を実装します。\\n\"\n\"    // 通常は`[elem1, elem2, ...]`のように要素を出力します。\\n\"\n\n#: src/std/hash/hashset.md:55\nmsgid \"\\\"A: {:?}\\\"\"\nmsgstr \"\\\"A: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:56\nmsgid \"\\\"B: {:?}\\\"\"\nmsgstr \"\\\"B: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:58\nmsgid \"// Print [1, 2, 3, 4, 5] in arbitrary order\\n\"\nmsgstr \"// [1, 2, 3, 4, 5]を順不同に出力。\\n\"\n\n#: src/std/hash/hashset.md:59\nmsgid \"\\\"Union: {:?}\\\"\"\nmsgstr \"\\\"Union: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:61\nmsgid \"// This should print [1]\\n\"\nmsgstr \"// これは[1]を出力。\\n\"\n\n#: src/std/hash/hashset.md:62\nmsgid \"\\\"Difference: {:?}\\\"\"\nmsgstr \"\\\"Difference: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:64\nmsgid \"// Print [2, 3, 4] in arbitrary order.\\n\"\nmsgstr \"// [2, 3, 4]を順不同に出力。\\n\"\n\n#: src/std/hash/hashset.md:65\nmsgid \"\\\"Intersection: {:?}\\\"\"\nmsgstr \"\\\"Intersection: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:67\nmsgid \"// Print [1, 5]\\n\"\nmsgstr \"// [1, 5]を出力。\\n\"\n\n#: src/std/hash/hashset.md:68\nmsgid \"\\\"Symmetric Difference: {:?}\\\"\"\nmsgstr \"\\\"Symmetric Difference: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:73\nmsgid \"\"\n\"(Examples are adapted from the [documentation.](https://doc.rust-lang.org/\"\n\"std/collections/struct.HashSet.html#method.difference))\"\nmsgstr \"\"\n\"例は[公式ドキュメント](https://doc.rust-lang.org/std/collections/struct.\"\n\"HashSet.html#method.difference)から持ってきています。\"\n\n#: src/std/rc.md:3\nmsgid \"\"\n\"When multiple ownership is needed, `Rc`(Reference Counting) can be used. \"\n\"`Rc` keeps track of the number of the references which means the number of \"\n\"owners of the value wrapped inside an `Rc`.\"\nmsgstr \"\"\n\n#: src/std/rc.md:5\nmsgid \"\"\n\"Reference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and \"\n\"decreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an \"\n\"`Rc`'s reference count becomes zero (which means there are no remaining \"\n\"owners), both the `Rc` and the value are all dropped.\"\nmsgstr \"\"\n\n#: src/std/rc.md:7\nmsgid \"\"\n\"Cloning an `Rc` never performs a deep copy. Cloning creates just another \"\n\"pointer to the wrapped value, and increments the count.\"\nmsgstr \"\"\n\n#: src/std/rc.md:13\nmsgid \"\\\"Rc examples\\\"\"\nmsgstr \"\\\"Rc examples\\\"\"\n\n#: src/std/rc.md:15\nmsgid \"\\\"--- rc_a is created ---\\\"\"\nmsgstr \"\\\"--- rc_a is created ---\\\"\"\n\n#: src/std/rc.md:18 src/std/rc.md:25 src/std/rc.md:37\nmsgid \"\\\"Reference Count of rc_a: {}\\\"\"\nmsgstr \"\\\"Reference Count of rc_a: {}\\\"\"\n\n#: src/std/rc.md:21\nmsgid \"\\\"--- rc_a is cloned to rc_b ---\\\"\"\nmsgstr \"\\\"--- rc_a is cloned to rc_b ---\\\"\"\n\n#: src/std/rc.md:24\nmsgid \"\\\"Reference Count of rc_b: {}\\\"\"\nmsgstr \"\\\"Reference Count of rc_b: {}\\\"\"\n\n#: src/std/rc.md:27\nmsgid \"// Two `Rc`s are equal if their inner values are equal\\n\"\nmsgstr \"\"\n\n#: src/std/rc.md:28\nmsgid \"\\\"rc_a and rc_b are equal: {}\\\"\"\nmsgstr \"\\\"rc_a and rc_b are equal: {}\\\"\"\n\n#: src/std/rc.md:30\nmsgid \"// We can use methods of a value directly\\n\"\nmsgstr \"\"\n\n#: src/std/rc.md:31\nmsgid \"\\\"Length of the value inside rc_a: {}\\\"\"\nmsgstr \"\\\"Length of the value inside rc_a: {}\\\"\"\n\n#: src/std/rc.md:32\nmsgid \"\\\"Value of rc_b: {}\\\"\"\nmsgstr \"\\\"Value of rc_b: {}\\\"\"\n\n#: src/std/rc.md:34\nmsgid \"\\\"--- rc_b is dropped out of scope ---\\\"\"\nmsgstr \"\\\"--- rc_b is dropped out of scope ---\\\"\"\n\n#: src/std/rc.md:39\nmsgid \"\\\"--- rc_a is dropped out of scope ---\\\"\"\nmsgstr \"\\\"--- rc_a is dropped out of scope ---\\\"\"\n\n#: src/std/rc.md:42\nmsgid \"\"\n\"// Error! `rc_examples` already moved into `rc_a`\\n\"\n\"    // And when `rc_a` is dropped, `rc_examples` is dropped together\\n\"\n\"    // println!(\\\"rc_examples: {}\\\", rc_examples);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\n#: src/std/rc.md:51\nmsgid \"\"\n\"[std::rc](https://doc.rust-lang.org/std/rc/index.html) and [std::sync::arc]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Arc.html).\"\nmsgstr \"\"\n\n#: src/std/arc.md:1\nmsgid \"Arc\"\nmsgstr \"\"\n\n#: src/std/arc.md:3\nmsgid \"\"\n\"When shared ownership between threads is needed, `Arc`(Atomically Reference \"\n\"Counted) can be used. This struct, via the `Clone` implementation can create \"\n\"a reference pointer for the location of a value in the memory heap while \"\n\"increasing the reference counter. As it shares ownership between threads, \"\n\"when the last reference pointer to a value is out of scope, the variable is \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/std/arc.md:15\nmsgid \"// This variable declaration is where its value is specified.\\n\"\nmsgstr \"\"\n\n#: src/std/arc.md:16\nmsgid \"\\\"the same apple\\\"\"\nmsgstr \"\\\"the same apple\\\"\"\n\n#: src/std/arc.md:19\nmsgid \"\"\n\"// Here there is no value specification as it is a pointer to a\\n\"\n\"        // reference in the memory heap.\\n\"\nmsgstr \"\"\n\n#: src/std/arc.md:24\nmsgid \"\"\n\"// As Arc was used, threads can be spawned using the value allocated\\n\"\n\"            // in the Arc variable pointer's location.\\n\"\nmsgstr \"\"\n\n#: src/std/arc.md:30\nmsgid \"// Make sure all Arc instances are printed from spawned threads.\\n\"\nmsgstr \"\"\n\n#: src/std_misc.md:3\nmsgid \"\"\n\"Many other types are provided by the std library to support things such as:\"\nmsgstr \"\"\n\"他にも、様々な型がstdライブラリの中で提供されています。例えば以下の機能を果た\"\n\"すための物があります。\"\n\n#: src/std_misc.md:10\nmsgid \"These expand beyond what the [primitives](primitives.md) provide.\"\nmsgstr \"\"\n\"これらにより[基本データ型](primitives.md)の提供する機能よりも遥かに豊かなこと\"\n\"が実現できます。\"\n\n#: src/std_misc/threads.md:3\nmsgid \"\"\n\"Rust provides a mechanism for spawning native OS threads via the `spawn` \"\n\"function, the argument of this function is a moving closure.\"\nmsgstr \"\"\n\"Rustは`spawn`関数を用いてOSのネイティブスレッドを開始することができます。この\"\n\"関数の引数はmoveクロージャ（訳注: 参照ではなく値を取るクロージャ）です。\"\n\n#: src/std_misc/threads.md:10 src/std_misc/threads/testcase_mapreduce.md:28\nmsgid \"// This is the `main` thread\\n\"\nmsgstr \"// この関数は`main`スレッドで実行されます。\\n\"\n\n#: src/std_misc/threads.md:13\nmsgid \"// Make a vector to hold the children which are spawned.\\n\"\nmsgstr \"// spawnされるクロージャを保持するためのベクタ\\n\"\n\n#: src/std_misc/threads.md:17\nmsgid \"// Spin up another thread\\n\"\nmsgstr \"// 新しいスレッドを起動。\\n\"\n\n#: src/std_misc/threads.md:19\nmsgid \"\\\"this is thread number {}\\\"\"\nmsgstr \"\\\"this is thread number {}\\\"\"\n\n#: src/std_misc/threads.md:24\nmsgid \"// Wait for the thread to finish. Returns a result.\\n\"\nmsgstr \"// 子スレッドが終了するのを待ち、結果を返します。\\n\"\n\n#: src/std_misc/threads.md:30\nmsgid \"These threads will be scheduled by the OS.\"\nmsgstr \"これらのスレッドのスケジューリングはOSによって行われます。\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:3\nmsgid \"\"\n\"Rust makes it very easy to parallelise data processing, without many of the \"\n\"headaches traditionally associated with such an attempt.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:5\nmsgid \"\"\n\"The standard library provides great threading primitives out of the box. \"\n\"These, combined with Rust's concept of Ownership and aliasing rules, \"\n\"automatically prevent data races.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:9\nmsgid \"\"\n\"The aliasing rules (one writable reference XOR many readable references) \"\n\"automatically prevent you from manipulating state that is visible to other \"\n\"threads. (Where synchronisation is needed, there are synchronisation \"\n\"primitives like `Mutex`es or `Channel`s.)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:14\nmsgid \"\"\n\"In this example, we will calculate the sum of all digits in a block of \"\n\"numbers. We will do this by parcelling out chunks of the block into \"\n\"different threads. Each thread will sum its tiny block of digits, and \"\n\"subsequently we will sum the intermediate sums produced by each thread.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:19\nmsgid \"\"\n\"Note that, although we're passing references across thread boundaries, Rust \"\n\"understands that we're only passing read-only references, and that thus no \"\n\"unsafety or data races can occur. Also because the references we're passing \"\n\"have `'static` lifetimes, Rust understands that our data won't be destroyed \"\n\"while these threads are still running. (When you need to share non-`static` \"\n\"data between threads, you can use a smart pointer like `Arc` to keep the \"\n\"data alive and avoid non-`static` lifetimes.)\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:32\nmsgid \"\"\n\"// This is our data to process.\\n\"\n\"    // We will calculate the sum of all digits via a threaded map-reduce \"\n\"algorithm.\\n\"\n\"    // Each whitespace separated chunk will be handled in a different \"\n\"thread.\\n\"\n\"    //\\n\"\n\"    // TODO: see what happens to the output if you insert spaces!\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:37\nmsgid \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\nmsgstr \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:46\nmsgid \"// Make a vector to hold the child-threads which we will spawn.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:49\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Map\\\" phase\\n\"\n\"     *\\n\"\n\"     * Divide our data into segments, and apply initial processing\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:55\nmsgid \"\"\n\"// split our data into segments for individual calculation\\n\"\n\"    // each chunk will be a reference (&str) into the actual data\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:59\nmsgid \"\"\n\"// Iterate over the data segments.\\n\"\n\"    // .enumerate() adds the current loop index to whatever is iterated\\n\"\n\"    // the resulting tuple \\\"(index, element)\\\" is then immediately\\n\"\n\"    // \\\"destructured\\\" into two variables, \\\"i\\\" and \\\"data_segment\\\" with \"\n\"a\\n\"\n\"    // \\\"destructuring assignment\\\"\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:65\nmsgid \"\\\"data segment {} is \\\\\\\"{}\\\\\\\"\\\"\"\nmsgstr \"\\\"data segment {} is \\\\\\\"{}\\\\\\\"\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:67\nmsgid \"\"\n\"// Process each data segment in a separate thread\\n\"\n\"        //\\n\"\n\"        // spawn() returns a handle to the new thread,\\n\"\n\"        // which we MUST keep to access the returned value\\n\"\n\"        //\\n\"\n\"        // 'move || -> u32' is syntax for a closure that:\\n\"\n\"        // * takes no arguments ('||')\\n\"\n\"        // * takes ownership of its captured variables ('move') and\\n\"\n\"        // * returns an unsigned 32-bit integer ('-> u32')\\n\"\n\"        //\\n\"\n\"        // Rust is smart enough to infer the '-> u32' from\\n\"\n\"        // the closure itself so we could have left that out.\\n\"\n\"        //\\n\"\n\"        // TODO: try removing the 'move' and see what happens\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:82\nmsgid \"// Calculate the intermediate sum of this segment:\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:84\nmsgid \"// iterate over the characters of our segment..\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:86\nmsgid \"// .. convert text-characters to their number value..\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:87\nmsgid \"\\\"should be a digit\\\"\"\nmsgstr \"\\\"should be a digit\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:88\nmsgid \"// .. and sum the resulting iterator of numbers\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:91\nmsgid \"// println! locks stdout, so no text-interleaving occurs\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:92\nmsgid \"\\\"processed segment {}, result={}\\\"\"\nmsgstr \"\\\"processed segment {}, result={}\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:94\nmsgid \"\"\n\"// \\\"return\\\" not needed, because Rust is an \\\"expression language\\\", the\\n\"\n\"            // last evaluated expression in each block is automatically its \"\n\"value.\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:102\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Reduce\\\" phase\\n\"\n\"     *\\n\"\n\"     * Collect our intermediate results, and combine them into a final \"\n\"result\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:108\nmsgid \"\"\n\"// combine each thread's intermediate results into a single final sum.\\n\"\n\"    //\\n\"\n\"    // we use the \\\"turbofish\\\" ::<> to provide sum() with a type hint.\\n\"\n\"    //\\n\"\n\"    // TODO: try without the turbofish, by instead explicitly\\n\"\n\"    // specifying the type of final_result\\n\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:116\nmsgid \"\\\"Final sum result: {}\\\"\"\nmsgstr \"\\\"Final sum result: {}\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:122\nmsgid \"Assignments\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:123\nmsgid \"\"\n\"It is not wise to let our number of threads depend on user inputted data. \"\n\"What if the user decides to insert a lot of spaces? Do we _really_ want to \"\n\"spawn 2,000 threads? Modify the program so that the data is always chunked \"\n\"into a limited number of chunks, defined by a static constant at the \"\n\"beginning of the program.\"\nmsgstr \"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:129\nmsgid \"[Threads](../threads.md)\"\nmsgstr \"[スレッド](../threads.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:130\nmsgid \"[vectors](../../std/vec.md) and [iterators](../../trait/iter.md)\"\nmsgstr \"[ベクタ型](../../std/vec.md), [イテレータ](../../trait/iter.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:131\nmsgid \"\"\n\"[closures](../../fn/closures.md), [move](../../scope/move.md) semantics and \"\n\"[`move` closures](https://doc.rust-lang.org/book/ch13-01-closures.\"\n\"html#closures-can-capture-their-environment)\"\nmsgstr \"\"\n\"[クロージャ](../../fn/closures.md), [move](../../scope/move.md) semantics \"\n\"and [`move` クロージャ](https://doc.rust-lang.org/book/ch13-01-closures.\"\n\"html#closures-can-capture-their-environment)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:132\nmsgid \"\"\n\"[destructuring](https://doc.rust-lang.org/book/ch18-03-pattern-syntax.\"\n\"html#destructuring-to-break-apart-values) assignments\"\nmsgstr \"\"\n\"[デストラクト](https://doc.rust-lang.org/book/ch18-03-pattern-syntax.\"\n\"html#destructuring-to-break-apart-values) 代入\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:133\nmsgid \"\"\n\"[turbofish notation](https://doc.rust-lang.org/book/appendix-02-operators.\"\n\"html?highlight=turbofish) to help type inference\"\nmsgstr \"\"\n\"型推論を補助する [ターボフィッシュ記法](https://doc.rust-lang.org/book/\"\n\"appendix-02-operators.html?highlight=turbofish)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:134\nmsgid \"[unwrap vs. expect](../../error/option_unwrap.md)\"\nmsgstr \"[unwrap と expect](../../error/option_unwrap.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:135\nmsgid \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\nmsgstr \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\n\n#: src/std_misc/channels.md:3\nmsgid \"\"\n\"Rust provides asynchronous `channels` for communication between threads. \"\n\"Channels allow a unidirectional flow of information between two end-points: \"\n\"the `Sender` and the `Receiver`.\"\nmsgstr \"\"\n\"Rustは、スレッド間のコミュニケーションのために、非同期のチャネルを提供してい\"\n\"ます。チャネルは2つのエンドポイント、すなわち送信者と受信者を介して、情報の一\"\n\"方向への流れを作り出すことを可能にしています。\"\n\n#: src/std_misc/channels.md:15\nmsgid \"\"\n\"// Channels have two endpoints: the `Sender<T>` and the `Receiver<T>`,\\n\"\n\"    // where `T` is the type of the message to be transferred\\n\"\n\"    // (type annotation is superfluous)\\n\"\nmsgstr \"\"\n\"// チャネルには`Sender<T>`と`Receiver<T>`という2つのエンドポイントがありま\"\n\"す。\\n\"\n\"    // ここで、`T`は送信されるメッセージの型です。\\n\"\n\"    // （型アノテーションは必須ではありません。）\\n\"\n\n#: src/std_misc/channels.md:22\nmsgid \"// The sender endpoint can be copied\\n\"\nmsgstr \"// 送信者エンドポイントはコピーすることができます。\\n\"\n\n#: src/std_misc/channels.md:25\nmsgid \"// Each thread will send its id via the channel\\n\"\nmsgstr \"// ここでは、それぞれのスレッドが自身のIDを送信しています。\\n\"\n\n#: src/std_misc/channels.md:27\nmsgid \"\"\n\"// The thread takes ownership over `thread_tx`\\n\"\n\"            // Each thread queues a message in the channel\\n\"\nmsgstr \"\"\n\"// スレッドは`thread_tx`の所有権をとり、それぞれのスレッドは\\n\"\n\"            // メッセージをチャネルにキューイングします。\\n\"\n\n#: src/std_misc/channels.md:31\nmsgid \"\"\n\"// Sending is a non-blocking operation, the thread will continue\\n\"\n\"            // immediately after sending its message\\n\"\nmsgstr \"\"\n\"// 送信はノンブロッキングなオペレーションなので、\\n\"\n\"            // メッセージを送信した後もすぐに実行を継続します。\\n\"\n\n#: src/std_misc/channels.md:33\nmsgid \"\\\"thread {} finished\\\"\"\nmsgstr \"\\\"thread {} finished\\\"\"\n\n#: src/std_misc/channels.md:39\nmsgid \"// Here, all the messages are collected\\n\"\nmsgstr \"// ここで、全てのメッセージが収集されます。\\n\"\n\n#: src/std_misc/channels.md:42\nmsgid \"\"\n\"// The `recv` method picks a message from the channel\\n\"\n\"        // `recv` will block the current thread if there are no messages \"\n\"available\\n\"\nmsgstr \"\"\n\"// `recv`メソッドはチャネルからメッセージを取り出します。\\n\"\n\"        // もし取り出せるメッセージが存在しない場合、`recv`は\\n\"\n\"        // 現在のスレッドをブロックします。\\n\"\n\n#: src/std_misc/channels.md:47\nmsgid \"// Wait for the threads to complete any remaining work\\n\"\nmsgstr \"\"\n\n#: src/std_misc/channels.md:49\nmsgid \"\\\"oops! the child thread panicked\\\"\"\nmsgstr \"\\\"oops! the child thread panicked\\\"\"\n\n#: src/std_misc/channels.md:52\nmsgid \"// Show the order in which the messages were sent\\n\"\nmsgstr \"// メッセージが送信された順番を表示。\\n\"\n\n#: src/std_misc/path.md:3\nmsgid \"\"\n\"The `Path` struct represents file paths in the underlying filesystem. There \"\n\"are two flavors of `Path`: `posix::Path`, for UNIX-like systems, and \"\n\"`windows::Path`, for Windows. The prelude exports the appropriate platform-\"\n\"specific `Path` variant.\"\nmsgstr \"\"\n\"構造体`Path`は、ファイルシステム中のパスを表します。`Path`には2つの変種があり\"\n\"ます。UNIXライクなファイルシステムのための`posix::Path`と、Windows用の\"\n\"`windows::Path`です。それぞれプラットフォームに対応した`Path`をエクスポートし\"\n\"ます。\"\n\n#: src/std_misc/path.md:8\nmsgid \"\"\n\"A `Path` can be created from an `OsStr`, and provides several methods to get \"\n\"information from the file/directory the path points to.\"\nmsgstr \"\"\n\"`Path`は`OsStr`から作ることができます。そうすればそのパスが指すファイル・ディ\"\n\"レクトリの情報を取得するためのメソッドがいくつか使えるようになります。\"\n\n#: src/std_misc/path.md:11\nmsgid \"\"\n\"A `Path` is immutable. The owned version of `Path` is `PathBuf`. The \"\n\"relation between `Path` and `PathBuf` is similar to that of `str` and \"\n\"`String`: a `PathBuf` can be mutated in-place, and can be dereferenced to a \"\n\"`Path`.\"\nmsgstr \"\"\n\"`Path`はイミュータブルです。`Path`の所有権ありのバージョンが`PathBuf`です。\"\n\"`Path`と`PathBuf`の関係は、`str`と`String`の関係に似ています。`PathBuf`はその\"\n\"まま変更でき、`Path`にデリファレンスすることができます。\"\n\n#: src/std_misc/path.md:15\nmsgid \"\"\n\"Note that a `Path` is _not_ internally represented as an UTF-8 string, but \"\n\"instead is stored as an `OsString`. Therefore, converting a `Path` to a \"\n\"`&str` is _not_ free and may fail (an `Option` is returned). However, a \"\n\"`Path` can be freely converted to an `OsString` or `&OsStr` using \"\n\"`into_os_string` and `as_os_str`, respectively.\"\nmsgstr \"\"\n\"`Path`の実態はUTF-8の文字列 **ではなく** 、`OsString`であることに注意しましょ\"\n\"う。したがって、`Path`を`&str`に変換するのは無条件 **ではなく** 、失敗する可\"\n\"能性があります。それゆえ`Option`型が返されます。しかし`Path`から`OsString`あ\"\n\"るいは`&OsStr`への変換はそれぞれ`into_os_string`と`as_os_str`によって無条件で\"\n\"できます。\"\n\n#: src/std_misc/path.md:25\nmsgid \"// Create a `Path` from an `&'static str`\\n\"\nmsgstr \"// `&'static str`から`Path`を作成。\\n\"\n\n#: src/std_misc/path.md:26\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/std_misc/path.md:28\nmsgid \"// The `display` method returns a `Display`able structure\\n\"\nmsgstr \"// `display`メソッドは`Display`可能な構造体を返します。\\n\"\n\n#: src/std_misc/path.md:31\nmsgid \"\"\n\"// `join` merges a path with a byte container using the OS specific\\n\"\n\"    // separator, and returns a `PathBuf`\\n\"\nmsgstr \"\"\n\"// `join`はOS固有のセパレータによってバイトのコンテナ型であるパス\\n\"\n\"    // を結合し、`PathBuf`を返します。\\n\"\n\n#: src/std_misc/path.md:35\nmsgid \"// `push` extends the `PathBuf` with a `&Path`\\n\"\nmsgstr \"// `push`は`PathBuf`を`&Path`で拡張します。\\n\"\n\n#: src/std_misc/path.md:37\nmsgid \"\\\"myfile.tar.gz\\\"\"\nmsgstr \"\\\"myfile.tar.gz\\\"\"\n\n#: src/std_misc/path.md:39\nmsgid \"// `set_file_name` updates the file name of the `PathBuf`\\n\"\nmsgstr \"// `set_file_name`は`PathBuf`のファイル名を更新します。\\n\"\n\n#: src/std_misc/path.md:40\nmsgid \"\\\"package.tgz\\\"\"\nmsgstr \"\\\"package.tgz\\\"\"\n\n#: src/std_misc/path.md:42\nmsgid \"// Convert the `PathBuf` into a string slice\\n\"\nmsgstr \"// `PathBuf`を文字列のスライスに変換します。\\n\"\n\n#: src/std_misc/path.md:44\nmsgid \"\\\"new path is not a valid UTF-8 sequence\\\"\"\nmsgstr \"\\\"new path is not a valid UTF-8 sequence\\\"\"\n\n#: src/std_misc/path.md:45\nmsgid \"\\\"new path is {}\\\"\"\nmsgstr \"\\\"new path is {}\\\"\"\n\n#: src/std_misc/path.md:51\nmsgid \"\"\n\"Be sure to check at other `Path` methods (`posix::Path` or `windows::Path`) \"\n\"and the `Metadata` struct.\"\nmsgstr \"\"\n\"他の`Path`メソッド（`posix::Path`と`windows::Path`）をチェックするのを忘れず\"\n\"に！それと`Metadata`構造体も見ておくことをオススメします。\"\n\n#: src/std_misc/path.md:56\nmsgid \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html).\"\nmsgstr \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html), [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html).\"\n\n#: src/std_misc/file.md:3\nmsgid \"\"\n\"The `File` struct represents a file that has been opened (it wraps a file \"\n\"descriptor), and gives read and/or write access to the underlying file.\"\nmsgstr \"\"\n\"`File`構造体は開かれたファイルを表し（実際にはファイルディスクリプタのラッ\"\n\"パーです）、読み込み・書き込み権限のどちらか一方、あるいは両方を提供します。\"\n\n#: src/std_misc/file.md:6\nmsgid \"\"\n\"Since many things can go wrong when doing file I/O, all the `File` methods \"\n\"return the `io::Result<T>` type, which is an alias for `Result<T, io::\"\n\"Error>`.\"\nmsgstr \"\"\n\n#: src/std_misc/file.md:9\nmsgid \"\"\n\"This makes the failure of all I/O operations _explicit_. Thanks to this, the \"\n\"programmer can see all the failure paths, and is encouraged to handle them \"\n\"in a proactive manner.\"\nmsgstr \"\"\n\"これはI/Oに関するオペレーションの失敗をより明瞭にします。このおかげでプログラ\"\n\"マは直面した失敗を全て見ることができ、より生産的な方法でそれらを扱うことが可\"\n\"能になります。\"\n\n#: src/std_misc/file/open.md:3\nmsgid \"The `open` function can be used to open a file in read-only mode.\"\nmsgstr \"\"\n\"`open`関数を用いることで読み込み専用モードでファイルを開くことが可能です。\"\n\n#: src/std_misc/file/open.md:5\nmsgid \"\"\n\"A `File` owns a resource, the file descriptor and takes care of closing the \"\n\"file when it is `drop`ed.\"\nmsgstr \"\"\n\"`File`はファイルディスクリプタという資源を保持しており、`drop`時にはファイル\"\n\"を閉じるところまで面倒を見てくれます。\"\n\n#: src/std_misc/file/open.md:14\nmsgid \"// Create a path to the desired file\\n\"\nmsgstr \"// 目的ファイルに対する`Path`を作成\\n\"\n\n#: src/std_misc/file/open.md:15\nmsgid \"\\\"hello.txt\\\"\"\nmsgstr \"\\\"hello.txt\\\"\"\n\n#: src/std_misc/file/open.md:18\nmsgid \"// Open the path in read-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"\"\n\"// pathを読み込み専用モードで開きます。これは`io::Result<File>`を返します。\\n\"\n\n#: src/std_misc/file/open.md:20\nmsgid \"\\\"couldn't open {}: {}\\\"\"\nmsgstr \"\\\"couldn't open {}: {}\\\"\"\n\n#: src/std_misc/file/open.md:24\nmsgid \"// Read the file contents into a string, returns `io::Result<usize>`\\n\"\nmsgstr \"\"\n\"// ファイルの中身を文字列に読み込みます。`io::Result<usize>`を返します。\\n\"\n\n#: src/std_misc/file/open.md:27\nmsgid \"\\\"couldn't read {}: {}\\\"\"\nmsgstr \"\\\"couldn't read {}: {}\\\"\"\n\n#: src/std_misc/file/open.md:28\nmsgid \"\\\"{} contains:\\\\n{}\\\"\"\nmsgstr \"\\\"{} contains:\\\\n{}\\\"\"\n\n#: src/std_misc/file/open.md:31\nmsgid \"// `file` goes out of scope, and the \\\"hello.txt\\\" file gets closed\\n\"\nmsgstr \"// `file`がスコープから抜け、\\\"hello.txt\\\"が閉じられます。\\n\"\n\n#: src/std_misc/file/open.md:35 src/std_misc/file/create.md:39\n#: src/std_misc/fs.md:109\nmsgid \"Here's the expected successful output:\"\nmsgstr \"以下が成功時に期待されるアウトプットです。\"\n\n#: src/std_misc/file/open.md:37\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt contains:\\n\"\n\"Hello World!\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt contains:\\n\"\n\"Hello World!\\n\"\n\"```\"\n\n#: src/std_misc/file/open.md:44\nmsgid \"\"\n\"(You are encouraged to test the previous example under different failure \"\n\"conditions: `hello.txt` doesn't exist, or `hello.txt` is not readable, etc.)\"\nmsgstr \"\"\n\"（気が向いたなら、上記の例を様々な形で失敗させてみましょう。例えば`hello.txt`\"\n\"が存在しないとか、読み込み権限がないとか、そういった状況で実行してみてくださ\"\n\"い。）\"\n\n#: src/std_misc/file/create.md:3\nmsgid \"\"\n\"The `create` function opens a file in write-only mode. If the file already \"\n\"existed, the old content is destroyed. Otherwise, a new file is created.\"\nmsgstr \"\"\n\"`create`関数はファイルを書き込み専用モードで開きます。すでにファイルが存在し\"\n\"ている場合、破棄して新しい物を作成します。\"\n\n#: src/std_misc/file/create.md:9\nmsgid \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\nmsgstr \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\n\n#: src/std_misc/file/create.md:22\nmsgid \"\\\"lorem_ipsum.txt\\\"\"\nmsgstr \"\\\"lorem_ipsum.txt\\\"\"\n\n#: src/std_misc/file/create.md:25\nmsgid \"// Open a file in write-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"\"\n\"// ファイルを書き込み専用モードで開きます。返り値は`io::Result<File>`。\\n\"\n\n#: src/std_misc/file/create.md:27\nmsgid \"\\\"couldn't create {}: {}\\\"\"\nmsgstr \"\\\"couldn't create {}: {}\\\"\"\n\n#: src/std_misc/file/create.md:31\nmsgid \"// Write the `LOREM_IPSUM` string to `file`, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\"// `LOREM_IPSUM`の文字列を`file`に書き込みます。返り値は`io::Result<()>`。\\n\"\n\n#: src/std_misc/file/create.md:33\nmsgid \"\\\"couldn't write to {}: {}\\\"\"\nmsgstr \"\\\"couldn't write to {}: {}\\\"\"\n\n#: src/std_misc/file/create.md:34\nmsgid \"\\\"successfully wrote to {}\\\"\"\nmsgstr \"\\\"successfully wrote to {}\\\"\"\n\n#: src/std_misc/file/create.md:53\nmsgid \"\"\n\"(As in the previous example, you are encouraged to test this example under \"\n\"failure conditions.)\"\nmsgstr \"\"\n\"前項の例と同じように、様々な失敗パターンをためしてみることをオススメします。\"\n\n#: src/std_misc/file/create.md:56\nmsgid \"\"\n\"The [`OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.\"\n\"html) struct can be used to configure how a file is opened.\"\nmsgstr \"\"\n\"[`OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html)構造\"\n\"体を利用して、ファイルの開き方を設定できます。\"\n\n#: src/std_misc/file/read_lines.md:3\nmsgid \"A naive approach\"\nmsgstr \"単純なやり方\"\n\n#: src/std_misc/file/read_lines.md:5\nmsgid \"\"\n\"This might be a reasonable first attempt for a beginner's first \"\n\"implementation for reading lines from a file.\"\nmsgstr \"\"\n\"テキストファイルの行を読み込むのを、初心者が初めて実装した場合、以下のように\"\n\"なるでしょう。\"\n\n#: src/std_misc/file/read_lines.md:22\nmsgid \"\"\n\"Since the method `lines()` returns an iterator over the lines in the file, \"\n\"we can also perform a map inline and collect the results, yielding a more \"\n\"concise and fluent expression.\"\nmsgstr \"\"\n\"`lines()`メソッドはファイルの各行のイテレータを返すので、インラインでマップを\"\n\"実行し結果を収集することもできます。そうすると、より簡潔で読みやすい表現とな\"\n\"ります。\"\n\n#: src/std_misc/file/read_lines.md:31\nmsgid \"// panic on possible file-reading errors\\n\"\nmsgstr \"// ファイル読み込みエラーの場合はパニックします。\\n\"\n\n#: src/std_misc/file/read_lines.md:32\nmsgid \"// split the string into an iterator of string slices\\n\"\nmsgstr \"// 文字列のスライスのイテレータに分割します。\\n\"\n\n#: src/std_misc/file/read_lines.md:33\nmsgid \"// make each slice into a string\\n\"\nmsgstr \"// スライスを文字列に変換します。\\n\"\n\n#: src/std_misc/file/read_lines.md:34\nmsgid \"// gather them together into a vector\\n\"\nmsgstr \"// ベクタにまとめます。\\n\"\n\n#: src/std_misc/file/read_lines.md:38\nmsgid \"\"\n\"Note that in both examples above, we must convert the `&str` reference \"\n\"returned from `lines()` to the owned type `String`, using `.to_string()` and \"\n\"`String::from` respectively.\"\nmsgstr \"\"\n\"上の例では、`lines()`から返された`&str`をそれぞれ`to_string()`と`String::\"\n\"from`を使って、所有権のある`String`型に変換しなければならない点に注意してくだ\"\n\"さい。\"\n\n#: src/std_misc/file/read_lines.md:42\nmsgid \"A more efficient approach\"\nmsgstr \"より効率的なやり方\"\n\n#: src/std_misc/file/read_lines.md:44\nmsgid \"\"\n\"Here we pass ownership of the open `File` to a `BufReader` struct. \"\n\"`BufReader` uses an internal buffer to reduce intermediate allocations.\"\nmsgstr \"\"\n\"ここでは、開いた`File`の所有権を`BufReader`構造体に渡します。`BufReader`は内\"\n\"部的なバッファを使い、中間のメモリ割り当てを削減します。\"\n\n#: src/std_misc/file/read_lines.md:47\nmsgid \"\"\n\"We also update `read_lines` to return an iterator instead of allocating new \"\n\"`String` objects in memory for each line.\"\nmsgstr \"\"\n\"`read_lines`を更新して、それぞれの行に対してメモリ上に新しい`String`オブジェ\"\n\"クトを割り当てるのではなく、イテレータを返すようにします。\"\n\n#: src/std_misc/file/read_lines.md:56\nmsgid \"// File hosts.txt must exist in the current path\\n\"\nmsgstr \"// hosts.txtファイルは現在のパスに存在しなければなりません。\\n\"\n\n#: src/std_misc/file/read_lines.md:57\nmsgid \"\\\"./hosts.txt\\\"\"\nmsgstr \"\\\"./hosts.txt\\\"\"\n\n#: src/std_misc/file/read_lines.md:58\nmsgid \"// Consumes the iterator, returns an (Optional) String\\n\"\nmsgstr \"// イテレータを消費し、Option型のStringを返します。\\n\"\n\n#: src/std_misc/file/read_lines.md:64\nmsgid \"\"\n\"// The output is wrapped in a Result to allow matching on errors.\\n\"\n\"// Returns an Iterator to the Reader of the lines of the file.\\n\"\nmsgstr \"\"\n\"// 出力はResult型にラップされ、エラーをマッチできるようになります。\\n\"\n\"// ファイルの各行のReaderへのイテレータを返します。\\n\"\n\n#: src/std_misc/file/read_lines.md:74\nmsgid \"Running this program simply prints the lines individually.\"\nmsgstr \"このプログラムを実行すると、単に各行を出力します。\"\n\n#: src/std_misc/file/read_lines.md:75\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\n\n#: src/std_misc/file/read_lines.md:82\nmsgid \"\"\n\"(Note that since `File::open` expects a generic `AsRef<Path>` as argument, \"\n\"we define our generic `read_lines()` method with the same generic \"\n\"constraint, using the `where` keyword.)\"\nmsgstr \"\"\n\"`File::open`はジェネリックな`AsRef<Path>`を引数にとるので、ジェネリックな\"\n\"`read_lines`メソッドも、`where`キーワードを使って、同じジェネリックな制約を持\"\n\"たせています。\"\n\n#: src/std_misc/file/read_lines.md:85\nmsgid \"\"\n\"This process is more efficient than creating a `String` in memory with all \"\n\"of the file's contents. This can especially cause performance issues when \"\n\"working with larger files.\"\nmsgstr \"\"\n\"この処理は、ファイルの中身全てをメモリ上の`String`にするよりも効率的です。メ\"\n\"モリ上に`String`を作ると、より大きなファイルを取り扱う際に、パフォーマンスの\"\n\"問題につながります。\"\n\n#: src/std_misc/process.md:3\nmsgid \"\"\n\"The `process::Output` struct represents the output of a finished child \"\n\"process, and the `process::Command` struct is a process builder.\"\nmsgstr \"\"\n\"`process::Output`構造体は終了したプロセスのアウトプットを表し、`process::\"\n\"Command`構造体はプロセスの作成を行います。\"\n\n#: src/std_misc/process.md:10\nmsgid \"\\\"rustc\\\"\"\nmsgstr \"\\\"rustc\\\"\"\n\n#: src/std_misc/process.md:11\nmsgid \"\\\"--version\\\"\"\nmsgstr \"\\\"--version\\\"\"\n\n#: src/std_misc/process.md:13\nmsgid \"\\\"failed to execute process: {}\\\"\"\nmsgstr \"\\\"failed to execute process: {}\\\"\"\n\n#: src/std_misc/process.md:19\nmsgid \"\\\"rustc succeeded and stdout was:\\\\n{}\\\"\"\nmsgstr \"\\\"rustc succeeded and stdout was:\\\\n{}\\\"\"\n\n#: src/std_misc/process.md:23\nmsgid \"\\\"rustc failed and stderr was:\\\\n{}\\\"\"\nmsgstr \"\\\"rustc failed and stderr was:\\\\n{}\\\"\"\n\n#: src/std_misc/process.md:28\nmsgid \"\"\n\"(You are encouraged to try the previous example with an incorrect flag \"\n\"passed to `rustc`)\"\nmsgstr \"\"\n\"（余裕があれば、上の例で`rustc`に不正なフラグを渡し、どうなるか見てみましょ\"\n\"う）\"\n\n#: src/std_misc/process/pipe.md:3\nmsgid \"\"\n\"The `std::Child` struct represents a running child process, and exposes the \"\n\"`stdin`, `stdout` and `stderr` handles for interaction with the underlying \"\n\"process via pipes.\"\nmsgstr \"\"\n\"`std::Child`構造体は実行中の子プロセスを表します。`stdin`、`stdout`、`stderr`\"\n\"を介して表面化のプロセスとのやり取りを仲介します。\"\n\n#: src/std_misc/process/pipe.md:11\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\nmsgstr \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\n\n#: src/std_misc/process/pipe.md:15\nmsgid \"// Spawn the `wc` command\\n\"\nmsgstr \"// `wc`コマンドを起動します。\\n\"\n\n#: src/std_misc/process/pipe.md:16 src/std_misc/fs.md:12 src/std_misc/fs.md:73\n#: src/std_misc/ffi.md:11\nmsgid \"\\\"windows\\\"\"\nmsgstr \"\\\"windows\\\"\"\n\n#: src/std_misc/process/pipe.md:17\nmsgid \"\\\"powershell\\\"\"\nmsgstr \"\\\"powershell\\\"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"-Command\\\"\"\nmsgstr \"\\\"-Command\\\"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\nmsgstr \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\n\n#: src/std_misc/process/pipe.md:21\nmsgid \"\\\"wc\\\"\"\nmsgstr \"\\\"wc\\\"\"\n\n#: src/std_misc/process/pipe.md:27\nmsgid \"\\\"couldn't spawn wc: {}\\\"\"\nmsgstr \"\\\"couldn't spawn wc: {}\\\"\"\n\n#: src/std_misc/process/pipe.md:31\nmsgid \"\"\n\"// Write a string to the `stdin` of `wc`.\\n\"\n\"    //\\n\"\n\"    // `stdin` has type `Option<ChildStdin>`, but since we know this \"\n\"instance\\n\"\n\"    // must have one, we can directly `unwrap` it.\\n\"\nmsgstr \"\"\n\"// `wc`の`stdin`に文字列を書き込みます。\\n\"\n\"    //\\n\"\n\"    // `stdin`は`Option<ChildStdin>`型を持ちますが、今回は値を持っていること\"\n\"が\\n\"\n\"    // 確かなので、いきなり`unwrap`してしまって構いません。\\n\"\n\n#: src/std_misc/process/pipe.md:36\nmsgid \"\\\"couldn't write to wc stdin: {}\\\"\"\nmsgstr \"\\\"couldn't write to wc stdin: {}\\\"\"\n\n#: src/std_misc/process/pipe.md:37\nmsgid \"\\\"sent pangram to wc\\\"\"\nmsgstr \"\\\"sent pangram to wc\\\"\"\n\n#: src/std_misc/process/pipe.md:40\nmsgid \"\"\n\"// Because `stdin` does not live after the above calls, it is `drop`ed,\\n\"\n\"    // and the pipe is closed.\\n\"\n\"    //\\n\"\n\"    // This is very important, otherwise `wc` wouldn't start processing the\\n\"\n\"    // input we just sent.\\n\"\nmsgstr \"\"\n\"// `stdin`は上のプロセスコールのあとには有効でないので、`drop`され、\\n\"\n\"    // パイプはcloseされます。\\n\"\n\"    //\\n\"\n\"    // これは非常に重要です。というのもcloseしないと`wc`は\\n\"\n\"    // 送った値の処理を開始しないからです。\\n\"\n\n#: src/std_misc/process/pipe.md:46\nmsgid \"\"\n\"// The `stdout` field also has type `Option<ChildStdout>` so must be \"\n\"unwrapped.\\n\"\nmsgstr \"\"\n\"// `stdout`フィールドも`Option<ChildStdout>`型なのでアンラップする必要があり\"\n\"ます\\n\"\n\n#: src/std_misc/process/pipe.md:49\nmsgid \"\\\"couldn't read wc stdout: {}\\\"\"\nmsgstr \"\\\"couldn't read wc stdout: {}\\\"\"\n\n#: src/std_misc/process/pipe.md:50\nmsgid \"\\\"wc responded with:\\\\n{}\\\"\"\nmsgstr \"\\\"wc responded with:\\\\n{}\\\"\"\n\n#: src/std_misc/process/wait.md:3\nmsgid \"\"\n\"If you'd like to wait for a `process::Child` to finish, you must call \"\n\"`Child::wait`, which will return a `process::ExitStatus`.\"\nmsgstr \"\"\n\"`process::Child`が終了するのを待ちたい場合は、`process::ExitStatus`を返す\"\n\"`Child::wait`を呼び出さなくてはなりません。\"\n\n#: src/std_misc/process/wait.md:10\nmsgid \"\\\"sleep\\\"\"\nmsgstr \"\\\"sleep\\\"\"\n\n#: src/std_misc/process/wait.md:13\nmsgid \"\\\"reached end of main\\\"\"\nmsgstr \"\\\"reached end of main\\\"\"\n\n#: src/std_misc/process/wait.md:18\nmsgid \"\"\n\"# `wait` keeps running for 5 seconds until the `sleep 5` command finishes\\n\"\nmsgstr \"# `wait`は`sleep 5`コマンドが終了するまで5秒間実行され続けます。\\n\"\n\n#: src/std_misc/fs.md:3\nmsgid \"\"\n\"The `std::fs` module contains several functions that deal with the \"\n\"filesystem.\"\nmsgstr \"\"\n\"`std::fs`モジュールはファイルシステムとやり取りするための関数をいくつか持って\"\n\"います。\"\n\n#: src/std_misc/fs.md:10 src/std_misc/fs.md:68 src/std_misc/ffi.md:20\nmsgid \"\\\"unix\\\"\"\nmsgstr \"\\\"unix\\\"\"\n\n#: src/std_misc/fs.md:15\nmsgid \"// A simple implementation of `% cat path`\\n\"\nmsgstr \"// `% cat path`のシンプルな実装\\n\"\n\n#: src/std_misc/fs.md:25\nmsgid \"// A simple implementation of `% echo s > path`\\n\"\nmsgstr \"// `% echo s > path`の簡単な実装\\n\"\n\n#: src/std_misc/fs.md:32\nmsgid \"// A simple implementation of `% touch path` (ignores existing files)\\n\"\nmsgstr \"\"\n\"// `% touch path`の簡単な実装（すでにファイルが存在しても無視します。）\\n\"\n\n#: src/std_misc/fs.md:42\nmsgid \"\\\"`mkdir a`\\\"\"\nmsgstr \"\\\"`mkdir a`\\\"\"\n\n#: src/std_misc/fs.md:43\nmsgid \"// Create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"// ディレクトリを作成します。返り値は`io::Result<()>`。\\n\"\n\n#: src/std_misc/fs.md:45 src/std_misc/fs.md:52 src/std_misc/fs.md:58\n#: src/std_misc/fs.md:63 src/std_misc/fs.md:70 src/std_misc/fs.md:75\n#: src/std_misc/fs.md:81 src/std_misc/fs.md:88 src/std_misc/fs.md:97\n#: src/std_misc/fs.md:103\nmsgid \"\\\"! {:?}\\\"\"\nmsgstr \"\\\"! {:?}\\\"\"\n\n#: src/std_misc/fs.md:49\nmsgid \"\\\"`echo hello > a/b.txt`\\\"\"\nmsgstr \"\\\"`echo hello > a/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:50\nmsgid \"\"\n\"// The previous match can be simplified using the `unwrap_or_else` method\\n\"\nmsgstr \"// 上のmatchは`unwrap_or_else`をメソッドを用いて簡略化できます。\\n\"\n\n#: src/std_misc/fs.md:51\nmsgid \"\\\"a/b.txt\\\"\"\nmsgstr \"\\\"a/b.txt\\\"\"\n\n#: src/std_misc/fs.md:55\nmsgid \"\\\"`mkdir -p a/c/d`\\\"\"\nmsgstr \"\\\"`mkdir -p a/c/d`\\\"\"\n\n#: src/std_misc/fs.md:56\nmsgid \"// Recursively create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 再帰的にディレクトリを作成します。返り値は`io::Result<()>`。\\n\"\n\n#: src/std_misc/fs.md:57 src/std_misc/fs.md:102\nmsgid \"\\\"a/c/d\\\"\"\nmsgstr \"\\\"a/c/d\\\"\"\n\n#: src/std_misc/fs.md:61\nmsgid \"\\\"`touch a/c/e.txt`\\\"\"\nmsgstr \"\\\"`touch a/c/e.txt`\\\"\"\n\n#: src/std_misc/fs.md:62 src/std_misc/fs.md:96\nmsgid \"\\\"a/c/e.txt\\\"\"\nmsgstr \"\\\"a/c/e.txt\\\"\"\n\n#: src/std_misc/fs.md:66\nmsgid \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\nmsgstr \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:67\nmsgid \"// Create a symbolic link, returns `io::Result<()>`\\n\"\nmsgstr \"// シンボリックリンクを作成、返り値は`io::Result<()>`。\\n\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74\nmsgid \"\\\"../b.txt\\\"\"\nmsgstr \"\\\"../b.txt\\\"\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74 src/std_misc/fs.md:80\nmsgid \"\\\"a/c/b.txt\\\"\"\nmsgstr \"\\\"a/c/b.txt\\\"\"\n\n#: src/std_misc/fs.md:79\nmsgid \"\\\"`cat a/c/b.txt`\\\"\"\nmsgstr \"\\\"`cat a/c/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:85\nmsgid \"\\\"`ls a`\\\"\"\nmsgstr \"\\\"`ls a`\\\"\"\n\n#: src/std_misc/fs.md:86\nmsgid \"// Read the contents of a directory, returns `io::Result<Vec<Path>>`\\n\"\nmsgstr \"\"\n\"// ディレクトリの内容を読み込みます。返り値は`io::Result<Vec<Path>>`。\\n\"\n\n#: src/std_misc/fs.md:94\nmsgid \"\\\"`rm a/c/e.txt`\\\"\"\nmsgstr \"\\\"`rm a/c/e.txt`\\\"\"\n\n#: src/std_misc/fs.md:95\nmsgid \"// Remove a file, returns `io::Result<()>`\\n\"\nmsgstr \"// ファイルを削除。返り値は`io::Result<()>`。\\n\"\n\n#: src/std_misc/fs.md:100\nmsgid \"\\\"`rmdir a/c/d`\\\"\"\nmsgstr \"\\\"`rmdir a/c/d`\\\"\"\n\n#: src/std_misc/fs.md:101\nmsgid \"// Remove an empty directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 空のディレクトリを削除。返り値は`io::Result<()>`。\\n\"\n\n#: src/std_misc/fs.md:111\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\n\n#: src/std_misc/fs.md:127\nmsgid \"And the final state of the `a` directory is:\"\nmsgstr \"最終的な`a`ディレクトリの状態は以下です。\"\n\n#: src/std_misc/fs.md:139\nmsgid \"An alternative way to define the function `cat` is with `?` notation:\"\nmsgstr \"\"\n\n#: src/std_misc/fs.md:152\nmsgid \"[`cfg!`](../attribute/cfg.md)\"\nmsgstr \"[`cfg!`](../attribute/cfg.md)\"\n\n#: src/std_misc/arg.md:3\nmsgid \"Standard Library\"\nmsgstr \"標準ライブラリ\"\n\n#: src/std_misc/arg.md:5\nmsgid \"\"\n\"The command line arguments can be accessed using `std::env::args`, which \"\n\"returns an iterator that yields a `String` for each argument:\"\nmsgstr \"\"\n\"コマンドライン引数は`std::env::args`を介して取得できます。これはそれぞれの引\"\n\"数を文字列として生成するイテレータを返します。\"\n\n#: src/std_misc/arg.md:14\nmsgid \"// The first argument is the path that was used to call the program.\\n\"\nmsgstr \"// ひとつ目の引数はプログラムを呼び出す際に使用したパス。\\n\"\n\n#: src/std_misc/arg.md:15\nmsgid \"\\\"My path is {}.\\\"\"\nmsgstr \"\\\"My path is {}.\\\"\"\n\n#: src/std_misc/arg.md:17\nmsgid \"\"\n\"// The rest of the arguments are the passed command line parameters.\\n\"\n\"    // Call the program like this:\\n\"\n\"    //   $ ./args arg1 arg2\\n\"\nmsgstr \"\"\n\"// 残りはプログラムに渡されたコマンドラインパラメータ。\\n\"\n\"    // プログラムはこんなふうに呼び出します。\\n\"\n\"    //   $ ./args arg1 arg2\\n\"\n\n#: src/std_misc/arg.md:20\nmsgid \"\\\"I got {:?} arguments: {:?}.\\\"\"\nmsgstr \"\\\"I got {:?} arguments: {:?}.\\\"\"\n\n#: src/std_misc/arg.md:24\nmsgid \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"My path is ./args.\\n\"\n\"I got 3 arguments: [\\\"1\\\", \\\"2\\\", \\\"3\\\"].\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"My path is ./args.\\n\"\n\"I got 3 arguments: [\\\"1\\\", \\\"2\\\", \\\"3\\\"].\\n\"\n\"```\"\n\n#: src/std_misc/arg.md:32\nmsgid \"\"\n\"Alternatively, there are numerous crates that can provide extra \"\n\"functionality when creating command-line applications. One of the more \"\n\"popular command line argument crates being [`clap`](https://rust-cli.github.\"\n\"io/book/tutorial/cli-args.html#parsing-cli-arguments-with-clap).\"\nmsgstr \"\"\n\n#: src/std_misc/arg/matching.md:3\nmsgid \"Matching can be used to parse simple arguments:\"\nmsgstr \"matchを用いて簡単な引数をパースできます。\"\n\n#: src/std_misc/arg/matching.md:17\nmsgid \"\"\n\"\\\"usage:\\n\"\n\"match_args <string>\\n\"\n\"    Check whether given string is the answer.\\n\"\n\"match_args {{increase|decrease}} <integer>\\n\"\n\"    Increase or decrease given integer by one.\\\"\"\nmsgstr \"\"\n\"\\\"usage:\\n\"\n\"match_args <string>\\n\"\n\"    Check whether given string is the answer.\\n\"\n\"match_args {{increase|decrease}} <integer>\\n\"\n\"    Increase or decrease given integer by one.\\\"\"\n\n#: src/std_misc/arg/matching.md:28\nmsgid \"// no arguments passed\\n\"\nmsgstr \"// 引数がない場合\\n\"\n\n#: src/std_misc/arg/matching.md:30\nmsgid \"\\\"My name is 'match_args'. Try passing some arguments!\\\"\"\nmsgstr \"\\\"My name is 'match_args'. Try passing some arguments!\\\"\"\n\n#: src/std_misc/arg/matching.md:32\nmsgid \"// one argument passed\\n\"\nmsgstr \"// 引数が1つの場合\\n\"\n\n#: src/std_misc/arg/matching.md:35\nmsgid \"\\\"This is the answer!\\\"\"\nmsgstr \"\\\"This is the answer!\\\"\"\n\n#: src/std_misc/arg/matching.md:36\nmsgid \"\\\"This is not the answer.\\\"\"\nmsgstr \"\\\"This is not the answer.\\\"\"\n\n#: src/std_misc/arg/matching.md:39\nmsgid \"// one command and one argument passed\\n\"\nmsgstr \"// コマンドが一つと引数が一つの場合\\n\"\n\n#: src/std_misc/arg/matching.md:43\nmsgid \"// parse the number\\n\"\nmsgstr \"// 数字をパース。\\n\"\n\n#: src/std_misc/arg/matching.md:49\nmsgid \"\\\"error: second argument not an integer\\\"\"\nmsgstr \"\\\"error: second argument not an integer\\\"\"\n\n#: src/std_misc/arg/matching.md:54\nmsgid \"// parse the command\\n\"\nmsgstr \"// コマンドをパース。\\n\"\n\n#: src/std_misc/arg/matching.md:56\nmsgid \"\\\"increase\\\"\"\nmsgstr \"\\\"increase\\\"\"\n\n#: src/std_misc/arg/matching.md:57\nmsgid \"\\\"decrease\\\"\"\nmsgstr \"\\\"decrease\\\"\"\n\n#: src/std_misc/arg/matching.md:59\nmsgid \"\\\"error: invalid command\\\"\"\nmsgstr \"\\\"error: invalid command\\\"\"\n\n#: src/std_misc/arg/matching.md:64\nmsgid \"// all the other cases\\n\"\nmsgstr \"// その他の場合\\n\"\n\n#: src/std_misc/arg/matching.md:66\nmsgid \"// show a help message\\n\"\nmsgstr \"// ヘルプメッセージを表示。\\n\"\n\n#: src/std_misc/arg/matching.md:73\nmsgid \"\"\n\"If you named your program `match_args.rs` and compile it like this `rustc \"\n\"match_args.rs`, you can execute it as follows:\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:3\nmsgid \"\"\n\"Rust provides a Foreign Function Interface (FFI) to C libraries. Foreign \"\n\"functions must be declared inside an `extern` block annotated with a \"\n\"`#[link]` attribute containing the name of the foreign library.\"\nmsgstr \"\"\n\"RustはCのライブラリを呼び出すために他言語関数インターフェイス（Foreign \"\n\"Function Interface, FFI）を持っています。他言語の関数を使用する際には、そのラ\"\n\"イブラリ名を`#[link]`アトリビュートに渡し、更にそれでアノテーションされた\"\n\"`extern`ブロック内で宣言する必要があります。\"\n\n#: src/std_misc/ffi.md:9\nmsgid \"// this extern block links to the libm library\\n\"\nmsgstr \"// このexternブロックはlibmライブラリをリンクします。\\n\"\n\n#: src/std_misc/ffi.md:12\nmsgid \"\\\"msvcrt\\\"\"\nmsgstr \"\\\"msvcrt\\\"\"\n\n#: src/std_misc/ffi.md:14 src/std_misc/ffi.md:23\nmsgid \"\"\n\"// this is a foreign function\\n\"\n\"    // that computes the square root of a single precision complex number\\n\"\nmsgstr \"\"\n\"// 他言語の関数宣言。\\n\"\n\"    // この関数は単精度浮動小数の複素数型の平方根を計算するためのものです。\\n\"\n\n#: src/std_misc/ffi.md:21\nmsgid \"\\\"m\\\"\"\nmsgstr \"\\\"m\\\"\"\n\n#: src/std_misc/ffi.md:29\nmsgid \"\"\n\"// Since calling foreign functions is considered unsafe,\\n\"\n\"// it's common to write safe wrappers around them.\\n\"\nmsgstr \"// 型安全にするためのラッパ\\n\"\n\n#: src/std_misc/ffi.md:37\nmsgid \"// z = -1 + 0i\\n\"\nmsgstr \"// z = -1 + 0i\\n\"\n\n#: src/std_misc/ffi.md:40\nmsgid \"// calling a foreign function is an unsafe operation\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:43\nmsgid \"\\\"the square root of {:?} is {:?}\\\"\"\nmsgstr \"\\\"the square root of {:?} is {:?}\\\"\"\n\n#: src/std_misc/ffi.md:45\nmsgid \"// calling safe API wrapped around unsafe operation\\n\"\nmsgstr \"\"\n\n#: src/std_misc/ffi.md:46\nmsgid \"\\\"cos({:?}) = {:?}\\\"\"\nmsgstr \"\\\"cos({:?}) = {:?}\\\"\"\n\n#: src/std_misc/ffi.md:48\nmsgid \"// Minimal implementation of single precision complex numbers\\n\"\nmsgstr \"// 単精度浮動小数の複素数型の最小限の実装\\n\"\n\n#: src/std_misc/ffi.md:60\nmsgid \"\\\"{}-{}i\\\"\"\nmsgstr \"\\\"{}-{}i\\\"\"\n\n#: src/std_misc/ffi.md:62\nmsgid \"\\\"{}+{}i\\\"\"\nmsgstr \"\\\"{}+{}i\\\"\"\n\n#: src/testing.md:3\nmsgid \"\"\n\"Rust is a programming language that cares a lot about correctness and it \"\n\"includes support for writing software tests within the language itself.\"\nmsgstr \"\"\n\"Rustはとても正確性を配慮したプログラミング言語であり、ソフトウェアテストを書\"\n\"くためのサポートを言語自身が含んでいます。\"\n\n#: src/testing.md:6\nmsgid \"Testing comes in three styles:\"\nmsgstr \"テストには3つの種類があります。\"\n\n#: src/testing.md:8\nmsgid \"[Unit](testing/unit_testing.md) testing.\"\nmsgstr \"[単体テスト](testing/unit_testing.md)\"\n\n#: src/testing.md:9\nmsgid \"[Doc](testing/doc_testing.md) testing.\"\nmsgstr \"[ドキュメンテーションテスト](testing/doc_testing.md)\"\n\n#: src/testing.md:10\nmsgid \"[Integration](testing/integration_testing.md) testing.\"\nmsgstr \"[結合テスト](testing/integration_testing.md)\"\n\n#: src/testing.md:12\nmsgid \"Also Rust has support for specifying additional dependencies for tests:\"\nmsgstr \"\"\n\"またRustではテストのために追加の依存パッケージを指定することもできます。\"\n\n#: src/testing.md:14\nmsgid \"[Dev-dependencies](testing/dev_dependencies.md)\"\nmsgstr \"\"\n\n#: src/testing.md:18\nmsgid \"\"\n\"[The Book](https://doc.rust-lang.org/book/ch11-00-testing.html) chapter on \"\n\"testing\"\nmsgstr \"\"\n\"[The Book](https://doc.rust-lang.org/book/ch11-00-testing.html) のテストの章\"\n\n#: src/testing.md:19\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on doc-testing\"\nmsgstr \"\"\n\n#: src/testing/unit_testing.md:3\nmsgid \"\"\n\"Tests are Rust functions that verify that the non-test code is functioning \"\n\"in the expected manner. The bodies of test functions typically perform some \"\n\"setup, run the code we want to test, then assert whether the results are \"\n\"what we expect.\"\nmsgstr \"\"\n\"テストは、テスト以外のコードが想定通りに動いているかを確かめるRustの関数で\"\n\"す。一般にテスト関数は、準備をしてからテストしたいコードを実行し、そしてその\"\n\"結果が期待したものであるか確認します。\"\n\n#: src/testing/unit_testing.md:8\nmsgid \"\"\n\"Most unit tests go into a `tests` [mod](../mod.md) with the `#[cfg(test)]` \"\n\"[attribute](../attribute.md). Test functions are marked with the `#[test]` \"\n\"attribute.\"\nmsgstr \"\"\n\"大抵の場合ユニットテストは`#[cfg(test)]`[アトリビュート](../attribute.md)を付\"\n\"けた`tests`[モジュール](../mod.md)に配置されます。テスト関数には`#[test]`アト\"\n\"リビュートを付与します。\"\n\n#: src/testing/unit_testing.md:11\nmsgid \"\"\n\"Tests fail when something in the test function [panics](../std/panic.md). \"\n\"There are some helper [macros](../macros.md):\"\nmsgstr \"\"\n\"テスト関数内部で[パニック](../std/panic.md)するとテストは失敗となります。次の\"\n\"ような[マクロ](../macros.md)が用意されています。\"\n\n#: src/testing/unit_testing.md:14\nmsgid \"`assert!(expression)` - panics if expression evaluates to `false`.\"\nmsgstr \"\"\n\"`assert!(expression)` - 式を評価した結果が`false`であればパニックします。\"\n\n#: src/testing/unit_testing.md:15\nmsgid \"\"\n\"`assert_eq!(left, right)` and `assert_ne!(left, right)` - testing left and \"\n\"right expressions for equality and inequality respectively.\"\nmsgstr \"\"\n\"`assert_eq!(left, right)`と`assert_ne!(left, right)` - 左右の式を評価した結果\"\n\"が、それぞれ等しくなること、ならないことをテストします。\"\n\n#: src/testing/unit_testing.md:22\nmsgid \"\"\n\"// This is a really bad adding function, its purpose is to fail in this\\n\"\n\"// example.\\n\"\nmsgstr \"// 誤った加算をする関数がテストに通らないことを示します。\\n\"\n\n#: src/testing/unit_testing.md:32\nmsgid \"\"\n\"// Note this useful idiom: importing names from outer (for mod tests) \"\n\"scope.\\n\"\nmsgstr \"\"\n\"// 外部のスコープから（mod testsに）名前をインポートする便利なイディオム。\\n\"\n\n#: src/testing/unit_testing.md:42\nmsgid \"\"\n\"// This assert would fire and test will fail.\\n\"\n\"        // Please note, that private functions can be tested too!\\n\"\nmsgstr \"\"\n\"// このアサーションはパニックして、テストは失敗します。\\n\"\n\"        // プライベートな関数もテストすることができます。\\n\"\n\n#: src/testing/unit_testing.md:49\nmsgid \"Tests can be run with `cargo test`.\"\nmsgstr \"`cargo test`でテストを実行できます。\"\n\n#: src/testing/unit_testing.md:73\nmsgid \"Tests and `?`\"\nmsgstr \"テストと`?`\"\n\n#: src/testing/unit_testing.md:74\nmsgid \"\"\n\"None of the previous unit test examples had a return type. But in Rust 2018, \"\n\"your unit tests can return `Result<()>`, which lets you use `?` in them! \"\n\"This can make them much more concise.\"\nmsgstr \"\"\n\"ここまでに例示したユニットテストは返り値の型を持っていませんでしたが、Rust \"\n\"2018ではユニットテストが`Result<()>`を返し、内部で`?`を使えるようになりまし\"\n\"た！これにより、ユニットテストをさらに簡潔に記述できます。\"\n\n#: src/testing/unit_testing.md:83\nmsgid \"\\\"negative floats don't have square roots\\\"\"\nmsgstr \"\\\"negative floats don't have square roots\\\"\"\n\n#: src/testing/unit_testing.md:100\nmsgid \"\"\n\"See [\\\"The Edition Guide\\\"](https://doc.rust-lang.org/edition-guide/\"\n\"rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html) \"\n\"for more details.\"\nmsgstr \"\"\n\"詳細は[エディションガイド](https://doc.rust-lang.org/edition-guide/rust-2018/\"\n\"error-handling-and-panics/question-mark-in-main-and-tests.html)を参照してくだ\"\n\"さい。\"\n\n#: src/testing/unit_testing.md:102\nmsgid \"Testing panics\"\nmsgstr \"パニックをテストする\"\n\n#: src/testing/unit_testing.md:104\nmsgid \"\"\n\"To check functions that should panic under certain circumstances, use \"\n\"attribute `#[should_panic]`. This attribute accepts optional parameter \"\n\"`expected = ` with the text of the panic message. If your function can panic \"\n\"in multiple ways, it helps make sure your test is testing the correct panic.\"\nmsgstr \"\"\n\"ある条件下でパニックすべき関数をテストするには、`#[should_panic]`アトリビュー\"\n\"トを使います。このアトリビュートはパニックメッセージをオプションの引数\"\n\"`expected =`で受け取れます。パニックの原因が複数あるときに、想定した原因でパ\"\n\"ニックが発生したことを確認できます。\"\n\n#: src/testing/unit_testing.md:112 src/testing/doc_testing.md:45\nmsgid \"\\\"Divide-by-zero error\\\"\"\nmsgstr \"\\\"Divide-by-zero error\\\"\"\n\n#: src/testing/unit_testing.md:114 src/testing/unit_testing.md:135\nmsgid \"\\\"Divide result is zero\\\"\"\nmsgstr \"\\\"Divide result is zero\\\"\"\n\n#: src/testing/unit_testing.md:142\nmsgid \"Running these tests gives us:\"\nmsgstr \"テストを実行すると、次の結果を得られます。\"\n\n#: src/testing/unit_testing.md:161\nmsgid \"Running specific tests\"\nmsgstr \"実行するテストを指定する\"\n\n#: src/testing/unit_testing.md:163\nmsgid \"\"\n\"To run specific tests one may specify the test name to `cargo test` command.\"\nmsgstr \"`cargo test`にテストの名前を与えると、そのテストだけが実行されます。\"\n\n#: src/testing/unit_testing.md:179\nmsgid \"\"\n\"To run multiple tests one may specify part of a test name that matches all \"\n\"the tests that should be run.\"\nmsgstr \"\"\n\"テスト名の一部を指定すると、それにマッチするすべてのテストが実行されます。\"\n\n#: src/testing/unit_testing.md:197\nmsgid \"Ignoring tests\"\nmsgstr \"テストを除外する\"\n\n#: src/testing/unit_testing.md:199\nmsgid \"\"\n\"Tests can be marked with the `#[ignore]` attribute to exclude some tests. Or \"\n\"to run them with command `cargo test -- --ignored`\"\nmsgstr \"\"\n\"テストを実行から除外するには、`#[ignore]`アトリビュートを使います。また、\"\n\"`cargo test -- --ignored`で、除外したテストのみを実行できます。\"\n\n#: src/testing/doc_testing.md:3\nmsgid \"\"\n\"The primary way of documenting a Rust project is through annotating the \"\n\"source code. Documentation comments are written in [CommonMark Markdown \"\n\"specification](https://commonmark.org/) and support code blocks in them. \"\n\"Rust takes care about correctness, so these code blocks are compiled and \"\n\"used as documentation tests.\"\nmsgstr \"\"\n\"Rustのプロジェクトでは、ソースコードに注釈する形でドキュメントを書くのが主流\"\n\"です。ドキュメンテーションコメントの記述は[CommonMark Markdown specification]\"\n\"(https://commonmark.org/)で行い、コードブロックも使えます。Rustは正確性を重視\"\n\"しているので、コードブロックもコンパイルされ、テストとして使われます。\"\n\n#: src/testing/doc_testing.md:10\nmsgid \"\"\n\"/// First line is a short summary describing function.\\n\"\n\"///\\n\"\n\"/// The next lines present detailed documentation. Code blocks start with\\n\"\n\"/// triple backquotes and have implicit `fn main()` inside\\n\"\n\"/// and `extern crate <cratename>`. Assume we're testing a `playground` library\\n\"\n\"/// crate or using the Playground's Test action:\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 最初の行には関数の機能の短い要約を書きます。\\n\"\n\"///\\n\"\n\"/// 以降で詳細なドキュメンテーションを記述します。コードブロックは三重のバッ\"\n\"ククォートで始まり、\\n\"\n\"/// 暗黙的に`fn main()`と`extern crate <クレート名>`で囲われます。\\n\"\n\"/// `playground`クレートをテストしたいときには、次のように記述します。\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:23\nmsgid \"\"\n\"/// Usually doc comments may include sections \\\"Examples\\\", \\\"Panics\\\" and \"\n\"\\\"Failures\\\".\\n\"\n\"///\\n\"\n\"/// The next function divides two numbers.\\n\"\n\"///\\n\"\n\"/// # Examples\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # Panics\\n\"\n\"///\\n\"\n\"/// The function panics if the second argument is zero.\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // panics on division by zero\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 一般的に、ドキュメンテーションコメントは\\n\"\n\"/// \\\"Examples\\\", \\\"Panics\\\", \\\"Failures\\\" という章から成ります。\\n\"\n\"///\\n\"\n\"/// 次の関数は除算を実行します。\\n\"\n\"///\\n\"\n\"/// # Examples\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # Panics\\n\"\n\"///\\n\"\n\"/// 第2引数がゼロであればパニックします。\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // ゼロで除算するとパニックします\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:52\nmsgid \"\"\n\"Code blocks in documentation are automatically tested when running the \"\n\"regular `cargo test` command:\"\nmsgstr \"\"\n\"ドキュメンテーションコメント中のコードブロックは、`cargo test`コマンドで自動\"\n\"的にテストされます。\"\n\n#: src/testing/doc_testing.md:71\nmsgid \"Motivation behind documentation tests\"\nmsgstr \"ドキュメンテーションテストの目的\"\n\n#: src/testing/doc_testing.md:73\nmsgid \"\"\n\"The main purpose of documentation tests is to serve as examples that \"\n\"exercise the functionality, which is one of the most important [guidelines]\"\n\"(https://rust-lang-nursery.github.io/api-guidelines/documentation.\"\n\"html#examples-use--not-try-not-unwrap-c-question-mark). It allows using \"\n\"examples from docs as complete code snippets. But using `?` makes \"\n\"compilation fail since `main` returns `unit`. The ability to hide some \"\n\"source lines from documentation comes to the rescue: one may write `fn \"\n\"try_main() -> Result<(), ErrorType>`, hide it and `unwrap` it in hidden \"\n\"`main`. Sounds complicated? Here's an example:\"\nmsgstr \"\"\n\"ドキュメンテーションテストの主な目的は、実行例を示すことであり、これは最も大\"\n\"切な[ガイドライン](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html#examples-use--not-try-not-unwrap-c-question-mark)の一つに\"\n\"もなっています。これにより、ドキュメントの例を実際に動くコードとして使うこと\"\n\"ができます。しかしながら、`main`が`()`を返すために、`?`を使うとコンパイルに失\"\n\"敗してしまいます。ドキュメンテーションでコードブロックの一部を隠す機能で、こ\"\n\"の問題に対処できます。つまり、`fn try_main() -> Result<(), ErrorType>`を定義\"\n\"しておきながらそれを隠し、暗黙の`main`の内部で`unwrap`するのです。複雑なの\"\n\"で、例を見てみましょう。\"\n\n#: src/testing/doc_testing.md:82\nmsgid \"\"\n\"/// Using hidden `try_main` in doc tests.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // hidden lines start with `#` symbol, but they're still compilable!\\n\"\n\"/// # fn try_main() -> Result<(), String> { // line that wraps the body \"\n\"shown in doc\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // returning from try_main\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // starting main that'll unwrap()\\n\"\n\"/// #    try_main().unwrap(); // calling try_main and unwrapping\\n\"\n\"/// #                         // so that test will panic in case of error\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// ドキュメンテーションテストで、`try_main`を隠して使います。\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // 行頭に `#` を置くと行が隠されるが、コンパイルには成功します。\\n\"\n\"/// # fn try_main() -> Result<(), String> { // ドキュメントの本体を囲う行\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // try_mainから値を返します\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // unwrap()を実行します。\\n\"\n\"/// #    try_main().unwrap(); // try_mainを呼びunwrapすると、エラーの場合にパ\"\n\"ニックします。\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:97\nmsgid \"\\\"Divide-by-zero\\\"\"\nmsgstr \"\\\"Divide-by-zero\\\"\"\n\n#: src/testing/doc_testing.md:106\nmsgid \"\"\n\"[RFC505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-\"\n\"conventions.md) on documentation style\"\nmsgstr \"\"\n\"[RFC505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-\"\n\"conventions.md) ドキュメンテーションのスタイルについて\"\n\n#: src/testing/doc_testing.md:107\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on documentation guidelines\"\nmsgstr \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) ドキュメンテーションのガイドラインについて\"\n\n#: src/testing/integration_testing.md:3\nmsgid \"\"\n\"[Unit tests](unit_testing.md) are testing one module in isolation at a time: \"\n\"they're small and can test private code. Integration tests are external to \"\n\"your crate and use only its public interface in the same way any other code \"\n\"would. Their purpose is to test that many parts of your library work \"\n\"correctly together.\"\nmsgstr \"\"\n\"[ユニットテスト](unit_testing.md)は、独立したモジュールを一つずつテストするも\"\n\"のであり、テストは小さく、プライベートなコードについてもテストすることができ\"\n\"ます。統合テストはクレートの外側にあるもので、他の外部のコードと同様に、パブ\"\n\"リックなインタフェースだけを使います。統合テストの目的は、ライブラリのそれぞ\"\n\"れのモジュールが連携して正しく動作するかどうかテストすることです。\"\n\n#: src/testing/integration_testing.md:8\nmsgid \"Cargo looks for integration tests in `tests` directory next to `src`.\"\nmsgstr \"\"\n\"Cargoは、`src`ディレクトリと並んで配置された`tests`ディレクトリを統合テストと\"\n\"して扱います。\"\n\n#: src/testing/integration_testing.md:10 src/testing/dev_dependencies.md:17\nmsgid \"File `src/lib.rs`:\"\nmsgstr \"ファイル`src/lib.rs`：\"\n\n#: src/testing/integration_testing.md:13\nmsgid \"// Define this in a crate called `adder`.\\n\"\nmsgstr \"// `adder`という名前のクレートの内部で、次の関数を定義します。\\n\"\n\n#: src/testing/integration_testing.md:19\nmsgid \"File with test: `tests/integration_test.rs`:\"\nmsgstr \"テストを含むファイル`tests/integration_test.rs`：\"\n\n#: src/testing/integration_testing.md:28\nmsgid \"Running tests with `cargo test` command:\"\nmsgstr \"`cargo test`コマンドでテストを実行します。\"\n\n#: src/testing/integration_testing.md:50\nmsgid \"\"\n\"Each Rust source file in the `tests` directory is compiled as a separate \"\n\"crate. In order to share some code between integration tests we can make a \"\n\"module with public functions, importing and using it within tests.\"\nmsgstr \"\"\n\"`tests`ディレクトリにあるRustのソースファイルは別のクレートとしてコンパイルさ\"\n\"れます。統合テストの間でコードを共有するには、パブリックな関数をモジュールに\"\n\"入れて、それぞれのテストでインポートして利用する方法があります。\"\n\n#: src/testing/integration_testing.md:54\nmsgid \"File `tests/common/mod.rs`:\"\nmsgstr \"ファイル`tests/common.rs`：\"\n\n#: src/testing/integration_testing.md:58\nmsgid \"\"\n\"// some setup code, like creating required files/directories, starting\\n\"\n\"    // servers, etc.\\n\"\nmsgstr \"\"\n\"// 必要なファイル・ディレクトリの作成やサーバの起動といった準備を行うコードを\"\n\"記述します。\\n\"\n\n#: src/testing/integration_testing.md:63\nmsgid \"File with test: `tests/integration_test.rs`\"\nmsgstr \"テストを含むファイル`tests/integration_test.rs`：\"\n\n#: src/testing/integration_testing.md:66\nmsgid \"// importing common module.\\n\"\nmsgstr \"// 共通のモジュールをインポートします。\\n\"\n\n#: src/testing/integration_testing.md:71\nmsgid \"// using common code.\\n\"\nmsgstr \"// 共通のコードを利用します。\\n\"\n\n#: src/testing/integration_testing.md:77\nmsgid \"\"\n\"Creating the module as `tests/common.rs` also works, but is not recommended \"\n\"because the test runner will treat the file as a test crate and try to run \"\n\"tests inside it.\"\nmsgstr \"\"\n\"モジュールを`tests/common.rs`に記述することも可能ですが、`tests/common.rs`中\"\n\"のテストも自動的に実行されてしまうため非推奨です。\"\n\n#: src/testing/dev_dependencies.md:1\nmsgid \"Development dependencies\"\nmsgstr \"開発中の依存関係\"\n\n#: src/testing/dev_dependencies.md:3\nmsgid \"\"\n\"Sometimes there is a need to have dependencies for tests (or examples, or \"\n\"benchmarks) only. Such dependencies are added to `Cargo.toml` in the `[dev-\"\n\"dependencies]` section. These dependencies are not propagated to other \"\n\"packages which depend on this package.\"\nmsgstr \"\"\n\"テスト（あるいは例やベンチマーク）のためだけに、あるクレートに依存しなければ\"\n\"ならないことがあります。このような依存関係は、`Cargo.toml`の`[dev-\"\n\"dependencies]`セクションに追加します。このセクションに追加した依存関係は、こ\"\n\"のパッケージに依存するパッケージには適用されません。\"\n\n#: src/testing/dev_dependencies.md:8\nmsgid \"\"\n\"One such example is [`pretty_assertions`](https://docs.rs/\"\n\"pretty_assertions/1.0.0/pretty_assertions/index.html), which extends \"\n\"standard `assert_eq!` and `assert_ne!` macros, to provide colorful diff.  \\n\"\n\"File `Cargo.toml`:\"\nmsgstr \"\"\n\"そのようなクレートの例として、[`pretty_assertions`](https://docs.rs/\"\n\"pretty_assertions/1.0.0/pretty_assertions/index.html)クレートが挙げられます。\"\n\"これは、標準の`assert_eq!`と`assert_ne!`マクロを拡張して、差分をカラフルに表\"\n\"示するものです。  \\n\"\n\"ファイル`Cargo.toml`：\"\n\n#: src/testing/dev_dependencies.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"# standard crate data is left out\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"# 本節の内容に関係のない行は省略しています。\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\n\n#: src/testing/dev_dependencies.md:27\nmsgid \"// crate for test-only use. Cannot be used in non-test code.\\n\"\nmsgstr \"\"\n\"// テストのためのクレートであり、\\n\"\n\"                                      // テスト以外のコードには使えません。\\n\"\n\n#: src/testing/dev_dependencies.md:37\nmsgid \"\"\n\"[Cargo](http://doc.crates.io/specifying-dependencies.html) docs on \"\n\"specifying dependencies.\"\nmsgstr \"\"\n\"[Cargo](http://doc.crates.io/specifying-dependencies.html) 依存関係の指定につ\"\n\"いて\"\n\n#: src/unsafe.md:3\nmsgid \"\"\n\"As an introduction to this section, to borrow from [the official docs]\"\n\"(https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html), \\\"one should try \"\n\"to minimize the amount of unsafe code in a code base.\\\" With that in mind, \"\n\"let's get started! Unsafe annotations in Rust are used to bypass protections \"\n\"put in place by the compiler; specifically, there are four primary things \"\n\"that unsafe is used for:\"\nmsgstr \"\"\n\"この章の内容を見る前に、[公式ドキュメント](https://doc.rust-lang.org/book/\"\n\"ch19-01-unsafe-rust.html)から引用した次の文章をお読みください。「コードベース\"\n\"中の、アンセーフな操作をするコードの量は、可能な限り小さく無くてはならな\"\n\"い。」この戒めを頭に叩き込んだ上で、さあはじめましょう！Rustにおいて、アン\"\n\"セーフなブロックはコンパイラのチェックをスルーするために使われます。具体的に\"\n\"は以下の4つの主要なユースケースがあります。\"\n\n#: src/unsafe.md:9\nmsgid \"dereferencing raw pointers\"\nmsgstr \"生ポインタのデリファレンス\"\n\n#: src/unsafe.md:10\nmsgid \"\"\n\"calling functions or methods which are `unsafe` (including calling a \"\n\"function over FFI, see [a previous chapter](std_misc/ffi.md) of the book)\"\nmsgstr \"\"\n\"安全でない関数やメソッドの呼び出し(FFI経由の関数の呼び出しを含む (詳細は [本\"\n\"書のFFIに関する説明](std_misc/ffi.md) を参照ください))\"\n\n#: src/unsafe.md:12\nmsgid \"accessing or modifying static mutable variables\"\nmsgstr \"静的なミュータブル変数へのアクセスや変更\"\n\n#: src/unsafe.md:13\nmsgid \"implementing unsafe traits\"\nmsgstr \"安全でないトレイトの実装\"\n\n#: src/unsafe.md:15\nmsgid \"Raw Pointers\"\nmsgstr \"生ポインタ\"\n\n#: src/unsafe.md:16\nmsgid \"\"\n\"Raw pointers `*` and references `&T` function similarly, but references are \"\n\"always safe because they are guaranteed to point to valid data due to the \"\n\"borrow checker. Dereferencing a raw pointer can only be done through an \"\n\"unsafe block.\"\nmsgstr \"\"\n\"生ポインタ`*`と参照`&T`はよく似た機能を持ちますが、後者は必ず有効なデータを指\"\n\"していることが借用チェッカーによって保証されているので、常に安全です。生ポイ\"\n\"ンタのデリファレンスはアンセーフなブロックでしか実行できません。\"\n\n#: src/unsafe.md:31\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"安全でない関数呼び出し\"\n\n#: src/unsafe.md:32\nmsgid \"\"\n\"Some functions can be declared as `unsafe`, meaning it is the programmer's \"\n\"responsibility to ensure correctness instead of the compiler's. One example \"\n\"of this is [`std::slice::from_raw_parts`](https://doc.rust-lang.org/std/\"\n\"slice/fn.from_raw_parts.html) which will create a slice given a pointer to \"\n\"the first element and a length.\"\nmsgstr \"\"\n\"関数は `unsafe` として宣言できます。これはコンパイラの代わりにプログラマの責\"\n\"任で正しさを保証することを意味します。例として [`std::slice::from_raw_parts`]\"\n\"(https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html)があります。この\"\n\"関数は最初の要素へのポインタと長さを指定してスライスを作成します。\"\n\n#: src/unsafe.md:54\nmsgid \"\"\n\"For `slice::from_raw_parts`, one of the assumptions which _must_ be upheld \"\n\"is that the pointer passed in points to valid memory and that the memory \"\n\"pointed to is of the correct type. If these invariants aren't upheld then \"\n\"the program's behaviour is undefined and there is no knowing what will \"\n\"happen.\"\nmsgstr \"\"\n\"`slice::from_raw_parts` は、次のふたつの仮定に基づいて処理します。ひとつは渡\"\n\"されたポインタが有効なメモリ位置を指していること、もうひとつはそのメモリに格\"\n\"納された値が正しい型であることです。この仮定を満たさない場合、プログラムの動\"\n\"作は不定となり、何が起こるかわかりません。\"\n\n#: src/unsafe/asm.md:3\nmsgid \"\"\n\"Rust provides support for inline assembly via the `asm!` macro. It can be \"\n\"used to embed handwritten assembly in the assembly output generated by the \"\n\"compiler. Generally this should not be necessary, but might be where the \"\n\"required performance or timing cannot be otherwise achieved. Accessing low \"\n\"level hardware primitives, e.g. in kernel code, may also demand this \"\n\"functionality.\"\nmsgstr \"\"\n\"Rustは`asm!`マクロによってインラインアセンブリをサポートしています。コンパイ\"\n\"ラが生成するアセンブリに、手書きのアセンブリを埋め込むことができます。一般的\"\n\"には必要ありませんが、要求されるパフォーマンスやタイミングを達成するために必\"\n\"要な場合があります。カーネルコードのような、低レベルなハードウェアの基本要素\"\n\"にアクセスする場合にも、この機能が必要でしょう。\"\n\n#: src/unsafe/asm.md:8\nmsgid \"\"\n\"**Note**: the examples here are given in x86/x86-64 assembly, but other \"\n\"architectures are also supported.\"\nmsgstr \"\"\n\"**注意**: 以下の例はx86/x86-64アセンブリで書かれていますが、他のアーキテク\"\n\"チャもサポートされています。\"\n\n#: src/unsafe/asm.md:10\nmsgid \"Inline assembly is currently supported on the following architectures:\"\nmsgstr \"インラインアセンブリは現在以下のアーキテクチャでサポートされています。\"\n\n#: src/unsafe/asm.md:11\nmsgid \"x86 and x86-64\"\nmsgstr \"x86とx86-64\"\n\n#: src/unsafe/asm.md:12\nmsgid \"ARM\"\nmsgstr \"ARM\"\n\n#: src/unsafe/asm.md:13\nmsgid \"AArch64\"\nmsgstr \"AArch64\"\n\n#: src/unsafe/asm.md:14\nmsgid \"RISC-V\"\nmsgstr \"RISC-V\"\n\n#: src/unsafe/asm.md:16\nmsgid \"Basic usage\"\nmsgstr \"基本的な使い方\"\n\n#: src/unsafe/asm.md:18\nmsgid \"Let us start with the simplest possible example:\"\nmsgstr \"最も単純な例から始めましょう。\"\n\n#: src/unsafe/asm.md:21 src/unsafe/asm.md:41 src/unsafe/asm.md:68\n#: src/unsafe/asm.md:106 src/unsafe/asm.md:123 src/unsafe/asm.md:148\n#: src/unsafe/asm.md:174 src/unsafe/asm.md:195 src/unsafe/asm.md:212\n#: src/unsafe/asm.md:251 src/unsafe/asm.md:287 src/unsafe/asm.md:303\n#: src/unsafe/asm.md:329 src/unsafe/asm.md:367 src/unsafe/asm.md:394\n#: src/unsafe/asm.md:418 src/unsafe/asm.md:456\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe/asm.md:25\nmsgid \"\\\"nop\\\"\"\nmsgstr \"\\\"nop\\\"\"\n\n#: src/unsafe/asm.md:30\nmsgid \"\"\n\"This will insert a NOP (no operation) instruction into the assembly \"\n\"generated by the compiler. Note that all `asm!` invocations have to be \"\n\"inside an `unsafe` block, as they could insert arbitrary instructions and \"\n\"break various invariants. The instructions to be inserted are listed in the \"\n\"first argument of the `asm!` macro as a string literal.\"\nmsgstr \"\"\n\"これは、コンパイラが生成したアセンブリに、NOP（no operation）命令を挿入しま\"\n\"す。すべての`asm!`呼び出しは、`unsafe`ブロックの中になければいけません。イン\"\n\"ラインアセンブリは任意の命令を挿入でき、不変条件を壊してしまうからです。挿入\"\n\"される命令は、文字列リテラルとして`asm!`マクロの第一引数に列挙されます。\"\n\n#: src/unsafe/asm.md:35\nmsgid \"Inputs and outputs\"\nmsgstr \"入力と出力\"\n\n#: src/unsafe/asm.md:37\nmsgid \"\"\n\"Now inserting an instruction that does nothing is rather boring. Let us do \"\n\"something that actually acts on data:\"\nmsgstr \"\"\n\"何もしない命令を挿入しても面白くありません。実際にデータを操作してみましょ\"\n\"う。\"\n\n#: src/unsafe/asm.md:46\nmsgid \"\\\"mov {}, 5\\\"\"\nmsgstr \"\\\"mov {}, 5\\\"\"\n\n#: src/unsafe/asm.md:52\nmsgid \"\"\n\"This will write the value `5` into the `u64` variable `x`. You can see that \"\n\"the string literal we use to specify instructions is actually a template \"\n\"string. It is governed by the same rules as Rust [format strings](https://\"\n\"doc.rust-lang.org/std/fmt/#syntax). The arguments that are inserted into the \"\n\"template however look a bit different than you may be familiar with. First \"\n\"we need to specify if the variable is an input or an output of the inline \"\n\"assembly. In this case it is an output. We declared this by writing `out`. \"\n\"We also need to specify in what kind of register the assembly expects the \"\n\"variable. In this case we put it in an arbitrary general purpose register by \"\n\"specifying `reg`. The compiler will choose an appropriate register to insert \"\n\"into the template and will read the variable from there after the inline \"\n\"assembly finishes executing.\"\nmsgstr \"\"\n\"これは`u64`型の変数`x`に`5`の値を書き込んでいます。命令を指定するために利用し\"\n\"ている文字列リテラルが、実はテンプレート文字列になっています。これはRustの\"\n\"[フォーマット文字列](https://doc.rust-lang.org/std/fmt/#syntax)と同じルールに\"\n\"従います。ですが、テンプレートに挿入される引数は、みなさんがよく知っているも\"\n\"のとは少し違っています。まず、変数がインラインアセンブリの入力なのか出力なの\"\n\"かを指定する必要があります。上記の例では出力となっています。`out`と書くことで\"\n\"出力であると宣言しています。また、アセンブリが変数をどの種類のレジスタに格納\"\n\"するかについても指定する必要があります。上の例では、`reg`を指定して任意の汎用\"\n\"レジスタに格納しています。コンパイラはテンプレートに挿入する適切なレジスタを\"\n\"選び、インラインアセンブリの実行終了後、そのレジスタから変数を読みこみます。\"\n\n#: src/unsafe/asm.md:65\nmsgid \"Let us see another example that also uses an input:\"\nmsgstr \"入力を利用する別の例を見てみましょう。\"\n\n#: src/unsafe/asm.md:75\nmsgid \"\\\"mov {0}, {1}\\\"\"\nmsgstr \"\\\"mov {0}, {1}\\\"\"\n\n#: src/unsafe/asm.md:76 src/unsafe/asm.md:111 src/unsafe/asm.md:129\nmsgid \"\\\"add {0}, 5\\\"\"\nmsgstr \"\\\"add {0}, 5\\\"\"\n\n#: src/unsafe/asm.md:85\nmsgid \"\"\n\"This will add `5` to the input in variable `i` and write the result to \"\n\"variable `o`. The particular way this assembly does this is first copying \"\n\"the value from `i` to the output, and then adding `5` to it.\"\nmsgstr \"\"\n\"この例では、変数`i`の入力に`5`を加え、その結果を変数`o`に書き込んでいます。こ\"\n\"のアセンブリ特有のやり方として、はじめに`i`の値を出力にコピーし、それから`5`\"\n\"を加えています。\"\n\n#: src/unsafe/asm.md:89\nmsgid \"The example shows a few things:\"\nmsgstr \"この例はいくつかのことを示します。\"\n\n#: src/unsafe/asm.md:91\nmsgid \"\"\n\"First, we can see that `asm!` allows multiple template string arguments; \"\n\"each one is treated as a separate line of assembly code, as if they were all \"\n\"joined together with newlines between them. This makes it easy to format \"\n\"assembly code.\"\nmsgstr \"\"\n\"まず、`asm!`では複数のテンプレート文字列を引数として利用できます。それぞれの\"\n\"文字列は、改行を挟んで結合されたのと同じように、独立したアセンブリコードとし\"\n\"て扱われます。このおかげで、アセンブリコードを容易にフォーマットできます。\"\n\n#: src/unsafe/asm.md:96\nmsgid \"\"\n\"Second, we can see that inputs are declared by writing `in` instead of `out`.\"\nmsgstr \"つぎに、入力は`out`ではなく`in`と書くことで宣言されています。\"\n\n#: src/unsafe/asm.md:98\nmsgid \"\"\n\"Third, we can see that we can specify an argument number, or name as in any \"\n\"format string. For inline assembly templates this is particularly useful as \"\n\"arguments are often used more than once. For more complex inline assembly \"\n\"using this facility is generally recommended, as it improves readability, \"\n\"and allows reordering instructions without changing the argument order.\"\nmsgstr \"\"\n\"そして、他のフォーマット文字列と同じように引数を番号や名前で指定できます。イ\"\n\"ンラインアセンブリのテンプレートでは、引数が2回以上利用されることが多いため、\"\n\"これは特に便利です。より複雑なインラインアセンブリを書く場合、この機能を使う\"\n\"のが推奨されます。可読性が向上し、引数の順序を変えることなく命令を並べ替える\"\n\"ことができるからです。\"\n\n#: src/unsafe/asm.md:103\nmsgid \"We can further refine the above example to avoid the `mov` instruction:\"\nmsgstr \"上記の例をさらに改善して、`mov`命令をやめることもできます。\"\n\n#: src/unsafe/asm.md:117\nmsgid \"\"\n\"We can see that `inout` is used to specify an argument that is both input \"\n\"and output. This is different from specifying an input and output separately \"\n\"in that it is guaranteed to assign both to the same register.\"\nmsgstr \"\"\n\"`inout`で入力でもあり出力でもある引数を指定しています。こうすることで、入力と\"\n\"出力を個別に指定する場合と違って、入出力が同じレジスタに割り当てられることが\"\n\"保証されます。\"\n\n#: src/unsafe/asm.md:120\nmsgid \"\"\n\"It is also possible to specify different variables for the input and output \"\n\"parts of an `inout` operand:\"\nmsgstr \"\"\n\"`inout`のオペランドとして、入力と出力それぞれに異なる変数を指定することも可能\"\n\"です。\"\n\n#: src/unsafe/asm.md:135\nmsgid \"Late output operands\"\nmsgstr \"遅延出力オペランド\"\n\n#: src/unsafe/asm.md:137\nmsgid \"\"\n\"The Rust compiler is conservative with its allocation of operands. It is \"\n\"assumed that an `out` can be written at any time, and can therefore not \"\n\"share its location with any other argument. However, to guarantee optimal \"\n\"performance it is important to use as few registers as possible, so they \"\n\"won't have to be saved and reloaded around the inline assembly block. To \"\n\"achieve this Rust provides a `lateout` specifier. This can be used on any \"\n\"output that is written only after all inputs have been consumed. There is \"\n\"also an `inlateout` variant of this specifier.\"\nmsgstr \"\"\n\"Rustコンパイラはオペランドの割り当てに保守的です。`out`はいつでも書き込めるの\"\n\"で、他の引数とは場所を共有できません。しかし、最適なパフォーマンスを保証する\"\n\"ためには、できるだけ少ないレジスタを使うことが重要です。そうすることで、イン\"\n\"ラインアセンブリブロックの前後でレジスタを保存したり再読み込みしたりする必要\"\n\"がありません。これを達成するために、Rustは`lateout`指定子を提供します。全ての\"\n\"入力が消費された後でのみ書き込まれる出力に利用できます。この指定子には\"\n\"`inlateout`という変化形もあります。\"\n\n#: src/unsafe/asm.md:145\nmsgid \"\"\n\"Here is an example where `inlateout` _cannot_ be used in `release` mode or \"\n\"other optimized cases:\"\nmsgstr \"\"\n\"以下は、`release`モードやその他の最適化された場合に、`inlateout`を利用 *でき\"\n\"ない* 例です。\"\n\n#: src/unsafe/asm.md:156 src/unsafe/asm.md:180 src/unsafe/asm.md:463\nmsgid \"\\\"add {0}, {1}\\\"\"\nmsgstr \"\\\"add {0}, {1}\\\"\"\n\n#: src/unsafe/asm.md:157\nmsgid \"\\\"add {0}, {2}\\\"\"\nmsgstr \"\\\"add {0}, {2}\\\"\"\n\n#: src/unsafe/asm.md:167\nmsgid \"\"\n\"In unoptimized cases (e.g. `Debug` mode), replacing `inout(reg) a` with \"\n\"`inlateout(reg) a` in the above example can continue to give the expected \"\n\"result. However, with `release` mode or other optimized cases, using \"\n\"`inlateout(reg) a` can instead lead to the final value `a = 16`, causing the \"\n\"assertion to fail.\"\nmsgstr \"\"\n\n#: src/unsafe/asm.md:169\nmsgid \"\"\n\"This is because in optimized cases, the compiler is free to allocate the \"\n\"same register for inputs `b` and `c` since it knows that they have the same \"\n\"value. Furthermore, when `inlateout` is used, `a` and `c` could be allocated \"\n\"to the same register, in which case the first `add` instruction would \"\n\"overwrite the initial load from variable `c`. This is in contrast to how \"\n\"using `inout(reg) a` ensures a separate register is allocated for `a`.\"\nmsgstr \"\"\n\"というのも、最適化されている場合、コンパイラは`b`と`c`が同じ値だと知っている\"\n\"ので、`b`と`c`の入力に同じレジスタを割り当てる場合があります。もし`inlateout`\"\n\"が使われていたら、`a`と`c`に同じレジスタが割り当てられ、最初の`add`命令によっ\"\n\"て`c`の値が上書きされるでしょう。`inout(reg) a`の使用により`a`に対する独立し\"\n\"たレジスタ割り当てが保証されるのとは対照的です。\"\n\n#: src/unsafe/asm.md:171\nmsgid \"\"\n\"However, the following example can use `inlateout` since the output is only \"\n\"modified after all input registers have been read:\"\nmsgstr \"\"\n\"しかし、次の例では、全ての入力レジスタが読み込まれた後でのみ出力が変更される\"\n\"ので、`inlateout`を利用できます。\"\n\n#: src/unsafe/asm.md:186\nmsgid \"\"\n\"As you can see, this assembly fragment will still work correctly if `a` and \"\n\"`b` are assigned to the same register.\"\nmsgstr \"\"\n\"このアセンブリコードは、`a`と`b`が同じレジスタに割り当てられても、正しく動作\"\n\"します。\"\n\n#: src/unsafe/asm.md:188\nmsgid \"Explicit register operands\"\nmsgstr \"明示的なレジスタオペランド\"\n\n#: src/unsafe/asm.md:190\nmsgid \"\"\n\"Some instructions require that the operands be in a specific register. \"\n\"Therefore, Rust inline assembly provides some more specific constraint \"\n\"specifiers. While `reg` is generally available on any architecture, explicit \"\n\"registers are highly architecture specific. E.g. for x86 the general purpose \"\n\"registers `eax`, `ebx`, `ecx`, `edx`, `ebp`, `esi`, and `edi` among others \"\n\"can be addressed by their name.\"\nmsgstr \"\"\n\"いくつかの命令では、オペランドが特定のレジスタにある必要があります。したがっ\"\n\"て、Rustのインラインアセンブリでは、より具体的な制約指定子を提供しています。\"\n\"`reg`は一般的にどのアーキテクチャでも利用可能ですが、明示的レジスタはアーキテ\"\n\"クチャに強く依存しています。たとえば、x86の汎用レジスタである`eax`、`ebx`、\"\n\"`ecx`、`edx`、`ebp`、`esi`、`edi`などは、その名前で指定できます。\"\n\n#: src/unsafe/asm.md:200\nmsgid \"\\\"out 0x64, eax\\\"\"\nmsgstr \"\\\"out 0x64, eax\\\"\"\n\n#: src/unsafe/asm.md:200 src/unsafe/asm.md:276\nmsgid \"\\\"eax\\\"\"\nmsgstr \"\\\"eax\\\"\"\n\n#: src/unsafe/asm.md:205\nmsgid \"\"\n\"In this example we call the `out` instruction to output the content of the \"\n\"`cmd` variable to port `0x64`. Since the `out` instruction only accepts \"\n\"`eax` (and its sub registers) as operand we had to use the `eax` constraint \"\n\"specifier.\"\nmsgstr \"\"\n\"この例では、`out`命令を呼び出して、`cmd`変数の中身を`0x64`ポートに出力してい\"\n\"ます。`out`命令は`eax`とそのサブレジスタのみをオペランドとして受け取るため、\"\n\"`eax`の制約指定子を使わなければなりません。\"\n\n#: src/unsafe/asm.md:207\nmsgid \"\"\n\"**Note**: unlike other operand types, explicit register operands cannot be \"\n\"used in the template string: you can't use `{}` and should write the \"\n\"register name directly instead. Also, they must appear at the end of the \"\n\"operand list after all other operand types.\"\nmsgstr \"\"\n\"**注意**: 他のオペランドタイプと異なり、明示的なレジスタオペランドはテンプ\"\n\"レート文字列中で利用できません。`{}`を使えないので、レジスタの名前を直接書く\"\n\"必要があります。また、オペランドのリストの中で他のオペランドタイプの一番最後\"\n\"に置かれなくてはなりません。\"\n\n#: src/unsafe/asm.md:209\nmsgid \"Consider this example which uses the x86 `mul` instruction:\"\nmsgstr \"x86の`mul`命令を使った次の例を考えてみましょう。\"\n\n#: src/unsafe/asm.md:221\nmsgid \"\"\n\"// The x86 mul instruction takes rax as an implicit input and writes\\n\"\n\"            // the 128-bit result of the multiplication to rax:rdx.\\n\"\n\"            \\\"mul {}\\\"\"\nmsgstr \"\"\n\"// x86のmul命令はraxを暗黙的な入力に取り、\\n\"\n\"            // 128ビットの乗算結果をrax:rdxに書き込みます。\\n\"\n\"            \\\"mul {}\\\"\"\n\n#: src/unsafe/asm.md:225 src/unsafe/asm.md:347\nmsgid \"\\\"rax\\\"\"\nmsgstr \"\\\"rax\\\"\"\n\n#: src/unsafe/asm.md:226\nmsgid \"\\\"rdx\\\"\"\nmsgstr \"\\\"rdx\\\"\"\n\n#: src/unsafe/asm.md:235\nmsgid \"\"\n\"This uses the `mul` instruction to multiply two 64-bit inputs with a 128-bit \"\n\"result. The only explicit operand is a register, that we fill from the \"\n\"variable `a`. The second operand is implicit, and must be the `rax` \"\n\"register, which we fill from the variable `b`. The lower 64 bits of the \"\n\"result are stored in `rax` from which we fill the variable `lo`. The higher \"\n\"64 bits are stored in `rdx` from which we fill the variable `hi`.\"\nmsgstr \"\"\n\"`mul`命令を使って2つの64ビットの入力を128ビットの結果に出力しています。唯一の\"\n\"明示的なオペランドはレジスタで、変数`a`から入力します。2つ目のオペランドは暗\"\n\"黙的であり、`rax`レジスタである必要があります。変数`b`から`rax`レジスタに入力\"\n\"します。計算結果の下位64ビットは`rax`レジスタに保存され、そこから変数`lo`に出\"\n\"力されます。上位64ビットは`rdx`レジスタに保存され、そこから変数`hi`に出力され\"\n\"ます。\"\n\n#: src/unsafe/asm.md:241\nmsgid \"Clobbered registers\"\nmsgstr \"クロバーレジスタ\"\n\n#: src/unsafe/asm.md:243\nmsgid \"\"\n\"In many cases inline assembly will modify state that is not needed as an \"\n\"output. Usually this is either because we have to use a scratch register in \"\n\"the assembly or because instructions modify state that we don't need to \"\n\"further examine. This state is generally referred to as being \\\"clobbered\\\". \"\n\"We need to tell the compiler about this since it may need to save and \"\n\"restore this state around the inline assembly block.\"\nmsgstr \"\"\n\"多くの場合、インラインアセンブリは出力として必要のない状態を変更することがあ\"\n\"ります。これは普通、アセンブリでスクラッチレジスタを利用する必要があったり、\"\n\"私たちがこれ以上必要としていない状態を命令が変更したりするためです。この状態\"\n\"を一般的に\\\"クロバー\\\"（訳注：上書き）と呼びます。私たちはコンパイラにこのこ\"\n\"とを伝える必要があります。なぜならコンパイラは、インラインアセンブリブロック\"\n\"の前後で、この状態を保存して復元しなくてはならない可能性があるからです。\"\n\n#: src/unsafe/asm.md:253\nmsgid \"// three entries of four bytes each\\n\"\nmsgstr \"// 4バイトのエントリー3つ\\n\"\n\n#: src/unsafe/asm.md:255\nmsgid \"\"\n\"// String is stored as ascii in ebx, edx, ecx in order\\n\"\n\"    // Because ebx is reserved, the asm needs to preserve the value of it.\\n\"\n\"    // So we push and pop it around the main asm.\\n\"\n\"    // 64 bit mode on 64 bit processors does not allow pushing/popping of\\n\"\n\"    // 32 bit registers (like ebx), so we have to use the extended rbx \"\n\"register instead.\\n\"\nmsgstr \"\"\n\"// 文字列はasciiとしてebx, edx, ecxの順に保存されています。\\n\"\n\"    // ebxは予約されているので、アセンブリはebxの値を維持する必要がありま\"\n\"す。\\n\"\n\"    // 従ってメインのアセンブリの前後でプッシュおよびポップを行います。\\n\"\n\"    // （以下は64ビットプロセッサの64ビットモードの場合。32ビットプロセッサは\"\n\"ebxを利用します。）\\n\"\n\n#: src/unsafe/asm.md:263\nmsgid \"\\\"push rbx\\\"\"\nmsgstr \"\\\"push rbx\\\"\"\n\n#: src/unsafe/asm.md:264\nmsgid \"\\\"cpuid\\\"\"\nmsgstr \"\\\"cpuid\\\"\"\n\n#: src/unsafe/asm.md:265\nmsgid \"\\\"mov [rdi], ebx\\\"\"\nmsgstr \"\\\"mov [rdi], ebx\\\"\"\n\n#: src/unsafe/asm.md:266\nmsgid \"\\\"mov [rdi + 4], edx\\\"\"\nmsgstr \"\\\"mov [rdi + 4], edx\\\"\"\n\n#: src/unsafe/asm.md:267\nmsgid \"\\\"mov [rdi + 8], ecx\\\"\"\nmsgstr \"\\\"mov [rdi + 8], ecx\\\"\"\n\n#: src/unsafe/asm.md:268\nmsgid \"\\\"pop rbx\\\"\"\nmsgstr \"\\\"pop rbx\\\"\"\n\n#: src/unsafe/asm.md:269\nmsgid \"\"\n\"// We use a pointer to an array for storing the values to simplify\\n\"\n\"            // the Rust code at the cost of a couple more asm instructions\\n\"\n\"            // This is more explicit with how the asm works however, as \"\n\"opposed\\n\"\n\"            // to explicit register outputs such as `out(\\\"ecx\\\") val`\\n\"\n\"            // The *pointer itself* is only an input even though it's \"\n\"written behind\\n\"\nmsgstr \"\"\n\"// いくつかのアセンブリ命令を追加してRustのコードを単純化するために\\n\"\n\"            // 値を格納する配列へのポインタを利用します。\\n\"\n\"            // しかし、`out(\\\"ecx\\\") val`のような明示的なレジスタの出力とは違\"\n\"い、\\n\"\n\"            // アセンブリの動作をより明示的にします。\\n\"\n\"            // *ポインタそのもの* は後ろに書かれていても入力にすぎません。\\n\"\n\n#: src/unsafe/asm.md:274 src/unsafe/asm.md:345\nmsgid \"\\\"rdi\\\"\"\nmsgstr \"\\\"rdi\\\"\"\n\n#: src/unsafe/asm.md:275\nmsgid \"// select cpuid 0, also specify eax as clobbered\\n\"\nmsgstr \"// cpuid 0を選択し、eaxをクロバーに指定します。\\n\"\n\n#: src/unsafe/asm.md:277\nmsgid \"// cpuid clobbers these registers too\\n\"\nmsgstr \"// cpuidは以下のレジスタもクロバーします。\\n\"\n\n#: src/unsafe/asm.md:278\nmsgid \"\\\"ecx\\\"\"\nmsgstr \"\\\"ecx\\\"\"\n\n#: src/unsafe/asm.md:279\nmsgid \"\\\"edx\\\"\"\nmsgstr \"\\\"edx\\\"\"\n\n#: src/unsafe/asm.md:284\nmsgid \"\\\"CPU Manufacturer ID: {}\\\"\"\nmsgstr \"\\\"CPU Manufacturer ID: {}\\\"\"\n\n#: src/unsafe/asm.md:291\nmsgid \"\"\n\"In the example above we use the `cpuid` instruction to read the CPU \"\n\"manufacturer ID. This instruction writes to `eax` with the maximum supported \"\n\"`cpuid` argument and `ebx`, `edx`, and `ecx` with the CPU manufacturer ID as \"\n\"ASCII bytes in that order.\"\nmsgstr \"\"\n\"上の例では、`cpuid`命令を使い、CPUベンタIDを読み込んでいます。この命令は`eax`\"\n\"にサポートされている最大の`cpuid`引数を書き込み、`ebx`、`edx`、`ecx`の順にCPU\"\n\"ベンダIDをASCIIコードとして書き込みます。\"\n\n#: src/unsafe/asm.md:294\nmsgid \"\"\n\"Even though `eax` is never read we still need to tell the compiler that the \"\n\"register has been modified so that the compiler can save any values that \"\n\"were in these registers before the asm. This is done by declaring it as an \"\n\"output but with `_` instead of a variable name, which indicates that the \"\n\"output value is to be discarded.\"\nmsgstr \"\"\n\"`eax`は読み込まれることはありません。しかし、コンパイラがアセンブリ以前にこれ\"\n\"らのレジスタにあった値を保存できるように、レジスタが変更されたことをコンパイ\"\n\"ラに伝える必要があります。そのために、変数名の代わりに`_`を用いて出力を宣言\"\n\"し、出力の値が破棄されるということを示しています。\"\n\n#: src/unsafe/asm.md:296\nmsgid \"\"\n\"This code also works around the limitation that `ebx` is a reserved register \"\n\"by LLVM. That means that LLVM assumes that it has full control over the \"\n\"register and it must be restored to its original state before exiting the \"\n\"asm block, so it cannot be used as an input or output **except** if the \"\n\"compiler uses it to fulfill a general register class (e.g. `in(reg)`). This \"\n\"makes `reg` operands dangerous when using reserved registers as we could \"\n\"unknowingly corrupt our input or output because they share the same register.\"\nmsgstr \"\"\n\"このコードは`ebx`がLLVMによって予約されたレジスタであるという制約を回避してい\"\n\"ます。LLVMは、自身がレジスタを完全にコントロールし、アセンブリブロックを抜け\"\n\"る前に元の状態を復元しなくてはならないと考えています。そのため、コンパイラが\"\n\"`in(reg)`のような汎用レジスタクラスを満たすために使用する場合 **を除いて** \"\n\"`ebx`を入力や出力として利用できません。つまり、予約されたレジスタを利用する場\"\n\"合に、`reg`オペランドは危険なのです。入力と出力が同じレジスタを共有しているの\"\n\"で、知らないうちに入力や出力を破壊してしまうかもしれません。\"\n\n#: src/unsafe/asm.md:298\nmsgid \"\"\n\"To work around this we use `rdi` to store the pointer to the output array, \"\n\"save `ebx` via `push`, read from `ebx` inside the asm block into the array \"\n\"and then restore `ebx` to its original state via `pop`. The `push` and `pop` \"\n\"use the full 64-bit `rbx` version of the register to ensure that the entire \"\n\"register is saved. On 32 bit targets the code would instead use `ebx` in the \"\n\"`push`/`pop`.\"\nmsgstr \"\"\n\"これを回避するために、`rdi`を用いて出力の配列へのポインタを保管し、`push`で\"\n\"`ebx`を保存し、アセンブリブロック内で`ebx`から読み込んで配列に書き込み、`pop`\"\n\"で`ebx`を元の状態に戻しています。`push`と`pop`は完全な64ビットの`rbx`レジスタ\"\n\"を使って、レジスタ全体を確実に保存しています。32ビットの場合、`push`と`pop`に\"\n\"おいて`ebx`がかわりに利用されるでしょう。\"\n\n#: src/unsafe/asm.md:300\nmsgid \"\"\n\"This can also be used with a general register class to obtain a scratch \"\n\"register for use inside the asm code:\"\nmsgstr \"\"\n\"アセンブリコード内部で利用するスクラッチレジスタを獲得するために、汎用レジス\"\n\"タクラスとともに使用することもできます。\"\n\n#: src/unsafe/asm.md:305\nmsgid \"// Multiply x by 6 using shifts and adds\\n\"\nmsgstr \"// シフト演算と加算を利用してxに6をかけます。\\n\"\n\n#: src/unsafe/asm.md:310\nmsgid \"\\\"mov {tmp}, {x}\\\"\"\nmsgstr \"\\\"mov {tmp}, {x}\\\"\"\n\n#: src/unsafe/asm.md:311\nmsgid \"\\\"shl {tmp}, 1\\\"\"\nmsgstr \"\\\"shl {tmp}, 1\\\"\"\n\n#: src/unsafe/asm.md:312\nmsgid \"\\\"shl {x}, 2\\\"\"\nmsgstr \"\\\"shl {x}, 2\\\"\"\n\n#: src/unsafe/asm.md:313\nmsgid \"\\\"add {x}, {tmp}\\\"\"\nmsgstr \"\\\"add {x}, {tmp}\\\"\"\n\n#: src/unsafe/asm.md:322\nmsgid \"Symbol operands and ABI clobbers\"\nmsgstr \"シンボル・オペランドとABIクロバー\"\n\n#: src/unsafe/asm.md:324\nmsgid \"\"\n\"By default, `asm!` assumes that any register not specified as an output will \"\n\"have its contents preserved by the assembly code. The [`clobber_abi`]\"\n\"(https://doc.rust-lang.org/stable/reference/inline-assembly.html#abi-\"\n\"clobbers) argument to `asm!` tells the compiler to automatically insert the \"\n\"necessary clobber operands according to the given calling convention ABI: \"\n\"any register which is not fully preserved in that ABI will be treated as \"\n\"clobbered.  Multiple `clobber_abi` arguments may be provided and all \"\n\"clobbers from all specified ABIs will be inserted.\"\nmsgstr \"\"\n\"デフォルトでは、`asm!`は、出力として指定されていないレジスタはアセンブリコー\"\n\"ドによって中身が維持される、と考えます。`asm!`に渡される[`clobber_abi`]\"\n\"(https://doc.rust-lang.org/stable/reference/inline-assembly.html#abi-\"\n\"clobbers)引数は、与えられた呼び出し規約のABIに従って、必要なクロバーオペラン\"\n\"ドを自動的に挿入するようコンパイラに伝えます。そのABIで完全に保存されていない\"\n\"レジスタは、クロバーとして扱われます。複数の `clobber_abi` 引数を指定すると、\"\n\"指定されたすべてのABIのクロバーが挿入されます。\"\n\n#: src/unsafe/asm.md:332 src/unsafe/asm.md:350\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe/asm.md:333\nmsgid \"\\\"arg = {}\\\"\"\nmsgstr \"\\\"arg = {}\\\"\"\n\n#: src/unsafe/asm.md:341\nmsgid \"\\\"call {}\\\"\"\nmsgstr \"\\\"call {}\\\"\"\n\n#: src/unsafe/asm.md:342\nmsgid \"// Function pointer to call\\n\"\nmsgstr \"// 呼び出す関数ポインタ\\n\"\n\n#: src/unsafe/asm.md:344\nmsgid \"// 1st argument in rdi\\n\"\nmsgstr \"// 最初の引数はrdiにあります。\\n\"\n\n#: src/unsafe/asm.md:346\nmsgid \"// Return value in rax\\n\"\nmsgstr \"// 戻り値はraxにあります。\\n\"\n\n#: src/unsafe/asm.md:348\nmsgid \"\"\n\"// Mark all registers which are not preserved by the \\\"C\\\" calling\\n\"\n\"            // convention as clobbered.\\n\"\nmsgstr \"\"\n\"// \\\"C\\\"の呼び出し規約で保存されていないすべてのレジスタをクロバーに指定。\\n\"\n\n#: src/unsafe/asm.md:358\nmsgid \"Register template modifiers\"\nmsgstr \"レジスタテンプレート修飾子\"\n\n#: src/unsafe/asm.md:360\nmsgid \"\"\n\"In some cases, fine control is needed over the way a register name is \"\n\"formatted when inserted into the template string. This is needed when an \"\n\"architecture's assembly language has several names for the same register, \"\n\"each typically being a \\\"view\\\" over a subset of the register (e.g. the low \"\n\"32 bits of a 64-bit register).\"\nmsgstr \"\"\n\"テンプレート文字列に挿入されるレジスタの名前のフォーマット方法について、細か\"\n\"い制御が必要な場合があります。アーキテクチャのアセンブリ言語が、同じレジスタ\"\n\"に別名を持っている場合です。典型的な例としては、レジスタの部分集合に対する\"\n\"\\\"ビュー\\\"があります（例：64ビットレジスタの下位32ビット）。\"\n\n#: src/unsafe/asm.md:362\nmsgid \"\"\n\"By default the compiler will always choose the name that refers to the full \"\n\"register size (e.g. `rax` on x86-64, `eax` on x86, etc).\"\nmsgstr \"\"\n\"デフォルトでは、コンパイラは常に完全なレジスタサイズの名前を選択します（例：\"\n\"x86-64では`rax`、x86では`eax`、など）。\"\n\n#: src/unsafe/asm.md:364\nmsgid \"\"\n\"This default can be overridden by using modifiers on the template string \"\n\"operands, just like you would with format strings:\"\nmsgstr \"\"\n\"この挙動は、フォーマット文字列と同じように、テンプレート文字列のオペランドに\"\n\"修飾子を利用することで上書きできます。\"\n\n#: src/unsafe/asm.md:373\nmsgid \"\\\"mov {0:h}, {0:l}\\\"\"\nmsgstr \"\\\"mov {0:h}, {0:l}\\\"\"\n\n#: src/unsafe/asm.md:380\nmsgid \"\"\n\"In this example, we use the `reg_abcd` register class to restrict the \"\n\"register allocator to the 4 legacy x86 registers (`ax`, `bx`, `cx`, `dx`) of \"\n\"which the first two bytes can be addressed independently.\"\nmsgstr \"\"\n\"この例では、`reg_abcd`レジスタクラスを用いて、レジスタアロケータを4つのレガ\"\n\"シーなx86レジスタ（`ax`, `bx`, `cx`, `dx`）に制限しています。このうち最初の2\"\n\"バイトは独立して指定できます。\"\n\n#: src/unsafe/asm.md:382\nmsgid \"\"\n\"Let us assume that the register allocator has chosen to allocate `x` in the \"\n\"`ax` register. The `h` modifier will emit the register name for the high \"\n\"byte of that register and the `l` modifier will emit the register name for \"\n\"the low byte. The asm code will therefore be expanded as `mov ah, al` which \"\n\"copies the low byte of the value into the high byte.\"\nmsgstr \"\"\n\"レジスタアロケータが`x`を`ax`レジスタに割り当てることにしたと仮定しましょう。\"\n\"`h`修飾子はそのレジスタの上位バイトのレジスタ名を出力し、`l`修飾子は下位バイ\"\n\"トのレジスタ名を出力します。したがって、このアセンブリコードは`mov ah, al`に\"\n\"展開され、値の下位バイトを上位バイトにコピーします。\"\n\n#: src/unsafe/asm.md:385\nmsgid \"\"\n\"If you use a smaller data type (e.g. `u16`) with an operand and forget to \"\n\"use template modifiers, the compiler will emit a warning and suggest the \"\n\"correct modifier to use.\"\nmsgstr \"\"\n\"より小さなデータ型（例：`u16`）をオペランドに利用し、テンプレート修飾子を使い\"\n\"忘れた場合、コンパイラは警告を出力し、正しい修飾子を提案してくれます。\"\n\n#: src/unsafe/asm.md:387\nmsgid \"Memory address operands\"\nmsgstr \"メモリアドレスオペランド\"\n\n#: src/unsafe/asm.md:389\nmsgid \"\"\n\"Sometimes assembly instructions require operands passed via memory addresses/\"\n\"memory locations. You have to manually use the memory address syntax \"\n\"specified by the target architecture. For example, on x86/x86_64 using Intel \"\n\"assembly syntax, you should wrap inputs/outputs in `[]` to indicate they are \"\n\"memory operands:\"\nmsgstr \"\"\n\"アセンブリ命令はオペランドがメモリアドレスやメモリロケーション経由で渡される\"\n\"必要なこともあります。そのときは手動で、ターゲットのアーキテクチャによって指\"\n\"定されたメモリアドレスのシンタックスを利用しなくてはなりません。例えば、Intel\"\n\"のアセンブリシンタックスを使うx86/x86_64の場合、入出力を`[]`で囲んで、メモリ\"\n\"オペランドであることを示さなくてはなりません。\"\n\n#: src/unsafe/asm.md:399\nmsgid \"\\\"fldcw [{}]\\\"\"\nmsgstr \"\\\"fldcw [{}]\\\"\"\n\n#: src/unsafe/asm.md:405\nmsgid \"Labels\"\nmsgstr \"ラベル\"\n\n#: src/unsafe/asm.md:407\nmsgid \"\"\n\"Any reuse of a named label, local or otherwise, can result in an assembler \"\n\"or linker error or may cause other strange behavior. Reuse of a named label \"\n\"can happen in a variety of ways including:\"\nmsgstr \"\"\n\"名前つきラベルの再利用は、ローカルかそうでないかに関わらず、アセンブラやリン\"\n\"カのエラーを引き起こしたり、変な挙動の原因となります。名前つきラベルの再利用\"\n\"は以下のようなケースがあります。\"\n\n#: src/unsafe/asm.md:409\nmsgid \"\"\n\"explicitly: using a label more than once in one `asm!` block, or multiple \"\n\"times across blocks.\"\nmsgstr \"\"\n\"明示的再利用：同じラベルを1つの`asm!`ブロック中で、または複数のブロック中で2\"\n\"回以上利用する場合です。\"\n\n#: src/unsafe/asm.md:410\nmsgid \"\"\n\"implicitly via inlining: the compiler is allowed to instantiate multiple \"\n\"copies of an `asm!` block, for example when the function containing it is \"\n\"inlined in multiple places.\"\nmsgstr \"\"\n\"インライン化による暗黙の再利用：コンパイラは`asm!`ブロックの複数のコピーをイ\"\n\"ンスタンス化する場合があります。例えば、`asm!`ブロックを含む関数が複数箇所で\"\n\"インライン化される場合です。\"\n\n#: src/unsafe/asm.md:411\nmsgid \"\"\n\"implicitly via LTO: LTO can cause code from _other crates_ to be placed in \"\n\"the same codegen unit, and so could bring in arbitrary labels.\"\nmsgstr \"\"\n\"LTO（訳注：Link Time Optimizationの略）による暗黙の再利用：LTOは *他のクレー\"\n\"ト* のコードを同じコード生成単位に配置するため、同じ名前のラベルを持ち込む場\"\n\"合があります。\"\n\n#: src/unsafe/asm.md:413\nmsgid \"\"\n\"As a consequence, you should only use GNU assembler **numeric** [local \"\n\"labels](https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-\"\n\"Labels) inside inline assembly code. Defining symbols in assembly code may \"\n\"lead to assembler and/or linker errors due to duplicate symbol definitions.\"\nmsgstr \"\"\n\"そのため、インラインアセンブリコードの中では、GNUアセンブラの **数値型**[ロー\"\n\"カルラベル](https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-\"\n\"Labels)のみ使用してください。アセンブリコード内でシンボルを定義すると、シンボ\"\n\"ル定義の重複により、アセンブラやリンカのエラーが発生する可能性があります。\"\n\n#: src/unsafe/asm.md:415\nmsgid \"\"\n\"Moreover, on x86 when using the default Intel syntax, due to [an LLVM bug]\"\n\"(https://bugs.llvm.org/show_bug.cgi?id=36144), you shouldn't use labels \"\n\"exclusively made of `0` and `1` digits, e.g. `0`, `11` or `101010`, as they \"\n\"may end up being interpreted as binary values. Using `options(att_syntax)` \"\n\"will avoid any ambiguity, but that affects the syntax of the _entire_ `asm!` \"\n\"block. (See [Options](#options), below, for more on `options`.)\"\nmsgstr \"\"\n\"さらに、x86でデフォルトのIntel構文を使用する場合、[LLVMのバグ](https://bugs.\"\n\"llvm.org/show_bug.cgi?id=36144)によって、`0`、`11`、`101010`といった`0`と`1`\"\n\"だけで構成されたラベルは、バイナリ値として解釈されてしまうため、使用してはい\"\n\"けません。`options(att_syntax)`を使うと曖昧さを避けられますが、`asm!`ブロッ\"\n\"ク _全体_ の構文に影響します。（`options`については、後述の[オプション]\"\n\"(#options)を参照してください。）\"\n\n#: src/unsafe/asm.md:424\nmsgid \"\\\"mov {0}, 10\\\"\"\nmsgstr \"\\\"mov {0}, 10\\\"\"\n\n#: src/unsafe/asm.md:425 src/unsafe/asm.md:430\nmsgid \"\\\"2:\\\"\"\nmsgstr \"\\\"2:\\\"\"\n\n#: src/unsafe/asm.md:426\nmsgid \"\\\"sub {0}, 1\\\"\"\nmsgstr \"\\\"sub {0}, 1\\\"\"\n\n#: src/unsafe/asm.md:427\nmsgid \"\\\"cmp {0}, 3\\\"\"\nmsgstr \"\\\"cmp {0}, 3\\\"\"\n\n#: src/unsafe/asm.md:428\nmsgid \"\\\"jle 2f\\\"\"\nmsgstr \"\\\"jle 2f\\\"\"\n\n#: src/unsafe/asm.md:429\nmsgid \"\\\"jmp 2b\\\"\"\nmsgstr \"\\\"jmp 2b\\\"\"\n\n#: src/unsafe/asm.md:431\nmsgid \"\\\"add {0}, 2\\\"\"\nmsgstr \"\\\"add {0}, 2\\\"\"\n\n#: src/unsafe/asm.md:439\nmsgid \"\"\n\"This will decrement the `{0}` register value from 10 to 3, then add 2 and \"\n\"store it in `a`.\"\nmsgstr \"\"\n\"このコードは、`{0}`のレジスタの値を10から3にデクリメントし、2を加え、`a`にそ\"\n\"の値を保存します。\"\n\n#: src/unsafe/asm.md:441\nmsgid \"This example shows a few things:\"\nmsgstr \"この例は、以下のことを示しています。\"\n\n#: src/unsafe/asm.md:443\nmsgid \"\"\n\"First, that the same number can be used as a label multiple times in the \"\n\"same inline block.\"\nmsgstr \"\"\n\"まず、ラベルとして同じ数字を複数回、同じインラインブロックで利用できます。\"\n\n#: src/unsafe/asm.md:444\nmsgid \"\"\n\"Second, that when a numeric label is used as a reference (as an instruction \"\n\"operand, for example), the suffixes “b” (“backward”) or ”f” (“forward”) \"\n\"should be added to the numeric label. It will then refer to the nearest \"\n\"label defined by this number in this direction.\"\nmsgstr \"\"\n\"つぎに、数字のラベルが参照として(例えば、命令のオペランドに)利用された場\"\n\"合、\\\"b\\\"（\\\"後方\\\"）や\\\"f\\\"（\\\"前方\\\"）の接尾辞が数字のラベルに追加されなく\"\n\"てはなりません。そうすることで、この数字の指定された方向の最も近いラベルを参\"\n\"照できます。\"\n\n#: src/unsafe/asm.md:449\nmsgid \"Options\"\nmsgstr \"オプション\"\n\n#: src/unsafe/asm.md:451\nmsgid \"\"\n\"By default, an inline assembly block is treated the same way as an external \"\n\"FFI function call with a custom calling convention: it may read/write \"\n\"memory, have observable side effects, etc. However, in many cases it is \"\n\"desirable to give the compiler more information about what the assembly code \"\n\"is actually doing so that it can optimize better.\"\nmsgstr \"\"\n\"デフォルトでは、インラインアセンブリブロックは、カスタム呼び出し規約をもつ外\"\n\"部のFFI関数呼び出しと同じように扱われます:メモリを読み込んだり書き込んだり、\"\n\"観測可能な副作用を持っていたりするかもしれません。しかし、多くの場合、アセン\"\n\"ブリコードが実際に何をするかという情報を多く与えて、より最適化できる方が望ま\"\n\"しいでしょう。\"\n\n#: src/unsafe/asm.md:453\nmsgid \"Let's take our previous example of an `add` instruction:\"\nmsgstr \"先ほどの`add`命令の例を見てみましょう。\"\n\n#: src/unsafe/asm.md:472\nmsgid \"\"\n\"Options can be provided as an optional final argument to the `asm!` macro. \"\n\"We specified three options here:\"\nmsgstr \"\"\n\"オプションは`asm!`マクロの最後の任意引数として渡されます。ここでは3つのオプ\"\n\"ションを利用しました：\"\n\n#: src/unsafe/asm.md:473\nmsgid \"\"\n\"`pure` means that the asm code has no observable side effects and that its \"\n\"output depends only on its inputs. This allows the compiler optimizer to \"\n\"call the inline asm fewer times or even eliminate it entirely.\"\nmsgstr \"\"\n\"`pure`は、アセンブリコードが観測可能な副作用を持っておらず、出力は入力のみに\"\n\"依存することを意味します。これにより、コンパイラオプティマイザはインラインア\"\n\"センブリの呼び出し回数を減らしたり、インラインアセンブリを完全に削除したりで\"\n\"きます。\"\n\n#: src/unsafe/asm.md:474\nmsgid \"\"\n\"`nomem` means that the asm code does not read or write to memory. By default \"\n\"the compiler will assume that inline assembly can read or write any memory \"\n\"address that is accessible to it (e.g. through a pointer passed as an \"\n\"operand, or a global).\"\nmsgstr \"\"\n\"`nomem`は、アセンブリコードがメモリの読み書きをしないことを意味します。デフォ\"\n\"ルトでは、インラインアセンブリはアクセス可能なメモリアドレス（例えばオペラン\"\n\"ドとして渡されたポインタや、グローバルなど）の読み書きを行うとコンパイラは仮\"\n\"定しています。\"\n\n#: src/unsafe/asm.md:475\nmsgid \"\"\n\"`nostack` means that the asm code does not push any data onto the stack. \"\n\"This allows the compiler to use optimizations such as the stack red zone on \"\n\"x86-64 to avoid stack pointer adjustments.\"\nmsgstr \"\"\n\"`nostack`は、アセンブリコードがスタックにデータをプッシュしないことを意味しま\"\n\"す。これにより、コンパイラはx86-64のスタックレッドゾーンなどの最適化を利用\"\n\"し、スタックポインタの調整を避けることができます。\"\n\n#: src/unsafe/asm.md:477\nmsgid \"\"\n\"These allow the compiler to better optimize code using `asm!`, for example \"\n\"by eliminating pure `asm!` blocks whose outputs are not needed.\"\nmsgstr \"\"\n\"これにより、コンパイラは、出力が全く必要とされていない純粋な`asm!`ブロックを\"\n\"削除するなどして、`asm!`を使ったコードをより最適化できます。\"\n\n#: src/unsafe/asm.md:479\nmsgid \"\"\n\"See the [reference](https://doc.rust-lang.org/stable/reference/inline-\"\n\"assembly.html) for the full list of available options and their effects.\"\nmsgstr \"\"\n\"利用可能なオプションとその効果の一覧は[リファレンス](https://doc.rust-lang.\"\n\"org/stable/reference/inline-assembly.html)を参照してください。\"\n\n#: src/compatibility.md:3\nmsgid \"\"\n\"The Rust language is fastly evolving, and because of this certain \"\n\"compatibility issues can arise, despite efforts to ensure forwards-\"\n\"compatibility wherever possible.\"\nmsgstr \"\"\n\"Rust言語は急速に進化しており、可能な限り前方互換性を確保する努力にも関わら\"\n\"ず、特定の互換性の問題が生じることがあります。\"\n\n#: src/compatibility.md:7\nmsgid \"[Raw identifiers](compatibility/raw_identifiers.md)\"\nmsgstr \"[生識別子](compatibility/raw_identifiers.md)\"\n\n#: src/compatibility/raw_identifiers.md:3\nmsgid \"\"\n\"Rust, like many programming languages, has the concept of \\\"keywords\\\". \"\n\"These identifiers mean something to the language, and so you cannot use them \"\n\"in places like variable names, function names, and other places. Raw \"\n\"identifiers let you use keywords where they would not normally be allowed. \"\n\"This is particularly useful when Rust introduces new keywords, and a library \"\n\"using an older edition of Rust has a variable or function with the same name \"\n\"as a keyword introduced in a newer edition.\"\nmsgstr \"\"\n\"Rustは多くのプログラミング言語と同様に、「キーワード」の概念を持っています。\"\n\"これらの識別子は言語にとって何かしらの意味を持ちますので、変数名や関数名、そ\"\n\"の他の場所で使用することはできません。生識別子は、通常は許されない状況でキー\"\n\"ワードを使用することを可能にします。これは、新しいキーワードを導入したRust\"\n\"と、古いエディションのRustを使用したライブラリが同じ名前の変数や関数を持つ場\"\n\"合に特に便利です。\"\n\n#: src/compatibility/raw_identifiers.md:11\nmsgid \"\"\n\"For example, consider a crate `foo` compiled with the 2015 edition of Rust \"\n\"that exports a function named `try`. This keyword is reserved for a new \"\n\"feature in the 2018 edition, so without raw identifiers, we would have no \"\n\"way to name the function.\"\nmsgstr \"\"\n\"例えば、2015年エディションのRustでコンパイルされたクレート`foo`が`try`という\"\n\"名前の関数をエクスポートしているとします。このキーワードは2018年エディション\"\n\"で新機能として予約されていますので、生識別子がなければ、この関数を名付ける方\"\n\"法がありません。\"\n\n#: src/compatibility/raw_identifiers.md:24\nmsgid \"You'll get this error:\"\nmsgstr \"このエラーが出ます：\"\n\n#: src/compatibility/raw_identifiers.md:34\nmsgid \"You can write this with a raw identifier:\"\nmsgstr \"これは生識別子を使って書くことができます：\"\n\n#: src/meta.md:3\nmsgid \"\"\n\"Some topics aren't exactly relevant to how you program runs but provide you \"\n\"tooling or infrastructure support which just makes things better for \"\n\"everyone. These topics include:\"\nmsgstr \"\"\n\"この章では、プログラミングそれ自体に関係はないけれども、色々と人々の役に立つ\"\n\"機能やインフラについて説明していきます。例えば：\"\n\n#: src/meta.md:7\nmsgid \"\"\n\"[Documentation](meta/doc.md): Generate library documentation for users via \"\n\"the included `rustdoc`.\"\nmsgstr \"\"\n\"[ドキュメンテーション](meta/doc.md): Rust付属コマンド`rustdoc`を用いて、ライ\"\n\"ブラリのドキュメントを生成します。\"\n\n#: src/meta.md:9\nmsgid \"\"\n\"[Playground](meta/playground.md): Integrate the Rust Playground in your \"\n\"documentation.\"\nmsgstr \"\"\n\"[プレイグラウンド](meta/playground.md): あなたのドキュメンテーションにRust \"\n\"Playgroundを組み込めます。\"\n\n#: src/meta/doc.md:3\nmsgid \"\"\n\"Use `cargo doc` to build documentation in `target/doc`, `cargo doc --open` \"\n\"will automatically open it in your web browser.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:6\nmsgid \"\"\n\"Use `cargo test` to run all tests (including documentation tests), and \"\n\"`cargo test --doc` to only run documentation tests.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:9\nmsgid \"\"\n\"These commands will appropriately invoke `rustdoc` (and `rustc`) as required.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:11\nmsgid \"Doc comments\"\nmsgstr \"ドキュメンテーションコメント\"\n\n#: src/meta/doc.md:13\nmsgid \"\"\n\"Doc comments are very useful for big projects that require documentation. \"\n\"When running `rustdoc`, these are the comments that get compiled into \"\n\"documentation. They are denoted by a `///`, and support [Markdown](https://\"\n\"en.wikipedia.org/wiki/Markdown).\"\nmsgstr \"\"\n\"ドキュメンテーションコメントとは`rustdoc`を使用した際にドキュメントにコンパイ\"\n\"ルされるコメントのことです。`///`によって普通のコメントと区別され、ここでは\"\n\"[Markdown](https://en.wikipedia.org/wiki/Markdown)を使用することができます。\"\n\"ドキュメンテーションコメントは大規模なプロジェクトの際に非常に有用です。\"\n\n#: src/meta/doc.md:18\nmsgid \"\\\"doc\\\"\"\nmsgstr \"\\\"doc\\\"\"\n\n#: src/meta/doc.md:19\nmsgid \"/// A human being is represented here\\n\"\nmsgstr \"/// あらゆる人物はここに代表されます。\\n\"\n\n#: src/meta/doc.md:22\nmsgid \"/// A person must have a name, no matter how much Juliet may hate it\\n\"\nmsgstr \"\"\n\"/// ジュリエットがどんなに名前というものを嫌っていようと、\\n\"\n\"    /// 人物には名前が必要です。\\n\"\n\n#: src/meta/doc.md:27\nmsgid \"\"\n\"/// Creates a person with the given name.\\n\"\n\"    ///\\n\"\n\"    /// # Examples\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // You can have rust code between fences inside the comments\\n\"\n\"    /// // If you pass --test to `rustdoc`, it will even test it for you!\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\nmsgstr \"\"\n\"/// 与えられた名前を持つpersonを返します。\\n\"\n\"    ///\\n\"\n\"    /// # Examples\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // バッククォートによってRustのコードをコメント中に挟むこと\\n\"\n\"    /// // もできます。`rustdoc`に--testを渡せば、テストも行えます！\\n\"\n\"    /// // （訳注: pythonのdoctestと同じです。）\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\n\n#: src/meta/doc.md:43\nmsgid \"\"\n\"/// Gives a friendly hello!\\n\"\n\"    ///\\n\"\n\"    /// Says \\\"Hello, [name](Person::name)\\\" to the `Person` it is called \"\n\"on.\\n\"\nmsgstr \"\"\n\"/// フレンドリーに挨拶しましょう！\\n\"\n\"    ///\\n\"\n\"    /// このメソッドを呼び出した`Person`に対して\\n\"\n\"    /// \\\"Hello, [name](Person::name)\\\"と話しかけます。\\n\"\n\n#: src/meta/doc.md:47\nmsgid \"\\\"Hello, {}!\\\"\"\nmsgstr \"\\\"Hello, {}!\\\"\"\n\n#: src/meta/doc.md:52\nmsgid \"\\\"John\\\"\"\nmsgstr \"\\\"John\\\"\"\n\n#: src/meta/doc.md:58\nmsgid \"\"\n\"To run the tests, first build the code as a library, then tell `rustdoc` \"\n\"where to find the library so it can link it into each doctest program:\"\nmsgstr \"\"\n\n#: src/meta/doc.md:61\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\n\n#: src/meta/doc.md:66\nmsgid \"Doc attributes\"\nmsgstr \"\"\n\n#: src/meta/doc.md:68\nmsgid \"\"\n\"Below are a few examples of the most common `#[doc]` attributes used with \"\n\"`rustdoc`.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:71\nmsgid \"`inline`\"\nmsgstr \"`inline`\"\n\n#: src/meta/doc.md:73\nmsgid \"Used to inline docs, instead of linking out to separate page.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:78\nmsgid \"/// bar docs\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:81\nmsgid \"/// the docs for Bar\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:86\nmsgid \"`no_inline`\"\nmsgstr \"`no_inline`\"\n\n#: src/meta/doc.md:88\nmsgid \"Used to prevent linking out to separate page or anywhere.\"\nmsgstr \"\"\n\n#: src/meta/doc.md:91\nmsgid \"// Example from libcore/prelude\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:96\nmsgid \"`hidden`\"\nmsgstr \"`hidden`\"\n\n#: src/meta/doc.md:98\nmsgid \"Using this tells `rustdoc` not to include this in documentation:\"\nmsgstr \"\"\n\n#: src/meta/doc.md:101\nmsgid \"// Example from the futures-rs library\\n\"\nmsgstr \"\"\n\n#: src/meta/doc.md:106\nmsgid \"\"\n\"For documentation, `rustdoc` is widely used by the community. It's what is \"\n\"used to generate the [std library docs](https://doc.rust-lang.org/std/).\"\nmsgstr \"\"\n\n#: src/meta/doc.md:111\nmsgid \"\"\n\"[The Rust Book: Making Useful Documentation Comments](https://doc.rust-lang.\"\n\"org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-\"\n\"comments)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:112\nmsgid \"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/index.html)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:113\nmsgid \"\"\n\"[The Reference: Doc comments](https://doc.rust-lang.org/stable/reference/\"\n\"comments.html#doc-comments)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:114\nmsgid \"\"\n\"[RFC 1574: API Documentation Conventions](https://rust-lang.github.io/\"\n\"rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-\"\n\"conventions-text)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:115\nmsgid \"\"\n\"[RFC 1946: Relative links to other items from doc comments (intra-rustdoc \"\n\"links)](https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html)\"\nmsgstr \"\"\n\n#: src/meta/doc.md:116\nmsgid \"\"\n\"[Is there any documentation style guide for comments? (reddit)](https://www.\"\n\"reddit.com/r/rust/comments/ahb50s/\"\n\"is_there_any_documentation_style_guide_for/)\"\nmsgstr \"\"\n\n#: src/meta/playground.md:3\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) is a way to experiment \"\n\"with Rust code through a web interface.\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/)では、RustのコードをWebのイン\"\n\"ターフェースを通じて実験できます。\"\n\n#: src/meta/playground.md:6\nmsgid \"Using it with `mdbook`\"\nmsgstr \"`mdbook`と組み合わせる\"\n\n#: src/meta/playground.md:8\nmsgid \"\"\n\"In [`mdbook`](https://github.com/rust-lang/mdBook), you can make code \"\n\"examples playable and editable.\"\nmsgstr \"\"\n\"[`mdbook`](https://github.com/rust-lang/mdBook)では、コード例を実行・編集可能\"\n\"にできます。\"\n\n#: src/meta/playground.md:16\nmsgid \"\"\n\"This allows the reader to both run your code sample, but also modify and \"\n\"tweak it. The key here is the adding of the word `editable` to your \"\n\"codefence block separated by a comma.\"\nmsgstr \"\"\n\"これにより、読者はあなたのコード例を実行するだけでなく、変更することもできま\"\n\"す。`editable`という単語をカンマで区切って、あなたのコードブロックに追加する\"\n\"のがキーです。\"\n\n#: src/meta/playground.md:26\nmsgid \"\"\n\"Additionally, you can add `ignore` if you want `mdbook` to skip your code \"\n\"when it builds and tests.\"\nmsgstr \"\"\n\"加えて、`mdbook`がビルドやテストを実行するときに、あなたのコードをスキップさ\"\n\"せたい場合は、`ignore`を追加できます。\"\n\n#: src/meta/playground.md:35\nmsgid \"Using it with docs\"\nmsgstr \"ドキュメントと組み合わせる\"\n\n#: src/meta/playground.md:37\nmsgid \"\"\n\"You may have noticed in some of the [official Rust docs](https://doc.rust-\"\n\"lang.org/core/) a button that says \\\"Run\\\", which opens the code sample up \"\n\"in a new tab in Rust Playground. This feature is enabled if you use the \"\n\"`#[doc]` attribute called [`html_playground_url`](https://doc.rust-lang.org/\"\n\"rustdoc/write-documentation/the-doc-attribute.html#html_playground_url).\"\nmsgstr \"\"\n\"[Rustの公式ドキュメント](https://doc.rust-lang.org/core/)には、「実行(Run)」\"\n\"ボタンがある場合があります。クリックすると、新しいタブでRust Playgroundが開\"\n\"き、コード例が表示されます。この機能は、#[doc]アトリビュートの\"\n\"[`html_playground_url`](https://doc.rust-lang.org/rustdoc/write-\"\n\"documentation/the-doc-attribute.html#html_playground_url)の値で有効化できま\"\n\"す。\"\n\n#: src/meta/playground.md:42\nmsgid \"\"\n\"````\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\nmsgstr \"\"\n\"````\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\n\n#: src/meta/playground.md:51\nmsgid \"[The Rust Playground](https://play.rust-lang.org/)\"\nmsgstr \"\"\n\n#: src/meta/playground.md:52\nmsgid \"\"\n\"[The Rust Playground On Github](https://github.com/integer32llc/rust-\"\n\"playground/)\"\nmsgstr \"\"\n\n#: src/meta/playground.md:53\nmsgid \"\"\n\"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)\"\nmsgstr \"\"\n\n#~ msgid \"\"\n#~ \"Using the `Into` trait will typically require specification of the type \"\n#~ \"to convert into as the compiler is unable to determine this most of the \"\n#~ \"time. However this is a small trade-off considering we get the \"\n#~ \"functionality for free.\"\n#~ msgstr \"\"\n#~ \"`Into`トレイトを使用すると、ほとんどの場合、コンパイラが型を決定することが\"\n#~ \"できないため、変換する型を指定する必要があります。しかし、この機能を無料で\"\n#~ \"得られることを考えれば、これは小さなトレードオフです。\"\n\n#~ msgid \"\\\"Base 16 (hexadecimal): {:X}\\\"\"\n#~ msgstr \"\\\"Base 16 (hexadecimal): {:X}\\\"\"\n\n#~ msgid \"// 10F2C\\n\"\n#~ msgstr \"// 10F2C\\n\"\n\n#~ msgid \"\\\"The rich have lots of money!\\\"\"\n#~ msgstr \"\\\"The rich have lots of money!\\\"\"\n\n#~ msgid \"\\\"The poor have no money...\\\"\"\n#~ msgstr \"\\\"The poor have no money...\\\"\"\n\n#~ msgid \"\\\"Civilians work!\\\"\"\n#~ msgstr \"\\\"Civilians work!\\\"\"\n\n#~ msgid \"\\\"Soldiers fight!\\\"\"\n#~ msgstr \"\\\"Soldiers fight!\\\"\"\n\n#~ msgid \"\\\"Old enough {}\\\"\"\n#~ msgstr \"\\\"Old enough {}\\\"\"\n\n#~ msgid \"\\\"the quick brown fox jumped over the lazy dog\\\\n\\\"\"\n#~ msgstr \"\\\"the quick brown fox jumped over the lazy dog\\\\n\\\"\"\n"
  },
  {
    "path": "po/ko.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Rust By Example\\n\"\n\"POT-Creation-Date: 2026-01-13T13:46:42+09:00\\n\"\n\"PO-Revision-Date: 2026-01-13 13:46+0900\\n\"\n\"Last-Translator: ehottl <deepthought@postech.ac.kr>\\n\"\n\"Language-Team: Korean <translation-team-ko@googlegroups.com>\\n\"\n\"Language: ko\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: src/SUMMARY.md:1\nmsgid \"Summary\"\nmsgstr \"요약\"\n\n#: src/SUMMARY.md:3\nmsgid \"Introduction\"\nmsgstr \"소개\"\n\n#: src/SUMMARY.md:5 src/hello.md:1\nmsgid \"Hello World\"\nmsgstr \"Hello World\"\n\n#: src/SUMMARY.md:6 src/hello/comment.md:1\nmsgid \"Comments\"\nmsgstr \"주석\"\n\n#: src/SUMMARY.md:7 src/hello/print.md:1\nmsgid \"Formatted print\"\nmsgstr \"형식화된 출력\"\n\n#: src/SUMMARY.md:8 src/hello/print/print_debug.md:1\nmsgid \"Debug\"\nmsgstr \"디버그\"\n\n#: src/SUMMARY.md:9 src/hello/print/print_display.md:1\nmsgid \"Display\"\nmsgstr \"디스플레이\"\n\n#: src/SUMMARY.md:10 src/hello/print/print_display/testcase_list.md:1\nmsgid \"Testcase: List\"\nmsgstr \"테스트케이스: 리스트\"\n\n#: src/SUMMARY.md:11 src/hello/print/fmt.md:1\nmsgid \"Formatting\"\nmsgstr \"형식화\"\n\n#: src/SUMMARY.md:13 src/primitives.md:1\nmsgid \"Primitives\"\nmsgstr \"기본 자료형\"\n\n#: src/SUMMARY.md:14 src/primitives/literals.md:1\nmsgid \"Literals and operators\"\nmsgstr \"리터럴과 연산자\"\n\n#: src/SUMMARY.md:15 src/primitives/tuples.md:1\nmsgid \"Tuples\"\nmsgstr \"튜플\"\n\n#: src/SUMMARY.md:16 src/primitives/array.md:1\nmsgid \"Arrays and Slices\"\nmsgstr \"배열과 슬라이스\"\n\n#: src/SUMMARY.md:18 src/custom_types.md:1\nmsgid \"Custom Types\"\nmsgstr \"사용자 정의 타입\"\n\n#: src/SUMMARY.md:19 src/custom_types/structs.md:1\nmsgid \"Structures\"\nmsgstr \"구조체\"\n\n#: src/SUMMARY.md:20 src/custom_types/enum.md:1\nmsgid \"Enums\"\nmsgstr \"열거형\"\n\n#: src/SUMMARY.md:21 src/custom_types/enum/enum_use.md:1\nmsgid \"use\"\nmsgstr \"use\"\n\n#: src/SUMMARY.md:22 src/custom_types/enum/c_like.md:1\nmsgid \"C-like\"\nmsgstr \"C-like\"\n\n#: src/SUMMARY.md:23 src/custom_types/enum/testcase_linked_list.md:1\nmsgid \"Testcase: linked-list\"\nmsgstr \"테스트케이스: 연결 리스트\"\n\n#: src/SUMMARY.md:24 src/custom_types/constants.md:1\nmsgid \"constants\"\nmsgstr \"상수\"\n\n#: src/SUMMARY.md:26 src/variable_bindings.md:1\nmsgid \"Variable Bindings\"\nmsgstr \"변수 바인딩\"\n\n#: src/SUMMARY.md:27 src/SUMMARY.md:120 src/SUMMARY.md:123\n#: src/variable_bindings/mut.md:1 src/scope/move/mut.md:1\n#: src/scope/borrow/mut.md:1\nmsgid \"Mutability\"\nmsgstr \"가변성\"\n\n#: src/SUMMARY.md:28 src/variable_bindings/scope.md:1\nmsgid \"Scope and Shadowing\"\nmsgstr \"스코프와 섀도잉\"\n\n#: src/SUMMARY.md:29 src/variable_bindings/declare.md:1\nmsgid \"Declare first\"\nmsgstr \"선언 우선\"\n\n#: src/SUMMARY.md:30 src/variable_bindings/freeze.md:1\nmsgid \"Freezing\"\nmsgstr \"동결\"\n\n#: src/SUMMARY.md:32 src/types.md:1\nmsgid \"Types\"\nmsgstr \"타입\"\n\n#: src/SUMMARY.md:33 src/types/cast.md:1\nmsgid \"Casting\"\nmsgstr \"형변환\"\n\n#: src/SUMMARY.md:34 src/types/literals.md:1\nmsgid \"Literals\"\nmsgstr \"리터럴\"\n\n#: src/SUMMARY.md:35 src/types/inference.md:1\nmsgid \"Inference\"\nmsgstr \"추론\"\n\n#: src/SUMMARY.md:36 src/SUMMARY.md:124 src/types/alias.md:1\n#: src/scope/borrow/alias.md:1\nmsgid \"Aliasing\"\nmsgstr \"별칭\"\n\n#: src/SUMMARY.md:38 src/conversion.md:1\nmsgid \"Conversion\"\nmsgstr \"타입 변환\"\n\n#: src/SUMMARY.md:39 src/conversion/from_into.md:1\nmsgid \"`From` and `Into`\"\nmsgstr \"`From`과 `Into`\"\n\n#: src/SUMMARY.md:40 src/conversion/try_from_try_into.md:1\nmsgid \"`TryFrom` and `TryInto`\"\nmsgstr \"`TryFrom`과 `TryInto`\"\n\n#: src/SUMMARY.md:41\nmsgid \"To and from `String`s\"\nmsgstr \"`String` 변환\"\n\n#: src/SUMMARY.md:43 src/expression.md:1\nmsgid \"Expressions\"\nmsgstr \"표현식\"\n\n#: src/SUMMARY.md:45 src/flow_control.md:1\nmsgid \"Flow of Control\"\nmsgstr \"제어 흐름\"\n\n#: src/SUMMARY.md:46 src/flow_control/if_else.md:1\nmsgid \"if/else\"\nmsgstr \"if/else\"\n\n#: src/SUMMARY.md:47 src/flow_control/loop.md:1\nmsgid \"loop\"\nmsgstr \"loop\"\n\n#: src/SUMMARY.md:48 src/flow_control/loop/nested.md:1\nmsgid \"Nesting and labels\"\nmsgstr \"중첩과 레이블\"\n\n#: src/SUMMARY.md:49 src/flow_control/loop/return.md:1\nmsgid \"Returning from loops\"\nmsgstr \"반복문에서 리턴하기\"\n\n#: src/SUMMARY.md:50 src/flow_control/while.md:1\nmsgid \"while\"\nmsgstr \"while\"\n\n#: src/SUMMARY.md:51 src/flow_control/for.md:3\nmsgid \"for and range\"\nmsgstr \"for와 range\"\n\n#: src/SUMMARY.md:52 src/flow_control/match.md:1\nmsgid \"match\"\nmsgstr \"match\"\n\n#: src/SUMMARY.md:53 src/flow_control/match/destructuring.md:1\nmsgid \"Destructuring\"\nmsgstr \"구조 분해\"\n\n#: src/SUMMARY.md:54\n#: src/flow_control/match/destructuring/destructure_tuple.md:1\nmsgid \"tuples\"\nmsgstr \"튜플\"\n\n#: src/SUMMARY.md:55\n#: src/flow_control/match/destructuring/destructure_slice.md:1\nmsgid \"arrays/slices\"\nmsgstr \"배열/슬라이스\"\n\n#: src/SUMMARY.md:56 src/flow_control/match/destructuring/destructure_enum.md:1\nmsgid \"enums\"\nmsgstr \"열거형\"\n\n#: src/SUMMARY.md:57\n#: src/flow_control/match/destructuring/destructure_pointers.md:1\nmsgid \"pointers/ref\"\nmsgstr \"포인터/ref\"\n\n#: src/SUMMARY.md:58\n#: src/flow_control/match/destructuring/destructure_structures.md:1\nmsgid \"structs\"\nmsgstr \"구조체\"\n\n#: src/SUMMARY.md:59 src/flow_control/match/guard.md:1\nmsgid \"Guards\"\nmsgstr \"가드\"\n\n#: src/SUMMARY.md:60 src/flow_control/match/binding.md:1\nmsgid \"Binding\"\nmsgstr \"바인딩\"\n\n#: src/SUMMARY.md:61 src/flow_control/if_let.md:1\nmsgid \"if let\"\nmsgstr \"if let\"\n\n#: src/SUMMARY.md:62 src/flow_control/let_else.md:1\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/SUMMARY.md:63 src/flow_control/while_let.md:1\nmsgid \"while let\"\nmsgstr \"while let\"\n\n#: src/SUMMARY.md:65 src/SUMMARY.md:103 src/SUMMARY.md:128 src/fn.md:1\n#: src/generics/gen_fn.md:1 src/scope/lifetime/fn.md:1\nmsgid \"Functions\"\nmsgstr \"함수\"\n\n#: src/SUMMARY.md:66 src/SUMMARY.md:129 src/scope/lifetime/methods.md:1\nmsgid \"Methods\"\nmsgstr \"메서드\"\n\n#: src/SUMMARY.md:67 src/fn/closures.md:1\nmsgid \"Closures\"\nmsgstr \"클로저\"\n\n#: src/SUMMARY.md:68 src/fn/closures/capture.md:1\nmsgid \"Capturing\"\nmsgstr \"캡처\"\n\n#: src/SUMMARY.md:69 src/fn/closures/input_parameters.md:1\nmsgid \"As input parameters\"\nmsgstr \"입력 파라미터로 사용\"\n\n#: src/SUMMARY.md:70 src/fn/closures/anonymity.md:1\nmsgid \"Type anonymity\"\nmsgstr \"타입 익명성\"\n\n#: src/SUMMARY.md:71 src/fn/closures/input_functions.md:1\nmsgid \"Input functions\"\nmsgstr \"입력 함수\"\n\n#: src/SUMMARY.md:72 src/fn/closures/output_parameters.md:1\nmsgid \"As output parameters\"\nmsgstr \"출력 파라미터로 사용\"\n\n#: src/SUMMARY.md:73 src/fn/closures/closure_examples.md:1\nmsgid \"Examples in `std`\"\nmsgstr \"`std` 예제\"\n\n#: src/SUMMARY.md:74 src/fn/closures/closure_examples/iter_any.md:1\nmsgid \"Iterator::any\"\nmsgstr \"Iterator::any\"\n\n#: src/SUMMARY.md:75 src/fn/closures/closure_examples/iter_find.md:1\nmsgid \"Searching through iterators\"\nmsgstr \"이터레이터 검색\"\n\n#: src/SUMMARY.md:76 src/fn/hof.md:1\nmsgid \"Higher Order Functions\"\nmsgstr \"고차 함수\"\n\n#: src/SUMMARY.md:77 src/fn/diverging.md:1\nmsgid \"Diverging functions\"\nmsgstr \"발산 함수\"\n\n#: src/SUMMARY.md:79 src/mod.md:1\nmsgid \"Modules\"\nmsgstr \"모듈\"\n\n#: src/SUMMARY.md:80 src/mod/visibility.md:1\nmsgid \"Visibility\"\nmsgstr \"가시성\"\n\n#: src/SUMMARY.md:81 src/mod/struct_visibility.md:1\nmsgid \"Struct visibility\"\nmsgstr \"구조체 가시성\"\n\n#: src/SUMMARY.md:82 src/mod/use.md:1\nmsgid \"The `use` declaration\"\nmsgstr \"`use` 선언\"\n\n#: src/SUMMARY.md:83 src/mod/super.md:1\nmsgid \"`super` and `self`\"\nmsgstr \"`super`와 `self`\"\n\n#: src/SUMMARY.md:84 src/mod/split.md:1\nmsgid \"File hierarchy\"\nmsgstr \"파일 계층 구조\"\n\n#: src/SUMMARY.md:86 src/SUMMARY.md:98 src/crates.md:1 src/attribute/crate.md:1\n#: src/std_misc/arg.md:30\nmsgid \"Crates\"\nmsgstr \"크레이트\"\n\n#: src/SUMMARY.md:87 src/crates/lib.md:1\nmsgid \"Creating a Library\"\nmsgstr \"라이브러리 생성\"\n\n#: src/SUMMARY.md:88 src/crates/using_lib.md:1\nmsgid \"Using a Library\"\nmsgstr \"라이브러리 사용\"\n\n#: src/SUMMARY.md:90 src/cargo.md:1\nmsgid \"Cargo\"\nmsgstr \"카고\"\n\n#: src/SUMMARY.md:91 src/cargo/deps.md:1\nmsgid \"Dependencies\"\nmsgstr \"의존성\"\n\n#: src/SUMMARY.md:92 src/cargo/conventions.md:1\nmsgid \"Conventions\"\nmsgstr \"관례\"\n\n#: src/SUMMARY.md:93\nmsgid \"Tests\"\nmsgstr \"테스트\"\n\n#: src/SUMMARY.md:94 src/cargo/build_scripts.md:1\nmsgid \"Build Scripts\"\nmsgstr \"빌드 스크립트\"\n\n#: src/SUMMARY.md:96 src/attribute.md:1\nmsgid \"Attributes\"\nmsgstr \"속성\"\n\n#: src/SUMMARY.md:97 src/attribute/unused.md:1\nmsgid \"`dead_code`\"\nmsgstr \"`dead_code`\"\n\n#: src/SUMMARY.md:99 src/attribute/cfg.md:1\nmsgid \"`cfg`\"\nmsgstr \"`cfg`\"\n\n#: src/SUMMARY.md:100 src/attribute/cfg/custom.md:1\nmsgid \"Custom\"\nmsgstr \"사용자 정의\"\n\n#: src/SUMMARY.md:102 src/generics.md:1\nmsgid \"Generics\"\nmsgstr \"제네릭\"\n\n#: src/SUMMARY.md:104 src/generics/impl.md:1\nmsgid \"Implementation\"\nmsgstr \"구현\"\n\n#: src/SUMMARY.md:105 src/SUMMARY.md:131 src/SUMMARY.md:137\n#: src/generics/gen_trait.md:1 src/scope/lifetime/trait.md:1 src/trait.md:1\nmsgid \"Traits\"\nmsgstr \"트레이트\"\n\n#: src/SUMMARY.md:106 src/SUMMARY.md:132 src/generics/bounds.md:1\n#: src/scope/lifetime/lifetime_bounds.md:1\nmsgid \"Bounds\"\nmsgstr \"바운드\"\n\n#: src/SUMMARY.md:107 src/generics/bounds/testcase_empty.md:1\nmsgid \"Testcase: empty bounds\"\nmsgstr \"테스트케이스: 빈 바운드\"\n\n#: src/SUMMARY.md:108 src/generics/multi_bounds.md:1\nmsgid \"Multiple bounds\"\nmsgstr \"다중 바운드\"\n\n#: src/SUMMARY.md:109 src/generics/where.md:1\nmsgid \"Where clauses\"\nmsgstr \"Where 절\"\n\n#: src/SUMMARY.md:110 src/generics/new_types.md:1\nmsgid \"New Type Idiom\"\nmsgstr \"New Type 관용구\"\n\n#: src/SUMMARY.md:111 src/generics/assoc_items.md:1\nmsgid \"Associated items\"\nmsgstr \"연관 아이템\"\n\n#: src/SUMMARY.md:112 src/generics/assoc_items/the_problem.md:1\nmsgid \"The Problem\"\nmsgstr \"문제점\"\n\n#: src/SUMMARY.md:113 src/generics/assoc_items/types.md:1\nmsgid \"Associated types\"\nmsgstr \"연관 타입\"\n\n#: src/SUMMARY.md:114 src/generics/phantom.md:1\nmsgid \"Phantom type parameters\"\nmsgstr \"팬텀 타입 파라미터\"\n\n#: src/SUMMARY.md:115 src/generics/phantom/testcase_units.md:1\nmsgid \"Testcase: unit clarification\"\nmsgstr \"테스트케이스: 단위 명확화\"\n\n#: src/SUMMARY.md:117 src/scope.md:1\nmsgid \"Scoping rules\"\nmsgstr \"스코프 규칙\"\n\n#: src/SUMMARY.md:118 src/scope/raii.md:1\nmsgid \"RAII\"\nmsgstr \"RAII\"\n\n#: src/SUMMARY.md:119 src/scope/move.md:1\nmsgid \"Ownership and moves\"\nmsgstr \"소유권과 이동\"\n\n#: src/SUMMARY.md:121 src/scope/move/partial_move.md:1\nmsgid \"Partial moves\"\nmsgstr \"부분 이동\"\n\n#: src/SUMMARY.md:122 src/scope/borrow.md:1\nmsgid \"Borrowing\"\nmsgstr \"빌림\"\n\n#: src/SUMMARY.md:125 src/scope/borrow/ref.md:1\nmsgid \"The ref pattern\"\nmsgstr \"ref 패턴\"\n\n#: src/SUMMARY.md:126 src/scope/lifetime.md:1\nmsgid \"Lifetimes\"\nmsgstr \"라이프타임\"\n\n#: src/SUMMARY.md:127 src/scope/lifetime/explicit.md:1\nmsgid \"Explicit annotation\"\nmsgstr \"명시적 어노테이션\"\n\n#: src/SUMMARY.md:130 src/scope/lifetime/struct.md:1\nmsgid \"Structs\"\nmsgstr \"구조체\"\n\n#: src/SUMMARY.md:133 src/scope/lifetime/lifetime_coercion.md:1\nmsgid \"Coercion\"\nmsgstr \"강제\"\n\n#: src/SUMMARY.md:134 src/scope/lifetime/static_lifetime.md:1\nmsgid \"Static\"\nmsgstr \"Static\"\n\n#: src/SUMMARY.md:135 src/scope/lifetime/elision.md:1\nmsgid \"Elision\"\nmsgstr \"생략\"\n\n#: src/SUMMARY.md:138 src/trait/derive.md:1\nmsgid \"Derive\"\nmsgstr \"Derive\"\n\n#: src/SUMMARY.md:139 src/trait/dyn.md:1\nmsgid \"Returning Traits with `dyn`\"\nmsgstr \"`dyn`으로 트레이트 반환하기\"\n\n#: src/SUMMARY.md:140 src/trait/ops.md:1\nmsgid \"Operator Overloading\"\nmsgstr \"연산자 오버로딩\"\n\n#: src/SUMMARY.md:141 src/trait/drop.md:1\nmsgid \"Drop\"\nmsgstr \"Drop\"\n\n#: src/SUMMARY.md:142 src/trait/iter.md:1\nmsgid \"Iterators\"\nmsgstr \"이터레이터\"\n\n#: src/SUMMARY.md:143 src/trait/impl_trait.md:1\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md:144 src/trait/clone.md:1\nmsgid \"Clone\"\nmsgstr \"Clone\"\n\n#: src/SUMMARY.md:145 src/trait/supertraits.md:1\nmsgid \"Supertraits\"\nmsgstr \"슈퍼트레이트\"\n\n#: src/SUMMARY.md:146 src/trait/disambiguating.md:1\nmsgid \"Disambiguating overlapping traits\"\nmsgstr \"중복 트레이트 명확화\"\n\n#: src/SUMMARY.md:148\nmsgid \"macro_rules!\"\nmsgstr \"macro_rules!\"\n\n#: src/SUMMARY.md:149 src/macros/syntax.md:1\nmsgid \"Syntax\"\nmsgstr \"문법\"\n\n#: src/SUMMARY.md:150 src/macros/designators.md:1\nmsgid \"Designators\"\nmsgstr \"지시자\"\n\n#: src/SUMMARY.md:151 src/macros/overload.md:1\nmsgid \"Overload\"\nmsgstr \"오버로드\"\n\n#: src/SUMMARY.md:152 src/macros/repeat.md:1\nmsgid \"Repeat\"\nmsgstr \"반복\"\n\n#: src/SUMMARY.md:153 src/macros/dry.md:1\nmsgid \"DRY (Don't Repeat Yourself)\"\nmsgstr \"DRY (반복하지 말라)\"\n\n#: src/SUMMARY.md:154\nmsgid \"DSL (Domain Specific Languages)\"\nmsgstr \"DSL (도메인 특화 언어)\"\n\n#: src/SUMMARY.md:155\nmsgid \"Variadics\"\nmsgstr \"가변 인자\"\n\n#: src/SUMMARY.md:157 src/error.md:1\nmsgid \"Error handling\"\nmsgstr \"에러 핸들링\"\n\n#: src/SUMMARY.md:158 src/error/panic.md:1\nmsgid \"`panic`\"\nmsgstr \"`panic`\"\n\n#: src/SUMMARY.md:159\nmsgid \"`abort` & `unwind`\"\nmsgstr \"`abort`와 `unwind`\"\n\n#: src/SUMMARY.md:160 src/error/option_unwrap.md:1\nmsgid \"`Option` & `unwrap`\"\nmsgstr \"`Option`과 `unwrap`\"\n\n#: src/SUMMARY.md:161 src/error/option_unwrap/question_mark.md:1\nmsgid \"Unpacking options with `?`\"\nmsgstr \"`?`로 옵션 풀기\"\n\n#: src/SUMMARY.md:162 src/error/option_unwrap/map.md:1\nmsgid \"Combinators: `map`\"\nmsgstr \"콤비네이터: `map`\"\n\n#: src/SUMMARY.md:163 src/error/option_unwrap/and_then.md:1\nmsgid \"Combinators: `and_then`\"\nmsgstr \"콤비네이터: `and_then`\"\n\n#: src/SUMMARY.md:164\nmsgid \"Defaults: `or`, `or_else`, `get_or_insert`, `get_or_insert_with`\"\nmsgstr \"기본값: `or`, `or_else`, `get_or_insert`, `get_or_insert_with`\"\n\n#: src/SUMMARY.md:165 src/SUMMARY.md:183 src/error/result.md:1\n#: src/std/result.md:1\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md:166 src/error/result/result_map.md:1\nmsgid \"`map` for `Result`\"\nmsgstr \"`Result`에서의 `map`\"\n\n#: src/SUMMARY.md:167 src/error/result/result_alias.md:1\nmsgid \"aliases for `Result`\"\nmsgstr \"`Result`의 별칭\"\n\n#: src/SUMMARY.md:168 src/error/result/early_returns.md:1\nmsgid \"Early returns\"\nmsgstr \"조기 리턴\"\n\n#: src/SUMMARY.md:169 src/error/result/enter_question_mark.md:1\nmsgid \"Introducing `?`\"\nmsgstr \"`?` 소개\"\n\n#: src/SUMMARY.md:170 src/error/multiple_error_types.md:1\nmsgid \"Multiple error types\"\nmsgstr \"여러 에러 타입\"\n\n#: src/SUMMARY.md:171 src/error/multiple_error_types/option_result.md:1\nmsgid \"Pulling `Result`s out of `Option`s\"\nmsgstr \"`Option`에서 `Result` 꺼내기\"\n\n#: src/SUMMARY.md:172 src/error/multiple_error_types/define_error_type.md:1\nmsgid \"Defining an error type\"\nmsgstr \"에러 타입 정의하기\"\n\n#: src/SUMMARY.md:173 src/error/multiple_error_types/boxing_errors.md:1\nmsgid \"`Box`ing errors\"\nmsgstr \"에러 `Box`하기\"\n\n#: src/SUMMARY.md:174 src/error/multiple_error_types/reenter_question_mark.md:1\nmsgid \"Other uses of `?`\"\nmsgstr \"`?`의 다른 용도\"\n\n#: src/SUMMARY.md:175 src/error/multiple_error_types/wrap_error.md:1\nmsgid \"Wrapping errors\"\nmsgstr \"에러 감싸기\"\n\n#: src/SUMMARY.md:176 src/error/iter_result.md:1\nmsgid \"Iterating over `Result`s\"\nmsgstr \"`Result` 반복하기\"\n\n#: src/SUMMARY.md:178 src/std.md:1\nmsgid \"Std library types\"\nmsgstr \"표준 라이브러리 타입\"\n\n#: src/SUMMARY.md:179 src/std/box.md:1\nmsgid \"Box, stack and heap\"\nmsgstr \"Box, 스택과 힙\"\n\n#: src/SUMMARY.md:180 src/std/vec.md:1\nmsgid \"Vectors\"\nmsgstr \"벡터\"\n\n#: src/SUMMARY.md:181 src/std/str.md:1\nmsgid \"Strings\"\nmsgstr \"문자열\"\n\n#: src/SUMMARY.md:182 src/std/option.md:1\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md:184 src/std/result/question_mark.md:1\nmsgid \"`?`\"\nmsgstr \"`?`\"\n\n#: src/SUMMARY.md:185 src/std/panic.md:1\nmsgid \"`panic!`\"\nmsgstr \"`panic!`\"\n\n#: src/SUMMARY.md:186 src/std/hash.md:1\nmsgid \"HashMap\"\nmsgstr \"해시맵\"\n\n#: src/SUMMARY.md:187 src/std/hash/alt_key_types.md:1\nmsgid \"Alternate/custom key types\"\nmsgstr \"대체/사용자 정의 키 타입\"\n\n#: src/SUMMARY.md:188 src/std/hash/hashset.md:1\nmsgid \"HashSet\"\nmsgstr \"해시셋\"\n\n#: src/SUMMARY.md:189 src/std/rc.md:1\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md:190\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md:192 src/std_misc.md:1\nmsgid \"Std misc\"\nmsgstr \"기타 표준 라이브러리\"\n\n#: src/SUMMARY.md:193 src/std_misc.md:6 src/std_misc/threads.md:1\nmsgid \"Threads\"\nmsgstr \"스레드\"\n\n#: src/SUMMARY.md:194 src/std_misc/threads/testcase_mapreduce.md:1\nmsgid \"Testcase: map-reduce\"\nmsgstr \"테스트케이스: 맵-리듀스\"\n\n#: src/SUMMARY.md:195 src/std_misc.md:7 src/std_misc/channels.md:1\nmsgid \"Channels\"\nmsgstr \"채널\"\n\n#: src/SUMMARY.md:196 src/std_misc/path.md:1\nmsgid \"Path\"\nmsgstr \"경로\"\n\n#: src/SUMMARY.md:197 src/std_misc.md:8 src/std_misc/file.md:1\nmsgid \"File I/O\"\nmsgstr \"파일 입출력\"\n\n#: src/SUMMARY.md:198 src/std_misc/file/open.md:1\nmsgid \"`open`\"\nmsgstr \"`open`\"\n\n#: src/SUMMARY.md:199 src/std_misc/file/create.md:1\nmsgid \"`create`\"\nmsgstr \"`create`\"\n\n#: src/SUMMARY.md:200 src/std_misc/file/read_lines.md:1\nmsgid \"`read_lines`\"\nmsgstr \"`read_lines`\"\n\n#: src/SUMMARY.md:201 src/std_misc/process.md:1\nmsgid \"Child processes\"\nmsgstr \"자식 프로세스\"\n\n#: src/SUMMARY.md:202 src/std_misc/process/pipe.md:1\nmsgid \"Pipes\"\nmsgstr \"파이프\"\n\n#: src/SUMMARY.md:203 src/std_misc/process/wait.md:1\nmsgid \"Wait\"\nmsgstr \"대기\"\n\n#: src/SUMMARY.md:204 src/std_misc/fs.md:1\nmsgid \"Filesystem Operations\"\nmsgstr \"파일시스템 연산\"\n\n#: src/SUMMARY.md:205 src/std_misc/arg.md:1\nmsgid \"Program arguments\"\nmsgstr \"프로그램 인자\"\n\n#: src/SUMMARY.md:206 src/std_misc/arg/matching.md:1\nmsgid \"Argument parsing\"\nmsgstr \"인자 파싱\"\n\n#: src/SUMMARY.md:207 src/std_misc/ffi.md:1\nmsgid \"Foreign Function Interface\"\nmsgstr \"외부 함수 인터페이스\"\n\n#: src/SUMMARY.md:209 src/cargo/test.md:1 src/testing.md:1\nmsgid \"Testing\"\nmsgstr \"테스트\"\n\n#: src/SUMMARY.md:210 src/testing/unit_testing.md:1\nmsgid \"Unit testing\"\nmsgstr \"유닛 테스트\"\n\n#: src/SUMMARY.md:211 src/testing/doc_testing.md:1\nmsgid \"Documentation testing\"\nmsgstr \"문서 테스트\"\n\n#: src/SUMMARY.md:212 src/testing/integration_testing.md:1\nmsgid \"Integration testing\"\nmsgstr \"통합 테스트\"\n\n#: src/SUMMARY.md:213\nmsgid \"Dev-dependencies\"\nmsgstr \"개발 의존성\"\n\n#: src/SUMMARY.md:215 src/unsafe.md:1\nmsgid \"Unsafe Operations\"\nmsgstr \"Unsafe 연산\"\n\n#: src/SUMMARY.md:216 src/unsafe/asm.md:1\nmsgid \"Inline assembly\"\nmsgstr \"인라인 어셈블리\"\n\n#: src/SUMMARY.md:218 src/compatibility.md:1\nmsgid \"Compatibility\"\nmsgstr \"호환성\"\n\n#: src/SUMMARY.md:219 src/compatibility/raw_identifiers.md:1\nmsgid \"Raw identifiers\"\nmsgstr \"Raw 식별자\"\n\n#: src/SUMMARY.md:221 src/meta.md:1\nmsgid \"Meta\"\nmsgstr \"메타\"\n\n#: src/SUMMARY.md:222 src/meta/doc.md:1\nmsgid \"Documentation\"\nmsgstr \"문서화\"\n\n#: src/SUMMARY.md:223 src/meta/playground.md:1\nmsgid \"Playground\"\nmsgstr \"플레이그라운드\"\n\n#: src/index.md:1\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/index.md:3\nmsgid \"\"\n\"[Rust](https://www.rust-lang.org/) is a modern systems programming language \"\n\"focusing on safety, speed, and concurrency. It accomplishes these goals by \"\n\"being memory safe without using garbage collection.\"\nmsgstr \"\"\n\"[Rust](https://www.rust-lang.org/)는 안전성, 속도, 동시성에 중점을 둔 현대적\"\n\"인 시스템 프로그래밍 언어입니다. 가비지 컬렉션을 사용하지 않고도 메모리 안전\"\n\"성을 확보하여 이러한 목표를 달성합니다.\"\n\n#: src/index.md:7\nmsgid \"\"\n\"Rust by Example (RBE) is a collection of runnable examples that illustrate \"\n\"various Rust concepts and standard libraries. To get even more out of these \"\n\"examples, don't forget to [install Rust locally](https://www.rust-lang.org/\"\n\"tools/install) and check out the [official docs](https://doc.rust-lang.org/\"\n\"std/). Additionally for the curious, you can also [check out the source code \"\n\"for this site](https://github.com/rust-lang/rust-by-example).\"\nmsgstr \"\"\n\"Rust by Example (RBE)는 다양한 Rust 개념과 표준 라이브러리를 보여주는 실행 가\"\n\"능한 예제 모음입니다. 이러한 예제를 더 잘 활용하려면 [Rust를 로컬에 설치]\"\n\"(https://www.rust-lang.org/tools/install)하고 [공식 문서](https://doc.rust-\"\n\"lang.org/std/)를 확인해 보세요. 또한 궁금하신 분들은 [이 사이트의 소스 코드]\"\n\"(https://github.com/rust-lang/rust-by-example)도 확인하실 수 있습니다.\"\n\n#: src/index.md:12\nmsgid \"Now let's begin!\"\nmsgstr \"자, 이제 시작해 봅시다!\"\n\n#: src/index.md:14\nmsgid \"[Hello World](hello.md) - Start with a traditional Hello World program.\"\nmsgstr \"\"\n\"[Hello World](hello.md) - 전통적인 Hello World 프로그램으로 시작합니다.\"\n\n#: src/index.md:16\nmsgid \"\"\n\"[Primitives](primitives.md) - Learn about signed integers, unsigned integers \"\n\"and other primitives.\"\nmsgstr \"\"\n\"[기본 자료형](primitives.md) - 부호 있는 정수, 부호 없는 정수 및 기타 기본 자\"\n\"료형에 대해 배웁니다.\"\n\n#: src/index.md:18\nmsgid \"[Custom Types](custom_types.md) - `struct` and `enum`.\"\nmsgstr \"[사용자 정의 타입](custom_types.md) - `struct`와 `enum`.\"\n\n#: src/index.md:20\nmsgid \"\"\n\"[Variable Bindings](variable_bindings.md) - mutable bindings, scope, \"\n\"shadowing.\"\nmsgstr \"[변수 바인딩](variable_bindings.md) - 가변 바인딩, 스코프, 섀도잉.\"\n\n#: src/index.md:22\nmsgid \"[Types](types.md) - Learn about changing and defining types.\"\nmsgstr \"[타입](types.md) - 타입을 변경하고 정의하는 법을 배웁니다.\"\n\n#: src/index.md:24\nmsgid \"\"\n\"[Conversion](conversion.md) - Convert between different types, such as \"\n\"strings, integers, and floats.\"\nmsgstr \"\"\n\"[타입 변환](conversion.md) - 문자열, 정수, 부동 소수점 등 서로 다른 타입 간\"\n\"의 변환에 대해 배웁니다.\"\n\n#: src/index.md:26\nmsgid \"\"\n\"[Expressions](expression.md) - Learn about Expressions & how to use them.\"\nmsgstr \"[표현식](expression.md) - 표현식과 그 사용법에 대해 배웁니다.\"\n\n#: src/index.md:28\nmsgid \"[Flow of Control](flow_control.md) - `if`/`else`, `for`, and others.\"\nmsgstr \"[제어 흐름](flow_control.md) - `if`/`else`, `for` 등을 배웁니다.\"\n\n#: src/index.md:30\nmsgid \"\"\n\"[Functions](fn.md) - Learn about Methods, Closures and Higher Order \"\n\"Functions.\"\nmsgstr \"[함수](fn.md) - 메서드, 클로저, 고차 함수에 대해 배웁니다.\"\n\n#: src/index.md:32\nmsgid \"[Modules](mod.md) - Organize code using modules\"\nmsgstr \"[모듈](mod.md) - 모듈을 사용하여 코드를 구성합니다.\"\n\n#: src/index.md:34\nmsgid \"\"\n\"[Crates](crates.md) - A crate is a compilation unit in Rust. Learn to create \"\n\"a library.\"\nmsgstr \"\"\n\"[크레이트](crates.md) - 크레이트는 Rust의 컴파일 단위입니다. 라이브러리를 만\"\n\"드는 법을 배웁니다.\"\n\n#: src/index.md:36\nmsgid \"\"\n\"[Cargo](cargo.md) - Go through some basic features of the official Rust \"\n\"package management tool.\"\nmsgstr \"\"\n\"[Cargo](cargo.md) - Rust 공식 패키지 관리 도구의 기본적인 기능을 살펴봅니다.\"\n\n#: src/index.md:38\nmsgid \"\"\n\"[Attributes](attribute.md) - An attribute is metadata applied to some \"\n\"module, crate or item.\"\nmsgstr \"\"\n\"[속성](attribute.md) - 속성은 모듈, 크레이트 또는 아이템에 적용되는 메타데이\"\n\"터입니다.\"\n\n#: src/index.md:40\nmsgid \"\"\n\"[Generics](generics.md) - Learn about writing a function or data type which \"\n\"can work for multiple types of arguments.\"\nmsgstr \"\"\n\"[제네릭](generics.md) - 다양한 타입의 인자에 대해 작동할 수 있는 함수나 데이\"\n\"터 타입을 작성하는 법을 배웁니다.\"\n\n#: src/index.md:42\nmsgid \"\"\n\"[Scoping rules](scope.md) - Scopes play an important part in ownership, \"\n\"borrowing, and lifetimes.\"\nmsgstr \"\"\n\"[스코프 규칙](scope.md) - 스코프는 소유권, 빌림, 라이프타임에서 중요한 역할\"\n\"을 합니다.\"\n\n#: src/index.md:44\nmsgid \"\"\n\"[Traits](trait.md) - A trait is a collection of methods defined for an \"\n\"unknown type: `Self`\"\nmsgstr \"\"\n\"[트레이트](trait.md) - 트레이트는 알 수 없는 타입 `Self`에 대해 정의된 메서\"\n\"드 모음입니다.\"\n\n#: src/index.md:46\nmsgid \"\"\n\"[Macros](macros.md) - Macros are a way of writing code that writes other \"\n\"code, which is known as metaprogramming.\"\nmsgstr \"\"\n\"[매크로](macros.md) - 매크로는 다른 코드를 작성하는 코드를 작성하는 방법으\"\n\"로, 메타프로그래밍이라고도 합니다.\"\n\n#: src/index.md:48\nmsgid \"[Error handling](error.md) - Learn Rust way of handling failures.\"\nmsgstr \"[에러 핸들링](error.md) - 실패를 처리하는 Rust의 방식을 배웁니다.\"\n\n#: src/index.md:50\nmsgid \"\"\n\"[Std library types](std.md) - Learn about some custom types provided by \"\n\"`std` library.\"\nmsgstr \"\"\n\"[표준 라이브러리 타입](std.md) - `std` 라이브러리에서 제공하는 몇 가지 사용\"\n\"자 정의 타입에 대해 배웁니다.\"\n\n#: src/index.md:52\nmsgid \"[Std misc](std_misc.md) - More custom types for file handling, threads.\"\nmsgstr \"\"\n\"[기타 표준 라이브러리](std_misc.md) - 파일 처리, 스레드 등을 위한 추가적인 사\"\n\"용자 정의 타입을 배웁니다.\"\n\n#: src/index.md:54\nmsgid \"[Testing](testing.md) - All sorts of testing in Rust.\"\nmsgstr \"[테스트](testing.md) - Rust에서의 다양한 테스트 방식을 배웁니다.\"\n\n#: src/index.md:56\nmsgid \"\"\n\"[Unsafe Operations](unsafe.md) - Learn about entering a block of unsafe \"\n\"operations.\"\nmsgstr \"[Unsafe 연산](unsafe.md) - Unsafe 연산 블록에 진입하는 법을 배웁니다.\"\n\n#: src/index.md:58\nmsgid \"\"\n\"[Compatibility](compatibility.md) - Handling Rust's evolution and potential \"\n\"compatibility issues.\"\nmsgstr \"\"\n\"[호환성](compatibility.md) - Rust의 발전과 잠재적인 호환성 문제를 처리하는 법\"\n\"을 배웁니다.\"\n\n#: src/index.md:60\nmsgid \"[Meta](meta.md) - Documentation, Benchmarking.\"\nmsgstr \"[메타](meta.md) - 문서화, 벤치마킹.\"\n\n#: src/hello.md:3\nmsgid \"This is the source code of the traditional Hello World program.\"\nmsgstr \"전통적인 Hello World 프로그램의 소스 코드입니다.\"\n\n#: src/hello.md:6\nmsgid \"\"\n\"// This is a comment, and is ignored by the compiler.\\n\"\n\"// You can test this code by clicking the \\\"Run\\\" button over there ->\\n\"\n\"// or if you prefer to use your keyboard, you can use the \\\"Ctrl + Enter\\\"\\n\"\n\"// shortcut.\\n\"\nmsgstr \"\"\n\"// 이것은 주석이며, 컴파일러에 의해 무시됩니다.\\n\"\n\"// 오른쪽에 있는 \\\"Run\\\" 버튼을 클릭하거나,\\n\"\n\"// 키보드를 사용하고 싶다면 \\\"Ctrl + Enter\\\" 단축키를 사용하여\\n\"\n\"// 이 코드를 테스트해 볼 수 있습니다.\\n\"\n\n#: src/hello.md:10\nmsgid \"\"\n\"// This code is editable, feel free to hack it!\\n\"\n\"// You can always return to the original code by clicking the \\\"Reset\\\" \"\n\"button ->\\n\"\nmsgstr \"\"\n\"// 이 코드는 수정 가능하므로, 자유롭게 고쳐보세요!\\n\"\n\"// \\\"Reset\\\" 버튼을 클릭하면 언제든지 원래 코드로 되돌릴 수 있습니다 ->\\n\"\n\n#: src/hello.md:13\nmsgid \"// This is the main function.\\n\"\nmsgstr \"// 메인 함수입니다.\\n\"\n\n#: src/hello.md:16\nmsgid \"// Statements here are executed when the compiled binary is called.\\n\"\nmsgstr \"// 여기에 있는 문장들은 컴파일된 바이너리가 호출될 때 실행됩니다.\\n\"\n\n#: src/hello.md:18\nmsgid \"// Print text to the console.\\n\"\nmsgstr \"// 콘솔에 텍스트를 출력합니다.\\n\"\n\n#: src/hello.md:19 src/error/result.md:55 src/meta/playground.md:12\nmsgid \"\\\"Hello World!\\\"\"\nmsgstr \"\\\"Hello World!\\\"\"\n\n#: src/hello.md:23\nmsgid \"`println!` is a [_macro_](macros.md) that prints text to the console.\"\nmsgstr \"`println!`은 콘솔에 텍스트를 출력하는 [_매크로_](macros.md)입니다.\"\n\n#: src/hello.md:26\nmsgid \"A binary can be generated using the Rust compiler: `rustc`.\"\nmsgstr \"Rust 컴파일러인 `rustc`를 사용하여 바이너리를 생성할 수 있습니다.\"\n\n#: src/hello.md:32\nmsgid \"`rustc` will produce a `hello` binary that can be executed.\"\nmsgstr \"`rustc`는 실행 가능한 `hello` 바이너리를 생성합니다.\"\n\n#: src/hello.md:39 src/hello/print/print_display.md:107\n#: src/hello/print/print_display/testcase_list.md:53 src/hello/print/fmt.md:70\n#: src/primitives/tuples.md:64 src/custom_types/structs.md:89\nmsgid \"Activity\"\nmsgstr \"실습\"\n\n#: src/hello.md:41\nmsgid \"\"\n\"Click 'Run' above to see the expected output. Next, add a new line with a \"\n\"second `println!` macro so that the output shows:\"\nmsgstr \"\"\n\"위의 'Run'을 클릭하여 예상 출력을 확인하세요. 그런 다음, 두 번째 `println!` \"\n\"매크로를 사용하여 다음과 같은 출력이 나오도록 새로운 라인을 추가하세요.\"\n\n#: src/hello/comment.md:3\nmsgid \"\"\n\"Any program requires comments, and Rust supports a few different varieties:\"\nmsgstr \"\"\n\"어떤 프로그램이든 주석이 필요하며, Rust는 몇 가지 다른 종류를 지원합니다.\"\n\n#: src/hello/comment.md:6\nmsgid \"Regular Comments\"\nmsgstr \"일반 주석\"\n\n#: src/hello/comment.md:8\nmsgid \"These are ignored by the compiler:\"\nmsgstr \"이것들은 컴파일러에 의해 무시됩니다:\"\n\n#: src/hello/comment.md:10\nmsgid \"**Line comments**: Start with `//` and continue to the end of the line\"\nmsgstr \"**라인 주석**: `//`로 시작하여 줄의 끝까지 이어집니다.\"\n\n#: src/hello/comment.md:11\nmsgid \"**Block comments**: Enclosed in `/* ... */` and can span multiple lines\"\nmsgstr \"**블록 주석**: `/* ... */`로 감싸여 여러 줄에 걸쳐 있을 수 있습니다.\"\n\n#: src/hello/comment.md:13\nmsgid \"\"\n\"Documentation Comments (Doc Comments) which are parsed into HTML library \"\n\"[documentation](../meta/doc.md):\"\nmsgstr \"\"\n\"HTML 라이브러리 [문서](../meta/doc.md)로 파싱되는 문서화 주석 (Doc Comments):\"\n\n#: src/hello/comment.md:15\nmsgid \"`///` - Generates docs for the item that follows it\"\nmsgstr \"`///` - 다음에 오는 아이템에 대한 문서를 생성합니다.\"\n\n#: src/hello/comment.md:16\nmsgid \"\"\n\"`//!` - Generates docs for the enclosing item (typically used at the top of \"\n\"a file or module)\"\nmsgstr \"\"\n\"`//!` - 해당 아이템을 포함하는 아이템(주로 파일이나 모듈의 상단에서 사용됨)\"\n\"에 대한 문서를 생성합니다.\"\n\n#: src/hello/comment.md:20\nmsgid \"\"\n\"// Line comments start with two slashes.\\n\"\n\"    // Everything after the slashes is ignored by the compiler.\\n\"\nmsgstr \"\"\n\"// 라인 주석은 두 개의 슬래시로 시작합니다.\\n\"\n\"    // 슬래시 이후의 모든 내용은 컴파일러에 의해 무시됩니다.\\n\"\n\n#: src/hello/comment.md:23\nmsgid \"\"\n\"// Example: This line won't execute\\n\"\n\"    // println!(\\\"Hello, world!\\\");\\n\"\nmsgstr \"\"\n\"// 예시: 이 줄은 실행되지 않습니다\\n\"\n\"    // println!(\\\"Hello, world!\\\");\\n\"\n\n#: src/hello/comment.md:26\nmsgid \"// Try removing the slashes above and running the code again.\\n\"\nmsgstr \"// 위의 슬래시를 제거하고 코드를 다시 실행해 보세요.\\n\"\n\n#: src/hello/comment.md:28\nmsgid \"\"\n\"/*\\n\"\n\"     * Block comments are useful for temporarily disabling code.\\n\"\n\"     * They can also be nested: /* like this */ which makes it easy\\n\"\n\"     * to comment out large sections quickly.\\n\"\n\"     */\"\nmsgstr \"\"\n\"/*\\n\"\n\"     * 블록 주석은 코드를 일시적으로 비활성화하는 데 유용합니다.\\n\"\n\"     * 블록 주석은 중첩될 수도 있습니다: /* 이와 같이 */ 중첩이 가능하여\\n\"\n\"     * 큰 섹션을 빠르게 주석 처리하기 쉽습니다.\\n\"\n\"     */\"\n\n#: src/hello/comment.md:34\nmsgid \"\"\n\"/*\\n\"\n\"    Note: The asterisk column on the left is just for style - \\n\"\n\"    it's not required by the language.\\n\"\n\"    */\"\nmsgstr \"\"\n\"/*\\n\"\n\"    참고: 왼쪽의 별표 기둥은 단지 스타일을 위한 것입니다 - \\n\"\n\"    언어적으로 요구되는 사항은 아닙니다.\\n\"\n\"    */\"\n\n#: src/hello/comment.md:39\nmsgid \"\"\n\"// Block comments make it easy to toggle code on/off by adding\\n\"\n\"    // or removing just one slash:\\n\"\nmsgstr \"\"\n\"// 블록 주석은 슬래시 하나를 추가하거나 제거하여\\n\"\n\"    // 코드를 켜고 끄기 쉽게 만들어 줍니다:\\n\"\n\n#: src/hello/comment.md:42\nmsgid \"\"\n\"/* <- Add a '/' here to uncomment the entire block below\\n\"\n\"\\n\"\n\"    println!(\\\"Now\\\");\\n\"\n\"    println!(\\\"everything\\\");\\n\"\n\"    println!(\\\"executes!\\\");\\n\"\n\"    // Line comments inside remain unaffected\\n\"\n\"\\n\"\n\"    // */\"\nmsgstr \"\"\n\"/* <- 여기에 '/'를 추가하면 아래 블록 전체의 주석이 해제됩니다\\n\"\n\"\\n\"\n\"    println!(\\\"이제\\\");\\n\"\n\"    println!(\\\"모든 것이\\\");\\n\"\n\"    println!(\\\"실행됩니다!\\\");\\n\"\n\"    // 내부의 라인 주석은 영향을 받지 않습니다\\n\"\n\"\\n\"\n\"    // */\"\n\n#: src/hello/comment.md:51\nmsgid \"// Block comments can also be used within expressions:\\n\"\nmsgstr \"// 블록 주석은 표현식 내에서도 사용될 수 있습니다:\\n\"\n\n#: src/hello/comment.md:52\nmsgid \"/* 90 + */\"\nmsgstr \"/* 90 + */\"\n\n#: src/hello/comment.md:53\nmsgid \"\\\"Is `x` 10 or 100? x = {}\\\"\"\nmsgstr \"\\\"`x`는 10인가요 100인가요? x = {}\\\"\"\n\n#: src/hello/comment.md:57 src/hello/print.md:103\n#: src/hello/print/print_debug.md:75 src/hello/print/print_display.md:128\n#: src/hello/print/print_display/testcase_list.md:62 src/hello/print/fmt.md:94\n#: src/primitives.md:64 src/custom_types/enum.md:100\n#: src/custom_types/enum/enum_use.md:45 src/custom_types/enum/c_like.md:33\n#: src/custom_types/enum/testcase_linked_list.md:78\n#: src/custom_types/constants.md:35 src/types/alias.md:30\n#: src/flow_control/for.md:121 src/flow_control/match/destructuring.md:17\n#: src/flow_control/match/destructuring/destructure_tuple.md:25\n#: src/flow_control/match/destructuring/destructure_slice.md:46\n#: src/flow_control/match/destructuring/destructure_enum.md:48\n#: src/flow_control/match/destructuring/destructure_pointers.md:63\n#: src/flow_control/match/destructuring/destructure_structures.md:45\n#: src/flow_control/match/guard.md:43 src/flow_control/match/binding.md:63\n#: src/flow_control/if_let.md:118 src/flow_control/let_else.md:55\n#: src/flow_control/while_let.md:56 src/fn/closures/capture.md:110\n#: src/fn/closures/input_parameters.md:84 src/fn/closures/anonymity.md:47\n#: src/fn/closures/input_functions.md:32\n#: src/fn/closures/output_parameters.md:49\n#: src/fn/closures/closure_examples/iter_any.md:51\n#: src/fn/closures/closure_examples/iter_find.md:71\n#: src/mod/struct_visibility.md:53 src/attribute/cfg.md:39 src/generics.md:59\n#: src/generics/gen_fn.md:54 src/generics/impl.md:48\n#: src/generics/gen_trait.md:39 src/generics/bounds.md:73\n#: src/generics/bounds/testcase_empty.md:37 src/generics/multi_bounds.md:32\n#: src/generics/where.md:49 src/generics/new_types.md:54\n#: src/generics/assoc_items.md:10 src/generics/assoc_items/the_problem.md:62\n#: src/generics/phantom.md:56 src/generics/phantom/testcase_units.md:75\n#: src/scope/raii.md:92 src/scope/move/partial_move.md:57\n#: src/scope/borrow/mut.md:56 src/scope/lifetime/explicit.md:68\n#: src/scope/lifetime/fn.md:58 src/scope/lifetime/methods.md:24\n#: src/scope/lifetime/struct.md:41 src/scope/lifetime/trait.md:28\n#: src/scope/lifetime/lifetime_bounds.md:46\n#: src/scope/lifetime/static_lifetime.md:133 src/scope/lifetime/elision.md:39\n#: src/trait/derive.md:65 src/trait/supertraits.md:40\n#: src/trait/disambiguating.md:60 src/error/option_unwrap/map.md:79\n#: src/error/option_unwrap/and_then.md:73\n#: src/error/option_unwrap/defaults.md:115 src/error/result/result_alias.md:41\n#: src/error/multiple_error_types/boxing_errors.md:57\n#: src/error/multiple_error_types/reenter_question_mark.md:74\n#: src/error/multiple_error_types/wrap_error.md:91 src/std.md:12\n#: src/std/rc.md:55 src/std_misc.md:12\n#: src/std_misc/threads/testcase_mapreduce.md:127 src/std_misc/path.md:52\n#: src/std_misc/fs.md:149 src/meta/doc.md:109 src/meta/playground.md:49\nmsgid \"See also:\"\nmsgstr \"참고:\"\n\n#: src/hello/comment.md:59\nmsgid \"[Library documentation](../meta/doc.md)\"\nmsgstr \"[라이브러리 문서](../meta/doc.md)\"\n\n#: src/hello/print.md:3\nmsgid \"\"\n\"Printing is handled by a series of [`macros`](../macros.md) defined in \"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) some of which are:\"\nmsgstr \"\"\n\"출력은 [`std::fmt`](https://doc.rust-lang.org/std/fmt/)에 정의된 일련의 [`매\"\n\"크로`](../macros.md)들에 의해 처리되며, 그 중 몇 가지는 다음과 같습니다:\"\n\n#: src/hello/print.md:6\nmsgid \"`format!`: write formatted text to [`String`](../std/str.md)\"\nmsgstr \"`format!`: 형식화된 텍스트를 [`String`](../std/str.md)에 씁니다.\"\n\n#: src/hello/print.md:7\nmsgid \"\"\n\"`print!`: same as `format!` but the text is printed to the console \"\n\"(io::stdout).\"\nmsgstr \"`print!`: `format!`과 같지만 텍스트가 콘솔(io::stdout)에 출력됩니다.\"\n\n#: src/hello/print.md:9\nmsgid \"`println!`: same as `print!` but a newline is appended.\"\nmsgstr \"`println!`: `print!`와 같지만 줄바꿈 문자가 추가됩니다.\"\n\n#: src/hello/print.md:10\nmsgid \"\"\n\"`eprint!`: same as `print!` but the text is printed to the standard error \"\n\"(io::stderr).\"\nmsgstr \"\"\n\"`eprint!`: `print!`와 같지만 텍스트가 표준 에러(io::stderr)로 출력됩니다.\"\n\n#: src/hello/print.md:12\nmsgid \"`eprintln!`: same as `eprint!` but a newline is appended.\"\nmsgstr \"`eprintln!`: `eprint!`와 같지만 줄바꿈 문자가 추가됩니다.\"\n\n#: src/hello/print.md:14\nmsgid \"\"\n\"All parse text in the same fashion. As a plus, Rust checks formatting \"\n\"correctness at compile time.\"\nmsgstr \"\"\n\"모두 같은 방식으로 텍스트를 파싱합니다. 추가로, Rust는 컴파일 타임에 형식화\"\n\"의 올바름을 검사합니다.\"\n\n#: src/hello/print.md:19\nmsgid \"\"\n\"// In general, the `{}` will be automatically replaced with any\\n\"\n\"    // arguments. These will be stringified.\\n\"\nmsgstr \"\"\n\"// 일반적으로 `{}`는 어떤 인자로든 자동으로 교체됩니다.\\n\"\n\"    // 이들은 문자열화될 것입니다.\\n\"\n\n#: src/hello/print.md:21\nmsgid \"\\\"{} days\\\"\"\nmsgstr \"\\\"{}일\\\"\"\n\n#: src/hello/print.md:23\nmsgid \"\"\n\"// Positional arguments can be used. Specifying an integer inside `{}`\\n\"\n\"    // determines which additional argument will be replaced. Arguments \"\n\"start\\n\"\n\"    // at 0 immediately after the format string.\\n\"\nmsgstr \"\"\n\"// 위치 인자를 사용할 수 있습니다. `{}` 안에 정수를 지정하면\\n\"\n\"    // 어떤 추가 인자가 교체될지 결정합니다. 인자는 형식 문자열\\n\"\n\"    // 바로 뒤에서 0부터 시작합니다.\\n\"\n\n#: src/hello/print.md:26\nmsgid \"\\\"{0}, this is {1}. {1}, this is {0}\\\"\"\nmsgstr \"\\\"{0}, 여기는 {1}입니다. {1}, 여기는 {0}입니다.\\\"\"\n\n#: src/hello/print.md:26 src/scope/move/partial_move.md:31\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"앨리스\\\"\"\n\n#: src/hello/print.md:26 src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"밥\\\"\"\n\n#: src/hello/print.md:28\nmsgid \"// As can named arguments.\\n\"\nmsgstr \"// 이름을 지정한 인자(named arguments)도 사용할 수 있습니다.\\n\"\n\n#: src/hello/print.md:29\nmsgid \"\\\"{subject} {verb} {object}\\\"\"\nmsgstr \"\\\"{subject} {verb} {object}\\\"\"\n\n#: src/hello/print.md:30\nmsgid \"\\\"the lazy dog\\\"\"\nmsgstr \"\\\"게으른 개\\\"\"\n\n#: src/hello/print.md:31\nmsgid \"\\\"the quick brown fox\\\"\"\nmsgstr \"\\\"빠른 갈색 여우\\\"\"\n\n#: src/hello/print.md:32\nmsgid \"\\\"jumps over\\\"\"\nmsgstr \"\\\"넘어 뛰어넘다\\\"\"\n\n#: src/hello/print.md:34\nmsgid \"\"\n\"// Different formatting can be invoked by specifying the format character\\n\"\n\"    // after a `:`.\\n\"\nmsgstr \"// `:` 뒤에 형식 문자를 지정하여 다양한 형식화를 수행할 수 있습니다.\\n\"\n\n#: src/hello/print.md:36\nmsgid \"\\\"Base 10:               {}\\\"\"\nmsgstr \"\\\"10진수:               {}\\\"\"\n\n#: src/hello/print.md:36\nmsgid \"// 69420\\n\"\nmsgstr \"// 69420\\n\"\n\n#: src/hello/print.md:37\nmsgid \"\\\"Base 2 (binary):       {:b}\\\"\"\nmsgstr \"\\\"2진수:                {:b}\\\"\"\n\n#: src/hello/print.md:37\nmsgid \"// 10000111100101100\\n\"\nmsgstr \"// 10000111100101100\\n\"\n\n#: src/hello/print.md:38\nmsgid \"\\\"Base 8 (octal):        {:o}\\\"\"\nmsgstr \"\\\"8진수:                {:o}\\\"\"\n\n#: src/hello/print.md:38\nmsgid \"// 207454\\n\"\nmsgstr \"// 207454\\n\"\n\n#: src/hello/print.md:39\nmsgid \"\\\"Base 16 (hexadecimal): {:x}\\\"\"\nmsgstr \"\\\"16진수:               {:x}\\\"\"\n\n#: src/hello/print.md:39\nmsgid \"// 10f2c\\n\"\nmsgstr \"// 10f2c\\n\"\n\n#: src/hello/print.md:41\nmsgid \"\"\n\"// You can right-justify text with a specified width. This will\\n\"\n\"    // output \\\"    1\\\". (Four white spaces and a \\\"1\\\", for a total width \"\n\"of 5.)\\n\"\nmsgstr \"\"\n\"// 지정된 너비로 텍스트를 오른쪽 정렬할 수 있습니다. 이 예시는\\n\"\n\"    // \\\"    1\\\"을 출력할 것입니다. (공백 4개와 \\\"1\\\" 하나로 총 너비 5가 됩니\"\n\"다.)\\n\"\n\n#: src/hello/print.md:43\nmsgid \"\\\"{number:>5}\\\"\"\nmsgstr \"\\\"{number:>5}\\\"\"\n\n#: src/hello/print.md:45\nmsgid \"// You can pad numbers with extra zeroes,\\n\"\nmsgstr \"// 숫자를 0으로 채울 수도 있습니다,\\n\"\n\n#: src/hello/print.md:46\nmsgid \"\\\"{number:0>5}\\\"\"\nmsgstr \"\\\"{number:0>5}\\\"\"\n\n#: src/hello/print.md:46\nmsgid \"\"\n\"// 00001\\n\"\n\"    // and left-adjust by flipping the sign. This will output \\\"10000\\\".\\n\"\nmsgstr \"\"\n\"// 00001\\n\"\n\"    // 그리고 부호를 뒤집어 왼쪽 정렬할 수 있습니다. 이것은 \\\"10000\\\"을 출력\"\n\"합니다.\\n\"\n\n#: src/hello/print.md:48\nmsgid \"\\\"{number:0<5}\\\"\"\nmsgstr \"\\\"{number:0<5}\\\"\"\n\n#: src/hello/print.md:48\nmsgid \"// 10000\\n\"\nmsgstr \"// 10000\\n\"\n\n#: src/hello/print.md:50\nmsgid \"\"\n\"// You can use named arguments in the format specifier by appending a `$`.\\n\"\nmsgstr \"\"\n\"// 형식 지정자(format specifier)에 `$`를 붙여 명명된 인자를 사용할 수 있습니\"\n\"다.\\n\"\n\n#: src/hello/print.md:51\nmsgid \"\\\"{number:0>width$}\\\"\"\nmsgstr \"\\\"{number:0>width$}\\\"\"\n\n#: src/hello/print.md:53\nmsgid \"\"\n\"// Rust even checks to make sure the correct number of arguments are used.\\n\"\nmsgstr \"// Rust는 올바른 개수의 인자가 사용되었는지도 확인합니다.\\n\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"My name is {0}, {1} {0}\\\"\"\nmsgstr \"\\\"제 이름은 {0}, {1} {0}입니다.\\\"\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"Bond\\\"\"\nmsgstr \"\\\"본드\\\"\"\n\n#: src/hello/print.md:55\nmsgid \"// FIXME ^ Add the missing argument: \\\"James\\\"\\n\"\nmsgstr \"// FIXME ^ 누락된 인자를 추가하세요: \\\"제임스\\\"\\n\"\n\n#: src/hello/print.md:57\nmsgid \"\"\n\"// Only types that implement fmt::Display can be formatted with `{}`. User-\\n\"\n\"    // defined types do not implement fmt::Display by default.\\n\"\nmsgstr \"\"\n\"// fmt::Display를 구현하는 타입만 `{}`로 형식화할 수 있습니다. 사용자\\n\"\n\"    // 정의 타입은 기본적으로 fmt::Display를 구현하지 않습니다.\\n\"\n\n#: src/hello/print.md:60\nmsgid \"// disable `dead_code` which warn against unused module\\n\"\nmsgstr \"// 사용되지 않는 모듈에 대한 경고인 `dead_code`를 비활성화합니다\\n\"\n\n#: src/hello/print.md:63\nmsgid \"\"\n\"// This will not compile because `Structure` does not implement\\n\"\n\"    // fmt::Display.\\n\"\n\"    // println!(\\\"This struct `{}` won't print...\\\", Structure(3));\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// `Structure`가 fmt::Display를 구현하지 않으므로 컴파일되지 않습니다.\\n\"\n\"    // println!(\\\"이 구조체 `{}`는 출력되지 않습니다...\\\", Structure(3));\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/hello/print.md:68\nmsgid \"\"\n\"// For Rust 1.58 and above, you can directly capture the argument from a\\n\"\n\"    // surrounding variable. Just like the above, this will output\\n\"\n\"    // \\\"    1\\\", 4 white spaces and a \\\"1\\\".\\n\"\nmsgstr \"\"\n\"// Rust 1.58 이상에서는 주변 변수에서 직접 인자를 캡처할 수 있습니다.\\n\"\n\"    // 위와 마찬가지로, 이것은 \\\"    1\\\"(공백 4개와 \\\"1\\\")을 출력합니다.\\n\"\n\n#: src/hello/print.md:73\nmsgid \"\\\"{number:>width$}\\\"\"\nmsgstr \"\\\"{number:>width$}\\\"\"\n\n#: src/hello/print.md:77\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) contains many [`traits`]\"\n\"(https://doc.rust-lang.org/std/fmt/#formatting-traits) which govern the \"\n\"display of text. The base form of two important ones are listed below:\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)에는 텍스트 표시를 제어하는 \"\n\"많은 [`트레이트`](https://doc.rust-lang.org/std/fmt/#formatting-traits)가 포\"\n\"함되어 있습니다. 그 중 중요한 두 가지의 기본 형태는 다음과 같습니다:\"\n\n#: src/hello/print.md:80\nmsgid \"\"\n\"`fmt::Debug`: Uses the `{:?}` marker. Format text for debugging purposes.\"\nmsgstr \"\"\n\"`fmt::Debug`: `{:?}` 마커를 사용합니다. 디버깅 목적으로 텍스트 형식을 지정합\"\n\"니다.\"\n\n#: src/hello/print.md:81\nmsgid \"\"\n\"`fmt::Display`: Uses the `{}` marker. Format text in a more elegant, user \"\n\"friendly fashion.\"\nmsgstr \"\"\n\"`fmt::Display`: `{}` 마커를 사용합니다. 보다 우아하고 사용자 친화적인 방식으\"\n\"로 텍스트 형식을 지정합니다.\"\n\n#: src/hello/print.md:84\nmsgid \"\"\n\"Here, we used `fmt::Display` because the std library provides \"\n\"implementations for these types. To print text for custom types, more steps \"\n\"are required.\"\nmsgstr \"\"\n\"여기서는 표준 라이브러리가 이러한 타입들에 대한 구현을 제공하기 때문에 \"\n\"`fmt::Display`를 사용했습니다. 커스텀 타입에 대해 텍스트를 출력하려면 더 많\"\n\"은 단계가 필요합니다.\"\n\n#: src/hello/print.md:87\nmsgid \"\"\n\"Implementing the `fmt::Display` trait automatically implements the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"which allows us to [convert](../conversion/string.md) the type to [`String`]\"\n\"(../std/str.md).\"\nmsgstr \"\"\n\"`fmt::Display` 트레이트를 구현하면 타입을 [`String`](../std/str.md)으로 [변\"\n\"환](../conversion/string.md)할 수 있게 해주는 [`ToString`](https://doc.rust-\"\n\"lang.org/std/string/trait.ToString.html) 트레이트가 자동으로 구현됩니다.\"\n\n#: src/hello/print.md:90\nmsgid \"\"\n\"In _line 43_, `#[allow(dead_code)]` is an [attribute](../attribute.md) which \"\n\"only applies to the module after it.\"\nmsgstr \"\"\n\"_43행_의 `#[allow(dead_code)]`는 그 뒤에 오는 모듈에만 적용되는 [속성](../\"\n\"attribute.md)입니다.\"\n\n#: src/hello/print.md:92\nmsgid \"Activities\"\nmsgstr \"실습\"\n\n#: src/hello/print.md:94\nmsgid \"\"\n\"Fix the issue in the above code (see FIXME) so that it runs without error.\"\nmsgstr \"위 코드의 문제(FIXME 참고)를 수정하여 에러 없이 실행되도록 하세요.\"\n\n#: src/hello/print.md:96\nmsgid \"\"\n\"Try uncommenting the line that attempts to format the `Structure` struct \"\n\"(see TODO)\"\nmsgstr \"\"\n\"`Structure` 구조체를 형식화하려는 줄의 주석을 제거해 보세요 (TODO 참고).\"\n\n#: src/hello/print.md:98\nmsgid \"\"\n\"Add a `println!` macro call that prints: `Pi is roughly 3.142` by \"\n\"controlling the number of decimal places shown. For the purposes of this \"\n\"exercise, use `let pi = 3.141592` as an estimate for pi. (Hint: you may need \"\n\"to check the [`std::fmt`](https://doc.rust-lang.org/std/fmt/) documentation \"\n\"for setting the number of decimals to display)\"\nmsgstr \"\"\n\"표시되는 소수점 자릿수를 제어하여 `Pi is roughly 3.142`를 출력하는 `println!\"\n\"` 매크로 호출을 추가하세요. 이 연습을 위해 파이의 근사값으로 `let pi = \"\n\"3.141592`를 사용하세요. (힌트: 표시할 소수점 자릿수를 설정하는 방법은 \"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) 문서를 확인해야 할 수도 있습\"\n\"니다.)\"\n\n#: src/hello/print.md:105\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [`macros`](../macros.md), \"\n\"[`struct`](../custom_types/structs.md), [`traits`](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits), and [`dead_code`](../attribute/unused.md)\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [`매크로`](../macros.md), \"\n\"[`구조체`](../custom_types/structs.md), [`트레이트`](https://doc.rust-\"\n\"lang.org/std/fmt/#formatting-traits), 그리고 [`dead_code`](../attribute/\"\n\"unused.md)\"\n\n#: src/hello/print/print_debug.md:3\nmsgid \"\"\n\"All types which want to use `std::fmt` formatting `traits` require an \"\n\"implementation to be printable. Automatic implementations are only provided \"\n\"for types such as in the `std` library. All others _must_ be manually \"\n\"implemented somehow.\"\nmsgstr \"\"\n\"`std::fmt` 형식화 `트레이트`를 사용하려는 모든 타입은 출력 가능하도록 구현이 \"\n\"필요합니다. 자동 구현은 `std` 라이브러리와 같은 타입들에 대해서만 제공됩니\"\n\"다. 그 외의 모든 타입은 어떻게든 수동으로 구현_해야만_ 합니다.\"\n\n#: src/hello/print/print_debug.md:8\nmsgid \"\"\n\"The `fmt::Debug` `trait` makes this very straightforward. _All_ types can \"\n\"`derive` (automatically create) the `fmt::Debug` implementation. This is not \"\n\"true for `fmt::Display` which must be manually implemented.\"\nmsgstr \"\"\n\"`fmt::Debug` `트레이트`는 이를 매우 간단하게 만들어 줍니다. _모든_ 타입은 \"\n\"`fmt::Debug` 구현을 `derive`(자동 생성)할 수 있습니다. 하지만 `fmt::Display`\"\n\"는 그렇지 않으며 수동으로 구현해야 합니다.\"\n\n#: src/hello/print/print_debug.md:13\nmsgid \"\"\n\"// This structure cannot be printed either with `fmt::Display` or\\n\"\n\"// with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// 이 구조체는 `fmt::Display`나 `fmt::Debug` 중 어느 것으로도\\n\"\n\"// 출력할 수 없습니다.\\n\"\n\n#: src/hello/print/print_debug.md:16\nmsgid \"\"\n\"// The `derive` attribute automatically creates the implementation\\n\"\n\"// required to make this `struct` printable with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// `derive` 속성은 이 `구조체`를 `fmt::Debug`로 출력 가능하게 만드는 데\\n\"\n\"// 필요한 구현을 자동으로 생성합니다.\\n\"\n\n#: src/hello/print/print_debug.md:23\nmsgid \"All `std` library types are automatically printable with `{:?}` too:\"\nmsgstr \"모든 `std` 라이브러리 타입들도 `{:?}`로 자동 출력이 가능합니다:\"\n\n#: src/hello/print/print_debug.md:26\nmsgid \"\"\n\"// Derive the `fmt::Debug` implementation for `Structure`. `Structure`\\n\"\n\"// is a structure which contains a single `i32`.\\n\"\nmsgstr \"\"\n\"// `Structure`에 대해 `fmt::Debug` 구현을 유도(derive)합니다. `Structure`는\\n\"\n\"// 단일 `i32`를 포함하는 구조체입니다.\\n\"\n\n#: src/hello/print/print_debug.md:30\nmsgid \"\"\n\"// Put a `Structure` inside of the structure `Deep`. Make it printable\\n\"\n\"// also.\\n\"\nmsgstr \"\"\n\"// `Deep` 구조체 안에 `Structure`를 넣으세요. 그리고 역시 출력 가능하게 만드\"\n\"세요.\\n\"\n\n#: src/hello/print/print_debug.md:37\nmsgid \"// Printing with `{:?}` is similar to with `{}`.\\n\"\nmsgstr \"// `{:?}`를 이용한 출력은 `{}`와 유사합니다.\\n\"\n\n#: src/hello/print/print_debug.md:38\nmsgid \"\\\"{:?} months in a year.\\\"\"\nmsgstr \"\\\"1년은 {:?}개월입니다.\\\"\"\n\n#: src/hello/print/print_debug.md:39\nmsgid \"\\\"{1:?} {0:?} is the {actor:?} name.\\\"\"\nmsgstr \"\\\"{1:?} {0:?}은 {actor:?}의 이름입니다.\\\"\"\n\n#: src/hello/print/print_debug.md:40\nmsgid \"\\\"Slater\\\"\"\nmsgstr \"\\\"슬레이터\\\"\"\n\n#: src/hello/print/print_debug.md:41\nmsgid \"\\\"Christian\\\"\"\nmsgstr \"\\\"크리스찬\\\"\"\n\n#: src/hello/print/print_debug.md:42\nmsgid \"\\\"actor's\\\"\"\nmsgstr \"\\\"배우의\\\"\"\n\n#: src/hello/print/print_debug.md:44\nmsgid \"// `Structure` is printable!\\n\"\nmsgstr \"// `Structure`는 출력 가능합니다!\\n\"\n\n#: src/hello/print/print_debug.md:45 src/hello/print/print_debug.md:49\nmsgid \"\\\"Now {:?} will print!\\\"\"\nmsgstr \"\\\"이제 {:?}가 출력될 것입니다!\\\"\"\n\n#: src/hello/print/print_debug.md:47\nmsgid \"\"\n\"// The problem with `derive` is there is no control over how\\n\"\n\"    // the results look. What if I want this to just show a `7`?\\n\"\nmsgstr \"\"\n\"// `derive`의 문제점은 결과가 어떻게 보일지 제어할 수 없다는 것입니다.\\n\"\n\"    // 만약 이것을 단지 `7`로 보여주고 싶다면 어떡하죠?\\n\"\n\n#: src/hello/print/print_debug.md:53\nmsgid \"\"\n\"So `fmt::Debug` definitely makes this printable but sacrifices some \"\n\"elegance. Rust also provides \\\"pretty printing\\\" with `{:#?}`.\"\nmsgstr \"\"\n\"따라서 `fmt::Debug`는 확실히 출력을 가능하게 하지만 우아함을 어느 정도 희생합\"\n\"니다. Rust는 `{:#?}`를 사용한 \\\"예쁘게 출력하기(pretty printing)\\\"도 제공합니\"\n\"다.\"\n\n#: src/hello/print/print_debug.md:64 src/custom_types/structs.md:42\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"피터\\\"\"\n\n#: src/hello/print/print_debug.md:68\nmsgid \"// Pretty print\\n\"\nmsgstr \"// 예쁘게 출력하기\\n\"\n\n#: src/hello/print/print_debug.md:69\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/hello/print/print_debug.md:73\nmsgid \"One can manually implement `fmt::Display` to control the display.\"\nmsgstr \"`fmt::Display`를 수동으로 구현하여 출력을 제어할 수 있습니다.\"\n\n#: src/hello/print/print_debug.md:77\nmsgid \"\"\n\"[`attributes`](https://doc.rust-lang.org/reference/attributes.html), \"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), and [`struct`](../../custom_types/structs.md)\"\nmsgstr \"\"\n\"[`속성`](https://doc.rust-lang.org/reference/attributes.html), [`derive`]\"\n\"(../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/std/fmt/), 그\"\n\"리고 [`구조체`](../../custom_types/structs.md)\"\n\n#: src/hello/print/print_display.md:3\nmsgid \"\"\n\"`fmt::Debug` hardly looks compact and clean, so it is often advantageous to \"\n\"customize the output appearance. This is done by manually implementing \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/), which uses the `{}` \"\n\"print marker. Implementing it looks like this:\"\nmsgstr \"\"\n\"`fmt::Debug`는 콤팩트하고 깔끔해 보이지 않으므로, 출력 모양을 커스터마이징하\"\n\"는 것이 종종 유리합니다. 이는 `{}` 출력 마커를 사용하는 [`fmt::Display`]\"\n\"(https://doc.rust-lang.org/std/fmt/)를 수동으로 구현함으로써 수행됩니다. 구현\"\n\"은 다음과 같습니다:\"\n\n#: src/hello/print/print_display.md:9\nmsgid \"// Import (via `use`) the `fmt` module to make it available.\\n\"\nmsgstr \"// `fmt` 모듈을 (`use`를 통해) 가져와서 사용할 수 있게 합니다.\\n\"\n\n#: src/hello/print/print_display.md:11\nmsgid \"\"\n\"// Define a structure for which `fmt::Display` will be implemented. This is\\n\"\n\"// a tuple struct named `Structure` that contains an `i32`.\\n\"\nmsgstr \"\"\n\"// `fmt::Display`를 구현할 구조체를 정의합니다. 이것은\\n\"\n\"// `i32`를 포함하는 `Structure`라는 이름의 튜플 구조체입니다.\\n\"\n\n#: src/hello/print/print_display.md:15\nmsgid \"\"\n\"// To use the `{}` marker, the trait `fmt::Display` must be implemented\\n\"\n\"// manually for the type.\\n\"\nmsgstr \"\"\n\"// `{}` 마커를 사용하려면, `fmt::Display` 트레이트가 해당 타입에 대해\\n\"\n\"// 수동으로 구현되어야 합니다.\\n\"\n\n#: src/hello/print/print_display.md:19\nmsgid \"// This trait requires `fmt` with this exact signature.\\n\"\nmsgstr \"// 이 트레이트는 정확히 이 시그니처를 가진 `fmt`를 요구합니다.\\n\"\n\n#: src/hello/print/print_display.md:21\nmsgid \"\"\n\"// Write strictly the first element into the supplied output\\n\"\n\"        // stream: `f`. Returns `fmt::Result` which indicates whether the\\n\"\n\"        // operation succeeded or failed. Note that `write!` uses syntax \"\n\"which\\n\"\n\"        // is very similar to `println!`.\\n\"\nmsgstr \"\"\n\"// 제공된 출력 스트림 `f`에 첫 번째 요소를 씁니다.\\n\"\n\"        // 작업의 성공 또는 실패 여부를 나타내는 `fmt::Result`를 반환합니\"\n\"다.\\n\"\n\"        // `write!`는 `println!`과 매우 유사한 구문을 사용한다는 점에 유의하\"\n\"세요.\\n\"\n\n#: src/hello/print/print_display.md:25\n#: src/hello/print/print_display/testcase_list.md:13\n#: src/hello/print/print_display/testcase_list.md:39\n#: src/hello/print/print_display/testcase_list.md:49 src/hello/print/fmt.md:53\n#: src/custom_types/enum/testcase_linked_list.md:74 src/conversion/string.md:25\n#: src/flow_control/loop.md:26 src/flow_control/while.md:21\n#: src/flow_control/for.md:23 src/flow_control/for.md:43 src/fn.md:40\n#: src/fn/closures/capture.md:96 src/fn/closures/capture.md:97\n#: src/fn/closures/anonymity.md:41 src/generics/bounds.md:12\n#: src/macros/repeat.md:24 src/macros/repeat.md:25 src/macros/repeat.md:26\n#: src/error/result.md:73 src/std/str.md:92 src/std/str.md:102\n#: src/std/str.md:106 src/std/str.md:111 src/std/result.md:72\n#: src/std/result/question_mark.md:57 src/std/result/question_mark.md:65\n#: src/std_misc/file/read_lines.md:60 src/std_misc/arg/matching.md:9\n#: src/std_misc/arg/matching.md:13\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/hello/print/print_display.md:30\nmsgid \"\"\n\"`fmt::Display` may be cleaner than `fmt::Debug` but this presents a problem \"\n\"for the `std` library. How should ambiguous types be displayed? For example, \"\n\"if the `std` library implemented a single style for all `Vec<T>`, what style \"\n\"should it be? Would it be either of these two?\"\nmsgstr \"\"\n\"`fmt::Display`가 `fmt::Debug`보다 깔끔할 수 있지만, 이는 `std` 라이브러리에 \"\n\"문제를 제기합니다. 모호한 타입들은 어떻게 표시되어야 할까요? 예를 들어, \"\n\"`std` 라이브러리가 모든 `Vec<T>`에 대해 단일 스타일을 구현했다면, 어떤 스타일\"\n\"이어야 할까요? 다음 두 가지 중 하나일까요?\"\n\n#: src/hello/print/print_display.md:35\nmsgid \"`Vec<path>`: `/:/etc:/home/username:/bin` (split on `:`)\"\nmsgstr \"`Vec<path>`: `/:/etc:/home/username:/bin` (`:`로 구분)\"\n\n#: src/hello/print/print_display.md:36\nmsgid \"`Vec<number>`: `1,2,3` (split on `,`)\"\nmsgstr \"`Vec<number>`: `1,2,3` (`,`로 구분)\"\n\n#: src/hello/print/print_display.md:38\nmsgid \"\"\n\"No, because there is no ideal style for all types and the `std` library \"\n\"doesn't presume to dictate one. `fmt::Display` is not implemented for \"\n\"`Vec<T>` or for any other generic containers. `fmt::Debug` must then be used \"\n\"for these generic cases.\"\nmsgstr \"\"\n\"아니요, 모든 타입에 이상적인 스타일은 없으며 `std` 라이브러리가 하나를 독단적\"\n\"으로 정하지 않기 때문입니다. `fmt::Display`는 `Vec<T>`나 다른 제네릭 컨테이너\"\n\"에 대해 구현되어 있지 않습니다. 따라서 이러한 제네릭 케이스에는 `fmt::Debug`\"\n\"를 사용해야 합니다.\"\n\n#: src/hello/print/print_display.md:43\nmsgid \"\"\n\"This is not a problem though because for any new _container_ type which is \"\n\"_not_ generic, `fmt::Display` can be implemented.\"\nmsgstr \"\"\n\"하지만 제네릭이 _아닌_ 새로운 _컨테이너_ 타입에 대해서는 `fmt::Display`를 구\"\n\"현할 수 있으므로 이는 문제가 되지 않습니다.\"\n\n#: src/hello/print/print_display.md:47\nmsgid \"// Import `fmt`\\n\"\nmsgstr \"// `fmt` 가져오기\\n\"\n\n#: src/hello/print/print_display.md:48\nmsgid \"\"\n\"// A structure holding two numbers. `Debug` will be derived so the results \"\n\"can\\n\"\n\"// be contrasted with `Display`.\\n\"\nmsgstr \"\"\n\"// 두 숫자를 보유하는 구조체입니다. `Display`와 대조해 볼 수 있도록\\n\"\n\"// `Debug`를 유도(derive)할 것입니다.\\n\"\n\n#: src/hello/print/print_display.md:53\nmsgid \"// Implement `Display` for `MinMax`.\\n\"\nmsgstr \"// `MinMax`에 대해 `Display`를 구현합니다.\\n\"\n\n#: src/hello/print/print_display.md:57\nmsgid \"// Use `self.number` to refer to each positional data point.\\n\"\nmsgstr \"// 각 위치별 데이터 지점을 참조하기 위해 `self.number`를 사용합니다.\\n\"\n\n#: src/hello/print/print_display.md:58\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/hello/print/print_display.md:61\nmsgid \"// Define a structure where the fields are nameable for comparison.\\n\"\nmsgstr \"// 비교를 위해 필드에 이름을 붙일 수 있는 구조체를 정의합니다.\\n\"\n\n#: src/hello/print/print_display.md:68\nmsgid \"// Similarly, implement `Display` for `Point2D`.\\n\"\nmsgstr \"// 마찬가지로, `Point2D`에 대해 `Display`를 구현합니다.\\n\"\n\n#: src/hello/print/print_display.md:72\nmsgid \"// Customize so only `x` and `y` are denoted.\\n\"\nmsgstr \"// `x`와 `y`만 표시되도록 커스터마이징합니다.\\n\"\n\n#: src/hello/print/print_display.md:73\nmsgid \"\\\"x: {}, y: {}\\\"\"\nmsgstr \"\\\"x: {}, y: {}\\\"\"\n\n#: src/hello/print/print_display.md:80\nmsgid \"\\\"Compare structures:\\\"\"\nmsgstr \"\\\"구조체 비교:\\\"\"\n\n#: src/hello/print/print_display.md:81 src/hello/print/print_display.md:94\nmsgid \"\\\"Display: {}\\\"\"\nmsgstr \"\\\"디스플레이: {}\\\"\"\n\n#: src/hello/print/print_display.md:82 src/hello/print/print_display.md:95\nmsgid \"\\\"Debug: {:?}\\\"\"\nmsgstr \"\\\"디버그: {:?}\\\"\"\n\n#: src/hello/print/print_display.md:87\nmsgid \"\\\"The big range is {big} and the small is {small}\\\"\"\nmsgstr \"\\\"큰 범위는 {big}이고 작은 범위는 {small}입니다.\\\"\"\n\n#: src/hello/print/print_display.md:93\nmsgid \"\\\"Compare points:\\\"\"\nmsgstr \"\\\"좌표 비교:\\\"\"\n\n#: src/hello/print/print_display.md:97\nmsgid \"\"\n\"// Error. Both `Debug` and `Display` were implemented, but `{:b}`\\n\"\n\"    // requires `fmt::Binary` to be implemented. This will not work.\\n\"\n\"    // println!(\\\"What does Point2D look like in binary: {:b}?\\\", point);\\n\"\nmsgstr \"\"\n\"// 에러. `Debug`와 `Display`는 모두 구현되었지만, `{:b}`는\\n\"\n\"    // `fmt::Binary` 구현을 요구합니다. 이것은 작동하지 않을 것입니다.\\n\"\n\"    // println!(\\\"Point2D의 2진수 형태는 무엇일까요: {:b}?\\\", point);\\n\"\n\n#: src/hello/print/print_display.md:103\nmsgid \"\"\n\"So, `fmt::Display` has been implemented but `fmt::Binary` has not, and \"\n\"therefore cannot be used. `std::fmt` has many such [`traits`](https://\"\n\"doc.rust-lang.org/std/fmt/#formatting-traits) and each requires its own \"\n\"implementation. This is detailed further in [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/).\"\nmsgstr \"\"\n\"따라서, `fmt::Display`는 구현되었지만 `fmt::Binary`는 구현되지 않았으므로 사\"\n\"용할 수 없습니다. `std::fmt`에는 이와 같은 많은 [`트레이트`](https://\"\n\"doc.rust-lang.org/std/fmt/#formatting-traits)가 있으며 각각은 자체적인 구현\"\n\"을 요구합니다. 이에 대한 자세한 내용은 [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/)에 나와 있습니다.\"\n\n#: src/hello/print/print_display.md:109\nmsgid \"\"\n\"After checking the output of the above example, use the `Point2D` struct as \"\n\"a guide to add a `Complex` struct to the example. When printed in the same \"\n\"way, the output should be:\"\nmsgstr \"\"\n\"위 예제의 출력을 확인한 후, `Point2D` 구조체를 가이드로 삼아 예제에 \"\n\"`Complex` 구조체를 추가해 보세요. 같은 방식으로 출력했을 때의 결과는 다음과 \"\n\"같아야 합니다:\"\n\n#: src/hello/print/print_display.md:121\nmsgid \"Bonus: Add a space before the `+`/`-` signs.\"\nmsgstr \"보너스: `+`/`-` 기호 앞에 공백을 추가하세요.\"\n\n#: src/hello/print/print_display.md:123\nmsgid \"Hints in case you get stuck:\"\nmsgstr \"막혔을 때를 위한 힌트:\"\n\n#: src/hello/print/print_display.md:125\nmsgid \"\"\n\"Check the documentation for [`Sign/#/0`](https://doc.rust-lang.org/std/fmt/\"\n\"#sign0) in `std::fmt`.\"\nmsgstr \"\"\n\"`std::fmt`에서 [`Sign/#/0`](https://doc.rust-lang.org/std/fmt/#sign0)에 대한 \"\n\"문서를 확인하세요.\"\n\n#: src/hello/print/print_display.md:126\nmsgid \"\"\n\"Bonus: Check [`if`\\\\-`else`](../../flow_control/if_else.md) branching and \"\n\"the [`abs`](https://doc.rust-lang.org/std/primitive.f64.html#method.abs) \"\n\"function.\"\nmsgstr \"\"\n\"보너스: [`if`\\\\-`else`](../../flow_control/if_else.md) 분기와 [`abs`]\"\n\"(https://doc.rust-lang.org/std/primitive.f64.html#method.abs) 함수를 확인하세\"\n\"요.\"\n\n#: src/hello/print/print_display.md:130\nmsgid \"\"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [`macros`](../../macros.md), [`struct`](../../custom_types/\"\n\"structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-\"\n\"traits), and [`use`](../../mod/use.md)\"\nmsgstr \"\"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [`매크로`](../../macros.md), [`구조체`](../../custom_types/\"\n\"structs.md), [`트레이트`](https://doc.rust-lang.org/std/fmt/#formatting-\"\n\"traits), 그리고 [`use`](../../mod/use.md)\"\n\n#: src/hello/print/print_display/testcase_list.md:3\nmsgid \"\"\n\"Implementing `fmt::Display` for a structure where the elements must each be \"\n\"handled sequentially is tricky. The problem is that each `write!` generates \"\n\"a `fmt::Result`. Proper handling of this requires dealing with _all_ the \"\n\"results. Rust provides the `?` operator for exactly this purpose.\"\nmsgstr \"\"\n\"각 요소를 순차적으로 처리해야 하는 구조체에 대해 `fmt::Display`를 구현하는 것\"\n\"은 까다롭습니다. 문제는 각 `write!`가 `fmt::Result`를 생성한다는 것입니다. 이\"\n\"를 적절히 처리하려면 _모든_ 결과를 다뤄야 합니다. Rust는 정확히 이 목적을 위\"\n\"해 `?` 연산자를 제공합니다.\"\n\n#: src/hello/print/print_display/testcase_list.md:8\nmsgid \"Using `?` on `write!` looks like this:\"\nmsgstr \"`write!`에 `?`를 사용하는 것은 다음과 같습니다:\"\n\n#: src/hello/print/print_display/testcase_list.md:11\nmsgid \"\"\n\"// Try `write!` to see if it errors. If it errors, return\\n\"\n\"// the error. Otherwise continue.\\n\"\nmsgstr \"\"\n\"// `write!`가 에러를 발생시키는지 확인합니다. 에러가 발생하면\\n\"\n\"// 에러를 반환합니다. 그렇지 않으면 계속 진행합니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:16\nmsgid \"\"\n\"With `?` available, implementing `fmt::Display` for a `Vec` is \"\n\"straightforward:\"\nmsgstr \"`?`가 사용 가능해지면 `Vec`에 대한 `fmt::Display` 구현은 간단해집니다:\"\n\n#: src/hello/print/print_display/testcase_list.md:20\nmsgid \"// Import the `fmt` module.\\n\"\nmsgstr \"// `fmt` 모듈을 가져옵니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:21\nmsgid \"// Define a structure named `List` containing a `Vec`.\\n\"\nmsgstr \"// `Vec`을 포함하는 `List`라는 이름의 구조체를 정의합니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:27\nmsgid \"\"\n\"// Extract the value using tuple indexing,\\n\"\n\"        // and create a reference to `vec`.\\n\"\nmsgstr \"\"\n\"// 튜플 인덱싱을 사용하여 값을 추출하고,\\n\"\n\"        // `vec`에 대한 참조를 생성합니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:31\nmsgid \"\\\"[\\\"\"\nmsgstr \"\\\"[\\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:33\nmsgid \"\"\n\"// Iterate over `v` in `vec` while enumerating the iteration\\n\"\n\"        // index in `index`.\\n\"\nmsgstr \"// `vec`의 `v`를 순회하면서 반복 인덱스를 `index`에 열거합니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:36\nmsgid \"\"\n\"// For every element except the first, add a comma.\\n\"\n\"            // Use the ? operator to return on errors.\\n\"\nmsgstr \"\"\n\"// 첫 번째를 제외한 모든 요소에 콤마를 추가합니다.\\n\"\n\"            // 에러 시 반환하기 위해 ? 연산자를 사용합니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:38 src/std/str.md:36\nmsgid \"\\\", \\\"\"\nmsgstr \"\\\", \\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:42\nmsgid \"// Close the opened bracket and return a fmt::Result value.\\n\"\nmsgstr \"// 열려 있는 대괄호를 닫고 `fmt::Result` 값을 반환합니다.\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:43\nmsgid \"\\\"]\\\"\"\nmsgstr \"\\\"]\\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:55\nmsgid \"\"\n\"Try changing the program so that the index of each element in the vector is \"\n\"also printed. The new output should look like this:\"\nmsgstr \"\"\n\"벡터의 각 요소의 인덱스도 출력되도록 프로그램을 변경해 보세요. 새로운 출력은 \"\n\"다음과 같아야 합니다:\"\n\n#: src/hello/print/print_display/testcase_list.md:64\nmsgid \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/\"\n\"ref.md), [`Result`](../../../std/result.md), [`struct`](../../../\"\n\"custom_types/structs.md), [`?`](../../../std/result/question_mark.md), and \"\n\"[`vec!`](../../../std/vec.md)\"\nmsgstr \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/\"\n\"ref.md), [`Result`](../../../std/result.md), [`구조체`](../../../\"\n\"custom_types/structs.md), [`?`](../../../std/result/question_mark.md), 그리\"\n\"고 [`vec!`](../../../std/vec.md)\"\n\n#: src/hello/print/fmt.md:3\nmsgid \"We've seen that formatting is specified via a _format string_:\"\nmsgstr \"형식화는 _형식 문자열_을 통해 지정되는 것을 보았습니다:\"\n\n#: src/hello/print/fmt.md:5\nmsgid \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\nmsgstr \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\n\n#: src/hello/print/fmt.md:6\nmsgid \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\nmsgstr \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\n\n#: src/hello/print/fmt.md:7\nmsgid \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\nmsgstr \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\n\n#: src/hello/print/fmt.md:9\nmsgid \"\"\n\"The same variable (`foo`) can be formatted differently depending on which \"\n\"_argument type_ is used: `X` vs `o` vs _unspecified_.\"\nmsgstr \"\"\n\"동일한 변수(`foo`)라도 `X`, `o` 또는 _지정되지 않음_과 같이 어떤 _인자 타입_\"\n\"이 사용되느냐에 따라 다르게 형식화될 수 있습니다.\"\n\n#: src/hello/print/fmt.md:12\nmsgid \"\"\n\"This formatting functionality is implemented via traits, and there is one \"\n\"trait for each argument type. The most common formatting trait is `Display`, \"\n\"which handles cases where the argument type is left unspecified: `{}` for \"\n\"instance.\"\nmsgstr \"\"\n\"이 형식화 기능은 트레이트를 통해 구현되며, 각 인자 타입에 대해 하나의 트레이\"\n\"트가 존재합니다. 가장 일반적인 형식화 트레이트는 `Display`이며, 인자 타입이 \"\n\"지정되지 않은 경우(예: `{}`)를 처리합니다.\"\n\n#: src/hello/print/fmt.md:21\nmsgid \"// Latitude\\n\"\nmsgstr \"// 위도\\n\"\n\n#: src/hello/print/fmt.md:23\nmsgid \"// Longitude\\n\"\nmsgstr \"// 경도\\n\"\n\n#: src/hello/print/fmt.md:28\nmsgid \"\"\n\"// `f` is a buffer, and this method must write the formatted string into \"\n\"it.\\n\"\nmsgstr \"// `f`는 버퍼이며, 이 메서드는 버퍼에 형식화된 문자열을 써야 합니다.\\n\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'N'\"\nmsgstr \"'북'\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'S'\"\nmsgstr \"'남'\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'E'\"\nmsgstr \"'동'\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'W'\"\nmsgstr \"'서'\"\n\n#: src/hello/print/fmt.md:33\nmsgid \"\"\n\"// `write!` is like `format!`, but it will write the formatted string\\n\"\n\"        // into a buffer (the first argument).\\n\"\nmsgstr \"\"\n\"// `write!`는 `format!`과 비슷하지만, 형식화된 문자열을\\n\"\n\"        // 버퍼(첫 번째 인자)에 씁니다.\\n\"\n\n#: src/hello/print/fmt.md:35\nmsgid \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\nmsgstr \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\n\n#: src/hello/print/fmt.md:49\nmsgid \"\\\"Dublin\\\"\"\nmsgstr \"\\\"더블린\\\"\"\n\n#: src/hello/print/fmt.md:50\nmsgid \"\\\"Oslo\\\"\"\nmsgstr \"\\\"오슬로\\\"\"\n\n#: src/hello/print/fmt.md:51\nmsgid \"\\\"Vancouver\\\"\"\nmsgstr \"\\\"밴쿠버\\\"\"\n\n#: src/hello/print/fmt.md:60\nmsgid \"\"\n\"// Switch this to use {} once you've added an implementation\\n\"\n\"        // for fmt::Display.\\n\"\nmsgstr \"// fmt::Display 구현을 추가한 후에는 {}를 사용하도록 변경하세요.\\n\"\n\n#: src/hello/print/fmt.md:62 src/primitives/tuples.md:60\n#: src/custom_types/structs.md:47 src/types/inference.md:23\n#: src/conversion/string.md:76 src/generics/bounds.md:49\n#: src/generics/where.md:38 src/std/str.md:137 src/std/result.md:59\n#: src/std/result.md:61 src/std/result.md:63 src/std/arc.md:26\n#: src/std_misc/channels.md:53\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/hello/print/fmt.md:67\nmsgid \"\"\n\"You can view a [full list of formatting traits](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits) and their argument types in the [`std::fmt`]\"\n\"(https://doc.rust-lang.org/std/fmt/) documentation.\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) 문서에서 [형식화 트레이트 전\"\n\"체 목록](https://doc.rust-lang.org/std/fmt/#formatting-traits)과 해당 인자 타\"\n\"입을 확인할 수 있습니다.\"\n\n#: src/hello/print/fmt.md:72\nmsgid \"\"\n\"Add an implementation of the `fmt::Display` trait for the `Color` struct \"\n\"above so that the output displays as:\"\nmsgstr \"\"\n\"위의 `Color` 구조체에 `fmt::Display` 트레이트 구현을 추가하여 다음과 같이 출\"\n\"력되도록 하세요:\"\n\n#: src/hello/print/fmt.md:81\nmsgid \"Two hints if you get stuck:\"\nmsgstr \"막혔을 때를 위한 두 가지 힌트:\"\n\n#: src/hello/print/fmt.md:83\nmsgid \"\"\n\"You [may need to list each color more than once](https://doc.rust-lang.org/\"\n\"std/fmt/#named-parameters).\"\nmsgstr \"\"\n\"[각 색상을 두 번 이상 나열해야 할 수도 있습니다](https://doc.rust-lang.org/\"\n\"std/fmt/#named-parameters).\"\n\n#: src/hello/print/fmt.md:84\nmsgid \"\"\n\"You can [pad with zeros to a width of 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width) with `:0>2`. For hexadecimals, you can use `:02X`.\"\nmsgstr \"\"\n\"`:0>2`를 사용하여 [0을 채워 너비를 2로 맞출](https://doc.rust-lang.org/std/\"\n\"fmt/#width) 수 있습니다. 16진수의 경우 `:02X`를 사용할 수 있습니다.\"\n\n#: src/hello/print/fmt.md:87\nmsgid \"Bonus:\"\nmsgstr \"보너스:\"\n\n#: src/hello/print/fmt.md:89\nmsgid \"\"\n\"If you would like to experiment with [type casting](../../types/cast.md) in \"\n\"advance, the formula for [calculating a color in the RGB color space]\"\n\"(https://www.rapidtables.com/web/color/RGB_Color.html#rgb-format) is `RGB = \"\n\"(R * 65_536) + (G * 256) + B`, where `R is RED, G is GREEN, and B is BLUE`. \"\n\"An unsigned 8-bit integer (`u8`) can only hold numbers up to 255. To cast \"\n\"`u8` to `u32`, you can write `variable_name as u32`.\"\nmsgstr \"\"\n\"[타입 변환(type casting)](../../types/cast.md)을 미리 실험해보고 싶다면, \"\n\"[RGB 색 공간에서 색상을 계산하는 공식](https://www.rapidtables.com/web/color/\"\n\"RGB_Color.html#rgb-format)은 `RGB = (R * 65_536) + (G * 256) + B`이며, 여기\"\n\"서 `R은 RED, G는 GREEN, B는 BLUE`입니다. 부호 없는 8비트 정수(`u8`)는 255까지\"\n\"의 숫자만 담을 수 있습니다. `u8`을 `u32`로 변환하려면 `variable_name as u32`\"\n\"와 같이 쓸 수 있습니다.\"\n\n#: src/hello/print/fmt.md:96\nmsgid \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\nmsgstr \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\n\n#: src/primitives.md:3\nmsgid \"\"\n\"Rust provides access to a wide variety of `primitives`. A sample includes:\"\nmsgstr \"\"\n\"Rust는 다양한 `기본 자료형(primitives)`에 대한 접근을 제공합니다. 샘플은 다음\"\n\"과 같습니다:\"\n\n#: src/primitives.md:5\nmsgid \"Scalar Types\"\nmsgstr \"스칼라 타입\"\n\n#: src/primitives.md:7\nmsgid \"\"\n\"Signed integers: `i8`, `i16`, `i32`, `i64`, `i128` and `isize` (pointer size)\"\nmsgstr \"\"\n\"부호 있는 정수: `i8`, `i16`, `i32`, `i64`, `i128` 및 `isize` (포인터 크기)\"\n\n#: src/primitives.md:8\nmsgid \"\"\n\"Unsigned integers: `u8`, `u16`, `u32`, `u64`, `u128` and `usize` (pointer \"\n\"size)\"\nmsgstr \"\"\n\"부호 없는 정수: `u8`, `u16`, `u32`, `u64`, `u128` 및 `usize` (포인터 크기)\"\n\n#: src/primitives.md:10\nmsgid \"Floating point: `f32`, `f64`\"\nmsgstr \"부동 소수점: `f32`, `f64`\"\n\n#: src/primitives.md:11\nmsgid \"`char` Unicode scalar values like `'a'`, `'α'` and `'∞'` (4 bytes each)\"\nmsgstr \"`char` 유니코드 스칼라 값: `'a'`, `'α'`, `'∞'` 등 (각 4바이트)\"\n\n#: src/primitives.md:12\nmsgid \"`bool` either `true` or `false`\"\nmsgstr \"`bool`: `true` 또는 `false`\"\n\n#: src/primitives.md:13\nmsgid \"The unit type `()`, whose only possible value is an empty tuple: `()`\"\nmsgstr \"유닛 타입 `()`: 가능한 유일한 값은 빈 튜플 `()`입니다.\"\n\n#: src/primitives.md:15\nmsgid \"\"\n\"Despite the value of a unit type being a tuple, it is not considered a \"\n\"compound type because it does not contain multiple values.\"\nmsgstr \"\"\n\"유닛 타입의 값이 튜플임에도 불구하고, 여러 값을 포함하지 않기 때문에 복합 타\"\n\"입(compound type)으로 간주되지 않습니다.\"\n\n#: src/primitives.md:18\nmsgid \"Compound Types\"\nmsgstr \"복합 타입\"\n\n#: src/primitives.md:20\nmsgid \"Arrays like `[1, 2, 3]`\"\nmsgstr \"`[1, 2, 3]`과 같은 배열\"\n\n#: src/primitives.md:21\nmsgid \"Tuples like `(1, true)`\"\nmsgstr \"`(1, true)`와 같은 튜플\"\n\n#: src/primitives.md:23\nmsgid \"\"\n\"Variables can always be _type annotated_. Numbers may additionally be \"\n\"annotated via a _suffix_ or _by default_. Integers default to `i32` and \"\n\"floats to `f64`. Note that Rust can also infer types from context.\"\nmsgstr \"\"\n\"변수는 항상 _타입 어노테이션_이 가능합니다. 숫자는 추가적으로 _접미사\"\n\"(suffix)_를 통하거나 _기본값_으로 어노테이션될 수 있습니다. 정수 기본값은 \"\n\"`i32`이고 부동 소수점 기본값은 `f64`입니다. 또한 Rust는 문맥으로부터 타입을 \"\n\"추론할 수도 있습니다.\"\n\n#: src/primitives.md:29\nmsgid \"// Variables can be type annotated.\\n\"\nmsgstr \"// 변수는 타입 어노테이션이 가능합니다.\\n\"\n\n#: src/primitives.md:32\nmsgid \"// Regular annotation\\n\"\nmsgstr \"// 일반적인 어노테이션\\n\"\n\n#: src/primitives.md:33\nmsgid \"// Suffix annotation\\n\"\nmsgstr \"// 접미사 어노테이션\\n\"\n\n#: src/primitives.md:35\nmsgid \"// Or a default will be used.\\n\"\nmsgstr \"// 혹은 기본값이 사용됩니다.\\n\"\n\n#: src/primitives.md:36\nmsgid \"// `f64`\\n\"\nmsgstr \"// `f64`\\n\"\n\n#: src/primitives.md:37\nmsgid \"// `i32`\\n\"\nmsgstr \"// `i32`\\n\"\n\n#: src/primitives.md:39\nmsgid \"// A type can also be inferred from context.\\n\"\nmsgstr \"// 타입을 문맥에서 추론할 수도 있습니다.\\n\"\n\n#: src/primitives.md:40\nmsgid \"// Type i64 is inferred from another line.\\n\"\nmsgstr \"// i64 타입이 다른 줄에서 추론됩니다.\\n\"\n\n#: src/primitives.md:43\nmsgid \"// A mutable variable's value can be changed.\\n\"\nmsgstr \"// 가변 변수의 값은 변경될 수 있습니다.\\n\"\n\n#: src/primitives.md:44\nmsgid \"// Mutable `i32`\\n\"\nmsgstr \"// 가변 `i32`\\n\"\n\n#: src/primitives.md:47\nmsgid \"// Error! The type of a variable can't be changed.\\n\"\nmsgstr \"// 에러! 변수의 타입은 변경할 수 없습니다.\\n\"\n\n#: src/primitives.md:50\nmsgid \"// Variables can be overwritten with shadowing.\\n\"\nmsgstr \"// 변수는 섀도잉(shadowing)을 통해 덮어쓸 수 있습니다.\\n\"\n\n#: src/primitives.md:53\nmsgid \"/* Compound types - Array and Tuple */\"\nmsgstr \"/* 복합 타입 - 배열과 튜플 */\"\n\n#: src/primitives.md:55\nmsgid \"// Array signature consists of Type T and length as [T; length].\\n\"\nmsgstr \"// 배열 시그니처는 타입 T와 길이를 포함하여 [T; length] 형식입니다.\\n\"\n\n#: src/primitives.md:58\nmsgid \"\"\n\"// Tuple is a collection of values of different types\\n\"\n\"    // and is constructed using parentheses ().\\n\"\nmsgstr \"\"\n\"// 튜플은 서로 다른 타입의 값들을 모아놓은 것이며\\n\"\n\"    // 소괄호 ()를 사용하여 구성됩니다.\\n\"\n\n#: src/primitives.md:66\nmsgid \"\"\n\"[the `std` library](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [`inference`](types/inference.md), and \"\n\"[`shadowing`](variable_bindings/scope.md)\"\nmsgstr \"\"\n\"[`std` 라이브러리](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [`추론(inference)`](types/inference.md), 그리고 \"\n\"[`섀도잉(shadowing)`](variable_bindings/scope.md)\"\n\n#: src/primitives/literals.md:3\nmsgid \"\"\n\"Integers `1`, floats `1.2`, characters `'a'`, strings `\\\"abc\\\"`, booleans \"\n\"`true` and the unit type `()` can be expressed using literals.\"\nmsgstr \"\"\n\"정수 `1`, 부동 소수점 `1.2`, 문자 `'a'`, 문자열 `\\\"abc\\\"`, 불리언 `true` 그리\"\n\"고 유닛 타입 `()`은 리터럴을 사용하여 표현할 수 있습니다.\"\n\n#: src/primitives/literals.md:6\nmsgid \"\"\n\"Integers can, alternatively, be expressed using hexadecimal, octal or binary \"\n\"notation using these prefixes respectively: `0x`, `0o` or `0b`.\"\nmsgstr \"\"\n\"정수는 또한 `0x`, `0o`, `0b` 접두사를 사용하여 각각 16진수, 8진수, 2진수 표기\"\n\"법으로 표현할 수 있습니다.\"\n\n#: src/primitives/literals.md:9\nmsgid \"\"\n\"Underscores can be inserted in numeric literals to improve readability, e.g. \"\n\"`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.\"\nmsgstr \"\"\n\"가독성을 높이기 위해 숫자 리터럴에 언더스코어(_)를 삽입할 수 있습니다. 예를 \"\n\"들어 `1_000`은 `1000`과 같고, `0.000_001`은 `0.000001`과 같습니다.\"\n\n#: src/primitives/literals.md:12\nmsgid \"\"\n\"Rust also supports scientific [E-notation](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation), e.g. `1e6`, `7.6e-4`. The associated type \"\n\"is `f64`.\"\nmsgstr \"\"\n\"Rust는 또한 과학적 기수법([E-표기법](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation))을 지원합니다. (예: `1e6`, `7.6e-4`). 관련 타\"\n\"입은 `f64`입니다.\"\n\n#: src/primitives/literals.md:15\nmsgid \"\"\n\"We need to tell the compiler the type of the literals we use. For now, we'll \"\n\"use the `u32` suffix to indicate that the literal is an unsigned 32-bit \"\n\"integer, and the `i32` suffix to indicate that it's a signed 32-bit integer.\"\nmsgstr \"\"\n\"우리는 사용하는 리터럴의 타입을 컴파일러에게 알려주어야 합니다. 당분간은 부\"\n\"호 없는 32비트 정수임을 나타내기 위해 `u32` 접미사를 사용하고, 부호 있는 32비\"\n\"트 정수임을 나타내기 위해 `i32` 접미사를 사용할 것입니다.\"\n\n#: src/primitives/literals.md:19\nmsgid \"\"\n\"The operators available and their precedence [in Rust](https://doc.rust-\"\n\"lang.org/reference/expressions.html#expression-precedence) are similar to \"\n\"other [C-like languages](https://en.wikipedia.org/wiki/\"\n\"Operator_precedence#Programming_languages).\"\nmsgstr \"\"\n\"[Rust에서의](https://doc.rust-lang.org/reference/expressions.html#expression-\"\n\"precedence) 사용 가능한 연산자와 우선순위는 다른 [C 계열 언어들](https://\"\n\"en.wikipedia.org/wiki/Operator_precedence#Programming_languages)과 유사합니\"\n\"다.\"\n\n#: src/primitives/literals.md:24\nmsgid \"// Integer addition\\n\"\nmsgstr \"// 정수 덧셈\\n\"\n\n#: src/primitives/literals.md:25\nmsgid \"\\\"1 + 2 = {}\\\"\"\nmsgstr \"\\\"1 + 2 = {}\\\"\"\n\n#: src/primitives/literals.md:27\nmsgid \"// Integer subtraction\\n\"\nmsgstr \"// 정수 뺄셈\\n\"\n\n#: src/primitives/literals.md:28\nmsgid \"\\\"1 - 2 = {}\\\"\"\nmsgstr \"\\\"1 - 2 = {}\\\"\"\n\n#: src/primitives/literals.md:29\nmsgid \"\"\n\"// TODO ^ Try changing `1i32` to `1u32` to see why the type is important\\n\"\nmsgstr \"\"\n\"// TODO ^ `1i32`를 `1u32`로 변경하여 타입이 중요한 이유를 확인해 보세요\\n\"\n\n#: src/primitives/literals.md:31\nmsgid \"// Scientific notation\\n\"\nmsgstr \"// 과학적 표기법\\n\"\n\n#: src/primitives/literals.md:32\nmsgid \"\\\"1e4 is {}, -2.5e-3 is {}\\\"\"\nmsgstr \"\\\"1e4는 {}, -2.5e-3은 {}입니다\\\"\"\n\n#: src/primitives/literals.md:34\nmsgid \"// Short-circuiting boolean logic\\n\"\nmsgstr \"// 단락(Short-circuiting) 불리언 로직\\n\"\n\n#: src/primitives/literals.md:35\nmsgid \"\\\"true AND false is {}\\\"\"\nmsgstr \"\\\"true AND false는 {}입니다\\\"\"\n\n#: src/primitives/literals.md:36\nmsgid \"\\\"true OR false is {}\\\"\"\nmsgstr \"\\\"true OR false는 {}입니다\\\"\"\n\n#: src/primitives/literals.md:37\nmsgid \"\\\"NOT true is {}\\\"\"\nmsgstr \"\\\"NOT true는 {}입니다\\\"\"\n\n#: src/primitives/literals.md:39\nmsgid \"// Bitwise operations\\n\"\nmsgstr \"// 비트 연산\\n\"\n\n#: src/primitives/literals.md:40\nmsgid \"\\\"0011 AND 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 AND 0101은 {:04b}입니다\\\"\"\n\n#: src/primitives/literals.md:41\nmsgid \"\\\"0011 OR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 OR 0101은 {:04b}입니다\\\"\"\n\n#: src/primitives/literals.md:42\nmsgid \"\\\"0011 XOR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 XOR 0101은 {:04b}입니다\\\"\"\n\n#: src/primitives/literals.md:43\nmsgid \"\\\"1 << 5 is {}\\\"\"\nmsgstr \"\\\"1 << 5는 {}입니다\\\"\"\n\n#: src/primitives/literals.md:44\nmsgid \"\\\"0x80 >> 2 is 0x{:x}\\\"\"\nmsgstr \"\\\"0x80 >> 2는 0x{:x}입니다\\\"\"\n\n#: src/primitives/literals.md:46\nmsgid \"// Use underscores to improve readability!\\n\"\nmsgstr \"// 가독성을 높이기 위해 밑줄을 사용하세요!\\n\"\n\n#: src/primitives/literals.md:47\nmsgid \"\\\"One million is written as {}\\\"\"\nmsgstr \"\\\"백만은 {}로 씁니다\\\"\"\n\n#: src/primitives/tuples.md:3\nmsgid \"\"\n\"A tuple is a collection of values of different types. Tuples are constructed \"\n\"using parentheses `()`, and each tuple itself is a value with type signature \"\n\"`(T1, T2, ...)`, where `T1`, `T2` are the types of its members. Functions \"\n\"can use tuples to return multiple values, as tuples can hold any number of \"\n\"values.\"\nmsgstr \"\"\n\"튜플은 서로 다른 타입의 값들의 모음입니다. 튜플은 괄호 `()`를 사용하여 생성되\"\n\"며, 각 튜플 자체는 `(T1, T2, ...)` 형태의 타입 시그니처를 가진 값입니다. 여기\"\n\"서 `T1`, `T2`는 튜플 멤버의 타입입니다. 튜플은 여러 값을 담을 수 있으므로 함\"\n\"수에서 여러 값을 반환하는 데 사용할 수 있습니다.\"\n\n#: src/primitives/tuples.md:9\nmsgid \"// Tuples can be used as function arguments and as return values.\\n\"\nmsgstr \"// 튜플은 함수의 인자와 반환값으로 사용될 수 있습니다.\\n\"\n\n#: src/primitives/tuples.md:11\nmsgid \"// `let` can be used to bind the members of a tuple to variables.\\n\"\nmsgstr \"// `let`을 사용하여 튜플의 멤버를 변수에 바인딩할 수 있습니다.\\n\"\n\n#: src/primitives/tuples.md:16\nmsgid \"// The following struct is for the activity.\\n\"\nmsgstr \"// 다음 구조체는 실습을 위한 것입니다.\\n\"\n\n#: src/primitives/tuples.md:22\nmsgid \"// A tuple with a bunch of different types.\\n\"\nmsgstr \"// 여러 다른 타입을 가진 튜플입니다.\\n\"\n\n#: src/primitives/tuples.md:26 src/generics.md:50 src/generics.md:55\n#: src/generics/gen_fn.md:47\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/primitives/tuples.md:28\nmsgid \"// Values can be extracted from the tuple using tuple indexing.\\n\"\nmsgstr \"// 튜플 인덱싱을 사용하여 튜플에서 값을 추출할 수 있습니다.\\n\"\n\n#: src/primitives/tuples.md:29\nmsgid \"\\\"Long tuple first value: {}\\\"\"\nmsgstr \"\\\"긴 튜플의 첫 번째 값: {}\\\"\"\n\n#: src/primitives/tuples.md:30\nmsgid \"\\\"Long tuple second value: {}\\\"\"\nmsgstr \"\\\"긴 튜플의 두 번째 값: {}\\\"\"\n\n#: src/primitives/tuples.md:32\nmsgid \"// Tuples can be tuple members.\\n\"\nmsgstr \"// 튜플은 튜플의 멤버가 될 수 있습니다.\\n\"\n\n#: src/primitives/tuples.md:35\nmsgid \"// Tuples are printable.\\n\"\nmsgstr \"// 튜플은 출력 가능합니다.\\n\"\n\n#: src/primitives/tuples.md:36\nmsgid \"\\\"tuple of tuples: {:?}\\\"\"\nmsgstr \"\\\"튜플의 튜플: {:?}\\\"\"\n\n#: src/primitives/tuples.md:38\nmsgid \"\"\n\"// But long Tuples (more than 12 elements) cannot be printed.\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"Too long tuple: {:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ Uncomment the above 2 lines to see the compiler error\\n\"\nmsgstr \"\"\n\"// 하지만 긴 튜플(요소 12개 초과)은 출력할 수 없습니다.\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"Too long tuple: {:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ 위의 두 줄의 주석을 해제하여 컴파일 에러를 확인해 보세요\\n\"\n\n#: src/primitives/tuples.md:44\nmsgid \"\\\"Pair is {:?}\\\"\"\nmsgstr \"\\\"페어는 {:?}입니다\\\"\"\n\n#: src/primitives/tuples.md:46\nmsgid \"\\\"The reversed pair is {:?}\\\"\"\nmsgstr \"\\\"반전된 페어는 {:?}입니다\\\"\"\n\n#: src/primitives/tuples.md:48\nmsgid \"\"\n\"// To create one element tuples, the comma is required to tell them apart\\n\"\n\"    // from a literal surrounded by parentheses.\\n\"\nmsgstr \"\"\n\"// 요소가 하나인 튜플을 만들려면, 괄호로 둘러싸인 리터럴과\\n\"\n\"    // 구분하기 위해 콤마가 필요합니다.\\n\"\n\n#: src/primitives/tuples.md:50\nmsgid \"\\\"One element tuple: {:?}\\\"\"\nmsgstr \"\\\"요소가 하나인 튜플: {:?}\\\"\"\n\n#: src/primitives/tuples.md:51\nmsgid \"\\\"Just an integer: {:?}\\\"\"\nmsgstr \"\\\"그냥 정수: {:?}\\\"\"\n\n#: src/primitives/tuples.md:53\nmsgid \"// Tuples can be destructured to create bindings.\\n\"\nmsgstr \"// 튜플은 구조 분해(destructure)하여 바인딩을 생성할 수 있습니다.\\n\"\n\n#: src/primitives/tuples.md:54 src/conversion/from_into.md:17\n#: src/fn/closures/input_parameters.md:52 src/std_misc/fs.md:51\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"안녕\\\"\"\n\n#: src/primitives/tuples.md:57\nmsgid \"\\\"{:?}, {:?}, {:?}, {:?}\\\"\"\nmsgstr \"\\\"{:?}, {:?}, {:?}, {:?}\\\"\"\n\n#: src/primitives/tuples.md:66\nmsgid \"\"\n\"_Recap_: Add the `fmt::Display` trait to the `Matrix` struct in the above \"\n\"example, so that if you switch from printing the debug format `{:?}` to the \"\n\"display format `{}`, you see the following output:\"\nmsgstr \"\"\n\"_요약_: 위 예제의 `Matrix` 구조체에 `fmt::Display` 트레이트를 추가하여, 디버\"\n\"그 형식 `{:?}`에서 디스플레이 형식 `{}`로 출력을 전환했을 때 다음과 같은 출력\"\n\"이 나오도록 하세요:\"\n\n#: src/primitives/tuples.md:75\nmsgid \"\"\n\"You may want to refer back to the example for [print display](../hello/print/\"\n\"print_display.md).\"\nmsgstr \"\"\n\"[표시 출력](../hello/print/print_display.md)에 대한 예제를 다시 참조하고 싶\"\n\"을 수도 있습니다.\"\n\n#: src/primitives/tuples.md:76\nmsgid \"\"\n\"Add a `transpose` function using the `reverse` function as a template, which \"\n\"accepts a matrix as an argument, and returns a matrix in which two elements \"\n\"have been swapped. For example:\"\nmsgstr \"\"\n\"`reverse` 함수를 템플릿으로 사용하여 `transpose` 함수를 추가하세요. 이 함수\"\n\"는 행렬을 인자로 받아 두 요소가 바뀐 행렬을 반환합니다. 예를 들어:\"\n\n#: src/primitives/tuples.md:81\nmsgid \"\\\"Matrix:\\\\n{}\\\"\"\nmsgstr \"\\\"행렬:\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:82\nmsgid \"\\\"Transpose:\\\\n{}\\\"\"\nmsgstr \"\\\"전치(Transpose):\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:85\nmsgid \"Results in the output:\"\nmsgstr \"출력 결과:\"\n\n#: src/primitives/array.md:3\nmsgid \"\"\n\"An array is a collection of objects of the same type `T`, stored in \"\n\"contiguous memory. Arrays are created using brackets `[]`, and their length, \"\n\"which is known at compile time, is part of their type signature `[T; \"\n\"length]`.\"\nmsgstr \"\"\n\"배열은 연속된 메모리에 저장된 동일한 타입 `T`를 가진 객체들의 모음입니다. 배\"\n\"열은 대괄호 `[]`를 사용하여 생성되며, 컴파일 타임에 알려진 배열의 길이는 타\"\n\"입 시그니처 `[T; length]`의 일부가 됩니다.\"\n\n#: src/primitives/array.md:7\nmsgid \"\"\n\"Slices are similar to arrays, but their length is not known at compile time. \"\n\"Instead, a slice is a two-word object; the first word is a pointer to the \"\n\"data, the second word is the length of the slice. The word size is the same \"\n\"as usize, determined by the processor architecture, e.g. 64 bits on an \"\n\"x86-64. Slices can be used to borrow a section of an array and have the type \"\n\"signature `&[T]`.\"\nmsgstr \"\"\n\"슬라이스는 배열과 유사하지만, 컴파일 타임에 그 길이를 알 수 없습니다. 대신, \"\n\"슬라이스는 두 개의 워드(word)로 구성된 객체입니다. 첫 번째 워드는 데이터에 대\"\n\"한 포인터이고, 두 번째 워드는 슬라이스의 길이입니다. 워드 크기는 프로세서 아\"\n\"키텍처에 의해 결정되는 usize와 같으며, 예를 들어 x86-64에서는 64비트입니다. \"\n\"슬라이스는 배열의 일부분을 빌려오는 데 사용될 수 있으며 `&[T]`라는 타입 시그\"\n\"니처를 가집니다.\"\n\n#: src/primitives/array.md:15\nmsgid \"// This function borrows a slice.\\n\"\nmsgstr \"// 이 함수는 슬라이스를 빌려옵니다.\\n\"\n\n#: src/primitives/array.md:18\nmsgid \"\\\"First element of the slice: {}\\\"\"\nmsgstr \"\\\"슬라이스의 첫 번째 요소: {}\\\"\"\n\n#: src/primitives/array.md:19\nmsgid \"\\\"The slice has {} elements\\\"\"\nmsgstr \"\\\"슬라이스는 {}개의 요소를 가지고 있습니다\\\"\"\n\n#: src/primitives/array.md:23\nmsgid \"// Fixed-size array (type signature is superfluous).\\n\"\nmsgstr \"// 고정 크기 배열 (타입 시그니처는 생략 가능합니다).\\n\"\n\n#: src/primitives/array.md:26\nmsgid \"// All elements can be initialized to the same value.\\n\"\nmsgstr \"// 모든 요소를 동일한 값으로 초기화할 수 있습니다.\\n\"\n\n#: src/primitives/array.md:29\nmsgid \"// Indexing starts at 0.\\n\"\nmsgstr \"// 인덱싱은 0부터 시작합니다.\\n\"\n\n#: src/primitives/array.md:30\nmsgid \"\\\"First element of the array: {}\\\"\"\nmsgstr \"\\\"배열의 첫 번째 요소: {}\\\"\"\n\n#: src/primitives/array.md:31\nmsgid \"\\\"Second element of the array: {}\\\"\"\nmsgstr \"\\\"배열의 두 번째 요소: {}\\\"\"\n\n#: src/primitives/array.md:33\nmsgid \"// `len` returns the count of elements in the array.\\n\"\nmsgstr \"// `len`은 배열의 요소 개수를 반환합니다.\\n\"\n\n#: src/primitives/array.md:34\nmsgid \"\\\"Number of elements in array: {}\\\"\"\nmsgstr \"\\\"배열의 요소 개수: {}\\\"\"\n\n#: src/primitives/array.md:36\nmsgid \"// Arrays are stack allocated.\\n\"\nmsgstr \"// 배열은 스택에 할당됩니다.\\n\"\n\n#: src/primitives/array.md:37\nmsgid \"\\\"Array occupies {} bytes\\\"\"\nmsgstr \"\\\"배열의 점유 메모리: {} 바이트\\\"\"\n\n#: src/primitives/array.md:39\nmsgid \"// Arrays can be automatically borrowed as slices.\\n\"\nmsgstr \"// 배열은 자동으로 슬라이스로 빌려올 수 있습니다.\\n\"\n\n#: src/primitives/array.md:40\nmsgid \"\\\"Borrow the whole array as a slice.\\\"\"\nmsgstr \"\\\"배열 전체를 슬라이스로 빌려옵니다.\\\"\"\n\n#: src/primitives/array.md:43\nmsgid \"\"\n\"// Slices can point to a section of an array.\\n\"\n\"    // They are of the form [starting_index..ending_index].\\n\"\n\"    // `starting_index` is the first position in the slice.\\n\"\n\"    // `ending_index` is one more than the last position in the slice.\\n\"\nmsgstr \"\"\n\"// 슬라이스는 배열의 한 섹션을 가리킬 수 있습니다.\\n\"\n\"    // [시작_인덱스..종료_인덱스] 형태입니다.\\n\"\n\"    // `시작_인덱스`는 슬라이스의 첫 번째 위치입니다.\\n\"\n\"    // `종료_인덱스`는 슬라이스의 마지막 위치보다 하나 더 큰 값입니다.\\n\"\n\n#: src/primitives/array.md:47\nmsgid \"\\\"Borrow a section of the array as a slice.\\\"\"\nmsgstr \"\\\"배열의 한 섹션을 슬라이스로 빌려옵니다.\\\"\"\n\n#: src/primitives/array.md:50\nmsgid \"// Example of empty slice `&[]`:\\n\"\nmsgstr \"// 빈 슬라이스 `&[]`의 예시:\\n\"\n\n#: src/primitives/array.md:53\nmsgid \"// Same but more verbose\\n\"\nmsgstr \"// 동일하지만 더 장황한 표현\\n\"\n\n#: src/primitives/array.md:55\nmsgid \"\"\n\"// Arrays can be safely accessed using `.get`, which returns an\\n\"\n\"    // `Option`. This can be matched as shown below, or used with\\n\"\n\"    // `.expect()` if you would like the program to exit with a nice\\n\"\n\"    // message instead of happily continue.\\n\"\nmsgstr \"\"\n\"// 배열은 `.get`을 사용하여 안전하게 접근할 수 있으며, 이는 `Option`을 반환합\"\n\"니다.\\n\"\n\"    // 이는 아래와 같이 매치(match)될 수 있으며, 프로그램을 계속 진행하는 대\"\n\"신\\n\"\n\"    // 친절한 메시지와 함께 종료하고 싶다면 `.expect()`와 함께 사용될 수 있습\"\n\"니다.\\n\"\n\n#: src/primitives/array.md:59\nmsgid \"// Oops, one element too far!\\n\"\nmsgstr \"// 이런, 범위를 하나 벗어났네요!\\n\"\n\n#: src/primitives/array.md:61\nmsgid \"\\\"{}: {}\\\"\"\nmsgstr \"\\\"{}: {}\\\"\"\n\n#: src/primitives/array.md:62\nmsgid \"\\\"Slow down! {} is too far!\\\"\"\nmsgstr \"\\\"진정하세요! {}는 너무 멀리 갔습니다!\\\"\"\n\n#: src/primitives/array.md:66\nmsgid \"\"\n\"// Out of bound indexing on array with constant value causes compile time \"\n\"error.\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // Out of bound indexing on slice causes runtime error.\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\nmsgstr \"\"\n\"// 상수 값을 사용한 배열의 범위를 벗어난 인덱싱은 컴파일 타임 에러를 발생시킵\"\n\"니다.\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // 슬라이스에서 범위를 벗어난 인덱싱은 런타임 에러를 발생시킵니다.\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\n\n#: src/custom_types.md:3\nmsgid \"Rust custom data types are formed mainly through the two keywords:\"\nmsgstr \"\"\n\"Rust의 사용자 정의 데이터 타입은 주로 다음 두 키워드를 통해 형성됩니다:\"\n\n#: src/custom_types.md:5\nmsgid \"`struct`: define a structure\"\nmsgstr \"`struct`: 구조체를 정의합니다\"\n\n#: src/custom_types.md:6\nmsgid \"`enum`: define an enumeration\"\nmsgstr \"`enum`: 열거형을 정의합니다\"\n\n#: src/custom_types.md:8\nmsgid \"Constants can also be created via the `const` and `static` keywords.\"\nmsgstr \"상수는 `const`와 `static` 키워드를 통해 생성할 수 있습니다.\"\n\n#: src/custom_types/structs.md:3\nmsgid \"\"\n\"There are three types of structures (\\\"structs\\\") that can be created using \"\n\"the `struct` keyword:\"\nmsgstr \"\"\n\"`struct` 키워드를 사용하여 생성할 수 있는 구조체(\\\"structs\\\")에는 세 가지 유\"\n\"형이 있습니다:\"\n\n#: src/custom_types/structs.md:6\nmsgid \"Tuple structs, which are, basically, named tuples.\"\nmsgstr \"기본적으로 이름이 붙은 튜플인 튜플 구조체.\"\n\n#: src/custom_types/structs.md:7\nmsgid \"\"\n\"The classic [C structs](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\nmsgstr \"\"\n\"전통적인 [C 구조체](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\n\n#: src/custom_types/structs.md:8\nmsgid \"Unit structs, which are field-less, are useful for generics.\"\nmsgstr \"필드가 없는 유닛 구조체로, 제네릭에 유용합니다.\"\n\n#: src/custom_types/structs.md:11 src/custom_types/enum/enum_use.md:6\n#: src/custom_types/enum/c_like.md:6\nmsgid \"// An attribute to hide warnings for unused code.\\n\"\nmsgstr \"// 사용되지 않는 코드에 대한 경고를 숨기기 위한 속성입니다.\\n\"\n\n#: src/custom_types/structs.md:19\nmsgid \"// A unit struct\\n\"\nmsgstr \"// 유닛 구조체\\n\"\n\n#: src/custom_types/structs.md:22\nmsgid \"// A tuple struct\\n\"\nmsgstr \"// 튜플 구조체\\n\"\n\n#: src/custom_types/structs.md:25\nmsgid \"// A struct with two fields\\n\"\nmsgstr \"// 두 개의 필드를 가진 구조체\\n\"\n\n#: src/custom_types/structs.md:31\nmsgid \"// Structs can be reused as fields of another struct\\n\"\nmsgstr \"// 구조체는 다른 구조체의 필드로 재사용될 수 있습니다.\\n\"\n\n#: src/custom_types/structs.md:34\nmsgid \"\"\n\"// A rectangle can be specified by where the top left and bottom right\\n\"\n\"    // corners are in space.\\n\"\nmsgstr \"\"\n\"// 사각형은 공간상에서 왼쪽 위와 오른쪽 아래 모서리의 위치로 지정될 수 있습니\"\n\"다.\\n\"\n\n#: src/custom_types/structs.md:41\nmsgid \"// Create struct with field init shorthand\\n\"\nmsgstr \"// 필드 초기화 축약형(field init shorthand)으로 구조체를 생성합니다.\\n\"\n\n#: src/custom_types/structs.md:46\nmsgid \"// Print debug struct\\n\"\nmsgstr \"// 디버그용 구조체 출력\\n\"\n\n#: src/custom_types/structs.md:49\nmsgid \"// Instantiate a `Point`\\n\"\nmsgstr \"// `Point` 인스턴스 생성\\n\"\n\n#: src/custom_types/structs.md:53\nmsgid \"// Access the fields of the point\\n\"\nmsgstr \"// 좌표의 필드에 접근\\n\"\n\n#: src/custom_types/structs.md:54\nmsgid \"\\\"point coordinates: ({}, {})\\\"\"\nmsgstr \"\\\"좌표 좌표: ({}, {})\\\"\"\n\n#: src/custom_types/structs.md:56\nmsgid \"\"\n\"// Make a new point by using struct update syntax to use the fields of our\\n\"\n\"    // other one\\n\"\nmsgstr \"\"\n\"// 구조체 업데이트 구문을 사용하여 다른 포인트의 필드를 활용해\\n\"\n\"    // 새로운 포인트를 만듭니다.\\n\"\n\n#: src/custom_types/structs.md:60\nmsgid \"\"\n\"// `bottom_right.y` will be the same as `another_point.y` because we used \"\n\"that field\\n\"\n\"    // from `another_point`\\n\"\nmsgstr \"\"\n\"// `another_point`의 필드를 사용했으므로 `bottom_right.y`는 `another_point.y`\"\n\"와 동일합니다.\\n\"\n\n#: src/custom_types/structs.md:62\nmsgid \"\\\"second point: ({}, {})\\\"\"\nmsgstr \"\\\"두 번째 좌표: ({}, {})\\\"\"\n\n#: src/custom_types/structs.md:64\nmsgid \"// Destructure the point using a `let` binding\\n\"\nmsgstr \"// `let` 바인딩을 사용하여 좌표를 구조 분해합니다.\\n\"\n\n#: src/custom_types/structs.md:68\nmsgid \"// struct instantiation is an expression too\\n\"\nmsgstr \"// 구조체 인스턴스 생성은 표현식이기도 합니다.\\n\"\n\n#: src/custom_types/structs.md:73\nmsgid \"// Instantiate a unit struct\\n\"\nmsgstr \"// 유닛 구조체 인스턴스 생성\\n\"\n\n#: src/custom_types/structs.md:76\nmsgid \"// Instantiate a tuple struct\\n\"\nmsgstr \"// 튜플 구조체 인스턴스 생성\\n\"\n\n#: src/custom_types/structs.md:79\nmsgid \"// Access the fields of a tuple struct\\n\"\nmsgstr \"// 튜플 구조체의 필드에 접근\\n\"\n\n#: src/custom_types/structs.md:80 src/custom_types/structs.md:85\nmsgid \"\\\"pair contains {:?} and {:?}\\\"\"\nmsgstr \"\\\"페어는 {:?}와 {:?}를 포함합니다\\\"\"\n\n#: src/custom_types/structs.md:82\nmsgid \"// Destructure a tuple struct\\n\"\nmsgstr \"// 튜플 구조체 구조 분해\\n\"\n\n#: src/custom_types/structs.md:91\nmsgid \"\"\n\"Add a function `rect_area` which calculates the area of a `Rectangle` (try \"\n\"using nested destructuring).\"\nmsgstr \"\"\n\"`Rectangle`의 넓이를 계산하는 `rect_area` 함수를 추가하세요. (중첩된 구조 분\"\n\"해를 사용해 보세요).\"\n\n#: src/custom_types/structs.md:93\nmsgid \"\"\n\"Add a function `square` which takes a `Point` and a `f32` as arguments, and \"\n\"returns a `Rectangle` with its top left corner on the point, and a width and \"\n\"height corresponding to the `f32`.\"\nmsgstr \"\"\n\"`Point`와 `f32`를 인자로 받아, 해당 포인트를 왼쪽 위 모서리로 하고 `f32`에 해\"\n\"당하는 너비와 높이를 가진 `Rectangle`을 반환하는 `square` 함수를 추가하세요.\"\n\n#: src/custom_types/structs.md:97\nmsgid \"See also\"\nmsgstr \"참고\"\n\n#: src/custom_types/structs.md:99\nmsgid \"\"\n\"[`attributes`](../attribute.md), [raw identifiers](../compatibility/\"\n\"raw_identifiers.md) and [destructuring](../flow_control/match/\"\n\"destructuring.md)\"\nmsgstr \"\"\n\"[`속성`](../attribute.md), [raw 식별자](../compatibility/raw_identifiers.md) \"\n\"및 [구조 분해](../flow_control/match/destructuring.md)\"\n\n#: src/custom_types/enum.md:3\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which may be one of a few \"\n\"different variants. Any variant which is valid as a `struct` is also valid \"\n\"in an `enum`.\"\nmsgstr \"\"\n\"`enum` 키워드는 몇 가지 다른 변체 중 하나일 수 있는 타입을 생성할 수 있게 합\"\n\"니다. `struct`로 유효한 모든 변체는 `enum`에서도 유효합니다.\"\n\n#: src/custom_types/enum.md:8\nmsgid \"\"\n\"// Create an `enum` to classify a web event. Note how both\\n\"\n\"// names and type information together specify the variant:\\n\"\n\"// `PageLoad != PageUnload` and `KeyPress(char) != Paste(String)`.\\n\"\n\"// Each is different and independent.\\n\"\nmsgstr \"\"\n\"// 웹 이벤트를 분류하기 위한 `enum`을 생성합니다. 이름과 타입 정보가\\n\"\n\"// 함께 변체를 지정하는 방식에 주목하세요:\\n\"\n\"// `PageLoad != PageUnload` 이고 `KeyPress(char) != Paste(String)` 입니다.\\n\"\n\"// 각각은 서로 다르고 독립적입니다.\\n\"\n\n#: src/custom_types/enum.md:13\nmsgid \"// An `enum` variant may either be `unit-like`,\\n\"\nmsgstr \"// `enum` 변체는 유닛 형태(unit-like)일 수도 있고,\\n\"\n\n#: src/custom_types/enum.md:16\nmsgid \"// like tuple structs,\\n\"\nmsgstr \"// 튜플 구조체 형태일 수도 있으며,\\n\"\n\n#: src/custom_types/enum.md:19\nmsgid \"// or c-like structures.\\n\"\nmsgstr \"// 또는 C 구조체 형태일 수도 있습니다.\\n\"\n\n#: src/custom_types/enum.md:22\nmsgid \"\"\n\"// A function which takes a `WebEvent` enum as an argument and\\n\"\n\"// returns nothing.\\n\"\nmsgstr \"\"\n\"// `WebEvent` 열거형을 인자로 받고 아무것도 반환하지 않는 함수입니다.\\n\"\n\n#: src/custom_types/enum.md:27\nmsgid \"\\\"page loaded\\\"\"\nmsgstr \"\\\"페이지 로드됨\\\"\"\n\n#: src/custom_types/enum.md:28\nmsgid \"\\\"page unloaded\\\"\"\nmsgstr \"\\\"페이지 언로드됨\\\"\"\n\n#: src/custom_types/enum.md:29\nmsgid \"// Destructure `c` from inside the `enum` variant.\\n\"\nmsgstr \"// `enum` 변체 내부에서 `c`를 구조 분해합니다.\\n\"\n\n#: src/custom_types/enum.md:30\nmsgid \"\\\"pressed '{}'.\\\"\"\nmsgstr \"\\\"'{}' 키가 눌렸습니다.\\\"\"\n\n#: src/custom_types/enum.md:31\nmsgid \"\\\"pasted \\\\\\\"{}\\\\\\\".\\\"\"\nmsgstr \"\\\"\\\\\\\"{}\\\\\\\"가 붙여넣기 되었습니다.\\\"\"\n\n#: src/custom_types/enum.md:32\nmsgid \"// Destructure `Click` into `x` and `y`.\\n\"\nmsgstr \"// `Click`을 `x`와 `y`로 구조 분해합니다.\\n\"\n\n#: src/custom_types/enum.md:34\nmsgid \"\\\"clicked at x={}, y={}.\\\"\"\nmsgstr \"\\\"x={}, y={} 지점이 클릭되었습니다.\\\"\"\n\n#: src/custom_types/enum.md:40\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/custom_types/enum.md:41\nmsgid \"// `to_owned()` creates an owned `String` from a string slice.\\n\"\nmsgstr \"\"\n\"// `to_owned()`는 문자열 슬라이스로부터 소유권이 있는 `String`을 생성합니\"\n\"다.\\n\"\n\n#: src/custom_types/enum.md:42\nmsgid \"\\\"my text\\\"\"\nmsgstr \"\\\"나의 텍스트\\\"\"\n\n#: src/custom_types/enum.md:56\nmsgid \"Type aliases\"\nmsgstr \"타입 별칭\"\n\n#: src/custom_types/enum.md:58\nmsgid \"\"\n\"If you use a type alias, you can refer to each enum variant via its alias. \"\n\"This might be useful if the enum's name is too long or too generic, and you \"\n\"want to rename it.\"\nmsgstr \"\"\n\"타입 별칭을 사용하면, 별칭을 통해 각 열거형 변체를 참조할 수 있습니다. 이는 \"\n\"열거형의 이름이 너무 길거나 너무 일반적이어서 이름을 바꾸고 싶을 때 유용할 \"\n\"수 있습니다.\"\n\n#: src/custom_types/enum.md:67\nmsgid \"// Creates a type alias\\n\"\nmsgstr \"// 타입 별칭을 생성합니다\\n\"\n\n#: src/custom_types/enum.md:72\nmsgid \"\"\n\"// We can refer to each variant via its alias, not its long and \"\n\"inconvenient\\n\"\n\"    // name.\\n\"\nmsgstr \"// 길고 불편한 이름 대신 별칭을 통해 각 변체를 참조할 수 있습니다.\\n\"\n\n#: src/custom_types/enum.md:78\nmsgid \"\"\n\"The most common place you'll see this is in `impl` blocks using the `Self` \"\n\"alias.\"\nmsgstr \"\"\n\"이를 가장 흔히 볼 수 있는 곳은 `Self` 별칭을 사용하는 `impl` 블록 내부입니다.\"\n\n#: src/custom_types/enum.md:96\nmsgid \"\"\n\"To learn more about enums and type aliases, you can read the [stabilization \"\n\"report](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847) from when this feature was stabilized into Rust.\"\nmsgstr \"\"\n\"열거형과 타입 별칭에 대해 더 자세히 알아보려면, 이 기능이 Rust에서 안정화되었\"\n\"을 때의 [안정화 보고서](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847)를 읽어보세요.\"\n\n#: src/custom_types/enum.md:102\nmsgid \"\"\n\"[`match`](../flow_control/match.md), [`fn`](../fn.md), and [`String`](../std/\"\n\"str.md), [\\\"Type alias enum variants\\\" RFC](https://rust-lang.github.io/rfcs/\"\n\"2338-type-alias-enum-variants.html)\"\nmsgstr \"\"\n\"[`match`](../flow_control/match.md), [`fn`](../fn.md), 그리고 [`String`](../\"\n\"std/str.md), [\\\"타입 별칭 열거형 변체\\\" RFC](https://rust-lang.github.io/\"\n\"rfcs/2338-type-alias-enum-variants.html)\"\n\n#: src/custom_types/enum/enum_use.md:3\nmsgid \"\"\n\"The `use` declaration can be used to avoid typing the full module path to \"\n\"access a name:\"\nmsgstr \"\"\n\"`use` 선언을 사용하면 이름을 사용하기 위해 전체 모듈 경로를 입력하는 것을 피\"\n\"할 수 있습니다:\"\n\n#: src/custom_types/enum/enum_use.md:20\nmsgid \"\"\n\"// Explicitly `use` each name so they are available without\\n\"\n\"    // manual scoping.\\n\"\nmsgstr \"\"\n\"// 각 이름을 명시적으로 `use`하여 수동으로 스코프를 지정하지 않고도\\n\"\n\"    // 사용할 수 있게 합니다.\\n\"\n\n#: src/custom_types/enum/enum_use.md:23\nmsgid \"// Automatically `use` each name inside `Role`.\\n\"\nmsgstr \"// `Role` 내부의 각 이름을 자동으로 `use`합니다.\\n\"\n\n#: src/custom_types/enum/enum_use.md:26\nmsgid \"// Equivalent to `Stage::Beginner`.\\n\"\nmsgstr \"// `Stage::Beginner`와 동일합니다.\\n\"\n\n#: src/custom_types/enum/enum_use.md:28\nmsgid \"// Equivalent to `Role::Student`.\\n\"\nmsgstr \"// `Role::Student`와 동일합니다.\\n\"\n\n#: src/custom_types/enum/enum_use.md:32\nmsgid \"// Note the lack of scoping because of the explicit `use` above.\\n\"\nmsgstr \"// 위의 명시적 `use` 덕분에 스코프 지정이 필요 없음에 주목하세요.\\n\"\n\n#: src/custom_types/enum/enum_use.md:33\nmsgid \"\\\"Beginners are starting their learning journey!\\\"\"\nmsgstr \"\\\"초보자들이 학습 여정을 시작합니다!\\\"\"\n\n#: src/custom_types/enum/enum_use.md:34\nmsgid \"\\\"Advanced learners are mastering their subjects...\\\"\"\nmsgstr \"\\\"상급 학습자들이 주제를 마스터하고 있습니다...\\\"\"\n\n#: src/custom_types/enum/enum_use.md:38\nmsgid \"// Note again the lack of scoping.\\n\"\nmsgstr \"// 다시 한번 스코프 지정이 없음에 주목하세요.\\n\"\n\n#: src/custom_types/enum/enum_use.md:39\nmsgid \"\\\"Students are acquiring knowledge!\\\"\"\nmsgstr \"\\\"학생들이 지식을 습득하고 있습니다!\\\"\"\n\n#: src/custom_types/enum/enum_use.md:40\nmsgid \"\\\"Teachers are spreading knowledge!\\\"\"\nmsgstr \"\\\"교사들이 지식을 전파하고 있습니다!\\\"\"\n\n#: src/custom_types/enum/enum_use.md:47\nmsgid \"[`match`](../../flow_control/match.md) and [`use`](../../mod/use.md)\"\nmsgstr \"[`match`](../../flow_control/match.md)와 [`use`](../../mod/use.md)\"\n\n#: src/custom_types/enum/c_like.md:3\nmsgid \"`enum` can also be used as C-like enums.\"\nmsgstr \"`enum`은 C 스타일의 열거형으로도 사용될 수 있습니다.\"\n\n#: src/custom_types/enum/c_like.md:8\nmsgid \"// enum with implicit discriminator (starts at 0)\\n\"\nmsgstr \"// 암시적 식별자(0부터 시작)를 가진 열거형\\n\"\n\n#: src/custom_types/enum/c_like.md:15\nmsgid \"// enum with explicit discriminator\\n\"\nmsgstr \"// 명시적 식별자를 가진 열거형\\n\"\n\n#: src/custom_types/enum/c_like.md:24\nmsgid \"// `enums` can be cast as integers.\\n\"\nmsgstr \"// `enum`은 정수로 형변환(cast)될 수 있습니다.\\n\"\n\n#: src/custom_types/enum/c_like.md:25\nmsgid \"\\\"zero is {}\\\"\"\nmsgstr \"\\\"0은 {}입니다\\\"\"\n\n#: src/custom_types/enum/c_like.md:26\nmsgid \"\\\"one is {}\\\"\"\nmsgstr \"\\\"1은 {}입니다\\\"\"\n\n#: src/custom_types/enum/c_like.md:28\nmsgid \"\\\"roses are #{:06x}\\\"\"\nmsgstr \"\\\"장미는 #{:06x}색입니다\\\"\"\n\n#: src/custom_types/enum/c_like.md:29\nmsgid \"\\\"violets are #{:06x}\\\"\"\nmsgstr \"\\\"제비꽃은 #{:06x}색입니다\\\"\"\n\n#: src/custom_types/enum/c_like.md:35\nmsgid \"[casting](../../types/cast.md)\"\nmsgstr \"[형변환](../../types/cast.md)\"\n\n#: src/custom_types/enum/testcase_linked_list.md:3\nmsgid \"A common way to implement a linked-list is via `enums`:\"\nmsgstr \"연결 리스트를 구현하는 일반적인 방법은 `enums`를 사용하는 것입니다:\"\n\n#: src/custom_types/enum/testcase_linked_list.md:9\nmsgid \"\"\n\"// Cons: Tuple struct that wraps an element and a pointer to the next node\\n\"\nmsgstr \"// Cons: 요소와 다음 노드에 대한 포인터를 감싸는 튜플 구조체\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:11\nmsgid \"// Nil: A node that signifies the end of the linked list\\n\"\nmsgstr \"// Nil: 연결 리스트의 끝을 나타내는 노드\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:14\nmsgid \"// Methods can be attached to an enum\\n\"\nmsgstr \"// 열거형에 메서드를 붙일 수 있습니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:17\nmsgid \"// Create an empty list\\n\"\nmsgstr \"// 빈 리스트를 생성합니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:19\nmsgid \"// `Nil` has type `List`\\n\"\nmsgstr \"// `Nil`은 `List` 타입을 가집니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:23\nmsgid \"\"\n\"// Consume a list, and return the same list with a new element at its front\\n\"\nmsgstr \"\"\n\"// 리스트를 소비하고, 그 앞에 새로운 요소가 추가된 동일한 리스트를 반환합니\"\n\"다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:25\nmsgid \"// `Cons` also has type List\\n\"\nmsgstr \"// `Cons` 역시 `List` 타입을 가집니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:29\nmsgid \"// Return the length of the list\\n\"\nmsgstr \"// 리스트의 길이를 반환합니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:31\nmsgid \"\"\n\"// `self` has to be matched, because the behavior of this method\\n\"\n\"        // depends on the variant of `self`\\n\"\n\"        // `self` has type `&List`, and `*self` has type `List`, matching on \"\n\"a\\n\"\n\"        // concrete type `T` is preferred over a match on a reference `&T`\\n\"\n\"        // after Rust 2018 you can use self here and tail (with no ref) \"\n\"below as well,\\n\"\n\"        // rust will infer &s and ref tail.\\n\"\n\"        // See https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\nmsgstr \"\"\n\"// 메서드의 동작이 `self`의 변체에 따라 달라지므로 `self`에 대해 매치(match)\"\n\"를 수행해야 합니다.\\n\"\n\"        // `self`는 `&List` 타입이고, `*self`는 `List` 타입입니다. 구체적인 \"\n\"타입 `T`에 대한 매칭이\\n\"\n\"        // 참조 `&T`에 대한 매칭보다 선호됩니다.\\n\"\n\"        // Rust 2018 이후에는 여기서 self를 사용하고 아래에서 tail(ref 없이)\"\n\"을 사용할 수도 있습니다.\\n\"\n\"        // Rust가 &s와 ref tail을 추론할 것입니다.\\n\"\n\"        // 참고: https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:39\nmsgid \"\"\n\"// Can't take ownership of the tail, because `self` is borrowed;\\n\"\n\"            // instead take a reference to the tail\\n\"\n\"            // And it's a non-tail recursive call which may cause stack \"\n\"overflow for long lists.\\n\"\nmsgstr \"\"\n\"// `self`가 빌려온 상태이므로 꼬리(tail)의 소유권을 가질 수 없습니다.\\n\"\n\"            // 대신 꼬리에 대한 참조를 가져옵니다.\\n\"\n\"            // 그리고 이것은 꼬리 재귀가 아닌 호출이므로 긴 리스트의 경우 스\"\n\"택 오버플로우가 발생할 수 있습니다.\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:43\nmsgid \"// Base Case: An empty list has zero length\\n\"\nmsgstr \"// 기저 사례(Base Case): 빈 리스트의 길이는 0입니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:48\nmsgid \"// Return representation of the list as a (heap allocated) string\\n\"\nmsgstr \"// 리스트를 (힙에 할당된) 문자열 표현으로 반환합니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:52\nmsgid \"\"\n\"// `format!` is similar to `print!`, but returns a heap\\n\"\n\"                // allocated string instead of printing to the console\\n\"\nmsgstr \"\"\n\"// `format!`은 `print!`와 유사하지만, 콘솔에 출력하는 대신\\n\"\n\"                // 힙에 할당된 문자열을 반환합니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:54 src/generics/impl.md:44\nmsgid \"\\\"{}, {}\\\"\"\nmsgstr \"\\\"{}, {}\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:57\nmsgid \"\\\"Nil\\\"\"\nmsgstr \"\\\"Nil\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:64\nmsgid \"// Create an empty linked list\\n\"\nmsgstr \"// 빈 연결 리스트를 생성합니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:67\nmsgid \"// Prepend some elements\\n\"\nmsgstr \"// 몇 가지 요소를 앞에 추가합니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:72\nmsgid \"// Show the final state of the list\\n\"\nmsgstr \"// 리스트의 최종 상태를 보여줍니다\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:73\nmsgid \"\\\"linked list has length: {}\\\"\"\nmsgstr \"\\\"연결 리스트의 길이는 {}입니다\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:80\nmsgid \"[`Box`](../../std/box.md) and [methods](../../fn/methods.md)\"\nmsgstr \"[`Box`](../../std/box.md)와 [메서드](../../fn/methods.md)\"\n\n#: src/custom_types/constants.md:3\nmsgid \"\"\n\"Rust has two different types of constants which can be declared in any scope \"\n\"including global. Both require explicit type annotation:\"\nmsgstr \"\"\n\"Rust에는 전역 범위를 포함한 모든 범위에서 선언할 수 있는 두 가지 유형의 상수\"\n\"가 있습니다. 둘 다 명시적인 타입 어노테이션이 필요합니다:\"\n\n#: src/custom_types/constants.md:6\nmsgid \"`const`: An unchangeable value (the common case).\"\nmsgstr \"`const`: 변경할 수 없는 값 (일반적인 경우).\"\n\n#: src/custom_types/constants.md:7\nmsgid \"\"\n\"`static`: A possibly mutable variable with [`'static`](../scope/lifetime/\"\n\"static_lifetime.md) lifetime. The static lifetime is inferred and does not \"\n\"have to be specified. Accessing or modifying a mutable static variable is \"\n\"[`unsafe`](../unsafe.md).\"\nmsgstr \"\"\n\"`static`: [`'static`](../scope/lifetime/static_lifetime.md) 라이프타임을 가\"\n\"진, 가변적일 수 있는 변수입니다. static 라이프타임은 추론되므로 명시할 필요\"\n\"는 없습니다. 가변적인 static 변수에 접근하거나 수정하는 것은 [`unsafe`](../\"\n\"unsafe.md)합니다.\"\n\n#: src/custom_types/constants.md:12\nmsgid \"// Globals are declared outside all other scopes.\\n\"\nmsgstr \"// 전역 변수는 다른 모든 범위의 바깥에 선언됩니다.\\n\"\n\n#: src/custom_types/constants.md:13\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"러스트\\\"\"\n\n#: src/custom_types/constants.md:17\nmsgid \"// Access constant in some function\\n\"\nmsgstr \"// 어떤 함수 내에서 상수에 접근\\n\"\n\n#: src/custom_types/constants.md:24\nmsgid \"// Access constant in the main thread\\n\"\nmsgstr \"// 메인 스레드에서 상수에 접근\\n\"\n\n#: src/custom_types/constants.md:25\nmsgid \"\\\"This is {}\\\"\"\nmsgstr \"\\\"이것은 {}입니다\\\"\"\n\n#: src/custom_types/constants.md:26\nmsgid \"\\\"The threshold is {}\\\"\"\nmsgstr \"\\\"임계값은 {}입니다\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"{} is {}\\\"\"\nmsgstr \"\\\"{}은(는) {}입니다\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"big\\\"\"\nmsgstr \"\\\"큰\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"작은\\\"\"\n\n#: src/custom_types/constants.md:29\nmsgid \"// Error! Cannot modify a `const`.\\n\"\nmsgstr \"// 에러! `const`는 수정할 수 없습니다.\\n\"\n\n#: src/custom_types/constants.md:31 src/variable_bindings/scope.md:22\n#: src/variable_bindings/declare.md:27 src/variable_bindings/freeze.md:16\n#: src/types/cast.md:19 src/types/cast.md:28 src/flow_control/for.md:95\n#: src/scope/borrow.md:41 src/scope/borrow/mut.md:52 src/std/vec.md:32\n#: src/std/vec.md:45 src/std/hash/hashset.md:48\nmsgid \"// FIXME ^ Comment out this line\\n\"\nmsgstr \"// FIXME ^ 이 줄을 주석 처리하세요\\n\"\n\n#: src/custom_types/constants.md:37\nmsgid \"\"\n\"[The `const`/`static` RFC](https://github.com/rust-lang/rfcs/blob/master/\"\n\"text/0246-const-vs-static.md), [`'static` lifetime](../scope/lifetime/\"\n\"static_lifetime.md)\"\nmsgstr \"\"\n\"[`const`/`static` RFC](https://github.com/rust-lang/rfcs/blob/master/text/\"\n\"0246-const-vs-static.md), [`'static` 라이프타임](../scope/lifetime/\"\n\"static_lifetime.md)\"\n\n#: src/variable_bindings.md:3\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings can be type \"\n\"annotated when declared. However, in most cases, the compiler will be able \"\n\"to infer the type of the variable from the context, heavily reducing the \"\n\"annotation burden.\"\nmsgstr \"\"\n\"Rust는 정적 타이핑을 통해 타입 안전성을 제공합니다. 변수 바인딩은 선언 시 타\"\n\"입 어노테이션을 할 수 있습니다. 하지만 대부분의 경우, 컴파일러는 문맥으로부\"\n\"터 변수의 타입을 추론할 수 있어 어노테이션의 부담을 크게 줄여줍니다.\"\n\n#: src/variable_bindings.md:8\nmsgid \"\"\n\"Values (like literals) can be bound to variables, using the `let` binding.\"\nmsgstr \"값(리터럴 등)은 `let` 바인딩을 사용하여 변수에 바인딩될 수 있습니다.\"\n\n#: src/variable_bindings.md:16\nmsgid \"// copy `an_integer` into `copied_integer`\\n\"\nmsgstr \"// `an_integer`를 `copied_integer`로 복사합니다\\n\"\n\n#: src/variable_bindings.md:19\nmsgid \"\\\"An integer: {:?}\\\"\"\nmsgstr \"\\\"정수: {:?}\\\"\"\n\n#: src/variable_bindings.md:20\nmsgid \"\\\"A boolean: {:?}\\\"\"\nmsgstr \"\\\"불리언: {:?}\\\"\"\n\n#: src/variable_bindings.md:21\nmsgid \"\\\"Meet the unit value: {:?}\\\"\"\nmsgstr \"\\\"유닛 값을 만나보세요: {:?}\\\"\"\n\n#: src/variable_bindings.md:23\nmsgid \"\"\n\"// The compiler warns about unused variable bindings; these warnings can\\n\"\n\"    // be silenced by prefixing the variable name with an underscore\\n\"\nmsgstr \"\"\n\"// 컴파일러는 사용되지 않는 변수 바인딩에 대해 경고를 보냅니다. 이러한 경고\"\n\"는\\n\"\n\"    // 변수 이름 앞에 밑줄을 붙여서 비활성화할 수 있습니다.\\n\"\n\n#: src/variable_bindings.md:28\nmsgid \"\"\n\"// FIXME ^ Prefix with an underscore to suppress the warning\\n\"\n\"    // Please note that warnings may not be shown in a browser\\n\"\nmsgstr \"\"\n\"// FIXME ^ 경고를 억제하기 위해 밑줄을 접두사로 붙이세요\\n\"\n\"    // 브라우저에서는 경고가 표시되지 않을 수 있음에 유의하세요\\n\"\n\n#: src/variable_bindings/mut.md:3\nmsgid \"\"\n\"Variable bindings are immutable by default, but this can be overridden using \"\n\"the `mut` modifier.\"\nmsgstr \"\"\n\"변수 바인딩은 기본적으로 불변(immutable)이지만, `mut` 수식어를 사용하여 이를 \"\n\"재정의할 수 있습니다.\"\n\n#: src/variable_bindings/mut.md:11\nmsgid \"\\\"Before mutation: {}\\\"\"\nmsgstr \"\\\"변경 전: {}\\\"\"\n\n#: src/variable_bindings/mut.md:13\nmsgid \"// Ok\\n\"\nmsgstr \"// 좋습니다\\n\"\n\n#: src/variable_bindings/mut.md:16\nmsgid \"\\\"After mutation: {}\\\"\"\nmsgstr \"\\\"변경 후: {}\\\"\"\n\n#: src/variable_bindings/mut.md:18\nmsgid \"// Error! Cannot assign a new value to an immutable variable\\n\"\nmsgstr \"// 에러! 불변 변수에는 새로운 값을 할당할 수 없습니다\\n\"\n\n#: src/variable_bindings/mut.md:23\nmsgid \"The compiler will throw a detailed diagnostic about mutability errors.\"\nmsgstr \"컴파일러는 가변성 에러에 대해 상세한 진단을 제공할 것입니다.\"\n\n#: src/variable_bindings/scope.md:3\nmsgid \"\"\n\"Variable bindings have a scope, and are constrained to live in a _block_. A \"\n\"block is a collection of statements enclosed by braces `{}`.\"\nmsgstr \"\"\n\"변수 바인딩은 스코프(범위)를 가지며, _블록_ 내에 거주하도록 제한됩니다. 블록\"\n\"은 중괄호 `{}`로 둘러싸인 문장들의 모음입니다.\"\n\n#: src/variable_bindings/scope.md:8\nmsgid \"// This binding lives in the main function\\n\"\nmsgstr \"// 이 바인딩은 메인 함수에 거주합니다\\n\"\n\n#: src/variable_bindings/scope.md:11\nmsgid \"// This is a block, and has a smaller scope than the main function\\n\"\nmsgstr \"// 이것은 블록이며, 메인 함수보다 더 작은 스코프를 가집니다\\n\"\n\n#: src/variable_bindings/scope.md:13\nmsgid \"// This binding only exists in this block\\n\"\nmsgstr \"// 이 바인딩은 이 블록 내에만 존재합니다\\n\"\n\n#: src/variable_bindings/scope.md:16\nmsgid \"\\\"inner short: {}\\\"\"\nmsgstr \"\\\"내부 short: {}\\\"\"\n\n#: src/variable_bindings/scope.md:18\nmsgid \"// End of the block\\n\"\nmsgstr \"// 블록의 끝\\n\"\n\n#: src/variable_bindings/scope.md:20\nmsgid \"// Error! `short_lived_binding` doesn't exist in this scope\\n\"\nmsgstr \"// 에러! `short_lived_binding`은 이 스코프에 존재하지 않습니다\\n\"\n\n#: src/variable_bindings/scope.md:21\nmsgid \"\\\"outer short: {}\\\"\"\nmsgstr \"\\\"외부 short: {}\\\"\"\n\n#: src/variable_bindings/scope.md:24\nmsgid \"\\\"outer long: {}\\\"\"\nmsgstr \"\\\"외부 long: {}\\\"\"\n\n#: src/variable_bindings/scope.md:28\nmsgid \"\"\n\"Also, [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) \"\n\"is allowed.\"\nmsgstr \"\"\n\"또한, [변수 섀도잉](https://en.wikipedia.org/wiki/Variable_shadowing)이 허용\"\n\"됩니다.\"\n\n#: src/variable_bindings/scope.md:35\nmsgid \"\\\"before being shadowed: {}\\\"\"\nmsgstr \"\\\"섀도잉 전: {}\\\"\"\n\n#: src/variable_bindings/scope.md:37\nmsgid \"// This binding *shadows* the outer one\\n\"\nmsgstr \"// 이 바인딩은 외부 바인딩을 *섀도잉*합니다\\n\"\n\n#: src/variable_bindings/scope.md:38\nmsgid \"\\\"abc\\\"\"\nmsgstr \"\\\"abc\\\"\"\n\n#: src/variable_bindings/scope.md:40\nmsgid \"\\\"shadowed in inner block: {}\\\"\"\nmsgstr \"\\\"내부 블록에서 섀도잉됨: {}\\\"\"\n\n#: src/variable_bindings/scope.md:42\nmsgid \"\\\"outside inner block: {}\\\"\"\nmsgstr \"\\\"내부 블록 밖: {}\\\"\"\n\n#: src/variable_bindings/scope.md:44\nmsgid \"// This binding *shadows* the previous binding\\n\"\nmsgstr \"// 이 바인딩은 이전 바인딩을 *섀도잉*합니다\\n\"\n\n#: src/variable_bindings/scope.md:46\nmsgid \"\\\"shadowed in outer block: {}\\\"\"\nmsgstr \"\\\"외부 블록에서 섀도잉됨: {}\\\"\"\n\n#: src/variable_bindings/declare.md:3\nmsgid \"\"\n\"It is possible to declare variable bindings first and initialize them later, \"\n\"but all variable bindings must be initialized before they are used: the \"\n\"compiler forbids use of uninitialized variable bindings, as it would lead to \"\n\"undefined behavior.\"\nmsgstr \"\"\n\"변수 바인딩을 먼저 선언하고 나중에 초기화하는 것이 가능하지만, 모든 변수 바인\"\n\"딩은 사용되기 전에 초기화되어야 합니다. 컴파일러는 정의되지 않은 동작을 초래\"\n\"할 수 있는 초기화되지 않은 변수 바인딩의 사용을 금지합니다.\"\n\n#: src/variable_bindings/declare.md:5\nmsgid \"\"\n\"It is not common to declare a variable binding and initialize it later in \"\n\"the function. It is more difficult for a reader to find the initialization \"\n\"when initialization is separated from declaration. It is common to declare \"\n\"and initialize a variable binding near where the variable will be used.\"\nmsgstr \"\"\n\"변수 바인딩을 선언하고 나중에 함수 내에서 초기화하는 것은 일반적이지 않습니\"\n\"다. 선언과 초기화가 분리되어 있으면 독자가 초기화 지점을 찾기 더 어렵기 때문\"\n\"입니다. 변수가 사용될 위치 근처에서 선언과 초기화를 함께 하는 것이 일반적입니\"\n\"다.\"\n\n#: src/variable_bindings/declare.md:11\nmsgid \"// Declare a variable binding\\n\"\nmsgstr \"// 변수 바인딩 선언\\n\"\n\n#: src/variable_bindings/declare.md:17\nmsgid \"// Initialize the binding\\n\"\nmsgstr \"// 바인딩 초기화\\n\"\n\n#: src/variable_bindings/declare.md:21\nmsgid \"\\\"a binding: {}\\\"\"\nmsgstr \"\\\"바인딩 a: {}\\\"\"\n\n#: src/variable_bindings/declare.md:25\nmsgid \"// Error! Use of uninitialized binding\\n\"\nmsgstr \"// 에러! 초기화되지 않은 바인딩 사용\\n\"\n\n#: src/variable_bindings/declare.md:26 src/variable_bindings/declare.md:31\nmsgid \"\\\"another binding: {}\\\"\"\nmsgstr \"\\\"또 다른 바인딩: {}\\\"\"\n\n#: src/variable_bindings/freeze.md:3\nmsgid \"\"\n\"When data is bound by the same name immutably, it also _freezes_. _Frozen_ \"\n\"data can't be modified until the immutable binding goes out of scope:\"\nmsgstr \"\"\n\"데이터가 동일한 이름으로 불변하게 바인딩되면, 해당 데이터는 _동결(freeze)_됩\"\n\"니다. _동결된_ 데이터는 불변 바인딩이 스코프를 벗어날 때까지 수정할 수 없습니\"\n\"다.\"\n\n#: src/variable_bindings/freeze.md:11\nmsgid \"// Shadowing by immutable `_mutable_integer`\\n\"\nmsgstr \"// 불변 `_mutable_integer`에 의한 섀도잉\\n\"\n\n#: src/variable_bindings/freeze.md:14\nmsgid \"// Error! `_mutable_integer` is frozen in this scope\\n\"\nmsgstr \"// 에러! `_mutable_integer`는 이 스코프에서 동결되었습니다\\n\"\n\n#: src/variable_bindings/freeze.md:18\nmsgid \"// `_mutable_integer` goes out of scope\\n\"\nmsgstr \"// `_mutable_integer`가 스코프를 벗어납니다\\n\"\n\n#: src/variable_bindings/freeze.md:21\nmsgid \"// Ok! `_mutable_integer` is not frozen in this scope\\n\"\nmsgstr \"// 좋습니다! `_mutable_integer`는 이 스코프에서 동결되지 않았습니다\\n\"\n\n#: src/types.md:3\nmsgid \"\"\n\"Rust provides several mechanisms to change or define the type of primitive \"\n\"and user defined types. The following sections cover:\"\nmsgstr \"\"\n\"Rust는 기본 타입과 사용자 정의 타입의 타입을 변경하거나 정의하기 위한 여러 메\"\n\"커니즘을 제공합니다. 다음 섹션에서는 다음을 다룹니다:\"\n\n#: src/types.md:6\nmsgid \"[Casting](types/cast.md) between primitive types\"\nmsgstr \"기본 타입 간의 [형변환(Casting)](types/cast.md)\"\n\n#: src/types.md:7\nmsgid \"Specifying the desired type of [literals](types/literals.md)\"\nmsgstr \"[리터럴](types/literals.md)의 원하는 타입을 지정하는 법\"\n\n#: src/types.md:8\nmsgid \"Using [type inference](types/inference.md)\"\nmsgstr \"[타입 추론(type inference)](types/inference.md) 사용\"\n\n#: src/types.md:9\nmsgid \"[Aliasing](types/alias.md) types\"\nmsgstr \"타입 [별칭(Aliasing)](types/alias.md)\"\n\n#: src/types/cast.md:3\nmsgid \"\"\n\"Rust provides no implicit type conversion (coercion) between primitive \"\n\"types. But, explicit type conversion (casting) can be performed using the \"\n\"`as` keyword.\"\nmsgstr \"\"\n\"Rust는 기본 타입 간의 암시적 타입 변환(강제)을 제공하지 않습니다. 하지만 \"\n\"`as` 키워드를 사용하여 명시적 타입 변환(캐스팅)을 수행할 수 있습니다.\"\n\n#: src/types/cast.md:6\nmsgid \"\"\n\"Rules for converting between integral types follow C conventions generally, \"\n\"except in cases where C has undefined behavior. The behavior of all casts \"\n\"between integral types is well defined in Rust.\"\nmsgstr \"\"\n\"정수 타입 간의 변환 규칙은 일반적으로 C 언어의 관례를 따르지만, C에서 정의되\"\n\"지 않은 동작(undefined behavior)이 발생하는 경우는 예외입니다. Rust에서 정수 \"\n\"타입 간의 모든 캐스팅 동작은 잘 정의되어 있습니다.\"\n\n#: src/types/cast.md:11\nmsgid \"// Suppress all errors from casts which overflow.\\n\"\nmsgstr \"// 오버플로우가 발생하는 캐스팅으로 인한 모든 에러를 억제합니다.\\n\"\n\n#: src/types/cast.md:17\nmsgid \"// Error! No implicit conversion\\n\"\nmsgstr \"// 에러! 암시적 변환 없음\\n\"\n\n#: src/types/cast.md:21\nmsgid \"// Explicit conversion\\n\"\nmsgstr \"// 명시적 변환\\n\"\n\n#: src/types/cast.md:25\nmsgid \"\"\n\"// Error! There are limitations in conversion rules.\\n\"\n\"    // A float cannot be directly converted to a char.\\n\"\nmsgstr \"\"\n\"// 에러! 변환 규칙에 제한이 있습니다.\\n\"\n\"    // 부동 소수점은 문자로 직접 변환할 수 없습니다.\\n\"\n\n#: src/types/cast.md:30\nmsgid \"\\\"Casting: {} -> {} -> {}\\\"\"\nmsgstr \"\\\"형변환: {} -> {} -> {}\\\"\"\n\n#: src/types/cast.md:32\nmsgid \"\"\n\"// when casting any value to an unsigned type, T,\\n\"\n\"    // T::MAX + 1 is added or subtracted until the value\\n\"\n\"    // fits into the new type ONLY when the #![allow(overflowing_literals)]\\n\"\n\"    // lint is specified like above. Otherwise there will be a compiler \"\n\"error.\\n\"\nmsgstr \"\"\n\"// 값을 부호 없는 타입 T로 캐스팅할 때, #![allow(overflowing_literals)]\\n\"\n\"    // 린트가 위와 같이 지정된 경우에만 값이 새로운 타입에 맞을 때까지\\n\"\n\"    // T::MAX + 1을 더하거나 뺍니다. 그렇지 않으면 컴파일 에러가 발생합니\"\n\"다.\\n\"\n\n#: src/types/cast.md:37\nmsgid \"// 1000 already fits in a u16\\n\"\nmsgstr \"// 1000은 이미 u16에 들어맞습니다\\n\"\n\n#: src/types/cast.md:38\nmsgid \"\\\"1000 as a u16 is: {}\\\"\"\nmsgstr \"\\\"1000을 u16으로 변환하면: {}\\\"\"\n\n#: src/types/cast.md:40\nmsgid \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // Under the hood, the first 8 least significant bits (LSB) are kept,\\n\"\n\"    // while the rest towards the most significant bit (MSB) get truncated.\\n\"\nmsgstr \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // 내부적으로는 첫 8개의 최하위 비트(LSB)는 유지되고,\\n\"\n\"    // 최상위 비트(MSB) 쪽의 나머지 비트들은 잘려 나갑니다.\\n\"\n\n#: src/types/cast.md:43 src/types/cast.md:62\nmsgid \"\\\"1000 as a u8 is : {}\\\"\"\nmsgstr \"\\\"1000을 u8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:44\nmsgid \"// -1 + 256 = 255\\n\"\nmsgstr \"// -1 + 256 = 255\\n\"\n\n#: src/types/cast.md:45\nmsgid \"\\\"  -1 as a u8 is : {}\\\"\"\nmsgstr \"\\\"  -1을 u8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:47\nmsgid \"// For positive numbers, this is the same as the modulus\\n\"\nmsgstr \"// 양수의 경우, 이는 나머지 연산(modulus)과 동일합니다\\n\"\n\n#: src/types/cast.md:48\nmsgid \"\\\"1000 mod 256 is : {}\\\"\"\nmsgstr \"\\\"1000 mod 256은 : {}\\\"\"\n\n#: src/types/cast.md:50\nmsgid \"\"\n\"// When casting to a signed type, the (bitwise) result is the same as\\n\"\n\"    // first casting to the corresponding unsigned type. If the most \"\n\"significant\\n\"\n\"    // bit of that value is 1, then the value is negative.\\n\"\nmsgstr \"\"\n\"// 부호 있는 타입으로 캐스팅할 때, (비트 단위) 결과는 먼저\\n\"\n\"    // 대응하는 부호 없는 타입으로 캐스팅하는 것과 같습니다. 만약 그 값의\\n\"\n\"    // 최상위 비트가 1이면, 그 값은 음수입니다.\\n\"\n\n#: src/types/cast.md:54\nmsgid \"// Unless it already fits, of course.\\n\"\nmsgstr \"// 물론 이미 들어맞는 경우는 제외합니다.\\n\"\n\n#: src/types/cast.md:55\nmsgid \"\\\" 128 as a i16 is: {}\\\"\"\nmsgstr \"\\\" 128을 i16으로 변환하면: {}\\\"\"\n\n#: src/types/cast.md:57\nmsgid \"\"\n\"// In boundary case 128 value in 8-bit two's complement representation is \"\n\"-128\\n\"\nmsgstr \"\"\n\"// 경계 케이스의 경우, 8비트 2의 보수 표현에서 128이라는 값은 -128입니다.\\n\"\n\n#: src/types/cast.md:58\nmsgid \"\\\" 128 as a i8 is : {}\\\"\"\nmsgstr \"\\\" 128을 i8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:60\nmsgid \"\"\n\"// repeating the example above\\n\"\n\"    // 1000 as u8 -> 232\\n\"\nmsgstr \"\"\n\"// 위 예제를 반복합니다\\n\"\n\"    // 1000을 u8로 변환 -> 232\\n\"\n\n#: src/types/cast.md:63\nmsgid \"\"\n\"// and the value of 232 in 8-bit two's complement representation is -24\\n\"\nmsgstr \"// 그리고 8비트 2의 보수 표현에서 232라는 값은 -24입니다.\\n\"\n\n#: src/types/cast.md:64\nmsgid \"\\\" 232 as a i8 is : {}\\\"\"\nmsgstr \"\\\" 232를 i8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:66\nmsgid \"\"\n\"// Since Rust 1.45, the `as` keyword performs a *saturating cast*\\n\"\n\"    // when casting from float to int. If the floating point value exceeds\\n\"\n\"    // the upper bound or is less than the lower bound, the returned value\\n\"\n\"    // will be equal to the bound crossed.\\n\"\nmsgstr \"\"\n\"// Rust 1.45부터, 부동 소수점을 정수로 캐스팅할 때 `as` 키워드는\\n\"\n\"    // *포화 캐스팅(saturating cast)*을 수행합니다. 부동 소수점 값이\\n\"\n\"    // 상한을 초과하거나 하한보다 작으면, 반환되는 값은 해당 경계값이 됩니\"\n\"다.\\n\"\n\n#: src/types/cast.md:71\nmsgid \"// 300.0 as u8 is 255\\n\"\nmsgstr \"// 300.0을 u8로 변환하면 255입니다\\n\"\n\n#: src/types/cast.md:72 src/types/cast.md:83\nmsgid \"\\\" 300.0 as u8 is : {}\\\"\"\nmsgstr \"\\\" 300.0을 u8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:73\nmsgid \"// -100.0 as u8 is 0\\n\"\nmsgstr \"// -100.0을 u8로 변환하면 0입니다\\n\"\n\n#: src/types/cast.md:74 src/types/cast.md:85\nmsgid \"\\\"-100.0 as u8 is : {}\\\"\"\nmsgstr \"\\\"-100.0을 u8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:75 src/types/cast.md:86\nmsgid \"// nan as u8 is 0\\n\"\nmsgstr \"// nan을 u8로 변환하면 0입니다\\n\"\n\n#: src/types/cast.md:76 src/types/cast.md:87\nmsgid \"\\\"   nan as u8 is : {}\\\"\"\nmsgstr \"\\\"   nan을 u8로 변환하면 : {}\\\"\"\n\n#: src/types/cast.md:78\nmsgid \"\"\n\"// This behavior incurs a small runtime cost and can be avoided\\n\"\n\"    // with unsafe methods, however the results might overflow and\\n\"\n\"    // return **unsound values**. Use these methods wisely:\\n\"\nmsgstr \"\"\n\"// 이러한 동작은 약간의 런타임 비용을 발생시키며, unsafe 메서드를 사용하여\\n\"\n\"    // 피할 수 있습니다. 하지만 결과가 오버플로우되어 **불건전한 값(unsound \"\n\"values)**을\\n\"\n\"    // 반환할 수 있습니다. 이러한 메서드들은 현명하게 사용하세요:\\n\"\n\n#: src/types/cast.md:82\nmsgid \"// 300.0 as u8 is 44\\n\"\nmsgstr \"// 300.0을 u8로 변환하면 44입니다\\n\"\n\n#: src/types/cast.md:84\nmsgid \"// -100.0 as u8 is 156\\n\"\nmsgstr \"// -100.0을 u8로 변환하면 156입니다\\n\"\n\n#: src/types/literals.md:3\nmsgid \"\"\n\"Numeric literals can be type annotated by adding the type as a suffix. As an \"\n\"example, to specify that the literal `42` should have the type `i32`, write \"\n\"`42i32`.\"\nmsgstr \"\"\n\"숫자 리터럴은 타입 이름을 접미사로 추가하여 타입 어노테이션을 할 수 있습니\"\n\"다. 예를 들어, 리터럴 `42`가 `i32` 타입을 가져야 함을 지정하려면 `42i32`라고 \"\n\"씁니다.\"\n\n#: src/types/literals.md:6\nmsgid \"\"\n\"The type of unsuffixed numeric literals will depend on how they are used. If \"\n\"no constraint exists, the compiler will use `i32` for integers, and `f64` \"\n\"for floating-point numbers.\"\nmsgstr \"\"\n\"접미사가 없는 숫자 리터럴의 타입은 어떻게 사용되느냐에 따라 달라집니다. 아무\"\n\"런 제약이 없다면 컴파일러는 정수에 대해서는 `i32`를, 부동 소수점 숫자에 대해\"\n\"서는 `f64`를 사용합니다.\"\n\n#: src/types/literals.md:12\nmsgid \"// Suffixed literals, their types are known at initialization\\n\"\nmsgstr \"// 접미사가 붙은 리터럴은 초기화 시 그 타입을 알 수 있습니다.\\n\"\n\n#: src/types/literals.md:17\nmsgid \"// Unsuffixed literals, their types depend on how they are used\\n\"\nmsgstr \"\"\n\"// 접미사가 없는 리터럴의 타입은 어떻게 사용되느냐에 따라 달라집니다.\\n\"\n\n#: src/types/literals.md:21\nmsgid \"// `size_of_val` returns the size of a variable in bytes\\n\"\nmsgstr \"// `size_of_val`은 변수의 크기를 바이트 단위로 반환합니다.\\n\"\n\n#: src/types/literals.md:22\nmsgid \"\\\"size of `x` in bytes: {}\\\"\"\nmsgstr \"`x`의 바이트 크기: {}\"\n\n#: src/types/literals.md:23\nmsgid \"\\\"size of `y` in bytes: {}\\\"\"\nmsgstr \"`y`의 바이트 크기: {}\"\n\n#: src/types/literals.md:24\nmsgid \"\\\"size of `z` in bytes: {}\\\"\"\nmsgstr \"`z`의 바이트 크기: {}\"\n\n#: src/types/literals.md:25\nmsgid \"\\\"size of `i` in bytes: {}\\\"\"\nmsgstr \"`i`의 바이트 크기: {}\"\n\n#: src/types/literals.md:26\nmsgid \"\\\"size of `f` in bytes: {}\\\"\"\nmsgstr \"`f`의 바이트 크기: {}\"\n\n#: src/types/literals.md:30\nmsgid \"\"\n\"There are some concepts used in the previous code that haven't been \"\n\"explained yet, here's a brief explanation for the impatient readers:\"\nmsgstr \"\"\n\"앞선 코드에서 아직 설명되지 않은 몇 가지 개념이 사용되었습니다. 성급한 독자들\"\n\"을 위한 간단한 설명은 다음과 같습니다:\"\n\n#: src/types/literals.md:33\nmsgid \"\"\n\"`std::mem::size_of_val` is a function, but called with its _full path_. Code \"\n\"can be split in logical units called _modules_. In this case, the \"\n\"`size_of_val` function is defined in the `mem` module, and the `mem` module \"\n\"is defined in the `std` _crate_. For more details, see [modules](../mod.md) \"\n\"and [crates](../crates.md).\"\nmsgstr \"\"\n\"`std::mem::size_of_val`은 함수이지만, _전체 경로(full path)_를 사용하여 호출\"\n\"되었습니다. 코드는 _모듈_이라고 불리는 논리적 단위로 나뉠 수 있습니다. 이 경\"\n\"우, `size_of_val` 함수는 `mem` 모듈에 정의되어 있고, `mem` 모듈은 `std` _크레\"\n\"이트_에 정의되어 있습니다. 자세한 내용은 [모듈](../mod.md) 및 [크레이트](../\"\n\"crates.md)를 참조하세요.\"\n\n#: src/types/inference.md:3\nmsgid \"\"\n\"The type inference engine is pretty smart. It does more than looking at the \"\n\"type of the value expression during an initialization. It also looks at how \"\n\"the variable is used afterwards to infer its type. Here's an advanced \"\n\"example of type inference:\"\nmsgstr \"\"\n\"타입 추론 엔진은 꽤 똑똑합니다. 초기화 중에 값 표현식의 타입을 살펴보는 것 이\"\n\"상의 일을 합니다. 또한 변수가 이후에 어떻게 사용되는지를 보고 타입을 추론합니\"\n\"다. 다음은 타입 추론의 심화 예시입니다:\"\n\n#: src/types/inference.md:10\nmsgid \"\"\n\"// Because of the annotation, the compiler knows that `elem` has type u8.\\n\"\nmsgstr \"// 어노테이션 덕분에 컴파일러는 `elem`이 u8 타입임을 압니다.\\n\"\n\n#: src/types/inference.md:13\nmsgid \"// Create an empty vector (a growable array).\\n\"\nmsgstr \"// 빈 벡터(가변 크기 배열)를 생성합니다.\\n\"\n\n#: src/types/inference.md:15\nmsgid \"\"\n\"// At this point the compiler doesn't know the exact type of `vec`, it\\n\"\n\"    // just knows that it's a vector of something (`Vec<_>`).\\n\"\nmsgstr \"\"\n\"// 이 시점에서 컴파일러는 `vec`의 정확한 타입을 알지 못하며,\\n\"\n\"    // 단지 무언가의 벡터(`Vec<_>`)라는 것만 압니다.\\n\"\n\n#: src/types/inference.md:18\nmsgid \"// Insert `elem` in the vector.\\n\"\nmsgstr \"// 벡터에 `elem`을 삽입합니다.\\n\"\n\n#: src/types/inference.md:20\nmsgid \"\"\n\"// Aha! Now the compiler knows that `vec` is a vector of `u8`s (`Vec<u8>`)\\n\"\n\"    // TODO ^ Try commenting out the `vec.push(elem)` line\\n\"\nmsgstr \"\"\n\"// 아하! 이제 컴파일러는 `vec`이 `u8`들의 벡터(`Vec<u8>`)임을 압니다.\\n\"\n\"    // TODO ^ `vec.push(elem)` 줄을 주석 처리해 보세요\\n\"\n\n#: src/types/inference.md:27\nmsgid \"\"\n\"No type annotation of variables was needed, the compiler is happy and so is \"\n\"the programmer!\"\nmsgstr \"\"\n\"변수의 타입 어노테이션이 필요하지 않았습니다. 컴파일러도 만족하고 프로그래머\"\n\"도 행복합니다!\"\n\n#: src/types/alias.md:3\nmsgid \"\"\n\"The `type` statement can be used to give a new name to an existing type. \"\n\"Types must have `UpperCamelCase` names, or the compiler will raise a \"\n\"warning. The exception to this rule are the primitive types: `usize`, `f32`, \"\n\"etc.\"\nmsgstr \"\"\n\"`type` 문을 사용하면 기존 타입에 새로운 이름을 부여할 수 있습니다. 타입 이름\"\n\"은 `UpperCamelCase`여야 하며, 그렇지 않으면 컴파일러가 경고를 보냅니다. 이 규\"\n\"칙의 예외는 기본 타입인 `usize`, `f32` 등입니다.\"\n\n#: src/types/alias.md:8\nmsgid \"// `NanoSecond`, `Inch`, and `U64` are new names for `u64`.\\n\"\nmsgstr \"// `NanoSecond`, `Inch`, `U64`는 `u64`를 가리키는 새로운 이름입니다.\\n\"\n\n#: src/types/alias.md:14\nmsgid \"// `NanoSecond` = `Inch` = `U64` = `u64`.\\n\"\nmsgstr \"// `NanoSecond` = `Inch` = `U64` = `u64`입니다.\\n\"\n\n#: src/types/alias.md:18\nmsgid \"\"\n\"// Note that type aliases *don't* provide any extra type safety, because\\n\"\n\"    // aliases are *not* new types\\n\"\nmsgstr \"\"\n\"// 타입 별칭은 새로운 타입이 아니기 때문에, 추가적인 타입 안전성을\\n\"\n\"    // 제공하지 않는다는 점에 유의하세요.\\n\"\n\n#: src/types/alias.md:20\nmsgid \"\\\"{} nanoseconds + {} inches = {} unit?\\\"\"\nmsgstr \"\\\"{} 나노초 + {} 인치 = {} 유닛?\\\"\"\n\n#: src/types/alias.md:27\nmsgid \"\"\n\"The main use of aliases is to reduce boilerplate; for example the \"\n\"`io::Result<T>` type is an alias for the `Result<T, io::Error>` type.\"\nmsgstr \"\"\n\"별칭의 주요 용도는 보일러플레이트(boilerplate)를 줄이는 것입니다. 예를 들어 \"\n\"`io::Result<T>` 타입은 `Result<T, io::Error>` 타입의 별칭입니다.\"\n\n#: src/types/alias.md:32\nmsgid \"[Attributes](../attribute.md)\"\nmsgstr \"[속성](../attribute.md)\"\n\n#: src/conversion.md:3\nmsgid \"\"\n\"Primitive types can be converted to each other through [casting](types/\"\n\"cast.md).\"\nmsgstr \"\"\n\"기본 타입들은 [캐스팅(casting)](types/cast.md)을 통해 서로 변환될 수 있습니\"\n\"다.\"\n\n#: src/conversion.md:5\nmsgid \"\"\n\"Rust addresses conversion between custom types (i.e., `struct` and `enum`) \"\n\"by the use of [traits](trait.md). The generic conversions will use the \"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`Into`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.Into.html) traits. However \"\n\"there are more specific ones for the more common cases, in particular when \"\n\"converting to and from `String`s.\"\nmsgstr \"\"\n\"Rust는 [트레이트(traits)](trait.md)를 사용하여 사용자 정의 타입(예: \"\n\"`struct`, `enum`) 간의 변환을 처리합니다. 범용 변환에는 [`From`](https://\"\n\"doc.rust-lang.org/std/convert/trait.From.html)과 [`Into`](https://doc.rust-\"\n\"lang.org/std/convert/trait.Into.html) 트레이트를 사용합니다. 하지만 더 흔한 \"\n\"경우, 특히 `String`과의 상호 변환을 위한 더 구체적인 트레이트들이 존재합니다.\"\n\n#: src/conversion/from_into.md:3\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) traits are \"\n\"inherently linked, and this is actually part of its implementation. If you \"\n\"are able to convert type A from type B, then it should be easy to believe \"\n\"that we should be able to convert type B to type A.\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html)과 [`Into`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.Into.html) 트레이트는 본질적으\"\n\"로 연결되어 있으며, 이는 실제로 구현의 일부입니다. 만약 타입 B로부터 타입 A\"\n\"를 만들 수 있다면(`From`), 타입 B를 타입 A로 변환할 수 있다(`Into`)는 것을 쉽\"\n\"게 알 수 있습니다.\"\n\n#: src/conversion/from_into.md:7\nmsgid \"`From`\"\nmsgstr \"`From`\"\n\n#: src/conversion/from_into.md:9\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) trait \"\n\"allows for a type to define how to create itself from another type, hence \"\n\"providing a very simple mechanism for converting between several types. \"\n\"There are numerous implementations of this trait within the standard library \"\n\"for conversion of primitive and common types.\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) 트레이트는 \"\n\"한 타입이 다른 타입으로부터 자신을 생성하는 방법을 정의할 수 있게 하여, 여러 \"\n\"타입 간의 변환을 위한 매우 단순한 메커니즘을 제공합니다. 표준 라이브러리에는 \"\n\"기본 타입 및 일반적인 타입의 변환을 위해 이 트레이트가 수없이 많이 구현되어 \"\n\"있습니다.\"\n\n#: src/conversion/from_into.md:14\nmsgid \"For example we can easily convert a `str` into a `String`\"\nmsgstr \"예를 들어, `str`을 `String`으로 쉽게 변환할 수 있습니다.\"\n\n#: src/conversion/from_into.md:21\nmsgid \"We can do something similar for defining a conversion for our own type.\"\nmsgstr \"\"\n\"우리는 자신의 타입에 대한 변환을 정의하기 위해 유사한 작업을 수행할 수 있습니\"\n\"다.\"\n\n#: src/conversion/from_into.md:39 src/conversion/from_into.md:68\n#: src/conversion/from_into.md:98\nmsgid \"\\\"My number is {:?}\\\"\"\nmsgstr \"\\\"제 숫자는 {:?}입니다\\\"\"\n\n#: src/conversion/from_into.md:43\nmsgid \"`Into`\"\nmsgstr \"`Into`\"\n\n#: src/conversion/from_into.md:45\nmsgid \"\"\n\"The [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) trait is \"\n\"simply the reciprocal of the `From` trait. It defines how to convert a type \"\n\"into another type.\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) 트레이트는 단\"\n\"순히 `From` 트레이트의 반대입니다. 이는 한 타입을 다른 타입으로 변환하는 방법\"\n\"을 정의합니다.\"\n\n#: src/conversion/from_into.md:48\nmsgid \"\"\n\"Calling `into()` typically requires us to specify the result type as the \"\n\"compiler is unable to determine this most of the time.\"\nmsgstr \"\"\n\"`into()`를 호출할 때는 일반적으로 결과 타입을 지정해야 합니다. 대부분의 경우 \"\n\"컴파일러가 이를 결정할 수 없기 때문입니다.\"\n\n#: src/conversion/from_into.md:66\nmsgid \"// Try removing the type annotation\\n\"\nmsgstr \"// 타입 어노테이션을 제거해 보세요\\n\"\n\n#: src/conversion/from_into.md:72\nmsgid \"`From` and `Into` are interchangeable\"\nmsgstr \"`From`과 `Into`는 상호 교환 가능합니다\"\n\n#: src/conversion/from_into.md:74\nmsgid \"\"\n\"`From` and `Into` are designed to be complementary. We do not need to \"\n\"provide an implementation for both traits. If you have implemented the \"\n\"`From` trait for your type, `Into` will call it when necessary. Note, \"\n\"however, that the converse is not true: implementing `Into` for your type \"\n\"will not automatically provide it with an implementation of `From`.\"\nmsgstr \"\"\n\"`From`과 `Into`는 상호 보완적으로 설계되었습니다. 두 트레이트 모두에 대해 구\"\n\"현을 제공할 필요는 없습니다. 만약 자신의 타입에 대해 `From` 트레이트를 구현했\"\n\"다면, `Into`는 필요할 때 이를 호출할 것입니다. 하지만 그 반대는 성립하지 않음\"\n\"에 유의하세요. 즉, 자신의 타입에 대해 `Into`를 구현한다고 해서 `From` 구현이 \"\n\"자동으로 제공되지는 않습니다.\"\n\n#: src/conversion/from_into.md:86\nmsgid \"// Define `From`\\n\"\nmsgstr \"// `From` 정의\\n\"\n\n#: src/conversion/from_into.md:96\nmsgid \"// use `Into`\\n\"\nmsgstr \"// `Into` 사용\\n\"\n\n#: src/conversion/try_from_try_into.md:3\nmsgid \"\"\n\"Similar to [`From` and `Into`](from_into.html), [`TryFrom`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryFrom.html) and [`TryInto`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryInto.html) are generic traits for converting \"\n\"between types. Unlike `From`/`Into`, the `TryFrom`/`TryInto` traits are used \"\n\"for fallible conversions, and as such, return [`Result`](https://doc.rust-\"\n\"lang.org/std/result/enum.Result.html)s.\"\nmsgstr \"\"\n\"[`From`과 `Into`](from_into.html)와 유사하게, [`TryFrom`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryFrom.html)과 [`TryInto`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryInto.html)는 타입 간 변환을 위한 제네릭 트레이\"\n\"트입니다. `From`/`Into`와 달리, `TryFrom`/`TryInto` 트레이트는 실패할 가능성\"\n\"이 있는 변환에 사용되며, 따라서 [`Result`](https://doc.rust-lang.org/std/\"\n\"result/enum.Result.html)를 반환합니다.\"\n\n#: src/conversion/try_from_try_into.md:33\nmsgid \"// TryFrom\\n\"\nmsgstr \"// TryFrom\\n\"\n\n#: src/conversion/try_from_try_into.md:38\nmsgid \"// TryInto\\n\"\nmsgstr \"// TryInto\\n\"\n\n#: src/conversion/string.md:1\nmsgid \"To and from Strings\"\nmsgstr \"문자열 상호 변환\"\n\n#: src/conversion/string.md:3\nmsgid \"Converting to String\"\nmsgstr \"문자열로 변환하기\"\n\n#: src/conversion/string.md:5\nmsgid \"\"\n\"To convert any type to a `String` is as simple as implementing the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"for the type. Rather than doing so directly, you should implement the \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html) trait \"\n\"which automatically provides [`ToString`](https://doc.rust-lang.org/std/\"\n\"string/trait.ToString.html) and also allows printing the type as discussed \"\n\"in the section on [`print!`](../hello/print.md).\"\nmsgstr \"\"\n\"어떤 타입을 `String`으로 변환하는 것은 해당 타입에 대해 [`ToString`](https://\"\n\"doc.rust-lang.org/std/string/trait.ToString.html) 트레이트를 구현하는 것만큼 \"\n\"간단합니다. 직접 구현하기보다는 [`fmt::Display`](https://doc.rust-lang.org/\"\n\"std/fmt/trait.Display.html) 트레이트를 구현하는 것이 좋습니다. 이는 자동으로 \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html)을 제공\"\n\"할 뿐만 아니라, [`print!`](../hello/print.md) 섹션에서 다룬 것처럼 해당 타입\"\n\"을 출력할 수 있게 해줍니다.\"\n\n#: src/conversion/string.md:19\nmsgid \"\\\"Circle of radius {}\\\"\"\nmsgstr \"\\\"반지름이 {}인 원\\\"\"\n\n#: src/conversion/string.md:29\nmsgid \"Parsing a String\"\nmsgstr \"문자열 파싱하기\"\n\n#: src/conversion/string.md:31\nmsgid \"\"\n\"It's useful to convert strings into many types, but one of the more common \"\n\"string operations is to convert them from string to number. The idiomatic \"\n\"approach to this is to use the [`parse`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) function and either to arrange for type \"\n\"inference or to specify the type to parse using the 'turbofish' syntax. Both \"\n\"alternatives are shown in the following example.\"\nmsgstr \"\"\n\"문자열을 여러 타입으로 변환하는 것은 유용하지만, 가장 흔한 작업 중 하나는 문\"\n\"자열을 숫자로 변환하는 것입니다. 이에 대한 관용적인 방법은 [`parse`](https://\"\n\"doc.rust-lang.org/std/primitive.str.html#method.parse) 함수를 사용하는 것이\"\n\"며, 타입 추론을 이용하거나 'turbofish' 구문을 사용하여 파싱할 타입을 지정할 \"\n\"수 있습니다. 다음 예제에 두 가지 방식이 모두 나와 있습니다.\"\n\n#: src/conversion/string.md:37\nmsgid \"\"\n\"This will convert the string into the type specified as long as the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait is \"\n\"implemented for that type. This is implemented for numerous types within the \"\n\"standard library.\"\nmsgstr \"\"\n\"해당 타입에 대해 [`FromStr`](https://doc.rust-lang.org/std/str/\"\n\"trait.FromStr.html) 트레이트가 구현되어 있다면 문자열을 지정된 타입으로 변환\"\n\"합니다. 표준 라이브러리의 수많은 타입에 대해 이 트레이트가 구현되어 있습니다.\"\n\n#: src/conversion/string.md:43 src/std_misc/process/wait.md:10\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/conversion/string.md:44 src/error/result.md:33 src/error/result.md:68\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:75\n#: src/error/result/result_alias.md:36 src/error/result/early_returns.md:36\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:67\nmsgid \"\\\"10\\\"\"\nmsgstr \"\\\"10\\\"\"\n\n#: src/conversion/string.md:47\nmsgid \"\\\"Sum: {:?}\\\"\"\nmsgstr \"\\\"합계: {:?}\\\"\"\n\n#: src/conversion/string.md:51\nmsgid \"\"\n\"To obtain this functionality on a user defined type simply implement the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"that type.\"\nmsgstr \"\"\n\"사용자 정의 타입에서 이 기능을 사용하려면 해당 타입에 대해 [`FromStr`]\"\n\"(https://doc.rust-lang.org/std/str/trait.FromStr.html) 트레이트를 구현하기만 \"\n\"하면 됩니다.\"\n\n#: src/conversion/string.md:74\nmsgid \"\\\"    3 \\\"\"\nmsgstr \"\\\"    3 \\\"\"\n\n#: src/expression.md:3\nmsgid \"A Rust program is (mostly) made up of a series of statements:\"\nmsgstr \"Rust 프로그램은 (대부분) 일련의 문장(statements)으로 구성됩니다:\"\n\n#: src/expression.md:7\nmsgid \"\"\n\"// statement\\n\"\n\"    // statement\\n\"\n\"    // statement\\n\"\nmsgstr \"\"\n\"// 문장\\n\"\n\"    // 문장\\n\"\n\"    // 문장\\n\"\n\n#: src/expression.md:13\nmsgid \"\"\n\"There are a few kinds of statements in Rust. The most common two are \"\n\"declaring a variable binding, and using a `;` with an expression:\"\nmsgstr \"\"\n\"Rust에는 몇 가지 종류의 문장이 있습니다. 가장 흔한 두 가지는 변수 바인딩을 선\"\n\"언하는 것과 표현식에 `;`를 사용하는 것입니다:\"\n\n#: src/expression.md:18\nmsgid \"// variable binding\\n\"\nmsgstr \"// 변수 바인딩\\n\"\n\n#: src/expression.md:21\nmsgid \"// expression;\\n\"\nmsgstr \"// 표현식;\\n\"\n\n#: src/expression.md:28\nmsgid \"\"\n\"Blocks are expressions too, so they can be used as values in assignments. \"\n\"The last expression in the block will be assigned to the place expression \"\n\"such as a local variable. However, if the last expression of the block ends \"\n\"with a semicolon, the return value will be `()`.\"\nmsgstr \"\"\n\"블록도 표현식이므로 할당 시 값으로 사용될 수 있습니다. 블록의 마지막 표현식\"\n\"은 로컬 변수와 같은 장소 표현식(place expression)에 할당됩니다. 하지만 블록\"\n\"의 마지막 표현식이 세미콜론으로 끝나면 반환 값은 `()`가 됩니다.\"\n\n#: src/expression.md:41\nmsgid \"// This expression will be assigned to `y`\\n\"\nmsgstr \"// 이 표현식은 `y`에 할당됩니다\\n\"\n\n#: src/expression.md:46\nmsgid \"\"\n\"// The semicolon suppresses this expression and `()` is assigned to `z`\\n\"\nmsgstr \"// 세미콜론이 이 표현식을 억제하여 `z`에는 `()`가 할당됩니다\\n\"\n\n#: src/expression.md:50\nmsgid \"\\\"x is {:?}\\\"\"\nmsgstr \"\\\"x는 {:?}입니다\\\"\"\n\n#: src/expression.md:51\nmsgid \"\\\"y is {:?}\\\"\"\nmsgstr \"\\\"y는 {:?}입니다\\\"\"\n\n#: src/expression.md:52\nmsgid \"\\\"z is {:?}\\\"\"\nmsgstr \"\\\"z는 {:?}입니다\\\"\"\n\n#: src/flow_control.md:3\nmsgid \"\"\n\"An integral part of any programming language are ways to modify control \"\n\"flow: `if`/`else`, `for`, and others. Let's talk about them in Rust.\"\nmsgstr \"\"\n\"모든 프로그래밍 언어의 필수적인 부분은 제어 흐름을 수정하는 방법입니다: `if`/\"\n\"`else`, `for` 등. Rust에서의 제어 흐름에 대해 이야기해 봅시다.\"\n\n#: src/flow_control/if_else.md:3\nmsgid \"\"\n\"Branching with `if`\\\\-`else` is similar to other languages. Unlike many of \"\n\"them, the boolean condition doesn't need to be surrounded by parentheses, \"\n\"and each condition is followed by a block. `if`\\\\-`else` conditionals are \"\n\"expressions, and, all branches must return the same type.\"\nmsgstr \"\"\n\"`if`\\\\-`else`를 사용한 분기는 다른 언어와 유사합니다. 많은 언어와 달리 불리\"\n\"언 조건은 괄호로 둘러쌀 필요가 없으며, 각 조건 뒤에는 블록이 옵니다. `if`\\\\-\"\n\"`else` 조건문은 표현식이며, 모든 분기는 동일한 타입을 반환해야 합니다.\"\n\n#: src/flow_control/if_else.md:13\nmsgid \"\\\"{} is negative\\\"\"\nmsgstr \"\\\"{}은(는) 음수입니다\\\"\"\n\n#: src/flow_control/if_else.md:15\nmsgid \"\\\"{} is positive\\\"\"\nmsgstr \"\\\"{}은(는) 양수입니다\\\"\"\n\n#: src/flow_control/if_else.md:17\nmsgid \"\\\"{} is zero\\\"\"\nmsgstr \"\\\"{}은(는) 0입니다\\\"\"\n\n#: src/flow_control/if_else.md:22\nmsgid \"\\\", and is a small number, increase ten-fold\\\"\"\nmsgstr \"\\\", 그리고 작은 수이므로 10배 증가시킵니다\\\"\"\n\n#: src/flow_control/if_else.md:24\nmsgid \"// This expression returns an `i32`.\\n\"\nmsgstr \"// 이 표현식은 `i32`를 반환합니다.\\n\"\n\n#: src/flow_control/if_else.md:27\nmsgid \"\\\", and is a big number, halve the number\\\"\"\nmsgstr \"\\\", 그리고 큰 수이므로 반으로 나눕니다\\\"\"\n\n#: src/flow_control/if_else.md:29\nmsgid \"// This expression must return an `i32` as well.\\n\"\nmsgstr \"// 이 표현식 또한 `i32`를 반환해야 합니다.\\n\"\n\n#: src/flow_control/if_else.md:31\nmsgid \"// TODO ^ Try suppressing this expression with a semicolon.\\n\"\nmsgstr \"// TODO ^ 세미콜론을 사용하여 이 표현식을 억제해 보세요.\\n\"\n\n#: src/flow_control/if_else.md:33\nmsgid \"\"\n\"//   ^ Don't forget to put a semicolon here! All `let` bindings need it.\\n\"\nmsgstr \"\"\n\"//   ^ 여기에 세미콜론을 넣는 것을 잊지 마세요! 모든 `let` 바인딩에 필요합니\"\n\"다.\\n\"\n\n#: src/flow_control/if_else.md:35 src/flow_control/match.md:35\nmsgid \"\\\"{} -> {}\\\"\"\nmsgstr \"\\\"{} -> {}\\\"\"\n\n#: src/flow_control/loop.md:3\nmsgid \"Rust provides a `loop` keyword to indicate an infinite loop.\"\nmsgstr \"Rust는 무한 루프를 나타내기 위해 `loop` 키워드를 제공합니다.\"\n\n#: src/flow_control/loop.md:5\nmsgid \"\"\n\"The `break` statement can be used to exit a loop at anytime, whereas the \"\n\"`continue` statement can be used to skip the rest of the iteration and start \"\n\"a new one.\"\nmsgstr \"\"\n\"`break` 문은 언제든지 루프를 종료하는 데 사용할 수 있으며, `continue` 문은 나\"\n\"머지 반복을 건너뛰고 새로운 반복을 시작하는 데 사용될 수 있습니다.\"\n\n#: src/flow_control/loop.md:13\nmsgid \"\\\"Let's count until infinity!\\\"\"\nmsgstr \"\\\"무한대까지 세어봅시다!\\\"\"\n\n#: src/flow_control/loop.md:15\nmsgid \"// Infinite loop\\n\"\nmsgstr \"// 무한 루프\\n\"\n\n#: src/flow_control/loop.md:20\nmsgid \"\\\"three\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/flow_control/loop.md:22\nmsgid \"// Skip the rest of this iteration\\n\"\nmsgstr \"// 이번 반복의 나머지를 건너뜁니다\\n\"\n\n#: src/flow_control/loop.md:29\nmsgid \"\\\"OK, that's enough\\\"\"\nmsgstr \"\\\"좋아요, 그만하면 됐습니다\\\"\"\n\n#: src/flow_control/loop.md:31\nmsgid \"// Exit this loop\\n\"\nmsgstr \"// 이 루프를 종료합니다\\n\"\n\n#: src/flow_control/loop/nested.md:3\nmsgid \"\"\n\"It's possible to `break` or `continue` outer loops when dealing with nested \"\n\"loops. In these cases, the loops must be annotated with some `'label`, and \"\n\"the label must be passed to the `break`/`continue` statement.\"\nmsgstr \"\"\n\"중첩 루프를 다룰 때 외부 루프를 `break`하거나 `continue`하는 것이 가능합니\"\n\"다. 이 경우 루프에는 어떤 `'label`을 붙여야 하며, 해당 레이블은 `break`/\"\n\"`continue` 문에 전달되어야 합니다.\"\n\n#: src/flow_control/loop/nested.md:12\nmsgid \"\\\"Entered the outer loop\\\"\"\nmsgstr \"\\\"외부 루프에 진입했습니다\\\"\"\n\n#: src/flow_control/loop/nested.md:15\nmsgid \"\\\"Entered the inner loop\\\"\"\nmsgstr \"\\\"내부 루프에 진입했습니다\\\"\"\n\n#: src/flow_control/loop/nested.md:17\nmsgid \"\"\n\"// This would break only the inner loop\\n\"\n\"            //break;\\n\"\nmsgstr \"\"\n\"// 이것은 내부 루프만 종료시킵니다\\n\"\n\"            //break;\\n\"\n\n#: src/flow_control/loop/nested.md:20\nmsgid \"// This breaks the outer loop\\n\"\nmsgstr \"// 이것은 외부 루프를 종료시킵니다\\n\"\n\n#: src/flow_control/loop/nested.md:24\nmsgid \"\\\"This point will never be reached\\\"\"\nmsgstr \"\\\"이 지점에는 결코 도달하지 않습니다\\\"\"\n\n#: src/flow_control/loop/nested.md:27\nmsgid \"\\\"Exited the outer loop\\\"\"\nmsgstr \"\\\"외부 루프에서 나갔습니다\\\"\"\n\n#: src/flow_control/loop/return.md:3\nmsgid \"\"\n\"One of the uses of a `loop` is to retry an operation until it succeeds. If \"\n\"the operation returns a value though, you might need to pass it to the rest \"\n\"of the code: put it after the `break`, and it will be returned by the `loop` \"\n\"expression.\"\nmsgstr \"\"\n\"성공할 때까지 작업을 재시도하는 것이 `loop`의 용도 중 하나입니다. 만약 작업\"\n\"이 값을 반환한다면, 이를 코드의 나머지 부분으로 전달해야 할 수도 있습니다. \"\n\"`break` 뒤에 값을 넣으면 `loop` 표현식에 의해 그 값이 반환됩니다.\"\n\n#: src/flow_control/while.md:3\nmsgid \"\"\n\"The `while` keyword can be used to run a loop while a condition is true.\"\nmsgstr \"\"\n\"`while` 키워드는 조건이 참(true)인 동안 루프를 실행하는 데 사용될 수 있습니\"\n\"다.\"\n\n#: src/flow_control/while.md:5\nmsgid \"\"\n\"Let's write the infamous [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) \"\n\"using a `while` loop.\"\nmsgstr \"\"\n\"악명 높은 [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz)를 `while` 루프\"\n\"를 사용하여 작성해 봅시다.\"\n\n#: src/flow_control/while.md:9\nmsgid \"// A counter variable\\n\"\nmsgstr \"// 카운터 변수\\n\"\n\n#: src/flow_control/while.md:12\nmsgid \"// Loop while `n` is less than 101\\n\"\nmsgstr \"// `n`이 101보다 작은 동안 루프 실행\\n\"\n\n#: src/flow_control/while.md:15 src/flow_control/for.md:17\n#: src/flow_control/for.md:37 src/fn.md:34\nmsgid \"\\\"fizzbuzz\\\"\"\nmsgstr \"\\\"fizzbuzz\\\"\"\n\n#: src/flow_control/while.md:17 src/flow_control/for.md:19\n#: src/flow_control/for.md:39 src/fn.md:36\nmsgid \"\\\"fizz\\\"\"\nmsgstr \"\\\"fizz\\\"\"\n\n#: src/flow_control/while.md:19 src/flow_control/for.md:21\n#: src/flow_control/for.md:41 src/fn.md:38\nmsgid \"\\\"buzz\\\"\"\nmsgstr \"\\\"buzz\\\"\"\n\n#: src/flow_control/while.md:24\nmsgid \"// Increment counter\\n\"\nmsgstr \"// 카운터 증가\\n\"\n\n#: src/flow_control/for.md:1\nmsgid \"for loops\"\nmsgstr \"for 루프\"\n\n#: src/flow_control/for.md:5\nmsgid \"\"\n\"The `for in` construct can be used to iterate through an `Iterator`. One of \"\n\"the easiest ways to create an iterator is to use the range notation `a..b`. \"\n\"This yields values from `a` (inclusive) to `b` (exclusive) in steps of one.\"\nmsgstr \"\"\n\"`for in` 구문은 `Iterator`를 통해 반복하는 데 사용될 수 있습니다. 이터레이터\"\n\"를 만드는 가장 쉬운 방법 중 하나는 범위 표기법 `a..b`를 사용하는 것입니다. 이\"\n\"는 `a`(포함)부터 `b`(미포함)까지의 값을 1씩 증가시키며 생성합니다.\"\n\n#: src/flow_control/for.md:10\nmsgid \"Let's write FizzBuzz using `for` instead of `while`.\"\nmsgstr \"`while` 대신 `for`를 사용하여 FizzBuzz를 작성해 봅시다.\"\n\n#: src/flow_control/for.md:14 src/flow_control/for.md:34\nmsgid \"// `n` will take the values: 1, 2, ..., 100 in each iteration\\n\"\nmsgstr \"// 각 반복에서 `n`은 1, 2, ..., 100의 값을 갖게 됩니다.\\n\"\n\n#: src/flow_control/for.md:29\nmsgid \"\"\n\"Alternatively, `a..=b` can be used for a range that is inclusive on both \"\n\"ends. The above can be written as:\"\nmsgstr \"\"\n\"또는 양쪽 끝을 모두 포함하는 범위에는 `a..=b`를 사용할 수 있습니다. 위의 코드\"\n\"는 다음과 같이 작성될 수 있습니다:\"\n\n#: src/flow_control/for.md:49\nmsgid \"for and iterators\"\nmsgstr \"for와 이터레이터\"\n\n#: src/flow_control/for.md:51\nmsgid \"\"\n\"The `for in` construct is able to interact with an `Iterator` in several \"\n\"ways. As discussed in the section on the [Iterator](../trait/iter.md) trait, \"\n\"by default the `for` loop will apply the `into_iter` function to the \"\n\"collection. However, this is not the only means of converting collections \"\n\"into iterators.\"\nmsgstr \"\"\n\"`for in` 구문은 여러 방식으로 `Iterator`와 상호작용할 수 있습니다. [Iterator]\"\n\"(../trait/iter.md) 트레이트 섹션에서 다룬 것처럼, 기본적으로 `for` 루프는 컬\"\n\"렉션에 `into_iter` 함수를 적용합니다. 하지만 이것이 컬렉션을 이터레이터로 변\"\n\"환하는 유일한 방법은 아닙니다.\"\n\n#: src/flow_control/for.md:56\nmsgid \"\"\n\"`into_iter`, `iter` and `iter_mut` all handle the conversion of a collection \"\n\"into an iterator in different ways, by providing different views on the data \"\n\"within.\"\nmsgstr \"\"\n\"`into_iter`, `iter`, `iter_mut`은 모두 내부 데이터에 대해 서로 다른 뷰를 제공\"\n\"함으로써 컬렉션을 이터레이터로 변환하는 작업을 서로 다른 방식으로 처리합니다.\"\n\n#: src/flow_control/for.md:60\nmsgid \"\"\n\"`iter` - This borrows each element of the collection through each iteration. \"\n\"Thus leaving the collection untouched and available for reuse after the loop.\"\nmsgstr \"\"\n\"`iter` - 매 반복마다 컬렉션의 각 요소를 빌려옵니다. 따라서 컬렉션은 수정되지 \"\n\"않은 상태로 유지되며 루프 이후에도 재사용할 수 있습니다.\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Frank\\\"\"\nmsgstr \"\\\"프랭크\\\"\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:69\n#: src/flow_control/for.md:85 src/flow_control/for.md:89\n#: src/flow_control/for.md:104 src/flow_control/for.md:108\nmsgid \"\\\"Ferris\\\"\"\nmsgstr \"\\\"페리스\\\"\"\n\n#: src/flow_control/for.md:69 src/flow_control/for.md:89\n#: src/flow_control/for.md:108\nmsgid \"\\\"There is a rustacean among us!\\\"\"\nmsgstr \"\\\"우리 중에 러스타시안(rustacean)이 있습니다!\\\"\"\n\n#: src/flow_control/for.md:70\nmsgid \"// TODO ^ Try deleting the & and matching just \\\"Ferris\\\"\\n\"\nmsgstr \"// TODO ^ &를 삭제하고 그냥 \\\"Ferris\\\"와 매칭해 보세요\\n\"\n\n#: src/flow_control/for.md:71 src/flow_control/for.md:90\nmsgid \"\\\"Hello {}\\\"\"\nmsgstr \"\\\"안녕 {}\\\"\"\n\n#: src/flow_control/for.md:75 src/flow_control/for.md:94\n#: src/flow_control/for.md:113\nmsgid \"\\\"names: {:?}\\\"\"\nmsgstr \"\\\"이름들: {:?}\\\"\"\n\n#: src/flow_control/for.md:79\nmsgid \"\"\n\"`into_iter` - This consumes the collection so that on each iteration the \"\n\"exact data is provided. Once the collection has been consumed it is no \"\n\"longer available for reuse as it has been 'moved' within the loop.\"\nmsgstr \"\"\n\"`into_iter` - 컬렉션을 소비(consume)하여 각 반복마다 실제 데이터를 제공합니\"\n\"다. 컬렉션이 소비되면 루프 내에서 '이동(moved)'된 것이므로 더 이상 재사용할 \"\n\"수 없습니다.\"\n\n#: src/flow_control/for.md:99\nmsgid \"\"\n\"`iter_mut` - This mutably borrows each element of the collection, allowing \"\n\"for the collection to be modified in place.\"\nmsgstr \"\"\n\"`iter_mut` - 컬렉션의 각 요소를 가변적으로 빌려와서, 컬렉션을 제자리에서 수정\"\n\"할 수 있게 합니다.\"\n\n#: src/flow_control/for.md:109\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"안녕\\\"\"\n\n#: src/flow_control/for.md:117\nmsgid \"\"\n\"In the above snippets note the type of `match` branch, that is the key \"\n\"difference in the types of iteration. The difference in type then of course \"\n\"implies differing actions that are able to be performed.\"\nmsgstr \"\"\n\"위의 스니펫에서 `match` 분기의 타입에 주목하세요. 이것이 반복 방식의 핵심적\"\n\"인 차이점입니다. 타입의 차이는 물론 수행할 수 있는 작업의 차이를 의미합니다.\"\n\n#: src/flow_control/for.md:123\nmsgid \"[Iterator](../trait/iter.md)\"\nmsgstr \"[Iterator](../trait/iter.md)\"\n\n#: src/flow_control/match.md:3\nmsgid \"\"\n\"Rust provides pattern matching via the `match` keyword, which can be used \"\n\"like a C `switch`. The first matching arm is evaluated and all possible \"\n\"values must be covered.\"\nmsgstr \"\"\n\"Rust는 `match` 키워드를 통해 패턴 매칭을 제공하며, 이는 C의 `switch`처럼 사용\"\n\"될 수 있습니다. 첫 번째로 매칭되는 팔(arm)이 실행되며, 가능한 모든 값을 다뤄\"\n\"야 합니다.\"\n\n#: src/flow_control/match.md:10\nmsgid \"// TODO ^ Try different values for `number`\\n\"\nmsgstr \"// TODO ^ `number`에 다른 값을 넣어보세요\\n\"\n\n#: src/flow_control/match.md:12\nmsgid \"\\\"Tell me about {}\\\"\"\nmsgstr \"\\\"{}에 대해 알려주세요\\\"\"\n\n#: src/flow_control/match.md:14\nmsgid \"// Match a single value\\n\"\nmsgstr \"// 단일 값 매칭\\n\"\n\n#: src/flow_control/match.md:15\nmsgid \"\\\"One!\\\"\"\nmsgstr \"\\\"1입니다!\\\"\"\n\n#: src/flow_control/match.md:16\nmsgid \"// Match several values\\n\"\nmsgstr \"// 여러 값 매칭\\n\"\n\n#: src/flow_control/match.md:17\nmsgid \"\\\"This is a prime\\\"\"\nmsgstr \"\\\"이것은 소수입니다\\\"\"\n\n#: src/flow_control/match.md:18\nmsgid \"\"\n\"// TODO ^ Try adding 13 to the list of prime values\\n\"\n\"        // Match an inclusive range\\n\"\nmsgstr \"\"\n\"// TODO ^ 소수 목록에 13을 추가해 보세요\\n\"\n\"        // 포함 범위를 매칭\\n\"\n\n#: src/flow_control/match.md:20\nmsgid \"\\\"A teen\\\"\"\nmsgstr \"\\\"10대입니다\\\"\"\n\n#: src/flow_control/match.md:21\nmsgid \"// Handle the rest of cases\\n\"\nmsgstr \"// 나머지 경우 처리\\n\"\n\n#: src/flow_control/match.md:22\nmsgid \"\\\"Ain't special\\\"\"\nmsgstr \"\\\"특별할 것 없습니다\\\"\"\n\n#: src/flow_control/match.md:23\nmsgid \"// TODO ^ Try commenting out this catch-all arm\\n\"\nmsgstr \"\"\n\"// TODO ^ 이 모든 경우를 처리하는 팔(catch-all arm)을 주석 처리해 보세요\\n\"\n\n#: src/flow_control/match.md:27\nmsgid \"// Match is an expression too\\n\"\nmsgstr \"// Match도 표현식입니다\\n\"\n\n#: src/flow_control/match.md:29\nmsgid \"// The arms of a match must cover all the possible values\\n\"\nmsgstr \"// match의 팔들은 가능한 모든 값을 다뤄야 합니다\\n\"\n\n#: src/flow_control/match.md:32\nmsgid \"// TODO ^ Try commenting out one of these arms\\n\"\nmsgstr \"// TODO ^ 이 팔들 중 하나를 주석 처리해 보세요\\n\"\n\n#: src/flow_control/match/destructuring.md:3\nmsgid \"A `match` block can destructure items in a variety of ways.\"\nmsgstr \"\"\n\"`match` 블록은 다양한 방식으로 아이템을 구조 분해(destructure)할 수 있습니다.\"\n\n#: src/flow_control/match/destructuring.md:5\nmsgid \"[Destructuring Tuples](destructuring/destructure_tuple.md)\"\nmsgstr \"[튜플 구조 분해](destructuring/destructure_tuple.md)\"\n\n#: src/flow_control/match/destructuring.md:6\nmsgid \"[Destructuring Arrays and Slices](destructuring/destructure_slice.md)\"\nmsgstr \"[배열과 슬라이스 구조 분해](destructuring/destructure_slice.md)\"\n\n#: src/flow_control/match/destructuring.md:7\nmsgid \"[Destructuring Enums](destructuring/destructure_enum.md)\"\nmsgstr \"[열거형 구조 분해](destructuring/destructure_enum.md)\"\n\n#: src/flow_control/match/destructuring.md:8\nmsgid \"[Destructuring Pointers](destructuring/destructure_pointers.md)\"\nmsgstr \"[포인터 구조 분해](destructuring/destructure_pointers.md)\"\n\n#: src/flow_control/match/destructuring.md:9\nmsgid \"[Destructuring Structures](destructuring/destructure_structures.md)\"\nmsgstr \"[구조체 구조 분해](destructuring/destructure_structures.md)\"\n\n#: src/flow_control/match/destructuring.md:19\nmsgid \"\"\n\"[The Rust Reference for Destructuring](https://doc.rust-lang.org/reference/\"\n\"patterns.html#r-patterns.destructure)\"\nmsgstr \"\"\n\"[구조 분해에 관한 Rust 레퍼런스](https://doc.rust-lang.org/reference/\"\n\"patterns.html#r-patterns.destructure)\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:3\nmsgid \"Tuples can be destructured in a `match` as follows:\"\nmsgstr \"튜플은 `match`에서 다음과 같이 구조 분해될 수 있습니다:\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:8\nmsgid \"// TODO ^ Try different values for `triple`\\n\"\nmsgstr \"// TODO ^ `triple`에 다른 값을 넣어보세요\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:10\nmsgid \"\\\"Tell me about {:?}\\\"\"\nmsgstr \"\\\"{:?}에 대해 알려주세요\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:11\nmsgid \"// Match can be used to destructure a tuple\\n\"\nmsgstr \"// match를 사용하여 튜플을 구조 분해할 수 있습니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:13\nmsgid \"// Destructure the second and third elements\\n\"\nmsgstr \"// 두 번째와 세 번째 요소를 구조 분해합니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:14\nmsgid \"\\\"First is `0`, `y` is {:?}, and `z` is {:?}\\\"\"\nmsgstr \"\\\"첫 번째는 `0`이고, `y`는 {:?}, `z`는 {:?}입니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:15\nmsgid \"\\\"First is `1` and the rest doesn't matter\\\"\"\nmsgstr \"\\\"첫 번째는 `1`이고 나머지는 상관없습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:16\nmsgid \"\\\"last is `2` and the rest doesn't matter\\\"\"\nmsgstr \"\\\"마지막은 `2`이고 나머지는 상관없습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:17\nmsgid \"\\\"First is `3`, last is `4`, and the rest doesn't matter\\\"\"\nmsgstr \"\\\"첫 번째는 `3`, 마지막은 `4`이며 나머지는 상관없습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:18\nmsgid \"// `..` can be used to ignore the rest of the tuple\\n\"\nmsgstr \"// `..`을 사용하여 튜플의 나머지를 무시할 수 있습니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:19\nmsgid \"\\\"It doesn't matter what they are\\\"\"\nmsgstr \"\\\"그것들이 무엇이든 상관없습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:20\nmsgid \"// `_` means don't bind the value to a variable\\n\"\nmsgstr \"// `_`는 값을 변수에 바인딩하지 않음을 의미합니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:27\nmsgid \"[Tuples](../../../primitives/tuples.md)\"\nmsgstr \"[튜플](../../../primitives/tuples.md)\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:3\nmsgid \"Like tuples, arrays and slices can be destructured this way:\"\nmsgstr \"\"\n\"튜플과 마찬가지로, 배열과 슬라이스도 다음과 같은 방식으로 구조 분해될 수 있습\"\n\"니다:\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:7\nmsgid \"// Try changing the values in the array, or make it a slice!\\n\"\nmsgstr \"// 배열의 값을 변경하거나 슬라이스로 만들어 보세요!\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:11\nmsgid \"\"\n\"// Binds the second and the third elements to the respective variables\\n\"\nmsgstr \"// 두 번째와 세 번째 요소를 각각의 변수에 바인딩합니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:13\nmsgid \"\\\"array[0] = 0, array[1] = {}, array[2] = {}\\\"\"\nmsgstr \"\\\"array[0] = 0, array[1] = {}, array[2] = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:15\nmsgid \"// Single values can be ignored with _\\n\"\nmsgstr \"// 단일 값은 _로 무시할 수 있습니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:17\nmsgid \"\\\"array[0] = 1, array[2] = {} and array[1] was ignored\\\"\"\nmsgstr \"\\\"array[0] = 1, array[2] = {} 이고 array[1]은 무시되었습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:21\nmsgid \"// You can also bind some and ignore the rest\\n\"\nmsgstr \"// 일부만 바인딩하고 나머지는 무시할 수도 있습니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:23\nmsgid \"\\\"array[0] = -1, array[1] = {} and all the other ones were ignored\\\"\"\nmsgstr \"\\\"array[0] = -1, array[1] = {} 이고 다른 모든 것들은 무시되었습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:26\nmsgid \"\"\n\"// The code below would not compile\\n\"\n\"        // [-1, second] => ...\\n\"\nmsgstr \"\"\n\"// 아래 코드는 컴파일되지 않습니다\\n\"\n\"        // [-1, second] => ...\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:29\nmsgid \"\"\n\"// Or store them in another array/slice (the type depends on\\n\"\n\"        // that of the value that is being matched against)\\n\"\nmsgstr \"\"\n\"// 또는 다른 배열/슬라이스에 저장할 수도 있습니다 (타입은 매칭되는 값의 타입\"\n\"에 따라 달라집니다)\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:32\nmsgid \"\\\"array[0] = 3, array[1] = {} and the other elements were {:?}\\\"\"\nmsgstr \"\\\"array[0] = 3, array[1] = {} 이고 다른 요소들은 {:?}입니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:36\nmsgid \"\"\n\"// Combining these patterns, we can, for example, bind the first and\\n\"\n\"        // last values, and store the rest of them in a single array\\n\"\nmsgstr \"\"\n\"// 이러한 패턴들을 결합하여, 예를 들어 첫 번째와 마지막 값을 바인딩하고 나머\"\n\"지는 하나의 배열에 저장할 수 있습니다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:39\nmsgid \"\\\"array[0] = {}, middle = {:?}, array[2] = {}\\\"\"\nmsgstr \"\\\"array[0] = {}, middle = {:?}, array[2] = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:48\nmsgid \"\"\n\"[Arrays and Slices](../../../primitives/array.md) and [Binding](../\"\n\"binding.md) for `@` sigil\"\nmsgstr \"\"\n\"[배열과 슬라이스](../../../primitives/array.md) 그리고 `@` 기호를 사용한 [바\"\n\"인딩](../binding.md)\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:3\nmsgid \"An `enum` is destructured similarly:\"\nmsgstr \"`enum`도 비슷하게 구조 분해됩니다:\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:6\nmsgid \"\"\n\"// `allow` required to silence warnings because only\\n\"\n\"// one variant is used.\\n\"\nmsgstr \"\"\n\"// 단 하나의 변체만 사용되므로 경고를 억제하기 위해 `allow`가 필요합니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:10\nmsgid \"// These 3 are specified solely by their name.\\n\"\nmsgstr \"// 이 세 가지는 오직 이름으로만 지정됩니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:14\nmsgid \"// These likewise tie `u32` tuples to different names: color models.\\n\"\nmsgstr \"\"\n\"// 이들은 마찬가지로 `u32` 튜플을 서로 다른 이름(컬러 모델)에 연결합니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:24\nmsgid \"// TODO ^ Try different variants for `color`\\n\"\nmsgstr \"// TODO ^ `color`에 다른 변체들을 넣어보세요\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:26\nmsgid \"\\\"What color is it?\\\"\"\nmsgstr \"\\\"이것은 무슨 색인가요?\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:27\nmsgid \"// An `enum` can be destructured using a `match`.\\n\"\nmsgstr \"// `match`를 사용하여 `enum`을 구조 분해할 수 있습니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:29\nmsgid \"\\\"The color is Red!\\\"\"\nmsgstr \"\\\"빨간색입니다!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:30\nmsgid \"\\\"The color is Blue!\\\"\"\nmsgstr \"\\\"파란색입니다!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:31\nmsgid \"\\\"The color is Green!\\\"\"\nmsgstr \"\\\"초록색입니다!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:33\nmsgid \"\\\"Red: {}, green: {}, and blue: {}!\\\"\"\nmsgstr \"\\\"빨강: {}, 초록: {}, 파랑: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:35\nmsgid \"\\\"Hue: {}, saturation: {}, value: {}!\\\"\"\nmsgstr \"\\\"색상: {}, 채도: {}, 명도: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:37\nmsgid \"\\\"Hue: {}, saturation: {}, lightness: {}!\\\"\"\nmsgstr \"\\\"색상: {}, 채도: {}, 밝기: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:39\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}!\\\"\"\nmsgstr \"\\\"청록: {}, 자주: {}, 노랑: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:41\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}, key (black): {}!\\\"\"\nmsgstr \"\\\"청록: {}, 자주: {}, 노랑: {}, 검정: {}!\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:43\nmsgid \"// Don't need another arm because all variants have been examined\\n\"\nmsgstr \"// 모든 변체를 검사했으므로 다른 팔(arm)은 필요하지 않습니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:50\nmsgid \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md), [color models](https://\"\n\"en.wikipedia.org/wiki/Color_model) and [`enum`](../../../custom_types/\"\n\"enum.md)\"\nmsgstr \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md), [컬러 모델](https://\"\n\"en.wikipedia.org/wiki/Color_model) 및 [`enum`](../../../custom_types/enum.md)\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:3\nmsgid \"\"\n\"For pointers, a distinction needs to be made between destructuring and \"\n\"dereferencing as they are different concepts which are used differently from \"\n\"languages like C/C++.\"\nmsgstr \"\"\n\"포인터의 경우, 구조 분해(destructuring)와 역참조(dereferencing)를 구분해야 합\"\n\"니다. 이들은 C/C++와 같은 언어와는 다르게 사용되는 서로 다른 개념이기 때문입\"\n\"니다.\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:7\nmsgid \"Dereferencing uses `*`\"\nmsgstr \"역참조는 `*`를 사용합니다\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:8\nmsgid \"Destructuring uses `&`, `ref`, and `ref mut`\"\nmsgstr \"구조 분해는 `&`, `ref`, `ref mut`을 사용합니다\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:12\nmsgid \"\"\n\"// Assign a reference of type `i32`. The `&` signifies there\\n\"\n\"    // is a reference being assigned.\\n\"\nmsgstr \"\"\n\"// `i32` 타입의 참조를 할당합니다. `&`는 참조가 할당되고 있음을 나타냅니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:17\nmsgid \"\"\n\"// If `reference` is pattern matched against `&val`, it results\\n\"\n\"        // in a comparison like:\\n\"\n\"        // `&i32`\\n\"\n\"        // `&val`\\n\"\n\"        // ^ We see that if the matching `&`s are dropped, then the `i32`\\n\"\n\"        // should be assigned to `val`.\\n\"\nmsgstr \"\"\n\"// 만약 `reference`를 `&val`에 대해 패턴 매칭하면, 다음과 같은 비교 결과가 됩\"\n\"니다:\\n\"\n\"// `&i32`\\n\"\n\"// `&val`\\n\"\n\"// ^ 매칭되는 `&`들을 떼어내면, `i32`가 `val`에 할당되어야 함을 알 수 있습니\"\n\"다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:23\nmsgid \"\\\"Got a value via destructuring: {:?}\\\"\"\nmsgstr \"\\\"구조 분해를 통해 값을 얻었습니다: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:26\nmsgid \"// To avoid the `&`, you dereference before matching.\\n\"\nmsgstr \"// `&`를 피하려면, 매칭하기 전에 역참조를 수행합니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:28\nmsgid \"\\\"Got a value via dereferencing: {:?}\\\"\"\nmsgstr \"\\\"역참조를 통해 값을 얻었습니다: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:31\nmsgid \"\"\n\"// What if you don't start with a reference? `reference` was a `&`\\n\"\n\"    // because the right side was already a reference. This is not\\n\"\n\"    // a reference because the right side is not one.\\n\"\nmsgstr \"\"\n\"// 참조로 시작하지 않는다면 어떨까요? `reference`는 오른쪽이 이미\\n\"\n\"// 참조였기 때문에 `&`였습니다. 이것은 오른쪽이 참조가 아니기 때문에\\n\"\n\"// 참조가 아닙니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:36\nmsgid \"\"\n\"// Rust provides `ref` for exactly this purpose. It modifies the\\n\"\n\"    // assignment so that a reference is created for the element; this\\n\"\n\"    // reference is assigned.\\n\"\nmsgstr \"\"\n\"// Rust는 정확히 이 목적을 위해 `ref`를 제공합니다. 이는 할당 방식을\\n\"\n\"// 수정하여 요소에 대한 참조가 생성되도록 하며, 이 참조가 할당됩니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:41\nmsgid \"\"\n\"// Accordingly, by defining 2 values without references, references\\n\"\n\"    // can be retrieved via `ref` and `ref mut`.\\n\"\nmsgstr \"\"\n\"// 따라서, 참조가 없는 두 값을 정의함으로써, `ref`와 `ref mut`를 통해 참조를 \"\n\"가져올 수 있습니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:46\nmsgid \"// Use `ref` keyword to create a reference.\\n\"\nmsgstr \"// 참조를 생성하려면 `ref` 키워드를 사용합니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:48\nmsgid \"\\\"Got a reference to a value: {:?}\\\"\"\nmsgstr \"\\\"값에 대한 참조를 얻었습니다: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:51\nmsgid \"// Use `ref mut` similarly.\\n\"\nmsgstr \"// `ref mut`도 비슷하게 사용합니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:54\nmsgid \"\"\n\"// Got a reference. Gotta dereference it before we can\\n\"\n\"            // add anything to it.\\n\"\nmsgstr \"\"\n\"// 참조를 얻었습니다. 여기에 무언가를 더하기 전에\\n\"\n\"// 역참조를 해야 합니다.\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:57\nmsgid \"\\\"We added 10. `mut_value`: {:?}\\\"\"\nmsgstr \"\\\"10을 더했습니다. `mut_value`: {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:65\nmsgid \"[The ref pattern](../../../scope/borrow/ref.md)\"\nmsgstr \"[ref 패턴](../../../scope/borrow/ref.md)\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:3\nmsgid \"Similarly, a `struct` can be destructured as shown:\"\nmsgstr \"마찬가지로, `struct`는 다음과 같이 구조 분해될 수 있습니다:\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:12\nmsgid \"// Try changing the values in the struct to see what happens\\n\"\nmsgstr \"// 구조체의 값을 변경하여 어떤 일이 일어나는지 확인해 보세요\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:16\nmsgid \"\\\"First of x is 1, b = {},  y = {} \\\"\"\nmsgstr \"\\\"x의 첫 번째는 1이고, b = {}, y = {} 입니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:18\nmsgid \"\"\n\"// you can destructure structs and rename the variables,\\n\"\n\"        // the order is not important\\n\"\nmsgstr \"\"\n\"// 구조체를 구조 분해하고 변수 이름을 바꿀 수 있으며, 순서는 중요하지 않습니\"\n\"다\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:20\nmsgid \"\\\"y is 2, i = {:?}\\\"\"\nmsgstr \"\\\"y는 2이고, i = {:?}입니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:22\nmsgid \"// and you can also ignore some variables:\\n\"\nmsgstr \"// 그리고 일부 변수를 무시할 수도 있습니다:\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:23\nmsgid \"\\\"y = {}, we don't care about x\\\"\"\nmsgstr \"\\\"y = {}이며, x는 신경 쓰지 않습니다\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:24\nmsgid \"\"\n\"// this will give an error: pattern does not mention field `x`\\n\"\n\"        //Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\nmsgstr \"\"\n\"// 이것은 에러를 발생시킵니다: 패턴에 `x` 필드가 언급되지 않았습니다\\n\"\n\"//Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:30\nmsgid \"// You do not need a match block to destructure structs:\\n\"\nmsgstr \"\"\n\"// 구조체를 구조 분해하기 위해 반드시 match 블록이 필요한 것은 아닙니다:\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:32\nmsgid \"\\\"Outside: x0 = {x0:?}, y0 = {y0}\\\"\"\nmsgstr \"\\\"외부: x0 = {x0:?}, y0 = {y0}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:34\nmsgid \"// Destructuring works with nested structs as well:\\n\"\nmsgstr \"// 구조 분해는 중첩된 구조체에서도 작동합니다:\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:41\nmsgid \"\\\"Nested: nested_x = {nested_x:?}, nested_y = {nested_y:?}\\\"\"\nmsgstr \"\\\"중첩됨: nested_x = {nested_x:?}, nested_y = {nested_y:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:47\nmsgid \"[Structs](../../../custom_types/structs.md)\"\nmsgstr \"[구조체](../../../custom_types/structs.md)\"\n\n#: src/flow_control/match/guard.md:3\nmsgid \"A `match` _guard_ can be added to filter the arm.\"\nmsgstr \"\"\n\"매치 팔(arm)을 필터링하기 위해 `match` _가드(guard)_를 추가할 수 있습니다.\"\n\n#: src/flow_control/match/guard.md:14\nmsgid \"// ^ TODO try different values for `temperature`\\n\"\nmsgstr \"// ^ TODO `temperature`에 다른 값을 시도해 보세요\\n\"\n\n#: src/flow_control/match/guard.md:17\nmsgid \"\\\"{}C is above 30 Celsius\\\"\"\nmsgstr \"\\\"{}C는 섭씨 30도 초과입니다\\\"\"\n\n#: src/flow_control/match/guard.md:18\nmsgid \"// The `if condition` part ^ is a guard\\n\"\nmsgstr \"// `if 조건` 부분 ^ 이 가드입니다\\n\"\n\n#: src/flow_control/match/guard.md:19\nmsgid \"\\\"{}C is equal to or below 30 Celsius\\\"\"\nmsgstr \"\\\"{}C는 섭씨 30도 이하입니다\\\"\"\n\n#: src/flow_control/match/guard.md:21\nmsgid \"\\\"{}F is above 86 Fahrenheit\\\"\"\nmsgstr \"\\\"{}F는 화씨 86도 초과입니다\\\"\"\n\n#: src/flow_control/match/guard.md:22\nmsgid \"\\\"{}F is equal to or below 86 Fahrenheit\\\"\"\nmsgstr \"\\\"{}F는 화씨 86도 이하입니다\\\"\"\n\n#: src/flow_control/match/guard.md:27\nmsgid \"\"\n\"Note that the compiler won't take guard conditions into account when \"\n\"checking if all patterns are covered by the match expression.\"\nmsgstr \"\"\n\"컴파일러는 매치 표현식이 모든 패턴을 다루고 있는지 확인할 때 가드 조건을 고려\"\n\"하지 않는다는 점에 유의하세요.\"\n\n#: src/flow_control/match/guard.md:35\nmsgid \"\\\"Zero\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/flow_control/match/guard.md:36\nmsgid \"\\\"Greater than zero\\\"\"\nmsgstr \"\\\"0보다 큼\\\"\"\n\n#: src/flow_control/match/guard.md:37\nmsgid \"\"\n\"// _ => unreachable!(\\\"Should never happen.\\\"),\\n\"\n\"        // TODO ^ uncomment to fix compilation\\n\"\nmsgstr \"\"\n\"// _ => unreachable!(\\\"절대 일어날 수 없는 일입니다.\\\"),\\n\"\n\"// TODO ^ 컴파일을 수정하려면 주석을 해제하세요\\n\"\n\n#: src/flow_control/match/guard.md:45\nmsgid \"\"\n\"[Tuples](../../primitives/tuples.md) [Enums](../../custom_types/enum.md)\"\nmsgstr \"\"\n\"[튜플](../../primitives/tuples.md) [열거형](../../custom_types/enum.md)\"\n\n#: src/flow_control/match/binding.md:3\nmsgid \"\"\n\"Indirectly accessing a variable makes it impossible to branch and use that \"\n\"variable without re-binding. `match` provides the `@` sigil for binding \"\n\"values to names:\"\nmsgstr \"\"\n\"변수에 간접적으로 접근하면 재바인딩 없이 해당 변수를 분기하고 사용하는 것이 \"\n\"불가능합니다. `match`는 값을 이름에 바인딩하기 위한 `@` 기호를 제공합니다:\"\n\n#: src/flow_control/match/binding.md:8\nmsgid \"// A function `age` which returns a `u32`.\\n\"\nmsgstr \"// `u32`를 반환하는 `age` 함수.\\n\"\n\n#: src/flow_control/match/binding.md:14\nmsgid \"\\\"Tell me what type of person you are\\\"\"\nmsgstr \"\\\"당신이 어떤 종류의 사람인지 말해주세요\\\"\"\n\n#: src/flow_control/match/binding.md:17\nmsgid \"\\\"I haven't celebrated my first birthday yet\\\"\"\nmsgstr \"\\\"아직 첫 번째 생일을 맞이하지 않았습니다\\\"\"\n\n#: src/flow_control/match/binding.md:18\nmsgid \"\"\n\"// Could `match` 1 ..= 12 directly but then what age\\n\"\n\"        // would the child be?\\n\"\n\"        // Could `match` n and use an `if` guard, but would\\n\"\n\"        // not contribute to exhaustiveness checks.\\n\"\n\"        // (Although in this case that would not matter since\\n\"\n\"        // a \\\"catch-all\\\" pattern is present at the bottom)\\n\"\n\"        // Instead, bind to `n` for the sequence of 1 ..= 12.\\n\"\n\"        // Now the age can be reported.\\n\"\nmsgstr \"\"\n\"// 1 ..= 12를 직접 `match`할 수 있지만, 그러면\\n\"\n\"// 아이의 나이가 몇 살인지 알 수 있을까요?\\n\"\n\"// n을 `match`하고 `if` 가드를 사용할 수 있지만,\\n\"\n\"// 이는 철저함(exhaustiveness) 검사에 기여하지 않습니다.\\n\"\n\"// (비록 이 경우에는 하단에 \\\"catch-all\\\" 패턴이 있어 상관없지만요)\\n\"\n\"// 대신, 1 ..= 12 시퀀스에 대해 `n`에 바인딩합니다.\\n\"\n\"// 이제 나이를 보고할 수 있습니다.\\n\"\n\n#: src/flow_control/match/binding.md:26\nmsgid \"\\\"I'm a child of age {:?}\\\"\"\nmsgstr \"\\\"저는 {:?}살인 어린이입니다\\\"\"\n\n#: src/flow_control/match/binding.md:27 src/flow_control/match/binding.md:29\nmsgid \"\\\"I'm a teen of age {:?}\\\"\"\nmsgstr \"\\\"저는 {:?}살인 청소년입니다\\\"\"\n\n#: src/flow_control/match/binding.md:28\nmsgid \"// A similar binding can be done when matching several values.\\n\"\nmsgstr \"// 여러 값을 매칭할 때도 유사한 바인딩을 수행할 수 있습니다.\\n\"\n\n#: src/flow_control/match/binding.md:30\nmsgid \"// Nothing bound. Return the result.\\n\"\nmsgstr \"// 바인딩된 것이 없습니다. 결과를 반환합니다.\\n\"\n\n#: src/flow_control/match/binding.md:31\nmsgid \"\\\"I'm an old person of age {:?}\\\"\"\nmsgstr \"\\\"저는 {:?}살인 어르신입니다\\\"\"\n\n#: src/flow_control/match/binding.md:36\nmsgid \"\"\n\"You can also use binding to \\\"destructure\\\" `enum` variants, such as \"\n\"`Option`:\"\nmsgstr \"\"\n\"또한 `Option`과 같은 `enum` 변체를 \\\"구조 분해\\\"하기 위해 바인딩을 사용할 수 \"\n\"있습니다:\"\n\n#: src/flow_control/match/binding.md:45\nmsgid \"\"\n\"// Got `Some` variant, match if its value, bound to `n`,\\n\"\n\"        // is equal to 42.\\n\"\n\"        // Could also use `Some(42)` and print `\\\"The Answer: 42!\\\"`\\n\"\n\"        // but that would require changing `42` in 2 spots should\\n\"\n\"        // you ever wish to change it.\\n\"\n\"        // Could also use `Some(n) if n == 42` and print `\\\"The Answer: {n}!\"\n\"\\\"`\\n\"\n\"        // but that would not contribute to exhaustiveness checks.\\n\"\n\"        // (Although in this case that would not matter since\\n\"\n\"        // the next arm is a \\\"catch-all\\\" pattern)\\n\"\nmsgstr \"\"\n\"// `Some` 변체를 얻었을 때, `n`에 바인딩된 그 값이\\n\"\n\"// 42와 같은지 매칭합니다.\\n\"\n\"// `Some(42)`를 사용하여 `\\\"정답: 42!\\\"`를 출력할 수도 있지만,\\n\"\n\"// 그러면 나중에 값을 바꾸고 싶을 때 두 군데를 수정해야 합니다.\\n\"\n\"// `Some(n) if n == 42`를 사용하여 `\\\"정답: {n}!\\\"`를 출력할 수도 있지만,\\n\"\n\"// 이는 철저함 검사에 기여하지 않습니다.\\n\"\n\"// (비록 이 경우에는 다음 팔이 \\\"catch-all\\\" 패턴이라 상관없지만요)\\n\"\n\n#: src/flow_control/match/binding.md:54\nmsgid \"\\\"The Answer: {}!\\\"\"\nmsgstr \"\\\"정답: {}!\\\"\"\n\n#: src/flow_control/match/binding.md:55\nmsgid \"// Match any other number.\\n\"\nmsgstr \"// 다른 모든 숫자 매칭.\\n\"\n\n#: src/flow_control/match/binding.md:56\nmsgid \"\\\"Not interesting... {}\\\"\"\nmsgstr \"\\\"흥미롭지 않네요... {}\\\"\"\n\n#: src/flow_control/match/binding.md:57\nmsgid \"// Match anything else (`None` variant).\\n\"\nmsgstr \"// 그 외의 모든 경우(`None` 변체) 매칭.\\n\"\n\n#: src/flow_control/match/binding.md:65\nmsgid \"\"\n\"[`functions`](../../fn.md), [`enums`](../../custom_types/enum.md) and \"\n\"[`Option`](../../std/option.md)\"\nmsgstr \"\"\n\"[`함수`](../../fn.md), [`열거형`](../../custom_types/enum.md) 그리고 \"\n\"[`Option`](../../std/option.md)\"\n\n#: src/flow_control/if_let.md:3\nmsgid \"\"\n\"For some use cases, when matching enums, `match` is awkward. For example:\"\nmsgstr \"\"\n\"어떤 경우에는 열거형을 매칭할 때 `match`가 어색할 수 있습니다. 예를 들어:\"\n\n#: src/flow_control/if_let.md:6 src/flow_control/while_let.md:7\n#: src/flow_control/while_let.md:35\nmsgid \"// Make `optional` of type `Option<i32>`\\n\"\nmsgstr \"// `Option<i32>` 타입의 `optional` 생성\\n\"\n\n#: src/flow_control/if_let.md:10\nmsgid \"\\\"This is a really long string and `{:?}`\\\"\"\nmsgstr \"\\\"이것은 정말 긴 문자열이며 `{:?}`입니다\\\"\"\n\n#: src/flow_control/if_let.md:12\nmsgid \"\"\n\"// ^ Required because `match` is exhaustive. Doesn't it seem\\n\"\n\"    // like wasted space?\\n\"\nmsgstr \"\"\n\"// ^ `match`는 철저해야(exhaustive) 하기 때문에 필요합니다. 공간 낭비처럼\\n\"\n\"// 보이진 않나요?\\n\"\n\n#: src/flow_control/if_let.md:18\nmsgid \"\"\n\"`if let` is cleaner for this use case and in addition allows various failure \"\n\"options to be specified:\"\nmsgstr \"\"\n\"이런 경우 `if let`이 더 깔끔하며, 추가로 다양한 실패 옵션을 지정할 수 있습니\"\n\"다:\"\n\n#: src/flow_control/if_let.md:23\nmsgid \"// All have type `Option<i32>`\\n\"\nmsgstr \"// 모두 `Option<i32>` 타입입니다\\n\"\n\n#: src/flow_control/if_let.md:28\nmsgid \"\"\n\"// The `if let` construct reads: \\\"if `let` destructures `number` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`).\\n\"\nmsgstr \"\"\n\"// `if let` 구문은 다음과 같이 읽힙니다: \\\"만약 `let`이 `number`를\\n\"\n\"// `Some(i)`로 구조 분해한다면, 블록(`{}`)을 실행하라.\\\"\\n\"\n\n#: src/flow_control/if_let.md:31 src/flow_control/if_let.md:36\n#: src/flow_control/if_let.md:46\nmsgid \"\\\"Matched {:?}!\\\"\"\nmsgstr \"\\\"{:?}가 매칭되었습니다!\\\"\"\n\n#: src/flow_control/if_let.md:34\nmsgid \"// If you need to specify a failure, use an else:\\n\"\nmsgstr \"// 실패한 경우를 지정해야 한다면, else를 사용하세요:\\n\"\n\n#: src/flow_control/if_let.md:38\nmsgid \"// Destructure failed. Change to the failure case.\\n\"\nmsgstr \"// 구조 분해에 실패했습니다. 실패 사례로 전환합니다.\\n\"\n\n#: src/flow_control/if_let.md:39 src/flow_control/if_let.md:50\nmsgid \"\\\"Didn't match a number. Let's go with a letter!\\\"\"\nmsgstr \"\\\"숫자와 매칭되지 않았습니다. 문자로 해봅시다!\\\"\"\n\n#: src/flow_control/if_let.md:42\nmsgid \"// Provide an altered failing condition.\\n\"\nmsgstr \"// 변경된 실패 조건을 제공합니다.\\n\"\n\n#: src/flow_control/if_let.md:47\nmsgid \"\"\n\"// Destructure failed. Evaluate an `else if` condition to see if the\\n\"\n\"    // alternate failure branch should be taken:\\n\"\nmsgstr \"\"\n\"// 구조 분해에 실패했습니다. 다른 실패 분기를 타야 하는지\\n\"\n\"// `else if` 조건을 평가합니다:\\n\"\n\n#: src/flow_control/if_let.md:52\nmsgid \"// The condition evaluated false. This branch is the default:\\n\"\nmsgstr \"// 조건이 거짓(false)으로 평가되었습니다. 이 분기가 기본입니다:\\n\"\n\n#: src/flow_control/if_let.md:53\nmsgid \"\\\"I don't like letters. Let's go with an emoticon :)!\\\"\"\nmsgstr \"\\\"문자는 별로예요. 이모티콘 :)으로 가봅시다!\\\"\"\n\n#: src/flow_control/if_let.md:58\nmsgid \"In the same way, `if let` can be used to match any enum value:\"\nmsgstr \"\"\n\"같은 방식으로, `if let`은 모든 열거형 값을 매칭하는 데 사용될 수 있습니다:\"\n\n#: src/flow_control/if_let.md:61\nmsgid \"// Our example enum\\n\"\nmsgstr \"// 예제 열거형\\n\"\n\n#: src/flow_control/if_let.md:69\nmsgid \"// Create example variables\\n\"\nmsgstr \"// 예제 변수 생성\\n\"\n\n#: src/flow_control/if_let.md:74 src/flow_control/if_let.md:110\nmsgid \"// Variable a matches Foo::Bar\\n\"\nmsgstr \"// 변수 a는 Foo::Bar와 매칭됩니다\\n\"\n\n#: src/flow_control/if_let.md:76 src/flow_control/if_let.md:113\nmsgid \"\\\"a is foobar\\\"\"\nmsgstr \"\\\"a는 foobar입니다\\\"\"\n\n#: src/flow_control/if_let.md:79\nmsgid \"\"\n\"// Variable b does not match Foo::Bar\\n\"\n\"    // So this will print nothing\\n\"\nmsgstr \"\"\n\"// 변수 b는 Foo::Bar와 매칭되지 않습니다\\n\"\n\"// 따라서 아무것도 출력되지 않습니다\\n\"\n\n#: src/flow_control/if_let.md:82\nmsgid \"\\\"b is foobar\\\"\"\nmsgstr \"\\\"b는 foobar입니다\\\"\"\n\n#: src/flow_control/if_let.md:85\nmsgid \"\"\n\"// Variable c matches Foo::Qux which has a value\\n\"\n\"    // Similar to Some() in the previous example\\n\"\nmsgstr \"\"\n\"// 변수 c는 값을 가진 Foo::Qux와 매칭됩니다\\n\"\n\"// 앞선 예제의 Some()과 유사합니다\\n\"\n\n#: src/flow_control/if_let.md:88\nmsgid \"\\\"c is {}\\\"\"\nmsgstr \"\\\"c는 {}입니다\\\"\"\n\n#: src/flow_control/if_let.md:91\nmsgid \"// Binding also works with `if let`\\n\"\nmsgstr \"// 바인딩은 `if let`에서도 작동합니다\\n\"\n\n#: src/flow_control/if_let.md:93\nmsgid \"\\\"c is one hundred\\\"\"\nmsgstr \"\\\"c는 100입니다\\\"\"\n\n#: src/flow_control/if_let.md:98\nmsgid \"\"\n\"Another benefit is that `if let` allows us to match non-parameterized enum \"\n\"variants. This is true even in cases where the enum doesn't implement or \"\n\"derive `PartialEq`. In such cases `if Foo::Bar == a` would fail to compile, \"\n\"because instances of the enum cannot be equated, however `if let` will \"\n\"continue to work.\"\nmsgstr \"\"\n\"또 다른 장점은 `if let`을 사용하면 파라미터가 없는 열거형 변체도 매칭할 수 있\"\n\"다는 점입니다. 이는 열거형이 `PartialEq`를 구현하거나 유도하지 않는 경우에도 \"\n\"마찬가지입니다. 이러한 경우 `if Foo::Bar == a`는 열거형 인스턴스를 비교할 수 \"\n\"없기 때문에 컴파일에 실패하지만, `if let`은 계속 작동합니다.\"\n\n#: src/flow_control/if_let.md:100\nmsgid \"Would you like a challenge? Fix the following example to use `if let`:\"\nmsgstr \"도전해 보시겠습니까? 다음 예제를 `if let`을 사용하도록 수정해 보세요:\"\n\n#: src/flow_control/if_let.md:103\nmsgid \"\"\n\"// This enum purposely neither implements nor derives PartialEq.\\n\"\n\"// That is why comparing Foo::Bar == a fails below.\\n\"\nmsgstr \"\"\n\"// 이 열거형은 의도적으로 PartialEq를 구현하거나 유도(derive)하지 않았습니\"\n\"다.\\n\"\n\"// 그래서 아래에서 Foo::Bar == a 를 비교하는 것이 실패합니다.\\n\"\n\n#: src/flow_control/if_let.md:112\nmsgid \"// ^-- this causes a compile-time error. Use `if let` instead.\\n\"\nmsgstr \"\"\n\"// ^-- 이것은 컴파일 타임 에러를 발생시킵니다. 대신 `if let`을 사용하세요.\\n\"\n\n#: src/flow_control/if_let.md:120\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/160)\"\nmsgstr \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), 그리고 [RFC]\"\n\"(https://github.com/rust-lang/rfcs/pull/160)\"\n\n#: src/flow_control/let_else.md:3\nmsgid \"🛈 stable since: rust 1.65\"\nmsgstr \"🛈 안정화 버전: rust 1.65\"\n\n#: src/flow_control/let_else.md:5\nmsgid \"\"\n\"🛈 you can target specific edition by compiling like this `rustc --\"\n\"edition=2021 main.rs`\"\nmsgstr \"\"\n\"🛈 다음과 같이 컴파일하여 특정 에디션을 타겟팅할 수 있습니다: `rustc --\"\n\"edition=2021 main.rs`\"\n\n#: src/flow_control/let_else.md:8\nmsgid \"\"\n\"With `let`\\\\-`else`, a refutable pattern can match and bind variables in the \"\n\"surrounding scope like a normal `let`, or else diverge (e.g. `break`, \"\n\"`return`, `panic!`) when the pattern doesn't match.\"\nmsgstr \"\"\n\"`let`\\\\-`else`를 사용하면, 일반적인 `let`처럼 주변 스코프에서 변수를 매칭하\"\n\"고 바인딩할 수 있으며, 패턴이 매칭되지 않을 경우 분기(예: `break`, `return`, \"\n\"`panic!`)할 수 있습니다.\"\n\n#: src/flow_control/let_else.md:16 src/flow_control/let_else.md:39\n#: src/std/str.md:41\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/flow_control/let_else.md:18 src/flow_control/let_else.md:42\nmsgid \"\\\"Can't segment count item pair: '{s}'\\\"\"\nmsgstr \"\\\"카운트 아이템 쌍을 분리할 수 없습니다: '{s}'\\\"\"\n\n#: src/flow_control/let_else.md:21 src/flow_control/let_else.md:47\nmsgid \"\\\"Can't parse integer: '{count_str}'\\\"\"\nmsgstr \"\\\"정수를 파싱할 수 없습니다: '{count_str}'\\\"\"\n\n#: src/flow_control/let_else.md:27 src/flow_control/let_else.md:52\nmsgid \"\\\"3 chairs\\\"\"\nmsgstr \"\\\"3 chairs\\\"\"\n\n#: src/flow_control/let_else.md:27 src/flow_control/let_else.md:52\nmsgid \"\\\"chairs\\\"\"\nmsgstr \"\\\"chairs\\\"\"\n\n#: src/flow_control/let_else.md:31\nmsgid \"\"\n\"The scope of name bindings is the main thing that makes this different from \"\n\"`match` or `if let`\\\\-`else` expressions. You could previously approximate \"\n\"these patterns with an unfortunate bit of repetition and an outer `let`:\"\nmsgstr \"\"\n\"이름 바인딩의 스코프는 이것이 `match`나 `if let`\\\\-`else` 표현식과 다른 주요 \"\n\"점입니다. 이전에는 외부 `let`과 약간의 반복을 통해 이러한 패턴을 흉내 낼 수 \"\n\"있었습니다:\"\n\n#: src/flow_control/let_else.md:57\nmsgid \"\"\n\"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) and \"\n\"the [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html).\"\nmsgstr \"\"\n\"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) 그리\"\n\"고 [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html).\"\n\n#: src/flow_control/while_let.md:3\nmsgid \"\"\n\"Similar to `if let`, `while let` can make awkward `match` sequences more \"\n\"tolerable. Consider the following sequence that increments `i`:\"\nmsgstr \"\"\n\"`if let`과 유사하게, `while let`은 어색한 `match` 시퀀스를 더 견딜만하게 만들\"\n\"어 줍니다. `i`를 증가시키는 다음 시퀀스를 고려해 보세요:\"\n\n#: src/flow_control/while_let.md:9\nmsgid \"// Repeatedly try this test.\\n\"\nmsgstr \"// 이 테스트를 반복해서 시도합니다.\\n\"\n\n#: src/flow_control/while_let.md:13\nmsgid \"// If `optional` destructures, evaluate the block.\\n\"\nmsgstr \"// 만약 `optional`이 구조 분해된다면, 블록을 평가합니다.\\n\"\n\n#: src/flow_control/while_let.md:16 src/flow_control/while_let.md:42\nmsgid \"\\\"Greater than 9, quit!\\\"\"\nmsgstr \"\\\"9보다 큽니다, 종료!\\\"\"\n\n#: src/flow_control/while_let.md:19 src/flow_control/while_let.md:45\nmsgid \"\\\"`i` is `{:?}`. Try again.\\\"\"\nmsgstr \"\\\"`i`는 `{:?}`입니다. 다시 시도하세요.\\\"\"\n\n#: src/flow_control/while_let.md:22\nmsgid \"// ^ Requires 3 indentations!\\n\"\nmsgstr \"// ^ 3단계의 들여쓰기가 필요합니다!\\n\"\n\n#: src/flow_control/while_let.md:24\nmsgid \"// Quit the loop when the destructure fails:\\n\"\nmsgstr \"// 구조 분해에 실패하면 루프를 종료합니다:\\n\"\n\n#: src/flow_control/while_let.md:26\nmsgid \"// ^ Why should this be required? There must be a better way!\\n\"\nmsgstr \"// ^ 왜 이것이 필요할까요? 분명 더 좋은 방법이 있을 것입니다!\\n\"\n\n#: src/flow_control/while_let.md:31\nmsgid \"Using `while let` makes this sequence much nicer:\"\nmsgstr \"`while let`을 사용하면 이 시퀀스가 훨씬 깔끔해집니다:\"\n\n#: src/flow_control/while_let.md:38\nmsgid \"\"\n\"// This reads: \\\"while `let` destructures `optional` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`). Else `break`.\\n\"\nmsgstr \"\"\n\"// 다음과 같이 읽힙니다: \\\"`let`이 `optional`을 `Some(i)`로\\n\"\n\"// 구조 분해하는 동안, 블록(`{}`)을 실행하라. 그 외에는 `break` 하라.\\\"\\n\"\n\n#: src/flow_control/while_let.md:48\nmsgid \"\"\n\"// ^ Less rightward drift and doesn't require\\n\"\n\"        // explicitly handling the failing case.\\n\"\nmsgstr \"\"\n\"// ^ 오른쪽으로의 들여쓰기가 줄어들었으며 실패 사례를\\n\"\n\"// 명시적으로 처리할 필요가 없습니다.\\n\"\n\n#: src/flow_control/while_let.md:51\nmsgid \"\"\n\"// ^ `if let` had additional optional `else`/`else if`\\n\"\n\"    // clauses. `while let` does not have these.\\n\"\nmsgstr \"\"\n\"// ^ `if let`에는 추가적인 선택 사항인 `else`/`else if` 절이\\n\"\n\"// 있었지만, `while let`에는 이러한 것들이 없습니다.\\n\"\n\n#: src/flow_control/while_let.md:58\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/214)\"\nmsgstr \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), 그리고 [RFC]\"\n\"(https://github.com/rust-lang/rfcs/pull/214)\"\n\n#: src/fn.md:3\nmsgid \"\"\n\"Functions are declared using the `fn` keyword. Its arguments are type \"\n\"annotated, just like variables, and, if the function returns a value, the \"\n\"return type must be specified after an arrow `->`.\"\nmsgstr \"\"\n\"함수는 `fn` 키워드를 사용하여 선언됩니다. 인자는 변수와 마찬가지로 타입 어노\"\n\"테이션이 필요하며, 함수가 값을 반환하는 경우 반환 타입은 화살표 `->` 뒤에 지\"\n\"정해야 합니다.\"\n\n#: src/fn.md:7\nmsgid \"\"\n\"The final expression in the function will be used as return value. \"\n\"Alternatively, the `return` statement can be used to return a value earlier \"\n\"from within the function, even from inside loops or `if` statements.\"\nmsgstr \"\"\n\"함수의 마지막 표현식은 반환 값으로 사용됩니다. 또는 `return` 문을 사용하여 루\"\n\"프나 `if` 문 내부를 포함하여 함수 내에서 더 일찍 값을 반환할 수 있습니다.\"\n\n#: src/fn.md:11\nmsgid \"Let's rewrite FizzBuzz using functions!\"\nmsgstr \"함수를 사용하여 FizzBuzz를 다시 작성해 봅시다!\"\n\n#: src/fn.md:14\nmsgid \"\"\n\"// Unlike C/C++, there's no restriction on the order of function \"\n\"definitions\\n\"\nmsgstr \"// C/C++와 달리, 함수 정의 순서에는 제한이 없습니다.\\n\"\n\n#: src/fn.md:16\nmsgid \"// We can use this function here, and define it somewhere later\\n\"\nmsgstr \"// 여기서 이 함수를 사용하고, 나중에 어딘가에서 정의할 수 있습니다.\\n\"\n\n#: src/fn.md:19\nmsgid \"// Function that returns a boolean value\\n\"\nmsgstr \"// 불리언 값을 반환하는 함수\\n\"\n\n#: src/fn.md:22\nmsgid \"// Corner case, early return\\n\"\nmsgstr \"// 예외 케이스, 조기 반환\\n\"\n\n#: src/fn.md:27\nmsgid \"// This is an expression, the `return` keyword is not necessary here\\n\"\nmsgstr \"// 이것은 표현식이며, 여기서는 `return` 키워드가 필요하지 않습니다.\\n\"\n\n#: src/fn.md:30\nmsgid \"\"\n\"// Functions that \\\"don't\\\" return a value, actually return the unit type \"\n\"`()`\\n\"\nmsgstr \"\"\n\"// 값을 반환하지 \\\"않는\\\" 함수는 실제로는 유닛 타입 `()`를 반환합니다.\\n\"\n\n#: src/fn.md:43\nmsgid \"\"\n\"// When a function returns `()`, the return type can be omitted from the\\n\"\n\"// signature\\n\"\nmsgstr \"\"\n\"// 함수가 `()`를 반환할 때, 시그니처에서 반환 타입을 생략할 수 있습니다.\\n\"\n\n#: src/fn/methods.md:1\nmsgid \"Associated functions & Methods\"\nmsgstr \"연관 함수와 메서드\"\n\n#: src/fn/methods.md:3\nmsgid \"\"\n\"Some functions are connected to a particular type. These come in two forms: \"\n\"associated functions, and methods. Associated functions are functions that \"\n\"are defined on a type generally, while methods are associated functions that \"\n\"are called on a particular instance of a type.\"\nmsgstr \"\"\n\"일부 함수는 특정 타입과 연결되어 있습니다. 이들은 연관 함수와 메서드라는 두 \"\n\"가지 형태로 제공됩니다. 연관 함수는 일반적으로 타입 상에 정의된 함수인 반면, \"\n\"메서드는 특정 타입의 인스턴스에서 호출되는 연관 함수입니다.\"\n\n#: src/fn/methods.md:13\nmsgid \"\"\n\"// Implementation block, all `Point` associated functions & methods go in \"\n\"here\\n\"\nmsgstr \"\"\n\"// 구현(Implementation) 블록으로, 모든 `Point` 연관 함수와 메서드가 여기에 들\"\n\"어갑니다.\\n\"\n\n#: src/fn/methods.md:16\nmsgid \"\"\n\"// This is an \\\"associated function\\\" because this function is associated \"\n\"with\\n\"\n\"    // a particular type, that is, Point.\\n\"\n\"    //\\n\"\n\"    // Associated functions don't need to be called with an instance.\\n\"\n\"    // These functions are generally used like constructors.\\n\"\nmsgstr \"\"\n\"// 이것은 이 함수가 특정 타입인 Point와 연관되어 있기 때문에\\n\"\n\"// \\\"연관 함수\\\"라고 불립니다.\\n\"\n\"//\\n\"\n\"// 연관 함수는 인스턴스를 통해 호출될 필요가 없습니다.\\n\"\n\"// 이러한 함수들은 일반적으로 생성자처럼 사용됩니다.\\n\"\n\n#: src/fn/methods.md:25\nmsgid \"// Another associated function, taking two arguments:\\n\"\nmsgstr \"// 두 개의 인자를 받는 또 다른 연관 함수:\\n\"\n\n#: src/fn/methods.md:37\nmsgid \"\"\n\"// This is a method\\n\"\n\"    // `&self` is sugar for `self: &Self`, where `Self` is the type of the\\n\"\n\"    // caller object. In this case `Self` = `Rectangle`\\n\"\nmsgstr \"\"\n\"// 이것은 메서드입니다\\n\"\n\"// `&self`는 `self: &Self`를 줄여 쓴 것인데, 여기서 `Self`는\\n\"\n\"// 호출 객체의 타입을 의미합니다. 이 경우 `Self` = `Rectangle`입니다.\\n\"\n\n#: src/fn/methods.md:41\nmsgid \"// `self` gives access to the struct fields via the dot operator\\n\"\nmsgstr \"\"\n\"// `self`는 점(dot) 연산자를 통해 구조체 필드에 대한 접근을 제공합니다.\\n\"\n\n#: src/fn/methods.md:45\nmsgid \"\"\n\"// `abs` is a `f64` method that returns the absolute value of the\\n\"\n\"        // caller\\n\"\nmsgstr \"// `abs`는 호출자의 절댓값을 반환하는 `f64` 메서드입니다.\\n\"\n\n#: src/fn/methods.md:57\nmsgid \"\"\n\"// This method requires the caller object to be mutable\\n\"\n\"    // `&mut self` desugars to `self: &mut Self`\\n\"\nmsgstr \"\"\n\"// 이 메서드는 호출 객체가 가변적일 것을 요구합니다\\n\"\n\"// `&mut self`는 `self: &mut Self`로 풀어서 쓸 수 있습니다.\\n\"\n\n#: src/fn/methods.md:67\nmsgid \"// `Pair` owns resources: two heap allocated integers\\n\"\nmsgstr \"// `Pair`는 리소스를 소유합니다: 힙에 할당된 두 개의 정수\\n\"\n\n#: src/fn/methods.md:72\nmsgid \"\"\n\"// This method \\\"consumes\\\" the resources of the caller object\\n\"\n\"    // `self` desugars to `self: Self`\\n\"\nmsgstr \"\"\n\"// 이 메서드는 호출 객체의 리소스를 \\\"소비\\\"합니다\\n\"\n\"// `self`는 `self: Self`로 풀어서 쓸 수 있습니다.\\n\"\n\n#: src/fn/methods.md:75\nmsgid \"// Destructure `self`\\n\"\nmsgstr \"// `self` 구조 분해\\n\"\n\n#: src/fn/methods.md:78\nmsgid \"\\\"Destroying Pair({}, {})\\\"\"\nmsgstr \"\\\"Pair({}, {}) 파괴 중\\\"\"\n\n#: src/fn/methods.md:80\nmsgid \"// `first` and `second` go out of scope and get freed\\n\"\nmsgstr \"// `first`와 `second`는 스코프를 벗어나며 해제됩니다.\\n\"\n\n#: src/fn/methods.md:86\nmsgid \"// Associated functions are called using double colons\\n\"\nmsgstr \"// 연관 함수는 이중 콜론을 사용하여 호출됩니다.\\n\"\n\n#: src/fn/methods.md:91\nmsgid \"\"\n\"// Methods are called using the dot operator\\n\"\n\"    // Note that the first argument `&self` is implicitly passed, i.e.\\n\"\n\"    // `rectangle.perimeter()` === `Rectangle::perimeter(&rectangle)`\\n\"\nmsgstr \"\"\n\"// 메서드는 점 연산자를 사용하여 호출됩니다.\\n\"\n\"// 첫 번째 인자인 `&self`는 암시적으로 전달됩니다. 즉,\\n\"\n\"// `rectangle.perimeter()`는 `Rectangle::perimeter(&rectangle)`와 동일합니\"\n\"다.\\n\"\n\n#: src/fn/methods.md:94\nmsgid \"\\\"Rectangle perimeter: {}\\\"\"\nmsgstr \"\\\"사각형 둘레: {}\\\"\"\n\n#: src/fn/methods.md:95\nmsgid \"\\\"Rectangle area: {}\\\"\"\nmsgstr \"\\\"사각형 넓이: {}\\\"\"\n\n#: src/fn/methods.md:102\nmsgid \"\"\n\"// Error! `rectangle` is immutable, but this method requires a mutable\\n\"\n\"    // object\\n\"\n\"    //rectangle.translate(1.0, 0.0);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `rectangle`은 불변이지만, 이 메서드는 가변 객체를 요구합니다.\\n\"\n\"// rectangle.translate(1.0, 0.0);\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/fn/methods.md:107\nmsgid \"// Okay! Mutable objects can call mutable methods\\n\"\nmsgstr \"// 좋습니다! 가변 객체는 가변 메서드를 호출할 수 있습니다\\n\"\n\n#: src/fn/methods.md:114\nmsgid \"\"\n\"// Error! Previous `destroy` call \\\"consumed\\\" `pair`\\n\"\n\"    //pair.destroy();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! 이전의 `destroy` 호출이 `pair`를 \\\"소비\\\"했습니다\\n\"\n\"// pair.destroy();\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/fn/closures.md:3\nmsgid \"\"\n\"Closures are functions that can capture the enclosing environment. For \"\n\"example, a closure that captures the `x` variable:\"\nmsgstr \"\"\n\"클로저는 감싸고 있는 환경을 캡처할 수 있는 함수입니다. 예를 들어, `x` 변수를 \"\n\"캡처하는 클로저는 다음과 같습니다:\"\n\n#: src/fn/closures.md:10\nmsgid \"\"\n\"The syntax and capabilities of closures make them very convenient for on the \"\n\"fly usage. Calling a closure is exactly like calling a function. However, \"\n\"both input and return types _can_ be inferred and input variable names \"\n\"_must_ be specified.\"\nmsgstr \"\"\n\"클로저의 구문과 기능은 즉석에서 사용하기에 매우 편리합니다. 클로저를 호출하\"\n\"는 것은 함수를 호출하는 것과 똑같습니다. 하지만 입력 및 반환 타입은 추론될 \"\n\"수 있으며, 입력 변수 이름은 반드시 지정되어야 합니다.\"\n\n#: src/fn/closures.md:15\nmsgid \"Other characteristics of closures include:\"\nmsgstr \"클로저의 다른 특징들은 다음과 같습니다:\"\n\n#: src/fn/closures.md:17\nmsgid \"using `||` instead of `()` around input variables.\"\nmsgstr \"입력 변수 주위에 `()` 대신 `||`를 사용합니다.\"\n\n#: src/fn/closures.md:18\nmsgid \"\"\n\"optional body delimitation (`{}`) for a single line expression (mandatory \"\n\"otherwise).\"\nmsgstr \"\"\n\"한 줄 표현식의 경우 본문 구분 기호(`{}`)는 선택 사항입니다 (그 외의 경우는 필\"\n\"수).\"\n\n#: src/fn/closures.md:19\nmsgid \"the ability to capture the outer environment variables.\"\nmsgstr \"외부 환경 변수를 캡처하는 능력.\"\n\n#: src/fn/closures.md:25\nmsgid \"\"\n\"// A regular function can't refer to variables in the enclosing environment\\n\"\n\"    //fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"    // TODO: uncomment the line above and see the compiler error. The \"\n\"compiler\\n\"\n\"    // suggests that we define a closure instead.\\n\"\nmsgstr \"\"\n\"// 일반 함수는 자신을 감싸고 있는 환경의 변수를 참조할 수 없습니다\\n\"\n\"// fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"// TODO: 위의 줄의 주석을 해제하고 컴파일 에러를 확인해 보세요. 컴파일러는\\n\"\n\"// 대신 클로저를 정의할 것을 제안합니다.\\n\"\n\n#: src/fn/closures.md:30\nmsgid \"\"\n\"// Closures are anonymous, here we are binding them to references.\\n\"\n\"    // Annotation is identical to function annotation but is optional\\n\"\n\"    // as are the `{}` wrapping the body. These nameless functions\\n\"\n\"    // are assigned to appropriately named variables.\\n\"\nmsgstr \"\"\n\"// 클로저는 익명이며, 여기서는 참조에 바인딩하고 있습니다.\\n\"\n\"// 어노테이션은 함수의 어노테이션과 동일하지만 선택 사항이며,\\n\"\n\"// 본문을 감싸는 `{}` 역시 선택 사항입니다. 이 이름 없는 함수들은\\n\"\n\"// 적절하게 이름 붙여진 변수들에 할당됩니다.\\n\"\n\n#: src/fn/closures.md:37\nmsgid \"// Call the closures.\\n\"\nmsgstr \"// 클로저를 호출합니다.\\n\"\n\n#: src/fn/closures.md:38\nmsgid \"\\\"closure_annotated: {}\\\"\"\nmsgstr \"\\\"어노테이션된 클로저: {}\\\"\"\n\n#: src/fn/closures.md:39\nmsgid \"\\\"closure_inferred: {}\\\"\"\nmsgstr \"\\\"추론된 클로저: {}\\\"\"\n\n#: src/fn/closures.md:40\nmsgid \"\"\n\"// Once closure's type has been inferred, it cannot be inferred again with \"\n\"another type.\\n\"\n\"    //println!(\\\"cannot reuse closure_inferred with another type: {}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"    // TODO: uncomment the line above and see the compiler error.\\n\"\nmsgstr \"\"\n\"// 클로저의 타입이 한 번 추론되면, 다른 타입으로 다시 추론될 수 없습니다.\\n\"\n\"// println!(\\\"다른 타입으로 closure_inferred를 재사용할 수 없습니다: {}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"// TODO: 위의 줄의 주석을 해제하고 컴파일 에러를 확인해 보세요.\\n\"\n\n#: src/fn/closures.md:44\nmsgid \"\"\n\"// A closure taking no arguments which returns an `i32`.\\n\"\n\"    // The return type is inferred.\\n\"\nmsgstr \"\"\n\"// 인자를 받지 않고 `i32`를 반환하는 클로저입니다.\\n\"\n\"// 반환 타입은 추론됩니다.\\n\"\n\n#: src/fn/closures.md:47\nmsgid \"\\\"closure returning one: {}\\\"\"\nmsgstr \"\\\"1을 반환하는 클로저: {}\\\"\"\n\n#: src/fn/closures/capture.md:3\nmsgid \"\"\n\"Closures are inherently flexible and will do what the functionality requires \"\n\"to make the closure work without annotation. This allows capturing to \"\n\"flexibly adapt to the use case, sometimes moving and sometimes borrowing. \"\n\"Closures can capture variables:\"\nmsgstr \"\"\n\"클로저는 본질적으로 유연하며, 어노테이션 없이도 클로저가 작동하는 데 필요한 \"\n\"기능을 수행합니다. 이를 통해 캡처 방식이 사용 사례에 따라 유연하게 적응할 수 \"\n\"있으며, 때로는 이동(move)하고 때로는 빌림(borrow)을 수행합니다. 클로저는 다음\"\n\"과 같은 방식으로 변수를 캡처할 수 있습니다:\"\n\n#: src/fn/closures/capture.md:8\nmsgid \"by reference: `&T`\"\nmsgstr \"참조에 의한 방식: `&T`\"\n\n#: src/fn/closures/capture.md:9\nmsgid \"by mutable reference: `&mut T`\"\nmsgstr \"가변 참조에 의한 방식: `&mut T`\"\n\n#: src/fn/closures/capture.md:10\nmsgid \"by value: `T`\"\nmsgstr \"값에 의한 방식: `T`\"\n\n#: src/fn/closures/capture.md:12\nmsgid \"\"\n\"They preferentially capture variables by reference and only go lower when \"\n\"required.\"\nmsgstr \"\"\n\"클로저는 가급적 참조로 변수를 캡처하며, 필요한 경우에만 더 낮은 수준(이동 등)\"\n\"으로 내려갑니다.\"\n\n#: src/fn/closures/capture.md:19\nmsgid \"\\\"green\\\"\"\nmsgstr \"\\\"초록\\\"\"\n\n#: src/fn/closures/capture.md:21\nmsgid \"\"\n\"// A closure to print `color` which immediately borrows (`&`) `color` and\\n\"\n\"    // stores the borrow and closure in the `print` variable. It will \"\n\"remain\\n\"\n\"    // borrowed until `print` is used the last time.\\n\"\n\"    //\\n\"\n\"    // `println!` only requires arguments by immutable reference so it \"\n\"doesn't\\n\"\n\"    // impose anything more restrictive.\\n\"\nmsgstr \"\"\n\"// `color`를 출력하는 클로저입니다. 이 클로저는 즉시 `color`를 빌리고(`&`)\\n\"\n\"// 그 빌림과 클로저를 `print` 변수에 저장합니다. `print`가 마지막으로\\n\"\n\"// 사용될 때까지 빌린 상태가 유지됩니다.\\n\"\n\"//\\n\"\n\"// `println!`은 인자로 불변 참조만 요구하므로 더 이상의 제약을\\n\"\n\"// 가하지 않습니다.\\n\"\n\n#: src/fn/closures/capture.md:27\nmsgid \"\\\"`color`: {}\\\"\"\nmsgstr \"\\\"`color`: {}\\\"\"\n\n#: src/fn/closures/capture.md:29\nmsgid \"// Call the closure using the borrow.\\n\"\nmsgstr \"// 빌림을 사용하여 클로저를 호출합니다.\\n\"\n\n#: src/fn/closures/capture.md:32\nmsgid \"\"\n\"// `color` can be borrowed immutably again, because the closure only holds\\n\"\n\"    // an immutable reference to `color`.\\n\"\nmsgstr \"\"\n\"// 클로저가 `color`에 대한 불변 참조만 가지고 있기 때문에,\\n\"\n\"// `color`를 다시 불변으로 빌릴 수 있습니다.\\n\"\n\n#: src/fn/closures/capture.md:37\nmsgid \"// A move or reborrow is allowed after the final use of `print`\\n\"\nmsgstr \"\"\n\"// `print`를 마지막으로 사용한 후에는 이동(move)이나 다시 빌리는 것이 허용됩\"\n\"니다\\n\"\n\n#: src/fn/closures/capture.md:42\nmsgid \"\"\n\"// A closure to increment `count` could take either `&mut count` or `count`\\n\"\n\"    // but `&mut count` is less restrictive so it takes that. Immediately\\n\"\n\"    // borrows `count`.\\n\"\n\"    //\\n\"\n\"    // A `mut` is required on `inc` because a `&mut` is stored inside. \"\n\"Thus,\\n\"\n\"    // calling the closure mutates `count` which requires a `mut`.\\n\"\nmsgstr \"\"\n\"// `count`를 증가시키는 클로저는 `&mut count`나 `count` 중 하나를 취할 수 있\"\n\"지만,\\n\"\n\"// `&mut count`가 덜 제한적이므로 이를 취합니다. 즉시 `count`를 빌립니다.\\n\"\n\"//\\n\"\n\"// 내부에 `&mut`가 저장되어 있기 때문에 `inc`에 `mut`가 필요합니다. 따라서\\n\"\n\"// 클로저를 호출하면 `count`가 수정되며, 이를 위해 `mut`가 필요합니다.\\n\"\n\n#: src/fn/closures/capture.md:50\nmsgid \"\\\"`count`: {}\\\"\"\nmsgstr \"\\\"`count`: {}\\\"\"\n\n#: src/fn/closures/capture.md:53\nmsgid \"// Call the closure using a mutable borrow.\\n\"\nmsgstr \"// 가변 빌림을 사용하여 클로저를 호출합니다.\\n\"\n\n#: src/fn/closures/capture.md:56\nmsgid \"\"\n\"// The closure still mutably borrows `count` because it is called later.\\n\"\n\"    // An attempt to reborrow will lead to an error.\\n\"\n\"    // let _reborrow = &count;\\n\"\n\"    // ^ TODO: try uncommenting this line.\\n\"\nmsgstr \"\"\n\"// 클로저가 나중에 호출되기 때문에 여전히 `count`를 가변적으로 빌리고 있습니\"\n\"다.\\n\"\n\"// 다시 빌리려는 시도는 에러를 발생시킵니다.\\n\"\n\"// let _reborrow = &count;\\n\"\n\"// ^ TODO: 이 줄의 주석을 해제해 보세요.\\n\"\n\n#: src/fn/closures/capture.md:62\nmsgid \"\"\n\"// The closure no longer needs to borrow `&mut count`. Therefore, it is\\n\"\n\"    // possible to reborrow without an error\\n\"\nmsgstr \"\"\n\"// 클로저가 더 이상 `&mut count`를 빌릴 필요가 없습니다. 따라서\\n\"\n\"// 에러 없이 다시 빌리는 것이 가능합니다.\\n\"\n\n#: src/fn/closures/capture.md:67\nmsgid \"// A non-copy type.\\n\"\nmsgstr \"// 복사(copy)되지 않는 타입.\\n\"\n\n#: src/fn/closures/capture.md:70\nmsgid \"\"\n\"// `mem::drop` requires `T` so this must take by value. A copy type\\n\"\n\"    // would copy into the closure leaving the original untouched.\\n\"\n\"    // A non-copy must move and so `movable` immediately moves into\\n\"\n\"    // the closure.\\n\"\nmsgstr \"\"\n\"// `mem::drop`은 `T`를 요구하므로 값을 가져와야 합니다. 복사 타입은\\n\"\n\"// 원본을 그대로 둔 채 클로저 내부로 복사될 것입니다.\\n\"\n\"// 복사되지 않는 타입은 이동(move)해야 하므로 `movable`은 즉시\\n\"\n\"// 클로저 내부로 이동됩니다.\\n\"\n\n#: src/fn/closures/capture.md:75\nmsgid \"\\\"`movable`: {:?}\\\"\"\nmsgstr \"\\\"`movable`: {:?}\\\"\"\n\n#: src/fn/closures/capture.md:79\nmsgid \"// `consume` consumes the variable so this can only be called once.\\n\"\nmsgstr \"// `consume`은 변수를 소비하므로 한 번만 호출될 수 있습니다.\\n\"\n\n#: src/fn/closures/capture.md:81\nmsgid \"\"\n\"// consume();\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\"// consume();\\n\"\n\"// ^ TODO: 이 줄의 주석을 해제해 보세요.\\n\"\n\n#: src/fn/closures/capture.md:86\nmsgid \"\"\n\"Using `move` before vertical pipes forces closure to take ownership of \"\n\"captured variables:\"\nmsgstr \"\"\n\"수직 바(`||`) 앞에 `move`를 사용하면 클로저가 캡처된 변수의 소유권을 강제로 \"\n\"갖게 됩니다:\"\n\n#: src/fn/closures/capture.md:91\nmsgid \"// `Vec` has non-copy semantics.\\n\"\nmsgstr \"// `Vec`은 복사되지 않는 세맨틱을 가집니다.\\n\"\n\n#: src/fn/closures/capture.md:99\nmsgid \"\"\n\"// println!(\\\"There're {} elements in vec\\\", haystack.len());\\n\"\n\"    // ^ Uncommenting above line will result in compile-time error\\n\"\n\"    // because borrow checker doesn't allow re-using variable after it\\n\"\n\"    // has been moved.\\n\"\nmsgstr \"\"\n\"// println!(\\\"vec에는 {}개의 요소가 있습니다\\\", haystack.len());\\n\"\n\"// ^ 위의 줄의 주석을 해제하면 컴파일 타임 에러가 발생합니다.\\n\"\n\"// 빌림 검사기(borrow checker)가 이동된 후의 변수 재사용을 허용하지 않기 때문\"\n\"입니다.\\n\"\n\n#: src/fn/closures/capture.md:104\nmsgid \"\"\n\"// Removing `move` from closure's signature will cause closure\\n\"\n\"    // to borrow _haystack_ variable immutably, hence _haystack_ is still\\n\"\n\"    // available and uncommenting above line will not cause an error.\\n\"\nmsgstr \"\"\n\"// 클로저의 시그니처에서 `move`를 제거하면 클로저가 `haystack` 변수를\\n\"\n\"// 불변으로 빌리게 되므로, `haystack`을 여전히 사용할 수 있고\\n\"\n\"// 위의 줄의 주석을 해제해도 에러가 발생하지 않습니다.\\n\"\n\n#: src/fn/closures/capture.md:112\nmsgid \"\"\n\"[`Box`](../../std/box.md) and [`std::mem::drop`](https://doc.rust-lang.org/\"\n\"std/mem/fn.drop.html)\"\nmsgstr \"\"\n\"[`Box`](../../std/box.md)와 [`std::mem::drop`](https://doc.rust-lang.org/std/\"\n\"mem/fn.drop.html)\"\n\n#: src/fn/closures/input_parameters.md:3\nmsgid \"\"\n\"While Rust chooses how to capture variables on the fly mostly without type \"\n\"annotation, this ambiguity is not allowed when writing functions. When \"\n\"taking a closure as an input parameter, the closure's complete type must be \"\n\"annotated using one of a few `traits`, and they're determined by what the \"\n\"closure does with captured value. In order of decreasing restriction, they \"\n\"are:\"\nmsgstr \"\"\n\"Rust는 대부분 타입 어노테이션 없이 즉석에서 변수를 캡처하는 방식을 선택하지\"\n\"만, 함수를 작성할 때는 이러한 모호함이 허용되지 않습니다. 클로저를 입력 파라\"\n\"미터로 받을 때, 클로저의 전체 타입은 몇 가지 `트레이트` 중 하나를 사용하여 어\"\n\"노테이션되어야 하며, 이는 클로저가 캡처된 값으로 무엇을 하는지에 따라 결정됩\"\n\"니다. 제약이 강한 순서대로 나열하면 다음과 같습니다:\"\n\n#: src/fn/closures/input_parameters.md:10\nmsgid \"`Fn`: the closure uses the captured value by reference (`&T`)\"\nmsgstr \"`Fn`: 클로저가 캡처된 값을 참조(`&T`)로 사용합니다\"\n\n#: src/fn/closures/input_parameters.md:11\nmsgid \"\"\n\"`FnMut`: the closure uses the captured value by mutable reference (`&mut T`)\"\nmsgstr \"`FnMut`: 클로저가 캡처된 값을 가변 참조(`&mut T`)로 사용합니다\"\n\n#: src/fn/closures/input_parameters.md:12\nmsgid \"`FnOnce`: the closure uses the captured value by value (`T`)\"\nmsgstr \"`FnOnce`: 클로저가 캡처된 값을 값(`T`)으로 사용합니다\"\n\n#: src/fn/closures/input_parameters.md:14\nmsgid \"\"\n\"On a variable-by-variable basis, the compiler will capture variables in the \"\n\"least restrictive manner possible.\"\nmsgstr \"\"\n\"변수별로 컴파일러는 가능한 가장 제약이 적은 방식으로 변수를 캡처합니다.\"\n\n#: src/fn/closures/input_parameters.md:17\nmsgid \"\"\n\"For instance, consider a parameter annotated as `FnOnce`. This specifies \"\n\"that the closure _may_ capture by `&T`, `&mut T`, or `T`, but the compiler \"\n\"will ultimately choose based on how the captured variables are used in the \"\n\"closure.\"\nmsgstr \"\"\n\"예를 들어, `FnOnce`로 어노테이션된 파라미터를 생각해 보세요. 이는 클로저가 \"\n\"`&T`, `&mut T`, 또는 `T`로 캡처할 수 있음을 나타내지만, 컴파일러는 최종적으\"\n\"로 클로저 내에서 캡처된 변수가 어떻게 사용되는지에 따라 선택합니다.\"\n\n#: src/fn/closures/input_parameters.md:22\nmsgid \"\"\n\"This is because if a move is possible, then any type of borrow should also \"\n\"be possible. Note that the reverse is not true. If the parameter is \"\n\"annotated as `Fn`, then capturing variables by `&mut T` or `T` are not \"\n\"allowed. However, `&T` is allowed.\"\nmsgstr \"\"\n\"이동(move)이 가능하다면 어떤 유형의 빌림(borrow)도 가능해야 하기 때문입니다. \"\n\"그 반대는 성립하지 않음에 유의하세요. 파라미터가 `Fn`으로 어노테이션된 경우, \"\n\"`&mut T`나 `T`로 변수를 캡처하는 것은 허용되지 않습니다. 하지만 `&T`는 허용됩\"\n\"니다.\"\n\n#: src/fn/closures/input_parameters.md:27\nmsgid \"\"\n\"In the following example, try swapping the usage of `Fn`, `FnMut`, and \"\n\"`FnOnce` to see what happens:\"\nmsgstr \"\"\n\"다음 예제에서 `Fn`, `FnMut`, `FnOnce`의 사용을 서로 바꿔보며 어떤 일이 일어나\"\n\"는지 확인해 보세요:\"\n\n#: src/fn/closures/input_parameters.md:31\nmsgid \"\"\n\"// A function which takes a closure as an argument and calls it.\\n\"\n\"// <F> denotes that F is a \\\"Generic type parameter\\\"\\n\"\nmsgstr \"\"\n\"// 클로저를 인자로 받아 호출하는 함수입니다.\\n\"\n\"// <F>는 F가 \\\"제네릭 타입 파라미터\\\"임을 나타냅니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:34\nmsgid \"// The closure takes no input and returns nothing.\\n\"\nmsgstr \"// 이 클로저는 입력을 받지 않고 아무것도 반환하지 않습니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:36\nmsgid \"// ^ TODO: Try changing this to `Fn` or `FnMut`.\\n\"\nmsgstr \"// ^ TODO: 이를 `Fn`이나 `FnMut`로 변경해 보세요.\\n\"\n\n#: src/fn/closures/input_parameters.md:40\nmsgid \"// A function which takes a closure and returns an `i32`.\\n\"\nmsgstr \"// 클로저를 받아 `i32`를 반환하는 함수입니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:43\nmsgid \"// The closure takes an `i32` and returns an `i32`.\\n\"\nmsgstr \"// 이 클로저는 `i32`를 받아 `i32`를 반환합니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:53\nmsgid \"\"\n\"// A non-copy type.\\n\"\n\"    // `to_owned` creates owned data from borrowed one\\n\"\nmsgstr \"\"\n\"// 복사되지 않는 타입.\\n\"\n\"// `to_owned`는 빌려온 데이터로부터 소유권이 있는 데이터를 생성합니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:55\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"잘 가요\\\"\"\n\n#: src/fn/closures/input_parameters.md:57\nmsgid \"\"\n\"// Capture 2 variables: `greeting` by reference and\\n\"\n\"    // `farewell` by value.\\n\"\nmsgstr \"\"\n\"// 두 개의 변수를 캡처합니다: `greeting`은 참조로, `farewell`은 값으로.\\n\"\n\n#: src/fn/closures/input_parameters.md:60\nmsgid \"// `greeting` is by reference: requires `Fn`.\\n\"\nmsgstr \"// `greeting`은 참조에 의한 방식입니다: `Fn`이 필요합니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:61\nmsgid \"\\\"I said {}.\\\"\"\nmsgstr \"\\\"저는 {}라고 말했습니다.\\\"\"\n\n#: src/fn/closures/input_parameters.md:63\nmsgid \"\"\n\"// Mutation forces `farewell` to be captured by\\n\"\n\"        // mutable reference. Now requires `FnMut`.\\n\"\nmsgstr \"\"\n\"// 수정을 위해 `farewell`을 가변 참조로 캡처해야 합니다.\\n\"\n\"// 이제 `FnMut`가 필요합니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:65\nmsgid \"\\\"!!!\\\"\"\nmsgstr \"\\\"!!!\\\"\"\n\n#: src/fn/closures/input_parameters.md:66\nmsgid \"\\\"Then I screamed {}.\\\"\"\nmsgstr \"\\\"그러고 나서 저는 {}라고 소리쳤습니다.\\\"\"\n\n#: src/fn/closures/input_parameters.md:67\nmsgid \"\\\"Now I can sleep. zzzzz\\\"\"\nmsgstr \"\\\"이제 잘 수 있겠네요. zzzzz\\\"\"\n\n#: src/fn/closures/input_parameters.md:69\nmsgid \"\"\n\"// Manually calling drop forces `farewell` to\\n\"\n\"        // be captured by value. Now requires `FnOnce`.\\n\"\nmsgstr \"\"\n\"// 수동으로 drop을 호출하면 `farewell`을 값으로\\n\"\n\"// 캡처해야 합니다. 이제 `FnOnce`가 필요합니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:74\nmsgid \"// Call the function which applies the closure.\\n\"\nmsgstr \"// 클로저를 적용하는 함수를 호출합니다.\\n\"\n\n#: src/fn/closures/input_parameters.md:77\nmsgid \"// `double` satisfies `apply_to_3`'s trait bound\\n\"\nmsgstr \"// `double`은 `apply_to_3`의 트레이트 바운드를 만족합니다\\n\"\n\n#: src/fn/closures/input_parameters.md:80\nmsgid \"\\\"3 doubled: {}\\\"\"\nmsgstr \"\\\"3의 두 배: {}\\\"\"\n\n#: src/fn/closures/input_parameters.md:86\nmsgid \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html), [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md), \"\n\"[where](../../generics/where.md) and [`FnOnce`](https://doc.rust-lang.org/\"\n\"std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html), [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [제네릭](../../generics.md), \"\n\"[where](../../generics/where.md) 및 [`FnOnce`](https://doc.rust-lang.org/std/\"\n\"ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/anonymity.md:3\nmsgid \"\"\n\"Closures succinctly capture variables from enclosing scopes. Does this have \"\n\"any consequences? It surely does. Observe how using a closure as a function \"\n\"parameter requires [generics](../../generics.md), which is necessary because \"\n\"of how they are defined:\"\nmsgstr \"\"\n\"클로저는 자신을 감싸고 있는 스코프에서 변수를 간결하게 캡처합니다. 이것이 어\"\n\"떤 결과를 초래할까요? 분명히 결과가 있습니다. 클로저를 함수 파라미터로 사용\"\n\"할 때 [제네릭](../../generics.md)이 왜 필요한지, 클로저가 어떻게 정의되는지\"\n\"를 통해 살펴보세요:\"\n\n#: src/fn/closures/anonymity.md:9\nmsgid \"// `F` must be generic.\\n\"\nmsgstr \"// `F`는 제네릭이어야 합니다.\\n\"\n\n#: src/fn/closures/anonymity.md:16\nmsgid \"\"\n\"When a closure is defined, the compiler implicitly creates a new anonymous \"\n\"structure to store the captured variables inside, meanwhile implementing the \"\n\"functionality via one of the `traits`: `Fn`, `FnMut`, or `FnOnce` for this \"\n\"unknown type. This type is assigned to the variable which is stored until \"\n\"calling.\"\nmsgstr \"\"\n\"클로저가 정의될 때, 컴파일러는 내부에 캡처된 변수를 저장하기 위해 새로운 익\"\n\"명 구조체를 암시적으로 생성하며, 동시에 이 알 수 없는 타입에 대해 `Fn`, \"\n\"`FnMut`, 또는 `FnOnce` 트레이트 중 하나를 통해 기능을 구현합니다. 이 타입은 \"\n\"변수에 할당되어 호출될 때까지 저장됩니다.\"\n\n#: src/fn/closures/anonymity.md:22\nmsgid \"\"\n\"Since this new type is of unknown type, any usage in a function will require \"\n\"generics. However, an unbounded type parameter `<T>` would still be \"\n\"ambiguous and not be allowed. Thus, bounding by one of the `traits`: `Fn`, \"\n\"`FnMut`, or `FnOnce` (which it implements) is sufficient to specify its type.\"\nmsgstr \"\"\n\"이 새로운 타입은 알 수 없는 타입이므로, 함수에서 사용할 때는 제네릭이 필요합\"\n\"니다. 하지만 제약이 없는 타입 파라미터 `<T>`는 여전히 모호하므로 허용되지 않\"\n\"습니다. 따라서 클로저가 구현하는 `Fn`, `FnMut`, 또는 `FnOnce` 트레이트 중 하\"\n\"나로 바운딩하는 것이 그 타입을 지정하기에 충분합니다.\"\n\n#: src/fn/closures/anonymity.md:28\nmsgid \"\"\n\"// `F` must implement `Fn` for a closure which takes no\\n\"\n\"// inputs and returns nothing - exactly what is required\\n\"\n\"// for `print`.\\n\"\nmsgstr \"\"\n\"// `F`는 입력이 없고 아무것도 반환하지 않는 클로저를 위해\\n\"\n\"// `Fn`을 구현해야 합니다. 이는 정확히 `print`에 요구되는 사항입니다.\\n\"\n\n#: src/fn/closures/anonymity.md:39\nmsgid \"\"\n\"// Capture `x` into an anonymous type and implement\\n\"\n\"    // `Fn` for it. Store it in `print`.\\n\"\nmsgstr \"\"\n\"// `x`를 익명 타입으로 캡처하고 그에 대해 `Fn`을 구현합니다.\\n\"\n\"// 이를 `print`에 저장합니다.\\n\"\n\n#: src/fn/closures/anonymity.md:49\nmsgid \"\"\n\"[A thorough analysis](https://huonw.github.io/blog/2015/05/finding-closure-\"\n\"in-rust/), [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[철저한 분석](https://huonw.github.io/blog/2015/05/finding-closure-in-\"\n\"rust/), [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnMut.html), 그리고 [`FnOnce`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/input_functions.md:3\nmsgid \"\"\n\"Since closures may be used as arguments, you might wonder if the same can be \"\n\"said about functions. And indeed they can! If you declare a function that \"\n\"takes a closure as parameter, then any function that satisfies the trait \"\n\"bound of that closure can be passed as a parameter.\"\nmsgstr \"\"\n\"클로저가 인자로 사용될 수 있으므로, 함수에 대해서도 똑같이 말할 수 있는지 궁\"\n\"금할 것입니다. 실제로 가능합니다! 클로저를 파라미터로 받는 함수를 선언하면, \"\n\"해당 클로저의 트레이트 바운드를 만족하는 모든 함수를 파라미터로 전달할 수 있\"\n\"습니다.\"\n\n#: src/fn/closures/input_functions.md:9\nmsgid \"\"\n\"// Define a function which takes a generic `F` argument\\n\"\n\"// bounded by `Fn`, and calls it\\n\"\nmsgstr \"\"\n\"// `Fn`으로 바운딩된 제네릭 `F` 인자를 받아\\n\"\n\"// 호출하는 함수를 정의합니다\\n\"\n\n#: src/fn/closures/input_functions.md:14\nmsgid \"// Define a wrapper function satisfying the `Fn` bound\\n\"\nmsgstr \"// `Fn` 바운드를 만족하는 래퍼 함수를 정의합니다\\n\"\n\n#: src/fn/closures/input_functions.md:17\nmsgid \"\\\"I'm a function!\\\"\"\nmsgstr \"\\\"저는 함수입니다!\\\"\"\n\n#: src/fn/closures/input_functions.md:21\nmsgid \"// Define a closure satisfying the `Fn` bound\\n\"\nmsgstr \"// `Fn` 바운드를 만족하는 클로저를 정의합니다\\n\"\n\n#: src/fn/closures/input_functions.md:22\nmsgid \"\\\"I'm a closure!\\\"\"\nmsgstr \"\\\"저는 클로저입니다!\\\"\"\n\n#: src/fn/closures/input_functions.md:29\nmsgid \"\"\n\"As an additional note, the `Fn`, `FnMut`, and `FnOnce` `traits` dictate how \"\n\"a closure captures variables from the enclosing scope.\"\nmsgstr \"\"\n\"추가로, `Fn`, `FnMut`, `FnOnce` 트레이트는 클로저가 주변 스코프에서 변수를 캡\"\n\"처하는 방식을 결정합니다.\"\n\n#: src/fn/closures/input_functions.md:34\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), 그리고 [`FnOnce`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/output_parameters.md:3\nmsgid \"\"\n\"Closures as input parameters are possible, so returning closures as output \"\n\"parameters should also be possible. However, anonymous closure types are, by \"\n\"definition, unknown, so we have to use `impl Trait` to return them.\"\nmsgstr \"\"\n\"클로저를 입력 파라미터로 사용하는 것이 가능하므로, 클로저를 출력 파라미터로 \"\n\"반환하는 것도 가능해야 합니다. 하지만 익명 클로저 타입은 정의상 알 수 없으므\"\n\"로, 이를 반환하려면 `impl Trait`를 사용해야 합니다.\"\n\n#: src/fn/closures/output_parameters.md:8\nmsgid \"The valid traits for returning a closure are:\"\nmsgstr \"클로저를 반환하기 위해 유효한 트레이트들은 다음과 같습니다:\"\n\n#: src/fn/closures/output_parameters.md:10\nmsgid \"`Fn`\"\nmsgstr \"`Fn`\"\n\n#: src/fn/closures/output_parameters.md:11\nmsgid \"`FnMut`\"\nmsgstr \"`FnMut`\"\n\n#: src/fn/closures/output_parameters.md:12\nmsgid \"`FnOnce`\"\nmsgstr \"`FnOnce`\"\n\n#: src/fn/closures/output_parameters.md:14\nmsgid \"\"\n\"Beyond this, the `move` keyword must be used, which signals that all \"\n\"captures occur by value. This is required because any captures by reference \"\n\"would be dropped as soon as the function exited, leaving invalid references \"\n\"in the closure.\"\nmsgstr \"\"\n\"이 외에도, 모든 캡처가 값에 의해 발생함을 나타내는 `move` 키워드를 반드시 사\"\n\"용해야 합니다. 이는 참조에 의한 캡처가 함수가 종료되는 즉시 드롭되어 클로저\"\n\"에 유효하지 않은 참조를 남기기 때문에 필요합니다.\"\n\n#: src/fn/closures/output_parameters.md:21\nmsgid \"\\\"Fn\\\"\"\nmsgstr \"\\\"Fn\\\"\"\n\n#: src/fn/closures/output_parameters.md:23\n#: src/fn/closures/output_parameters.md:29\n#: src/fn/closures/output_parameters.md:35\nmsgid \"\\\"This is a: {}\\\"\"\nmsgstr \"\\\"이것은 {}입니다\\\"\"\n\n#: src/fn/closures/output_parameters.md:27\nmsgid \"\\\"FnMut\\\"\"\nmsgstr \"\\\"FnMut\\\"\"\n\n#: src/fn/closures/output_parameters.md:33\nmsgid \"\\\"FnOnce\\\"\"\nmsgstr \"\\\"FnOnce\\\"\"\n\n#: src/fn/closures/output_parameters.md:51\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md) \"\n\"and [impl Trait](../../trait/impl_trait.md).\"\nmsgstr \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [제네릭](../../generics.md) 및 \"\n\"[impl Trait](../../trait/impl_trait.md).\"\n\n#: src/fn/closures/closure_examples.md:3\nmsgid \"\"\n\"This section contains a few examples of using closures from the `std` \"\n\"library.\"\nmsgstr \"\"\n\"이 섹션에는 `std` 라이브러리의 클로저를 사용하는 몇 가지 예제가 포함되어 있습\"\n\"니다.\"\n\n#: src/fn/closures/closure_examples/iter_any.md:3\nmsgid \"\"\n\"`Iterator::any` is a function which when passed an iterator, will return \"\n\"`true` if any element satisfies the predicate. Otherwise `false`. Its \"\n\"signature:\"\nmsgstr \"\"\n\"`Iterator::any`는 이터레이터가 주어졌을 때, 어떤 요소라도 서술어(predicate)\"\n\"를 만족하면 `true`를 반환하는 함수입니다. 그렇지 않으면 `false`를 반환합니\"\n\"다. 시그니처는 다음과 같습니다:\"\n\n#: src/fn/closures/closure_examples/iter_any.md:9\n#: src/fn/closures/closure_examples/iter_find.md:9\nmsgid \"// The type being iterated over.\\n\"\nmsgstr \"// 반복되는 요소의 타입.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:12\nmsgid \"\"\n\"// `any` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\"// `any`는 `&mut self`를 취하므로 호출자는 빌려지거나\\n\"\n\"// 수정될 수 있지만, 소비(consume)되지는 않습니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `Self::Item` is the closure parameter \"\n\"type,\\n\"\n\"        // which is determined by the iterator (e.g., `&T` for `.iter()`,\\n\"\n\"        // `T` for `.into_iter()`).\\n\"\nmsgstr \"\"\n\"// `FnMut`는 캡처된 변수가 최대 수정될 수 있지만 소비되지는 않음을 의미합니\"\n\"다.\\n\"\n\"// `Self::Item`은 클로저 파라미터 타입으로, 이터레이터에 의해 결정됩니다\\n\"\n\"// (예: `.iter()`의 경우 `&T`, `.into_iter()`의 경우 `T`).\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:28\nmsgid \"// `iter()` for vecs yields `&i32`. Destructure to `i32`.\\n\"\nmsgstr \"\"\n\"// 벡터에 대한 `iter()`는 `&i32`를 생성합니다. `i32`로 구조 분해합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:29\nmsgid \"\\\"2 in vec1: {}\\\"\"\nmsgstr \"\\\"vec1에 2가 있음: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:30\nmsgid \"// `into_iter()` for vecs yields `i32`. No destructuring required.\\n\"\nmsgstr \"\"\n\"// 벡터에 대한 `into_iter()`는 `i32`를 생성합니다. 구조 분해가 필요 없습니\"\n\"다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:31\nmsgid \"\\\"2 in vec2: {}\\\"\"\nmsgstr \"\\\"vec2에 2가 있음: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:33\nmsgid \"\"\n\"// `iter()` only borrows `vec1` and its elements, so they can be used again\\n\"\nmsgstr \"\"\n\"// `iter()`는 오직 `vec1`과 그 요소들을 빌리기만 하므로, 다시 사용할 수 있습\"\n\"니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:34\nmsgid \"\\\"vec1 len: {}\\\"\"\nmsgstr \"\\\"vec1 길이: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:35\nmsgid \"\\\"First element of vec1 is: {}\\\"\"\nmsgstr \"\\\"vec1의 첫 번째 요소: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:36\nmsgid \"\"\n\"// `into_iter()` does move `vec2` and its elements, so they cannot be used \"\n\"again\\n\"\n\"    // println!(\\\"First element of vec2 is: {}\\\", vec2[0]);\\n\"\n\"    // println!(\\\"vec2 len: {}\\\", vec2.len());\\n\"\n\"    // TODO: uncomment two lines above and see compiler errors.\\n\"\nmsgstr \"\"\n\"// `into_iter()`는 `vec2`와 그 요소들을 이동(move)시키므로, 다시 사용할 수 없\"\n\"습니다.\\n\"\n\"// println!(\\\"vec2의 첫 번째 요소: {}\\\", vec2[0]);\\n\"\n\"// println!(\\\"vec2 길이: {}\\\", vec2.len());\\n\"\n\"// TODO: 위의 두 줄의 주석을 해제하고 컴파일 에러를 확인해 보세요.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:44\nmsgid \"// `iter()` for arrays yields `&i32`.\\n\"\nmsgstr \"// 배열에 대한 `iter()`는 `&i32`를 생성합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:45\nmsgid \"\\\"2 in array1: {}\\\"\"\nmsgstr \"\\\"array1에 2가 있음: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:46\nmsgid \"// `into_iter()` for arrays yields `i32`.\\n\"\nmsgstr \"// 배열에 대한 `into_iter()`는 `i32`를 생성합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:47\nmsgid \"\\\"2 in array2: {}\\\"\"\nmsgstr \"\\\"array2에 2가 있음: {}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:53\nmsgid \"\"\n\"[`std::iter::Iterator::any`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.any)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::any`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.any)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:3\nmsgid \"\"\n\"`Iterator::find` is a function which iterates over an iterator and searches \"\n\"for the first value which satisfies some condition. If none of the values \"\n\"satisfy the condition, it returns `None`. Its signature:\"\nmsgstr \"\"\n\"`Iterator::find`는 이터레이터를 순회하며 어떤 조건을 만족하는 첫 번째 값을 찾\"\n\"는 함수입니다. 조건을 만족하는 값이 없으면 `None`을 반환합니다. 시그니처는 다\"\n\"음과 같습니다:\"\n\n#: src/fn/closures/closure_examples/iter_find.md:12\nmsgid \"\"\n\"// `find` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\"// `find`는 `&mut self`를 취하므로 호출자는 빌려지거나\\n\"\n\"// 수정될 수 있지만, 소비(consume)되지는 않습니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `&Self::Item` states it takes\\n\"\n\"        // arguments to the closure by reference.\\n\"\nmsgstr \"\"\n\"// `FnMut`는 캡처된 변수가 최대 수정될 수 있지만 소비되지는 않음을 의미합니\"\n\"다.\\n\"\n\"// `&Self::Item`은 클로저에 대한 인자를 참조로 취함을 나타냅니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:27\nmsgid \"// `vec1.iter()` yields `&i32`.\\n\"\nmsgstr \"// `vec1.iter()`는 `&i32`를 생성합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:29\nmsgid \"// `vec2.into_iter()` yields `i32`.\\n\"\nmsgstr \"// `vec2.into_iter()`는 `i32`를 생성합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:32\nmsgid \"\"\n\"// `iter()` yields `&i32`, and `find` passes `&Item` to the predicate.\\n\"\n\"    // Since `Item = &i32`, the closure argument has type `&&i32`,\\n\"\n\"    // which we pattern-match to dereference down to `i32`.\\n\"\nmsgstr \"\"\n\"// `iter()`는 `&i32`를 생성하고, `find`는 서술어(predicate)에 `&Item`을 전달\"\n\"합니다.\\n\"\n\"// `Item = &i32`이므로 클로저 인자는 `&&i32` 타입을 가지며,\\n\"\n\"// 우리는 이를 패턴 매칭하여 `i32`로 역참조합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:35\nmsgid \"\\\"Find 2 in vec1: {:?}\\\"\"\nmsgstr \"\\\"vec1에서 2 찾기: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:37\nmsgid \"\"\n\"// `into_iter()` yields `i32`, and `find` passes `&Item` to the predicate.\\n\"\n\"    // Since `Item = i32`, the closure argument has type `&i32`,\\n\"\n\"    // which we pattern-match to dereference down to `i32`.\\n\"\nmsgstr \"\"\n\"// `into_iter()`는 `i32`를 생성하고, `find`는 서술어에 `&Item`을 전달합니\"\n\"다.\\n\"\n\"// `Item = i32`이므로 클로저 인자는 `&i32` 타입을 가지며,\\n\"\n\"// 우리는 이를 패턴 매칭하여 `i32`로 역참조합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:40\nmsgid \"\\\"Find 2 in vec2: {:?}\\\"\"\nmsgstr \"\\\"vec2에서 2 찾기: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:45\nmsgid \"// `array1.iter()` yields `&i32`\\n\"\nmsgstr \"// `array1.iter()`는 `&i32`를 생성합니다\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:46\nmsgid \"\\\"Find 2 in array1: {:?}\\\"\"\nmsgstr \"\\\"array1에서 2 찾기: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:47\nmsgid \"// `array2.into_iter()` yields `i32`\\n\"\nmsgstr \"// `array2.into_iter()`는 `i32`를 생성합니다\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:48\nmsgid \"\\\"Find 2 in array2: {:?}\\\"\"\nmsgstr \"\\\"array2에서 2 찾기: {:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:52\nmsgid \"\"\n\"`Iterator::find` gives you a reference to the item. But if you want the \"\n\"_index_ of the item, use `Iterator::position`.\"\nmsgstr \"\"\n\"`Iterator::find`는 아이템에 대한 참조를 제공합니다. 하지만 아이템의 인덱스를 \"\n\"원한다면 `Iterator::position`을 사용하세요.\"\n\n#: src/fn/closures/closure_examples/iter_find.md:59\nmsgid \"\"\n\"// `position` passes the iterator’s `Item` by value to the predicate.\\n\"\n\"    // `vec.iter()` yields `&i32`, so the predicate receives `&i32`,\\n\"\n\"    // which we pattern-match to dereference to `i32`.\\n\"\nmsgstr \"\"\n\"// `position`은 이터레이터의 `Item`을 값으로 서술어에 전달합니다.\\n\"\n\"// `vec.iter()`는 `&i32`를 생성하므로 서술어는 `&i32`를 받으며,\\n\"\n\"// 우리는 이를 패턴 매칭하여 `i32`로 역참조합니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:65\nmsgid \"\"\n\"// `vec.into_iter()` yields `i32`, so the predicate receives `i32` \"\n\"directly.\\n\"\nmsgstr \"\"\n\"// `vec.into_iter()`는 `i32`를 생성하므로 서술어는 `i32`를 직접 받습니다.\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:73\nmsgid \"\"\n\"[`std::iter::Iterator::find`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::find`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:75\nmsgid \"\"\n\"[`std::iter::Iterator::find_map`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find_map)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::find_map`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find_map)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:77\nmsgid \"\"\n\"[`std::iter::Iterator::position`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.position)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::position`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.position)\"\n\n#: src/fn/closures/closure_examples/iter_find.md:79\nmsgid \"\"\n\"[`std::iter::Iterator::rposition`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.rposition)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::rposition`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.rposition)\"\n\n#: src/fn/hof.md:3\nmsgid \"\"\n\"Rust provides Higher Order Functions (HOF). These are functions that take \"\n\"one or more functions and/or produce a more useful function. HOFs and lazy \"\n\"iterators give Rust its functional flavor.\"\nmsgstr \"\"\n\"Rust는 고차 함수(Higher Order Functions, HOF)를 제공합니다. 이들은 하나 이상\"\n\"의 함수를 인자로 받거나 더 유용한 함수를 만들어내는 함수들입니다. HOF와 게으\"\n\"른(lazy) 이터레이터는 Rust에 함수형 프로그래밍의 풍미를 더해줍니다.\"\n\n#: src/fn/hof.md:13\nmsgid \"\\\"Find the sum of all the numbers with odd squares under 1000\\\"\"\nmsgstr \"\\\"1000 미만의 홀수 제곱값들의 합 찾기\\\"\"\n\n#: src/fn/hof.md:16\nmsgid \"\"\n\"// Imperative approach\\n\"\n\"    // Declare accumulator variable\\n\"\nmsgstr \"\"\n\"// 명령형 접근 방식\\n\"\n\"// 누적 변수 선언\\n\"\n\n#: src/fn/hof.md:19\nmsgid \"// Iterate: 0, 1, 2, ... to infinity\\n\"\nmsgstr \"// 반복: 0, 1, 2, ... 무한대까지\\n\"\n\n#: src/fn/hof.md:21\nmsgid \"// Square the number\\n\"\nmsgstr \"// 숫자를 제곱합니다\\n\"\n\n#: src/fn/hof.md:25\nmsgid \"// Break loop if exceeded the upper limit\\n\"\nmsgstr \"// 상한을 초과하면 루프를 종료합니다\\n\"\n\n#: src/fn/hof.md:28\nmsgid \"// Accumulate value, if it's odd\\n\"\nmsgstr \"// 홀수라면 값을 누적합니다\\n\"\n\n#: src/fn/hof.md:32\nmsgid \"\\\"imperative style: {}\\\"\"\nmsgstr \"\\\"명령형 스타일: {}\\\"\"\n\n#: src/fn/hof.md:34\nmsgid \"// Functional approach\\n\"\nmsgstr \"// 함수형 접근 방식\\n\"\n\n#: src/fn/hof.md:36\nmsgid \"// Below upper limit\\n\"\nmsgstr \"// 상한 미만\\n\"\n\n#: src/fn/hof.md:37\nmsgid \"// That are odd\\n\"\nmsgstr \"// 홀수인 것들\\n\"\n\n#: src/fn/hof.md:38\nmsgid \"// Sum them\\n\"\nmsgstr \"// 합계를 구함\\n\"\n\n#: src/fn/hof.md:39\nmsgid \"\\\"functional style: {}\\\"\"\nmsgstr \"\\\"함수형 스타일: {}\\\"\"\n\n#: src/fn/hof.md:43\nmsgid \"\"\n\"[Option](https://doc.rust-lang.org/core/option/enum.Option.html) and \"\n\"[Iterator](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"implement their fair share of HOFs.\"\nmsgstr \"\"\n\"[Option](https://doc.rust-lang.org/core/option/enum.Option.html)과 [Iterator]\"\n\"(https://doc.rust-lang.org/core/iter/trait.Iterator.html)는 상당수의 HOF를 구\"\n\"현하고 있습니다.\"\n\n#: src/fn/diverging.md:3\nmsgid \"\"\n\"Diverging functions never return. They are marked using `!`, which is an \"\n\"empty type.\"\nmsgstr \"\"\n\"발산 함수(Diverging functions)는 절대 반환되지 않습니다. 이들은 빈 타입인 `!`\"\n\"를 사용하여 표시됩니다.\"\n\n#: src/fn/diverging.md:7 src/fn/diverging.md:35\nmsgid \"\\\"This call never returns.\\\"\"\nmsgstr \"\\\"이 호출은 절대 반환되지 않습니다.\\\"\"\n\n#: src/fn/diverging.md:11\nmsgid \"\"\n\"As opposed to all the other types, this one cannot be instantiated, because \"\n\"the set of all possible values this type can have is empty. Note that, it is \"\n\"different from the `()` type, which has exactly one possible value.\"\nmsgstr \"\"\n\"다른 모든 타입들과 달리, 이 타입은 인스턴스화할 수 없습니다. 이 타입이 가질 \"\n\"수 있는 모든 가능한 값의 집합이 비어 있기 때문입니다. 이는 정확히 하나의 가능\"\n\"한 값을 갖는 `()` 타입과는 다르다는 점에 유의하세요.\"\n\n#: src/fn/diverging.md:15\nmsgid \"\"\n\"For example, this function returns as usual, although there is no \"\n\"information in the return value.\"\nmsgstr \"예를 들어, 이 함수는 반환 값에 정보가 없더라도 평소와 같이 반환됩니다.\"\n\n#: src/fn/diverging.md:25\nmsgid \"\\\"This function returns and you can see this line.\\\"\"\nmsgstr \"\\\"이 함수는 반환되며 당신은 이 줄을 볼 수 있습니다.\\\"\"\n\n#: src/fn/diverging.md:29\nmsgid \"\"\n\"As opposed to this function, which will never return the control back to the \"\n\"caller.\"\nmsgstr \"반면 이 함수는 호출자에게 제어권을 절대 반환하지 않습니다.\"\n\n#: src/fn/diverging.md:36\nmsgid \"\\\"You will never see this line!\\\"\"\nmsgstr \"\\\"당신은 결코 이 줄을 볼 수 없을 것입니다!\\\"\"\n\n#: src/fn/diverging.md:40\nmsgid \"\"\n\"Although this might seem like an abstract concept, it is actually very \"\n\"useful and often handy. The main advantage of this type is that it can be \"\n\"cast to any other type, making it versatile in situations where an exact \"\n\"type is required, such as in match branches. This flexibility allows us to \"\n\"write code like this:\"\nmsgstr \"\"\n\"이것이 추상적인 개념처럼 보일 수 있지만, 실제로는 매우 유용하며 종종 편리하\"\n\"게 사용됩니다. 이 타입의 주요 장점은 다른 어떤 타입으로도 형변환될 수 있다는 \"\n\"것이며, 이는 match 분기와 같이 정확한 타입이 요구되는 상황에서 다재다능하게 \"\n\"만들어줍니다. 이러한 유연성 덕분에 다음과 같은 코드를 작성할 수 있습니다:\"\n\n#: src/fn/diverging.md:50\nmsgid \"\"\n\"// Notice that the return type of this match expression must be u32\\n\"\n\"            // because of the type of the \\\"addition\\\" variable.\\n\"\nmsgstr \"\"\n\"// 이 match 표현식의 반환 타입은 \\\"addition\\\" 변수의 타입 때문에\\n\"\n\"// 반드시 u32여야 함에 주목하세요.\\n\"\n\n#: src/fn/diverging.md:53\nmsgid \"// The \\\"i\\\" variable is of type u32, which is perfectly fine.\\n\"\nmsgstr \"// \\\"i\\\" 변수는 u32 타입이며, 이는 완벽하게 괜찮습니다.\\n\"\n\n#: src/fn/diverging.md:55\nmsgid \"\"\n\"// On the other hand, the \\\"continue\\\" expression does not return\\n\"\n\"                // u32, but it is still fine, because it never returns and \"\n\"therefore\\n\"\n\"                // does not violate the type requirements of the match \"\n\"expression.\\n\"\nmsgstr \"\"\n\"// 반면에 \\\"continue\\\" 표현식은 u32를 반환하지 않지만,\\n\"\n\"// 결코 반환되지 않으므로 match 표현식의 타입 요구 사항을\\n\"\n\"// 위반하지 않으며 여전히 괜찮습니다.\\n\"\n\n#: src/fn/diverging.md:64\nmsgid \"\\\"Sum of odd numbers up to 9 (excluding): {}\\\"\"\nmsgstr \"\\\"9 미만의 홀수들의 합: {}\\\"\"\n\n#: src/fn/diverging.md:68\nmsgid \"\"\n\"It is also the return type of functions that loop forever (e.g. `loop {}`) \"\n\"like network servers or functions that terminate the process (e.g. `exit()`).\"\nmsgstr \"\"\n\"또한 네트워크 서버처럼 영원히 루프를 도는 함수(예: `loop {}`)나 프로세스를 종\"\n\"료하는 함수(예: `exit()`)의 반환 타입이기도 합니다.\"\n\n#: src/mod.md:3\nmsgid \"\"\n\"Rust provides a powerful module system that can be used to hierarchically \"\n\"split code in logical units (modules), and manage visibility (public/\"\n\"private) between them.\"\nmsgstr \"\"\n\"Rust는 코드를 논리적 단위(모듈)로 계층적으로 나누고, 그들 사이의 가시성\"\n\"(public/private)을 관리하는 데 사용할 수 있는 강력한 모듈 시스템을 제공합니\"\n\"다.\"\n\n#: src/mod.md:7\nmsgid \"\"\n\"A module is a collection of items: functions, structs, traits, `impl` \"\n\"blocks, and even other modules.\"\nmsgstr \"\"\n\"모듈은 함수, 구조체, 트레이트, `impl` 블록, 그리고 다른 모듈까지 포함하는 아\"\n\"이템들의 모음입니다.\"\n\n#: src/mod/visibility.md:3\nmsgid \"\"\n\"By default, the items in a module have private visibility, but this can be \"\n\"overridden with the `pub` modifier. Only the public items of a module can be \"\n\"accessed from outside the module scope.\"\nmsgstr \"\"\n\"기본적으로 모듈 내의 아이템들은 비공개(private) 가시성을 가지지만, `pub` 수식\"\n\"어를 사용하여 이를 재정의할 수 있습니다. 모듈 스코프 외부에서는 모듈의 공개\"\n\"(public) 아이템만 접근할 수 있습니다.\"\n\n#: src/mod/visibility.md:8\nmsgid \"// A module named `my_mod`\\n\"\nmsgstr \"// `my_mod`라는 이름의 모듈\\n\"\n\n#: src/mod/visibility.md:10\nmsgid \"// Items in modules default to private visibility.\\n\"\nmsgstr \"// 모듈 내의 아이템들은 기본적으로 비공개 가시성을 가집니다.\\n\"\n\n#: src/mod/visibility.md:12\nmsgid \"\\\"called `my_mod::private_function()`\\\"\"\nmsgstr \"\\\"`my_mod::private_function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:15\nmsgid \"// Use the `pub` modifier to override default visibility.\\n\"\nmsgstr \"// 기본 가시성을 재정의하려면 `pub` 수식어를 사용하세요.\\n\"\n\n#: src/mod/visibility.md:17\nmsgid \"\\\"called `my_mod::function()`\\\"\"\nmsgstr \"\\\"`my_mod::function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:20\nmsgid \"\"\n\"// Items can access other items in the same module,\\n\"\n\"    // even when private.\\n\"\nmsgstr \"\"\n\"// 아이템들은 같은 모듈 내의 다른 아이템들에 접근할 수 있으며,\\n\"\n\"// 이는 비공개 아이템이라도 마찬가지입니다.\\n\"\n\n#: src/mod/visibility.md:23\nmsgid \"\\\"called `my_mod::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"`my_mod::indirect_access()` 호출됨, 결과는\\\\n> \\\"\"\n\n#: src/mod/visibility.md:27\nmsgid \"// Modules can also be nested\\n\"\nmsgstr \"// 모듈은 중첩될 수도 있습니다\\n\"\n\n#: src/mod/visibility.md:30\nmsgid \"\\\"called `my_mod::nested::function()`\\\"\"\nmsgstr \"\\\"`my_mod::nested::function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:35\nmsgid \"\\\"called `my_mod::nested::private_function()`\\\"\"\nmsgstr \"\\\"`my_mod::nested::private_function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:38\nmsgid \"\"\n\"// Functions declared using `pub(in path)` syntax are only visible\\n\"\n\"        // within the given path. `path` must be a parent or ancestor \"\n\"module\\n\"\nmsgstr \"\"\n\"// `pub(in path)` 구문을 사용하여 선언된 함수들은 오직 지정된\\n\"\n\"// 경로 내에서만 보입니다. `path`는 반드시 부모 또는 조상 모듈이어야 합니\"\n\"다.\\n\"\n\n#: src/mod/visibility.md:41\nmsgid \"\\\"called `my_mod::nested::public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\\\"`my_mod::nested::public_function_in_my_mod()` 호출됨, 결과는\\\\n> \\\"\"\n\n#: src/mod/visibility.md:45\nmsgid \"\"\n\"// Functions declared using `pub(self)` syntax are only visible within\\n\"\n\"        // the current module, which is the same as leaving them private\\n\"\nmsgstr \"\"\n\"// `pub(self)` 구문을 사용하여 선언된 함수들은 오직 현재 모듈\\n\"\n\"// 내에서만 보이며, 이는 비공개로 두는 것과 동일합니다.\\n\"\n\n#: src/mod/visibility.md:48\nmsgid \"\\\"called `my_mod::nested::public_function_in_nested()`\\\"\"\nmsgstr \"\\\"`my_mod::nested::public_function_in_nested()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:51\nmsgid \"\"\n\"// Functions declared using `pub(super)` syntax are only visible within\\n\"\n\"        // the parent module\\n\"\nmsgstr \"\"\n\"// `pub(super)` 구문을 사용하여 선언된 함수들은 오직 부모 모듈\\n\"\n\"// 내에서만 보입니다.\\n\"\n\n#: src/mod/visibility.md:54\nmsgid \"\\\"called `my_mod::nested::public_function_in_super_mod()`\\\"\"\nmsgstr \"\\\"`my_mod::nested::public_function_in_super_mod()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:59\nmsgid \"\\\"called `my_mod::call_public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\\\"`my_mod::call_public_function_in_my_mod()` 호출됨, 결과는\\\\n> \\\"\"\n\n#: src/mod/visibility.md:61\nmsgid \"\\\"> \\\"\"\nmsgstr \"\\\"> \\\"\"\n\n#: src/mod/visibility.md:65\nmsgid \"// pub(crate) makes functions visible only within the current crate\\n\"\nmsgstr \"// pub(crate)는 함수를 오직 현재 크레이트 내에서만 보이게 만듭니다\\n\"\n\n#: src/mod/visibility.md:67\nmsgid \"\\\"called `my_mod::public_function_in_crate()`\\\"\"\nmsgstr \"\\\"`my_mod::public_function_in_crate()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:70\nmsgid \"// Nested modules follow the same rules for visibility\\n\"\nmsgstr \"// 중첩된 모듈도 동일한 가시성 규칙을 따릅니다\\n\"\n\n#: src/mod/visibility.md:74\nmsgid \"\\\"called `my_mod::private_nested::function()`\\\"\"\nmsgstr \"\\\"`my_mod::private_nested::function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:77\nmsgid \"\"\n\"// Private parent items will still restrict the visibility of a child item,\\n\"\n\"        // even if it is declared as visible within a bigger scope.\\n\"\nmsgstr \"\"\n\"// 비공개 부모 아이템은 자식 아이템이 더 큰 스코프 내에서 보이도록\\n\"\n\"// 선언되어 있더라도 여전히 그 가시성을 제한합니다.\\n\"\n\n#: src/mod/visibility.md:81\nmsgid \"\\\"called `my_mod::private_nested::restricted_function()`\\\"\"\nmsgstr \"\\\"`my_mod::private_nested::restricted_function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:87 src/mod/use.md:25 src/mod/super.md:8\n#: src/mod/split.md:24\nmsgid \"\\\"called `function()`\\\"\"\nmsgstr \"\\\"`function()` 호출됨\\\"\"\n\n#: src/mod/visibility.md:91\nmsgid \"\"\n\"// Modules allow disambiguation between items that have the same name.\\n\"\nmsgstr \"\"\n\"// 모듈은 이름이 같은 아이템들 간의 모호함을 해소할 수 있게 해줍니다.\\n\"\n\n#: src/mod/visibility.md:95\nmsgid \"\"\n\"// Public items, including those inside nested modules, can be\\n\"\n\"    // accessed from outside the parent module.\\n\"\nmsgstr \"\"\n\"// 중첩된 모듈 내부에 있는 아이템을 포함한 공개 아이템들은\\n\"\n\"// 부모 모듈 외부에서 접근할 수 있습니다.\\n\"\n\n#: src/mod/visibility.md:101\nmsgid \"// pub(crate) items can be called from anywhere in the same crate\\n\"\nmsgstr \"\"\n\"// pub(crate) 아이템은 같은 크레이트 내 어디에서나 호출될 수 있습니다\\n\"\n\n#: src/mod/visibility.md:104\nmsgid \"\"\n\"// pub(in path) items can only be called from within the module specified\\n\"\n\"    // Error! function `public_function_in_my_mod` is private\\n\"\n\"    //my_mod::nested::public_function_in_my_mod();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// `pub(in path)` 아이템은 오직 지정된 모듈 내에서만 호출될 수 있습니다\\n\"\n\"// 에러! `public_function_in_my_mod` 함수는 비공개입니다\\n\"\n\"// my_mod::nested::public_function_in_my_mod();\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/visibility.md:109\nmsgid \"\"\n\"// Private items of a module cannot be directly accessed, even if\\n\"\n\"    // nested in a public module:\\n\"\nmsgstr \"\"\n\"// 모듈의 비공개 아이템은 공개 모듈에 중첩되어 있더라도\\n\"\n\"// 직접 접근할 수 없습니다:\\n\"\n\n#: src/mod/visibility.md:112\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `private_function`은 비공개입니다\\n\"\n\"// my_mod::private_function();\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/visibility.md:116\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::nested::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `private_function`은 비공개입니다\\n\"\n\"// my_mod::nested::private_function();\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/visibility.md:120\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `private_nested`는 비공개 모듈입니다\\n\"\n\"// my_mod::private_nested::function();\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/visibility.md:124\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::restricted_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `private_nested`는 비공개 모듈입니다\\n\"\n\"// my_mod::private_nested::restricted_function();\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/struct_visibility.md:3\nmsgid \"\"\n\"Structs have an extra level of visibility with their fields. The visibility \"\n\"defaults to private, and can be overridden with the `pub` modifier. This \"\n\"visibility only matters when a struct is accessed from outside the module \"\n\"where it is defined, and has the goal of hiding information (encapsulation).\"\nmsgstr \"\"\n\"구조체는 필드에 대해 추가적인 수준의 가시성을 가집니다. 가시성은 기본적으로 \"\n\"비공개이며, `pub` 수식어로 재정의할 수 있습니다. 이 가시성은 구조체가 정의된 \"\n\"모듈 외부에서 접근할 때만 의미가 있으며, 정보를 숨기는 것(캡슐화)이 목적입니\"\n\"다.\"\n\n#: src/mod/struct_visibility.md:10\nmsgid \"// A public struct with a public field of generic type `T`\\n\"\nmsgstr \"// 제네릭 타입 `T`의 공개 필드를 가진 공개 구조체\\n\"\n\n#: src/mod/struct_visibility.md:15\nmsgid \"// A public struct with a private field of generic type `T`\\n\"\nmsgstr \"// 제네릭 타입 `T`의 비공개 필드를 가진 공개 구조체\\n\"\n\n#: src/mod/struct_visibility.md:21\nmsgid \"// A public constructor method\\n\"\nmsgstr \"// 공개 생성자 메서드\\n\"\n\n#: src/mod/struct_visibility.md:31\nmsgid \"// Public structs with public fields can be constructed as usual\\n\"\nmsgstr \"// 공개 필드를 가진 공개 구조체는 평소처럼 생성할 수 있습니다\\n\"\n\n#: src/mod/struct_visibility.md:32\nmsgid \"\\\"public information\\\"\"\nmsgstr \"\\\"공개 정보\\\"\"\n\n#: src/mod/struct_visibility.md:34\nmsgid \"// and their fields can be normally accessed.\\n\"\nmsgstr \"// 그리고 그 필드들에 정상적으로 접근할 수 있습니다.\\n\"\n\n#: src/mod/struct_visibility.md:35\nmsgid \"\\\"The open box contains: {}\\\"\"\nmsgstr \"\\\"열린 박스 내용물: {}\\\"\"\n\n#: src/mod/struct_visibility.md:37\nmsgid \"\"\n\"// Public structs with private fields cannot be constructed using field \"\n\"names.\\n\"\n\"    // Error! `ClosedBox` has private fields\\n\"\n\"    //let closed_box = my::ClosedBox { contents: \\\"classified \"\n\"information\\\" };\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 비공개 필드를 가진 공개 구조체는 필드 이름을 사용하여 생성할 수 없습니\"\n\"다.\\n\"\n\"// 에러! `ClosedBox`에 비공개 필드가 있습니다\\n\"\n\"// let closed_box = my::ClosedBox { contents: \\\"classified information\\\" };\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/struct_visibility.md:42\nmsgid \"\"\n\"// However, structs with private fields can be created using\\n\"\n\"    // public constructors\\n\"\nmsgstr \"\"\n\"// 하지만 비공개 필드를 가진 구조체는 공개 생성자를 통해 생성할 수 있습니다\\n\"\n\n#: src/mod/struct_visibility.md:44\nmsgid \"\\\"classified information\\\"\"\nmsgstr \"\\\"기밀 정보\\\"\"\n\n#: src/mod/struct_visibility.md:46\nmsgid \"\"\n\"// and the private fields of a public struct cannot be accessed.\\n\"\n\"    // Error! The `contents` field is private\\n\"\n\"    //println!(\\\"The closed box contains: {}\\\", _closed_box.contents);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 그리고 공개 구조체의 비공개 필드에는 접근할 수 없습니다.\\n\"\n\"// 에러! `contents` 필드는 비공개입니다\\n\"\n\"// println!(\\\"닫힌 박스 내용물: {}\\\", _closed_box.contents);\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/mod/struct_visibility.md:55\nmsgid \"[generics](../generics.md) and [methods](../fn/methods.md)\"\nmsgstr \"[제네릭](../generics.md) 및 [메서드](../fn/methods.md)\"\n\n#: src/mod/use.md:3\nmsgid \"\"\n\"The `use` declaration can be used to bind a full path to a new name, for \"\n\"easier access. It is often used like this:\"\nmsgstr \"\"\n\"`use` 선언을 사용하여 전체 경로를 새로운 이름에 바인딩하여 더 쉽게 접근할 수 \"\n\"있습니다. 다음과 같이 자주 사용됩니다:\"\n\n#: src/mod/use.md:18\nmsgid \"You can use the `as` keyword to bind imports to a different name:\"\nmsgstr \"\"\n\"`as` 키워드를 사용하여 임포트(imports)를 다른 이름에 바인딩할 수 있습니다:\"\n\n#: src/mod/use.md:21\nmsgid \"// Bind the `deeply::nested::function` path to `other_function`.\\n\"\nmsgstr \"\"\n\"// `deeply::nested::function` 경로를 `other_function`에 바인딩합니다.\\n\"\n\n#: src/mod/use.md:31\nmsgid \"\\\"called `deeply::nested::function()`\\\"\"\nmsgstr \"\\\"`deeply::nested::function()` 호출됨\\\"\"\n\n#: src/mod/use.md:37\nmsgid \"// Easier access to `deeply::nested::function`\\n\"\nmsgstr \"// `deeply::nested::function`에 더 쉽게 접근\\n\"\n\n#: src/mod/use.md:40\nmsgid \"\\\"Entering block\\\"\"\nmsgstr \"\\\"블록 진입\\\"\"\n\n#: src/mod/use.md:42\nmsgid \"\"\n\"// This is equivalent to `use deeply::nested::function as function`.\\n\"\n\"        // This `function()` will shadow the outer one.\\n\"\nmsgstr \"\"\n\"// 이는 `use deeply::nested::function as function`과 동일합니다.\\n\"\n\"// 이 `function()`은 외부의 것을 섀도잉합니다.\\n\"\n\n#: src/mod/use.md:46\nmsgid \"\"\n\"// `use` bindings have a local scope. In this case, the\\n\"\n\"        // shadowing of `function()` is only in this block.\\n\"\nmsgstr \"\"\n\"// `use` 바인딩은 지역 스코프를 가집니다. 이 경우\\n\"\n\"// `function()`의 섀도잉은 이 블록 내에서만 유효합니다.\\n\"\n\n#: src/mod/use.md:50\nmsgid \"\\\"Leaving block\\\"\"\nmsgstr \"\\\"블록 나감\\\"\"\n\n#: src/mod/super.md:3\nmsgid \"\"\n\"The `super` and `self` keywords can be used in the path to remove ambiguity \"\n\"when accessing items and to prevent unnecessary hardcoding of paths.\"\nmsgstr \"\"\n\"`super`와 `self` 키워드는 아이템에 접근할 때 모호함을 제거하고 경로의 불필요\"\n\"한 하드코딩을 방지하기 위해 경로 내에서 사용될 수 있습니다.\"\n\n#: src/mod/super.md:13\nmsgid \"\\\"called `cool::function()`\\\"\"\nmsgstr \"\\\"`cool::function()` 호출됨\\\"\"\n\n#: src/mod/super.md:19 src/mod/split.md:49\nmsgid \"\\\"called `my::function()`\\\"\"\nmsgstr \"\\\"`my::function()` 호출됨\\\"\"\n\n#: src/mod/super.md:24\nmsgid \"\\\"called `my::cool::function()`\\\"\"\nmsgstr \"\\\"`my::cool::function()` 호출됨\\\"\"\n\n#: src/mod/super.md:29\nmsgid \"// Let's access all the functions named `function` from this scope!\\n\"\nmsgstr \"// 이 스코프에서 `function`이라는 이름의 모든 함수에 접근해 봅시다!\\n\"\n\n#: src/mod/super.md:30\nmsgid \"\\\"called `my::indirect_call()`, that\\\\n> \\\"\"\nmsgstr \"\\\"`my::indirect_call()` 호출됨, 결과는\\\\n> \\\"\"\n\n#: src/mod/super.md:32\nmsgid \"\"\n\"// The `self` keyword refers to the current module scope - in this case \"\n\"`my`.\\n\"\n\"        // Calling `self::function()` and calling `function()` directly both \"\n\"give\\n\"\n\"        // the same result, because they refer to the same function.\\n\"\nmsgstr \"\"\n\"// `self` 키워드는 현재 모듈 스코프를 가리킵니다. 이 경우 `my`입니다.\\n\"\n\"// `self::function()`을 호출하는 것과 `function()`을 직접 호출하는 것은\\n\"\n\"// 동일한 함수를 가리키기 때문에 같은 결과를 냅니다.\\n\"\n\n#: src/mod/super.md:38\nmsgid \"// We can also use `self` to access another module inside `my`:\\n\"\nmsgstr \"// `self`를 사용하여 `my` 내부의 다른 모듈에 접근할 수도 있습니다:\\n\"\n\n#: src/mod/super.md:41\nmsgid \"\"\n\"// The `super` keyword refers to the parent scope (outside the `my` \"\n\"module).\\n\"\nmsgstr \"// `super` 키워드는 부모 스코프(`my` 모듈 외부)를 가리킵니다.\\n\"\n\n#: src/mod/super.md:44\nmsgid \"\"\n\"// This will bind to the `cool::function` in the *crate* scope.\\n\"\n\"        // In this case the crate scope is the outermost scope.\\n\"\nmsgstr \"\"\n\"// 이는 *크레이트* 스코프에 있는 `cool::function`에 바인딩됩니다.\\n\"\n\"// 이 경우 크레이트 스코프는 가장 바깥쪽 스코프입니다.\\n\"\n\n#: src/mod/split.md:3\nmsgid \"\"\n\"Modules can be mapped to a file/directory hierarchy. Let's break down the \"\n\"[visibility example](visibility.md) in files:\"\nmsgstr \"\"\n\"모듈은 파일/디렉토리 계층 구조에 매핑될 수 있습니다. [가시성 예제]\"\n\"(visibility.md)를 파일별로 나누어 봅시다:\"\n\n#: src/mod/split.md:16\nmsgid \"In `split.rs`:\"\nmsgstr \"`split.rs`에서:\"\n\n#: src/mod/split.md:19\nmsgid \"\"\n\"// This declaration will look for a file named `my.rs` and will\\n\"\n\"// insert its contents inside a module named `my` under this scope\\n\"\nmsgstr \"\"\n\"// 이 선언은 `my.rs`라는 파일을 찾아 그 내용을\\n\"\n\"// 이 스코프 아래의 `my`라는 이름의 모듈로 삽입할 것입니다\\n\"\n\n#: src/mod/split.md:39\nmsgid \"In `my.rs`:\"\nmsgstr \"`my.rs`에서:\"\n\n#: src/mod/split.md:42\nmsgid \"\"\n\"// Similarly `mod inaccessible` and `mod nested` will locate the \"\n\"`nested.rs`\\n\"\n\"// and `inaccessible.rs` files and insert them here under their respective\\n\"\n\"// modules\\n\"\nmsgstr \"\"\n\"// 마찬가지로 `mod inaccessible`과 `mod nested`는 `nested.rs`와\\n\"\n\"// `inaccessible.rs` 파일을 찾아 각각의 모듈 아래에\\n\"\n\"// 삽입할 것입니다\\n\"\n\n#: src/mod/split.md:53\nmsgid \"\\\"called `my::private_function()`\\\"\"\nmsgstr \"\\\"`my::private_function()` 호출됨\\\"\"\n\n#: src/mod/split.md:57\nmsgid \"\\\"called `my::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"`my::indirect_access()` 호출됨, 결과는\\\\n> \\\"\"\n\n#: src/mod/split.md:63\nmsgid \"In `my/nested.rs`:\"\nmsgstr \"`my/nested.rs`에서:\"\n\n#: src/mod/split.md:67\nmsgid \"\\\"called `my::nested::function()`\\\"\"\nmsgstr \"\\\"`my::nested::function()` 호출됨\\\"\"\n\n#: src/mod/split.md:72\nmsgid \"\\\"called `my::nested::private_function()`\\\"\"\nmsgstr \"\\\"`my::nested::private_function()` 호출됨\\\"\"\n\n#: src/mod/split.md:76\nmsgid \"In `my/inaccessible.rs`:\"\nmsgstr \"`my/inaccessible.rs`에서:\"\n\n#: src/mod/split.md:81\nmsgid \"\\\"called `my::inaccessible::public_function()`\\\"\"\nmsgstr \"\\\"`my::inaccessible::public_function()` 호출됨\\\"\"\n\n#: src/mod/split.md:85\nmsgid \"Let's check that things still work as before:\"\nmsgstr \"모든 것이 이전과 같이 여전히 잘 작동하는지 확인해 봅시다:\"\n\n#: src/crates.md:3\nmsgid \"\"\n\"A crate is a compilation unit in Rust. Whenever `rustc some_file.rs` is \"\n\"called, `some_file.rs` is treated as the _crate file_. If `some_file.rs` has \"\n\"`mod` declarations in it, then the contents of the module files would be \"\n\"inserted in places where `mod` declarations in the crate file are found, \"\n\"_before_ running the compiler over it. In other words, modules do _not_ get \"\n\"compiled individually, only crates get compiled.\"\nmsgstr \"\"\n\"크레이트(crate)는 Rust의 컴파일 단위입니다. `rustc some_file.rs`가 호출될 때\"\n\"마다 `some_file.rs`는 _크레이트 파일_로 처리됩니다. 만약 `some_file.rs` 내부\"\n\"에 `mod` 선언이 있다면, 컴파일러가 실행되기 _전_에 크레이트 파일에서 `mod` 선\"\n\"언이 발견된 위치에 모듈 파일의 내용이 삽입됩니다. 즉, 모듈은 개별적으로 컴파\"\n\"일되지 않으며 오직 크레이트만 컴파일됩니다.\"\n\n#: src/crates.md:10\nmsgid \"\"\n\"A crate can be compiled into a binary or into a library. By default, `rustc` \"\n\"will produce a binary from a crate. This behavior can be overridden by \"\n\"passing the `--crate-type` flag to `lib`.\"\nmsgstr \"\"\n\"크레이트는 바이너리 또는 라이브러리로 컴파일될 수 있습니다. 기본적으로 \"\n\"`rustc`는 크레이트로부터 바이너리를 생성합니다. 이 동작은 `--crate-type` 플래\"\n\"그에 `lib`을 전달하여 재정의할 수 있습니다.\"\n\n#: src/crates/lib.md:3\nmsgid \"Let's create a library, and then see how to link it to another crate.\"\nmsgstr \"\"\n\"라이브러리를 만든 다음, 이를 다른 크레이트와 어떻게 연결하는지 살펴봅시다.\"\n\n#: src/crates/lib.md:5\nmsgid \"In `rary.rs`:\"\nmsgstr \"`rary.rs`에서:\"\n\n#: src/crates/lib.md:9 src/attribute/crate.md:19\nmsgid \"\\\"called rary's `public_function()`\\\"\"\nmsgstr \"rary의 `public_function()` 호출됨\"\n\n#: src/crates/lib.md:13 src/attribute/crate.md:23\nmsgid \"\\\"called rary's `private_function()`\\\"\"\nmsgstr \"rary의 `private_function()` 호출됨\"\n\n#: src/crates/lib.md:17 src/attribute/crate.md:27\nmsgid \"\\\"called rary's `indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"rary의 `indirect_access()` 호출됨, 결과는\\\\n> \\\"\"\n\n#: src/crates/lib.md:29\nmsgid \"\"\n\"Libraries get prefixed with \\\"lib\\\", and by default they get named after \"\n\"their crate file, but this default name can be overridden by passing the `--\"\n\"crate-name` option to `rustc` or by using the [`crate_name` attribute](../\"\n\"attribute/crate.md).\"\nmsgstr \"\"\n\"라이브러리에는 \\\"lib\\\" 접두사가 붙으며, 기본적으로 크레이트 파일의 이름을 따\"\n\"서 명명되지만, 이 기본 이름은 `rustc`에 `--crate-name` 옵션을 전달하거나 \"\n\"[`crate_name` 속성](../attribute/crate.md)을 사용하여 재정의할 수 있습니다.\"\n\n#: src/crates/using_lib.md:3\nmsgid \"\"\n\"To link a crate to this new library you may use `rustc`'s `--extern` flag. \"\n\"All of its items will then be imported under a module named the same as the \"\n\"library. This module generally behaves the same way as any other module.\"\nmsgstr \"\"\n\"이 새로운 라이브러리에 크레이트를 연결하려면 `rustc`의 `--extern` 플래그를 사\"\n\"용할 수 있습니다. 그러면 모든 아이템은 라이브러리와 동일한 이름을 가진 모듈 \"\n\"아래로 임포트됩니다. 이 모듈은 일반적으로 다른 모듈과 동일하게 동작합니다.\"\n\n#: src/crates/using_lib.md:8\nmsgid \"\"\n\"// extern crate rary; // May be required for Rust 2015 edition or earlier\\n\"\nmsgstr \"\"\n\"// extern crate rary; // Rust 2015 에디션 이하에서는 필요할 수 있습니다\\n\"\n\n#: src/crates/using_lib.md:13\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //rary::private_function();\\n\"\nmsgstr \"\"\n\"// 에러! `private_function`은 비공개입니다\\n\"\n\"// rary::private_function();\\n\"\n\n#: src/cargo.md:3\nmsgid \"\"\n\"`cargo` is the official Rust package management tool. It has lots of really \"\n\"useful features to improve code quality and developer velocity! These include\"\nmsgstr \"\"\n\"`cargo`는 Rust 공식 패키지 관리 도구입니다. 코드 품질과 개발 속도를 향상시키\"\n\"기 위한 정말 유용한 기능들을 많이 가지고 있습니다! 다음과 같은 기능들이 포함\"\n\"됩니다:\"\n\n#: src/cargo.md:6\nmsgid \"\"\n\"Dependency management and integration with [crates.io](https://crates.io) \"\n\"(the official Rust package registry)\"\nmsgstr \"\"\n\"[crates.io](https://crates.io) (공식 Rust 패키지 레지스트리)와의 통합 및 의존\"\n\"성 관리\"\n\n#: src/cargo.md:8\nmsgid \"Awareness of unit tests\"\nmsgstr \"유닛 테스트 지원\"\n\n#: src/cargo.md:9\nmsgid \"Awareness of benchmarks\"\nmsgstr \"벤치마크 지원\"\n\n#: src/cargo.md:11\nmsgid \"\"\n\"This chapter will go through some quick basics, but you can find the \"\n\"comprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/).\"\nmsgstr \"\"\n\"이 장에서는 기본적인 사항들을 빠르게 살펴볼 것입니다. 더 자세한 문서는 [The \"\n\"Cargo Book](https://doc.rust-lang.org/cargo/)에서 찾을 수 있습니다.\"\n\n#: src/cargo/deps.md:3\nmsgid \"\"\n\"Most programs have dependencies on some libraries. If you have ever managed \"\n\"dependencies by hand, you know how much of a pain this can be. Luckily, the \"\n\"Rust ecosystem comes standard with `cargo`! `cargo` can manage dependencies \"\n\"for a project.\"\nmsgstr \"\"\n\"대부분의 프로그램은 일부 라이브러리에 의존성을 가집니다. 의존성을 수동으로 관\"\n\"리해 본 적이 있다면 그것이 얼마나 고통스러운 일인지 알 것입니다. 다행히도 \"\n\"Rust 생태계에는 `cargo`가 표준으로 포함되어 있습니다! `cargo`는 프로젝트의 의\"\n\"존성을 관리할 수 있습니다.\"\n\n#: src/cargo/deps.md:8\nmsgid \"To create a new Rust project,\"\nmsgstr \"새로운 Rust 프로젝트를 만들려면,\"\n\n#: src/cargo/deps.md:11\nmsgid \"# A binary\\n\"\nmsgstr \"# 바이너리\\n\"\n\n#: src/cargo/deps.md:13\nmsgid \"# A library\\n\"\nmsgstr \"# 라이브러리\\n\"\n\n#: src/cargo/deps.md:18\nmsgid \"\"\n\"For the rest of this chapter, let's assume we are making a binary, rather \"\n\"than a library, but all of the concepts are the same.\"\nmsgstr \"\"\n\"이 장의 나머지 부분에서는 라이브러리가 아닌 바이너리를 만든다고 가정하겠습니\"\n\"다. 하지만 모든 개념은 동일합니다.\"\n\n#: src/cargo/deps.md:21\nmsgid \"After the above commands, you should see a file hierarchy like this:\"\nmsgstr \"\"\n\"위의 명령어를 실행한 후에는 다음과 같은 파일 계층 구조를 보게 될 것입니다:\"\n\n#: src/cargo/deps.md:35\nmsgid \"\"\n\"The `main.rs` is the root source file for your new `foo` project -- nothing \"\n\"new there. The `Cargo.toml` is the config file for `cargo` for this project. \"\n\"If you look inside it, you should see something like this:\"\nmsgstr \"\"\n\"`main.rs`는 새로운 `foo` 프로젝트의 루트 소스 파일입니다. 특별할 것은 없습니\"\n\"다. `Cargo.toml`은 이 프로젝트에 대한 `cargo` 설정 파일입니다. 그 안을 들여다\"\n\"보면 다음과 같은 내용을 볼 수 있을 것입니다:\"\n\n#: src/cargo/deps.md:39\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"```\"\n\n#: src/cargo/deps.md:48\nmsgid \"\"\n\"The `name` field under `[package]` determines the name of the project. This \"\n\"is used by `crates.io` if you publish the crate (more later). It is also the \"\n\"name of the output binary when you compile.\"\nmsgstr \"\"\n\"`[package]` 아래의 `name` 필드는 프로젝트의 이름을 결정합니다. 이는 크레이트\"\n\"를 배포할 때(나중에 자세히 설명함) `crates.io`에서 사용됩니다. 또한 컴파일할 \"\n\"때 생성되는 바이너리의 이름이기도 합니다.\"\n\n#: src/cargo/deps.md:52\nmsgid \"\"\n\"The `version` field is a crate version number using [Semantic Versioning]\"\n\"(http://semver.org/).\"\nmsgstr \"\"\n\"`version` 필드는 [유의적 버전(Semantic Versioning)](http://semver.org/)을 사\"\n\"용하는 크레이트 버전 번호입니다.\"\n\n#: src/cargo/deps.md:55\nmsgid \"\"\n\"The `authors` field is a list of authors used when publishing the crate.\"\nmsgstr \"`authors` 필드는 크레이트를 배포할 때 사용되는 작성자 목록입니다.\"\n\n#: src/cargo/deps.md:57\nmsgid \"\"\n\"The `[dependencies]` section lets you add dependencies for your project.\"\nmsgstr \"\"\n\"`[dependencies]` 섹션에서는 프로젝트에 필요한 의존성을 추가할 수 있습니다.\"\n\n#: src/cargo/deps.md:59\nmsgid \"\"\n\"For example, suppose that we want our program to have a great CLI. You can \"\n\"find lots of great packages on [crates.io](https://crates.io) (the official \"\n\"Rust package registry). One popular choice is [clap](https://crates.io/\"\n\"crates/clap). As of this writing, the most recent published version of \"\n\"`clap` is `2.27.1`. To add a dependency to our program, we can simply add \"\n\"the following to our `Cargo.toml` under `[dependencies]`: `clap = \"\n\"\\\"2.27.1\\\"`. And that's it! You can start using `clap` in your program.\"\nmsgstr \"\"\n\"예를 들어, 우리 프로그램이 멋진 CLI를 갖기를 원한다고 가정해 봅시다. \"\n\"[crates.io](https://crates.io) (공식 Rust 패키지 레지스트리)에서 훌륭한 패키\"\n\"지들을 많이 찾을 수 있습니다. 인기 있는 선택지 중 하나는 [clap](https://\"\n\"crates.io/crates/clap)입니다. 이 글을 쓰는 시점에서 `clap`의 최신 버전은 \"\n\"`2.27.1`입니다. 프로그램에 의존성을 추가하려면 `Cargo.toml`의 \"\n\"`[dependencies]` 아래에 다음과 같이 추가하면 됩니다: `clap = \\\"2.27.1\\\"`. 이\"\n\"것으로 끝입니다! 이제 프로그램에서 `clap`을 사용할 수 있습니다.\"\n\n#: src/cargo/deps.md:67\nmsgid \"\"\n\"`cargo` also supports [other types of dependencies](https://doc.rust-\"\n\"lang.org/cargo/reference/specifying-dependencies.html). Here is just a small \"\n\"sampling:\"\nmsgstr \"\"\n\"`cargo`는 [다른 유형의 의존성](https://doc.rust-lang.org/cargo/reference/\"\n\"specifying-dependencies.html)도 지원합니다. 다음은 몇 가지 예시입니다:\"\n\n#: src/cargo/deps.md:70\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"clap = \\\"2.27.1\\\" # from crates.io\\n\"\n\"rand = { git = \\\"https://github.com/rust-lang-nursery/rand\\\" } # from online \"\n\"repo\\n\"\n\"bar = { path = \\\"../bar\\\" } # from a path in the local filesystem\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"clap = \\\"2.27.1\\\" # crates.io에서\\n\"\n\"rand = { git = \\\"https://github.com/rust-lang-nursery/rand\\\" } # 온라인 저장\"\n\"소에서\\n\"\n\"bar = { path = \\\"../bar\\\" } # 로컬 파일시스템의 경로에서\\n\"\n\"```\"\n\n#: src/cargo/deps.md:82\nmsgid \"\"\n\"`cargo` is more than a dependency manager. All of the available \"\n\"configuration options are listed in the [format specification](https://\"\n\"doc.rust-lang.org/cargo/reference/manifest.html) of `Cargo.toml`.\"\nmsgstr \"\"\n\"`cargo`는 단순한 의존성 관리자 그 이상입니다. 사용 가능한 모든 설정 옵션은 \"\n\"`Cargo.toml`의 [형식 명세(format specification)](https://doc.rust-lang.org/\"\n\"cargo/reference/manifest.html)에 나열되어 있습니다.\"\n\n#: src/cargo/deps.md:86\nmsgid \"\"\n\"To build our project we can execute `cargo build` anywhere in the project \"\n\"directory (including subdirectories!). We can also do `cargo run` to build \"\n\"and run. Notice that these commands will resolve all dependencies, download \"\n\"crates if needed, and build everything, including your crate. (Note that it \"\n\"only rebuilds what it has not already built, similar to `make`).\"\nmsgstr \"\"\n\"프로젝트를 빌드하려면 프로젝트 디렉토리 어디에서나(하위 디렉토리 포함!) \"\n\"`cargo build`를 실행하면 됩니다. 또한 `cargo run`을 통해 빌드와 실행을 동시\"\n\"에 할 수도 있습니다. 이 명령어들은 모든 의존성을 해결하고, 필요한 경우 크레이\"\n\"트를 다운로드하며, 여러분의 크레이트를 포함한 모든 것을 빌드합니다. (이미 빌\"\n\"드된 것은 다시 빌드하지 않으며, 이는 `make`와 유사합니다).\"\n\n#: src/cargo/deps.md:92\nmsgid \"Voila! That's all there is to it!\"\nmsgstr \"보세요! 이게 전부입니다!\"\n\n#: src/cargo/conventions.md:3\nmsgid \"In the previous chapter, we saw the following directory hierarchy:\"\nmsgstr \"이전 장에서 우리는 다음과 같은 디렉터리 계층 구조를 보았습니다.\"\n\n#: src/cargo/conventions.md:12\nmsgid \"\"\n\"Suppose that we wanted to have two binaries in the same project, though. \"\n\"What then?\"\nmsgstr \"\"\n\"하지만 같은 프로젝트에 두 개의 바이너리를 두고 싶다면 어떨까요? 그럴 땐 어떻\"\n\"게 해야 할까요?\"\n\n#: src/cargo/conventions.md:15\nmsgid \"\"\n\"It turns out that `cargo` supports this. The default binary name is `main`, \"\n\"as we saw before, but you can add additional binaries by placing them in a \"\n\"`bin/` directory:\"\nmsgstr \"\"\n\"다행히 `cargo`는 이를 지원합니다. 이전에 보았듯이 기본 바이너리 이름은 `main`\"\n\"이지만, `bin/` 디렉터리에 추가 바이너리를 배치하여 추가할 수 있습니다.\"\n\n#: src/cargo/conventions.md:28\nmsgid \"\"\n\"To tell `cargo` to only compile or run this binary, we just pass `cargo` the \"\n\"`--bin my_other_bin` flag, where `my_other_bin` is the name of the binary we \"\n\"want to work with.\"\nmsgstr \"\"\n\"`cargo`에게 이 바이너리만 컴파일하거나 실행하도록 하려면, `cargo`에 `--bin \"\n\"my_other_bin` 플래그를 전달하면 됩니다. 여기서 `my_other_bin`은 작업하려는 바\"\n\"이너리의 이름입니다.\"\n\n#: src/cargo/conventions.md:32\nmsgid \"\"\n\"In addition to extra binaries, `cargo` supports [more features](https://\"\n\"doc.rust-lang.org/cargo/guide/project-layout.html) such as benchmarks, \"\n\"tests, and examples.\"\nmsgstr \"\"\n\"추가 바이너리 외에도 `cargo`는 벤치마크, 테스트, 예제와 같은 [더 많은 기능]\"\n\"(https://doc.rust-lang.org/cargo/guide/project-layout.html)을 지원합니다.\"\n\n#: src/cargo/conventions.md:35\nmsgid \"In the next chapter, we will look more closely at tests.\"\nmsgstr \"다음 장에서는 테스트에 대해 더 자세히 살펴보겠습니다.\"\n\n#: src/cargo/test.md:3\nmsgid \"\"\n\"As we know testing is integral to any piece of software! Rust has first-\"\n\"class support for unit and integration testing ([see this chapter](https://\"\n\"doc.rust-lang.org/book/ch11-00-testing.html) in TRPL).\"\nmsgstr \"\"\n\"우리 모두 알다시피 테스트는 모든 소프트웨어의 필수적인 부분입니다! Rust는 유\"\n\"닛 테스트와 통합 테스트를 위한 일류(first-class) 지원을 제공합니다(TRPL의 \"\n\"[이 장](https://doc.rust-lang.org/book/ch11-00-testing.html)을 참조하세요).\"\n\n#: src/cargo/test.md:7\nmsgid \"\"\n\"From the testing chapters linked above, we see how to write unit tests and \"\n\"integration tests. Organizationally, we can place unit tests in the modules \"\n\"they test and integration tests in their own `tests/` directory:\"\nmsgstr \"\"\n\"위에 링크된 테스트 장들에서 유닛 테스트와 통합 테스트를 작성하는 방법을 확인\"\n\"할 수 있습니다. 구조적으로 유닛 테스트는 테스트 대상 모듈에 배치하고, 통합 테\"\n\"스트는 별도의 `tests/` 디렉터리에 배치할 수 있습니다.\"\n\n#: src/cargo/test.md:22\nmsgid \"\"\n\"Each file in `tests` is a separate [integration test](https://doc.rust-\"\n\"lang.org/book/ch11-03-test-organization.html#integration-tests), i.e. a test \"\n\"that is meant to test your library as if it were being called from a \"\n\"dependent crate.\"\nmsgstr \"\"\n\"`tests` 내의 각 파일은 별도의 [통합 테스트](https://doc.rust-lang.org/book/\"\n\"ch11-03-test-organization.html#integration-tests)입니다. 즉, 의존성 있는 크레\"\n\"이트에서 호출되는 것처럼 라이브러리를 테스트하기 위한 것입니다.\"\n\n#: src/cargo/test.md:27\nmsgid \"\"\n\"The [Testing](../testing.md) chapter elaborates on the three different \"\n\"testing styles: [Unit](../testing/unit_testing.md), [Doc](../testing/\"\n\"doc_testing.md), and [Integration](../testing/integration_testing.md).\"\nmsgstr \"\"\n\"[테스트](../testing.md) 장에서는 [유닛(Unit)](../testing/unit_testing.md), \"\n\"[문서(Doc)](../testing/doc_testing.md), [통합(Integration)](../testing/\"\n\"integration_testing.md)의 세 가지 테스트 스타일에 대해 자세히 설명합니다.\"\n\n#: src/cargo/test.md:30\nmsgid \"`cargo` naturally provides an easy way to run all of your tests!\"\nmsgstr \"`cargo`는 당연히 모든 테스트를 실행할 수 있는 쉬운 방법을 제공합니다!\"\n\n#: src/cargo/test.md:36\nmsgid \"You should see output like this:\"\nmsgstr \"다음과 같은 출력을 볼 수 있을 것입니다:\"\n\n#: src/cargo/test.md:38\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"``````shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\n\n#: src/cargo/test.md:53\nmsgid \"You can also run tests whose name matches a pattern:\"\nmsgstr \"이름이 패턴과 일치하는 테스트만 실행할 수도 있습니다:\"\n\n#: src/cargo/test.md:59\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\n\n#: src/cargo/test.md:72\nmsgid \"\"\n\"One word of caution: Cargo may run multiple tests concurrently, so make sure \"\n\"that they don't race with each other.\"\nmsgstr \"\"\n\"한 가지 주의할 점: Cargo는 여러 테스트를 동시에 실행할 수 있으므로 서로 경쟁\"\n\"(race)하지 않도록 확인해야 합니다.\"\n\n#: src/cargo/test.md:75\nmsgid \"\"\n\"One example of this concurrency causing issues is if two tests output to a \"\n\"file, such as below:\"\nmsgstr \"\"\n\"이러한 동시성이 문제를 일으키는 한 가지 예는 아래와 같이 두 테스트가 하나의 \"\n\"파일에 출력하는 경우입니다:\"\n\n#: src/cargo/test.md:81\nmsgid \"// Import the necessary modules\\n\"\nmsgstr \"// 필요한 모듈 가져오기\\n\"\n\n#: src/cargo/test.md:85\nmsgid \"// This test writes to a file\\n\"\nmsgstr \"// 이 테스트는 파일에 씁니다\\n\"\n\n#: src/cargo/test.md:88 src/cargo/test.md:105\nmsgid \"// Opens the file ferris.txt or creates one if it doesn't exist.\\n\"\nmsgstr \"// ferris.txt 파일을 열거나 없으면 생성합니다.\\n\"\n\n#: src/cargo/test.md:92 src/cargo/test.md:109\nmsgid \"\\\"ferris.txt\\\"\"\nmsgstr \"\\\"ferris.txt\\\"\"\n\n#: src/cargo/test.md:93 src/cargo/test.md:110\nmsgid \"\\\"Failed to open ferris.txt\\\"\"\nmsgstr \"\\\"ferris.txt를 여는 데 실패했습니다\\\"\"\n\n#: src/cargo/test.md:95\nmsgid \"// Print \\\"Ferris\\\" 5 times.\\n\"\nmsgstr \"// \\\"Ferris\\\"를 5번 출력합니다.\\n\"\n\n#: src/cargo/test.md:97\nmsgid \"\\\"Ferris\\\\n\\\"\"\nmsgstr \"\\\"Ferris\\\\n\\\"\"\n\n#: src/cargo/test.md:98 src/cargo/test.md:115\nmsgid \"\\\"Could not write to ferris.txt\\\"\"\nmsgstr \"\\\"ferris.txt에 쓸 수 없습니다\\\"\"\n\n#: src/cargo/test.md:102\nmsgid \"// This test tries to write to the same file\\n\"\nmsgstr \"// 이 테스트는 동일한 파일에 쓰기를 시도합니다\\n\"\n\n#: src/cargo/test.md:112\nmsgid \"// Print \\\"Corro\\\" 5 times.\\n\"\nmsgstr \"// \\\"Corro\\\"를 5번 출력합니다.\\n\"\n\n#: src/cargo/test.md:114\nmsgid \"\\\"Corro\\\\n\\\"\"\nmsgstr \"\\\"Corro\\\\n\\\"\"\n\n#: src/cargo/test.md:121\nmsgid \"Although the intent is to get the following:\"\nmsgstr \"의도는 다음과 같은 결과를 얻는 것이었지만:\"\n\n#: src/cargo/test.md:137\nmsgid \"What actually gets put into `ferris.txt` is this:\"\nmsgstr \"`ferris.txt`에 실제로 기록된 내용은 다음과 같습니다:\"\n\n#: src/cargo/build_scripts.md:3\nmsgid \"\"\n\"Sometimes a normal build from `cargo` is not enough. Perhaps your crate \"\n\"needs some pre-requisites before `cargo` will successfully compile, things \"\n\"like code generation, or some native code that needs to be compiled. To \"\n\"solve this problem we have build scripts that Cargo can run.\"\nmsgstr \"\"\n\"`cargo`의 일반적인 빌드만으로는 충분하지 않은 경우가 있습니다. 코드 생성이나 \"\n\"컴파일되어야 하는 네이티브 코드와 같이 `cargo`가 성공적으로 컴파일되기 전에 \"\n\"크레이트가 필요로 하는 전제 조건이 있을 수 있습니다. 이 문제를 해결하기 위해 \"\n\"Cargo가 실행할 수 있는 빌드 스크립트가 있습니다.\"\n\n#: src/cargo/build_scripts.md:8\nmsgid \"\"\n\"To add a build script to your package it can either be specified in the \"\n\"`Cargo.toml` as follows:\"\nmsgstr \"\"\n\"패키지에 빌드 스크립트를 추가하려면 다음과 같이 `Cargo.toml`에 지정할 수 있습\"\n\"니다:\"\n\n#: src/cargo/build_scripts.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\n\n#: src/cargo/build_scripts.md:17\nmsgid \"\"\n\"Otherwise Cargo will look for a `build.rs` file in the project directory by \"\n\"default.\"\nmsgstr \"\"\n\"그렇지 않으면 Cargo는 기본적으로 프로젝트 디렉토리에서 `build.rs` 파일을 찾습\"\n\"니다.\"\n\n#: src/cargo/build_scripts.md:20\nmsgid \"How to use a build script\"\nmsgstr \"빌드 스크립트 사용 방법\"\n\n#: src/cargo/build_scripts.md:22\nmsgid \"\"\n\"The build script is simply another Rust file that will be compiled and \"\n\"invoked prior to compiling anything else in the package. Hence it can be \"\n\"used to fulfill pre-requisites of your crate.\"\nmsgstr \"\"\n\"빌드 스크립트는 단순히 또 다른 Rust 파일로, 패키지의 다른 어떤 것을 컴파일하\"\n\"기 전에 먼저 컴파일되고 호출됩니다. 따라서 크레이트의 전제 조건을 충족시키는 \"\n\"데 사용할 수 있습니다.\"\n\n#: src/cargo/build_scripts.md:26\nmsgid \"\"\n\"Cargo provides the script with inputs via environment variables [specified \"\n\"here](https://doc.rust-lang.org/cargo/reference/environment-\"\n\"variables.html#environment-variables-cargo-sets-for-build-scripts) that can \"\n\"be used.\"\nmsgstr \"\"\n\"Cargo는 스크립트에서 사용할 수 있는 환경 변수([여기에 명시됨](https://\"\n\"doc.rust-lang.org/cargo/reference/environment-variables.html#environment-\"\n\"variables-cargo-sets-for-build-scripts))를 통해 입력을 제공합니다.\"\n\n#: src/cargo/build_scripts.md:29\nmsgid \"\"\n\"The script provides output via stdout. All lines printed are written to \"\n\"`target/debug/build/<pkg>/output`. Further, lines prefixed with `cargo:` \"\n\"will be interpreted by Cargo directly and hence can be used to define \"\n\"parameters for the package's compilation.\"\nmsgstr \"\"\n\"스크립트는 stdout을 통해 출력을 제공합니다. 출력된 모든 줄은 `target/debug/\"\n\"build/<pkg>/output`에 기록됩니다. 또한, `cargo:`로 시작하는 줄은 Cargo에 의\"\n\"해 직접 해석되어 패키지 컴파일을 위한 매개변수를 정의하는 데 사용될 수 있습니\"\n\"다.\"\n\n#: src/cargo/build_scripts.md:34\nmsgid \"\"\n\"For further specification and examples have a read of the [Cargo \"\n\"specification](https://doc.rust-lang.org/cargo/reference/build-scripts.html).\"\nmsgstr \"\"\n\"추가적인 사양과 예제는 [Cargo 사양서](https://doc.rust-lang.org/cargo/\"\n\"reference/build-scripts.html)를 읽어보세요.\"\n\n#: src/attribute.md:3\nmsgid \"\"\n\"An attribute is metadata applied to some module, crate or item. This \"\n\"metadata can be used to/for:\"\nmsgstr \"\"\n\"속성(attribute)은 모듈, 크레이트 또는 아이템에 적용되는 메타데이터입니다. 이 \"\n\"메타데이터는 다음과 같은 용도로 사용될 수 있습니다:\"\n\n#: src/attribute.md:8\nmsgid \"[conditional compilation of code](attribute/cfg.md)\"\nmsgstr \"코드의 [조건부 컴파일](attribute/cfg.md)\"\n\n#: src/attribute.md:9\nmsgid \"\"\n\"[set crate name, version and type (binary or library)](attribute/crate.md)\"\nmsgstr \"\"\n\"[크레이트 이름, 버전 및 유형(바이너리 또는 라이브러리) 설정](attribute/\"\n\"crate.md)\"\n\n#: src/attribute.md:10\nmsgid \"\"\n\"disable [lints](https://en.wikipedia.org/wiki/Lint_%28software%29) (warnings)\"\nmsgstr \"\"\n\"[린트(lints)](https://en.wikipedia.org/wiki/Lint_%28software%29) (경고) 비활\"\n\"성화\"\n\n#: src/attribute.md:11\nmsgid \"enable compiler features (macros, glob imports, etc.)\"\nmsgstr \"컴파일러 기능(매크로, glob 임포트 등) 활성화\"\n\n#: src/attribute.md:12\nmsgid \"link to a foreign library\"\nmsgstr \"외부 라이브러리 링크\"\n\n#: src/attribute.md:13\nmsgid \"mark functions as unit tests\"\nmsgstr \"함수를 유닛 테스트로 표시\"\n\n#: src/attribute.md:14\nmsgid \"mark functions that will be part of a benchmark\"\nmsgstr \"벤치마크의 일부가 될 함수 표시\"\n\n#: src/attribute.md:15\nmsgid \"\"\n\"[attribute like macros](https://doc.rust-lang.org/book/ch19-06-\"\n\"macros.html#attribute-like-macros)\"\nmsgstr \"\"\n\"[속성형 매크로](https://doc.rust-lang.org/book/ch19-06-macros.html#attribute-\"\n\"like-macros)\"\n\n#: src/attribute.md:17\nmsgid \"\"\n\"Attributes look like `#[outer_attribute]` or `#![inner_attribute]`, with the \"\n\"difference between them being where they apply.\"\nmsgstr \"\"\n\"속성은 `#[outer_attribute]` 또는 `#![inner_attribute]`와 같은 형태를 띠며, \"\n\"이 둘의 차이점은 적용되는 위치에 있습니다.\"\n\n#: src/attribute.md:20\nmsgid \"\"\n\"`#[outer_attribute]` applies to the [item](https://doc.rust-lang.org/stable/\"\n\"reference/items.html) immediately following it. Some examples of items are: \"\n\"a function, a module declaration, a constant, a structure, an enum. Here is \"\n\"an example where attribute `#[derive(Debug)]` applies to the struct \"\n\"`Rectangle`:\"\nmsgstr \"\"\n\"`#[outer_attribute]`는 바로 뒤에 오는 [아이템](https://doc.rust-lang.org/\"\n\"stable/reference/items.html)에 적용됩니다. 아이템의 예로는 함수, 모듈 선언, \"\n\"상수, 구조체, 열거형 등이 있습니다. 다음은 `#[derive(Debug)]` 속성이 \"\n\"`Rectangle` 구조체에 적용된 예시입니다:\"\n\n#: src/attribute.md:34\nmsgid \"\"\n\"`#![inner_attribute]` applies to the enclosing [item](https://doc.rust-\"\n\"lang.org/stable/reference/items.html) (typically a module or a crate). In \"\n\"other words, this attribute is interpreted as applying to the entire scope \"\n\"in which it's placed. Here is an example where `#![allow(unused_variables)]` \"\n\"applies to the whole crate (if placed in `main.rs`):\"\nmsgstr \"\"\n\"`#![inner_attribute]`는 자신을 감싸고 있는 [아이템](https://doc.rust-\"\n\"lang.org/stable/reference/items.html) (주로 모듈이나 크레이트)에 적용됩니다. \"\n\"다시 말해, 이 속성은 자신이 위치한 전체 스코프에 적용되는 것으로 해석됩니다. \"\n\"다음은 `#![allow(unused_variables)]`가 (`main.rs`에 위치할 경우) 전체 크레이\"\n\"트에 적용되는 예시입니다:\"\n\n#: src/attribute.md:44\nmsgid \"// This would normally warn about an unused variable.\\n\"\nmsgstr \"// 이것은 보통 사용되지 않는 변수에 대해 경고합니다.\\n\"\n\n#: src/attribute.md:48\nmsgid \"Attributes can take arguments with different syntaxes:\"\nmsgstr \"속성은 다양한 문법으로 인자를 받을 수 있습니다:\"\n\n#: src/attribute.md:50\nmsgid \"`#[attribute = \\\"value\\\"]`\"\nmsgstr \"`#[attribute = \\\"value\\\"]`\"\n\n#: src/attribute.md:51\nmsgid \"`#[attribute(key = \\\"value\\\")]`\"\nmsgstr \"`#[attribute(key = \\\"value\\\")]`\"\n\n#: src/attribute.md:52\nmsgid \"`#[attribute(value)]`\"\nmsgstr \"`#[attribute(value)]`\"\n\n#: src/attribute.md:54\nmsgid \"\"\n\"Attributes can have multiple values and can be separated over multiple \"\n\"lines, too:\"\nmsgstr \"속성은 여러 값을 가질 수 있으며 여러 줄에 걸쳐 분리될 수도 있습니다:\"\n\n#: src/attribute/unused.md:3\nmsgid \"\"\n\"The compiler provides a `dead_code` [_lint_](https://en.wikipedia.org/wiki/\"\n\"Lint_%28software%29) that will warn about unused functions. An _attribute_ \"\n\"can be used to disable the lint.\"\nmsgstr \"\"\n\"컴파일러는 사용되지 않는 함수에 대해 경고하는 `dead_code` [_린트(lint)_]\"\n\"(https://en.wikipedia.org/wiki/Lint_%28software%29)를 제공합니다. _속성_을 사\"\n\"용하여 이 린트를 비활성화할 수 있습니다.\"\n\n#: src/attribute/unused.md:9\nmsgid \"\"\n\"// `#[allow(dead_code)]` is an attribute that disables the `dead_code` lint\\n\"\nmsgstr \"\"\n\"// `#[allow(dead_code)]`는 `dead_code` 린트를 비활성화하는 속성입니다\\n\"\n\n#: src/attribute/unused.md:14\nmsgid \"// FIXME ^ Add an attribute to suppress the warning\\n\"\nmsgstr \"// FIXME ^ 경고를 억제하기 위해 속성을 추가하세요\\n\"\n\n#: src/attribute/unused.md:22\nmsgid \"\"\n\"Note that in real programs, you should eliminate dead code. In these \"\n\"examples we'll allow dead code in some places because of the interactive \"\n\"nature of the examples.\"\nmsgstr \"\"\n\"실제 프로그램에서는 죽은 코드를 제거해야 합니다. 이 예제들에서는 예제의 대화\"\n\"형 특성 때문에 일부 장소에서 죽은 코드를 허용할 것입니다.\"\n\n#: src/attribute/crate.md:3\nmsgid \"\"\n\"The `crate_type` attribute can be used to tell the compiler whether a crate \"\n\"is a binary or a library (and even which type of library), and the \"\n\"`crate_name` attribute can be used to set the name of the crate.\"\nmsgstr \"\"\n\"`crate_type` 속성은 크레이트가 바이너리인지 라이브러리인지(심지어 어떤 종류\"\n\"의 라이브러리인지) 컴파일러에게 알려주는 데 사용될 수 있으며, `crate_name` 속\"\n\"성은 크레이트의 이름을 설정하는 데 사용될 수 있습니다.\"\n\n#: src/attribute/crate.md:7\nmsgid \"\"\n\"However, it is important to note that both the `crate_type` and `crate_name` \"\n\"attributes have **no** effect whatsoever when using Cargo, the Rust package \"\n\"manager. Since Cargo is used for the majority of Rust projects, this means \"\n\"real-world uses of `crate_type` and `crate_name` are relatively limited.\"\nmsgstr \"\"\n\"하지만 Rust 패키지 관리자인 Cargo를 사용할 때는 `crate_type`과 `crate_name` \"\n\"속성 모두 **아무런** 효과가 없다는 점에 유의해야 합니다. 대다수의 Rust 프로젝\"\n\"트가 Cargo를 사용하므로, `crate_type`과 `crate_name`의 실제 사용은 상대적으\"\n\"로 제한적입니다.\"\n\n#: src/attribute/crate.md:13\nmsgid \"// This crate is a library\\n\"\nmsgstr \"// 이 크레이트는 라이브러리입니다\\n\"\n\n#: src/attribute/crate.md:14\nmsgid \"\\\"lib\\\"\"\nmsgstr \"\\\"lib\\\"\"\n\n#: src/attribute/crate.md:14\nmsgid \"// The library is named \\\"rary\\\"\\n\"\nmsgstr \"// 라이브러리 이름은 \\\"rary\\\"입니다\\n\"\n\n#: src/attribute/crate.md:16\nmsgid \"\\\"rary\\\"\"\nmsgstr \"\\\"rary\\\"\"\n\n#: src/attribute/crate.md:33\nmsgid \"\"\n\"When the `crate_type` attribute is used, we no longer need to pass the `--\"\n\"crate-type` flag to `rustc`.\"\nmsgstr \"\"\n\"`crate_type` 속성이 사용되면, 더 이상 `rustc`에 `--crate-type` 플래그를 전달\"\n\"할 필요가 없습니다.\"\n\n#: src/attribute/cfg.md:3\nmsgid \"\"\n\"Configuration conditional checks are possible through two different \"\n\"operators:\"\nmsgstr \"설정 조건 검사는 두 가지 다른 연산자를 통해 가능합니다:\"\n\n#: src/attribute/cfg.md:5\nmsgid \"the `cfg` attribute: `#[cfg(...)]` in attribute position\"\nmsgstr \"`cfg` 속성: 속성 위치에서의 `#[cfg(...)]`\"\n\n#: src/attribute/cfg.md:6\nmsgid \"the `cfg!` macro: `cfg!(...)` in boolean expressions\"\nmsgstr \"`cfg!` 매크로: 불리언 표현식에서의 `cfg!(...)`\"\n\n#: src/attribute/cfg.md:8\nmsgid \"\"\n\"While the former enables conditional compilation, the latter conditionally \"\n\"evaluates to `true` or `false` literals allowing for checks at run-time. \"\n\"Both utilize identical argument syntax.\"\nmsgstr \"\"\n\"전자는 조건부 컴파일을 가능하게 하는 반면, 후자는 조건부로 `true` 또는 \"\n\"`false` 리터럴로 평가되어 런타임에 검사를 가능하게 합니다. 둘 다 동일한 인자 \"\n\"문법을 사용합니다.\"\n\n#: src/attribute/cfg.md:12\nmsgid \"\"\n\"`cfg!`, unlike `#[cfg]`, does not remove any code and only evaluates to true \"\n\"or false. For example, all blocks in an if/else expression need to be valid \"\n\"when `cfg!` is used for the condition, regardless of what `cfg!` is \"\n\"evaluating.\"\nmsgstr \"\"\n\"`cfg!`는 `#[cfg]`와 달리 코드를 제거하지 않으며 오직 참 또는 거짓으로만 평가\"\n\"됩니다. 예를 들어 `cfg!`가 조건으로 사용될 때, `cfg!`가 무엇으로 평가되든 상\"\n\"관없이 if/else 표현식의 모든 블록은 유효해야 합니다.\"\n\n#: src/attribute/cfg.md:15\nmsgid \"// This function only gets compiled if the target OS is linux\\n\"\nmsgstr \"// 이 함수는 대상 OS가 리눅스인 경우에만 컴파일됩니다\\n\"\n\n#: src/attribute/cfg.md:16 src/attribute/cfg.md:22 src/attribute/cfg.md:31\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\\\"linux\\\"\"\n\n#: src/attribute/cfg.md:18\nmsgid \"\\\"You are running linux!\\\"\"\nmsgstr \"\\\"당신은 리눅스를 사용하고 있습니다!\\\"\"\n\n#: src/attribute/cfg.md:20\nmsgid \"\"\n\"// And this function only gets compiled if the target OS is *not* linux\\n\"\nmsgstr \"// 그리고 이 함수는 타겟 OS가 리눅스가 *아닌* 경우에만 컴파일됩니다.\\n\"\n\n#: src/attribute/cfg.md:24\nmsgid \"\\\"You are *not* running linux!\\\"\"\nmsgstr \"\\\"당신은 리눅스를 사용하고 있지 *않습니다*!\\\"\"\n\n#: src/attribute/cfg.md:30\nmsgid \"\\\"Are you sure?\\\"\"\nmsgstr \"\\\"확실한가요?\\\"\"\n\n#: src/attribute/cfg.md:32\nmsgid \"\\\"Yes. It's definitely linux!\\\"\"\nmsgstr \"\\\"네. 확실히 리눅스입니다!\\\"\"\n\n#: src/attribute/cfg.md:34\nmsgid \"\\\"Yes. It's definitely *not* linux!\\\"\"\nmsgstr \"\\\"네. 확실히 리눅스가 *아닙니다*!\\\"\"\n\n#: src/attribute/cfg.md:41\nmsgid \"\"\n\"[the reference](https://doc.rust-lang.org/reference/\"\n\"attributes.html#conditional-compilation), [`cfg!`](https://doc.rust-lang.org/\"\n\"std/macro.cfg!.html), and [macros](../macros.md).\"\nmsgstr \"\"\n\"[참조](https://doc.rust-lang.org/reference/\"\n\"attributes.html#conditional-compilation), [`cfg!`](https://doc.rust-lang.org/\"\n\"std/macro.cfg!.html), 그리고 [매크로](../macros.md).\"\n\n#: src/attribute/cfg/custom.md:3\nmsgid \"\"\n\"Some conditionals like `target_os` are implicitly provided by `rustc`, but \"\n\"custom conditionals must be passed to `rustc` using the `--cfg` flag.\"\nmsgstr \"\"\n\"`target_os`와 같은 일부 조건은 `rustc`에 의해 암시적으로 제공되지만, 사용자 \"\n\"정의 조건은 `--cfg` 플래그를 사용하여 `rustc`에 전달되어야 합니다.\"\n\n#: src/attribute/cfg/custom.md:9\nmsgid \"\\\"condition met!\\\"\"\nmsgstr \"\\\"조건 충족!\\\"\"\n\n#: src/attribute/cfg/custom.md:17\nmsgid \"Try to run this to see what happens without the custom `cfg` flag.\"\nmsgstr \"사용자 정의 `cfg` 플래그 없이 실행하면 어떻게 되는지 확인해 보세요.\"\n\n#: src/attribute/cfg/custom.md:19\nmsgid \"With the custom `cfg` flag:\"\nmsgstr \"사용자 정의 `cfg` 플래그 사용 시:\"\n\n#: src/generics.md:3\nmsgid \"\"\n\"_Generics_ is the topic of generalizing types and functionalities to broader \"\n\"cases. This is extremely useful for reducing code duplication in many ways, \"\n\"but can call for rather involved syntax. Namely, being generic requires \"\n\"taking great care to specify over which types a generic type is actually \"\n\"considered valid. The simplest and most common use of generics is for type \"\n\"parameters.\"\nmsgstr \"\"\n\"_제네릭(Generics)_은 타입과 기능을 더 넓은 케이스로 일반화하는 주제입니다. 이\"\n\"는 여러 면에서 코드 중복을 줄이는 데 매우 유용하지만, 다소 복잡한 문법을 요\"\n\"구할 수 있습니다. 즉, 제네릭이 되려면 제네릭 타입이 실제로 유효한 것으로 간주\"\n\"되는 타입을 지정하는 데 세심한 주의가 필요합니다. 제네릭의 가장 간단하고 흔\"\n\"한 용도는 타입 파라미터입니다.\"\n\n#: src/generics.md:10\nmsgid \"\"\n\"A type parameter is specified as generic by the use of angle brackets and \"\n\"upper [camel case](https://en.wikipedia.org/wiki/CamelCase): `<Aaa, \"\n\"Bbb, ...>`. \\\"Generic type parameters\\\" are typically represented as `<T>`. \"\n\"In Rust, \\\"generic\\\" also describes anything that accepts one or more \"\n\"generic type parameters `<T>`. Any type specified as a generic type \"\n\"parameter is generic, and everything else is concrete (non-generic).\"\nmsgstr \"\"\n\"타입 파라미터는 꺾쇠 괄호와 대문자 [카멜 케이스](https://en.wikipedia.org/\"\n\"wiki/CamelCase)를 사용하여 제네릭으로 지정됩니다: `<Aaa, Bbb, ...>`. \\\"제네\"\n\"릭 타입 파라미터\\\"는 일반적으로 `<T>`로 표현됩니다. Rust에서 \\\"제네릭\\\"은 하\"\n\"나 이상의 제네릭 타입 파라미터 `<T>`를 허용하는 모든 것을 설명하기도 합니다. \"\n\"제네릭 타입 파라미터로 지정된 모든 타입은 제네릭이며, 그 외의 모든 것은 구체\"\n\"적(비-제네릭)입니다.\"\n\n#: src/generics.md:16\nmsgid \"\"\n\"For example, defining a _generic function_ named `foo` that takes an \"\n\"argument `T` of any type:\"\nmsgstr \"\"\n\"예를 들어, 모든 타입의 인자 `T`를 취하는 `foo`라는 이름의 _제네릭 함수_를 정\"\n\"의하면 다음과 같습니다:\"\n\n#: src/generics.md:23\nmsgid \"\"\n\"Because `T` has been specified as a generic type parameter using `<T>`, it \"\n\"is considered generic when used here as `(arg: T)`. This is the case even if \"\n\"`T` has previously been defined as a `struct`.\"\nmsgstr \"\"\n\"`T`가 `<T>`를 사용하여 제네릭 타입 파라미터로 지정되었으므로, 여기서 `(arg: \"\n\"T)`와 같이 사용될 때 제네릭으로 간주됩니다. 이는 `T`가 이전에 `struct`로 정의\"\n\"되었더라도 마찬가지입니다.\"\n\n#: src/generics.md:27\nmsgid \"This example shows some of the syntax in action:\"\nmsgstr \"이 예제는 실제 작동하는 문법의 일부를 보여줍니다:\"\n\n#: src/generics.md:30\nmsgid \"// A concrete type `A`.\\n\"\nmsgstr \"// 구체적인 타입 `A`.\\n\"\n\n#: src/generics.md:32\nmsgid \"\"\n\"// In defining the type `Single`, the first use of `A` is not preceded by \"\n\"`<A>`.\\n\"\n\"// Therefore, `Single` is a concrete type, and `A` is defined as above.\\n\"\nmsgstr \"\"\n\"// `Single` 타입을 정의할 때, `A`의 첫 사용 앞에 `<A>`가 붙지 않습니다.\\n\"\n\"// 따라서 `Single`은 구체적인 타입이며, `A`는 위에서 정의된 대로입니다.\\n\"\n\n#: src/generics.md:35\nmsgid \"//            ^ Here is `Single`s first use of the type `A`.\\n\"\nmsgstr \"//            ^ 여기서 `Single`이 처음으로 `A` 타입을 사용합니다.\\n\"\n\n#: src/generics.md:37\nmsgid \"\"\n\"// Here, `<T>` precedes the first use of `T`, so `SingleGen` is a generic \"\n\"type.\\n\"\n\"// Because the type parameter `T` is generic, it could be anything, \"\n\"including\\n\"\n\"// the concrete type `A` defined at the top.\\n\"\nmsgstr \"\"\n\"// 여기서 `<T>`가 `T`의 첫 사용 앞에 오므로, `SingleGen`은 제네릭 타입입니\"\n\"다.\\n\"\n\"// 타입 파라미터 `T`는 제네릭이므로, 상단에서 정의된 구체적인 타입 `A`를 포함\"\n\"하여\\n\"\n\"// 무엇이든 될 수 있습니다.\\n\"\n\n#: src/generics.md:44\nmsgid \"// `Single` is concrete and explicitly takes `A`.\\n\"\nmsgstr \"// `Single`은 구체적이며 명시적으로 `A`를 취합니다.\\n\"\n\n#: src/generics.md:47\nmsgid \"\"\n\"// Create a variable `_char` of type `SingleGen<char>`\\n\"\n\"    // and give it the value `SingleGen('a')`.\\n\"\n\"    // Here, `SingleGen` has a type parameter explicitly specified.\\n\"\nmsgstr \"\"\n\"// `SingleGen<char>` 타입의 변수 `_char`를 생성하고\\n\"\n\"    // `SingleGen('a')` 값을 줍니다.\\n\"\n\"    // 여기서 `SingleGen`은 타입 파라미터가 명시적으로 지정되었습니다.\\n\"\n\n#: src/generics.md:52\nmsgid \"// `SingleGen` can also have a type parameter implicitly specified:\\n\"\nmsgstr \"// `SingleGen`은 타입 파라미터를 암시적으로 지정할 수도 있습니다:\\n\"\n\n#: src/generics.md:53\nmsgid \"// Uses `A` defined at the top.\\n\"\nmsgstr \"// 상단에서 정의된 `A`를 사용합니다.\\n\"\n\n#: src/generics.md:54\nmsgid \"// Uses `i32`.\\n\"\nmsgstr \"// `i32`를 사용합니다.\\n\"\n\n#: src/generics.md:55\nmsgid \"// Uses `char`.\\n\"\nmsgstr \"// `char`를 사용합니다.\\n\"\n\n#: src/generics.md:61\nmsgid \"[`structs`](custom_types/structs.md)\"\nmsgstr \"[`구조체`](custom_types/structs.md)\"\n\n#: src/generics/gen_fn.md:3\nmsgid \"\"\n\"The same set of rules can be applied to functions: a type `T` becomes \"\n\"generic when preceded by `<T>`.\"\nmsgstr \"\"\n\"함수에도 동일한 규칙이 적용될 수 있습니다: 타입 `T` 앞에 `<T>`가 붙으면 제네\"\n\"릭이 됩니다.\"\n\n#: src/generics/gen_fn.md:6\nmsgid \"\"\n\"Using generic functions sometimes requires explicitly specifying type \"\n\"parameters. This may be the case if the function is called where the return \"\n\"type is generic, or if the compiler doesn't have enough information to infer \"\n\"the necessary type parameters.\"\nmsgstr \"\"\n\"제네릭 함수를 사용할 때 때로는 타입 파라미터를 명시적으로 지정해야 할 필요가 \"\n\"있습니다. 반환 타입이 제네릭인 곳에서 함수가 호출되거나, 컴파일러가 필요한 타\"\n\"입 파라미터를 추론하기에 충분한 정보를 가지고 있지 않은 경우가 이에 해당할 \"\n\"수 있습니다.\"\n\n#: src/generics/gen_fn.md:11\nmsgid \"\"\n\"A function call with explicitly specified type parameters looks like: `fun::\"\n\"<A, B, ...>()`.\"\nmsgstr \"\"\n\"명시적으로 지정된 타입 파라미터를 사용한 함수 호출은 다음과 같습니다: `fun::\"\n\"<A, B, ...>()`.\"\n\n#: src/generics/gen_fn.md:15\nmsgid \"// Concrete type `A`.\\n\"\nmsgstr \"// 구체적인 타입 `A`.\\n\"\n\n#: src/generics/gen_fn.md:16\nmsgid \"// Concrete type `S`.\\n\"\nmsgstr \"// 구체적인 타입 `S`.\\n\"\n\n#: src/generics/gen_fn.md:17\nmsgid \"// Generic type `SGen`.\\n\"\nmsgstr \"// 제네릭 타입 `SGen`.\\n\"\n\n#: src/generics/gen_fn.md:18\nmsgid \"\"\n\"// The following functions all take ownership of the variable passed into\\n\"\n\"// them and immediately go out of scope, freeing the variable.\\n\"\nmsgstr \"\"\n\"// 다음 함수들은 모두 전달된 변수의 소유권을 가져가며,\\n\"\n\"// 즉시 스코프를 벗어나 변수를 해제합니다.\\n\"\n\n#: src/generics/gen_fn.md:21\nmsgid \"\"\n\"// Define a function `reg_fn` that takes an argument `_s` of type `S`.\\n\"\n\"// This has no `<T>` so this is not a generic function.\\n\"\nmsgstr \"\"\n\"// `S` 타입의 인자 `_s`를 받는 `reg_fn` 함수를 정의합니다.\\n\"\n\"// `<T>`가 없으므로 이것은 제네릭 함수가 아닙니다.\\n\"\n\n#: src/generics/gen_fn.md:25\nmsgid \"\"\n\"// Define a function `gen_spec_t` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// It has been explicitly given the type parameter `A`, but because `A` has \"\n\"not\\n\"\n\"// been specified as a generic type parameter for `gen_spec_t`, it is not \"\n\"generic.\\n\"\nmsgstr \"\"\n\"// `SGen<T>` 타입의 인자 `_s`를 받는 `gen_spec_t` 함수를 정의합니다.\\n\"\n\"// 타입 파라미터 `A`가 명시적으로 주어졌지만, `A`가 `gen_spec_t`의\\n\"\n\"// 제네릭 타입 파라미터로 지정되지 않았으므로, 이것은 제네릭이 아닙니다.\\n\"\n\n#: src/generics/gen_fn.md:30\nmsgid \"\"\n\"// Define a function `gen_spec_i32` that takes an argument `_s` of type \"\n\"`SGen<i32>`.\\n\"\n\"// It has been explicitly given the type parameter `i32`, which is a \"\n\"specific type.\\n\"\n\"// Because `i32` is not a generic type, this function is also not generic.\\n\"\nmsgstr \"\"\n\"// `SGen<i32>` 타입의 인자 `_s`를 받는 `gen_spec_i32` 함수를 정의합니다.\\n\"\n\"// 구체적인 타입인 `i32`가 타입 파라미터로 명시적으로 주어졌습니다.\\n\"\n\"// `i32`는 제네릭 타입이 아니므로, 이 함수 또한 제네릭이 아닙니다.\\n\"\n\n#: src/generics/gen_fn.md:35\nmsgid \"\"\n\"// Define a function `generic` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// Because `SGen<T>` is preceded by `<T>`, this function is generic over \"\n\"`T`.\\n\"\nmsgstr \"\"\n\"// `SGen<T>` 타입의 인자 `_s`를 받는 `generic` 함수를 정의합니다.\\n\"\n\"// `SGen<T>` 앞에 `<T>`가 오기 때문에, 이 함수는 `T`에 대해 제네릭입니다.\\n\"\n\n#: src/generics/gen_fn.md:41\nmsgid \"// Using the non-generic functions\\n\"\nmsgstr \"// 제네릭이 아닌 함수들 사용\\n\"\n\n#: src/generics/gen_fn.md:42\nmsgid \"// Concrete type.\\n\"\nmsgstr \"// 구체적인 타입.\\n\"\n\n#: src/generics/gen_fn.md:43\nmsgid \"// Implicitly specified type parameter `A`.\\n\"\nmsgstr \"// 암시적으로 지정된 타입 파라미터 `A`.\\n\"\n\n#: src/generics/gen_fn.md:44\nmsgid \"// Implicitly specified type parameter `i32`.\\n\"\nmsgstr \"// 암시적으로 지정된 타입 파라미터 `i32`.\\n\"\n\n#: src/generics/gen_fn.md:46\nmsgid \"// Explicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"// `generic()`에 명시적으로 지정된 타입 파라미터 `char`.\\n\"\n\n#: src/generics/gen_fn.md:49\nmsgid \"// Implicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"// `generic()`에 암시적으로 지정된 타입 파라미터 `char`.\\n\"\n\n#: src/generics/gen_fn.md:50\nmsgid \"'c'\"\nmsgstr \"'c'\"\n\n#: src/generics/gen_fn.md:56\nmsgid \"[functions](../fn.md) and [`struct`s](../custom_types/structs.md)\"\nmsgstr \"[함수](../fn.md)와 [`struct`](../custom_types/structs.md)\"\n\n#: src/generics/impl.md:3\nmsgid \"Similar to functions, implementations require care to remain generic.\"\nmsgstr \"\"\n\"함수와 마찬가지로, 구현(implementation)도 제네릭을 유지하기 위해 주의가 필요\"\n\"합니다.\"\n\n#: src/generics/impl.md:6\nmsgid \"// Concrete type `S`\\n\"\nmsgstr \"// 구체적인 타입 `S`\\n\"\n\n#: src/generics/impl.md:7\nmsgid \"// Generic type `GenericVal`\\n\"\nmsgstr \"// 제네릭 타입 `GenericVal`\\n\"\n\n#: src/generics/impl.md:8\nmsgid \"// impl of GenericVal where we explicitly specify type parameters:\\n\"\nmsgstr \"// 타입 파라미터를 명시적으로 지정한 GenericVal의 구현:\\n\"\n\n#: src/generics/impl.md:10\nmsgid \"// Specify `f32`\\n\"\nmsgstr \"// `f32` 지정\\n\"\n\n#: src/generics/impl.md:11\nmsgid \"// Specify `S` as defined above\\n\"\nmsgstr \"// 위에서 정의한 `S` 지정\\n\"\n\n#: src/generics/impl.md:12\nmsgid \"// `<T>` Must precede the type to remain generic\\n\"\nmsgstr \"// 제네릭을 유지하려면 `<T>`가 타입 앞에 와야 합니다\\n\"\n\n#: src/generics/impl.md:25\nmsgid \"// impl of Val\\n\"\nmsgstr \"// Val 구현\\n\"\n\n#: src/generics/impl.md:32\nmsgid \"// impl of GenVal for a generic type `T`\\n\"\nmsgstr \"// 제네릭 타입 `T`에 대한 GenVal 구현\\n\"\n\n#: src/generics/impl.md:50\nmsgid \"\"\n\"[functions returning references](../scope/lifetime/fn.md), [`impl`](../fn/\"\n\"methods.md), and [`struct`](../custom_types/structs.md)\"\nmsgstr \"\"\n\"[참조를 반환하는 함수](../scope/lifetime/fn.md), [`impl`](../fn/methods.md), \"\n\"그리고 [`struct`](../custom_types/structs.md)\"\n\n#: src/generics/gen_trait.md:3\nmsgid \"\"\n\"Of course `trait`s can also be generic. Here we define one which \"\n\"reimplements the `Drop` `trait` as a generic method to `drop` itself and an \"\n\"input.\"\nmsgstr \"\"\n\"물론 `trait`도 제네릭일 수 있습니다. 여기서는 `Drop` `트레이트`를 자신과 입력\"\n\"을 `drop`하는 제네릭 메서드로 재구현한 것을 정의합니다.\"\n\n#: src/generics/gen_trait.md:7\nmsgid \"// Non-copyable types.\\n\"\nmsgstr \"// 복사 불가능한 타입.\\n\"\n\n#: src/generics/gen_trait.md:10\nmsgid \"// A trait generic over `T`.\\n\"\nmsgstr \"// `T`에 대해 제네릭인 트레이트.\\n\"\n\n#: src/generics/gen_trait.md:13\nmsgid \"\"\n\"// Define a method on the caller type which takes an\\n\"\n\"    // additional single parameter `T` and does nothing with it.\\n\"\nmsgstr \"\"\n\"// 호출자 타입에 대해 추가적인 단일 파라미터 `T`를 취하고\\n\"\n\"// 아무것도 하지 않는 메서드를 정의합니다.\\n\"\n\n#: src/generics/gen_trait.md:17\nmsgid \"\"\n\"// Implement `DoubleDrop<T>` for any generic parameter `T` and\\n\"\n\"// caller `U`.\\n\"\nmsgstr \"\"\n\"// 임의의 제네릭 파라미터 `T`와 호출자 `U`에 대해\\n\"\n\"// `DoubleDrop<T>`를 구현합니다.\\n\"\n\n#: src/generics/gen_trait.md:21\nmsgid \"\"\n\"// This method takes ownership of both passed arguments,\\n\"\n\"    // deallocating both.\\n\"\nmsgstr \"\"\n\"// 이 메서드는 전달된 두 인자의 소유권을 가져와\\n\"\n\"// 둘 다 해제합니다.\\n\"\n\n#: src/generics/gen_trait.md:30\nmsgid \"// Deallocate `empty` and `null`.\\n\"\nmsgstr \"// `empty`와 `null`을 해제합니다.\\n\"\n\n#: src/generics/gen_trait.md:33\nmsgid \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO: Try uncommenting these lines.\\n\"\nmsgstr \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO: 이 줄들의 주석을 해제해 보세요.\\n\"\n\n#: src/generics/gen_trait.md:41\nmsgid \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html), [`struct`](../\"\n\"custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html), [`구조체`](../\"\n\"custom_types/structs.md), 그리고 [`트레이트`](../trait.md)\"\n\n#: src/generics/bounds.md:3\nmsgid \"\"\n\"When working with generics, the type parameters often must use traits as \"\n\"_bounds_ to stipulate what functionality a type implements. For example, the \"\n\"following example uses the trait `Display` to print and so it requires `T` \"\n\"to be bound by `Display`; that is, `T` _must_ implement `Display`.\"\nmsgstr \"\"\n\"제네릭을 사용할 때, 타입 파라미터는 종종 타입이 구현해야 하는 기능을 규정하\"\n\"기 위해 트레이트를 _바운드(bounds)_로 사용해야 합니다. 예를 들어, 다음 예제\"\n\"는 `Display` 트레이트를 사용하여 출력하므로 `T`가 `Display`에 바운드되어야 합\"\n\"니다. 즉, `T`는 반드시 `Display`를 구현해야 합니다.\"\n\n#: src/generics/bounds.md:9\nmsgid \"\"\n\"// Define a function `printer` that takes a generic type `T` which\\n\"\n\"// must implement trait `Display`.\\n\"\nmsgstr \"\"\n\"// 제네릭 타입 `T`를 받는 함수 `printer`를 정의합니다.\\n\"\n\"// `T`는 반드시 `Display` 트레이트를 구현해야 합니다.\\n\"\n\n#: src/generics/bounds.md:16\nmsgid \"\"\n\"Bounding restricts the generic to types that conform to the bounds. That is:\"\nmsgstr \"바운딩은 제네릭을 해당 바운드를 준수하는 타입들로 제한합니다. 즉:\"\n\n#: src/generics/bounds.md:20\nmsgid \"\"\n\"// Error! `Vec<T>` does not implement `Display`. This\\n\"\n\"// specialization will fail.\\n\"\nmsgstr \"\"\n\"// 에러! `Vec<T>`는 `Display`를 구현하지 않습니다.\\n\"\n\"// 이 특수화는 실패할 것입니다.\\n\"\n\n#: src/generics/bounds.md:26\nmsgid \"\"\n\"Another effect of bounding is that generic instances are allowed to access \"\n\"the [methods](../fn/methods.md) of traits specified in the bounds. For \"\n\"example:\"\nmsgstr \"\"\n\"바운딩의 또 다른 효과는 제네릭 인스턴스가 바운드에 지정된 트레이트의 [메서드]\"\n\"(../fn/methods.md)에 접근할 수 있게 된다는 것입니다. 예를 들어:\"\n\n#: src/generics/bounds.md:30\nmsgid \"// A trait which implements the print marker: `{:?}`.\\n\"\nmsgstr \"// 출력 마커 `{:?}`를 구현하는 트레이트입니다.\\n\"\n\n#: src/generics/bounds.md:45\nmsgid \"\"\n\"// The generic `T` must implement `Debug`. Regardless\\n\"\n\"// of the type, this will work properly.\\n\"\nmsgstr \"\"\n\"// 제네릭 `T`는 반드시 `Debug`를 구현해야 합니다.\\n\"\n\"// 타입에 상관없이 이는 제대로 작동할 것입니다.\\n\"\n\n#: src/generics/bounds.md:51\nmsgid \"\"\n\"// `T` must implement `HasArea`. Any type which meets\\n\"\n\"// the bound can access `HasArea`'s function `area`.\\n\"\nmsgstr \"\"\n\"// `T`는 반드시 `HasArea`를 구현해야 합니다. 바운드를 충족하는\\n\"\n\"// 모든 타입은 `HasArea`의 `area` 함수에 접근할 수 있습니다.\\n\"\n\n#: src/generics/bounds.md:61\nmsgid \"\\\"Area: {}\\\"\"\nmsgstr \"\\\"면적: {}\\\"\"\n\n#: src/generics/bounds.md:63\nmsgid \"\"\n\"//print_debug(&_triangle);\\n\"\n\"    //println!(\\\"Area: {}\\\", area(&_triangle));\\n\"\n\"    // ^ TODO: Try uncommenting these.\\n\"\n\"    // | Error: Does not implement either `Debug` or `HasArea`.\\n\"\nmsgstr \"\"\n\"//print_debug(&_triangle);\\n\"\n\"//println!(\\\"면적: {}\\\", area(&_triangle));\\n\"\n\"// ^ TODO: 이 줄들의 주석을 해제해 보세요.\\n\"\n\"// | 에러: `Debug`나 `HasArea` 중 어느 것도 구현하지 않았습니다.\\n\"\n\n#: src/generics/bounds.md:70\nmsgid \"\"\n\"As an additional note, [`where`](../generics/where.md) clauses can also be \"\n\"used to apply bounds in some cases to be more expressive.\"\nmsgstr \"\"\n\"추가적으로, 어떤 경우에는 [`where`](../generics/where.md) 절을 사용하여 바운\"\n\"드를 더 표현력 있게 적용할 수도 있습니다.\"\n\n#: src/generics/bounds.md:75\nmsgid \"\"\n\"[`std::fmt`](../hello/print.md), [`struct`s](../custom_types/structs.md), \"\n\"and [`trait`s](../trait.md)\"\nmsgstr \"\"\n\"[`std::fmt`](../hello/print.md), [`struct`](../custom_types/structs.md), 그리\"\n\"고 [`trait`](../trait.md)\"\n\n#: src/generics/bounds/testcase_empty.md:3\nmsgid \"\"\n\"A consequence of how bounds work is that even if a `trait` doesn't include \"\n\"any functionality, you can still use it as a bound. `Eq` and `Copy` are \"\n\"examples of such `trait`s from the `std` library.\"\nmsgstr \"\"\n\"바운드가 작동하는 방식의 결과로, `trait`가 아무런 기능을 포함하지 않더라도 여\"\n\"전히 바운드로 사용할 수 있습니다. `std` 라이브러리의 `Eq`와 `Copy`가 그러한 \"\n\"`trait`의 예입니다.\"\n\n#: src/generics/bounds/testcase_empty.md:17\nmsgid \"\"\n\"// These functions are only valid for types which implement these\\n\"\n\"// traits. The fact that the traits are empty is irrelevant.\\n\"\nmsgstr \"\"\n\"// 이 함수들은 이 트레이트들을 구현하는 타입에 대해서만 유효합니다.\\n\"\n\"// 트레이트가 비어 있다는 사실은 무관합니다.\\n\"\n\n#: src/generics/bounds/testcase_empty.md:20\nmsgid \"\\\"red\\\"\"\nmsgstr \"\\\"빨강\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:21\nmsgid \"\\\"blue\\\"\"\nmsgstr \"\\\"파랑\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:28\nmsgid \"\"\n\"// `red()` won't work on a blue jay nor vice versa\\n\"\n\"    // because of the bounds.\\n\"\nmsgstr \"\"\n\"// 바운드 때문에 `red()`는 blue jay(파랑 어치)에 대해 작동하지 않으며\\n\"\n\"// 그 반대도 마찬가지입니다.\\n\"\n\n#: src/generics/bounds/testcase_empty.md:30\nmsgid \"\\\"A cardinal is {}\\\"\"\nmsgstr \"\\\"홍관조(cardinal)는 {}입니다\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:31\nmsgid \"\\\"A blue jay is {}\\\"\"\nmsgstr \"\\\"파랑 어치(blue jay)는 {}입니다\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:32\nmsgid \"\"\n\"//println!(\\\"A turkey is {}\\\", red(&_turkey));\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\"//println!(\\\"칠면조는 {}\\\", red(&_turkey));\\n\"\n\"// ^ TODO: 이 줄의 주석을 해제해 보세요.\\n\"\n\n#: src/generics/bounds/testcase_empty.md:39\nmsgid \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`std::marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html), \"\n\"and [`trait`s](../../trait.md)\"\nmsgstr \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`std::marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html), \"\n\"그리고 [`trait`](../../trait.md)\"\n\n#: src/generics/multi_bounds.md:3\nmsgid \"\"\n\"Multiple bounds for a single type can be applied with a `+`. Like normal, \"\n\"different types are separated with `,`.\"\nmsgstr \"\"\n\"단일 타입에 대해 `+`를 사용하여 다중 바운드를 적용할 수 있습니다. 평소와 마찬\"\n\"가지로, 서로 다른 타입은 `,`로 구분됩니다.\"\n\n#: src/generics/multi_bounds.md:10\nmsgid \"\\\"Debug: `{:?}`\\\"\"\nmsgstr \"\\\"디버그: `{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:11\nmsgid \"\\\"Display: `{}`\\\"\"\nmsgstr \"\\\"디스플레이: `{}`\\\"\"\n\n#: src/generics/multi_bounds.md:15\nmsgid \"\\\"t: `{:?}`\\\"\"\nmsgstr \"\\\"t: `{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:16\nmsgid \"\\\"u: `{:?}`\\\"\"\nmsgstr \"\\\"u: `{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:20\nmsgid \"\\\"words\\\"\"\nmsgstr \"\\\"단어들\\\"\"\n\n#: src/generics/multi_bounds.md:25\nmsgid \"\"\n\"//compare_prints(&array);\\n\"\n\"    // TODO ^ Try uncommenting this.\\n\"\nmsgstr \"\"\n\"//compare_prints(&array);\\n\"\n\"// TODO ^ 주석을 해제해 보세요.\\n\"\n\n#: src/generics/multi_bounds.md:34\nmsgid \"[`std::fmt`](../hello/print.md) and [`trait`s](../trait.md)\"\nmsgstr \"[`std::fmt`](../hello/print.md)와 [`trait`](../trait.md)\"\n\n#: src/generics/where.md:3\nmsgid \"\"\n\"A bound can also be expressed using a `where` clause immediately before the \"\n\"opening `{`, rather than at the type's first mention. Additionally, `where` \"\n\"clauses can apply bounds to arbitrary types, rather than just to type \"\n\"parameters.\"\nmsgstr \"\"\n\"바운드는 타입이 처음 언급되는 곳이 아닌, 여는 중괄호 `{` 직전에 `where` 절을 \"\n\"사용하여 표현할 수도 있습니다. 또한, `where` 절은 타입 파라미터뿐만 아니라 임\"\n\"의의 타입에도 바운드를 적용할 수 있습니다.\"\n\n#: src/generics/where.md:8\nmsgid \"Some cases that a `where` clause is useful:\"\nmsgstr \"`where` 절이 유용한 몇 가지 경우:\"\n\n#: src/generics/where.md:10\nmsgid \"When specifying generic types and bounds separately is clearer:\"\nmsgstr \"제네릭 타입과 바운드를 따로 명시하는 것이 더 명확할 때:\"\n\n#: src/generics/where.md:14\nmsgid \"// Expressing bounds with a `where` clause\\n\"\nmsgstr \"// `where` 절로 바운드 표현하기\\n\"\n\n#: src/generics/where.md:21\nmsgid \"\"\n\"When using a `where` clause is more expressive than using normal syntax. The \"\n\"`impl` in this example cannot be directly expressed without a `where` clause:\"\nmsgstr \"\"\n\"`where` 절을 사용하는 것이 일반 구문을 사용하는 것보다 더 표현력이 좋을 때. \"\n\"이 예제의 `impl`은 `where` 절 없이는 직접 표현할 수 없습니다:\"\n\n#: src/generics/where.md:30\nmsgid \"\"\n\"// Because we would otherwise have to express this as `T: Debug` or\\n\"\n\"// use another method of indirect approach, this requires a `where` clause:\\n\"\nmsgstr \"\"\n\"// 그렇지 않으면 `T: Debug`로 표현하거나\\n\"\n\"// 다른 간접적인 방법을 사용해야 하므로, 여기에는 `where` 절이 필요합니다:\\n\"\n\n#: src/generics/where.md:35\nmsgid \"\"\n\"// We want `Option<T>: Debug` as our bound because that is what's\\n\"\n\"    // being printed. Doing otherwise would be using the wrong bound.\\n\"\nmsgstr \"\"\n\"// 출력되는 것이 `Option<T>`이므로, 바운드로 `Option<T>: Debug`를 원합니다.\\n\"\n\"    // 다르게 하면 잘못된 바운드를 사용하는 셈이 됩니다.\\n\"\n\n#: src/generics/where.md:51\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md), \"\n\"[`struct`](../custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md), \"\n\"[`struct`](../custom_types/structs.md), 그리고 [`trait`](../trait.md)\"\n\n#: src/generics/new_types.md:3\nmsgid \"\"\n\"The `newtype` idiom gives compile time guarantees that the right type of \"\n\"value is supplied to a program.\"\nmsgstr \"\"\n\"`newtype` 관용구는 프로그램에 올바른 타입의 값이 제공됨을 컴파일 타임에 보장\"\n\"해 줍니다.\"\n\n#: src/generics/new_types.md:6\nmsgid \"\"\n\"For example, an age verification function that checks age in years, _must_ \"\n\"be given a value of type `Years`.\"\nmsgstr \"\"\n\"예를 들어, 나이를 연 단위로 확인하는 나이 검증 함수는 반드시 `Years` 타입의 \"\n\"값을 받아야 합니다.\"\n\n#: src/generics/new_types.md:21\nmsgid \"/// truncates partial years\\n\"\nmsgstr \"/// 부분적인 연도는 버립니다\\n\"\n\n#: src/generics/new_types.md:34 src/generics/new_types.md:35\nmsgid \"\\\"Is an adult? {}\\\"\"\nmsgstr \"\\\"성인입니까? {}\\\"\"\n\n#: src/generics/new_types.md:36\nmsgid \"// println!(\\\"Is an adult? {}\\\", is_adult(&age_days));\\n\"\nmsgstr \"// println!(\\\"성인입니까? {}\\\", is_adult(&age_days));\\n\"\n\n#: src/generics/new_types.md:40\nmsgid \"\"\n\"Uncomment the last print statement to observe that the type supplied must be \"\n\"`Years`.\"\nmsgstr \"\"\n\"마지막 출력문의 주석을 해제하여 제공되는 타입이 반드시 `Years`여야 함을 관찰\"\n\"해 보세요.\"\n\n#: src/generics/new_types.md:42\nmsgid \"\"\n\"To obtain the `newtype`'s value as the base type, you may use the tuple or \"\n\"destructuring syntax like so:\"\nmsgstr \"\"\n\"`newtype`의 값을 기본 타입으로 얻으려면, 다음과 같이 튜플 또는 구조 분해 문법\"\n\"을 사용할 수 있습니다:\"\n\n#: src/generics/new_types.md:49\nmsgid \"// Tuple\\n\"\nmsgstr \"// 튜플\\n\"\n\n#: src/generics/new_types.md:50\nmsgid \"// Destructuring\\n\"\nmsgstr \"// 구조 분해\\n\"\n\n#: src/generics/new_types.md:56\nmsgid \"[`structs`](../custom_types/structs.md)\"\nmsgstr \"[`structs`](../custom_types/structs.md)\"\n\n#: src/generics/assoc_items.md:3\nmsgid \"\"\n\"\\\"Associated Items\\\" refers to a set of rules pertaining to [`item`](https://\"\n\"doc.rust-lang.org/reference/items.html)s of various types. It is an \"\n\"extension to `trait` generics, and allows `trait`s to internally define new \"\n\"items.\"\nmsgstr \"\"\n\"\\\"연관 아이템(Associated Items)\\\"은 다양한 타입의 [`아이템`](https://\"\n\"doc.rust-lang.org/reference/items.html)에 관련된 규칙 집합을 말합니다. 이는 \"\n\"`trait` 제네릭의 확장이며, `trait`가 내부적으로 새로운 아이템을 정의할 수 있\"\n\"게 해줍니다.\"\n\n#: src/generics/assoc_items.md:7\nmsgid \"\"\n\"One such item is called an _associated type_, providing simpler usage \"\n\"patterns when the `trait` is generic over its container type.\"\nmsgstr \"\"\n\"그러한 아이템 중 하나가 _연관 타입(associated type)_이며, `trait`가 컨테이너 \"\n\"타입에 대해 제네릭일 때 더 간단한 사용 패턴을 제공합니다.\"\n\n#: src/generics/assoc_items.md:12\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\nmsgstr \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\n\n#: src/generics/assoc_items/the_problem.md:3\nmsgid \"\"\n\"A `trait` that is generic over its container type has type specification \"\n\"requirements - users of the `trait` _must_ specify all of its generic types.\"\nmsgstr \"\"\n\"컨테이너 타입에 대해 제네릭인 `trait`는 타입 명시 요구사항을 가집니다 - \"\n\"`trait` 사용자는 모든 제네릭 타입을 _반드시_ 명시해야 합니다.\"\n\n#: src/generics/assoc_items/the_problem.md:6\nmsgid \"\"\n\"In the example below, the `Contains` `trait` allows the use of the generic \"\n\"types `A` and `B`. The trait is then implemented for the `Container` type, \"\n\"specifying `i32` for `A` and `B` so that it can be used with `fn \"\n\"difference()`.\"\nmsgstr \"\"\n\"아래 예제에서 `Contains` `trait`는 제네릭 타입 `A`와 `B`의 사용을 허용합니\"\n\"다. 그 후 이 트레이트는 `Container` 타입에 대해 구현되는데, `fn difference()`\"\n\"와 함께 사용될 수 있도록 `A`와 `B`에 대해 `i32`를 지정합니다.\"\n\n#: src/generics/assoc_items/the_problem.md:10\nmsgid \"\"\n\"Because `Contains` is generic, we are forced to explicitly state _all_ of \"\n\"the generic types for `fn difference()`. In practice, we want a way to \"\n\"express that `A` and `B` are determined by the _input_ `C`. As you will see \"\n\"in the next section, associated types provide exactly that capability.\"\nmsgstr \"\"\n\"`Contains`가 제네릭이기 때문에, 우리는 `fn difference()`에 대해 _모든_ 제네\"\n\"릭 타입을 명시적으로 나열해야만 합니다. 실제로는 `A`와 `B`가 _입력_ `C`에 의\"\n\"해 결정된다는 것을 표현하고 싶습니다. 다음 섹션에서 보게 되겠지만, 연관 타입\"\n\"은 정확히 그런 기능을 제공합니다.\"\n\n#: src/generics/assoc_items/the_problem.md:17\n#: src/generics/assoc_items/types.md:36\nmsgid \"\"\n\"// A trait which checks if 2 items are stored inside of container.\\n\"\n\"// Also retrieves first or last value.\\n\"\nmsgstr \"\"\n\"// 컨테이너 안에 2개의 아이템이 저장되어 있는지 확인하는 트레이트입니다.\\n\"\n\"// 또한 첫 번째 또는 마지막 값을 가져옵니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:21\nmsgid \"// Explicitly requires `A` and `B`.\\n\"\nmsgstr \"// 명시적으로 `A`와 `B`를 요구합니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:22\n#: src/generics/assoc_items/the_problem.md:23\nmsgid \"// Doesn't explicitly require `A` or `B`.\\n\"\nmsgstr \"// 명시적으로 `A`나 `B`를 요구하지 않습니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:27\nmsgid \"// True if the numbers stored are equal.\\n\"\nmsgstr \"// 저장된 숫자들이 같으면 참입니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:32\n#: src/generics/assoc_items/types.md:60\nmsgid \"// Grab the first number.\\n\"\nmsgstr \"// 첫 번째 숫자를 가져옵니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:35\n#: src/generics/assoc_items/types.md:63\nmsgid \"// Grab the last number.\\n\"\nmsgstr \"// 마지막 숫자를 가져옵니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:38\nmsgid \"\"\n\"// `C` contains `A` and `B`. In light of that, having to express `A` and\\n\"\n\"// `B` again is a nuisance.\\n\"\nmsgstr \"\"\n\"// `C`는 `A`와 `B`를 포함합니다. 이를 고려할 때, `A`와 `B`를\\n\"\n\"// 다시 표현해야 하는 것은 성가신 일입니다.\\n\"\n\n#: src/generics/assoc_items/the_problem.md:52\n#: src/generics/assoc_items/types.md:77\nmsgid \"\\\"Does container contain {} and {}: {}\\\"\"\nmsgstr \"\\\"컨테이너가 {}와 {}를 포함합니까: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:55\n#: src/generics/assoc_items/types.md:80\nmsgid \"\\\"First number: {}\\\"\"\nmsgstr \"\\\"첫 번째 숫자: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:56\n#: src/generics/assoc_items/types.md:81\nmsgid \"\\\"Last number: {}\\\"\"\nmsgstr \"\\\"마지막 숫자: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:58\n#: src/generics/assoc_items/types.md:83\nmsgid \"\\\"The difference is: {}\\\"\"\nmsgstr \"\\\"차이는: {}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:64\nmsgid \"\"\n\"[`struct`s](../../custom_types/structs.md), and [`trait`s](../../trait.md)\"\nmsgstr \"\"\n\"[`struct`](../../custom_types/structs.md), 그리고 [`trait`](../../trait.md)\"\n\n#: src/generics/assoc_items/types.md:3\nmsgid \"\"\n\"The use of \\\"Associated types\\\" improves the overall readability of code by \"\n\"moving inner types locally into a trait as _output_ types. Syntax for the \"\n\"`trait` definition is as follows:\"\nmsgstr \"\"\n\"\\\"연관 타입\\\"을 사용하면 내부 타입을 트레이트 내의 _출력_ 타입으로 지역적으\"\n\"로 이동시켜 코드의 전반적인 가독성을 향상시킬 수 있습니다. `trait` 정의를 위\"\n\"한 구문은 다음과 같습니다:\"\n\n#: src/generics/assoc_items/types.md:8\nmsgid \"\"\n\"// `A` and `B` are defined in the trait via the `type` keyword.\\n\"\n\"// (Note: `type` in this context is different from `type` when used for\\n\"\n\"// aliases).\\n\"\nmsgstr \"\"\n\"// `A`와 `B`는 `type` 키워드를 통해 트레이트 내에 정의됩니다.\\n\"\n\"// (참고: 이 문맥에서의 `type`은 별칭(aliases)에 사용되는 `type`과는 다릅니\"\n\"다).\\n\"\n\n#: src/generics/assoc_items/types.md:15\nmsgid \"// Updated syntax to refer to these new types generically.\\n\"\nmsgstr \"\"\n\"// 이 새로운 타입들을 제네릭하게 참조하기 위해 업데이트된 구문입니다.\\n\"\n\n#: src/generics/assoc_items/types.md:20\nmsgid \"\"\n\"Note that functions that use the `trait` `Contains` are no longer required \"\n\"to express `A` or `B` at all:\"\nmsgstr \"\"\n\"`Contains` `trait`를 사용하는 함수들은 더 이상 `A`나 `B`를 표현할 필요가 없다\"\n\"는 점에 유의하세요:\"\n\n#: src/generics/assoc_items/types.md:24\nmsgid \"// Without using associated types\\n\"\nmsgstr \"// 연관 타입을 사용하지 않는 경우\\n\"\n\n#: src/generics/assoc_items/types.md:27\nmsgid \"// Using associated types\\n\"\nmsgstr \"// 연관 타입 사용\\n\"\n\n#: src/generics/assoc_items/types.md:32\nmsgid \"\"\n\"Let's rewrite the example from the previous section using associated types:\"\nmsgstr \"이전 섹션의 예제를 연관 타입을 사용하여 다시 작성해 봅시다:\"\n\n#: src/generics/assoc_items/types.md:40\nmsgid \"// Define generic types here which methods will be able to utilize.\\n\"\nmsgstr \"// 여기서 제네릭 타입을 정의하여 메서드들이 활용할 수 있게 합니다.\\n\"\n\n#: src/generics/assoc_items/types.md:50\nmsgid \"\"\n\"// Specify what types `A` and `B` are. If the `input` type\\n\"\n\"    // is `Container(i32, i32)`, the `output` types are determined\\n\"\n\"    // as `i32` and `i32`.\\n\"\nmsgstr \"\"\n\"// `A`와 `B`가 어떤 타입인지 명시합니다. 만약 `input` 타입이\\n\"\n\"    // `Container(i32, i32)`라면, `output` 타입은 `i32`와 `i32`로\\n\"\n\"    // 결정됩니다.\\n\"\n\n#: src/generics/assoc_items/types.md:56\nmsgid \"// `&Self::A` and `&Self::B` are also valid here.\\n\"\nmsgstr \"// `&Self::A`와 `&Self::B` 또한 여기서 유효합니다.\\n\"\n\n#: src/generics/phantom.md:3\nmsgid \"\"\n\"A phantom type parameter is one that doesn't show up at runtime, but is \"\n\"checked statically (and only) at compile time.\"\nmsgstr \"\"\n\"팬텀 타입 파라미터(phantom type parameter)는 런타임에는 나타나지 않지만, 컴파\"\n\"일 타임에만 정적으로 검사되는 파라미터입니다.\"\n\n#: src/generics/phantom.md:6\nmsgid \"\"\n\"Data types can use extra generic type parameters to act as markers or to \"\n\"perform type checking at compile time. These extra parameters hold no \"\n\"storage values, and have no runtime behavior.\"\nmsgstr \"\"\n\"데이터 타입은 추가적인 제네릭 타입 파라미터를 사용하여 마커 역할을 하거나 컴\"\n\"파일 타임에 타입 검사를 수행할 수 있습니다. 이러한 추가 파라미터는 저장 값을 \"\n\"가지지 않으며, 런타임 동작도 없습니다.\"\n\n#: src/generics/phantom.md:10\nmsgid \"\"\n\"In the following example, we combine [std::marker::PhantomData](https://\"\n\"doc.rust-lang.org/std/marker/struct.PhantomData.html) with the phantom type \"\n\"parameter concept to create tuples containing different data types.\"\nmsgstr \"\"\n\"다음 예제에서는 [std::marker::PhantomData](https://doc.rust-lang.org/std/\"\n\"marker/struct.PhantomData.html)와 팬텀 타입 파라미터 개념을 결합하여 서로 다\"\n\"른 데이터 타입을 포함하는 튜플을 생성합니다.\"\n\n#: src/generics/phantom.md:16\nmsgid \"\"\n\"// A phantom tuple struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"\"\n\"// 숨겨진 파라미터 `B`를 가지며 `A`에 대해 제네릭인 팬텀 튜플 구조체.\\n\"\n\n#: src/generics/phantom.md:18 src/generics/phantom.md:22\nmsgid \"// Allow equality test for this type.\\n\"\nmsgstr \"// 이 타입에 대한 동등성 테스트를 허용합니다.\\n\"\n\n#: src/generics/phantom.md:20\nmsgid \"\"\n\"// A phantom type struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"\"\n\"// 숨겨진 파라미터 `B`를 가지며 `A`에 대해 제네릭인 팬텀 타입 구조체.\\n\"\n\n#: src/generics/phantom.md:24\nmsgid \"\"\n\"// Note: Storage is allocated for generic type `A`, but not for `B`.\\n\"\n\"//       Therefore, `B` cannot be used in computations.\\n\"\nmsgstr \"\"\n\"// 주의: 제네릭 타입 `A`에는 저장 공간이 할당되지만, `B`에는 할당되지 않습니\"\n\"다.\\n\"\n\"//       따라서 `B`는 연산에 사용될 수 없습니다.\\n\"\n\n#: src/generics/phantom.md:29\nmsgid \"\"\n\"// Here, `f32` and `f64` are the hidden parameters.\\n\"\n\"    // PhantomTuple type specified as `<char, f32>`.\\n\"\nmsgstr \"\"\n\"// 여기서 `f32`와 `f64`는 숨겨진 파라미터입니다.\\n\"\n\"    // PhantomTuple 타입이 `<char, f32>`로 지정되었습니다.\\n\"\n\n#: src/generics/phantom.md:31 src/generics/phantom.md:33\n#: src/generics/phantom.md:37 src/generics/phantom.md:42\n#: src/scope/borrow/ref.md:12\nmsgid \"'Q'\"\nmsgstr \"'Q'\"\n\n#: src/generics/phantom.md:32\nmsgid \"// PhantomTuple type specified as `<char, f64>`.\\n\"\nmsgstr \"// PhantomTuple 타입이 `<char, f64>`로 지정되었습니다.\\n\"\n\n#: src/generics/phantom.md:35\nmsgid \"// Type specified as `<char, f32>`.\\n\"\nmsgstr \"// 타입이 `<char, f32>`로 지정되었습니다.\\n\"\n\n#: src/generics/phantom.md:40\nmsgid \"// Type specified as `<char, f64>`.\\n\"\nmsgstr \"// 타입이 `<char, f64>`로 지정되었습니다.\\n\"\n\n#: src/generics/phantom.md:46\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 yields: {}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\nmsgstr \"\"\n\"// 컴파일 타임 에러! 타입 불일치로 인해 비교할 수 없습니다:\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 yields: {}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\n\n#: src/generics/phantom.md:50\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_struct1 == _struct2 yields: {}\\\",\\n\"\n\"    //           _struct1 == _struct2);\\n\"\nmsgstr \"\"\n\"// 컴파일 타임 에러! 타입 불일치로 인해 비교할 수 없습니다:\\n\"\n\"// println!(\\\"_struct1 == _struct2 yields: {}\\\",\\n\"\n\"//           _struct1 == _struct2);\\n\"\n\n#: src/generics/phantom.md:58\nmsgid \"\"\n\"[Derive](../trait/derive.md), [struct](../custom_types/structs.md), and \"\n\"[tuple](../primitives/tuples.html).\"\nmsgstr \"\"\n\"[Derive](../trait/derive.md), [구조체](../custom_types/structs.md), 그리고 \"\n\"[튜플](../primitives/tuples.html).\"\n\n#: src/generics/phantom/testcase_units.md:3\nmsgid \"\"\n\"A useful method of unit conversions can be examined by implementing `Add` \"\n\"with a phantom type parameter. The `Add` `trait` is examined below:\"\nmsgstr \"\"\n\"팬텀 타입 파라미터로 `Add`를 구현하여 유용한 단위 변환 방법을 살펴볼 수 있습\"\n\"니다. `Add` `트레이트`는 아래에서 살펴봅니다:\"\n\n#: src/generics/phantom/testcase_units.md:7\nmsgid \"\"\n\"// This construction would impose: `Self + RHS = Output`\\n\"\n\"// where RHS defaults to Self if not specified in the implementation.\\n\"\nmsgstr \"\"\n\"// 이 구조는 다음을 부과합니다: `Self + RHS = Output`\\n\"\n\"// 구현에서 지정되지 않은 경우 RHS는 기본적으로 Self입니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:14\nmsgid \"// `Output` must be `T<U>` so that `T<U> + T<U> = T<U>`.\\n\"\nmsgstr \"\"\n\"// `Output`은 `T<U> + T<U> = T<U>`가 되도록 반드시 `T<U>`여야 합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:22\nmsgid \"The whole implementation:\"\nmsgstr \"전체 구현:\"\n\n#: src/generics/phantom/testcase_units.md:27\nmsgid \"/// Create void enumerations to define unit types.\\n\"\nmsgstr \"/// 단위 타입을 정의하기 위해 빈 열거형을 생성합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:33\nmsgid \"\"\n\"/// `Length` is a type with phantom type parameter `Unit`,\\n\"\n\"/// and is not generic over the length type (that is `f64`).\\n\"\n\"///\\n\"\n\"/// `f64` already implements the `Clone` and `Copy` traits.\\n\"\nmsgstr \"\"\n\"/// `Length`는 팬텀 타입 파라미터 `Unit`을 가지는 타입이며,\\n\"\n\"/// 길이 타입(`f64`)에 대해서는 제네릭이 아닙니다.\\n\"\n\"///\\n\"\n\"/// `f64`는 이미 `Clone`과 `Copy` 트레이트를 구현하고 있습니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:40\nmsgid \"/// The `Add` trait defines the behavior of the `+` operator.\\n\"\nmsgstr \"/// `Add` 트레이트는 `+` 연산자의 동작을 정의합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:45\nmsgid \"// add() returns a new `Length` struct containing the sum.\\n\"\nmsgstr \"// add()는 합계를 포함하는 새로운 `Length` 구조체를 반환합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:47\nmsgid \"// `+` calls the `Add` implementation for `f64`.\\n\"\nmsgstr \"// `+`는 `f64`에 대한 `Add` 구현을 호출합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:53\nmsgid \"// Specifies `one_foot` to have phantom type parameter `Inch`.\\n\"\nmsgstr \"// `one_foot`가 팬텀 타입 파라미터 `Inch`를 가지도록 지정합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:55\nmsgid \"// `one_meter` has phantom type parameter `Mm`.\\n\"\nmsgstr \"// `one_meter`는 팬텀 타입 파라미터 `Mm`을 가집니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:58\nmsgid \"\"\n\"// `+` calls the `add()` method we implemented for `Length<Unit>`.\\n\"\n\"    //\\n\"\n\"    // Since `Length` implements `Copy`, `add()` does not consume\\n\"\n\"    // `one_foot` and `one_meter` but copies them into `self` and `rhs`.\\n\"\nmsgstr \"\"\n\"// `+`는 우리가 `Length<Unit>`에 대해 구현한 `add()` 메서드를 호출합니다.\\n\"\n\"//\\n\"\n\"// `Length`가 `Copy`를 구현하므로, `add()`는 `one_foot`과 `one_meter`를\\n\"\n\"// 소비(consume)하지 않고 `self`와 `rhs`로 복사합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:65\nmsgid \"// Addition works.\\n\"\nmsgstr \"// 덧셈이 작동합니다.\\n\"\n\n#: src/generics/phantom/testcase_units.md:66\nmsgid \"\\\"one foot + one_foot = {:?} in\\\"\"\nmsgstr \"\\\"1피트 + 1피트 = {:?} 인치\\\"\"\n\n#: src/generics/phantom/testcase_units.md:67\nmsgid \"\\\"one meter + one_meter = {:?} mm\\\"\"\nmsgstr \"\\\"1미터 + 1미터 = {:?} mm\\\"\"\n\n#: src/generics/phantom/testcase_units.md:69\nmsgid \"\"\n\"// Nonsensical operations fail as they should:\\n\"\n\"    // Compile-time Error: type mismatch.\\n\"\n\"    //let one_feter = one_foot + one_meter;\\n\"\nmsgstr \"\"\n\"// 말도 안 되는 연산은 실패합니다:\\n\"\n\"// 컴파일 타임 에러: 타입 불일치.\\n\"\n\"// let one_feter = one_foot + one_meter;\\n\"\n\n#: src/generics/phantom/testcase_units.md:77\nmsgid \"\"\n\"[Borrowing (`&`)](../../scope/borrow.md), [Bounds (`X: Y`)](../../generics/\"\n\"bounds.md), [enum](../../custom_types/enum.md), [impl & self](../../fn/\"\n\"methods.md), [Overloading](../../trait/ops.md), [ref](../../scope/borrow/\"\n\"ref.md), [Traits (`X for Y`)](../../trait.md), and [TupleStructs](../../\"\n\"custom_types/structs.md).\"\nmsgstr \"\"\n\"[빌림(Borrowing) (`&`)](../../scope/borrow.md), [바운드(Bounds) (`X: Y`)]\"\n\"(../../generics/bounds.md), [열거형(enum)](../../custom_types/enum.md), \"\n\"[impl & self](../../fn/methods.md), [오버로딩(Overloading)](../../trait/\"\n\"ops.md), [ref](../../scope/borrow/ref.md), [트레이트(Traits) (`X for Y`)]\"\n\"(../../trait.md), 그리고 [튜플 구조체(TupleStructs)](../../custom_types/\"\n\"structs.md).\"\n\n#: src/scope.md:3\nmsgid \"\"\n\"Scopes play an important part in ownership, borrowing, and lifetimes. That \"\n\"is, they indicate to the compiler when borrows are valid, when resources can \"\n\"be freed, and when variables are created or destroyed.\"\nmsgstr \"\"\n\"스코프(범위)는 소유권(ownership), 빌림(borrowing), 라이프타임(lifetimes)에서 \"\n\"중요한 역할을 합니다. 즉, 스코프는 컴파일러에게 언제 빌림이 유효한지, 언제 자\"\n\"원이 해제될 수 있는지, 언제 변수가 생성되고 파괴되는지를 알려줍니다.\"\n\n#: src/scope/raii.md:3\nmsgid \"\"\n\"Variables in Rust do more than just hold data in the stack: they also _own_ \"\n\"resources, e.g. `Box<T>` owns memory in the heap. Rust enforces [RAII]\"\n\"(https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization) \"\n\"(Resource Acquisition Is Initialization), so whenever an object goes out of \"\n\"scope, its destructor is called and its owned resources are freed.\"\nmsgstr \"\"\n\"Rust의 변수는 스택에 데이터를 저장하는 것 이상의 일을 합니다. 예를 들어 \"\n\"`Box<T>`는 힙 메모리를 소유하는 것처럼 리소스를 _소유(own)_하기도 합니다. \"\n\"Rust는 [RAII](https://en.wikipedia.org/wiki/\"\n\"Resource_Acquisition_Is_Initialization) (자원의 획득은 초기화이다)를 강제하므\"\n\"로, 객체가 스코프를 벗어날 때마다 소멸자가 호출되어 소유한 리소스가 해제됩니\"\n\"다.\"\n\n#: src/scope/raii.md:8\nmsgid \"\"\n\"This behavior shields against _resource leak_ bugs, so you'll never have to \"\n\"manually free memory or worry about memory leaks again! Here's a quick \"\n\"showcase:\"\nmsgstr \"\"\n\"이러한 동작은 _리소스 누수_ 버그를 방지하므로, 수동으로 메모리를 해제하거나 \"\n\"메모리 누수에 대해 걱정할 필요가 없습니다! 간단한 예시를 보여드리겠습니다:\"\n\n#: src/scope/raii.md:12\nmsgid \"// raii.rs\\n\"\nmsgstr \"// raii.rs\\n\"\n\n#: src/scope/raii.md:14 src/scope/raii.md:21 src/scope/raii.md:26\nmsgid \"// Allocate an integer on the heap\\n\"\nmsgstr \"// 힙에 정수를 할당합니다\\n\"\n\n#: src/scope/raii.md:17\nmsgid \"// `_box1` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box1`은 여기서 파괴되고, 메모리가 해제됩니다\\n\"\n\n#: src/scope/raii.md:24\nmsgid \"// A nested scope:\\n\"\nmsgstr \"// 중첩된 스코프:\\n\"\n\n#: src/scope/raii.md:29\nmsgid \"// `_box3` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box3`은 여기서 파괴되고, 메모리가 해제됩니다\\n\"\n\n#: src/scope/raii.md:32\nmsgid \"\"\n\"// Creating lots of boxes just for fun\\n\"\n\"    // There's no need to manually free memory!\\n\"\nmsgstr \"\"\n\"// 재미 삼아 많은 상자를 만듭니다\\n\"\n\"    // 수동으로 메모리를 해제할 필요가 없습니다!\\n\"\n\n#: src/scope/raii.md:38\nmsgid \"// `_box2` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box2`는 여기서 파괴되고, 메모리가 해제됩니다\\n\"\n\n#: src/scope/raii.md:42\nmsgid \"\"\n\"Of course, we can double check for memory errors using [`valgrind`](http://\"\n\"valgrind.org/info/):\"\nmsgstr \"\"\n\"물론 [`valgrind`](http://valgrind.org/info/)를 사용하여 메모리 에러를 다시 확\"\n\"인할 수 있습니다:\"\n\n#: src/scope/raii.md:65\nmsgid \"No leaks here!\"\nmsgstr \"누수가 없습니다!\"\n\n#: src/scope/raii.md:67\nmsgid \"Destructor\"\nmsgstr \"소멸자\"\n\n#: src/scope/raii.md:69\nmsgid \"\"\n\"The notion of a destructor in Rust is provided through the [`Drop`](https://\"\n\"doc.rust-lang.org/std/ops/trait.Drop.html) trait. The destructor is called \"\n\"when the resource goes out of scope. This trait is not required to be \"\n\"implemented for every type, only implement it for your type if you require \"\n\"its own destructor logic.\"\nmsgstr \"\"\n\"Rust에서 소멸자의 개념은 [`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html) 트레이트를 통해 제공됩니다. 소멸자는 리소스가 스코프를 벗어\"\n\"날 때 호출됩니다. 모든 타입에 대해 이 트레이트를 구현할 필요는 없으며, 자체적\"\n\"인 소멸자 로직이 필요한 경우에만 구현하면 됩니다.\"\n\n#: src/scope/raii.md:74\nmsgid \"\"\n\"Run the below example to see how the [`Drop`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Drop.html) trait works. When the variable in the `main` function \"\n\"goes out of scope the custom destructor will be invoked.\"\nmsgstr \"\"\n\"아래 예제를 실행하여 [`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html) 트레이트가 어떻게 작동하는지 확인해 보세요. `main` 함수의 변\"\n\"수가 스코프를 벗어나면 사용자 정의 소멸자가 호출될 것입니다.\"\n\n#: src/scope/raii.md:82\nmsgid \"\\\"ToDrop is being dropped\\\"\"\nmsgstr \"\\\"ToDrop이 드롭되고 있습니다\\\"\"\n\n#: src/scope/raii.md:88\nmsgid \"\\\"Made a ToDrop!\\\"\"\nmsgstr \"\\\"ToDrop을 만들었습니다!\\\"\"\n\n#: src/scope/raii.md:94\nmsgid \"[Box](../std/box.md)\"\nmsgstr \"[Box](../std/box.md)\"\n\n#: src/scope/move.md:3\nmsgid \"\"\n\"Because variables are in charge of freeing their own resources, **resources \"\n\"can only have one owner**. This prevents resources from being freed more \"\n\"than once. Note that not all variables own resources (e.g. [references](../\"\n\"flow_control/match/destructuring/destructure_pointers.md)).\"\nmsgstr \"\"\n\"변수는 자신의 리소스를 해제할 책임이 있으므로, **리소스는 오직 하나의 소유자\"\n\"만 가질 수 있습니다**. 이는 리소스가 한 번 이상 해제되는 것을 방지합니다. 모\"\n\"든 변수가 리소스를 소유하는 것은 아닙니다(예: [참조](../flow_control/match/\"\n\"destructuring/destructure_pointers.md)).\"\n\n#: src/scope/move.md:8\nmsgid \"\"\n\"When doing assignments (`let x = y`) or passing function arguments by value \"\n\"(`foo(x)`), the _ownership_ of the resources is transferred. In Rust-speak, \"\n\"this is known as a _move_.\"\nmsgstr \"\"\n\"할당(`let x = y`)을 하거나 함수 인자를 값으로 전달(`foo(x)`)할 때, 리소스의 _\"\n\"소유권_이 이전됩니다. Rust 용어로는 이를 _이동(move)_이라고 합니다.\"\n\n#: src/scope/move.md:12\nmsgid \"\"\n\"After moving resources, the previous owner can no longer be used. This \"\n\"avoids creating dangling pointers.\"\nmsgstr \"\"\n\"리소스를 이동한 후에는 이전 소유자를 더 이상 사용할 수 없습니다. 이는 댕글링 \"\n\"포인터(dangling pointers) 생성을 방지합니다.\"\n\n#: src/scope/move.md:16\nmsgid \"// This function takes ownership of the heap allocated memory\\n\"\nmsgstr \"// 이 함수는 힙에 할당된 메모리의 소유권을 가져갑니다\\n\"\n\n#: src/scope/move.md:18\nmsgid \"\\\"Destroying a box that contains {}\\\"\"\nmsgstr \"\\\"{}를 포함하는 상자를 파괴 중\\\"\"\n\n#: src/scope/move.md:20\nmsgid \"// `c` is destroyed and the memory freed\\n\"\nmsgstr \"// `c`가 파괴되고 메모리가 해제됩니다\\n\"\n\n#: src/scope/move.md:24\nmsgid \"// _Stack_ allocated integer\\n\"\nmsgstr \"// _스택_에 할당된 정수\\n\"\n\n#: src/scope/move.md:27\nmsgid \"// *Copy* `x` into `y` - no resources are moved\\n\"\nmsgstr \"// `x`를 `y`로 *복사* - 리소스가 이동되지 않음\\n\"\n\n#: src/scope/move.md:30\nmsgid \"// Both values can be independently used\\n\"\nmsgstr \"// 두 값 모두 독립적으로 사용될 수 있음\\n\"\n\n#: src/scope/move.md:31\nmsgid \"\\\"x is {}, and y is {}\\\"\"\nmsgstr \"\\\"x는 {}이고, y는 {}입니다\\\"\"\n\n#: src/scope/move.md:33\nmsgid \"// `a` is a pointer to a _heap_ allocated integer\\n\"\nmsgstr \"// `a`는 _힙_에 할당된 정수에 대한 포인터입니다\\n\"\n\n#: src/scope/move.md:36\nmsgid \"\\\"a contains: {}\\\"\"\nmsgstr \"\\\"a가 포함하는 것: {}\\\"\"\n\n#: src/scope/move.md:38\nmsgid \"// *Move* `a` into `b`\\n\"\nmsgstr \"// `a`를 `b`로 *이동*\\n\"\n\n#: src/scope/move.md:40\nmsgid \"\"\n\"// The pointer address of `a` is copied (not the data) into `b`.\\n\"\n\"    // Both are now pointers to the same heap allocated data, but\\n\"\n\"    // `b` now owns it.\\n\"\nmsgstr \"\"\n\"// `a`의 포인터 주소가 (데이터가 아니라) `b`로 복사됩니다.\\n\"\n\"// 둘 다 이제 동일한 힙 할당 데이터를 가리키지만,\\n\"\n\"// 이제 `b`가 소유권을 가집니다.\\n\"\n\n#: src/scope/move.md:44\nmsgid \"\"\n\"// Error! `a` can no longer access the data, because it no longer owns the\\n\"\n\"    // heap memory\\n\"\n\"    //println!(\\\"a contains: {}\\\", a);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `a`는 더 이상 데이터를 소유하고 있지 않으므로 접근할 수 없습니다.\\n\"\n\"//println!(\\\"a가 포함하는 것: {}\\\", a);\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/scope/move.md:49\nmsgid \"\"\n\"// This function takes ownership of the heap allocated memory from `b`\\n\"\nmsgstr \"// 이 함수는 `b`로부터 힙에 할당된 메모리의 소유권을 가져갑니다\\n\"\n\n#: src/scope/move.md:52\nmsgid \"\"\n\"// Since the heap memory has been freed at this point, this action would\\n\"\n\"    // result in dereferencing freed memory, but it's forbidden by the \"\n\"compiler\\n\"\n\"    // Error! Same reason as the previous Error\\n\"\n\"    //println!(\\\"b contains: {}\\\", b);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 이 시점에서 힙 메모리가 해제되었으므로, 이 동작은\\n\"\n\"    // 해제된 메모리를 역참조하는 결과를 낳겠지만, 컴파일러에 의해 금지됩니\"\n\"다.\\n\"\n\"    // 에러! 이전 에러와 같은 이유입니다.\\n\"\n\"    //println!(\\\"b가 포함하는 것: {}\\\", b);\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/scope/move/mut.md:3\nmsgid \"Mutability of data can be changed when ownership is transferred.\"\nmsgstr \"소유권이 이전될 때 데이터의 가변성이 변경될 수 있습니다.\"\n\n#: src/scope/move/mut.md:9\nmsgid \"\\\"immutable_box contains {}\\\"\"\nmsgstr \"\\\"불변 상자가 포함하는 것: {}\\\"\"\n\n#: src/scope/move/mut.md:11\nmsgid \"\"\n\"// Mutability error\\n\"\n\"    //*immutable_box = 4;\\n\"\nmsgstr \"\"\n\"// 가변성 에러\\n\"\n\"    //*immutable_box = 4;\\n\"\n\n#: src/scope/move/mut.md:14\nmsgid \"// *Move* the box, changing the ownership (and mutability)\\n\"\nmsgstr \"// 상자를 *이동*하여 소유권(및 가변성)을 변경합니다\\n\"\n\n#: src/scope/move/mut.md:17\nmsgid \"\\\"mutable_box contains {}\\\"\"\nmsgstr \"\\\"가변 상자가 포함하는 것: {}\\\"\"\n\n#: src/scope/move/mut.md:19\nmsgid \"// Modify the contents of the box\\n\"\nmsgstr \"// 상자의 내용물을 수정합니다\\n\"\n\n#: src/scope/move/mut.md:22\nmsgid \"\\\"mutable_box now contains {}\\\"\"\nmsgstr \"\\\"가변 상자가 이제 포함하는 것: {}\\\"\"\n\n#: src/scope/move/partial_move.md:3\nmsgid \"\"\n\"Within the [destructuring](../../flow_control/match/destructuring.md) of a \"\n\"single variable, both `by-move` and `by-reference` pattern bindings can be \"\n\"used at the same time. Doing this will result in a _partial move_ of the \"\n\"variable, which means that parts of the variable will be moved while other \"\n\"parts stay. In such a case, the parent variable cannot be used afterwards as \"\n\"a whole, however the parts that are only referenced (and not moved) can \"\n\"still be used. Note that types that implement the [`Drop` trait](../../trait/\"\n\"drop.md) cannot be partially moved from, because its `drop` method would use \"\n\"it afterwards as a whole.\"\nmsgstr \"\"\n\"단일 변수의 [구조 분해](../../flow_control/match/destructuring.md) 내에서 `이\"\n\"동에 의한(by-move)` 패턴 바인딩과 `참조에 의한(by-reference)` 패턴 바인딩을 \"\n\"동시에 사용할 수 있습니다. 이렇게 하면 변수의 _부분 이동(partial move)_이 발\"\n\"생하는데, 이는 변수의 일부는 이동하고 다른 부분은 남아있음을 의미합니다. 이\"\n\"런 경우 부모 변수는 전체로서 나중에 사용될 수 없지만, 참조만 되고 이동되지 않\"\n\"은 부분은 여전히 사용될 수 있습니다. [`Drop` 트레이트](../../trait/drop.md)\"\n\"를 구현한 타입은 부분적으로 이동될 수 없다는 점에 유의하세요. 왜냐하면 해당 \"\n\"타입의 `drop` 메서드가 나중에 전체로서 사용될 것이기 때문입니다.\"\n\n#: src/scope/move/partial_move.md:22\nmsgid \"\"\n\"// Error! cannot move out of a type which implements the `Drop` trait\\n\"\n\"    //impl Drop for Person {\\n\"\n\"    //    fn drop(&mut self) {\\n\"\n\"    //        println!(\\\"Dropping the person struct {:?}\\\", self)\\n\"\n\"    //    }\\n\"\n\"    //}\\n\"\n\"    // TODO ^ Try uncommenting these lines\\n\"\nmsgstr \"\"\n\"// 에러! `Drop` 트레이트를 구현한 타입에서는 이동해 나올 수 없습니다\\n\"\n\"    //impl Drop for Person {\\n\"\n\"    //    fn drop(&mut self) {\\n\"\n\"    //        println!(\\\"Person 구조체를 드롭합니다 {:?}\\\", self)\\n\"\n\"    //    }\\n\"\n\"    //}\\n\"\n\"    // TODO ^ 이 줄들의 주석을 해제해 보세요\\n\"\n\n#: src/scope/move/partial_move.md:35\nmsgid \"// `name` is moved out of person, but `age` is referenced\\n\"\nmsgstr \"// `name`은 person에서 밖으로 이동되지만, `age`는 참조됩니다\\n\"\n\n#: src/scope/move/partial_move.md:38\nmsgid \"\\\"The person's age is {}\\\"\"\nmsgstr \"\\\"이 사람의 나이는 {}입니다\\\"\"\n\n#: src/scope/move/partial_move.md:40\nmsgid \"\\\"The person's name is {}\\\"\"\nmsgstr \"\\\"이 사람의 이름은 {}입니다\\\"\"\n\n#: src/scope/move/partial_move.md:42\nmsgid \"\"\n\"// Error! borrow of partially moved value: `person` partial move occurs\\n\"\n\"    //println!(\\\"The person struct is {:?}\\\", person);\\n\"\nmsgstr \"\"\n\"// 에러! 부분적으로 이동된 값의 빌림: `person`의 부분 이동이 발생했습니다\\n\"\n\"    //println!(\\\"Person 구조체는 {:?}입니다\\\", person);\\n\"\n\n#: src/scope/move/partial_move.md:45\nmsgid \"\"\n\"// `person` cannot be used but `person.age` can be used as it is not moved\\n\"\nmsgstr \"\"\n\"// `person`은 사용할 수 없지만 `person.age`는 이동되지 않았으므로 사용할 수 \"\n\"있습니다\\n\"\n\n#: src/scope/move/partial_move.md:46\nmsgid \"\\\"The person's age from person struct is {}\\\"\"\nmsgstr \"\\\"person 구조체에서 가져온 이 사람의 나이는 {}입니다\\\"\"\n\n#: src/scope/move/partial_move.md:50\nmsgid \"\"\n\"(In this example, we store the `age` variable on the heap to illustrate the \"\n\"partial move: deleting `ref` in the above code would give an error as the \"\n\"ownership of `person.age` would be moved to the variable `age`. If \"\n\"`Person.age` were stored on the stack, `ref` would not be required as the \"\n\"definition of `age` would copy the data from `person.age` without moving it.)\"\nmsgstr \"\"\n\"(이 예제에서는 부분 이동을 설명하기 위해 `age` 변수를 힙에 저장합니다. 위 코\"\n\"드에서 `ref`를 삭제하면 `person.age`의 소유권이 `age` 변수로 이동하기 때문에 \"\n\"에러가 발생합니다. `Person.age`가 스택에 저장되어 있었다면, `age`의 정의가 \"\n\"`person.age`에서 데이터를 이동 없이 복사하므로 `ref`가 필요하지 않았을 것입니\"\n\"다.)\"\n\n#: src/scope/move/partial_move.md:59\nmsgid \"[destructuring](../../flow_control/match/destructuring.md)\"\nmsgstr \"[구조 분해](../../flow_control/match/destructuring.md)\"\n\n#: src/scope/borrow.md:3\nmsgid \"\"\n\"Most of the time, we'd like to access data without taking ownership over it. \"\n\"To accomplish this, Rust uses a _borrowing_ mechanism. Instead of passing \"\n\"objects by value (`T`), objects can be passed by reference (`&T`).\"\nmsgstr \"\"\n\"대부분의 경우, 우리는 데이터의 소유권을 가져오지 않고 데이터에 접근하고 싶어 \"\n\"합니다. 이를 달성하기 위해 Rust는 _빌림(borrowing)_ 메커니즘을 사용합니다. 객\"\n\"체를 값(`T`)으로 전달하는 대신, 참조(`&T`)로 전달할 수 있습니다.\"\n\n#: src/scope/borrow.md:7\nmsgid \"\"\n\"The compiler statically guarantees (via its borrow checker) that references \"\n\"_always_ point to valid objects. That is, while references to an object \"\n\"exist, the object cannot be destroyed.\"\nmsgstr \"\"\n\"컴파일러는 (빌림 검사기를 통해) 참조가 _항상_ 유효한 객체를 가리킨다는 것을 \"\n\"정적으로 보장합니다. 즉, 객체에 대한 참조가 존재하는 동안에는 해당 객체를 파\"\n\"괴할 수 없습니다.\"\n\n#: src/scope/borrow.md:12\nmsgid \"// This function takes ownership of a box and destroys it\\n\"\nmsgstr \"// 이 함수는 상자의 소유권을 가져와 파괴합니다\\n\"\n\n#: src/scope/borrow.md:14\nmsgid \"\\\"Destroying box that contains {}\\\"\"\nmsgstr \"\\\"{}를 포함하는 상자를 파괴 중\\\"\"\n\n#: src/scope/borrow.md:16\nmsgid \"// This function borrows an i32\\n\"\nmsgstr \"// 이 함수는 i32를 빌립니다\\n\"\n\n#: src/scope/borrow.md:19\nmsgid \"\\\"This int is: {}\\\"\"\nmsgstr \"\\\"이 정수는: {}\\\"\"\n\n#: src/scope/borrow.md:23\nmsgid \"\"\n\"// Create a boxed i32 in the heap, and an i32 on the stack\\n\"\n\"    // Remember: numbers can have arbitrary underscores added for \"\n\"readability\\n\"\n\"    // 5_i32 is the same as 5i32\\n\"\nmsgstr \"\"\n\"// 힙에 boxed i32를 생성하고, 스택에 i32를 생성합니다\\n\"\n\"// 기억하세요: 숫자는 가독성을 위해 임의의 밑줄을 추가할 수 있습니다\\n\"\n\"// 5_i32는 5i32와 동일합니다\\n\"\n\n#: src/scope/borrow.md:29\nmsgid \"\"\n\"// Borrow the contents of the box. Ownership is not taken,\\n\"\n\"    // so the contents can be borrowed again.\\n\"\nmsgstr \"\"\n\"// 상자의 내용물을 빌립니다. 소유권을 가져가지 않으므로,\\n\"\n\"// 내용물을 다시 빌릴 수 있습니다.\\n\"\n\n#: src/scope/borrow.md:35\nmsgid \"// Take a reference to the data contained inside the box\\n\"\nmsgstr \"// 상자 안에 포함된 데이터에 대한 참조를 가져옵니다\\n\"\n\n#: src/scope/borrow.md:38\nmsgid \"\"\n\"// Error!\\n\"\n\"        // Can't destroy `boxed_i32` while the inner value is borrowed later \"\n\"in scope.\\n\"\nmsgstr \"\"\n\"// 에러!\\n\"\n\"// 내부 값이 스코프의 나중 부분에서 빌려지고 있는 동안에는 `boxed_i32`를 파괴\"\n\"할 수 없습니다.\\n\"\n\n#: src/scope/borrow.md:43\nmsgid \"// Attempt to borrow `_ref_to_i32` after inner value is destroyed\\n\"\nmsgstr \"// 내부 값이 파괴된 후에 `_ref_to_i32`를 빌리려고 시도합니다\\n\"\n\n#: src/scope/borrow.md:45\nmsgid \"// `_ref_to_i32` goes out of scope and is no longer borrowed.\\n\"\nmsgstr \"// `_ref_to_i32`가 스코프를 벗어나며 더 이상 빌려지지 않습니다.\\n\"\n\n#: src/scope/borrow.md:48\nmsgid \"\"\n\"// `boxed_i32` can now give up ownership to `eat_box_i32` and be destroyed\\n\"\nmsgstr \"\"\n\"// `boxed_i32`는 이제 `eat_box_i32`에게 소유권을 넘기고 파괴될 수 있습니다\\n\"\n\n#: src/scope/borrow/mut.md:3\nmsgid \"\"\n\"Mutable data can be mutably borrowed using `&mut T`. This is called a \"\n\"_mutable reference_ and gives read/write access to the borrower. In \"\n\"contrast, `&T` borrows the data via an immutable reference, and the borrower \"\n\"can read the data but not modify it:\"\nmsgstr \"\"\n\"가변 데이터는 `&mut T`를 사용하여 가변적으로 빌려올 수 있습니다. 이를 _가변 \"\n\"참조(mutable reference)_라고 하며 빌리는 사람에게 읽기/쓰기 권한을 부여합니\"\n\"다. 반면 `&T`는 불변 참조를 통해 데이터를 빌려오며, 빌리는 사람은 데이터를 읽\"\n\"을 수는 있지만 수정할 수는 없습니다:\"\n\n#: src/scope/borrow/mut.md:12\nmsgid \"\"\n\"// `&'static str` is a reference to a string allocated in read only memory\\n\"\nmsgstr \"\"\n\"// `&'static str`은 읽기 전용 메모리에 할당된 문자열에 대한 참조입니다\\n\"\n\n#: src/scope/borrow/mut.md:17\nmsgid \"// This function takes a reference to a book\\n\"\nmsgstr \"// 이 함수는 책에 대한 참조를 받습니다\\n\"\n\n#: src/scope/borrow/mut.md:20\nmsgid \"\\\"I immutably borrowed {} - {} edition\\\"\"\nmsgstr \"\\\"{} - {} 판을 불변으로 빌렸습니다\\\"\"\n\n#: src/scope/borrow/mut.md:22\nmsgid \"\"\n\"// This function takes a reference to a mutable book and changes `year` to \"\n\"2014\\n\"\nmsgstr \"\"\n\"// 이 함수는 가변적인 책에 대한 참조를 받아 `year`를 2014로 변경합니다\\n\"\n\n#: src/scope/borrow/mut.md:26\nmsgid \"\\\"I mutably borrowed {} - {} edition\\\"\"\nmsgstr \"\\\"{} - {} 판을 가변으로 빌렸습니다\\\"\"\n\n#: src/scope/borrow/mut.md:30\nmsgid \"// Create an immutable Book named `immutabook`\\n\"\nmsgstr \"// `immutabook`이라는 이름의 불변 책을 생성합니다\\n\"\n\n#: src/scope/borrow/mut.md:32\nmsgid \"// string literals have type `&'static str`\\n\"\nmsgstr \"// 문자열 리터럴은 `&'static str` 타입을 가집니다\\n\"\n\n#: src/scope/borrow/mut.md:33\nmsgid \"\\\"Douglas Hofstadter\\\"\"\nmsgstr \"\\\"더글라스 호프스태터\\\"\"\n\n#: src/scope/borrow/mut.md:34\nmsgid \"\\\"Gödel, Escher, Bach\\\"\"\nmsgstr \"\\\"괴델, 에셔, 바흐\\\"\"\n\n#: src/scope/borrow/mut.md:38\nmsgid \"// Create a mutable copy of `immutabook` and call it `mutabook`\\n\"\nmsgstr \"// `immutabook`의 가변 복사본을 생성하고 `mutabook`이라고 부릅니다\\n\"\n\n#: src/scope/borrow/mut.md:41\nmsgid \"// Immutably borrow an immutable object\\n\"\nmsgstr \"// 불변 객체를 불변으로 빌립니다\\n\"\n\n#: src/scope/borrow/mut.md:44\nmsgid \"// Immutably borrow a mutable object\\n\"\nmsgstr \"// 가변 객체를 불변으로 빌립니다\\n\"\n\n#: src/scope/borrow/mut.md:47\nmsgid \"// Borrow a mutable object as mutable\\n\"\nmsgstr \"// 가변 객체를 가변으로 빌립니다\\n\"\n\n#: src/scope/borrow/mut.md:50\nmsgid \"// Error! Cannot borrow an immutable object as mutable\\n\"\nmsgstr \"// 에러! 불변 객체는 가변으로 빌릴 수 없습니다\\n\"\n\n#: src/scope/borrow/mut.md:58\nmsgid \"[`static`](../lifetime/static_lifetime.md)\"\nmsgstr \"[`static`](../lifetime/static_lifetime.md)\"\n\n#: src/scope/borrow/alias.md:3\nmsgid \"\"\n\"Data can be immutably borrowed any number of times, but while immutably \"\n\"borrowed, the original data can't be mutably borrowed. On the other hand, \"\n\"only _one_ mutable borrow is allowed at a time. The original data can be \"\n\"borrowed again only _after_ the mutable reference has been used for the last \"\n\"time.\"\nmsgstr \"\"\n\"데이터는 횟수에 제한 없이 불변으로 빌려질 수 있지만, 불변으로 빌려진 동안에\"\n\"는 원본 데이터를 가변으로 빌릴 수 없습니다. 반면에, 가변 빌림은 한 번에 _하나\"\n\"_만 허용됩니다. 원본 데이터는 가변 참조가 마지막으로 사용된 _후_에만 다시 빌\"\n\"려질 수 있습니다.\"\n\n#: src/scope/borrow/alias.md:17\nmsgid \"// Data can be accessed via the references and the original owner\\n\"\nmsgstr \"// 데이터는 참조와 원본 소유자를 통해 접근할 수 있습니다\\n\"\n\n#: src/scope/borrow/alias.md:18 src/scope/borrow/alias.md:27\n#: src/scope/borrow/alias.md:49\nmsgid \"\\\"Point has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\\\"점의 좌표: ({}, {}, {})\\\"\"\n\n#: src/scope/borrow/alias.md:21\nmsgid \"\"\n\"// Error! Can't borrow `point` as mutable because it's currently\\n\"\n\"    // borrowed as immutable.\\n\"\n\"    // let mutable_borrow = &mut point;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! 현재 불변으로 빌려진 상태이기 때문에 `point`를 가변으로 빌릴 수 없습\"\n\"니다.\\n\"\n\"// let mutable_borrow = &mut point;\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/scope/borrow/alias.md:26\nmsgid \"// The borrowed values are used again here\\n\"\nmsgstr \"// 빌려온 값들이 여기서 다시 사용됩니다\\n\"\n\n#: src/scope/borrow/alias.md:30\nmsgid \"\"\n\"// The immutable references are no longer used for the rest of the code so\\n\"\n\"    // it is possible to reborrow with a mutable reference.\\n\"\nmsgstr \"\"\n\"// 불변 참조들이 코드의 나머지 부분에서 더 이상 사용되지 않으므로\\n\"\n\"// 가변 참조로 다시 빌리는 것이 가능합니다.\\n\"\n\n#: src/scope/borrow/alias.md:34\nmsgid \"// Change data via mutable reference\\n\"\nmsgstr \"// 가변 참조를 통해 데이터를 변경합니다\\n\"\n\n#: src/scope/borrow/alias.md:39\nmsgid \"\"\n\"// Error! Can't borrow `point` as immutable because it's currently\\n\"\n\"    // borrowed as mutable.\\n\"\n\"    // let y = &point.y;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! 현재 가변으로 빌려진 상태이기 때문에 `point`를 불변으로 빌릴 수 없습\"\n\"니다.\\n\"\n\"// let y = &point.y;\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/scope/borrow/alias.md:44\nmsgid \"\"\n\"// Error! Can't print because `println!` takes an immutable reference.\\n\"\n\"    // println!(\\\"Point Z coordinate is {}\\\", point.z);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `println!`은 불변 참조를 받기 때문에 출력할 수 없습니다.\\n\"\n\"// println!(\\\"점의 Z 좌표는 {}입니다\\\", point.z);\\n\"\n\"// TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/scope/borrow/alias.md:48\nmsgid \"// Ok! Mutable references can be passed as immutable to `println!`\\n\"\nmsgstr \"// 좋습니다! 가변 참조는 불변 참조로 `println!`에 전달될 수 있습니다\\n\"\n\n#: src/scope/borrow/alias.md:52\nmsgid \"\"\n\"// The mutable reference is no longer used for the rest of the code so it\\n\"\n\"    // is possible to reborrow\\n\"\nmsgstr \"\"\n\"// 가변 참조가 코드의 나머지 부분에서 더 이상 사용되지 않으므로\\n\"\n\"// 다시 빌리는 것이 가능합니다\\n\"\n\n#: src/scope/borrow/alias.md:55\nmsgid \"\\\"Point now has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\\\"점은 이제 다음 좌표를 가집니다: ({}, {}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:3\nmsgid \"\"\n\"When doing pattern matching or destructuring via the `let` binding, the \"\n\"`ref` keyword can be used to take references to the fields of a struct/\"\n\"tuple. The example below shows a few instances where this can be useful:\"\nmsgstr \"\"\n\"`let` 바인딩을 통해 패턴 매칭이나 구조 분해를 수행할 때, `ref` 키워드를 사용\"\n\"하여 구조체/튜플 필드에 대한 참조를 가져올 수 있습니다. 아래 예제는 이것이 유\"\n\"용할 수 있는 몇 가지 사례를 보여줍니다:\"\n\n#: src/scope/borrow/ref.md:14\nmsgid \"\"\n\"// A `ref` borrow on the left side of an assignment is equivalent to\\n\"\n\"    // an `&` borrow on the right side.\\n\"\nmsgstr \"\"\n\"// 할당의 왼쪽 편에 있는 `ref` 빌림은\\n\"\n\"// 오른쪽 편에 있는 `&` 빌림과 동일합니다.\\n\"\n\n#: src/scope/borrow/ref.md:19\nmsgid \"\\\"ref_c1 equals ref_c2: {}\\\"\"\nmsgstr \"\\\"ref_c1은 ref_c2와 같습니다: {}\\\"\"\n\n#: src/scope/borrow/ref.md:23\nmsgid \"// `ref` is also valid when destructuring a struct.\\n\"\nmsgstr \"// `ref`는 구조체를 구조 분해할 때도 유효합니다.\\n\"\n\n#: src/scope/borrow/ref.md:25\nmsgid \"// `ref_to_x` is a reference to the `x` field of `point`.\\n\"\nmsgstr \"// `ref_to_x`는 `point`의 `x` 필드에 대한 참조입니다.\\n\"\n\n#: src/scope/borrow/ref.md:28\nmsgid \"// Return a copy of the `x` field of `point`.\\n\"\nmsgstr \"// `point`의 `x` 필드 복사본을 반환합니다.\\n\"\n\n#: src/scope/borrow/ref.md:32\nmsgid \"// A mutable copy of `point`\\n\"\nmsgstr \"// `point`의 가변 복사본\\n\"\n\n#: src/scope/borrow/ref.md:36\nmsgid \"// `ref` can be paired with `mut` to take mutable references.\\n\"\nmsgstr \"// `ref`는 `mut`와 짝을 이루어 가변 참조를 가져올 수 있습니다.\\n\"\n\n#: src/scope/borrow/ref.md:39\nmsgid \"// Mutate the `y` field of `mutable_point` via a mutable reference.\\n\"\nmsgstr \"// 가변 참조를 통해 `mutable_point`의 `y` 필드를 변경합니다.\\n\"\n\n#: src/scope/borrow/ref.md:43\nmsgid \"\\\"point is ({}, {})\\\"\"\nmsgstr \"\\\"point는 ({}, {})입니다\\\"\"\n\n#: src/scope/borrow/ref.md:44\nmsgid \"\\\"mutable_point is ({}, {})\\\"\"\nmsgstr \"\\\"mutable_point는 ({}, {})입니다\\\"\"\n\n#: src/scope/borrow/ref.md:46\nmsgid \"// A mutable tuple that includes a pointer\\n\"\nmsgstr \"// 포인터를 포함하는 가변 튜플\\n\"\n\n#: src/scope/borrow/ref.md:50\nmsgid \"// Destructure `mutable_tuple` to change the value of `last`.\\n\"\nmsgstr \"// `mutable_tuple`을 구조 분해하여 `last` 값을 변경합니다.\\n\"\n\n#: src/scope/borrow/ref.md:55\nmsgid \"\\\"tuple is {:?}\\\"\"\nmsgstr \"\\\"튜플은 {:?}입니다\\\"\"\n\n#: src/scope/lifetime.md:3\nmsgid \"\"\n\"A _lifetime_ is a construct the compiler (or more specifically, its _borrow \"\n\"checker_) uses to ensure all borrows are valid. Specifically, a variable's \"\n\"lifetime begins when it is created and ends when it is destroyed. While \"\n\"lifetimes and scopes are often referred to together, they are not the same.\"\nmsgstr \"\"\n\"_라이프타임(lifetime)_은 컴파일러(더 구체적으로는 _빌림 검사기_)가 모든 빌림\"\n\"이 유효한지 확인하기 위해 사용하는 구성 요소입니다. 구체적으로, 변수의 라이프\"\n\"타임은 생성될 때 시작하고 파괴될 때 끝납니다. 라이프타임과 스코프는 종종 함\"\n\"께 언급되지만, 같은 것은 아닙니다.\"\n\n#: src/scope/lifetime.md:8\nmsgid \"\"\n\"Take, for example, the case where we borrow a variable via `&`. The borrow \"\n\"has a lifetime that is determined by where it is declared. As a result, the \"\n\"borrow is valid as long as it ends before the lender is destroyed. However, \"\n\"the scope of the borrow is determined by where the reference is used.\"\nmsgstr \"\"\n\"예를 들어, `&`를 통해 변수를 빌리는 경우를 생각해 봅시다. 빌림은 선언된 위치\"\n\"에 따라 결정되는 라이프타임을 가집니다. 결과적으로 빌림은 빌려준 대상이 파괴\"\n\"되기 전에 끝나는 한 유효합니다. 하지만 빌림의 스코프는 참조가 사용되는 위치\"\n\"에 따라 결정됩니다.\"\n\n#: src/scope/lifetime.md:13\nmsgid \"\"\n\"In the following example and in the rest of this section, we will see how \"\n\"lifetimes relate to scopes, as well as how the two differ.\"\nmsgstr \"\"\n\"다음 예제와 이 섹션의 나머지 부분에서 라이프타임이 스코프와 어떻게 관련되어 \"\n\"있는지, 그리고 두 가지가 어떻게 다른지 살펴보겠습니다.\"\n\n#: src/scope/lifetime.md:17\nmsgid \"\"\n\"// Lifetimes are annotated below with lines denoting the creation\\n\"\n\"// and destruction of each variable.\\n\"\n\"// `i` has the longest lifetime because its scope entirely encloses\\n\"\n\"// both `borrow1` and `borrow2`. The duration of `borrow1` compared\\n\"\n\"// to `borrow2` is irrelevant since they are disjoint.\\n\"\nmsgstr \"\"\n\"// 아래에는 각 변수의 생성과 파괴를 나타내는 선으로 라이프타임이 주석 처리되\"\n\"어 있습니다.\\n\"\n\"// `i`의 스코프가 `borrow1`과 `borrow2`를 완전히 감싸고 있기 때문에\\n\"\n\"// `i`는 가장 긴 라이프타임을 가집니다. `borrow1`과 `borrow2`는 서로 겹치지 \"\n\"않으므로\\n\"\n\"// 둘의 기간 비교는 무의미합니다.\\n\"\n\n#: src/scope/lifetime.md:23\nmsgid \"\"\n\"// Lifetime for `i` starts. ────────────────┐\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `i`의 라이프타임 시작. ──────────────────┐\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:25 src/scope/lifetime.md:32\nmsgid \"//                                                   │\\n\"\nmsgstr \"//                                                   │\\n\"\n\n#: src/scope/lifetime.md:26\nmsgid \"\"\n\"// `borrow1` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\"// `borrow1` 라이프타임 시작. ──┐│\\n\"\n\"        //                                                ││\\n\"\n\n#: src/scope/lifetime.md:28\nmsgid \"\\\"borrow1: {}\\\"\"\nmsgstr \"\\\"borrow1: {}\\\"\"\n\n#: src/scope/lifetime.md:28 src/scope/lifetime.md:35\nmsgid \"//              ││\\n\"\nmsgstr \"//              ││\\n\"\n\n#: src/scope/lifetime.md:29\nmsgid \"\"\n\"// `borrow1` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `borrow1` 끝. ───────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:33\nmsgid \"\"\n\"// `borrow2` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\"// `borrow2` 라이프타임 시작. ──┐│\\n\"\n\"        //                                                ││\\n\"\n\n#: src/scope/lifetime.md:35\nmsgid \"\\\"borrow2: {}\\\"\"\nmsgstr \"\\\"borrow2: {}\\\"\"\n\n#: src/scope/lifetime.md:36\nmsgid \"\"\n\"// `borrow2` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `borrow2` 끝. ───────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:38\nmsgid \"// Lifetime ends. ─────────────────────────────────────┘\\n\"\nmsgstr \"// 라이프타임 끝. ─────────────────────────────────────┘\\n\"\n\n#: src/scope/lifetime.md:41\nmsgid \"\"\n\"Note that no names or types are assigned to label lifetimes. This restricts \"\n\"how lifetimes will be able to be used as we will see.\"\nmsgstr \"\"\n\"레이블 라이프타임에는 이름이나 타입이 할당되지 않는다는 점에 유의하세요. 이\"\n\"는 앞으로 보게 될 것처럼 라이프타임을 사용하는 방식에 제한을 줍니다.\"\n\n#: src/scope/lifetime/explicit.md:3\nmsgid \"\"\n\"The borrow checker uses explicit lifetime annotations to determine how long \"\n\"references should be valid. In cases where lifetimes are not elided[^1], \"\n\"Rust requires explicit annotations to determine what the lifetime of a \"\n\"reference should be. The syntax for explicitly annotating a lifetime uses an \"\n\"apostrophe character as follows:\"\nmsgstr \"\"\n\"빌림 검사기는 참조가 얼마나 오래 유효해야 하는지 결정하기 위해 명시적 라이프\"\n\"타임 어노테이션을 사용합니다. 라이프타임이 생략(elided)[^1]되지 않는 경우, \"\n\"Rust는 참조의 라이프타임이 어떻게 되어야 하는지 결정하기 위해 명시적인 어노테\"\n\"이션을 요구합니다. 라이프타임을 명시적으로 어노테이션하는 구문은 다음과 같이 \"\n\"아포스트로피 문자를 사용합니다:\"\n\n#: src/scope/lifetime/explicit.md:10\nmsgid \"// `foo` has a lifetime parameter `'a`\\n\"\nmsgstr \"// `foo`는 라이프타임 파라미터 `'a`를 가집니다\\n\"\n\n#: src/scope/lifetime/explicit.md:14\nmsgid \"\"\n\"Similar to [closures](../../fn/closures/anonymity.md), using lifetimes \"\n\"requires generics. Additionally, this lifetime syntax indicates that the \"\n\"lifetime of `foo` may not exceed that of `'a`. Explicit annotation of a type \"\n\"has the form `&'a T` where `'a` has already been introduced.\"\nmsgstr \"\"\n\"[클로저](../../fn/closures/anonymity.md)와 유사하게, 라이프타임을 사용하려면 \"\n\"제네릭이 필요합니다. 또한, 이 라이프타임 구문은 `foo`의 라이프타임이 `'a`의 \"\n\"라이프타임을 초과할 수 없음을 나타냅니다. 타입의 명시적 어노테이션은 `&'a T` \"\n\"형식을 가지며, 여기서 `'a`는 이미 도입된 라이프타임입니다.\"\n\n#: src/scope/lifetime/explicit.md:19\nmsgid \"In cases with multiple lifetimes, the syntax is similar:\"\nmsgstr \"여러 라이프타임이 있는 경우에도 구문은 유사합니다:\"\n\n#: src/scope/lifetime/explicit.md:22\nmsgid \"// `foo` has lifetime parameters `'a` and `'b`\\n\"\nmsgstr \"// `foo`는 라이프타임 파라미터 `'a`와 `'b`를 가집니다\\n\"\n\n#: src/scope/lifetime/explicit.md:26\nmsgid \"\"\n\"In this case, the lifetime of `foo` cannot exceed that of either `'a` _or_ \"\n\"`'b`.\"\nmsgstr \"\"\n\"이 경우, `foo`의 라이프타임은 `'a` _또는_ `'b` 중 어느 하나의 라이프타임도 초\"\n\"과할 수 없습니다.\"\n\n#: src/scope/lifetime/explicit.md:28\nmsgid \"See the following example for explicit lifetime annotation in use:\"\nmsgstr \"명시적 라이프타임 어노테이션이 사용된 다음 예제를 참조하세요:\"\n\n#: src/scope/lifetime/explicit.md:31\nmsgid \"\"\n\"// `print_refs` takes two references to `i32` which have different\\n\"\n\"// lifetimes `'a` and `'b`. These two lifetimes must both be at\\n\"\n\"// least as long as the function `print_refs`.\\n\"\nmsgstr \"\"\n\"// `print_refs`는 서로 다른 라이프타임 `'a`와 `'b`를 가진\\n\"\n\"// 두 개의 `i32` 참조를 받습니다. 이 두 라이프타임은 모두\\n\"\n\"// 적어도 `print_refs` 함수만큼 길어야 합니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:35\nmsgid \"\\\"x is {} and y is {}\\\"\"\nmsgstr \"\\\"x는 {}이고 y는 {}입니다\\\"\"\n\n#: src/scope/lifetime/explicit.md:37\nmsgid \"\"\n\"// A function which takes no arguments, but has a lifetime parameter `'a`.\\n\"\nmsgstr \"// 인자를 받지 않지만 라이프타임 파라미터 `'a`를 가진 함수입니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:42\nmsgid \"// ERROR: `_x` does not live long enough\\n\"\nmsgstr \"// 에러: `_x`의 수명이 충분히 길지 않습니다\\n\"\n\n#: src/scope/lifetime/explicit.md:44\nmsgid \"\"\n\"// Attempting to use the lifetime `'a` as an explicit type annotation\\n\"\n\"    // inside the function will fail because the lifetime of `&_x` is \"\n\"shorter\\n\"\n\"    // than that of `_y`. A short lifetime cannot be coerced into a longer \"\n\"one.\\n\"\nmsgstr \"\"\n\"// 함수 내부에서 라이프타임 `'a`를 명시적 타입 어노테이션으로 사용하려고 하\"\n\"면\\n\"\n\"    // 실패합니다. `&_x`의 라이프타임이 `_y`의 라이프타임보다 짧기 때문입니\"\n\"다.\\n\"\n\"    // 짧은 라이프타임은 더 긴 라이프타임으로 강제 변환될 수 없습니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:50\nmsgid \"// Create variables to be borrowed below.\\n\"\nmsgstr \"// 아래에서 빌려올 변수들을 생성합니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:53\nmsgid \"// Borrows (`&`) of both variables are passed into the function.\\n\"\nmsgstr \"// 두 변수의 빌림(`&`)이 함수로 전달됩니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:55\nmsgid \"\"\n\"// Any input which is borrowed must outlive the borrower.\\n\"\n\"    // In other words, the lifetime of `four` and `nine` must\\n\"\n\"    // be longer than that of `print_refs`.\\n\"\nmsgstr \"\"\n\"// 빌려온 모든 입력은 빌리는 주체보다 오래 살아야 합니다.\\n\"\n\"    // 다시 말해, `four`와 `nine`의 라이프타임은\\n\"\n\"    // `print_refs`의 라이프타임보다 길어야 합니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:60\nmsgid \"\"\n\"// `failed_borrow` contains no references to force `'a` to be\\n\"\n\"    // longer than the lifetime of the function, but `'a` is longer.\\n\"\n\"    // Because the lifetime is never constrained, it defaults to `'static`.\\n\"\nmsgstr \"\"\n\"// `failed_borrow`는 `'a`가 함수의 라이프타임보다 길어야 함을 강제하는\\n\"\n\"// 참조를 포함하지 않지만, `'a`는 더 깁니다.\\n\"\n\"// 라이프타임이 결코 제약되지 않으므로, 이는 `'static`으로 기본 설정됩니다.\\n\"\n\n#: src/scope/lifetime/explicit.md:66\nmsgid \"\"\n\"[elision](elision.md) implicitly annotates lifetimes and so is different.\"\nmsgstr \"\"\n\"[생략(elision)](elision.md)은 암시적으로 라이프타임을 어노테이션하므로 다릅니\"\n\"다.\"\n\n#: src/scope/lifetime/explicit.md:70\nmsgid \"[generics](../../generics.md) and [closures](../../fn/closures.md)\"\nmsgstr \"[제네릭](../../generics.md) 및 [클로저](../../fn/closures.md)\"\n\n#: src/scope/lifetime/fn.md:3\nmsgid \"\"\n\"Ignoring [elision](elision.md), function signatures with lifetimes have a \"\n\"few constraints:\"\nmsgstr \"\"\n\"[생략](elision.md)을 무시하고, 라이프타임을 가진 함수 시그니처에는 몇 가지 제\"\n\"약 사항이 있습니다:\"\n\n#: src/scope/lifetime/fn.md:5\nmsgid \"any reference _must_ have an annotated lifetime.\"\nmsgstr \"모든 참조는 _반드시_ 어노테이션된 라이프타임을 가져야 합니다.\"\n\n#: src/scope/lifetime/fn.md:6\nmsgid \"\"\n\"any reference being returned _must_ have the same lifetime as an input or be \"\n\"`static`.\"\nmsgstr \"\"\n\"반환되는 모든 참조는 입력과 동일한 라이프타임을 가지거나 `static`이어야 _합니\"\n\"다_.\"\n\n#: src/scope/lifetime/fn.md:9\nmsgid \"\"\n\"Additionally, note that returning references without input is banned if it \"\n\"would result in returning references to invalid data. The following example \"\n\"shows off some valid forms of functions with lifetimes:\"\nmsgstr \"\"\n\"또한, 입력 없이 참조를 반환하는 것이 유효하지 않은 데이터에 대한 참조를 반환\"\n\"하는 결과를 낳는다면 금지된다는 점에 유의하세요. 다음 예제는 라이프타임이 있\"\n\"는 유효한 함수 형태를 보여줍니다:\"\n\n#: src/scope/lifetime/fn.md:14\nmsgid \"\"\n\"// One input reference with lifetime `'a` which must live\\n\"\n\"// at least as long as the function.\\n\"\nmsgstr \"\"\n\"// 라이프타임 `'a`를 가진 하나의 입력 참조입니다.\\n\"\n\"// 이 참조는 적어도 함수만큼 오래 살아야 합니다.\\n\"\n\n#: src/scope/lifetime/fn.md:17\nmsgid \"\\\"`print_one`: x is {}\\\"\"\nmsgstr \"\\\"`print_one`: x는 {}입니다\\\"\"\n\n#: src/scope/lifetime/fn.md:19\nmsgid \"// Mutable references are possible with lifetimes as well.\\n\"\nmsgstr \"// 가변 참조도 라이프타임과 함께 사용할 수 있습니다.\\n\"\n\n#: src/scope/lifetime/fn.md:24\nmsgid \"\"\n\"// Multiple elements with different lifetimes. In this case, it\\n\"\n\"// would be fine for both to have the same lifetime `'a`, but\\n\"\n\"// in more complex cases, different lifetimes may be required.\\n\"\nmsgstr \"\"\n\"// 서로 다른 라이프타임을 가진 여러 요소들입니다. 이 경우,\\n\"\n\"// 둘 다 동일한 라이프타임 `'a`를 가져도 괜찮지만,\\n\"\n\"// 더 복잡한 경우에는 서로 다른 라이프타임이 필요할 수 있습니다.\\n\"\n\n#: src/scope/lifetime/fn.md:29\nmsgid \"\\\"`print_multi`: x is {}, y is {}\\\"\"\nmsgstr \"\\\"`print_multi`: x는 {}, y는 {}입니다\\\"\"\n\n#: src/scope/lifetime/fn.md:31\nmsgid \"\"\n\"// Returning references that have been passed in is acceptable.\\n\"\n\"// However, the correct lifetime must be returned.\\n\"\nmsgstr \"\"\n\"// 전달된 참조를 반환하는 것은 허용됩니다.\\n\"\n\"// 하지만, 올바른 라이프타임이 반환되어야 합니다.\\n\"\n\n#: src/scope/lifetime/fn.md:35\nmsgid \"\"\n\"//fn invalid_output<'a>() -> &'a String { &String::from(\\\"foo\\\") }\\n\"\n\"// The above is invalid: `'a` must live longer than the function.\\n\"\n\"// Here, `&String::from(\\\"foo\\\")` would create a `String`, followed by a\\n\"\n\"// reference. Then the data is dropped upon exiting the scope, leaving\\n\"\n\"// a reference to invalid data to be returned.\\n\"\nmsgstr \"\"\n\"//fn invalid_output<'a>() -> &'a String { &String::from(\\\"foo\\\") }\\n\"\n\"// 위 코드는 유효하지 않습니다: `'a`는 함수보다 오래 살아야 합니다.\\n\"\n\"// 여기서 `&String::from(\\\"foo\\\")`는 `String`을 생성한 후 참조를 생성합니\"\n\"다.\\n\"\n\"// 그런 다음 스코프를 벗어날 때 데이터가 드롭되어,\\n\"\n\"// 유효하지 않은 데이터에 대한 참조가 반환됩니다.\\n\"\n\n#: src/scope/lifetime/fn.md:60\nmsgid \"[Functions](../../fn.md)\"\nmsgstr \"[함수](../../fn.md)\"\n\n#: src/scope/lifetime/methods.md:3\nmsgid \"Methods are annotated similarly to functions:\"\nmsgstr \"메서드는 함수와 유사하게 어노테이션됩니다:\"\n\n#: src/scope/lifetime/methods.md:9\nmsgid \"// Annotate lifetimes as in a standalone function.\\n\"\nmsgstr \"// 독립형 함수처럼 라이프타임을 어노테이션합니다.\\n\"\n\n#: src/scope/lifetime/methods.md:12\nmsgid \"\\\"`print`: {}\\\"\"\nmsgstr \"\\\"`print`: {}\\\"\"\n\n#: src/scope/lifetime/methods.md:26\nmsgid \"[methods](../../fn/methods.md)\"\nmsgstr \"[메서드](../../fn/methods.md)\"\n\n#: src/scope/lifetime/struct.md:3\nmsgid \"Annotation of lifetimes in structures are also similar to functions:\"\nmsgstr \"구조체에서의 라이프타임 어노테이션도 함수와 비슷합니다:\"\n\n#: src/scope/lifetime/struct.md:6\nmsgid \"\"\n\"// A type `Borrowed` which houses a reference to an\\n\"\n\"// `i32`. The reference to `i32` must outlive `Borrowed`.\\n\"\nmsgstr \"\"\n\"// `i32`에 대한 참조를 보관하는 `Borrowed` 타입입니다.\\n\"\n\"// `i32`에 대한 참조는 `Borrowed`보다 오래 살아야 합니다.\\n\"\n\n#: src/scope/lifetime/struct.md:10\nmsgid \"// Similarly, both references here must outlive this structure.\\n\"\nmsgstr \"// 마찬가지로, 여기의 두 참조는 이 구조체보다 오래 살아야 합니다.\\n\"\n\n#: src/scope/lifetime/struct.md:17\nmsgid \"// An enum which is either an `i32` or a reference to one.\\n\"\nmsgstr \"// `i32`이거나 이에 대한 참조인 열거형입니다.\\n\"\n\n#: src/scope/lifetime/struct.md:34 src/scope/lifetime/struct.md:36\nmsgid \"\\\"x is borrowed in {:?}\\\"\"\nmsgstr \"\\\"x는 {:?}에서 빌려졌습니다\\\"\"\n\n#: src/scope/lifetime/struct.md:35\nmsgid \"\\\"x and y are borrowed in {:?}\\\"\"\nmsgstr \"\\\"x와 y는 {:?}에서 빌려졌습니다\\\"\"\n\n#: src/scope/lifetime/struct.md:37\nmsgid \"\\\"y is *not* borrowed in {:?}\\\"\"\nmsgstr \"\\\"y는 {:?}에서 빌려지지 *않았습니다*\\\"\"\n\n#: src/scope/lifetime/struct.md:43\nmsgid \"[`struct`s](../../custom_types/structs.md)\"\nmsgstr \"[`struct`](../../custom_types/structs.md)\"\n\n#: src/scope/lifetime/trait.md:3\nmsgid \"\"\n\"Annotation of lifetimes in trait methods basically are similar to functions. \"\n\"Note that `impl` may have annotation of lifetimes too.\"\nmsgstr \"\"\n\"트레이트 메서드의 라이프타임 어노테이션은 기본적으로 함수와 유사합니다. \"\n\"`impl`도 라이프타임 어노테이션을 가질 수 있음에 유의하세요.\"\n\n#: src/scope/lifetime/trait.md:7\nmsgid \"// A struct with annotation of lifetimes.\\n\"\nmsgstr \"// 라이프타임 어노테이션이 있는 구조체.\\n\"\n\n#: src/scope/lifetime/trait.md:12\nmsgid \"// Annotate lifetimes to impl.\\n\"\nmsgstr \"// impl에 라이프타임을 어노테이션합니다.\\n\"\n\n#: src/scope/lifetime/trait.md:24\nmsgid \"\\\"b is {:?}\\\"\"\nmsgstr \"\\\"b는 {:?}입니다\\\"\"\n\n#: src/scope/lifetime/trait.md:30\nmsgid \"[`trait`s](../../trait.md)\"\nmsgstr \"[`trait`](../../trait.md)\"\n\n#: src/scope/lifetime/lifetime_bounds.md:3\nmsgid \"\"\n\"Just like generic types can be bounded, lifetimes (themselves generic) use \"\n\"bounds as well. The `:` character has a slightly different meaning here, but \"\n\"`+` is the same. Note how the following read:\"\nmsgstr \"\"\n\"제네릭 타입이 바운드될 수 있는 것처럼, (그 자체로 제네릭인) 라이프타임도 바운\"\n\"드를 사용합니다. 여기서 `:` 문자는 약간 다른 의미를 갖지만, `+`는 동일합니\"\n\"다. 다음이 어떻게 읽히는지 주목하세요:\"\n\n#: src/scope/lifetime/lifetime_bounds.md:7\nmsgid \"`T: 'a`: _All_ references in `T` must outlive lifetime `'a`.\"\nmsgstr \"\"\n\"`T: 'a`: `T` 내의 _모든_ 참조는 라이프타임 `'a`보다 오래 살아야 합니다.\"\n\n#: src/scope/lifetime/lifetime_bounds.md:8\nmsgid \"\"\n\"`T: Trait + 'a`: Type `T` must implement trait `Trait` and _all_ references \"\n\"in `T` must outlive `'a`.\"\nmsgstr \"\"\n\"`T: Trait + 'a`: 타입 `T`는 트레이트 `Trait`를 구현해야 하며, `T` 내의 _모든\"\n\"_ 참조는 `'a`보다 오래 살아야 합니다.\"\n\n#: src/scope/lifetime/lifetime_bounds.md:11\nmsgid \"\"\n\"The example below shows the above syntax in action used after keyword \"\n\"`where`:\"\nmsgstr \"\"\n\"아래 예제는 `where` 키워드 뒤에 사용된 위 구문의 실제 사용 예를 보여줍니다:\"\n\n#: src/scope/lifetime/lifetime_bounds.md:14\nmsgid \"// Trait to bound with.\\n\"\nmsgstr \"// 바운드할 트레이트.\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:17\nmsgid \"\"\n\"// `Ref` contains a reference to a generic type `T` that has\\n\"\n\"// some lifetime `'a` unknown by `Ref`. `T` is bounded such that any\\n\"\n\"// *references* in `T` must outlive `'a`. Additionally, the lifetime\\n\"\n\"// of `Ref` may not exceed `'a`.\\n\"\nmsgstr \"\"\n\"// `Ref`는 `Ref`가 알 수 없는 어떤 라이프타임 `'a`를 가진 제네릭 타입 `T`에 \"\n\"대한\\n\"\n\"// 참조를 포함합니다. `T`는 `T` 내부의 모든 *참조*가 `'a`보다 오래 살아야 한\"\n\"다는\\n\"\n\"// 바운드를 가집니다. 추가적으로, `Ref`의 라이프타임은 `'a`를 초과할 수 없습\"\n\"니다.\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:22\nmsgid \"// A generic function which prints using the `Debug` trait.\\n\"\nmsgstr \"// `Debug` 트레이트를 사용하여 출력하는 제네릭 함수.\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:26\nmsgid \"\\\"`print`: t is {:?}\\\"\"\nmsgstr \"\\\"`print`: t는 {:?}입니다\\\"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:28\nmsgid \"\"\n\"// Here a reference to `T` is taken where `T` implements\\n\"\n\"// `Debug` and all *references* in `T` outlive `'a`. In\\n\"\n\"// addition, `'a` must outlive the function.\\n\"\nmsgstr \"\"\n\"// 여기서 `T`는 `Debug`를 구현하고 `T`의 모든 *참조*가 `'a`보다 오래 사는\\n\"\n\"// `T`에 대한 참조를 받습니다. 또한, `'a`는 함수보다 오래 살아야 합니다.\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:34\nmsgid \"\\\"`print_ref`: t is {:?}\\\"\"\nmsgstr \"\\\"`print_ref`: t는 {:?}입니다\\\"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:48\nmsgid \"\"\n\"[generics](../../generics.md), [bounds in generics](../../generics/\"\n\"bounds.md), and [multiple bounds in generics](../../generics/multi_bounds.md)\"\nmsgstr \"\"\n\"[제네릭](../../generics.md), [제네릭의 바운드](../../generics/bounds.md), 그\"\n\"리고 [제네릭의 다중 바운드](../../generics/multi_bounds.md)\"\n\n#: src/scope/lifetime/lifetime_coercion.md:3\nmsgid \"\"\n\"A longer lifetime can be coerced into a shorter one so that it works inside \"\n\"a scope it normally wouldn't work in. This comes in the form of inferred \"\n\"coercion by the Rust compiler, and also in the form of declaring a lifetime \"\n\"difference:\"\nmsgstr \"\"\n\"더 긴 라이프타임은 평소에는 작동하지 않을 스코프 내에서도 작동하도록 더 짧은 \"\n\"라이프타임으로 강제 변환(coerced)될 수 있습니다. 이는 Rust 컴파일러에 의한 추\"\n\"론된 강제 변환 형태와 라이프타임 차이를 선언하는 형태로 나타납니다:\"\n\n#: src/scope/lifetime/lifetime_coercion.md:9\nmsgid \"\"\n\"// Here, Rust infers a lifetime that is as short as possible.\\n\"\n\"// The two references are then coerced to that lifetime.\\n\"\nmsgstr \"\"\n\"// 여기서 Rust는 가능한 한 짧은 라이프타임을 추론합니다.\\n\"\n\"// 그 후 두 참조는 해당 라이프타임으로 강제 변환됩니다.\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:14\nmsgid \"\"\n\"// `<'a: 'b, 'b>` reads as lifetime `'a` is at least as long as `'b`.\\n\"\n\"// Here, we take in an `&'a i32` and return a `&'b i32` as a result of \"\n\"coercion.\\n\"\nmsgstr \"\"\n\"// `<'a: 'b, 'b>`는 라이프타임 `'a`가 적어도 `'b`만큼 길다는 뜻으로 읽힙니\"\n\"다.\\n\"\n\"// 여기서 우리는 `&'a i32`를 받아 강제 변환의 결과로 `&'b i32`를 반환합니\"\n\"다.\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:22\nmsgid \"// Longer lifetime\\n\"\nmsgstr \"// 더 긴 라이프타임\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:25\nmsgid \"// Shorter lifetime\\n\"\nmsgstr \"// 더 짧은 라이프타임\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:27\nmsgid \"\\\"The product is {}\\\"\"\nmsgstr \"\\\"곱은 {}입니다\\\"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:28\nmsgid \"\\\"{} is the first\\\"\"\nmsgstr \"\\\"{}은(는) 첫 번째입니다\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:3\nmsgid \"\"\n\"Rust has a few reserved lifetime names. One of those is `'static`. You might \"\n\"encounter it in two situations:\"\nmsgstr \"\"\n\"Rust에는 몇 가지 예약된 라이프타임 이름이 있습니다. 그중 하나가 `'static`입니\"\n\"다. 두 가지 상황에서 이를 마주칠 수 있습니다:\"\n\n#: src/scope/lifetime/static_lifetime.md:7\nmsgid \"// A reference with 'static lifetime:\\n\"\nmsgstr \"// 'static 라이프타임을 가진 참조:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:8\nmsgid \"\\\"hello world\\\"\"\nmsgstr \"\\\"안녕 세상\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:9\nmsgid \"// 'static as part of a trait bound:\\n\"\nmsgstr \"// 트레이트 바운드의 일부로서의 'static:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:14\nmsgid \"\"\n\"Both are related but subtly different and this is a common source for \"\n\"confusion when learning Rust. Here are some examples for each situation:\"\nmsgstr \"\"\n\"두 가지는 관련이 있지만 미묘하게 다르며, 이는 Rust를 배울 때 흔한 혼란의 원인\"\n\"이 됩니다. 각 상황에 대한 몇 가지 예시를 소개합니다:\"\n\n#: src/scope/lifetime/static_lifetime.md:17\nmsgid \"Reference lifetime\"\nmsgstr \"참조 라이프타임\"\n\n#: src/scope/lifetime/static_lifetime.md:19\nmsgid \"\"\n\"As a reference lifetime `'static` indicates that the data pointed to by the \"\n\"reference lives for the remaining lifetime of the running program. It can \"\n\"still be coerced to a shorter lifetime.\"\nmsgstr \"\"\n\"참조 라이프타임으로서 `'static`은 참조가 가리키는 데이터가 실행 중인 프로그램\"\n\"의 남은 수명 동안 살아있음을 나타냅니다. 여전히 더 짧은 라이프타임으로 강제 \"\n\"변환될 수 있습니다.\"\n\n#: src/scope/lifetime/static_lifetime.md:23\nmsgid \"\"\n\"There are two common ways to make a variable with `'static` lifetime, and \"\n\"both are stored in the read-only memory of the binary:\"\nmsgstr \"\"\n\"`'static` 라이프타임을 가진 변수를 만드는 두 가지 일반적인 방법이 있으며, 둘 \"\n\"다 바이너리의 읽기 전용 메모리에 저장됩니다:\"\n\n#: src/scope/lifetime/static_lifetime.md:26\nmsgid \"Make a constant with the `static` declaration.\"\nmsgstr \"`static` 선언으로 상수를 만듭니다.\"\n\n#: src/scope/lifetime/static_lifetime.md:27\nmsgid \"Make a `string` literal which has type: `&'static str`.\"\nmsgstr \"`&'static str` 타입을 갖는 `문자열` 리터럴을 만듭니다.\"\n\n#: src/scope/lifetime/static_lifetime.md:29\nmsgid \"See the following example for a display of each method:\"\nmsgstr \"각 방법에 대한 예제는 다음을 참조하세요:\"\n\n#: src/scope/lifetime/static_lifetime.md:32\nmsgid \"// Make a constant with `'static` lifetime.\\n\"\nmsgstr \"// `'static` 라이프타임을 가진 상수를 만듭니다.\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:34\nmsgid \"\"\n\"// Returns a reference to `NUM` where its `'static`\\n\"\n\"// lifetime is coerced to that of the input argument.\\n\"\nmsgstr \"\"\n\"// `NUM`에 대한 참조를 반환합니다. 여기서 `NUM`의 `'static`\\n\"\n\"// 라이프타임은 입력 인자의 라이프타임으로 강제 변환됩니다.\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:43\nmsgid \"// Make a `string` literal and print it:\\n\"\nmsgstr \"// `문자열` 리터럴을 만들고 출력합니다:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:44\nmsgid \"\\\"I'm in read-only memory\\\"\"\nmsgstr \"\\\"저는 읽기 전용 메모리에 있습니다\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:45\nmsgid \"\\\"static_string: {}\\\"\"\nmsgstr \"\\\"static_string: {}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:47\nmsgid \"\"\n\"// When `static_string` goes out of scope, the reference\\n\"\n\"        // can no longer be used, but the data remains in the binary.\\n\"\nmsgstr \"\"\n\"// `static_string`이 스코프를 벗어나면, 참조는\\n\"\n\"// 더 이상 사용할 수 없지만, 데이터는 바이너리에 남아 있습니다.\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:52\nmsgid \"// Make an integer to use for `coerce_static`:\\n\"\nmsgstr \"// `coerce_static`에 사용할 정수를 만듭니다:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:55\nmsgid \"// Coerce `NUM` to lifetime of `lifetime_num`:\\n\"\nmsgstr \"// `NUM`을 `lifetime_num`의 라이프타임으로 강제 변환합니다:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:58\nmsgid \"\\\"coerced_static: {}\\\"\"\nmsgstr \"\\\"강제 변환된 static: {}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:61\nmsgid \"\\\"NUM: {} stays accessible!\\\"\"\nmsgstr \"\\\"NUM: {} 여전히 접근 가능합니다!\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:65\nmsgid \"\"\n\"Since `'static` references only need to be valid for the _remainder_ of a \"\n\"program's life, they can be created while the program is executed. Just to \"\n\"demonstrate, the below example uses [`Box::leak`](https://doc.rust-lang.org/\"\n\"std/boxed/struct.Box.html#method.leak) to dynamically create `'static` \"\n\"references. In that case it definitely doesn't live for the entire duration, \"\n\"but only from the leaking point onward.\"\nmsgstr \"\"\n\"`'static` 참조는 프로그램 수명의 _나머지_ 기간 동안만 유효하면 되므로, 프로그\"\n\"램이 실행되는 동안 생성될 수 있습니다. 아래 예제는 [`Box::leak`](https://\"\n\"doc.rust-lang.org/std/boxed/struct.Box.html#method.leak)를 사용하여 \"\n\"`'static` 참조를 동적으로 생성하는 방법을 보여줍니다. 이 경우 전체 기간 동안 \"\n\"살아있는 것은 아니지만, 누수 지점부터는 계속 살아있습니다.\"\n\n#: src/scope/lifetime/static_lifetime.md:90\nmsgid \"Trait bound\"\nmsgstr \"트레이트 바운드\"\n\n#: src/scope/lifetime/static_lifetime.md:92\nmsgid \"\"\n\"As a trait bound, it means the type does not contain any non-static \"\n\"references. Eg. the receiver can hold on to the type for as long as they \"\n\"want and it will never become invalid until they drop it.\"\nmsgstr \"\"\n\"트레이트 바운드로서, 이는 해당 타입이 정적이지 않은(non-static) 참조를 포함하\"\n\"지 않음을 의미합니다. 예를 들어, 수신자는 원하는 만큼 해당 타입을 보유할 수 \"\n\"있으며, 드롭할 때까지 절대 유효하지 않게 되지 않습니다.\"\n\n#: src/scope/lifetime/static_lifetime.md:96\nmsgid \"\"\n\"It's important to understand this means that any owned data always passes a \"\n\"`'static` lifetime bound, but a reference to that owned data generally does \"\n\"not:\"\nmsgstr \"\"\n\"이것이 의미하는 바를 이해하는 것이 중요합니다. 모든 소유된 데이터는 항상 \"\n\"`'static` 라이프타임 바운드를 통과하지만, 소유된 데이터에 대한 참조는 일반적\"\n\"으로 그렇지 않습니다:\"\n\n#: src/scope/lifetime/static_lifetime.md:104\nmsgid \"\\\"'static value passed in is: {:?}\\\"\"\nmsgstr \"\\\"'static 값이 전달되었습니다: {:?}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:108\nmsgid \"// i is owned and contains no references, thus it's 'static:\\n\"\nmsgstr \"// i는 소유된 데이터이며 참조를 포함하지 않으므로 'static입니다:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:112\nmsgid \"\"\n\"// oops, &i only has the lifetime defined by the scope of\\n\"\n\"    // main(), so it's not 'static:\\n\"\nmsgstr \"\"\n\"// 이런, &i는 main()의 스코프에 의해 정의된 라이프타임만\\n\"\n\"// 가지므로 'static이 아닙니다:\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:118\nmsgid \"The compiler will tell you:\"\nmsgstr \"컴파일러는 다음과 같이 알려줄 것입니다:\"\n\n#: src/scope/lifetime/static_lifetime.md:135\nmsgid \"[`'static` constants](../../custom_types/constants.md)\"\nmsgstr \"[`'static` 상수](../../custom_types/constants.md)\"\n\n#: src/scope/lifetime/elision.md:3\nmsgid \"\"\n\"Some lifetime patterns are overwhelmingly common and so the borrow checker \"\n\"will allow you to omit them to save typing and to improve readability. This \"\n\"is known as elision. Elision exists in Rust solely because these patterns \"\n\"are common.\"\nmsgstr \"\"\n\"일부 라이프타임 패턴은 압도적으로 흔해서, 빌림 검사기는 타이핑을 줄이고 가독\"\n\"성을 높이기 위해 이를 생략할 수 있게 해줍니다. 이를 생략(elision)이라고 합니\"\n\"다. 생략은 오직 이러한 패턴이 흔하다는 이유만으로 Rust에 존재합니다.\"\n\n#: src/scope/lifetime/elision.md:8\nmsgid \"\"\n\"The following code shows a few examples of elision. For a more comprehensive \"\n\"description of elision, see [lifetime elision](https://doc.rust-lang.org/\"\n\"book/ch10-03-lifetime-syntax.html#lifetime-elision) in the book.\"\nmsgstr \"\"\n\"다음 코드는 생략의 몇 가지 예시를 보여줍니다. 생략에 대한 더 포괄적인 설명은 \"\n\"책의 [라이프타임 생략](https://doc.rust-lang.org/book/ch10-03-lifetime-\"\n\"syntax.html#lifetime-elision)을 참조하세요.\"\n\n#: src/scope/lifetime/elision.md:12\nmsgid \"\"\n\"// `elided_input` and `annotated_input` essentially have identical \"\n\"signatures\\n\"\n\"// because the lifetime of `elided_input` is inferred by the compiler:\\n\"\nmsgstr \"\"\n\"// `elided_input`과 `annotated_input`은 본질적으로 동일한 시그니처를 가집니\"\n\"다.\\n\"\n\"// `elided_input`의 라이프타임이 컴파일러에 의해 추론되기 때문입니다:\\n\"\n\n#: src/scope/lifetime/elision.md:15\nmsgid \"\\\"`elided_input`: {}\\\"\"\nmsgstr \"\\\"`elided_input`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:19\nmsgid \"\\\"`annotated_input`: {}\\\"\"\nmsgstr \"\\\"`annotated_input`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:21\nmsgid \"\"\n\"// Similarly, `elided_pass` and `annotated_pass` have identical signatures\\n\"\n\"// because the lifetime is added implicitly to `elided_pass`:\\n\"\nmsgstr \"\"\n\"// 마찬가지로, `elided_pass`와 `annotated_pass`는 동일한 시그니처를 가집니\"\n\"다.\\n\"\n\"// 라이프타임이 `elided_pass`에 암시적으로 추가되기 때문입니다:\\n\"\n\n#: src/scope/lifetime/elision.md:34\nmsgid \"\\\"`elided_pass`: {}\\\"\"\nmsgstr \"\\\"`elided_pass`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:35\nmsgid \"\\\"`annotated_pass`: {}\\\"\"\nmsgstr \"\\\"`annotated_pass`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:41\nmsgid \"\"\n\"[elision](https://doc.rust-lang.org/book/ch10-03-lifetime-\"\n\"syntax.html#lifetime-elision)\"\nmsgstr \"\"\n\"[생략](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#lifetime-\"\n\"elision)\"\n\n#: src/trait.md:3\nmsgid \"\"\n\"A `trait` is a collection of methods defined for an unknown type: `Self`. \"\n\"They can access other methods declared in the same trait.\"\nmsgstr \"\"\n\"`trait`는 알 수 없는 타입 `Self`에 대해 정의된 메서드들의 모음입니다. 이들은 \"\n\"동일한 트레이트 내에 선언된 다른 메서드에 접근할 수 있습니다.\"\n\n#: src/trait.md:6\nmsgid \"\"\n\"Traits can be implemented for any data type. In the example below, we define \"\n\"`Animal`, a group of methods. The `Animal` `trait` is then implemented for \"\n\"the `Sheep` data type, allowing the use of methods from `Animal` with a \"\n\"`Sheep`.\"\nmsgstr \"\"\n\"트레이트는 모든 데이터 타입에 대해 구현될 수 있습니다. 아래 예제에서는 메서\"\n\"드 그룹인 `Animal`을 정의합니다. 그런 다음 `Animal` `trait`를 `Sheep` 데이터 \"\n\"타입에 대해 구현하여 `Sheep`으로 `Animal`의 메서드를 사용할 수 있게 합니다.\"\n\n#: src/trait.md:15\nmsgid \"\"\n\"// Associated function signature; `Self` refers to the implementor type.\\n\"\nmsgstr \"// 연관 함수 시그니처; `Self`는 구현하는 타입을 가리킵니다.\\n\"\n\n#: src/trait.md:18\nmsgid \"// Method signatures; these will return a string.\\n\"\nmsgstr \"// 메서드 시그니처; 이들은 문자열을 반환할 것입니다.\\n\"\n\n#: src/trait.md:22\nmsgid \"// Traits can provide default method definitions.\\n\"\nmsgstr \"// 트레이트는 기본 메서드 정의를 제공할 수 있습니다.\\n\"\n\n#: src/trait.md:24\nmsgid \"\\\"{} says {}\\\"\"\nmsgstr \"\\\"{}가 말하길 {}\\\"\"\n\n#: src/trait.md:35\nmsgid \"// Implementor methods can use the implementor's trait methods.\\n\"\nmsgstr \"// 구현자의 메서드는 구현자의 트레이트 메서드를 사용할 수 있습니다.\\n\"\n\n#: src/trait.md:36\nmsgid \"\\\"{} is already naked...\\\"\"\nmsgstr \"\\\"{}는 이미 벌거벗었습니다...\\\"\"\n\n#: src/trait.md:38\nmsgid \"\\\"{} gets a haircut!\\\"\"\nmsgstr \"\\\"{}가 털을 깎습니다!\\\"\"\n\n#: src/trait.md:44 src/trait/dyn.md:25\nmsgid \"// Implement the `Animal` trait for `Sheep`.\\n\"\nmsgstr \"// `Sheep`에 대해 `Animal` 트레이트를 구현합니다.\\n\"\n\n#: src/trait.md:47\nmsgid \"// `Self` is the implementor type: `Sheep`.\\n\"\nmsgstr \"// `Self`는 구현하는 타입인 `Sheep`입니다.\\n\"\n\n#: src/trait.md:58\nmsgid \"\\\"baaaaah?\\\"\"\nmsgstr \"\\\"메에에에?\\\"\"\n\n#: src/trait.md:60 src/trait/dyn.md:29\nmsgid \"\\\"baaaaah!\\\"\"\nmsgstr \"\\\"메에에에!\\\"\"\n\n#: src/trait.md:64\nmsgid \"// Default trait methods can be overridden.\\n\"\nmsgstr \"// 기본 트레이트 메서드는 재정의(오버라이드)될 수 있습니다.\\n\"\n\n#: src/trait.md:66\nmsgid \"// For example, we can add some quiet contemplation.\\n\"\nmsgstr \"// 예를 들어, 조용한 사색을 추가할 수 있습니다.\\n\"\n\n#: src/trait.md:67\nmsgid \"\\\"{} pauses briefly... {}\\\"\"\nmsgstr \"\\\"{}가 잠시 멈춥니다... {}\\\"\"\n\n#: src/trait.md:72\nmsgid \"// Type annotation is necessary in this case.\\n\"\nmsgstr \"// 이 경우에는 타입 어노테이션이 필요합니다.\\n\"\n\n#: src/trait.md:73\nmsgid \"\\\"Dolly\\\"\"\nmsgstr \"\\\"돌리\\\"\"\n\n#: src/trait.md:74\nmsgid \"// TODO ^ Try removing the type annotations.\\n\"\nmsgstr \"// TODO ^ 타입 어노테이션을 제거해 보세요.\\n\"\n\n#: src/trait/derive.md:3\nmsgid \"\"\n\"The compiler is capable of providing basic implementations for some traits \"\n\"via the `#[derive]` [attribute](../attribute.md). These traits can still be \"\n\"manually implemented if a more complex behavior is required.\"\nmsgstr \"\"\n\"컴파일러는 `#[derive]` [속성](../attribute.md)을 통해 일부 트레이트에 대한 기\"\n\"본적인 구현을 제공할 수 있습니다. 더 복잡한 동작이 필요한 경우에는 이러한 트\"\n\"레이트들을 수동으로 구현할 수도 있습니다.\"\n\n#: src/trait/derive.md:7\nmsgid \"The following is a list of derivable traits:\"\nmsgstr \"다음은 derive 가능한 트레이트 목록입니다:\"\n\n#: src/trait/derive.md:9\nmsgid \"\"\n\"Comparison traits: [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html), \"\n\"[`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html), [`PartialOrd`]\"\n\"(https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html).\"\nmsgstr \"\"\n\"비교 트레이트: [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html), \"\n\"[`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html), [`PartialOrd`]\"\n\"(https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html).\"\n\n#: src/trait/derive.md:11\nmsgid \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html), to create \"\n\"`T` from `&T` via a copy.\"\nmsgstr \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html), 복사를 통해 \"\n\"`&T`로부터 `T`를 생성합니다.\"\n\n#: src/trait/derive.md:12\nmsgid \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html), to give a \"\n\"type 'copy semantics' instead of 'move semantics'.\"\nmsgstr \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html), 타입에 '이\"\n\"동 의미론(move semantics)' 대신 '복사 의미론(copy semantics)'을 부여합니다.\"\n\n#: src/trait/derive.md:13\nmsgid \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html), to compute a \"\n\"hash from `&T`.\"\nmsgstr \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html), `&T`로부터 해시\"\n\"를 계산합니다.\"\n\n#: src/trait/derive.md:14\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html), to \"\n\"create an empty instance of a data type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html), 데이\"\n\"터 타입의 빈 인스턴스를 생성합니다.\"\n\n#: src/trait/derive.md:15\nmsgid \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html), to format a \"\n\"value using the `{:?}` formatter.\"\nmsgstr \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html), `{:?}` 포맷터\"\n\"를 사용하여 값을 형식화합니다.\"\n\n#: src/trait/derive.md:18\nmsgid \"// `Centimeters`, a tuple struct that can be compared\\n\"\nmsgstr \"// `Centimeters`, 비교 가능한 튜플 구조체\\n\"\n\n#: src/trait/derive.md:21\nmsgid \"// `Inches`, a tuple struct that can be printed\\n\"\nmsgstr \"// `Inches`, 출력 가능한 튜플 구조체\\n\"\n\n#: src/trait/derive.md:33\nmsgid \"// `Seconds`, a tuple struct with no additional attributes\\n\"\nmsgstr \"// `Seconds`, 추가 속성이 없는 튜플 구조체\\n\"\n\n#: src/trait/derive.md:40\nmsgid \"\"\n\"// Error: `Seconds` can't be printed; it doesn't implement the `Debug` \"\n\"trait\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러: `Seconds`는 출력될 수 없습니다. `Debug` 트레이트를 구현하지 않았기 \"\n\"때문입니다.\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요.\\n\"\n\n#: src/trait/derive.md:44\nmsgid \"\"\n\"// Error: `Seconds` can't be compared; it doesn't implement the `PartialEq` \"\n\"trait\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러: `Seconds`는 비교될 수 없습니다. `PartialEq` 트레이트를 구현하지 않았\"\n\"기 때문입니다.\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요.\\n\"\n\n#: src/trait/derive.md:50\nmsgid \"\\\"One foot equals {:?}\\\"\"\nmsgstr \"\\\"1피트는 {:?}와 같습니다.\\\"\"\n\n#: src/trait/derive.md:56\nmsgid \"\\\"smaller\\\"\"\nmsgstr \"\\\"더 작습니다\\\"\"\n\n#: src/trait/derive.md:58\nmsgid \"\\\"bigger\\\"\"\nmsgstr \"\\\"더 큽니다\\\"\"\n\n#: src/trait/derive.md:61\nmsgid \"\\\"One foot is {} than one meter.\\\"\"\nmsgstr \"\\\"1피트는 1미터보다 {}.\\\"\"\n\n#: src/trait/derive.md:67\nmsgid \"[`derive`](https://doc.rust-lang.org/reference/attributes.html#derive)\"\nmsgstr \"[`derive`](https://doc.rust-lang.org/reference/attributes.html#derive)\"\n\n#: src/trait/dyn.md:3\nmsgid \"\"\n\"The Rust compiler needs to know how much space every function's return type \"\n\"requires. This means all your functions have to return a concrete type. \"\n\"Unlike other languages, if you have a trait like `Animal`, you can't write a \"\n\"function that returns `Animal`, because its different implementations will \"\n\"need different amounts of memory.\"\nmsgstr \"\"\n\"Rust 컴파일러는 모든 함수의 반환 타입이 얼마나 많은 공간을 필요로 하는지 알아\"\n\"야 합니다. 이는 여러분의 모든 함수가 구체적인 타입을 반환해야 함을 의미합니\"\n\"다. 다른 언어와 달리, `Animal`과 같은 트레이트가 있을 때 `Animal`을 반환하는 \"\n\"함수를 작성할 수 없는데, 그 이유는 서로 다른 구현체들이 서로 다른 양의 메모리\"\n\"를 필요로 하기 때문입니다.\"\n\n#: src/trait/dyn.md:8\nmsgid \"\"\n\"However, there's an easy workaround. Instead of returning a trait object \"\n\"directly, our functions return a `Box` which _contains_ some `Animal`. A \"\n\"`box` is just a reference to some memory in the heap. Because a reference \"\n\"has a statically-known size, and the compiler can guarantee it points to a \"\n\"heap-allocated `Animal`, we can return a trait from our function!\"\nmsgstr \"\"\n\"하지만 쉬운 해결 방법이 있습니다. 트레이트 객체를 직접 반환하는 대신, 우리 함\"\n\"수는 어떤 `Animal`을 *포함하는* `Box`를 반환합니다. `Box`는 단지 힙 메모리에 \"\n\"대한 참조일 뿐입니다. 참조는 정적으로 알려진 크기를 가지며, 컴파일러는 그것\"\n\"이 힙에 할당된 `Animal`을 가리키고 있음을 보장할 수 있으므로, 우리 함수에서 \"\n\"트레이트를 반환할 수 있게 됩니다!\"\n\n#: src/trait/dyn.md:13\nmsgid \"\"\n\"Rust tries to be as explicit as possible whenever it allocates memory on the \"\n\"heap. So if your function returns a pointer-to-trait-on-heap in this way, \"\n\"you need to write the return type with the `dyn` keyword, e.g. `Box<dyn \"\n\"Animal>`.\"\nmsgstr \"\"\n\"Rust는 힙에 메모리를 할당할 때마다 가능한 한 명시적이려고 노력합니다. 따라서 \"\n\"여러분의 함수가 이런 방식으로 힙상의 트레이트에 대한 포인터를 반환한다면, 반\"\n\"환 타입에 `dyn` 키워드를 사용해야 합니다. 예: `Box<dyn Animal>`.\"\n\n#: src/trait/dyn.md:22\nmsgid \"// Instance method signature\\n\"\nmsgstr \"// 인스턴스 메서드 시그니처\\n\"\n\n#: src/trait/dyn.md:32\nmsgid \"// Implement the `Animal` trait for `Cow`.\\n\"\nmsgstr \"// `Cow`에 대해 `Animal` 트레이트를 구현합니다.\\n\"\n\n#: src/trait/dyn.md:36\nmsgid \"\\\"moooooo!\\\"\"\nmsgstr \"\\\"음메~!\\\"\"\n\n#: src/trait/dyn.md:39\nmsgid \"\"\n\"// Returns some struct that implements Animal, but we don't know which one \"\n\"at compile time.\\n\"\nmsgstr \"\"\n\"// `Animal`을 구현하는 어떤 구조체를 반환하지만, 컴파일 타임에는 그것이 무엇\"\n\"인지 알 수 없습니다.\\n\"\n\n#: src/trait/dyn.md:52\nmsgid \"\\\"You've randomly chosen an animal, and it says {}\\\"\"\nmsgstr \"\\\"동물을 무작위로 선택했고, 그 동물은 {}라고 말합니다.\\\"\"\n\n#: src/trait/ops.md:3\nmsgid \"\"\n\"In Rust, many of the operators can be overloaded via traits. That is, some \"\n\"operators can be used to accomplish different tasks based on their input \"\n\"arguments. This is possible because operators are syntactic sugar for method \"\n\"calls. For example, the `+` operator in `a + b` calls the `add` method (as \"\n\"in `a.add(b)`). This `add` method is part of the `Add` trait. Hence, the `+` \"\n\"operator can be used by any implementor of the `Add` trait.\"\nmsgstr \"\"\n\"Rust에서 많은 연산자들은 트레이트를 통해 오버로딩될 수 있습니다. 즉, 일부 연\"\n\"산자들은 입력 인자에 따라 서로 다른 작업을 수행하는 데 사용될 수 있습니다. 이\"\n\"는 연산자가 메서드 호출의 구문 설탕(syntactic sugar)이기 때문에 가능합니다. \"\n\"예를 들어, `a + b`에서의 `+` 연산자는 (`a.add(b)`와 같이) `add` 메서드를 호출\"\n\"합니다. 이 `add` 메서드는 `Add` 트레이트의 일부입니다. 따라서 `+` 연산자는 \"\n\"`Add` 트레이트의 모든 구현체에서 사용될 수 있습니다.\"\n\n#: src/trait/ops.md:9\nmsgid \"\"\n\"A list of the traits, such as `Add`, that overload operators can be found in \"\n\"[`core::ops`](https://doc.rust-lang.org/core/ops/).\"\nmsgstr \"\"\n\"연산자를 오버로딩하는 `Add`와 같은 트레이트들의 목록은 [`core::ops`](https://\"\n\"doc.rust-lang.org/core/ops/)에서 찾을 수 있습니다.\"\n\n#: src/trait/ops.md:22\nmsgid \"\"\n\"// The `std::ops::Add` trait is used to specify the functionality of `+`.\\n\"\n\"// Here, we make `Add<Bar>` - the trait for addition with a RHS of type \"\n\"`Bar`.\\n\"\n\"// The following block implements the operation: Foo + Bar = FooBar\\n\"\nmsgstr \"\"\n\"// `std::ops::Add` 트레이트는 `+`의 기능을 지정하는 데 사용됩니다.\\n\"\n\"// 여기서 우리는 `Add<Bar>`를 만듭니다 - 이는 RHS(우항) 타입이 `Bar`인 덧셈\"\n\"을 위한 트레이트입니다.\\n\"\n\"// 다음 블록은 Foo + Bar = FooBar 연산을 구현합니다.\\n\"\n\n#: src/trait/ops.md:30\nmsgid \"\\\"> Foo.add(Bar) was called\\\"\"\nmsgstr \"\\\"> Foo.add(Bar)가 호출되었습니다\\\"\"\n\n#: src/trait/ops.md:35\nmsgid \"\"\n\"// By reversing the types, we end up implementing non-commutative addition.\\n\"\n\"// Here, we make `Add<Foo>` - the trait for addition with a RHS of type \"\n\"`Foo`.\\n\"\n\"// This block implements the operation: Bar + Foo = BarFoo\\n\"\nmsgstr \"\"\n\"// 타입을 반대로 함으로써, 우리는 비가환(non-commutative) 덧셈을 구현하게 됩\"\n\"니다.\\n\"\n\"// 여기서 우리는 `Add<Foo>`를 만듭니다 - 이는 RHS 타입이 `Foo`인 덧셈을 위한 \"\n\"트레이트입니다.\\n\"\n\"// 이 블록은 Bar + Foo = BarFoo 연산을 구현합니다.\\n\"\n\n#: src/trait/ops.md:43\nmsgid \"\\\"> Bar.add(Foo) was called\\\"\"\nmsgstr \"\\\"> Bar.add(Foo)가 호출되었습니다\\\"\"\n\n#: src/trait/ops.md:50\nmsgid \"\\\"Foo + Bar = {:?}\\\"\"\nmsgstr \"\\\"Foo + Bar = {:?}\\\"\"\n\n#: src/trait/ops.md:51\nmsgid \"\\\"Bar + Foo = {:?}\\\"\"\nmsgstr \"\\\"Bar + Foo = {:?}\\\"\"\n\n#: src/trait/ops.md:55 src/testing.md:16 src/testing/doc_testing.md:105\n#: src/testing/dev_dependencies.md:36\nmsgid \"See Also\"\nmsgstr \"참고\"\n\n#: src/trait/ops.md:57\nmsgid \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html), [Syntax Index]\"\n\"(https://doc.rust-lang.org/book/appendix-02-operators.html)\"\nmsgstr \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html), [구문 색인]\"\n\"(https://doc.rust-lang.org/book/appendix-02-operators.html)\"\n\n#: src/trait/drop.md:3\nmsgid \"\"\n\"The [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) trait only \"\n\"has one method: `drop`, which is called automatically when an object goes \"\n\"out of scope. The main use of the `Drop` trait is to free the resources that \"\n\"the implementor instance owns.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) 트레이트는 `drop`\"\n\"이라는 하나의 메서드만을 가집니다. 이 메서드는 객체가 스코프를 벗어날 때 자동\"\n\"으로 호출됩니다. `Drop` 트레이트의 주요 용도는 구현체 인스턴스가 소유한 리소\"\n\"스를 해제하는 것입니다.\"\n\n#: src/trait/drop.md:7\nmsgid \"\"\n\"`Box`, `Vec`, `String`, `File`, and `Process` are some examples of types \"\n\"that implement the `Drop` trait to free resources. The `Drop` trait can also \"\n\"be manually implemented for any custom data type.\"\nmsgstr \"\"\n\"`Box`, `Vec`, `String`, `File`, 그리고 `Process`는 리소스를 해제하기 위해 \"\n\"`Drop` 트레이트를 구현하는 몇 가지 타입의 예입니다. `Drop` 트레이트는 임의의 \"\n\"사용자 정의 데이터 타입에 대해 수동으로 구현될 수도 있습니다.\"\n\n#: src/trait/drop.md:11\nmsgid \"\"\n\"The following example adds a print to console to the `drop` function to \"\n\"announce when it is called.\"\nmsgstr \"\"\n\"다음 예제는 `drop` 함수가 호출될 때 알림을 주기 위해 콘솔 출력을 추가합니다.\"\n\n#: src/trait/drop.md:18\nmsgid \"// This trivial implementation of `drop` adds a print to console.\\n\"\nmsgstr \"// 이 간단한 `drop` 구현은 콘솔에 출력을 추가합니다.\\n\"\n\n#: src/trait/drop.md:22\nmsgid \"\\\"> Dropping {}\\\"\"\nmsgstr \"\\\"> {}를 해제합니다\\\"\"\n\n#: src/trait/drop.md:27 src/std_misc/path.md:33 src/std_misc/fs.md:44\n#: src/std_misc/fs.md:87\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/trait/drop.md:29\nmsgid \"// block A\\n\"\nmsgstr \"// 블록 A\\n\"\n\n#: src/trait/drop.md:31 src/std_misc/path.md:33\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/trait/drop.md:33\nmsgid \"// block B\\n\"\nmsgstr \"// 블록 B\\n\"\n\n#: src/trait/drop.md:35 src/std_misc/path.md:36\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/trait/drop.md:36\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/trait/drop.md:38\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"블록 B를 나가는 중\\\"\"\n\n#: src/trait/drop.md:40\nmsgid \"\\\"Just exited block B\\\"\"\nmsgstr \"\\\"방금 블록 B를 나갔습니다\\\"\"\n\n#: src/trait/drop.md:42\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"블록 A를 나가는 중\\\"\"\n\n#: src/trait/drop.md:44\nmsgid \"\\\"Just exited block A\\\"\"\nmsgstr \"\\\"방금 블록 A를 나갔습니다\\\"\"\n\n#: src/trait/drop.md:46\nmsgid \"// Variable can be manually dropped using the `drop` function\\n\"\nmsgstr \"// 변수는 `drop` 함수를 사용하여 수동으로 해제할 수 있습니다.\\n\"\n\n#: src/trait/drop.md:48\nmsgid \"// TODO ^ Try commenting this line\\n\"\nmsgstr \"// TODO ^ 이 줄을 주석 처리해 보세요.\\n\"\n\n#: src/trait/drop.md:50\nmsgid \"\\\"end of the main function\\\"\"\nmsgstr \"\\\"메인 함수 끝\\\"\"\n\n#: src/trait/drop.md:52\nmsgid \"\"\n\"// `_a` *won't* be `drop`ed again here, because it already has been\\n\"\n\"    // (manually) `drop`ed\\n\"\nmsgstr \"\"\n\"// `_a`는 여기서 다시 `drop`되지 않습니다. 이미 (수동으로) `drop`되었기 때문\"\n\"입니다.\\n\"\n\n#: src/trait/drop.md:57\nmsgid \"\"\n\"For a more practical example, here's how the `Drop` trait can be used to \"\n\"automatically clean up temporary files when they're no longer needed:\"\nmsgstr \"\"\n\"더 실용적인 예로, `Drop` 트레이트를 사용하여 더 이상 필요하지 않은 임시 파일\"\n\"을 자동으로 정리하는 방법은 다음과 같습니다:\"\n\n#: src/trait/drop.md:71\nmsgid \"// Note: File::create() will overwrite existing files\\n\"\nmsgstr \"// 참고: `File::create()`는 기존 파일을 덮어씁니다.\\n\"\n\n#: src/trait/drop.md:77\nmsgid \"\"\n\"// When TempFile is dropped:\\n\"\n\"// 1. First, our drop implementation will remove the file's name from the \"\n\"filesystem.\\n\"\n\"// 2. Then, File's drop will close the file, removing its underlying content \"\n\"from the disk.\\n\"\nmsgstr \"\"\n\"// `TempFile`이 drop될 때:\\n\"\n\"// 1. 먼저, 우리가 작성한 drop 구현이 파일 시스템에서 파일 이름을 제거합니\"\n\"다.\\n\"\n\"// 2. 그런 다음, `File`의 drop이 파일을 닫고 디스크에서 기본 콘텐츠를 제거합\"\n\"니다.\\n\"\n\n#: src/trait/drop.md:84\nmsgid \"\\\"Failed to remove temporary file: {}\\\"\"\nmsgstr \"\\\"임시 파일을 제거하는 데 실패했습니다: {}\\\"\"\n\n#: src/trait/drop.md:86\nmsgid \"\\\"> Dropped temporary file: {:?}\\\"\"\nmsgstr \"\\\"> 임시 파일을 해제했습니다: {:?}\\\"\"\n\n#: src/trait/drop.md:87\nmsgid \"\"\n\"// File's drop is implicitly called here because it is a field of this \"\n\"struct.\\n\"\nmsgstr \"\"\n\"// `File`의 drop은 이 구조체의 필드이므로 여기서 암시적으로 호출됩니다.\\n\"\n\n#: src/trait/drop.md:92\nmsgid \"// Create a new scope to demonstrate drop behavior\\n\"\nmsgstr \"// drop 동작을 시연하기 위해 새 스코프를 생성합니다.\\n\"\n\n#: src/trait/drop.md:94\nmsgid \"\\\"test.txt\\\"\"\nmsgstr \"\\\"test.txt\\\"\"\n\n#: src/trait/drop.md:95\nmsgid \"\\\"Temporary file created\\\"\"\nmsgstr \"\\\"임시 파일이 생성되었습니다\\\"\"\n\n#: src/trait/drop.md:96\nmsgid \"// File will be automatically cleaned up when temp goes out of scope\\n\"\nmsgstr \"// `temp`가 스코프를 벗어날 때 파일이 자동으로 정리됩니다.\\n\"\n\n#: src/trait/drop.md:98\nmsgid \"\\\"End of scope - file should be cleaned up\\\"\"\nmsgstr \"\\\"스코프 종료 - 파일이 정리되어야 합니다\\\"\"\n\n#: src/trait/drop.md:100\nmsgid \"// We can also manually drop if needed\\n\"\nmsgstr \"// 필요하다면 수동으로 drop할 수도 있습니다.\\n\"\n\n#: src/trait/drop.md:101\nmsgid \"\\\"another_test.txt\\\"\"\nmsgstr \"\\\"another_test.txt\\\"\"\n\n#: src/trait/drop.md:102\nmsgid \"// Explicitly drop the file\\n\"\nmsgstr \"// 파일을 명시적으로 drop합니다.\\n\"\n\n#: src/trait/drop.md:103\nmsgid \"\\\"Manually dropped file\\\"\"\nmsgstr \"\\\"수동으로 파일을 drop했습니다\\\"\"\n\n#: src/trait/iter.md:3\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"trait is used to implement iterators over collections such as arrays.\"\nmsgstr \"\"\n\"[`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html) 트레이\"\n\"트는 배열과 같은 컬렉션에 대한 이터레이터를 구현하는 데 사용됩니다.\"\n\n#: src/trait/iter.md:6\nmsgid \"\"\n\"The trait requires only a method to be defined for the `next` element, which \"\n\"may be manually defined in an `impl` block or automatically defined (as in \"\n\"arrays and ranges).\"\nmsgstr \"\"\n\"이 트레이트는 `next` 요소에 대해 정의될 메서드 하나만을 필요로 하며, 이는 \"\n\"`impl` 블록에서 수동으로 정의하거나 (배열 및 범위와 같이) 자동으로 정의될 수 \"\n\"있습니다.\"\n\n#: src/trait/iter.md:10\nmsgid \"\"\n\"As a point of convenience for common situations, the `for` construct turns \"\n\"some collections into iterators using the [`.into_iter()`](https://doc.rust-\"\n\"lang.org/std/iter/trait.IntoIterator.html) method.\"\nmsgstr \"\"\n\"일반적인 상황에서의 편의를 위해, `for` 구문은 [`.into_iter()`](https://\"\n\"doc.rust-lang.org/std/iter/trait.IntoIterator.html) 메서드를 사용하여 일부 컬\"\n\"렉션을 이터레이터로 변환합니다.\"\n\n#: src/trait/iter.md:18\nmsgid \"\"\n\"// Implement `Iterator` for `Fibonacci`.\\n\"\n\"// The `Iterator` trait only requires a method to be defined for the `next` \"\n\"element,\\n\"\n\"// and an `associated type` to declare the return type of the iterator.\\n\"\nmsgstr \"\"\n\"// `Fibonacci`에 대해 `Iterator`를 구현합니다.\\n\"\n\"// `Iterator` 트레이트는 `next` 요소에 대해 정의될 메서드 하나와,\\n\"\n\"// 이터레이터의 반환 타입을 선언하기 위한 `연관 타입(associated type)`만을 필\"\n\"요로 합니다.\\n\"\n\n#: src/trait/iter.md:23\nmsgid \"// We can refer to this type using Self::Item\\n\"\nmsgstr \"// `Self::Item`을 사용하여 이 타입을 참조할 수 있습니다.\\n\"\n\n#: src/trait/iter.md:26\nmsgid \"\"\n\"// Here, we define the sequence using `.curr` and `.next`.\\n\"\n\"    // The return type is `Option<T>`:\\n\"\n\"    //     * When the `Iterator` is finished, `None` is returned.\\n\"\n\"    //     * Otherwise, the next value is wrapped in `Some` and returned.\\n\"\n\"    // We use Self::Item in the return type, so we can change\\n\"\n\"    // the type without having to update the function signatures.\\n\"\nmsgstr \"\"\n\"// 여기서리는 `.curr`와 `.next`를 사용하여 수열을 정의합니다.\\n\"\n\"    // 반환 타입은 `Option<T>`입니다:\\n\"\n\"    //     * 이터레이터가 끝나면 `None`이 반환됩니다.\\n\"\n\"    //     * 그렇지 않으면 다음 값이 `Some`으로 감싸져서 반환됩니다.\\n\"\n\"    // 반환 타입에 `Self::Item`을 사용하므로, 함수 시그니처를 업데이트할 필\"\n\"요 없이\\n\"\n\"    // 타입을 변경할 수 있습니다.\\n\"\n\n#: src/trait/iter.md:38\nmsgid \"\"\n\"// Since there's no endpoint to a Fibonacci sequence, the `Iterator`\\n\"\n\"        // will never return `None`, and `Some` is always returned.\\n\"\nmsgstr \"\"\n\"// 피보나치 수열에는 끝이 없으므로, 이 `Iterator`는\\n\"\n\"        // 결코 `None`을 반환하지 않으며 항상 `Some`이 반환됩니다.\\n\"\n\n#: src/trait/iter.md:43\nmsgid \"// Returns a Fibonacci sequence generator\\n\"\nmsgstr \"// 피보나치 수열 생성기를 반환합니다.\\n\"\n\n#: src/trait/iter.md:50\nmsgid \"// `0..3` is an `Iterator` that generates: 0, 1, and 2.\\n\"\nmsgstr \"// `0..3`은 0, 1, 2를 생성하는 `Iterator`입니다.\\n\"\n\n#: src/trait/iter.md:53\nmsgid \"\\\"Four consecutive `next` calls on 0..3\\\"\"\nmsgstr \"\\\"0..3에 대한 네 번의 연속적인 `next` 호출\\\"\"\n\n#: src/trait/iter.md:54 src/trait/iter.md:55 src/trait/iter.md:56\n#: src/trait/iter.md:57 src/std_misc/fs.md:90\nmsgid \"\\\"> {:?}\\\"\"\nmsgstr \"\\\"> {:?}\\\"\"\n\n#: src/trait/iter.md:59\nmsgid \"\"\n\"// `for` works through an `Iterator` until it returns `None`.\\n\"\n\"    // Each `Some` value is unwrapped and bound to a variable (here, `i`).\\n\"\nmsgstr \"\"\n\"// `for`는 `None`이 반환될 때까지 `Iterator`를 통해 작동합니다.\\n\"\n\"    // 각 `Some` 값은 래핑이 해제되어 변수(여기서는 `i`)에 바인딩됩니다.\\n\"\n\n#: src/trait/iter.md:61\nmsgid \"\\\"Iterate through 0..3 using `for`\\\"\"\nmsgstr \"\\\"`for`를 사용하여 0..3을 순회합니다\\\"\"\n\n#: src/trait/iter.md:63 src/trait/iter.md:69 src/trait/iter.md:75\n#: src/trait/iter.md:83 src/std/vec.md:50 src/std/str.md:22\n#: src/std_misc/fs.md:82\nmsgid \"\\\"> {}\\\"\"\nmsgstr \"\\\"> {}\\\"\"\n\n#: src/trait/iter.md:66\nmsgid \"// The `take(n)` method reduces an `Iterator` to its first `n` terms.\\n\"\nmsgstr \"// `take(n)` 메서드는 `Iterator`를 처음 `n`개의 항으로 줄입니다.\\n\"\n\n#: src/trait/iter.md:67\nmsgid \"\\\"The first four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\\\"피보나치 수열의 처음 네 항은 다음과 같습니다: \\\"\"\n\n#: src/trait/iter.md:72\nmsgid \"\"\n\"// The `skip(n)` method shortens an `Iterator` by dropping its first `n` \"\n\"terms.\\n\"\nmsgstr \"\"\n\"// `skip(n)` 메서드는 처음 `n`개의 항을 버리고 `Iterator`를 단축시킵니다.\\n\"\n\n#: src/trait/iter.md:73\nmsgid \"\\\"The next four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\\\"피보나치 수열의 다음 네 항은 다음과 같습니다: \\\"\"\n\n#: src/trait/iter.md:80\nmsgid \"// The `iter` method produces an `Iterator` over an array/slice.\\n\"\nmsgstr \"// `iter` 메서드는 배열/슬라이스에 대한 `Iterator`를 생성합니다.\\n\"\n\n#: src/trait/iter.md:81\nmsgid \"\\\"Iterate the following array {:?}\\\"\"\nmsgstr \"\\\"다음 배열 {:?}을 순회합니다\\\"\"\n\n#: src/trait/impl_trait.md:3\nmsgid \"`impl Trait` can be used in two locations:\"\nmsgstr \"`impl Trait`는 두 위치에서 사용될 수 있습니다:\"\n\n#: src/trait/impl_trait.md:5\nmsgid \"as an argument type\"\nmsgstr \"인자 타입으로서\"\n\n#: src/trait/impl_trait.md:6\nmsgid \"as a return type\"\nmsgstr \"반환 타입으로서\"\n\n#: src/trait/impl_trait.md:8\nmsgid \"As an argument type\"\nmsgstr \"인자 타입으로서\"\n\n#: src/trait/impl_trait.md:10\nmsgid \"\"\n\"If your function is generic over a trait but you don't mind the specific \"\n\"type, you can simplify the function declaration using `impl Trait` as the \"\n\"type of the argument.\"\nmsgstr \"\"\n\"함수가 트레이트에 대해 제네릭이지만 구체적인 타입에는 관심이 없다면, 인자 타\"\n\"입으로 `impl Trait`를 사용하여 함수 선언을 단순화할 수 있습니다.\"\n\n#: src/trait/impl_trait.md:12\nmsgid \"For example, consider the following code:\"\nmsgstr \"예를 들어, 다음 코드를 살펴보세요:\"\n\n#: src/trait/impl_trait.md:18 src/trait/impl_trait.md:37\nmsgid \"// For each line in the source\\n\"\nmsgstr \"// 소스의 각 줄에 대해\\n\"\n\n#: src/trait/impl_trait.md:20 src/trait/impl_trait.md:39\nmsgid \"\"\n\"// If the line was read successfully, process it, if not, return the error\\n\"\nmsgstr \"\"\n\"// 줄을 성공적으로 읽었다면 처리하고, 그렇지 않으면 에러를 반환합니다\\n\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40 src/std/str.md:41\nmsgid \"','\"\nmsgstr \"','\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40\nmsgid \"// Split the line separated by commas\\n\"\nmsgstr \"// 콤마로 구분된 줄을 분할합니다\\n\"\n\n#: src/trait/impl_trait.md:22 src/trait/impl_trait.md:41\nmsgid \"// Remove leading and trailing whitespace\\n\"\nmsgstr \"// 앞뒤 공백을 제거합니다\\n\"\n\n#: src/trait/impl_trait.md:23 src/trait/impl_trait.md:42\nmsgid \"// Collect all strings in a row into a Vec<String>\\n\"\nmsgstr \"// 한 행의 모든 문자열을 `Vec<String>`으로 수집합니다\\n\"\n\n#: src/trait/impl_trait.md:26 src/trait/impl_trait.md:45\nmsgid \"// Collect all lines into a Vec<Vec<String>>\\n\"\nmsgstr \"// 모든 줄을 `Vec<Vec<String>>`으로 수집합니다\\n\"\n\n#: src/trait/impl_trait.md:30\nmsgid \"\"\n\"`parse_csv_document` is generic, allowing it to take any type which \"\n\"implements BufRead, such as `BufReader<File>` or `[u8]`, but it's not \"\n\"important what type `R` is, and `R` is only used to declare the type of \"\n\"`src`, so the function can also be written as:\"\nmsgstr \"\"\n\"`parse_csv_document`는 제네릭이어서 `BufReader<File>`이나 `[u8]`과 같이 \"\n\"`BufRead`를 구현하는 모든 타입을 취할 수 있지만, `R`이 어떤 타입인지는 중요하\"\n\"지 않고 `R`은 단지 `src`의 타입을 선언하는 데만 사용되므로, 다음과 같이 작성\"\n\"할 수도 있습니다:\"\n\n#: src/trait/impl_trait.md:49\nmsgid \"\"\n\"Note that using `impl Trait` as an argument type means that you cannot \"\n\"explicitly state what form of the function you use, i.e. \"\n\"`parse_csv_document::<std::io::Empty>(std::io::empty())` will not work with \"\n\"the second example.\"\nmsgstr \"\"\n\"`impl Trait`를 인자 타입으로 사용하는 것은 여러분이 함수의 어떤 형태를 사용하\"\n\"는지 명시적으로 명시할 수 없음을 의미합니다. 즉, `parse_csv_document::\"\n\"<std::io::Empty>(std::io::empty())`는 두 번째 예제에서 작동하지 않습니다.\"\n\n#: src/trait/impl_trait.md:51\nmsgid \"As a return type\"\nmsgstr \"반환 타입으로서\"\n\n#: src/trait/impl_trait.md:53\nmsgid \"\"\n\"If your function returns a type that implements `MyTrait`, you can write its \"\n\"return type as `-> impl MyTrait`. This can help simplify your type \"\n\"signatures quite a lot!\"\nmsgstr \"\"\n\"여러분의 함수가 `MyTrait`를 구현하는 타입을 반환한다면, 반환 타입을 `-> impl \"\n\"MyTrait`로 작성할 수 있습니다. 이는 타입 시그니처를 아주 많이 단순화하는 데 \"\n\"도움이 될 수 있습니다!\"\n\n#: src/trait/impl_trait.md:59\nmsgid \"\"\n\"// This function combines two `Vec<i32>` and returns an iterator over it.\\n\"\n\"// Look how complicated its return type is!\\n\"\nmsgstr \"\"\n\"// 이 함수는 두 개의 `Vec<i32>`를 결합하고 그에 대한 이터레이터를 반환합니\"\n\"다.\\n\"\n\"// 반환 타입이 얼마나 복잡한지 보세요!\\n\"\n\n#: src/trait/impl_trait.md:68\nmsgid \"\"\n\"// This is the exact same function, but its return type uses `impl Trait`.\\n\"\n\"// Look how much simpler it is!\\n\"\nmsgstr \"\"\n\"// 이것은 정확히 동일한 함수이지만, 반환 타입에 `impl Trait`를 사용합니다.\\n\"\n\"// 훨씬 더 간단해진 것을 보세요!\\n\"\n\n#: src/trait/impl_trait.md:87\nmsgid \"\\\"all done\\\"\"\nmsgstr \"\\\"모두 완료\\\"\"\n\n#: src/trait/impl_trait.md:91\nmsgid \"\"\n\"More importantly, some Rust types can't be written out. For example, every \"\n\"closure has its own unnamed concrete type. Before `impl Trait` syntax, you \"\n\"had to allocate on the heap in order to return a closure. But now you can do \"\n\"it all statically, like this:\"\nmsgstr \"\"\n\"더 중요한 점은, 일부 Rust 타입은 명시적으로 작성할 수 없다는 것입니다. 예를 \"\n\"들어, 모든 클로저는 자신만의 이름 없는 구체적인 타입을 가집니다. `impl \"\n\"Trait` 구문이 생기기 전에는 클로저를 반환하기 위해 힙에 할당해야만 했습니다. \"\n\"하지만 이제는 다음과 같이 정적으로 처리할 수 있습니다:\"\n\n#: src/trait/impl_trait.md:97\nmsgid \"// Returns a function that adds `y` to its input\\n\"\nmsgstr \"// 입력에 `y`를 더하는 함수를 반환합니다.\\n\"\n\n#: src/trait/impl_trait.md:109\nmsgid \"\"\n\"You can also use `impl Trait` to return an iterator that uses `map` or \"\n\"`filter` closures! This makes using `map` and `filter` easier. Because \"\n\"closure types don't have names, you can't write out an explicit return type \"\n\"if your function returns iterators with closures. But with `impl Trait` you \"\n\"can do this easily:\"\nmsgstr \"\"\n\"또한 `impl Trait`를 사용하여 `map`이나 `filter` 클로저를 사용하는 이터레이터\"\n\"를 반환할 수도 있습니다! 이는 `map`과 `filter`를 더 쉽게 사용할 수 있게 해줍\"\n\"니다. 클로저 타입은 이름이 없기 때문에, 함수가 클로저를 포함하는 이터레이터\"\n\"를 반환할 경우 명시적인 반환 타입을 작성할 수 없습니다. 하지만 `impl Trait`\"\n\"를 사용하면 이를 쉽게 할 수 있습니다:\"\n\n#: src/trait/clone.md:3\nmsgid \"\"\n\"When dealing with resources, the default behavior is to transfer them during \"\n\"assignments or function calls. However, sometimes we need to make a copy of \"\n\"the resource as well.\"\nmsgstr \"\"\n\"리소스를 다룰 때, 기본 동작은 할당이나 함수 호출 시 리소스를 이전(transfer)하\"\n\"는 것입니다. 하지만 때로는 리소스의 복사본을 만들어야 할 때도 있습니다.\"\n\n#: src/trait/clone.md:7\nmsgid \"\"\n\"The [`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html) trait \"\n\"helps us do exactly this. Most commonly, we can use the `.clone()` method \"\n\"defined by the `Clone` trait.\"\nmsgstr \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html) 트레이트는 바\"\n\"로 이런 일을 돕습니다. 가장 일반적으로, `Clone` 트레이트에 정의된 `.clone()` \"\n\"메서드를 사용할 수 있습니다.\"\n\n#: src/trait/clone.md:11\nmsgid \"// A unit struct without resources\\n\"\nmsgstr \"// 리소스가 없는 유닛 구조체\\n\"\n\n#: src/trait/clone.md:14\nmsgid \"// A tuple struct with resources that implements the `Clone` trait\\n\"\nmsgstr \"// `Clone` 트레이트를 구현하는 리소스가 있는 튜플 구조체\\n\"\n\n#: src/trait/clone.md:20\nmsgid \"// Instantiate `Unit`\\n\"\nmsgstr \"// `Unit`을 인스턴스화합니다\\n\"\n\n#: src/trait/clone.md:22\nmsgid \"// Copy `Unit`, there are no resources to move\\n\"\nmsgstr \"// `Unit`을 복사합니다. 이동할 리소스가 없습니다.\\n\"\n\n#: src/trait/clone.md:25\nmsgid \"// Both `Unit`s can be used independently\\n\"\nmsgstr \"// 두 `Unit` 모두 독립적으로 사용될 수 있습니다.\\n\"\n\n#: src/trait/clone.md:26 src/trait/clone.md:31\nmsgid \"\\\"original: {:?}\\\"\"\nmsgstr \"\\\"원본: {:?}\\\"\"\n\n#: src/trait/clone.md:27\nmsgid \"\\\"copy: {:?}\\\"\"\nmsgstr \"\\\"복사본: {:?}\\\"\"\n\n#: src/trait/clone.md:29\nmsgid \"// Instantiate `Pair`\\n\"\nmsgstr \"// `Pair`를 인스턴스화합니다\\n\"\n\n#: src/trait/clone.md:33\nmsgid \"// Move `pair` into `moved_pair`, moves resources\\n\"\nmsgstr \"// `pair`를 `moved_pair`로 이동합니다. 리소스가 이동됩니다.\\n\"\n\n#: src/trait/clone.md:35\nmsgid \"\\\"moved: {:?}\\\"\"\nmsgstr \"\\\"이동됨: {:?}\\\"\"\n\n#: src/trait/clone.md:37\nmsgid \"\"\n\"// Error! `pair` has lost its resources\\n\"\n\"    //println!(\\\"original: {:?}\\\", pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `pair`는 리소스를 잃었습니다\\n\"\n\"    //println!(\\\"original: {:?}\\\", pair);\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/trait/clone.md:41\nmsgid \"// Clone `moved_pair` into `cloned_pair` (resources are included)\\n\"\nmsgstr \"// `moved_pair`를 `cloned_pair`로 클론합니다(리소스가 포함됩니다)\\n\"\n\n#: src/trait/clone.md:43\nmsgid \"// Drop the moved original pair using std::mem::drop\\n\"\nmsgstr \"// `std::mem::drop`을 사용하여 이동된 원본 페어를 해제합니다\\n\"\n\n#: src/trait/clone.md:46\nmsgid \"\"\n\"// Error! `moved_pair` has been dropped\\n\"\n\"    //println!(\\\"moved and dropped: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `moved_pair`가 해제되었습니다\\n\"\n\"    //println!(\\\"moved and dropped: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/trait/clone.md:50\nmsgid \"// The result from .clone() can still be used!\\n\"\nmsgstr \"// `.clone()`의 결과는 여전히 사용될 수 있습니다!\\n\"\n\n#: src/trait/clone.md:51\nmsgid \"\\\"clone: {:?}\\\"\"\nmsgstr \"\\\"클론: {:?}\\\"\"\n\n#: src/trait/supertraits.md:3\nmsgid \"\"\n\"Rust doesn't have \\\"inheritance\\\", but you can define a trait as being a \"\n\"superset of another trait. For example:\"\nmsgstr \"\"\n\"Rust에는 \\\"상속\\\"이 없지만, 한 트레이트를 다른 트레이트의 슈퍼셋(superset)으\"\n\"로 정의할 수 있습니다. 예를 들어:\"\n\n#: src/trait/supertraits.md:10\nmsgid \"\"\n\"// Person is a supertrait of Student.\\n\"\n\"// Implementing Student requires you to also impl Person.\\n\"\nmsgstr \"\"\n\"// Person은 Student의 슈퍼트레이트입니다.\\n\"\n\"// Student를 구현하려면 Person도 구현해야 합니다.\\n\"\n\n#: src/trait/supertraits.md:20\nmsgid \"\"\n\"// CompSciStudent (computer science student) is a subtrait of both \"\n\"Programmer\\n\"\n\"// and Student. Implementing CompSciStudent requires you to impl both \"\n\"supertraits.\\n\"\nmsgstr \"\"\n\"// CompSciStudent(컴퓨터 공학 학생)는 Programmer와 Student 모두의 서브트레이\"\n\"트입니다.\\n\"\n\"// CompSciStudent를 구현하려면 두 슈퍼트레이트를 모두 구현해야 합니다.\\n\"\n\n#: src/trait/supertraits.md:29\nmsgid \"\"\n\"\\\"My name is {} and I attend {}. My favorite language is {}. My Git username \"\n\"is {}\\\"\"\nmsgstr \"\"\n\"\\\"제 이름은 {}이고 {}에 다닙니다. 제가 가장 좋아하는 언어는 {}입니다. 제 Git \"\n\"사용자 이름은 {}입니다.\\\"\"\n\n#: src/trait/supertraits.md:42\nmsgid \"\"\n\"[The Rust Programming Language chapter on supertraits](https://doc.rust-\"\n\"lang.org/book/ch19-03-advanced-traits.html#using-supertraits-to-require-one-\"\n\"traits-functionality-within-another-trait)\"\nmsgstr \"\"\n\"[러스트 프로그래밍 언어의 슈퍼트레이트 장](https://doc.rust-lang.org/book/\"\n\"ch19-03-advanced-traits.html#using-supertraits-to-require-one-traits-\"\n\"functionality-within-another-trait)\"\n\n#: src/trait/disambiguating.md:3\nmsgid \"\"\n\"A type can implement many different traits. What if two traits both require \"\n\"the same name for a function? For example, many traits might have a method \"\n\"named `get()`. They might even have different return types!\"\nmsgstr \"\"\n\"하나의 타입은 여러 개의 서로 다른 트레이트를 구현할 수 있습니다. 만약 두 트레\"\n\"이트가 함수에 대해 동일한 이름을 요구한다면 어떨까요? 예를 들어, 많은 트레이\"\n\"트가 `get()`이라는 이름의 메서드를 가질 수 있습니다. 심지어 반환 타입이 다를 \"\n\"수도 있습니다!\"\n\n#: src/trait/disambiguating.md:7\nmsgid \"\"\n\"Good news: because each trait implementation gets its own `impl` block, it's \"\n\"clear which trait's `get` method you're implementing.\"\nmsgstr \"\"\n\"좋은 소식은, 각 트레이트 구현이 자신만의 `impl` 블록을 가지기 때문에, 어떤 트\"\n\"레이트의 `get` 메서드를 구현하고 있는지 명확하다는 것입니다.\"\n\n#: src/trait/disambiguating.md:10\nmsgid \"\"\n\"What about when it comes time to _call_ those methods? To disambiguate \"\n\"between them, we have to use Fully Qualified Syntax.\"\nmsgstr \"\"\n\"그럼 그 메서드들을 *호출*해야 할 때는 어떨까요? 이들 사이의 모호함을 없애기 \"\n\"위해, 우리는 '완전한 정규화 구문(Fully Qualified Syntax)'을 사용해야 합니다.\"\n\n#: src/trait/disambiguating.md:15\nmsgid \"// Get the selected username out of this widget\\n\"\nmsgstr \"// 이 위젯에서 선택된 사용자 이름을 가져옵니다\\n\"\n\n#: src/trait/disambiguating.md:20\nmsgid \"// Get the selected age out of this widget\\n\"\nmsgstr \"// 이 위젯에서 선택된 나이를 가져옵니다\\n\"\n\n#: src/trait/disambiguating.md:23\nmsgid \"// A form with both a UsernameWidget and an AgeWidget\\n\"\nmsgstr \"// UsernameWidget과 AgeWidget을 모두 포함하는 폼\\n\"\n\n#: src/trait/disambiguating.md:44 src/trait/disambiguating.md:54\nmsgid \"\\\"rustacean\\\"\"\nmsgstr \"\\\"러스타시안(rustacean)\\\"\"\n\n#: src/trait/disambiguating.md:48\nmsgid \"\"\n\"// If you uncomment this line, you'll get an error saying\\n\"\n\"    // \\\"multiple `get` found\\\". Because, after all, there are multiple \"\n\"methods\\n\"\n\"    // named `get`.\\n\"\n\"    // println!(\\\"{}\\\", form.get());\\n\"\nmsgstr \"\"\n\"// 이 줄의 주석을 해제하면 \\\"multiple `get` found\\\"라는 에러가 발생합니다.\\n\"\n\"    // 결국 `get`이라는 이름의 메서드가 여러 개 있기 때문입니다.\\n\"\n\"    // println!(\\\"{}\\\", form.get());\\n\"\n\n#: src/trait/disambiguating.md:62\nmsgid \"\"\n\"[The Rust Programming Language chapter on Fully Qualified syntax](https://\"\n\"doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-\"\n\"for-disambiguation-calling-methods-with-the-same-name)\"\nmsgstr \"\"\n\"[러스트 프로그래밍 언어의 완전한 정규화 구문 장](https://doc.rust-lang.org/\"\n\"book/ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-\"\n\"calling-methods-with-the-same-name)\"\n\n#: src/macros.md:1\nmsgid \"`macro_rules!`\"\nmsgstr \"`macro_rules!`\"\n\n#: src/macros.md:3\nmsgid \"\"\n\"Rust provides a powerful macro system that allows metaprogramming. As you've \"\n\"seen in previous chapters, macros look like functions, except that their \"\n\"name ends with a bang `!`, but instead of generating a function call, macros \"\n\"are expanded into source code that gets compiled with the rest of the \"\n\"program. However, unlike macros in C and other languages, Rust macros are \"\n\"expanded into abstract syntax trees, rather than string preprocessing, so \"\n\"you don't get unexpected precedence bugs.\"\nmsgstr \"\"\n\"Rust는 메타프로그래밍을 가능하게 하는 강력한 매크로 시스템을 제공합니다. 이\"\n\"전 장들에서 보았듯이, 매크로는 이름이 느낌표 `!`로 끝난다는 점을 제외하면 함\"\n\"수와 비슷해 보입니다. 하지만 함수 호출을 생성하는 대신, 매크로는 프로그램의 \"\n\"나머지 부분과 함께 컴파일되는 소스 코드로 확장됩니다. 그러나 C나 다른 언어의 \"\n\"매크로와 달리, Rust 매크로는 문자열 전처리가 아닌 추상 구문 트리(AST)로 확장\"\n\"되므로, 예상치 못한 연산자 우선순위 버그가 발생하지 않습니다.\"\n\n#: src/macros.md:11\nmsgid \"Macros are created using the `macro_rules!` macro.\"\nmsgstr \"매크로는 `macro_rules!` 매크로를 사용하여 생성됩니다.\"\n\n#: src/macros.md:14\nmsgid \"// This is a simple macro named `say_hello`.\\n\"\nmsgstr \"// `say_hello`라는 이름의 간단한 매크로입니다.\\n\"\n\n#: src/macros.md:16\nmsgid \"// `()` indicates that the macro takes no argument.\\n\"\nmsgstr \"// `()`는 매크로가 인자를 취하지 않음을 나타냅니다.\\n\"\n\n#: src/macros.md:18\nmsgid \"// The macro will expand into the contents of this block.\\n\"\nmsgstr \"// 매크로는 이 블록의 내용으로 확장됩니다.\\n\"\n\n#: src/macros.md:19\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"안녕하세요!\\\"\"\n\n#: src/macros.md:24\nmsgid \"// This call will expand into `println!(\\\"Hello!\\\")`\\n\"\nmsgstr \"// 이 호출은 `println!(\\\"안녕하세요!\\\")`로 확장됩니다.\\n\"\n\n#: src/macros.md:29\nmsgid \"So why are macros useful?\"\nmsgstr \"그렇다면 왜 매크로가 유용할까요?\"\n\n#: src/macros.md:31\nmsgid \"\"\n\"Don't repeat yourself. There are many cases where you may need similar \"\n\"functionality in multiple places but with different types. Often, writing a \"\n\"macro is a useful way to avoid repeating code. (More on this later)\"\nmsgstr \"\"\n\"반복하지 마세요(DRY, Don't repeat yourself). 여러 곳에서 서로 다른 타입에 대\"\n\"해 유사한 기능이 필요할 수 있는 경우가 많습니다. 종종 매크로를 작성하는 것은 \"\n\"코드 반복을 피하는 유용한 방법입니다. (이에 대해서는 나중에 자세히 다룹니다)\"\n\n#: src/macros.md:35\nmsgid \"\"\n\"Domain-specific languages. Macros allow you to define special syntax for a \"\n\"specific purpose. (More on this later)\"\nmsgstr \"\"\n\"도메인 특화 언어(DSL, Domain-specific languages). 매크로를 사용하면 특정 목적\"\n\"을 위한 특정 구문을 정의할 수 있습니다. (이에 대해서는 나중에 자세히 다룹니\"\n\"다)\"\n\n#: src/macros.md:38\nmsgid \"\"\n\"Variadic interfaces. Sometimes you want to define an interface that takes a \"\n\"variable number of arguments. An example is `println!` which could take any \"\n\"number of arguments, depending on the format string. (More on this later)\"\nmsgstr \"\"\n\"가변 인자 인터페이스. 때로는 가변적인 개수의 인자를 취하는 인터페이스를 정의\"\n\"하고 싶을 때가 있습니다. 예를 들어 `println!`은 형식 문자열에 따라 인자를 몇 \"\n\"개든 취할 수 있습니다! (이에 대해서는 나중에 자세히 다룹니다)\"\n\n#: src/macros/syntax.md:3\nmsgid \"\"\n\"In following subsections, we will show how to define macros in Rust. There \"\n\"are three basic ideas:\"\nmsgstr \"\"\n\"이어지는 하위 섹션에서는 Rust에서 매크로를 정의하는 방법을 보여줄 것입니다. \"\n\"여기에는 세 가지 기본 아이디어가 있습니다:\"\n\n#: src/macros/syntax.md:6\nmsgid \"[Patterns and Designators](designators.md)\"\nmsgstr \"[패턴과 지시자](designators.md)\"\n\n#: src/macros/syntax.md:7\nmsgid \"[Overloading](overload.md)\"\nmsgstr \"[오버로딩](overload.md)\"\n\n#: src/macros/syntax.md:8\nmsgid \"[Repetition](repeat.md)\"\nmsgstr \"[반복](repeat.md)\"\n\n#: src/macros/designators.md:3\nmsgid \"\"\n\"The arguments of a macro are prefixed by a dollar sign `$` and type \"\n\"annotated with a _designator_:\"\nmsgstr \"\"\n\"매크로의 인자는 달러 기호 `$`가 접두사로 붙으며, 지시자(designator)로 타입이 \"\n\"어노테이션됩니다:\"\n\n#: src/macros/designators.md:8\nmsgid \"\"\n\"// This macro takes an argument of designator `ident` and\\n\"\n\"    // creates a function named `$func_name`.\\n\"\n\"    // The `ident` designator is used for variable/function names.\\n\"\nmsgstr \"\"\n\"// 이 매크로는 지시자 `ident` 인자를 취하여\\n\"\n\"    // `$func_name`이라는 이름의 함수를 생성합니다.\\n\"\n\"    // `ident` 지시자는 변수/함수 이름에 사용됩니다.\\n\"\n\n#: src/macros/designators.md:13\nmsgid \"// The `stringify!` macro converts an `ident` into a string.\\n\"\nmsgstr \"// `stringify!` 매크로는 `ident`를 문자열로 변환합니다.\\n\"\n\n#: src/macros/designators.md:14\nmsgid \"\\\"You called {:?}()\\\"\"\nmsgstr \"\\\"당신은 {:?}()를 호출했습니다\\\"\"\n\n#: src/macros/designators.md:19\nmsgid \"// Create functions named `foo` and `bar` with the above macro.\\n\"\nmsgstr \"\"\n\"// 위의 매크로를 사용하여 `foo`와 `bar`라는 이름의 함수를 생성합니다.\\n\"\n\n#: src/macros/designators.md:25\nmsgid \"\"\n\"// This macro takes an expression of type `expr` and prints\\n\"\n\"    // it as a string along with its result.\\n\"\n\"    // The `expr` designator is used for expressions.\\n\"\nmsgstr \"\"\n\"// 이 매크로는 `expr` 타입의 표현식을 취하여\\n\"\n\"    // 결과와 함께 문자열로 출력합니다.\\n\"\n\"    // `expr` 지시자는 표현식에 사용됩니다.\\n\"\n\n#: src/macros/designators.md:29\nmsgid \"// `stringify!` will convert the expression *as it is* into a string.\\n\"\nmsgstr \"// `stringify!`는 표현식을 *있는 그대로* 문자열로 변환합니다.\\n\"\n\n#: src/macros/designators.md:30\nmsgid \"\\\"{:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} = {:?}\\\"\"\n\n#: src/macros/designators.md:42\nmsgid \"// Recall that blocks are expressions too!\\n\"\nmsgstr \"// 블록도 표현식이라는 점을 기억하세요!\\n\"\n\n#: src/macros/designators.md:51\nmsgid \"These are some of the available designators:\"\nmsgstr \"사용 가능한 지시자들의 일부는 다음과 같습니다:\"\n\n#: src/macros/designators.md:53\nmsgid \"`block`\"\nmsgstr \"`block`\"\n\n#: src/macros/designators.md:54\nmsgid \"`expr` is used for expressions\"\nmsgstr \"`expr`은 표현식에 사용됩니다\"\n\n#: src/macros/designators.md:55\nmsgid \"`ident` is used for variable/function names\"\nmsgstr \"`ident`는 변수/함수 이름에 사용됩니다\"\n\n#: src/macros/designators.md:56\nmsgid \"`item`\"\nmsgstr \"`item`\"\n\n#: src/macros/designators.md:57\nmsgid \"`literal` is used for literal constants\"\nmsgstr \"`literal`은 리터럴 상수에 사용됩니다\"\n\n#: src/macros/designators.md:58\nmsgid \"`pat` (_pattern_)\"\nmsgstr \"`pat` (패턴)\"\n\n#: src/macros/designators.md:59\nmsgid \"`path`\"\nmsgstr \"`path`\"\n\n#: src/macros/designators.md:60\nmsgid \"`stmt` (_statement_)\"\nmsgstr \"`stmt` (문장)\"\n\n#: src/macros/designators.md:61\nmsgid \"`tt` (_token tree_)\"\nmsgstr \"`tt` (토큰 트리)\"\n\n#: src/macros/designators.md:62\nmsgid \"`ty` (_type_)\"\nmsgstr \"`ty` (타입)\"\n\n#: src/macros/designators.md:63\nmsgid \"`vis` (_visibility qualifier_)\"\nmsgstr \"`vis` (가시성 한정자)\"\n\n#: src/macros/designators.md:65\nmsgid \"\"\n\"For a complete list, see the [Rust Reference](https://doc.rust-lang.org/\"\n\"reference/macros-by-example.html).\"\nmsgstr \"\"\n\"전체 목록은 [Rust 레퍼런스](https://doc.rust-lang.org/reference/macros-by-\"\n\"example.html)를 참조하세요.\"\n\n#: src/macros/overload.md:3\nmsgid \"\"\n\"Macros can be overloaded to accept different combinations of arguments. In \"\n\"that regard, `macro_rules!` can work similarly to a match block:\"\nmsgstr \"\"\n\"매크로는 서로 다른 인자 조합을 수용하도록 오버로딩될 수 있습니다. 그런 점에서\"\n\"는 `macro_rules!`는 `match` 블록과 비슷하게 작동할 수 있습니다:\"\n\n#: src/macros/overload.md:7\nmsgid \"\"\n\"// `test!` will compare `$left` and `$right`\\n\"\n\"// in different ways depending on how you invoke it:\\n\"\nmsgstr \"\"\n\"// `test!`는 호출 방식에 따라 `$left`와 `$right`를\\n\"\n\"// 서로 다른 방식으로 비교할 것입니다:\\n\"\n\n#: src/macros/overload.md:10\nmsgid \"\"\n\"// Arguments don't need to be separated by a comma.\\n\"\n\"    // Any template can be used!\\n\"\nmsgstr \"\"\n\"// 인자들은 콤마로 구분될 필요가 없습니다.\\n\"\n\"    // 어떤 템플릿이든 사용될 수 있습니다!\\n\"\n\n#: src/macros/overload.md:13\nmsgid \"\\\"{:?} and {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} and {:?} is {:?}\\\"\"\n\n#: src/macros/overload.md:18\nmsgid \"// ^ each arm must end with a semicolon.\\n\"\nmsgstr \"// ^ 각 팔(arm)은 세미콜론으로 끝나야 합니다.\\n\"\n\n#: src/macros/overload.md:20\nmsgid \"\\\"{:?} or {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} or {:?} is {:?}\\\"\"\n\n#: src/macros/repeat.md:3\nmsgid \"\"\n\"Macros can use `+` in the argument list to indicate that an argument may \"\n\"repeat at least once, or `*`, to indicate that the argument may repeat zero \"\n\"or more times.\"\nmsgstr \"\"\n\"매크로는 인자 목록에서 `+`를 사용하여 인자가 한 번 이상 반복될 수 있음을 나타\"\n\"내거나, `*`를 사용하여 인자가 0번 이상 반복될 수 있음을 나타낼 수 있습니다.\"\n\n#: src/macros/repeat.md:7\nmsgid \"\"\n\"In the following example, surrounding the matcher with `$(...),+` will match \"\n\"one or more expression, separated by commas. Also note that the semicolon is \"\n\"optional on the last case.\"\nmsgstr \"\"\n\"다음 예제에서, 매처(matcher)를 `$(...),+`로 감싸면 콤마로 구분된 하나 이상의 \"\n\"표현식과 매치됩니다. 또한 마지막 케이스에서는 세미콜론이 선택사항임에 유의하\"\n\"세요.\"\n\n#: src/macros/repeat.md:12\nmsgid \"// `find_min!` will calculate the minimum of any number of arguments.\\n\"\nmsgstr \"// `find_min!`은 임의 개수의 인자들 중 최솟값을 계산합니다.\\n\"\n\n#: src/macros/repeat.md:14\nmsgid \"// Base case:\\n\"\nmsgstr \"// 기본 케이스:\\n\"\n\n#: src/macros/repeat.md:16\nmsgid \"// `$x` followed by at least one `$y,`\\n\"\nmsgstr \"// `$x` 뒤에 최소 하나의 `$y,`가 오는 경우\\n\"\n\n#: src/macros/repeat.md:18\nmsgid \"// Call `find_min!` on the tail `$y`\\n\"\nmsgstr \"// 나머지 `$y`들에 대해 `find_min!`을 호출합니다.\\n\"\n\n#: src/macros/dry.md:3\nmsgid \"\"\n\"Macros allow writing DRY code by factoring out the common parts of functions \"\n\"and/or test suites. Here is an example that implements and tests the `+=`, \"\n\"`*=` and `-=` operators on `Vec<T>`:\"\nmsgstr \"\"\n\"매크로는 함수나 테스트 스위트의 공통 부분을 추출함으로써 DRY(Don't Repeat \"\n\"Yourself) 코드를 작성할 수 있게 해줍니다. 다음은 `Vec<T>`에 대해 `+=`, `*=` \"\n\"및 `-=` 연산자를 구현하고 테스트하는 예제입니다:\"\n\n#: src/macros/dry.md:11\nmsgid \"\"\n\"// The `tt` (token tree) designator is used for\\n\"\n\"    // operators and tokens.\\n\"\nmsgstr \"\"\n\"// `tt`(토큰 트리) 지시자는\\n\"\n\"    // 연산자와 토큰에 사용됩니다.\\n\"\n\n#: src/macros/dry.md:15\nmsgid \"\\\"{:?}: dimension mismatch: {:?} {:?} {:?}\\\"\"\nmsgstr \"\\\"{:?}: dimension mismatch: {:?} {:?} {:?}\\\"\"\n\n#: src/macros/dry.md:30\nmsgid \"// *x = x.$method(*y);\\n\"\nmsgstr \"// *x = x.$method(*y);\\n\"\n\n#: src/macros/dry.md:35\nmsgid \"// Implement `add_assign`, `mul_assign`, and `sub_assign` functions.\\n\"\nmsgstr \"// `add_assign`, `mul_assign`, `sub_assign` 함수를 구현합니다.\\n\"\n\n#: src/macros/dry.md:60\nmsgid \"// Test `add_assign`, `mul_assign`, and `sub_assign`.\\n\"\nmsgstr \"// `add_assign`, `mul_assign`, `sub_assign`을 테스트합니다.\\n\"\n\n#: src/macros/dsl.md:1\nmsgid \"Domain Specific Languages (DSLs)\"\nmsgstr \"도메인 특화 언어 (DSL)\"\n\n#: src/macros/dsl.md:3\nmsgid \"\"\n\"A DSL is a mini \\\"language\\\" embedded in a Rust macro. It is completely \"\n\"valid Rust because the macro system expands into normal Rust constructs, but \"\n\"it looks like a small language. This allows you to define concise or \"\n\"intuitive syntax for some special functionality (within bounds).\"\nmsgstr \"\"\n\"DSL은 Rust 매크로에 내장된 미니 \\\"언어\\\"입니다. 매크로 시스템이 일반적인 \"\n\"Rust 구문으로 확장되기 때문에 완전히 유효한 Rust 코드이지만, 작은 언어처럼 보\"\n\"입니다. 이를 통해 (일정한 범위 내에서) 특정 기능을 위한 간결하거나 직관적인 \"\n\"구문을 정의할 수 있습니다.\"\n\n#: src/macros/dsl.md:8\nmsgid \"\"\n\"Suppose that I want to define a little calculator API. I would like to \"\n\"supply an expression and have the output printed to console.\"\nmsgstr \"\"\n\"작은 계산기 API를 정의하고 싶다고 가정해 봅시다. 표현식을 입력하면 출력이 콘\"\n\"솔에 인쇄되도록 하고 싶습니다.\"\n\n#: src/macros/dsl.md:15\nmsgid \"// Force types to be unsigned integers\\n\"\nmsgstr \"// 타입을 부호 없는 정수로 강제합니다\\n\"\n\n#: src/macros/dsl.md:16 src/macros/variadics.md:15\nmsgid \"\\\"{} = {}\\\"\"\nmsgstr \"\\\"{} = {}\\\"\"\n\n#: src/macros/dsl.md:23\nmsgid \"// hehehe `eval` is _not_ a Rust keyword!\\n\"\nmsgstr \"// 히히히 `eval`은 Rust 키워드가 아닙니다!\\n\"\n\n#: src/macros/dsl.md:32 src/macros/variadics.md:35\nmsgid \"Output:\"\nmsgstr \"출력:\"\n\n#: src/macros/dsl.md:39\nmsgid \"\"\n\"This was a very simple example, but much more complex interfaces have been \"\n\"developed, such as [`lazy_static`](https://crates.io/crates/lazy_static) or \"\n\"[`clap`](https://crates.io/crates/clap).\"\nmsgstr \"\"\n\"이것은 매우 간단한 예제였지만, [`lazy_static`](https://crates.io/crates/\"\n\"lazy_static)이나 [`clap`](https://crates.io/crates/clap)과 같이 훨씬 더 복잡\"\n\"한 인터페이스들이 개발되어 있습니다.\"\n\n#: src/macros/dsl.md:43\nmsgid \"\"\n\"Also, note the two pairs of braces in the macro. The outer ones are part of \"\n\"the syntax of `macro_rules!`, in addition to `()` or `[]`.\"\nmsgstr \"\"\n\"또한, 매크로에 두 쌍의 중괄호가 있음에 유의하세요. 바깥쪽 중괄호는 `()`나 \"\n\"`[]` 외에 `macro_rules!` 문법의 일부입니다.\"\n\n#: src/macros/variadics.md:1\nmsgid \"Variadic Interfaces\"\nmsgstr \"가변 인자 인터페이스\"\n\n#: src/macros/variadics.md:3\nmsgid \"\"\n\"A _variadic_ interface takes an arbitrary number of arguments. For example, \"\n\"`println!` can take an arbitrary number of arguments, as determined by the \"\n\"format string.\"\nmsgstr \"\"\n\"가변 인자 인터페이스는 임의의 개수의 인자를 취합니다. 예를 들어, `println!`\"\n\"은 형식 문자열에 따라 결정되는 임의의 개수의 인자를 취할 수 있습니다.\"\n\n#: src/macros/variadics.md:7\nmsgid \"\"\n\"We can extend our `calculate!` macro from the previous section to be \"\n\"variadic:\"\nmsgstr \"\"\n\"이전 섹션의 `calculate!` 매크로를 가변 인자를 취하도록 확장할 수 있습니다:\"\n\n#: src/macros/variadics.md:11\nmsgid \"// The pattern for a single `eval`\\n\"\nmsgstr \"// 단일 `eval`을 위한 패턴\\n\"\n\n#: src/macros/variadics.md:14\nmsgid \"// Force types to be integers\\n\"\nmsgstr \"// 타입을 정수로 강제합니다\\n\"\n\n#: src/macros/variadics.md:19\nmsgid \"// Decompose multiple `eval`s recursively\\n\"\nmsgstr \"// 여러 개의 `eval`을 재귀적으로 분해합니다\\n\"\n\n#: src/macros/variadics.md:27\nmsgid \"// Look ma! Variadic `calculate!`!\\n\"\nmsgstr \"// 보세요! 가변 인자 `calculate!`입니다!\\n\"\n\n#: src/error.md:3\nmsgid \"\"\n\"Error handling is the process of handling the possibility of failure. For \"\n\"example, failing to read a file and then continuing to use that _bad_ input \"\n\"would clearly be problematic. Noticing and explicitly managing those errors \"\n\"saves the rest of the program from various pitfalls.\"\nmsgstr \"\"\n\"에러 핸들링은 실패 가능성을 처리하는 과정입니다. 예를 들어, 파일을 읽는 데 실\"\n\"패했는데도 그 *잘못된* 입력을 계속 사용하는 것은 분명히 문제가 될 것입니다. \"\n\"이러한 에러를 인지하고 명시적으로 관리하면 프로그램의 나머지 부분을 다양한 함\"\n\"정으로부터 보호할 수 있습니다.\"\n\n#: src/error.md:8\nmsgid \"\"\n\"There are various ways to deal with errors in Rust, which are described in \"\n\"the following subchapters. They all have more or less subtle differences and \"\n\"different use cases. As a rule of thumb:\"\nmsgstr \"\"\n\"Rust에는 에러를 처리하는 다양한 방법이 있으며, 이는 이어지는 하위 장에서 설명\"\n\"합니다. 이들은 모두 어느 정도 미묘한 차이가 있으며 용도가 다릅니다. 일반적인 \"\n\"원칙은 다음과 같습니다:\"\n\n#: src/error.md:12\nmsgid \"\"\n\"An explicit `panic` is mainly useful for tests and dealing with \"\n\"unrecoverable errors. For prototyping it can be useful, for example when \"\n\"dealing with functions that haven't been implemented yet, but in those cases \"\n\"the more descriptive `unimplemented` is better. In tests `panic` is a \"\n\"reasonable way to explicitly fail.\"\nmsgstr \"\"\n\"명시적인 `panic`은 주로 테스트와 복구 불가능한 에러를 처리하는 데 유용합니\"\n\"다. 프로토타이핑을 할 때도 유용할 수 있는데, 예를 들어 아직 구현되지 않은 함\"\n\"수를 다룰 때 유용하지만, 그런 경우에는 더 설명적인 `unimplemented`를 사용하\"\n\"는 것이 좋습니다. 테스트에서 `panic`은 명시적으로 실패를 알리는 합리적인 방법\"\n\"입니다.\"\n\n#: src/error.md:17\nmsgid \"\"\n\"The `Option` type is for when a value is optional or when the lack of a \"\n\"value is not an error condition. For example the parent of a directory - `/` \"\n\"and `C:` don't have one. When dealing with `Option`s, `unwrap` is fine for \"\n\"prototyping and cases where it's absolutely certain that there is guaranteed \"\n\"to be a value. However `expect` is more useful since it lets you specify an \"\n\"error message in case something goes wrong anyway.\"\nmsgstr \"\"\n\"`Option` 타입은 값이 선택적이거나 값의 부재가 에러 상황이 아닐 때 사용됩니\"\n\"다. 예를 들어 디렉터리의 부모 - `/`와 `C:`는 부모가 없습니다. `Option`을 다\"\n\"룰 때, `unwrap`은 프로토타이핑이나 값이 반드시 존재한다고 절대적으로 확신할 \"\n\"수 있는 경우에 괜찮습니다. 하지만 `expect`는 무언가 잘못되었을 경우를 대비해 \"\n\"에러 메시지를 지정할 수 있게 해주므로 더 유용합니다.\"\n\n#: src/error.md:24\nmsgid \"\"\n\"When there is a chance that things do go wrong and the caller has to deal \"\n\"with the problem, use `Result`. You can `unwrap` and `expect` them as well \"\n\"(please don't do that unless it's a test or quick prototype).\"\nmsgstr \"\"\n\"무언가 잘못될 가능성이 있고 호출자가 그 문제를 처리해야 할 때는 `Result`를 사\"\n\"용하세요. `Result`에 대해서도 `unwrap`과 `expect`를 사용할 수 있지만 (테스트\"\n\"나 빠른 프로토타입이 아니라면 제발 그렇게 하지 마세요).\"\n\n#: src/error.md:28\nmsgid \"\"\n\"For a more rigorous discussion of error handling, refer to the error \"\n\"handling section in the [official book](https://doc.rust-lang.org/book/\"\n\"ch09-00-error-handling.html).\"\nmsgstr \"\"\n\"에러 핸들링에 대한 더 엄밀한 논의는 [공식 도서](https://doc.rust-lang.org/\"\n\"book/ch09-00-error-handling.html)의 에러 핸들링 섹션을 참조하세요.\"\n\n#: src/error/panic.md:3\nmsgid \"\"\n\"The simplest error handling mechanism we will see is `panic`. It prints an \"\n\"error message, starts unwinding the stack, and usually exits the program. \"\n\"Here, we explicitly call `panic` on our error condition:\"\nmsgstr \"\"\n\"우리가 살펴볼 가장 단순한 에러 핸들링 메커니즘은 `panic`입니다. 이것은 에러 \"\n\"메시지를 출력하고, 스택을 되감기(unwind) 시작하며, 보통 프로그램을 종료합니\"\n\"다. 여기서는 에러 조건에 대해 명시적으로 `panic`을 호출합니다:\"\n\n#: src/error/panic.md:9\nmsgid \"// You shouldn't drink too many sugary beverages.\\n\"\nmsgstr \"// 설탕이 든 음료를 너무 많이 마시면 안 됩니다.\\n\"\n\n#: src/error/panic.md:10 src/error/panic.md:17 src/error/abort_unwind.md:10\n#: src/error/abort_unwind.md:23 src/error/abort_unwind.md:41\n#: src/error/abort_unwind.md:50 src/error/option_unwrap.md:32\n#: src/error/option_unwrap.md:43 src/error/option_unwrap.md:50\nmsgid \"\\\"lemonade\\\"\"\nmsgstr \"\\\"레모네이드\\\"\"\n\n#: src/error/panic.md:10 src/error/option_unwrap.md:43\nmsgid \"\\\"AAAaaaaa!!!!\\\"\"\nmsgstr \"\\\"으아아아아!!!!\\\"\"\n\n#: src/error/panic.md:12 src/error/abort_unwind.md:17\n#: src/error/abort_unwind.md:44\nmsgid \"\\\"Some refreshing {} is all I need.\\\"\"\nmsgstr \"\\\"상쾌한 {}만 있으면 돼요.\\\"\"\n\n#: src/error/panic.md:16 src/error/abort_unwind.md:22\n#: src/error/abort_unwind.md:49 src/error/option_unwrap.md:49\nmsgid \"\\\"water\\\"\"\nmsgstr \"\\\"물\\\"\"\n\n#: src/error/panic.md:18\nmsgid \"\\\"still water\\\"\"\nmsgstr \"\\\"생수\\\"\"\n\n#: src/error/panic.md:22\nmsgid \"\"\n\"The first call to `drink` works. The second panics and thus the third is \"\n\"never called.\"\nmsgstr \"\"\n\"첫 번째 `drink` 호출은 작동합니다. 두 번째는 패닉을 일으키며, 따라서 세 번째\"\n\"는 결코 호출되지 않습니다.\"\n\n#: src/error/abort_unwind.md:1\nmsgid \"`abort` and `unwind`\"\nmsgstr \"`abort`와 `unwind`\"\n\n#: src/error/abort_unwind.md:3\nmsgid \"\"\n\"The previous section illustrates the error handling mechanism `panic`.  \"\n\"Different code paths can be conditionally compiled based on the panic \"\n\"setting. The current values available are `unwind` and `abort`.\"\nmsgstr \"\"\n\"이전 섹션에서는 에러 핸들링 메커니즘인 `panic`을 설명했습니다. 패닉 설정에 따\"\n\"라 서로 다른 코드 경로를 조건부로 컴파일할 수 있습니다. 현재 사용 가능한 값\"\n\"은 `unwind`와 `abort`입니다.\"\n\n#: src/error/abort_unwind.md:5\nmsgid \"\"\n\"Building on the prior lemonade example, we explicitly use the panic strategy \"\n\"to exercise different lines of code.\"\nmsgstr \"\"\n\"앞선 레모네이드 예제를 바탕으로, 서로 다른 코드 라인을 실행해 보기 위해 패닉 \"\n\"전략을 명시적으로 사용합니다.\"\n\n#: src/error/abort_unwind.md:9\nmsgid \"// You shouldn't drink too much sugary beverages.\\n\"\nmsgstr \"// 설탕이 든 음료를 너무 많이 마시면 안 됩니다.\\n\"\n\n#: src/error/abort_unwind.md:11\nmsgid \"\\\"abort\\\"\"\nmsgstr \"\\\"abort\\\"\"\n\n#: src/error/abort_unwind.md:12 src/error/abort_unwind.md:37\nmsgid \"\\\"This is not your party. Run!!!!\\\"\"\nmsgstr \"\\\"여긴 당신 파티가 아니에요. 도망쳐요!!!!\\\"\"\n\n#: src/error/abort_unwind.md:14 src/error/abort_unwind.md:32\nmsgid \"\\\"Spit it out!!!!\\\"\"\nmsgstr \"\\\"뱉어내요!!!!\\\"\"\n\n#: src/error/abort_unwind.md:27\nmsgid \"\"\n\"Here is another example focusing on rewriting `drink()` and explicitly use \"\n\"the `unwind` keyword.\"\nmsgstr \"\"\n\"여기 `drink()`를 다시 작성하고 `unwind` 키워드를 명시적으로 사용하는 또 다른 \"\n\"예제가 있습니다.\"\n\n#: src/error/abort_unwind.md:30 src/error/abort_unwind.md:35\nmsgid \"\\\"unwind\\\"\"\nmsgstr \"\\\"unwind\\\"\"\n\n#: src/error/abort_unwind.md:54\nmsgid \"\"\n\"The panic strategy can be set from the command line by using `abort` or \"\n\"`unwind`.\"\nmsgstr \"\"\n\"패닉 전략은 커맨드 라인에서 `abort` 또는 `unwind`를 사용하여 설정할 수 있습니\"\n\"다.\"\n\n#: src/error/option_unwrap.md:3\nmsgid \"\"\n\"In the last example, we showed that we can induce program failure at will. \"\n\"We told our program to `panic` if we drink a sugary lemonade. But what if we \"\n\"expect _some_ drink but don't receive one? That case would be just as bad, \"\n\"so it needs to be handled!\"\nmsgstr \"\"\n\"지난 예제에서, 우리는 프로그램을 의도적으로 실패하게 만들 수 있음을 보여주었\"\n\"습니다. 설탕이 든 레모네이드를 마시면 `panic`하도록 프로그램에 지시했습니다. \"\n\"하지만 음료가 있을 것으로 예상했는데 아무것도 받지 못하면 어떨까요? 그 경우\"\n\"도 마찬가지로 나쁠 것이므로, 처리가 필요합니다!\"\n\n#: src/error/option_unwrap.md:8\nmsgid \"\"\n\"We _could_ test this against the null string (`\\\"\\\"`) as we do with a \"\n\"lemonade. Since we're using Rust, let's instead have the compiler point out \"\n\"cases where there's no drink.\"\nmsgstr \"\"\n\"레모네이드의 경우처럼 빈 문자열(`\\\"\\\"`)인지 테스트할 수도 있습니다. 하지만 우\"\n\"리는 Rust를 사용하고 있으니, 대신 컴파일러가 음료가 없는 경우를 지적하도록 해\"\n\"봅시다.\"\n\n#: src/error/option_unwrap.md:12\nmsgid \"\"\n\"An `enum` called `Option<T>` in the `std` library is used when absence is a \"\n\"possibility. It manifests itself as one of two \\\"options\\\":\"\nmsgstr \"\"\n\"표준 라이브러리의 `Option<T>`라는 열거형은 부재의 가능성이 있을 때 사용됩니\"\n\"다. 이는 두 가지 \\\"옵션\\\" 중 하나로 나타납니다:\"\n\n#: src/error/option_unwrap.md:15\nmsgid \"`Some(T)`: An element of type `T` was found\"\nmsgstr \"`Some(T)`: `T` 타입의 요소가 발견됨\"\n\n#: src/error/option_unwrap.md:16\nmsgid \"`None`: No element was found\"\nmsgstr \"`None`: 요소가 발견되지 않음\"\n\n#: src/error/option_unwrap.md:18\nmsgid \"\"\n\"These cases can either be explicitly handled via `match` or implicitly with \"\n\"`unwrap`. Implicit handling will either return the inner element or `panic`.\"\nmsgstr \"\"\n\"이러한 경우들은 `match`를 통해 명시적으로 처리하거나 `unwrap`을 통해 암시적으\"\n\"로 처리할 수 있습니다. 암시적 처리는 내부 요소를 반환하거나 `panic`을 일으킵\"\n\"니다.\"\n\n#: src/error/option_unwrap.md:21\nmsgid \"\"\n\"Note that it's possible to manually customize `panic` with [expect](https://\"\n\"doc.rust-lang.org/std/option/enum.Option.html#method.expect), but `unwrap` \"\n\"otherwise leaves us with a less meaningful output than explicit handling. In \"\n\"the following example, explicit handling yields a more controlled result \"\n\"while retaining the option to `panic` if desired.\"\nmsgstr \"\"\n\"[expect](https://doc.rust-lang.org/std/option/enum.Option.html#method.expect)\"\n\"를 사용하여 `panic`을 수동으로 커스터마이징할 수 있지만, 그렇지 않으면 \"\n\"`unwrap`은 명시적 처리보다 덜 의미 있는 출력을 남깁니다. 다음 예제에서, 명시\"\n\"적 처리는 원하는 경우 `panic`할 수 있는 옵션을 유지하면서도 더 제어된 결과를 \"\n\"제공합니다.\"\n\n#: src/error/option_unwrap.md:27\nmsgid \"\"\n\"// The adult has seen it all, and can handle any drink well.\\n\"\n\"// All drinks are handled explicitly using `match`.\\n\"\nmsgstr \"\"\n\"// 어른은 모든 것을 보았고, 어떤 음료든 잘 다룰 수 있습니다.\\n\"\n\"// 모든 음료는 `match`를 사용하여 명시적으로 처리됩니다.\\n\"\n\n#: src/error/option_unwrap.md:30\nmsgid \"// Specify a course of action for each case.\\n\"\nmsgstr \"// 각 경우에 대한 행동 지침을 지정합니다.\\n\"\n\n#: src/error/option_unwrap.md:32\nmsgid \"\\\"Yuck! Too sugary.\\\"\"\nmsgstr \"\\\"윽! 너무 달아요.\\\"\"\n\n#: src/error/option_unwrap.md:33\nmsgid \"\\\"{}? How nice.\\\"\"\nmsgstr \"\\\"{}요? 좋네요.\\\"\"\n\n#: src/error/option_unwrap.md:34\nmsgid \"\\\"No drink? Oh well.\\\"\"\nmsgstr \"\\\"음료가 없나요? 뭐, 어쩔 수 없죠.\\\"\"\n\n#: src/error/option_unwrap.md:37\nmsgid \"\"\n\"// Others will `panic` before drinking sugary drinks.\\n\"\n\"// All drinks are handled implicitly using `unwrap`.\\n\"\nmsgstr \"\"\n\"// 다른 사람들은 단 음료를 마시기 전에 `panic`할 것입니다.\\n\"\n\"// 모든 음료는 `unwrap`을 사용하여 암시적으로 처리됩니다.\\n\"\n\n#: src/error/option_unwrap.md:41\nmsgid \"// `unwrap` returns a `panic` when it receives a `None`.\\n\"\nmsgstr \"// `unwrap`은 `None`을 받으면 `panic`을 반환합니다.\\n\"\n\n#: src/error/option_unwrap.md:45\nmsgid \"\\\"I love {}s!!!!!\\\"\"\nmsgstr \"\\\"난 {}가 너무 좋아요!!!!!\\\"\"\n\n#: src/error/option_unwrap.md:57\nmsgid \"\\\"coffee\\\"\"\nmsgstr \"\\\"커피\\\"\"\n\n#: src/error/option_unwrap/question_mark.md:3\nmsgid \"\"\n\"You can unpack `Option`s by using `match` statements, but it's often easier \"\n\"to use the `?` operator. If `x` is an `Option`, then evaluating `x?` will \"\n\"return the underlying value if `x` is `Some`, otherwise it will terminate \"\n\"whatever function is being executed and return `None`.\"\nmsgstr \"\"\n\"`match` 문을 사용하여 `Option`을 풀 수(unpack) 있지만, `?` 연산자를 사용하는 \"\n\"것이 더 쉬울 때가 많습니다. 만약 `x`가 `Option`이라면, `x?`를 평가할 때 `x`\"\n\"가 `Some`이면 그 내부 값을 반환하고, 그렇지 않으면 실행 중인 함수를 종료하고 \"\n\"`None`을 반환합니다.\"\n\n#: src/error/option_unwrap/question_mark.md:10\nmsgid \"\"\n\"// If `current_age` is `None`, this returns `None`.\\n\"\n\"    // If `current_age` is `Some`, the inner `u8` value + 1\\n\"\n\"    // gets assigned to `next_age`\\n\"\nmsgstr \"\"\n\"// 만약 `current_age`가 `None`이면, 이는 `None`을 반환합니다.\\n\"\n\"    // 만약 `current_age`가 `Some`이면, 내부의 `u8` 값 + 1이\\n\"\n\"    // `next_age`에 할당됩니다.\\n\"\n\n#: src/error/option_unwrap/question_mark.md:14\nmsgid \"\\\"Next year I will be {}\\\"\"\nmsgstr \"\\\"내년에 저는 {}살이 됩니다\\\"\"\n\n#: src/error/option_unwrap/question_mark.md:18\nmsgid \"You can chain many `?`s together to make your code much more readable.\"\nmsgstr \"\"\n\"여러 개의 `?`를 체인으로 연결하여 코드를 훨씬 더 읽기 쉽게 만들 수 있습니다.\"\n\n#: src/error/option_unwrap/question_mark.md:38\nmsgid \"\"\n\"// Gets the area code of the phone number of the person's job, if it \"\n\"exists.\\n\"\nmsgstr \"// 사람의 직장 전화번호의 지역 번호가 존재한다면 가져옵니다.\\n\"\n\n#: src/error/option_unwrap/question_mark.md:40\nmsgid \"\"\n\"// This would need many nested `match` statements without the `?` operator.\\n\"\n\"        // It would take a lot more code - try writing it yourself and see \"\n\"which\\n\"\n\"        // is easier.\\n\"\nmsgstr \"\"\n\"// `?` 연산자가 없다면 많은 중첩된 `match` 문이 필요했을 것입니다.\\n\"\n\"        // 훨씬 더 많은 코드가 필요할 것입니다 - 직접 작성해 보고 어느 쪽이 \"\n\"더 쉬운지\\n\"\n\"        // 확인해 보세요.\\n\"\n\n#: src/error/option_unwrap/map.md:3\nmsgid \"\"\n\"`match` is a valid method for handling `Option`s. However, you may \"\n\"eventually find heavy usage tedious, especially with operations only valid \"\n\"with an input. In these cases, [combinators](https://doc.rust-lang.org/\"\n\"reference/glossary.html#combinator) can be used to manage control flow in a \"\n\"modular fashion.\"\nmsgstr \"\"\n\"`match`는 `Option`을 처리하는 유효한 방법입니다. 하지만 특히 입력이 있을 때\"\n\"만 유효한 연산들의 경우, 과도한 사용은 지루할 수 있습니다. 이런 경우, [콤비네\"\n\"이터(combinators)](https://doc.rust-lang.org/reference/\"\n\"glossary.html#combinator)를 사용하여 모듈식으로 제어 흐름을 관리할 수 있습니\"\n\"다.\"\n\n#: src/error/option_unwrap/map.md:8\nmsgid \"\"\n\"`Option` has a built in method called `map()`, a combinator for the simple \"\n\"mapping of `Some -> Some` and `None -> None`. Multiple `map()` calls can be \"\n\"chained together for even more flexibility.\"\nmsgstr \"\"\n\"`Option`에는 `Some -> Some` 및 `None -> None`의 단순 매핑을 위한 콤비네이터\"\n\"인 `map()` 메서드가 내장되어 있습니다. 여러 개의 `map()` 호출을 체인으로 연결\"\n\"하여 훨씬 더 유연하게 사용할 수 있습니다.\"\n\n#: src/error/option_unwrap/map.md:12\nmsgid \"\"\n\"In the following example, `process()` replaces all functions previous to it \"\n\"while staying compact.\"\nmsgstr \"\"\n\"다음 예제에서 `process()`는 간결함을 유지하면서 그 이전의 모든 함수들을 대체\"\n\"합니다.\"\n\n#: src/error/option_unwrap/map.md:23\nmsgid \"\"\n\"// Peeling food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the peeled food.\\n\"\nmsgstr \"\"\n\"// 음식을 껍질 벗깁니다. 음식이 없다면 `None`을 반환합니다.\\n\"\n\"// 그렇지 않으면 껍질을 벗긴 음식을 반환합니다.\\n\"\n\n#: src/error/option_unwrap/map.md:32\nmsgid \"\"\n\"// Chopping food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the chopped food.\\n\"\nmsgstr \"\"\n\"// 음식을 썹니다. 음식이 없다면 `None`을 반환합니다.\\n\"\n\"// 그렇지 않으면 썬 음식을 반환합니다.\\n\"\n\n#: src/error/option_unwrap/map.md:41\nmsgid \"\"\n\"// Cooking food. Here, we showcase `map()` instead of `match` for case \"\n\"handling.\\n\"\nmsgstr \"\"\n\"// 음식을 요리합니다. 여기서는 케이스 처리를 위해 `match` 대신 `map()`을 보여\"\n\"줍니다.\\n\"\n\n#: src/error/option_unwrap/map.md:46\nmsgid \"\"\n\"// A function to peel, chop, and cook food all in sequence.\\n\"\n\"// We chain multiple uses of `map()` to simplify the code.\\n\"\nmsgstr \"\"\n\"// 음식을 순서대로 껍질 벗기고, 썰고, 요리하는 함수입니다.\\n\"\n\"// 코드를 단순화하기 위해 `map()`을 여러 번 체인으로 연결합니다.\\n\"\n\n#: src/error/option_unwrap/map.md:54\nmsgid \"// Check whether there's food or not before trying to eat it!\\n\"\nmsgstr \"// 먹기 전에 음식이 있는지 없는지 확인합니다!\\n\"\n\n#: src/error/option_unwrap/map.md:58\nmsgid \"\\\"Mmm. I love {:?}\\\"\"\nmsgstr \"\\\"음~ 전 {:?}가 정말 좋아요\\\"\"\n\n#: src/error/option_unwrap/map.md:59\nmsgid \"\\\"Oh no! It wasn't edible.\\\"\"\nmsgstr \"\\\"오 이런! 먹을 수 있는 게 아니었어요.\\\"\"\n\n#: src/error/option_unwrap/map.md:70\nmsgid \"// Let's try the simpler looking `process()` now.\\n\"\nmsgstr \"// 이제 더 간단해 보이는 `process()`를 시도해 봅시다.\\n\"\n\n#: src/error/option_unwrap/map.md:81\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\nmsgstr \"\"\n\"[클로저](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\n\n#: src/error/option_unwrap/and_then.md:3\nmsgid \"\"\n\"`map()` was described as a chainable way to simplify `match` statements. \"\n\"However, using `map()` on a function that returns an `Option<T>` results in \"\n\"the nested `Option<Option<T>>`. Chaining multiple calls together can then \"\n\"become confusing. That's where another combinator called `and_then()`, known \"\n\"in some languages as flatmap, comes in.\"\nmsgstr \"\"\n\"`map()`은 `match` 문을 단순화하기 위한 체인 가능한 방법으로 설명되었습니다. \"\n\"하지만 `Option<T>`를 반환하는 함수에 `map()`을 사용하면 중첩된 \"\n\"`Option<Option<T>>`가 생성됩니다. 여러 호출을 함께 체인으로 연결하는 것은 혼\"\n\"란스러울 수 있습니다. 이때 다른 언어에서 `flatmap`으로 알려진 `and_then()`이\"\n\"라는 또 다른 콤비네이터가 등장합니다.\"\n\n#: src/error/option_unwrap/and_then.md:9\nmsgid \"\"\n\"`and_then()` calls its function input with the wrapped value and returns the \"\n\"result. If the `Option` is `None`, then it returns `None` instead.\"\nmsgstr \"\"\n\"`and_then()`은 래핑된 값을 가지고 함수 입력을 호출하고 그 결과를 반환합니다. \"\n\"만약 `Option`이 `None`이라면, 대신 `None`을 반환합니다.\"\n\n#: src/error/option_unwrap/and_then.md:11\nmsgid \"\"\n\"In the following example, `cookable_v3()` results in an `Option<Food>`. \"\n\"Using `map()` instead of `and_then()` would have given an \"\n\"`Option<Option<Food>>`, which is an invalid type for `eat()`.\"\nmsgstr \"\"\n\"다음 예제에서, `cookable_v3()`는 `Option<Food>`를 결과로 냅니다. \"\n\"`and_then()` 대신 `map()`을 사용했다면 `Option<Option<Food>>`를 얻었을 것이\"\n\"며, 이는 `eat()`에 대해 유효하지 않은 타입입니다.\"\n\n#: src/error/option_unwrap/and_then.md:20\nmsgid \"// We don't have the ingredients to make Sushi.\\n\"\nmsgstr \"// 우리는 스시를 만들 재료가 없습니다.\\n\"\n\n#: src/error/option_unwrap/and_then.md:28\nmsgid \"// We have the recipe for everything except Cordon Bleu.\\n\"\nmsgstr \"\"\n\"// 우리는 코르동 블뢰(Cordon Bleu)를 제외한 모든 것의 레시피를 가지고 있습니\"\n\"다.\\n\"\n\n#: src/error/option_unwrap/and_then.md:36\nmsgid \"\"\n\"// To make a dish, we need both the recipe and the ingredients.\\n\"\n\"// We can represent the logic with a chain of `match`es:\\n\"\nmsgstr \"\"\n\"// 요리를 하려면 레시피와 재료가 모두 필요합니다.\\n\"\n\"// 우리는 이 로직을 `match`들의 체인으로 표현할 수 있습니다:\\n\"\n\n#: src/error/option_unwrap/and_then.md:45\nmsgid \"\"\n\"// This can conveniently be rewritten more compactly with `and_then()`:\\n\"\nmsgstr \"// 이는 `and_then()`을 사용하여 더 간결하게 다시 작성될 수 있습니다:\\n\"\n\n#: src/error/option_unwrap/and_then.md:50\nmsgid \"\"\n\"// Otherwise we'd need to `flatten()` an `Option<Option<Food>>`\\n\"\n\"// to get an `Option<Food>`:\\n\"\nmsgstr \"\"\n\"// 그렇지 않다면 `Option<Food>`를 얻기 위해 `Option<Option<Food>>`를 \"\n\"`flatten()`해야 할 것입니다:\\n\"\n\n#: src/error/option_unwrap/and_then.md:59\nmsgid \"\\\"Yay! On {:?} we get to eat {:?}.\\\"\"\nmsgstr \"\\\"야호! {:?}에 우리는 {:?}를 먹게 되었어요.\\\"\"\n\n#: src/error/option_unwrap/and_then.md:60\nmsgid \"\\\"Oh no. We don't get to eat on {:?}?\\\"\"\nmsgstr \"\\\"오 이런. {:?}에는 못 먹는 건가요?\\\"\"\n\n#: src/error/option_unwrap/and_then.md:75\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then), and [`Option::flatten()`]\"\n\"(https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\nmsgstr \"\"\n\"[클로저](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then), 그리고 [`Option::flatten()`]\"\n\"(https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\n\n#: src/error/option_unwrap/defaults.md:1\nmsgid \"Unpacking options and defaults\"\nmsgstr \"Option 풀기와 기본값\"\n\n#: src/error/option_unwrap/defaults.md:3\nmsgid \"\"\n\"There is more than one way to unpack an `Option` and fall back on a default \"\n\"if it is `None`. To choose the one that meets our needs, we need to consider \"\n\"the following:\"\nmsgstr \"\"\n\"`Option`이 `None`일 때 이를 풀고 기본값으로 돌아가는 방법은 여러 가지가 있습\"\n\"니다. 우리의 필요에 맞는 것을 선택하려면 다음을 고려해야 합니다:\"\n\n#: src/error/option_unwrap/defaults.md:5\nmsgid \"do we need eager or lazy evaluation?\"\nmsgstr \"\"\n\"조급한(eager) 평가가 필요한가요, 아니면 느긋한(lazy) 평가가 필요한가요?\"\n\n#: src/error/option_unwrap/defaults.md:6\nmsgid \"\"\n\"do we need to keep the original empty value intact, or modify it in place?\"\nmsgstr \"\"\n\"원래의 빈 값을 그대로 두어야 하나요, 아니면 그 자리에서 수정해야 하나요?\"\n\n#: src/error/option_unwrap/defaults.md:8\nmsgid \"`or()` is chainable, evaluates eagerly, keeps empty value intact\"\nmsgstr \"`or()`은 체인 가능하며, 조급하게 평가하고, 빈 값을 그대로 유지합니다.\"\n\n#: src/error/option_unwrap/defaults.md:10\nmsgid \"\"\n\"`or()`is chainable and eagerly evaluates its argument, as is shown in the \"\n\"following example. Note that because `or`'s arguments are evaluated eagerly, \"\n\"the variable passed to `or` is moved.\"\nmsgstr \"\"\n\"`or()`은 체인 가능하며 다음 예제에서 보듯 인자를 조급하게 평가합니다. `or`의 \"\n\"인자들은 조급하게 평가되기 때문에, `or`에 전달된 변수는 이동(move)된다는 점\"\n\"에 유의하세요.\"\n\n#: src/error/option_unwrap/defaults.md:22\n#: src/error/option_unwrap/defaults.md:55\nmsgid \"\\\"first_available_fruit: {:?}\\\"\"\nmsgstr \"\\\"first_available_fruit: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:23\nmsgid \"// first_available_fruit: Some(Orange)\\n\"\nmsgstr \"// first_available_fruit: Some(Orange)\\n\"\n\n#: src/error/option_unwrap/defaults.md:25\nmsgid \"\"\n\"// `or` moves its argument.\\n\"\n\"    // In the example above, `or(orange)` returned a `Some`, so `or(apple)` \"\n\"was not invoked.\\n\"\n\"    // But the variable named `apple` has been moved regardless, and cannot \"\n\"be used anymore.\\n\"\n\"    // println!(\\\"Variable apple was moved, so this line won't compile: {:?}\"\n\"\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\"// `or`는 인자를 이동시킵니다.\\n\"\n\"    // 위 예제에서 `or(orange)`가 `Some`을 반환했으므로 `or(apple)`은 호출되\"\n\"지 않았습니다.\\n\"\n\"    // 하지만 `apple`이라는 이름의 변수는 상관없이 이동되었으며, 더 이상 사용\"\n\"할 수 없습니다.\\n\"\n\"    // println!(\\\"Variable apple was moved, so this line won't compile: {:?}\"\n\"\\\", apple);\\n\"\n\"    // TODO: 위 줄의 주석을 해제하여 컴파일러 에러를 확인해 보세요.\\n\"\n\n#: src/error/option_unwrap/defaults.md:33\nmsgid \"`or_else()` is chainable, evaluates lazily, keeps empty value intact\"\nmsgstr \"\"\n\"`or_else()`는 체인 가능하며, 느긋하게 평가하고, 빈 값을 그대로 유지합니다.\"\n\n#: src/error/option_unwrap/defaults.md:35\nmsgid \"\"\n\"Another alternative is to use `or_else`, which is also chainable, and \"\n\"evaluates lazily, as is shown in the following example:\"\nmsgstr \"\"\n\"또 다른 대안은 `or_else`를 사용하는 것입니다. 이 역시 체인 가능하며 다음 예제\"\n\"에서 보듯 느긋하게 평가합니다:\"\n\n#: src/error/option_unwrap/defaults.md:44\nmsgid \"\\\"Providing kiwi as fallback\\\"\"\nmsgstr \"\\\"키위를 대체값으로 제공함\\\"\"\n\n#: src/error/option_unwrap/defaults.md:48\n#: src/error/option_unwrap/defaults.md:93\nmsgid \"\\\"Providing lemon as fallback\\\"\"\nmsgstr \"\\\"레몬을 대체값으로 제공함\\\"\"\n\n#: src/error/option_unwrap/defaults.md:56\nmsgid \"\"\n\"// Providing kiwi as fallback\\n\"\n\"    // first_available_fruit: Some(Kiwi)\\n\"\nmsgstr \"\"\n\"// 키위를 대체값으로 제공함\\n\"\n\"    // first_available_fruit: Some(Kiwi)\\n\"\n\n#: src/error/option_unwrap/defaults.md:61\nmsgid \"`get_or_insert()` evaluates eagerly, modifies empty value in place\"\nmsgstr \"`get_or_insert()`는 조급하게 평가하며, 빈 값을 그 자리에서 수정합니다.\"\n\n#: src/error/option_unwrap/defaults.md:63\nmsgid \"\"\n\"To make sure that an `Option` contains a value, we can use `get_or_insert` \"\n\"to modify it in place with a fallback value, as is shown in the following \"\n\"example. Note that `get_or_insert` eagerly evaluates its parameter, so \"\n\"variable `apple` is moved:\"\nmsgstr \"\"\n\"`Option`에 값이 포함되도록 보장하기 위해, 다음 예제에서 보듯 `get_or_insert`\"\n\"를 사용하여 대체값으로 그 자리에서 수정할 수 있습니다. `get_or_insert`는 파라\"\n\"미터를 조급하게 평가하므로, `apple` 변수는 이동된다는 점에 유의하세요.\"\n\n#: src/error/option_unwrap/defaults.md:73\n#: src/error/option_unwrap/defaults.md:98\nmsgid \"\\\"first_available_fruit is: {:?}\\\"\"\nmsgstr \"\\\"first_available_fruit is: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:74\n#: src/error/option_unwrap/defaults.md:99\nmsgid \"\\\"my_fruit is: {:?}\\\"\"\nmsgstr \"\\\"my_fruit is: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:75\nmsgid \"\"\n\"// first_available_fruit is: Apple\\n\"\n\"    // my_fruit is: Some(Apple)\\n\"\n\"    //println!(\\\"Variable named `apple` is moved: {:?}\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\"// first_available_fruit is: Apple\\n\"\n\"    // my_fruit is: Some(Apple)\\n\"\n\"    //println!(\\\"apple이라는 이름의 변수는 이동되었습니다: {:?}\\\", apple);\\n\"\n\"    // TODO: 위 줄의 주석을 해제하여 컴파일러 에러를 확인해 보세요.\\n\"\n\n#: src/error/option_unwrap/defaults.md:82\nmsgid \"`get_or_insert_with()` evaluates lazily, modifies empty value in place\"\nmsgstr \"\"\n\"`get_or_insert_with()`는 느긋하게 평가하며, 빈 값을 그 자리에서 수정합니다.\"\n\n#: src/error/option_unwrap/defaults.md:84\nmsgid \"\"\n\"Instead of explicitly providing a value to fall back on, we can pass a \"\n\"closure to `get_or_insert_with`, as follows:\"\nmsgstr \"\"\n\"대체할 값을 명시적으로 제공하는 대신, 다음과 같이 `get_or_insert_with`에 클로\"\n\"저를 전달할 수 있습니다:\"\n\n#: src/error/option_unwrap/defaults.md:100\nmsgid \"\"\n\"// Providing lemon as fallback\\n\"\n\"    // first_available_fruit is: Lemon\\n\"\n\"    // my_fruit is: Some(Lemon)\\n\"\nmsgstr \"\"\n\"// 레몬을 대체값으로 제공함\\n\"\n\"    // first_available_fruit is: Lemon\\n\"\n\"    // my_fruit is: Some(Lemon)\\n\"\n\n#: src/error/option_unwrap/defaults.md:104\nmsgid \"\"\n\"// If the Option has a value, it is left unchanged, and the closure is not \"\n\"invoked\\n\"\nmsgstr \"\"\n\"// Option에 값이 있으면 변경되지 않은 채로 유지되며, 클로저는 호출되지 않습니\"\n\"다.\\n\"\n\n#: src/error/option_unwrap/defaults.md:107\nmsgid \"\\\"should_be_apple is: {:?}\\\"\"\nmsgstr \"\\\"should_be_apple is: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:108\nmsgid \"\\\"my_apple is unchanged: {:?}\\\"\"\nmsgstr \"\\\"my_apple is unchanged: {:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:109\nmsgid \"\"\n\"// The output is a follows. Note that the closure `get_lemon_as_fallback` is \"\n\"not invoked\\n\"\n\"    // should_be_apple is: Apple\\n\"\n\"    // my_apple is unchanged: Some(Apple)\\n\"\nmsgstr \"\"\n\"// 출력은 다음과 같습니다. `get_lemon_as_fallback` 클로저가 호출되지 않았음\"\n\"에 유의하세요.\\n\"\n\"    // should_be_apple is: Apple\\n\"\n\"    // my_apple is unchanged: Some(Apple)\\n\"\n\n#: src/error/option_unwrap/defaults.md:117\nmsgid \"\"\n\"[`closures`](https://doc.rust-lang.org/book/ch13-01-closures.html), \"\n\"[`get_or_insert`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.get_or_insert), [`get_or_insert_with`](https://\"\n\"doc.rust-lang.org/core/option/enum.Option.html#method.get_or_insert_with), \"\n\"[`moved variables`](https://doc.rust-lang.org/book/ch04-02-references-and-\"\n\"borrowing.html), [`or`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.or), [`or_else`](https://doc.rust-lang.org/core/\"\n\"option/enum.Option.html#method.or_else)\"\nmsgstr \"\"\n\"[`클로저(closures)`](https://doc.rust-lang.org/book/ch13-01-closures.html), \"\n\"[`get_or_insert`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.get_or_insert), [`get_or_insert_with`](https://\"\n\"doc.rust-lang.org/core/option/enum.Option.html#method.get_or_insert_with), [`\"\n\"이동된 변수(moved variables)`](https://doc.rust-lang.org/book/ch04-02-\"\n\"references-and-borrowing.html), [`or`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.or), [`or_else`](https://doc.rust-lang.org/core/\"\n\"option/enum.Option.html#method.or_else)\"\n\n#: src/error/result.md:3\nmsgid \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html) is a \"\n\"richer version of the [`Option`](https://doc.rust-lang.org/std/option/\"\n\"enum.Option.html) type that describes possible _error_ instead of possible \"\n\"_absence_.\"\nmsgstr \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html)은 발생 가능\"\n\"한 *에러*를 설명하는, [`Option`](https://doc.rust-lang.org/std/option/\"\n\"enum.Option.html) 타입의 더 풍부한 버전입니다.\"\n\n#: src/error/result.md:6\nmsgid \"That is, `Result<T, E>` could have one of two outcomes:\"\nmsgstr \"즉, `Result<T, E>`는 다음 두 가지 결과 중 하나를 가질 수 있습니다:\"\n\n#: src/error/result.md:8\nmsgid \"`Ok(T)`: An element `T` was found\"\nmsgstr \"`Ok(T)`: 요소 `T`가 발견됨\"\n\n#: src/error/result.md:9\nmsgid \"`Err(E)`: An error was found with element `E`\"\nmsgstr \"`Err(E)`: 요소 `E`와 함께 에러가 발견됨\"\n\n#: src/error/result.md:11\nmsgid \"\"\n\"By convention, the expected outcome is `Ok` while the unexpected outcome is \"\n\"`Err`.\"\nmsgstr \"관례적으로 기대되는 결과는 `Ok`이며, 기대하지 않은 결과는 `Err`입니다.\"\n\n#: src/error/result.md:13\nmsgid \"\"\n\"Like `Option`, `Result` has many methods associated with it. `unwrap()`, for \"\n\"example, either yields the element `T` or `panic`s. For case handling, there \"\n\"are many combinators between `Result` and `Option` that overlap.\"\nmsgstr \"\"\n\"`Option`과 마찬가지로, `Result`도 많은 메서드들을 가지고 있습니다. 예를 들어 \"\n\"`unwrap()`은 요소 `T`를 내놓거나 `panic`을 일으킵니다. 케이스 처리를 위해 \"\n\"`Result`와 `Option` 사이에는 겹치는 많은 콤비네이터들이 있습니다.\"\n\n#: src/error/result.md:17\nmsgid \"\"\n\"In working with Rust, you will likely encounter methods that return the \"\n\"`Result` type, such as the [`parse()`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) method. It might not always be possible to \"\n\"parse a string into the other type, so `parse()` returns a `Result` \"\n\"indicating possible failure.\"\nmsgstr \"\"\n\"Rust로 작업하다 보면 [`parse()`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) 메서드와 같이 `Result` 타입을 반환하는 메서\"\n\"드들을 자주 만나게 될 것입니다. 문자열을 다른 타입으로 파싱하는 것이 항상 가\"\n\"능한 것은 아니므로, `parse()`는 실패 가능성을 나타내는 `Result`를 반환합니다.\"\n\n#: src/error/result.md:22\nmsgid \"\"\n\"Let's see what happens when we successfully and unsuccessfully `parse()` a \"\n\"string:\"\nmsgstr \"\"\n\"문자열을 `parse()` 하는 데 성공했을 때와 실패했을 때 어떤 일이 일어나는지 봅\"\n\"시다:\"\n\n#: src/error/result.md:26\nmsgid \"// Let's try using `unwrap()` to get the number out. Will it bite us?\\n\"\nmsgstr \"// `unwrap()`을 사용하여 숫자를 꺼내봅시다. 문제가 생길까요?\\n\"\n\n#: src/error/result.md:33 src/error/result.md:36\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:75 src/error/result/result_map.md:79\n#: src/error/result/result_alias.md:36 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:36 src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:67\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/error/result.md:34 src/error/result.md:37\nmsgid \"\\\"double is {}\\\"\"\nmsgstr \"\\\"두 배는 {}\\\"\"\n\n#: src/error/result.md:36 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:79 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"t\\\"\"\nmsgstr \"\\\"t\\\"\"\n\n#: src/error/result.md:41\nmsgid \"\"\n\"In the unsuccessful case, `parse()` leaves us with an error for `unwrap()` \"\n\"to `panic` on. Additionally, the `panic` exits our program and provides an \"\n\"unpleasant error message.\"\nmsgstr \"\"\n\"실패한 경우, `parse()`는 `unwrap()`이 `panic`을 일으킬 수 있도록 에러를 남깁\"\n\"니다. 게다가 이 `panic`은 프로그램을 종료시키고 불쾌한 에러 메시지를 제공합니\"\n\"다.\"\n\n#: src/error/result.md:45\nmsgid \"\"\n\"To improve the quality of our error message, we should be more specific \"\n\"about the return type and consider explicitly handling the error.\"\nmsgstr \"\"\n\"에러 메시지의 품질을 높이려면, 반환 타입에 대해 더 구체적이어야 하며 에러를 \"\n\"명시적으로 처리하는 것을 고려해야 합니다.\"\n\n#: src/error/result.md:48\nmsgid \"Using `Result` in `main`\"\nmsgstr \"`main`에서 `Result` 사용하기\"\n\n#: src/error/result.md:50\nmsgid \"\"\n\"The `Result` type can also be the return type of the `main` function if \"\n\"specified explicitly. Typically the `main` function will be of the form:\"\nmsgstr \"\"\n\"`Result` 타입은 명시적으로 지정될 경우 `main` 함수의 반환 타입이 될 수도 있습\"\n\"니다. 일반적으로 `main` 함수는 다음과 같은 형태입니다:\"\n\n#: src/error/result.md:59\nmsgid \"\"\n\"However `main` is also able to have a return type of `Result`. If an error \"\n\"occurs within the `main` function it will return an error code and print a \"\n\"debug representation of the error (using the [`Debug`](https://doc.rust-\"\n\"lang.org/std/fmt/trait.Debug.html) trait). The following example shows such \"\n\"a scenario and touches on aspects covered in [the following section](result/\"\n\"early_returns.md).\"\nmsgstr \"\"\n\"하지만 `main`은 반환 타입으로 `Result`를 가질 수도 있습니다. 만약 `main` 함\"\n\"수 내에서 에러가 발생하면, 에러 코드를 반환하고 에러의 디버그 표현([`Debug`]\"\n\"(https://doc.rust-lang.org/std/fmt/trait.Debug.html) 트레이트 사용)을 출력합\"\n\"니다. 다음 예제는 그러한 시나리오를 보여주며 [다음 섹션](result/\"\n\"early_returns.md)에서 다루는 측면들을 언급합니다.\"\n\n#: src/error/result/result_map.md:3\nmsgid \"\"\n\"Panicking in the previous example's `multiply` does not make for robust \"\n\"code. Generally, we want to return the error to the caller so it can decide \"\n\"what is the right way to respond to errors.\"\nmsgstr \"\"\n\"이전 예제의 `multiply`에서 패닉을 일으키는 것은 견고한 코드가 아닙니다. 일반\"\n\"적으로 우리는 호출자가 에러에 대응하는 올바른 방법을 결정할 수 있도록 에러를 \"\n\"호출자에게 반환하기를 원합니다.\"\n\n#: src/error/result/result_map.md:7\nmsgid \"\"\n\"We first need to know what kind of error type we are dealing with. To \"\n\"determine the `Err` type, we look to [`parse()`](https://doc.rust-lang.org/\"\n\"std/primitive.str.html#method.parse), which is implemented with the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"[`i32`](https://doc.rust-lang.org/std/primitive.i32.html). As a result, the \"\n\"`Err` type is specified as [`ParseIntError`](https://doc.rust-lang.org/std/\"\n\"num/struct.ParseIntError.html).\"\nmsgstr \"\"\n\"먼저 우리가 어떤 종류의 에러 타입을 다루고 있는지 알아야 합니다. `Err` 타입\"\n\"을 결정하기 위해, [`i32`](https://doc.rust-lang.org/std/primitive.i32.html)\"\n\"에 대해 [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) 트\"\n\"레이트로 구현된 [`parse()`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse)를 살펴봅니다. 그 결과, `Err` 타입은 \"\n\"[`ParseIntError`](https://doc.rust-lang.org/std/num/\"\n\"struct.ParseIntError.html)로 지정됩니다.\"\n\n#: src/error/result/result_map.md:12\nmsgid \"\"\n\"In the example below, the straightforward `match` statement leads to code \"\n\"that is overall more cumbersome.\"\nmsgstr \"\"\n\"아래 예제에서, 단순한 `match` 문은 전체적으로 더 번거로운 코드로 이어집니다.\"\n\n#: src/error/result/result_map.md:17\nmsgid \"\"\n\"// With the return type rewritten, we use pattern matching without \"\n\"`unwrap()`.\\n\"\nmsgstr \"\"\n\"// 반환 타입을 다시 작성했으므로, `unwrap()` 없이 패턴 매칭을 사용합니다.\\n\"\n\n#: src/error/result/result_map.md:35 src/error/result/result_map.md:68\n#: src/error/result/result_alias.md:30 src/error/result/early_returns.md:30\n#: src/error/result/enter_question_mark.md:28\n#: src/error/result/enter_question_mark.md:61\nmsgid \"\\\"n is {}\\\"\"\nmsgstr \"\\\"n은 {}입니다\\\"\"\n\n#: src/error/result/result_map.md:36 src/error/result/result_map.md:69\n#: src/error/result/result_alias.md:31 src/error/result/early_returns.md:31\n#: src/error/result/enter_question_mark.md:29\n#: src/error/result/enter_question_mark.md:62\n#: src/error/multiple_error_types/define_error_type.md:55\n#: src/error/multiple_error_types/boxing_errors.md:42\n#: src/error/multiple_error_types/reenter_question_mark.md:54\n#: src/error/multiple_error_types/wrap_error.md:68\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"에러: {}\\\"\"\n\n#: src/error/result/result_map.md:41 src/error/result/result_map.md:74\nmsgid \"// This still presents a reasonable answer.\\n\"\nmsgstr \"// 이는 여전히 합리적인 답을 제시합니다.\\n\"\n\n#: src/error/result/result_map.md:45 src/error/result/result_map.md:78\nmsgid \"// The following now provides a much more helpful error message.\\n\"\nmsgstr \"// 다음은 이제 훨씬 더 도움이 되는 에러 메시지를 제공합니다.\\n\"\n\n#: src/error/result/result_map.md:51\nmsgid \"\"\n\"Luckily, `Option`'s `map`, `and_then`, and many other combinators are also \"\n\"implemented for `Result`. [`Result`](https://doc.rust-lang.org/std/result/\"\n\"enum.Result.html) contains a complete listing.\"\nmsgstr \"\"\n\"다행히도 `Option`의 `map`, `and_then` 및 다른 많은 콤비네이터들이 `Result`에 \"\n\"대해서도 구현되어 있습니다. [`Result`](https://doc.rust-lang.org/std/result/\"\n\"enum.Result.html) 문서에 전체 목록이 나와 있습니다.\"\n\n#: src/error/result/result_map.md:56\nmsgid \"\"\n\"// As with `Option`, we can use combinators such as `map()`.\\n\"\n\"// This function is otherwise identical to the one above and reads:\\n\"\n\"// Multiply if both values can be parsed from str, otherwise pass on the \"\n\"error.\\n\"\nmsgstr \"\"\n\"// `Option`과 마찬가지로 `map()`과 같은 콤비네이터를 사용할 수 있습니다.\\n\"\n\"// 이 함수는 위와 동일하며 다음과 같이 읽힙니다:\\n\"\n\"// 두 값 모두 문자열에서 파싱될 수 있으면 곱하고, 그렇지 않으면 에러를 넘깁니\"\n\"다.\\n\"\n\n#: src/error/result/result_alias.md:3\nmsgid \"\"\n\"How about when we want to reuse a specific `Result` type many times? Recall \"\n\"that Rust allows us to create [aliases](../../types/alias.md). Conveniently, \"\n\"we can define one for the specific `Result` in question.\"\nmsgstr \"\"\n\"특정한 `Result` 타입을 여러 번 재사용하고 싶을 때는 어떨까요? Rust는 [별칭\"\n\"(aliases)](../../types/alias.md)을 만들 수 있게 해준다는 점을 기억하세요. 편\"\n\"리하게도 문제의 특정 `Result`에 대해 별칭을 정의할 수 있습니다.\"\n\n#: src/error/result/result_alias.md:7\nmsgid \"\"\n\"At a module level, creating aliases can be particularly helpful. Errors \"\n\"found in a specific module often have the same `Err` type, so a single alias \"\n\"can succinctly define _all_ associated `Results`. This is so useful that the \"\n\"`std` library even supplies one: [`io::Result`](https://doc.rust-lang.org/\"\n\"std/io/type.Result.html)!\"\nmsgstr \"\"\n\"모듈 수준에서 별칭을 만드는 것은 특히 유용할 수 있습니다. 특정 모듈에서 발견\"\n\"되는 에러들은 종종 동일한 `Err` 타입을 가지므로, 단일 별칭으로 모든 연관된 \"\n\"`Result`들을 간결하게 정의할 수 있습니다. 이는 매우 유용하여 표준 라이브러리\"\n\"에서도 하나를 제공합니다: [`io::Result`](https://doc.rust-lang.org/std/io/\"\n\"type.Result.html)!\"\n\n#: src/error/result/result_alias.md:12\nmsgid \"Here's a quick example to show off the syntax:\"\nmsgstr \"다음은 문법을 보여주는 간단한 예제입니다:\"\n\n#: src/error/result/result_alias.md:16\nmsgid \"\"\n\"// Define a generic alias for a `Result` with the error type \"\n\"`ParseIntError`.\\n\"\nmsgstr \"\"\n\"// 에러 타입이 `ParseIntError`인 `Result`에 대한 제네릭 별칭을 정의합니다.\\n\"\n\n#: src/error/result/result_alias.md:19\nmsgid \"// Use the above alias to refer to our specific `Result` type.\\n\"\nmsgstr \"// 위 별칭을 사용하여 우리의 특정한 `Result` 타입을 참조합니다.\\n\"\n\n#: src/error/result/result_alias.md:26\nmsgid \"// Here, the alias again allows us to save some space.\\n\"\nmsgstr \"// 여기서도 별칭을 사용하여 공간을 절약할 수 있습니다.\\n\"\n\n#: src/error/result/result_alias.md:43\nmsgid \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\nmsgstr \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\n\n#: src/error/result/early_returns.md:3\nmsgid \"\"\n\"In the previous example, we explicitly handled the errors using combinators. \"\n\"Another way to deal with this case analysis is to use a combination of \"\n\"`match` statements and _early returns_.\"\nmsgstr \"\"\n\"이전 예제에서 우리는 콤비네이터를 사용하여 에러를 명시적으로 처리했습니다. 이\"\n\"러한 케이스 분석을 처리하는 또 다른 방법은 `match` 문과 *조기 리턴(early \"\n\"returns)*을 조합하여 사용하는 것입니다.\"\n\n#: src/error/result/early_returns.md:7\nmsgid \"\"\n\"That is, we can simply stop executing the function and return the error if \"\n\"one occurs. For some, this form of code can be easier to both read and \"\n\"write. Consider this version of the previous example, rewritten using early \"\n\"returns:\"\nmsgstr \"\"\n\"즉, 에러가 발생하면 단순히 함수의 실행을 멈추고 에러를 반환할 수 있습니다. 어\"\n\"떤 이들에게는 이런 형태의 코드가 읽고 쓰기에 더 쉬울 수 있습니다. 이전 예제\"\n\"를 조기 리턴을 사용하여 다시 작성한 버전을 살펴보세요:\"\n\n#: src/error/result/early_returns.md:41\nmsgid \"\"\n\"At this point, we've learned to explicitly handle errors using combinators \"\n\"and early returns. While we generally want to avoid panicking, explicitly \"\n\"handling all of our errors is cumbersome.\"\nmsgstr \"\"\n\"지금까지 우리는 콤비네이터와 조기 리턴을 사용하여 에러를 명시적으로 처리하는 \"\n\"방법을 배웠습니다. 일반적으로 패닉은 피하고 싶지만, 모든 에러를 명시적으로 처\"\n\"리하는 것은 번거로운 일입니다.\"\n\n#: src/error/result/early_returns.md:45\nmsgid \"\"\n\"In the next section, we'll introduce `?` for the cases where we simply need \"\n\"to `unwrap` without possibly inducing `panic`.\"\nmsgstr \"\"\n\"다음 섹션에서는 `panic`을 일으키지 않고 단순히 `unwrap`이 필요한 경우를 위한 \"\n\"`?`를 소개하겠습니다.\"\n\n#: src/error/result/enter_question_mark.md:3\nmsgid \"\"\n\"Sometimes we just want the simplicity of `unwrap` without the possibility of \"\n\"a `panic`. Until now, `unwrap` has forced us to nest deeper and deeper when \"\n\"what we really wanted was to get the variable _out_. This is exactly the \"\n\"purpose of `?`.\"\nmsgstr \"\"\n\"때로는 `panic`의 가능성 없이 `unwrap`의 단순함만을 원할 때가 있습니다. 지금까\"\n\"지 `unwrap`은 우리가 정말 원했던 것이 변수를 꺼내는 것임에도 불구하고 점점 \"\n\"더 깊게 중첩하도록 강제해 왔습니다. 이것이 바로 `?`의 목적입니다.\"\n\n#: src/error/result/enter_question_mark.md:7\nmsgid \"Upon finding an `Err`, there are two valid actions to take:\"\nmsgstr \"`Err`을 발견했을 때 취할 수 있는 유효한 조치는 두 가지입니다:\"\n\n#: src/error/result/enter_question_mark.md:9\nmsgid \"`panic!` which we already decided to try to avoid if possible\"\nmsgstr \"가능하다면 피하기로 이미 결정한 `panic!`\"\n\n#: src/error/result/enter_question_mark.md:10\nmsgid \"`return` because an `Err` means it cannot be handled\"\nmsgstr \"`Err`은 처리될 수 없음을 의미하므로 `return`\"\n\n#: src/error/result/enter_question_mark.md:12\nmsgid \"\"\n\"`?` is _almost_[^†] exactly equivalent to an `unwrap` which `return`s \"\n\"instead of `panic`king on `Err`s. Let's see how we can simplify the earlier \"\n\"example that used combinators:\"\nmsgstr \"\"\n\"`?`는 `Err`에 대해 `panic`을 일으키는 대신 `return`하는 `unwrap`과 거의[^†] \"\n\"정확히 동일합니다. 콤비네이터를 사용했던 이전 예제를 어떻게 단순화할 수 있는\"\n\"지 봅시다:\"\n\n#: src/error/result/enter_question_mark.md:39\nmsgid \"The `try!` macro\"\nmsgstr \"`try!` 매크로\"\n\n#: src/error/result/enter_question_mark.md:41\nmsgid \"\"\n\"Before there was `?`, the same functionality was achieved with the `try!` \"\n\"macro. The `?` operator is now recommended, but you may still find `try!` \"\n\"when looking at older code. The same `multiply` function from the previous \"\n\"example would look like this using `try!`:\"\nmsgstr \"\"\n\"`?`가 나오기 전에는 동일한 기능을 `try!` 매크로로 구현했습니다. 현재는 `?` 연\"\n\"산자가 권장되지만, 오래된 코드를 볼 때 여전히 `try!`를 발견할 수도 있습니다. \"\n\"이전 예제의 동일한 `multiply` 함수는 `try!`를 사용하면 다음과 같습니다:\"\n\n#: src/error/result/enter_question_mark.md:47\nmsgid \"\"\n\"// To compile and run this example without errors, while using Cargo, change \"\n\"the value\\n\"\n\"// of the `edition` field, in the `[package]` section of the `Cargo.toml` \"\n\"file, to \\\"2015\\\".\\n\"\nmsgstr \"\"\n\"// Cargo를 사용하면서 이 예제를 에러 없이 컴파일하고 실행하려면,\\n\"\n\"// `Cargo.toml` 파일의 `[package]` 섹션에 있는 `edition` 필드 값을 \"\n\"\\\"2015\\\"로 변경하세요.\\n\"\n\n#: src/error/result/enter_question_mark.md:72\nmsgid \"\"\n\"See [re-enter ?](../multiple_error_types/reenter_question_mark.md) for more \"\n\"details.\"\nmsgstr \"\"\n\"자세한 내용은 [? 다시 보기](../multiple_error_types/reenter_question_mark.md)\"\n\"를 참조하세요.\"\n\n#: src/error/multiple_error_types.md:3\nmsgid \"\"\n\"The previous examples have always been very convenient; `Result`s interact \"\n\"with other `Result`s and `Option`s interact with other `Option`s.\"\nmsgstr \"\"\n\"이전 예제들은 항상 매우 편리했습니다. `Result`는 다른 `Result`와 상호작용하\"\n\"고, `Option`은 다른 `Option`과 상호작용했습니다.\"\n\n#: src/error/multiple_error_types.md:6\nmsgid \"\"\n\"Sometimes an `Option` needs to interact with a `Result`, or a `Result<T, \"\n\"Error1>` needs to interact with a `Result<T, Error2>`. In those cases, we \"\n\"want to manage our different error types in a way that makes them composable \"\n\"and easy to interact with.\"\nmsgstr \"\"\n\"때때로는 `Option`이 `Result`와 상호작용해야 하거나, `Result<T, Error1>`이 \"\n\"`Result<T, Error2>`와 상호작용해야 할 때가 있습니다. 그런 경우, 우리는 서로 \"\n\"다른 에러 타입들을 구성 가능하고 상호작용하기 쉬운 방식으로 관리하고 싶어 합\"\n\"니다.\"\n\n#: src/error/multiple_error_types.md:11\nmsgid \"\"\n\"In the following code, two instances of `unwrap` generate different error \"\n\"types. `Vec::first` returns an `Option`, while `parse::<i32>` returns a \"\n\"`Result<i32, ParseIntError>`:\"\nmsgstr \"\"\n\"다음 코드에서, 두 개의 `unwrap` 인스턴스는 서로 다른 에러 타입을 생성합니다. \"\n\"`Vec::first`는 `Option`을 반환하는 반면, `parse::<i32>`는 `Result<i32, \"\n\"ParseIntError>`를 반환합니다:\"\n\n#: src/error/multiple_error_types.md:17\nmsgid \"// Generate error 1\\n\"\nmsgstr \"// 에러 1 발생\\n\"\n\n#: src/error/multiple_error_types.md:18\nmsgid \"// Generate error 2\\n\"\nmsgstr \"// 에러 2 발생\\n\"\n\n#: src/error/multiple_error_types.md:22\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/wrap_error.md:77 src/error/iter_result.md:40\nmsgid \"\\\"42\\\"\"\nmsgstr \"\\\"42\\\"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"93\\\"\"\nmsgstr \"\\\"93\\\"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"18\\\"\"\nmsgstr \"\\\"18\\\"\"\n\n#: src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"tofu\\\"\"\nmsgstr \"\\\"두부\\\"\"\n\n#: src/error/multiple_error_types.md:26 src/error/multiple_error_types.md:28\n#: src/error/multiple_error_types.md:31\n#: src/error/multiple_error_types/define_error_type.md:54\n#: src/error/multiple_error_types/boxing_errors.md:41\n#: src/error/multiple_error_types/reenter_question_mark.md:53\n#: src/error/multiple_error_types/wrap_error.md:66\nmsgid \"\\\"The first doubled is {}\\\"\"\nmsgstr \"\\\"두 배가 된 첫 번째 값은 {}입니다\\\"\"\n\n#: src/error/multiple_error_types.md:29\n#: src/error/multiple_error_types/option_result.md:23\nmsgid \"// Error 1: the input vector is empty\\n\"\nmsgstr \"// 에러 1: 입력 벡터가 비어 있습니다\\n\"\n\n#: src/error/multiple_error_types.md:32\n#: src/error/multiple_error_types/option_result.md:26\nmsgid \"// Error 2: the element doesn't parse to a number\\n\"\nmsgstr \"// 에러 2: 요소를 숫자로 파싱할 수 없습니다\\n\"\n\n#: src/error/multiple_error_types.md:36\nmsgid \"\"\n\"Over the next sections, we'll see several strategies for handling these kind \"\n\"of problems.\"\nmsgstr \"\"\n\"다음 섹션들에서 이러한 종류의 문제들을 처리하기 위한 몇 가지 전략을 살펴볼 것\"\n\"입니다.\"\n\n#: src/error/multiple_error_types/option_result.md:3\nmsgid \"\"\n\"The most basic way of handling mixed error types is to just embed them in \"\n\"each other.\"\nmsgstr \"\"\n\"혼합된 에러 타입들을 처리하는 가장 기본적인 방법은 단순히 서로를 내포시키는 \"\n\"것입니다.\"\n\n#: src/error/multiple_error_types/option_result.md:20\n#: src/error/multiple_error_types/option_result.md:22\n#: src/error/multiple_error_types/option_result.md:25\n#: src/error/multiple_error_types/option_result.md:49\n#: src/error/multiple_error_types/option_result.md:50\n#: src/error/multiple_error_types/option_result.md:51\nmsgid \"\\\"The first doubled is {:?}\\\"\"\nmsgstr \"\\\"두 배가 된 첫 번째 값은 {:?}입니다\\\"\"\n\n#: src/error/multiple_error_types/option_result.md:30\nmsgid \"\"\n\"There are times when we'll want to stop processing on errors (like with [`?`]\"\n\"(../result/enter_question_mark.md)) but keep going when the `Option` is \"\n\"`None`. The `transpose` function comes in handy to swap the `Result` and \"\n\"`Option`.\"\nmsgstr \"\"\n\"에러가 발생하면 처리를 중단하고 싶지만([?](../result/enter_question_mark.md)\"\n\"와 같이), `Option`이 `None`일 때는 계속 진행하고 싶을 때가 있습니다. 이럴 때 \"\n\"`Result`와 `Option`을 서로 바꾸어 주는 `transpose` 함수가 유용합니다.\"\n\n#: src/error/multiple_error_types/define_error_type.md:3\nmsgid \"\"\n\"Sometimes it simplifies the code to mask all of the different errors with a \"\n\"single type of error.  We'll show this with a custom error.\"\nmsgstr \"\"\n\"때로는 모든 서로 다른 에러들을 하나의 에러 타입으로 마스킹하는 것이 코드를 단\"\n\"순화합니다. 이를 커스텀 에러를 통해 보여주겠습니다.\"\n\n#: src/error/multiple_error_types/define_error_type.md:6\nmsgid \"\"\n\"Rust allows us to define our own error types. In general, a \\\"good\\\" error \"\n\"type:\"\nmsgstr \"\"\n\"Rust에서는 우리만의 에러 타입을 정의할 수 있습니다. 일반적으로 \\\"좋은\\\" 에러 \"\n\"타입은 다음과 같습니다:\"\n\n#: src/error/multiple_error_types/define_error_type.md:8\nmsgid \"Represents different errors with the same type\"\nmsgstr \"서로 다른 에러들을 동일한 타입으로 표현합니다\"\n\n#: src/error/multiple_error_types/define_error_type.md:9\nmsgid \"Presents nice error messages to the user\"\nmsgstr \"사용자에게 보기 좋은 에러 메시지를 제공합니다\"\n\n#: src/error/multiple_error_types/define_error_type.md:10\nmsgid \"Is easy to compare with other types\"\nmsgstr \"다른 타입들과 비교하기 쉽습니다\"\n\n#: src/error/multiple_error_types/define_error_type.md:11\nmsgid \"Good: `Err(EmptyVec)`\"\nmsgstr \"좋은 예: `Err(EmptyVec)`\"\n\n#: src/error/multiple_error_types/define_error_type.md:12\nmsgid \"\"\n\"Bad: `Err(\\\"Please use a vector with at least one element\\\".to_owned())`\"\nmsgstr \"\"\n\"나쁜 예: `Err(\\\"Please use a vector with at least one element\\\".to_owned())`\"\n\n#: src/error/multiple_error_types/define_error_type.md:13\nmsgid \"Can hold information about the error\"\nmsgstr \"에러에 대한 정보를 담을 수 있습니다\"\n\n#: src/error/multiple_error_types/define_error_type.md:14\nmsgid \"Good: `Err(BadChar(c, position))`\"\nmsgstr \"좋은 예: `Err(BadChar(c, position))`\"\n\n#: src/error/multiple_error_types/define_error_type.md:15\nmsgid \"Bad: `Err(\\\"+ cannot be used here\\\".to_owned())`\"\nmsgstr \"나쁜 예: `Err(\\\"+ cannot be used here\\\".to_owned())`\"\n\n#: src/error/multiple_error_types/define_error_type.md:16\nmsgid \"Composes well with other errors\"\nmsgstr \"다른 에러들과 잘 구성(compose)됩니다\"\n\n#: src/error/multiple_error_types/define_error_type.md:22\nmsgid \"\"\n\"// Define our error types. These may be customized for our error handling \"\n\"cases.\\n\"\n\"// Now we will be able to write our own errors, defer to an underlying \"\n\"error\\n\"\n\"// implementation, or do something in between.\\n\"\nmsgstr \"\"\n\"// 우리의 에러 타입들을 정의합니다. 이들은 우리의 에러 처리 케이스에 맞게 커\"\n\"스터마이징될 수 있습니다.\\n\"\n\"// 이제 우리만의 에러를 작성하거나, 기저 에러 구현에 위임하거나, 혹은 그 사이\"\n\"의 작업을 수행할 수 있습니다.\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:28\nmsgid \"\"\n\"// Generation of an error is completely separate from how it is displayed.\\n\"\n\"// There's no need to be concerned about cluttering complex logic with the \"\n\"display style.\\n\"\n\"//\\n\"\n\"// Note that we don't store any extra info about the errors. This means we \"\n\"can't state\\n\"\n\"// which string failed to parse without modifying our types to carry that \"\n\"information.\\n\"\nmsgstr \"\"\n\"// 에러의 생성은 표시 방식과 완전히 분리되어 있습니다.\\n\"\n\"// 표시 스타일 때문에 복잡한 로직이 어지러워질까 봐 걱정할 필요가 없습니다.\\n\"\n\"//\\n\"\n\"// 참고로 우리는 에러에 대한 추가 정보를 저장하지 않습니다. 즉, 정보를 담도\"\n\"록 타입을 수정하지 않고서는\\n\"\n\"// 어떤 문자열이 파싱에 실패했는지 알 수 없습니다.\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:36\n#: src/error/multiple_error_types/boxing_errors.md:23\n#: src/error/multiple_error_types/reenter_question_mark.md:37\nmsgid \"\\\"invalid first item to double\\\"\"\nmsgstr \"\\\"두 배로 만들 첫 번째 항목이 유효하지 않습니다\\\"\"\n\n#: src/error/multiple_error_types/define_error_type.md:42\nmsgid \"// Change the error to our new type.\\n\"\nmsgstr \"// 에러를 우리의 새로운 타입으로 변경합니다.\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:46\nmsgid \"// Update to the new error type here also.\\n\"\nmsgstr \"// 여기서도 새로운 에러 타입으로 업데이트합니다.\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:3\nmsgid \"\"\n\"A way to write simple code while preserving the original errors is to [`Box`]\"\n\"(https://doc.rust-lang.org/std/boxed/struct.Box.html) them.  The drawback is \"\n\"that the underlying error type is only known at runtime and not [statically \"\n\"determined](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#trait-\"\n\"objects-perform-dynamic-dispatch).\"\nmsgstr \"\"\n\"원본 에러를 보존하면서 단순한 코드를 작성하는 방법은 에러들을 [`Box`]\"\n\"(https://doc.rust-lang.org/std/boxed/struct.Box.html)하는 것입니다. 단점은 기\"\n\"저 에러 타입을 런타임에만 알 수 있고 [정적으로 결정](https://doc.rust-\"\n\"lang.org/book/ch17-02-trait-objects.html#trait-objects-perform-dynamic-\"\n\"dispatch)되지 않는다는 것입니다.\"\n\n#: src/error/multiple_error_types/boxing_errors.md:7\nmsgid \"\"\n\"The stdlib helps in boxing our errors by having `Box` implement conversion \"\n\"from any type that implements the `Error` trait into the trait object \"\n\"`Box<Error>`, via [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html).\"\nmsgstr \"\"\n\"표준 라이브러리는 `Box`가 [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html)을 통해 `Error` 트레이트를 구현하는 모든 타입으로부터 트레이\"\n\"트 객체 `Box<Error>`로의 변환을 구현하도록 함으로써 에러를 박싱하는 것을 돕습\"\n\"니다.\"\n\n#: src/error/multiple_error_types/boxing_errors.md:14\n#: src/error/multiple_error_types/reenter_question_mark.md:28\nmsgid \"// Change the alias to use `Box<dyn error::Error>`.\\n\"\nmsgstr \"// 별칭이 `Box<dyn error::Error>`를 사용하도록 변경합니다.\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:31\nmsgid \"// Converts to Box using Into trait.\\n\"\nmsgstr \"// Into 트레이트를 사용하여 Box로 변환합니다.\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:34\nmsgid \"// Converts to Box using From::from fn pointer.\\n\"\nmsgstr \"// From::from 함수 포인터를 사용하여 Box로 변환합니다.\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:59\nmsgid \"\"\n\"[Dynamic dispatch](https://doc.rust-lang.org/book/ch17-02-trait-\"\n\"objects.html#trait-objects-perform-dynamic-dispatch) and [`Error` trait]\"\n\"(https://doc.rust-lang.org/std/error/trait.Error.html)\"\nmsgstr \"\"\n\"[동적 디스패치(Dynamic dispatch)](https://doc.rust-lang.org/book/ch17-02-\"\n\"trait-objects.html#trait-objects-perform-dynamic-dispatch)와 [`Error` 트레이\"\n\"트](https://doc.rust-lang.org/std/error/trait.Error.html)\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:3\nmsgid \"\"\n\"Notice in the previous example that our immediate reaction to calling \"\n\"`parse` is to `map` the error from a library error into a boxed error:\"\nmsgstr \"\"\n\"이전 예제에서 `parse`를 호출했을 때 우리의 즉각적인 반응은 라이브러리 에러를 \"\n\"박싱된 에러로 `map`하는 것이었습니다:\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:12\nmsgid \"\"\n\"Since this is a simple and common operation, it would be convenient if it \"\n\"could be elided. Alas, because `and_then` is not sufficiently flexible, it \"\n\"cannot. However, we can instead use `?`.\"\nmsgstr \"\"\n\"이는 단순하고 흔한 작업이므로 생략할 수 있다면 편리할 것입니다. 아쉽게도 \"\n\"`and_then`은 충분히 유연하지 못해 생략할 수 없습니다. 하지만 대신 `?`를 사용\"\n\"할 수 있습니다.\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:16\nmsgid \"\"\n\"`?` was previously explained as either `unwrap` or `return Err(err)`. This \"\n\"is only mostly true. It actually means `unwrap` or `return \"\n\"Err(From::from(err))`. Since `From::from` is a conversion utility between \"\n\"different types, this means that if you `?` where the error is convertible \"\n\"to the return type, it will convert automatically.\"\nmsgstr \"\"\n\"`?`는 이전에 `unwrap` 또는 `return Err(err)`로 설명되었습니다. 이는 거의 맞지\"\n\"만 전부는 아닙니다. 실제로는 `unwrap` 또는 `return Err(From::from(err))`를 의\"\n\"미합니다. `From::from`은 서로 다른 타입 간의 변환 유틸리티이므로, 에러가 반\"\n\"환 타입으로 변환 가능한 곳에서 `?`를 사용하면 자동으로 변환됩니다.\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:22\nmsgid \"\"\n\"Here, we rewrite the previous example using `?`. As a result, the `map_err` \"\n\"will go away when `From::from` is implemented for our error type:\"\nmsgstr \"\"\n\"여기서는 이전 예제를 `?`를 사용하여 다시 작성합니다. 결과적으로, 우리의 에러 \"\n\"타입에 대해 `From::from`이 구현되면 `map_err`이 사라질 것입니다:\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:42\nmsgid \"\"\n\"// The same structure as before but rather than chain all `Results`\\n\"\n\"// and `Options` along, we `?` to get the inner value out immediately.\\n\"\nmsgstr \"\"\n\"// 이전과 동일한 구조이지만 모든 `Result`와 `Option`을 체인으로 연결하는 대\"\n\"신,\\n\"\n\"// `?`를 사용하여 즉시 내부 값을 꺼냅니다.\\n\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:69\nmsgid \"\"\n\"This is actually fairly clean now. Compared with the original `panic`, it is \"\n\"very similar to replacing the `unwrap` calls with `?` except that the return \"\n\"types are `Result`. As a result, they must be destructured at the top level.\"\nmsgstr \"\"\n\"이제 상당히 깔끔해졌습니다. 원본 `panic` 예제와 비교하면, 반환 타입이 \"\n\"`Result`라는 점을 제외하고는 `unwrap` 호출을 `?`로 대체한 것과 매우 유사합니\"\n\"다. 그 결과, 이들은 최상위 레벨에서 구조 분해(destructure)되어야 합니다.\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:76\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`?\"\n\"`](https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\nmsgstr \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html)과 [`?`]\"\n\"(https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\n\n#: src/error/multiple_error_types/wrap_error.md:3\nmsgid \"An alternative to boxing errors is to wrap them in your own error type.\"\nmsgstr \"\"\n\"에러를 박싱하는 것의 대안은 에러를 여러분만의 에러 타입으로 감싸는 것입니다.\"\n\n#: src/error/multiple_error_types/wrap_error.md:16\nmsgid \"\"\n\"// We will defer to the parse error implementation for their error.\\n\"\n\"    // Supplying extra info requires adding more data to the type.\\n\"\nmsgstr \"\"\n\"// 파싱 에러에 대해서는 해당 에러 구현에 위임할 것입니다.\\n\"\n\"// 추가 정보를 제공하려면 타입에 더 많은 데이터를 추가해야 합니다.\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:25\nmsgid \"\\\"please use a vector with at least one element\\\"\"\nmsgstr \"\\\"최소한 하나의 요소를 가진 벡터를 사용하세요\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:26\nmsgid \"\"\n\"// The wrapped error contains additional information and is available\\n\"\n\"            // via the source() method.\\n\"\nmsgstr \"\"\n\"// 감싸진 에러는 추가 정보를 포함하며 `source()` 메서드를 통해\\n\"\n\"// 사용할 수 있습니다.\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:29\nmsgid \"\\\"the provided string could not be parsed as int\\\"\"\nmsgstr \"\\\"제공된 문자열을 정수로 파싱할 수 없습니다\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:38\nmsgid \"\"\n\"// The cause is the underlying implementation error type. Is implicitly\\n\"\n\"            // cast to the trait object `&error::Error`. This works because \"\n\"the\\n\"\n\"            // underlying type already implements the `Error` trait.\\n\"\nmsgstr \"\"\n\"// 원인은 기저 구현 에러 타입입니다. 이는 트레이트 객체 `&error::Error`로\\n\"\n\"// 암시적으로 캐스팅됩니다. 기저 타입이 이미 `Error` 트레이트를\\n\"\n\"// 구현하고 있기 때문에 작동합니다.\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:45\nmsgid \"\"\n\"// Implement the conversion from `ParseIntError` to `DoubleError`.\\n\"\n\"// This will be automatically called by `?` if a `ParseIntError`\\n\"\n\"// needs to be converted into a `DoubleError`.\\n\"\nmsgstr \"\"\n\"// `ParseIntError`에서 `DoubleError`로의 변환을 구현합니다.\\n\"\n\"// `ParseIntError`를 `DoubleError`로 변환해야 할 때 `?`에 의해\\n\"\n\"// 자동으로 호출됩니다.\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:57\nmsgid \"\"\n\"// Here we implicitly use the `ParseIntError` implementation of `From` \"\n\"(which\\n\"\n\"    // we defined above) in order to create a `DoubleError`.\\n\"\nmsgstr \"\"\n\"// 여기서 우리는 `DoubleError`를 생성하기 위해 (위에서 정의한)\\n\"\n\"// `From`의 `ParseIntError` 구현을 암시적으로 사용합니다.\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:70\nmsgid \"\\\"  Caused by: {}\\\"\"\nmsgstr \"\\\"  원인: {}\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:87\nmsgid \"\"\n\"This adds a bit more boilerplate for handling errors and might not be needed \"\n\"in all applications. There are some libraries that can take care of the \"\n\"boilerplate for you.\"\nmsgstr \"\"\n\"이는 에러 처리를 위해 상용구(boilerplate) 코드를 조금 더 추가하며, 모든 애플\"\n\"리케이션에서 필요하지는 않을 수 있습니다. 상용구 코드를 대신 처리해 주는 몇\"\n\"몇 라이브러리들이 있습니다.\"\n\n#: src/error/multiple_error_types/wrap_error.md:93\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Enums`](../../custom_types/enum.md)\"\nmsgstr \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html)과 [열거\"\n\"형(Enums)](../../custom_types/enum.md)\"\n\n#: src/error/multiple_error_types/wrap_error.md:95\nmsgid \"\"\n\"[`Crates for handling errors`](https://crates.io/keywords/error-handling)\"\nmsgstr \"\"\n\"[에러 처리를 위한 크레이트들](https://crates.io/keywords/error-handling)\"\n\n#: src/error/iter_result.md:3\nmsgid \"An `Iter::map` operation might fail, for example:\"\nmsgstr \"예를 들어, `Iter::map` 연산은 실패할 수 있습니다:\"\n\n#: src/error/iter_result.md:12 src/error/iter_result.md:29\n#: src/error/iter_result.md:65\nmsgid \"\\\"Results: {:?}\\\"\"\nmsgstr \"\\\"결과: {:?}\\\"\"\n\n#: src/error/iter_result.md:16\nmsgid \"Let's step through strategies for handling this.\"\nmsgstr \"이를 처리하기 위한 전략들을 단계별로 살펴봅시다.\"\n\n#: src/error/iter_result.md:18\nmsgid \"Ignore the failed items with `filter_map()`\"\nmsgstr \"`filter_map()`으로 실패한 항목 무시하기\"\n\n#: src/error/iter_result.md:20\nmsgid \"\"\n\"`filter_map` calls a function and filters out the results that are `None`.\"\nmsgstr \"`filter_map`은 함수를 호출하고 그 결과가 `None`인 것들을 걸러냅니다.\"\n\n#: src/error/iter_result.md:33\nmsgid \"Collect the failed items with `map_err()` and `filter_map()`\"\nmsgstr \"`map_err()`와 `filter_map()`으로 실패한 항목 수집하기\"\n\n#: src/error/iter_result.md:35\nmsgid \"\"\n\"`map_err` calls a function with the error, so by adding that to the previous \"\n\"`filter_map` solution we can save them off to the side while iterating.\"\nmsgstr \"\"\n\"`map_err`은 에러와 함께 함수를 호출하므로, 이를 이전의 `filter_map` 방식에 추\"\n\"가하여 순회하는 동안 에러들을 따로 저장해둘 수 있습니다.\"\n\n#: src/error/iter_result.md:40\nmsgid \"\\\"999\\\"\"\nmsgstr \"\\\"999\\\"\"\n\n#: src/error/iter_result.md:47 src/error/iter_result.md:80\n#: src/error/iter_result.md:97\nmsgid \"\\\"Numbers: {:?}\\\"\"\nmsgstr \"\\\"숫자: {:?}\\\"\"\n\n#: src/error/iter_result.md:48 src/error/iter_result.md:81\n#: src/error/iter_result.md:98\nmsgid \"\\\"Errors: {:?}\\\"\"\nmsgstr \"\\\"에러: {:?}\\\"\"\n\n#: src/error/iter_result.md:52\nmsgid \"Fail the entire operation with `collect()`\"\nmsgstr \"`collect()`를 사용하여 전체 연산을 실패로 처리하기\"\n\n#: src/error/iter_result.md:54\nmsgid \"\"\n\"`Result` implements `FromIterator` so that a vector of results \"\n\"(`Vec<Result<T, E>>`) can be turned into a result with a vector \"\n\"(`Result<Vec<T>, E>`). Once an `Result::Err` is found, the iteration will \"\n\"terminate.\"\nmsgstr \"\"\n\"`Result`는 `FromIterator`를 구현하므로 결과들의 벡터(`Vec<Result<T, E>>`)를 \"\n\"벡터를 가진 결과(`Result<Vec<T>, E>`)로 바꿀 수 있습니다. `Result::Err`이 발\"\n\"견되면 즉시 순회가 종료됩니다.\"\n\n#: src/error/iter_result.md:69\nmsgid \"This same technique can be used with `Option`.\"\nmsgstr \"동일한 기술을 `Option`에 대해서도 사용할 수 있습니다.\"\n\n#: src/error/iter_result.md:71\nmsgid \"Collect all valid values and failures with `partition()`\"\nmsgstr \"`partition()`을 사용하여 모든 유효한 값과 실패를 수집하기\"\n\n#: src/error/iter_result.md:85\nmsgid \"\"\n\"When you look at the results, you'll note that everything is still wrapped \"\n\"in `Result`.  A little more boilerplate is needed for this.\"\nmsgstr \"\"\n\"결과를 보면 모든 것이 여전히 `Result`로 감싸져 있음을 알 수 있습니다. 이를 위\"\n\"해서는 상용구 코드가 조금 더 필요합니다.\"\n\n#: src/std.md:3\nmsgid \"\"\n\"The `std` library provides many custom types which expands drastically on \"\n\"the `primitives`. Some of these include:\"\nmsgstr \"\"\n\"표준 라이브러리는 `기본 자료형`을 대폭 확장한 많은 사용자 정의 타입을 제공합\"\n\"니다. 이들 중 일부는 다음과 같습니다:\"\n\n#: src/std.md:6\nmsgid \"growable `String`s like: `\\\"hello world\\\"`\"\nmsgstr \"가변 크기 `String`: 예: `\\\"hello world\\\"`\"\n\n#: src/std.md:7\nmsgid \"growable vectors: `[1, 2, 3]`\"\nmsgstr \"가변 크기 벡터: `[1, 2, 3]`\"\n\n#: src/std.md:8\nmsgid \"optional types: `Option<i32>`\"\nmsgstr \"선택적 타입: `Option<i32>`\"\n\n#: src/std.md:9\nmsgid \"error handling types: `Result<i32, i32>`\"\nmsgstr \"에러 핸들링 타입: `Result<i32, i32>`\"\n\n#: src/std.md:10\nmsgid \"heap allocated pointers: `Box<i32>`\"\nmsgstr \"힙 할당 포인터: `Box<i32>`\"\n\n#: src/std.md:14 src/std_misc.md:14\nmsgid \"\"\n\"[primitives](primitives.md) and [the std library](https://doc.rust-lang.org/\"\n\"std/)\"\nmsgstr \"\"\n\"[기본 자료형](primitives.md)과 [표준 라이브러리](https://doc.rust-lang.org/\"\n\"std/)\"\n\n#: src/std/box.md:3\nmsgid \"\"\n\"All values in Rust are stack allocated by default. Values can be _boxed_ \"\n\"(allocated on the heap) by creating a `Box<T>`. A box is a smart pointer to \"\n\"a heap allocated value of type `T`. When a box goes out of scope, its \"\n\"destructor is called, the inner object is destroyed, and the memory on the \"\n\"heap is freed.\"\nmsgstr \"\"\n\"Rust의 모든 값은 기본적으로 스택에 할당됩니다. `Box<T>`를 생성함으로써 값을 *\"\n\"박싱*(힙에 할당)할 수 있습니다. 박스는 힙에 할당된 `T` 타입 값을 가리키는 스\"\n\"마트 포인터입니다. 박스가 스코프를 벗어나면 데스트럭터가 호출되어 내부 객체\"\n\"가 파괴되고 힙 메모리가 해제됩니다.\"\n\n#: src/std/box.md:8\nmsgid \"\"\n\"Boxed values can be dereferenced using the `*` operator; this removes one \"\n\"layer of indirection.\"\nmsgstr \"\"\n\"박싱된 값은 `*` 연산자를 사용하여 역참조할 수 있습니다. 이는 한 단계의 간접 \"\n\"참조를 제거합니다.\"\n\n#: src/std/box.md:20\nmsgid \"\"\n\"// A Rectangle can be specified by where its top left and bottom right\\n\"\n\"// corners are in space\\n\"\nmsgstr \"\"\n\"// 사각형은 공간상에서의 왼쪽 상단과 오른쪽 하단\\n\"\n\"// 꼭짓점 위치로 지정될 수 있습니다\\n\"\n\n#: src/std/box.md:34\nmsgid \"// Allocate this point on the heap, and return a pointer to it\\n\"\nmsgstr \"// 이 점을 힙에 할당하고, 그에 대한 포인터를 반환합니다\\n\"\n\n#: src/std/box.md:39\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // Stack allocated variables\\n\"\nmsgstr \"\"\n\"// (모든 타입 어노테이션은 불필요합니다)\\n\"\n\"    // 스택에 할당된 변수들\\n\"\n\n#: src/std/box.md:47\nmsgid \"// Heap allocated rectangle\\n\"\nmsgstr \"// 힙에 할당된 사각형\\n\"\n\n#: src/std/box.md:53\nmsgid \"// The output of functions can be boxed\\n\"\nmsgstr \"// 함수의 출력은 박싱될 수 있습니다\\n\"\n\n#: src/std/box.md:56\nmsgid \"// Double indirection\\n\"\nmsgstr \"// 이중 간접 참조\\n\"\n\n#: src/std/box.md:59\nmsgid \"\\\"Point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Point는 스택에서 {} 바이트를 차지합니다\\\"\"\n\n#: src/std/box.md:61\nmsgid \"\\\"Rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Rectangle은 스택에서 {} 바이트를 차지합니다\\\"\"\n\n#: src/std/box.md:64\nmsgid \"// box size == pointer size\\n\"\nmsgstr \"// 박스 크기 == 포인터 크기\\n\"\n\n#: src/std/box.md:65\nmsgid \"\\\"Boxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"박싱된 point는 스택에서 {} 바이트를 차지합니다\\\"\"\n\n#: src/std/box.md:67\nmsgid \"\\\"Boxed rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"박싱된 rectangle은 스택에서 {} 바이트를 차지합니다\\\"\"\n\n#: src/std/box.md:69\nmsgid \"\\\"Boxed box occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"박싱된 박스는 스택에서 {} 바이트를 차지합니다\\\"\"\n\n#: src/std/box.md:72\nmsgid \"// Copy the data contained in `boxed_point` into `unboxed_point`\\n\"\nmsgstr \"// `boxed_point`에 담긴 데이터를 `unboxed_point`로 복사합니다\\n\"\n\n#: src/std/box.md:74\nmsgid \"\\\"Unboxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"박싱 해제된 point는 스택에서 {} 바이트를 차지합니다\\\"\"\n\n#: src/std/vec.md:3\nmsgid \"\"\n\"Vectors are re-sizable arrays. Like slices, their size is not known at \"\n\"compile time, but they can grow or shrink at any time. A vector is \"\n\"represented using 3 parameters:\"\nmsgstr \"\"\n\"벡터는 크기 조절이 가능한 배열입니다. 슬라이스와 마찬가지로 크기를 컴파일 타\"\n\"임에 알 수 없지만, 언제든지 늘리거나 줄일 수 있습니다. 벡터는 3개의 파라미터\"\n\"로 표현됩니다:\"\n\n#: src/std/vec.md:7\nmsgid \"pointer to the data\"\nmsgstr \"데이터에 대한 포인터\"\n\n#: src/std/vec.md:8\nmsgid \"length\"\nmsgstr \"길이\"\n\n#: src/std/vec.md:9\nmsgid \"capacity\"\nmsgstr \"용량\"\n\n#: src/std/vec.md:11\nmsgid \"\"\n\"The capacity indicates how much memory is reserved for the vector. The \"\n\"vector can grow as long as the length is smaller than the capacity. When \"\n\"this threshold needs to be surpassed, the vector is reallocated with a \"\n\"larger capacity.\"\nmsgstr \"\"\n\"용량은 벡터를 위해 예약된 메모리 양을 나타냅니다. 벡터는 길이가 용량보다 작\"\n\"은 동안에는 계속 늘어날 수 있습니다. 이 임계값을 넘어야 할 때, 벡터는 더 큰 \"\n\"용량으로 재할당됩니다.\"\n\n#: src/std/vec.md:17\nmsgid \"// Iterators can be collected into vectors\\n\"\nmsgstr \"// 이터레이터는 벡터로 수집(collect)될 수 있습니다\\n\"\n\n#: src/std/vec.md:19\nmsgid \"\\\"Collected (0..10) into: {:?}\\\"\"\nmsgstr \"\\\"(0..10)을 다음으로 수집함: {:?}\\\"\"\n\n#: src/std/vec.md:21\nmsgid \"// The `vec!` macro can be used to initialize a vector\\n\"\nmsgstr \"// `vec!` 매크로는 벡터를 초기화하는 데 사용될 수 있습니다\\n\"\n\n#: src/std/vec.md:23\nmsgid \"\\\"Initial vector: {:?}\\\"\"\nmsgstr \"\\\"초기 벡터: {:?}\\\"\"\n\n#: src/std/vec.md:25\nmsgid \"// Insert new element at the end of the vector\\n\"\nmsgstr \"// 벡터 끝에 새로운 요소를 삽입합니다\\n\"\n\n#: src/std/vec.md:26\nmsgid \"\\\"Push 4 into the vector\\\"\"\nmsgstr \"\\\"벡터에 4를 푸시합니다\\\"\"\n\n#: src/std/vec.md:28\nmsgid \"\\\"Vector: {:?}\\\"\"\nmsgstr \"\\\"벡터: {:?}\\\"\"\n\n#: src/std/vec.md:30\nmsgid \"// Error! Immutable vectors can't grow\\n\"\nmsgstr \"// 에러! 불변 벡터는 늘어날 수 없습니다\\n\"\n\n#: src/std/vec.md:34\nmsgid \"\"\n\"// The `len` method yields the number of elements currently stored in a \"\n\"vector\\n\"\nmsgstr \"// `len` 메서드는 현재 벡터에 저장된 요소의 개수를 반환합니다\\n\"\n\n#: src/std/vec.md:35\nmsgid \"\\\"Vector length: {}\\\"\"\nmsgstr \"\\\"벡터 길이: {}\\\"\"\n\n#: src/std/vec.md:37\nmsgid \"// Indexing is done using the square brackets (indexing starts at 0)\\n\"\nmsgstr \"// 인덱싱은 대괄호를 사용하여 수행됩니다 (인덱싱은 0부터 시작합니다)\\n\"\n\n#: src/std/vec.md:38\nmsgid \"\\\"Second element: {}\\\"\"\nmsgstr \"\\\"두 번째 요소: {}\\\"\"\n\n#: src/std/vec.md:40\nmsgid \"// `pop` removes the last element from the vector and returns it\\n\"\nmsgstr \"// `pop`은 벡터에서 마지막 요소를 제거하고 이를 반환합니다\\n\"\n\n#: src/std/vec.md:41\nmsgid \"\\\"Pop last element: {:?}\\\"\"\nmsgstr \"\\\"마지막 요소 팝: {:?}\\\"\"\n\n#: src/std/vec.md:43\nmsgid \"// Out of bounds indexing yields a panic\\n\"\nmsgstr \"// 범위를 벗어난 인덱싱은 패닉을 일으킵니다\\n\"\n\n#: src/std/vec.md:44\nmsgid \"\\\"Fourth element: {}\\\"\"\nmsgstr \"\\\"네 번째 요소: {}\\\"\"\n\n#: src/std/vec.md:47\nmsgid \"// `Vector`s can be easily iterated over\\n\"\nmsgstr \"// 벡터는 쉽게 순회(iterate)될 수 있습니다\\n\"\n\n#: src/std/vec.md:48\nmsgid \"\\\"Contents of xs:\\\"\"\nmsgstr \"\\\"xs의 내용:\\\"\"\n\n#: src/std/vec.md:53\nmsgid \"\"\n\"// A `Vector` can also be iterated over while the iteration\\n\"\n\"    // count is enumerated in a separate variable (`i`)\\n\"\nmsgstr \"\"\n\"// 벡터는 반복 횟수가 별도의 변수(`i`)에 열거되면서 순회될 수도 있습니다\\n\"\n\n#: src/std/vec.md:56\nmsgid \"\\\"In position {} we have value {}\\\"\"\nmsgstr \"\\\"{} 위치에 {} 값이 있습니다\\\"\"\n\n#: src/std/vec.md:59\nmsgid \"\"\n\"// Thanks to `iter_mut`, mutable `Vector`s can also be iterated\\n\"\n\"    // over in a way that allows modifying each value\\n\"\nmsgstr \"\"\n\"// `iter_mut` 덕분에 가변 벡터도 각 값을 수정할 수 있는 방식으로\\n\"\n\"    // 순회될 수 있습니다\\n\"\n\n#: src/std/vec.md:64\nmsgid \"\\\"Updated vector: {:?}\\\"\"\nmsgstr \"\\\"업데이트된 벡터: {:?}\\\"\"\n\n#: src/std/vec.md:68\nmsgid \"\"\n\"More `Vec` methods can be found under the [std::vec](https://doc.rust-\"\n\"lang.org/std/vec/) module\"\nmsgstr \"\"\n\"더 많은 `Vec` 메서드는 [std::vec](https://doc.rust-lang.org/std/vec/) 모듈에\"\n\"서 찾을 수 있습니다\"\n\n#: src/std/str.md:3\nmsgid \"The two most used string types in Rust are `String` and `&str`.\"\nmsgstr \"\"\n\"Rust에서 가장 많이 사용되는 두 가지 문자열 타입은 `String`과 `&str`입니다.\"\n\n#: src/std/str.md:5\nmsgid \"\"\n\"A `String` is stored as a vector of bytes (`Vec<u8>`), but guaranteed to \"\n\"always be a valid UTF-8 sequence. `String` is heap allocated, growable and \"\n\"not null terminated.\"\nmsgstr \"\"\n\"`String`은 바이트 벡터(`Vec<u8>`)로 저장되지만, 항상 유효한 UTF-8 시퀀스임이 \"\n\"보장됩니다. `String`은 힙에 할당되며, 크기 조절이 가능하고 널 종료(null \"\n\"terminated)되지 않습니다.\"\n\n#: src/std/str.md:9\nmsgid \"\"\n\"`&str` is a slice (`&[u8]`) that always points to a valid UTF-8 sequence, \"\n\"and can be used to view into a `String`, just like `&[T]` is a view into \"\n\"`Vec<T>`.\"\nmsgstr \"\"\n\"`&str`은 항상 유효한 UTF-8 시퀀스를 가리키는 슬라이스(`&[u8]`)이며, `&[T]`가 \"\n\"`Vec<T>`를 들여다보는 창(view)인 것과 마찬가지로 `String`을 들여다보는 데 사\"\n\"용될 수 있습니다.\"\n\n#: src/std/str.md:14\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // A reference to a string allocated in read only memory\\n\"\nmsgstr \"\"\n\"// (모든 타입 어노테이션은 불필요합니다)\\n\"\n\"    // 읽기 전용 메모리에 할당된 문자열에 대한 참조\\n\"\n\n#: src/std/str.md:16\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\"\"\nmsgstr \"\\\"the quick brown fox jumps over the lazy dog\\\"\"\n\n#: src/std/str.md:17\nmsgid \"\\\"Pangram: {}\\\"\"\nmsgstr \"\\\"팬그램(Pangram): {}\\\"\"\n\n#: src/std/str.md:19\nmsgid \"// Iterate over words in reverse, no new string is allocated\\n\"\nmsgstr \"// 단어들을 역순으로 순회합니다. 새로운 문자열은 할당되지 않습니다\\n\"\n\n#: src/std/str.md:20\nmsgid \"\\\"Words in reverse\\\"\"\nmsgstr \"\\\"역순 단어들\\\"\"\n\n#: src/std/str.md:25\nmsgid \"// Copy chars into a vector, sort and remove duplicates\\n\"\nmsgstr \"// 문자들을 벡터로 복사하고, 정렬한 뒤 중복을 제거합니다\\n\"\n\n#: src/std/str.md:30\nmsgid \"// Create an empty and growable `String`\\n\"\nmsgstr \"// 비어 있고 크기 조절 가능한 `String`을 생성합니다\\n\"\n\n#: src/std/str.md:33\nmsgid \"// Insert a char at the end of string\\n\"\nmsgstr \"// 문자열 끝에 문자를 삽입합니다\\n\"\n\n#: src/std/str.md:35\nmsgid \"// Insert a string at the end of string\\n\"\nmsgstr \"// 문자열 끝에 문자열을 삽입합니다\\n\"\n\n#: src/std/str.md:39\nmsgid \"\"\n\"// The trimmed string is a slice to the original string, hence no new\\n\"\n\"    // allocation is performed\\n\"\nmsgstr \"\"\n\"// 트림된 문자열은 원본 문자열에 대한 슬라이스이므로,\\n\"\n\"// 새로운 할당이 수행되지 않습니다\\n\"\n\n#: src/std/str.md:43\nmsgid \"\\\"Used characters: {}\\\"\"\nmsgstr \"\\\"사용된 문자들: {}\\\"\"\n\n#: src/std/str.md:45\nmsgid \"// Heap allocate a string\\n\"\nmsgstr \"// 문자열을 힙에 할당합니다\\n\"\n\n#: src/std/str.md:46\nmsgid \"\\\"I like dogs\\\"\"\nmsgstr \"\\\"I like dogs\\\"\"\n\n#: src/std/str.md:47\nmsgid \"// Allocate new memory and store the modified string there\\n\"\nmsgstr \"// 새로운 메모리를 할당하고 수정된 문자열을 그곳에 저장합니다\\n\"\n\n#: src/std/str.md:48\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"dog\\\"\"\n\n#: src/std/str.md:48\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/std/str.md:50\nmsgid \"\\\"Alice says: {}\\\"\"\nmsgstr \"\\\"앨리스가 말합니다: {}\\\"\"\n\n#: src/std/str.md:51\nmsgid \"\\\"Bob says: {}\\\"\"\nmsgstr \"\\\"밥이 말합니다: {}\\\"\"\n\n#: src/std/str.md:55\nmsgid \"\"\n\"More `str`/`String` methods can be found under the [std::str](https://\"\n\"doc.rust-lang.org/std/str/) and [std::string](https://doc.rust-lang.org/std/\"\n\"string/) modules\"\nmsgstr \"\"\n\"더 많은 `str`/`String` 메서드는 [std::str](https://doc.rust-lang.org/std/\"\n\"str/) 및 [std::string](https://doc.rust-lang.org/std/string/) 모듈에서 찾을 \"\n\"수 있습니다\"\n\n#: src/std/str.md:60\nmsgid \"Literals and escapes\"\nmsgstr \"리터럴과 이스케이프\"\n\n#: src/std/str.md:62\nmsgid \"\"\n\"There are multiple ways to write string literals with special characters in \"\n\"them. All result in a similar `&str` so it's best to use the form that is \"\n\"the most convenient to write. Similarly there are multiple ways to write \"\n\"byte string literals, which all result in `&[u8; N]`.\"\nmsgstr \"\"\n\"특수 문자가 포함된 문자열 리터럴을 작성하는 방법은 여러 가지가 있습니다. 모\"\n\"두 비슷한 `&str`을 결과로 내므로 가장 작성하기 편리한 형식을 사용하는 것이 좋\"\n\"습니다. 마찬가지로 바이트 문자열 리터럴을 작성하는 방법도 여러 가지가 있으\"\n\"며, 모두 `&[u8; N]` 결과를 냅니다.\"\n\n#: src/std/str.md:67\nmsgid \"\"\n\"Generally special characters are escaped with a backslash character: `\\\\`. \"\n\"This way you can add any character to your string, even unprintable ones and \"\n\"ones that you don't know how to type. If you want a literal backslash, \"\n\"escape it with another one: `\\\\\\\\`\"\nmsgstr \"\"\n\"일반적으로 특수 문자는 백슬래시 문자 `\\\\`로 이스케이프됩니다. 이 방법을 통해 \"\n\"출력 불가능한 문자나 입력 방법을 모르는 문자 등 어떤 문자든 문자열에 추가할 \"\n\"수 있습니다. 백슬래시 자체를 리터럴로 원한다면 백슬래시 하나를 더 붙여 `\\\\\\\\`\"\n\"와 같이 이스케이프하세요.\"\n\n#: src/std/str.md:72\nmsgid \"\"\n\"String or character literal delimiters occurring within a literal must be \"\n\"escaped: `\\\"\\\\\\\"\\\"`, `'\\\\''`.\"\nmsgstr \"\"\n\"리터럴 내에 나타나는 문자열 또는 문자 리터럴 구분자는 반드시 이스케이프해야 \"\n\"합니다: `\\\"\\\\\\\"\\\"`, `'\\\\''`.\"\n\n#: src/std/str.md:76\nmsgid \"// You can use escapes to write bytes by their hexadecimal values...\\n\"\nmsgstr \"\"\n\"// 16진수 값을 사용하여 바이트를 작성하기 위해 이스케이프를 사용할 수 있습니\"\n\"다...\\n\"\n\n#: src/std/str.md:77\nmsgid \"\\\"I'm writing \\\\x52\\\\x75\\\\x73\\\\x74!\\\"\"\nmsgstr \"\\\"I'm writing \\\\x52\\\\x75\\\\x73\\\\x74!\\\"\"\n\n#: src/std/str.md:78\nmsgid \"\\\"What are you doing\\\\x3F (\\\\\\\\x3F means ?) {}\\\"\"\nmsgstr \"\\\"What are you doing\\\\x3F (\\\\\\\\x3F는 ?를 의미합니다) {}\\\"\"\n\n#: src/std/str.md:80\nmsgid \"// ...or Unicode code points.\\n\"\nmsgstr \"// ...또는 유니코드 코드 포인트.\\n\"\n\n#: src/std/str.md:81\nmsgid \"\\\"\\\\u{211D}\\\"\"\nmsgstr \"\\\"\\\\u{211D}\\\"\"\n\n#: src/std/str.md:82\nmsgid \"\\\"\\\\\\\"DOUBLE-STRUCK CAPITAL R\\\\\\\"\\\"\"\nmsgstr \"\\\"\\\\\\\"DOUBLE-STRUCK CAPITAL R\\\\\\\"\\\"\"\n\n#: src/std/str.md:84\nmsgid \"\\\"Unicode character {} (U+211D) is called {}\\\"\"\nmsgstr \"\\\"유니코드 문자 {} (U+211D)는 {}라고 불립니다\\\"\"\n\n#: src/std/str.md:88\nmsgid \"\"\n\"\\\"String literals\\n\"\n\"                        can span multiple lines.\\n\"\n\"                        The linebreak and indentation here ->\\\\\\n\"\n\"                        <- can be escaped too!\\\"\"\nmsgstr \"\"\n\"\\\"문자열 리터럴은\\n\"\n\"                        여러 줄에 걸쳐 있을 수 있습니다.\\n\"\n\"                        여기서의 줄바꿈과 들여쓰기 ->\\\\\\n\"\n\"                        <- 역시 이스케이프될 수 있습니다!\\\"\"\n\n#: src/std/str.md:96\nmsgid \"\"\n\"Sometimes there are just too many characters that need to be escaped or it's \"\n\"just much more convenient to write a string out as-is. This is where raw \"\n\"string literals come into play.\"\nmsgstr \"\"\n\"때때로 이스케이프해야 할 문자가 너무 많거나 문자열을 있는 그대로 작성하는 것\"\n\"이 훨씬 더 편리할 때가 있습니다. 이때 로우(raw) 문자열 리터럴이 사용됩니다.\"\n\n#: src/std/str.md:101\nmsgid \"r\\\"Escapes don't work here: \\\\x3F \\\\u{211D}\\\"\"\nmsgstr \"r\\\"이스케이프가 여기선 작동하지 않습니다: \\\\x3F \\\\u{211D}\\\"\"\n\n#: src/std/str.md:104\nmsgid \"// If you need quotes in a raw string, add a pair of #s\\n\"\nmsgstr \"// 로우 문자열에서 따옴표가 필요하다면, # 쌍을 추가하세요\\n\"\n\n#: src/std/str.md:105\nmsgid \"r#\\\"And then I said: \\\"There is no escape!\\\"\\\"#\"\nmsgstr \"r#\\\"And then I said: \\\"There is no escape!\\\"\\\"#\"\n\n#: src/std/str.md:108\nmsgid \"\"\n\"// If you need \\\"# in your string, just use more #s in the delimiter.\\n\"\n\"    // You can use up to 255 #s.\\n\"\nmsgstr \"\"\n\"// 문자열 내에 \\\"#가 필요하다면, 구분자에 더 많은 #를 사용하세요.\\n\"\n\"    // 최대 255개의 #를 사용할 수 있습니다.\\n\"\n\n#: src/std/str.md:110\nmsgid \"r###\\\"A string with \\\"# in it. And even \\\"##!\\\"###\"\nmsgstr \"r###\\\"A string with \\\"# in it. And even \\\"##!\\\"###\"\n\n#: src/std/str.md:115\nmsgid \"\"\n\"Want a string that's not UTF-8? (Remember, `str` and `String` must be valid \"\n\"UTF-8). Or maybe you want an array of bytes that's mostly text? Byte strings \"\n\"to the rescue!\"\nmsgstr \"\"\n\"UTF-8이 아닌 문자열을 원하시나요? (`str`과 `String`은 반드시 유효한 UTF-8이어\"\n\"야 함을 기억하세요). 아니면 대부분이 텍스트인 바이트 배열을 원하시나요? 바이\"\n\"트 문자열이 해결해 드립니다!\"\n\n#: src/std/str.md:122\nmsgid \"// Note that this is not actually a `&str`\\n\"\nmsgstr \"// 이는 실제로 `&str`이 아님에 유의하세요\\n\"\n\n#: src/std/str.md:123\nmsgid \"b\\\"this is a byte string\\\"\"\nmsgstr \"b\\\"this is a byte string\\\"\"\n\n#: src/std/str.md:125\nmsgid \"\"\n\"// Byte arrays don't have the `Display` trait, so printing them is a bit \"\n\"limited\\n\"\nmsgstr \"\"\n\"// 바이트 배열은 `Display` 트레이트를 가지고 있지 않으므로, 출력에 다소 제한\"\n\"이 있습니다\\n\"\n\n#: src/std/str.md:126\nmsgid \"\\\"A byte string: {:?}\\\"\"\nmsgstr \"\\\"바이트 문자열: {:?}\\\"\"\n\n#: src/std/str.md:128\nmsgid \"// Byte strings can have byte escapes...\\n\"\nmsgstr \"// 바이트 문자열은 바이트 이스케이프를 가질 수 있습니다...\\n\"\n\n#: src/std/str.md:129\nmsgid \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 as bytes\\\"\"\nmsgstr \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 as bytes\\\"\"\n\n#: src/std/str.md:130\nmsgid \"\"\n\"// ...but no unicode escapes\\n\"\n\"    // let escaped = b\\\"\\\\u{211D} is not allowed\\\";\\n\"\nmsgstr \"\"\n\"// ...하지만 유니코드 이스케이프는 허용되지 않습니다\\n\"\n\"    // let escaped = b\\\"\\\\u{211D} is not allowed\\\";\\n\"\n\n#: src/std/str.md:132\nmsgid \"\\\"Some escaped bytes: {:?}\\\"\"\nmsgstr \"\\\"일부 이스케이프된 바이트: {:?}\\\"\"\n\n#: src/std/str.md:135\nmsgid \"// Raw byte strings work just like raw strings\\n\"\nmsgstr \"// 로우 바이트 문자열은 로우 문자열과 똑같이 작동합니다\\n\"\n\n#: src/std/str.md:136\nmsgid \"br\\\"\\\\u{211D} is not escaped here\\\"\"\nmsgstr \"br\\\"\\\\u{211D} is not escaped here\\\"\"\n\n#: src/std/str.md:139\nmsgid \"// Converting a byte array to `str` can fail\\n\"\nmsgstr \"// 바이트 배열을 `str`로 변환하는 것은 실패할 수 있습니다\\n\"\n\n#: src/std/str.md:141\nmsgid \"\\\"And the same as text: '{}'\\\"\"\nmsgstr \"\\\"그리고 텍스트로 변환하면: '{}'\\\"\"\n\n#: src/std/str.md:144\nmsgid \"\"\n\"br#\\\"You can also use \\\"fancier\\\" formatting, \\\\\\n\"\n\"                    like with normal raw strings\\\"#\"\nmsgstr \"\"\n\"br#\\\"일반 로우 문자열처럼, \\\\\\n\"\n\"                    더 \\\"화려한\\\" 포맷팅을 사용할 수도 있습니다\\\"#\"\n\n#: src/std/str.md:147\nmsgid \"// Byte strings don't have to be UTF-8\\n\"\nmsgstr \"// 바이트 문자열은 UTF-8일 필요가 없습니다\\n\"\n\n#: src/std/str.md:148\nmsgid \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\nmsgstr \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\n\n#: src/std/str.md:148\nmsgid \"// \\\"ようこそ\\\" in SHIFT-JIS\\n\"\nmsgstr \"// SHIFT-JIS 인코딩의 \\\"ようこそ\\\"(환영합니다)\\n\"\n\n#: src/std/str.md:150\nmsgid \"// But then they can't always be converted to `str`\\n\"\nmsgstr \"// 그런 경우에는 항상 `str`로 변환될 수는 없습니다\\n\"\n\n#: src/std/str.md:152\nmsgid \"\\\"Conversion successful: '{}'\\\"\"\nmsgstr \"\\\"변환 성공: '{}'\\\"\"\n\n#: src/std/str.md:153\nmsgid \"\\\"Conversion failed: {:?}\\\"\"\nmsgstr \"\\\"변환 실패: {:?}\\\"\"\n\n#: src/std/str.md:158\nmsgid \"\"\n\"For conversions between character encodings check out the [encoding](https://\"\n\"crates.io/crates/encoding) crate.\"\nmsgstr \"\"\n\"문자 인코딩 간의 변환에 대해서는 [encoding](https://crates.io/crates/\"\n\"encoding) 크레이트를 확인해 보세요.\"\n\n#: src/std/str.md:160\nmsgid \"\"\n\"A more detailed listing of the ways to write string literals and escape \"\n\"characters is given in the ['Tokens' chapter](https://doc.rust-lang.org/\"\n\"reference/tokens.html) of the Rust Reference.\"\nmsgstr \"\"\n\"문자열 리터럴을 작성하고 문자를 이스케이프하는 방법에 대한 더 자세한 목록은 \"\n\"Rust 레퍼런스의 ['Tokens' 장](https://doc.rust-lang.org/reference/\"\n\"tokens.html)에 나와 있습니다.\"\n\n#: src/std/option.md:3\nmsgid \"\"\n\"Sometimes it's desirable to catch the failure of some parts of a program \"\n\"instead of calling `panic!`; this can be accomplished using the `Option` \"\n\"enum.\"\nmsgstr \"\"\n\"때로는 프로그램의 일부에서 발생하는 실패를 `panic!`을 호출하는 대신 포착하고 \"\n\"싶을 때가 있습니다. 이는 `Option` 열거형을 사용하여 수행할 수 있습니다.\"\n\n#: src/std/option.md:6\nmsgid \"The `Option<T>` enum has two variants:\"\nmsgstr \"`Option<T>` 열거형은 두 가지 변체를 가집니다:\"\n\n#: src/std/option.md:8\nmsgid \"`None`, to indicate failure or lack of value, and\"\nmsgstr \"`None`: 실패나 값의 부재를 나타냄\"\n\n#: src/std/option.md:9\nmsgid \"`Some(value)`, a tuple struct that wraps a `value` with type `T`.\"\nmsgstr \"`Some(value)`: `T` 타입의 `value`를 감싸는 튜플 구조체\"\n\n#: src/std/option.md:12\nmsgid \"// An integer division that doesn't `panic!`\\n\"\nmsgstr \"// `panic!`을 일으키지 않는 정수 나눗셈\\n\"\n\n#: src/std/option.md:15\nmsgid \"// Failure is represented as the `None` variant\\n\"\nmsgstr \"// 실패는 `None` 변체로 표현됩니다\\n\"\n\n#: src/std/option.md:18\nmsgid \"// Result is wrapped in a `Some` variant\\n\"\nmsgstr \"// 결과는 `Some` 변체로 감싸집니다\\n\"\n\n#: src/std/option.md:22\nmsgid \"// This function handles a division that may not succeed\\n\"\nmsgstr \"// 이 함수는 성공하지 않을 수 있는 나눗셈을 처리합니다\\n\"\n\n#: src/std/option.md:25\nmsgid \"// `Option` values can be pattern matched, just like other enums\\n\"\nmsgstr \"// `Option` 값은 다른 열거형과 마찬가지로 패턴 매칭될 수 있습니다\\n\"\n\n#: src/std/option.md:27\nmsgid \"\\\"{} / {} failed!\\\"\"\nmsgstr \"\\\"{} / {} 실패!\\\"\"\n\n#: src/std/option.md:29\nmsgid \"\\\"{} / {} = {}\\\"\"\nmsgstr \"\\\"{} / {} = {}\\\"\"\n\n#: src/std/option.md:38\nmsgid \"// Binding `None` to a variable needs to be type annotated\\n\"\nmsgstr \"// `None`을 변수에 바인딩할 때는 타입 어노테이션이 필요합니다\\n\"\n\n#: src/std/option.md:44\nmsgid \"// Unwrapping a `Some` variant will extract the value wrapped.\\n\"\nmsgstr \"// `Some` 변체의 래핑을 해제(unwrap)하면 감싸진 값을 추출합니다.\\n\"\n\n#: src/std/option.md:45 src/std/option.md:48\nmsgid \"\\\"{:?} unwraps to {:?}\\\"\"\nmsgstr \"\\\"{:?}의 래핑을 해제하면 {:?}가 됩니다\\\"\"\n\n#: src/std/option.md:47\nmsgid \"// Unwrapping a `None` variant will `panic!`\\n\"\nmsgstr \"// `None` 변체의 래핑을 해제하면 `panic!`이 발생합니다\\n\"\n\n#: src/std/result.md:3\nmsgid \"\"\n\"We've seen that the `Option` enum can be used as a return value from \"\n\"functions that may fail, where `None` can be returned to indicate failure. \"\n\"However, sometimes it is important to express _why_ an operation failed. To \"\n\"do this we have the `Result` enum.\"\nmsgstr \"\"\n\"우리는 실패할 수 있는 함수로부터 `None`을 반환하여 실패를 나타낼 때 `Option` \"\n\"열거형이 사용될 수 있음을 보았습니다. 하지만 때로는 작업이 *왜* 실패했는지 표\"\n\"현하는 것이 중요합니다. 이를 위해 우리는 `Result` 열거형을 가지고 있습니다.\"\n\n#: src/std/result.md:8\nmsgid \"The `Result<T, E>` enum has two variants:\"\nmsgstr \"`Result<T, E>` 열거형은 두 가지 변체를 가집니다:\"\n\n#: src/std/result.md:10\nmsgid \"\"\n\"`Ok(value)` which indicates that the operation succeeded, and wraps the \"\n\"`value` returned by the operation. (`value` has type `T`)\"\nmsgstr \"\"\n\"`Ok(value)`: 작업이 성공했음을 나타내며, 작업에 의해 반환된 `value`를 감쌉니\"\n\"다. (`value`는 `T` 타입을 가집니다)\"\n\n#: src/std/result.md:12\nmsgid \"\"\n\"`Err(why)`, which indicates that the operation failed, and wraps `why`, \"\n\"which (hopefully) explains the cause of the failure. (`why` has type `E`)\"\nmsgstr \"\"\n\"`Err(why)`: 작업이 실패했음을 나타내며, 실패의 원인을 설명하는 (바라건대) \"\n\"`why`를 감쌉니다. (`why`는 `E` 타입을 가집니다)\"\n\n#: src/std/result.md:17\nmsgid \"// Mathematical \\\"errors\\\" we want to catch\\n\"\nmsgstr \"// 우리가 포착하고 싶은 수학적 \\\"에러\\\"들\\n\"\n\n#: src/std/result.md:29\nmsgid \"\"\n\"// This operation would `fail`, instead let's return the reason of\\n\"\n\"            // the failure wrapped in `Err`\\n\"\nmsgstr \"\"\n\"// 이 작업은 실패하게 되므로, 대신 실패의 원인을\\n\"\n\"// `Err`로 감싸서 반환합시다\\n\"\n\n#: src/std/result.md:33\nmsgid \"// This operation is valid, return the result wrapped in `Ok`\\n\"\nmsgstr \"// 이 작업은 유효하므로, 결과를 `Ok`로 감싸서 반환합니다\\n\"\n\n#: src/std/result.md:54\nmsgid \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\nmsgstr \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\n\n#: src/std/result.md:57\nmsgid \"// This is a three level match pyramid!\\n\"\nmsgstr \"// 이것은 3단계 `match` 피라미드입니다!\\n\"\n\n#: src/std/result.md:71\nmsgid \"// Will this fail?\\n\"\nmsgstr \"// 이것은 실패할까요?\\n\"\n\n#: src/std/result/question_mark.md:3\nmsgid \"\"\n\"Chaining results using match can get pretty untidy; luckily, the `?` \"\n\"operator can be used to make things pretty again. `?` is used at the end of \"\n\"an expression returning a `Result`, and is equivalent to a match expression, \"\n\"where the `Err(err)` branch expands to an early `return \"\n\"Err(From::from(err))`, and the `Ok(ok)` branch expands to an `ok` expression.\"\nmsgstr \"\"\n\"`match`를 사용하여 결과를 체인으로 연결하는 것은 꽤 지저분해질 수 있습니다. \"\n\"다행히 `?` 연산자를 사용하여 다시 깔끔하게 만들 수 있습니다. `?`는 `Result`\"\n\"를 반환하는 표현식의 끝에 사용되며, `match` 표현식과 동일하게 작동합니다. 여\"\n\"기서 `Err(err)` 가지는 조기 리턴인 `return Err(From::from(err))`로 확장되고, \"\n\"`Ok(ok)` 가지는 `ok` 표현식으로 확장됩니다.\"\n\n#: src/std/result/question_mark.md:44\nmsgid \"// Intermediate function\\n\"\nmsgstr \"// 중간 함수\\n\"\n\n#: src/std/result/question_mark.md:46\nmsgid \"// if `div` \\\"fails\\\", then `DivisionByZero` will be `return`ed\\n\"\nmsgstr \"// 만약 `div`가 \\\"실패\\\"하면, `DivisionByZero`가 반환됩니다\\n\"\n\n#: src/std/result/question_mark.md:49\nmsgid \"// if `ln` \\\"fails\\\", then `NonPositiveLogarithm` will be `return`ed\\n\"\nmsgstr \"// 만약 `ln`가 \\\"실패\\\"하면, `NonPositiveLogarithm`이 반환됩니다\\n\"\n\n#: src/std/result/question_mark.md:59\nmsgid \"\\\"logarithm of non-positive number\\\"\"\nmsgstr \"\\\"0 이하의 수에 대한 로그\\\"\"\n\n#: src/std/result/question_mark.md:61 src/std/panic.md:15\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"0으로 나누기\\\"\"\n\n#: src/std/result/question_mark.md:63\nmsgid \"\\\"square root of negative number\\\"\"\nmsgstr \"\\\"음수의 제곱근\\\"\"\n\n#: src/std/result/question_mark.md:75\nmsgid \"\"\n\"Be sure to check the [documentation](https://doc.rust-lang.org/std/result/\"\n\"index.html), as there are many methods to map/compose `Result`.\"\nmsgstr \"\"\n\"`Result`를 매핑하거나 구성(compose)하는 많은 메서드들이 있으니, 반드시 [문서]\"\n\"(https://doc.rust-lang.org/std/result/index.html)를 확인해 보세요.\"\n\n#: src/std/panic.md:3\nmsgid \"\"\n\"The `panic!` macro can be used to generate a panic and start unwinding its \"\n\"stack. While unwinding, the runtime will take care of freeing all the \"\n\"resources _owned_ by the thread by calling the destructor of all its objects.\"\nmsgstr \"\"\n\"`panic!` 매크로는 패닉을 생성하고 스택 되감기(unwinding)를 시작하는 데 사용\"\n\"될 수 있습니다. 되감기를 하는 동안, 런타임은 모든 객체의 데스트럭터를 호출하\"\n\"여 해당 스레드가 소유한 모든 리소스를 해제합니다.\"\n\n#: src/std/panic.md:7\nmsgid \"\"\n\"Since we are dealing with programs with only one thread, `panic!` will cause \"\n\"the program to report the panic message and exit.\"\nmsgstr \"\"\n\"우리는 단일 스레드 프로그램만 다루고 있으므로, `panic!`은 프로그램이 패닉 메\"\n\"시지를 보고하고 종료하게 만듭니다.\"\n\n#: src/std/panic.md:11\nmsgid \"// Re-implementation of integer division (/)\\n\"\nmsgstr \"// 정수 나눗셈(/)의 재구현\\n\"\n\n#: src/std/panic.md:14\nmsgid \"// Division by zero triggers a panic\\n\"\nmsgstr \"// 0으로 나누기는 패닉을 트리거합니다\\n\"\n\n#: src/std/panic.md:20\nmsgid \"// The `main` task\\n\"\nmsgstr \"// 메인 태스크\\n\"\n\n#: src/std/panic.md:23\nmsgid \"// Heap allocated integer\\n\"\nmsgstr \"// 힙 할당 정수\\n\"\n\n#: src/std/panic.md:26\nmsgid \"// This operation will trigger a task failure\\n\"\nmsgstr \"// 이 작업은 태스크 실패를 트리거합니다\\n\"\n\n#: src/std/panic.md:29\nmsgid \"\\\"This point won't be reached!\\\"\"\nmsgstr \"\\\"이 지점에는 도달하지 않습니다!\\\"\"\n\n#: src/std/panic.md:31\nmsgid \"// `_x` should get destroyed at this point\\n\"\nmsgstr \"// 이 지점에서 `_x`가 파괴되어야 합니다\\n\"\n\n#: src/std/panic.md:35\nmsgid \"Let's check that `panic!` doesn't leak memory.\"\nmsgstr \"`panic!`이 메모리를 누수하지 않는지 확인해 봅시다.\"\n\n#: src/std/hash.md:3\nmsgid \"\"\n\"Where vectors store values by an integer index, `HashMap`s store values by \"\n\"key. `HashMap` keys can be booleans, integers, strings, or any other type \"\n\"that implements the `Eq` and `Hash` traits. More on this in the next section.\"\nmsgstr \"\"\n\"벡터가 정수 인덱스로 값을 저장하는 반면, `HashMap`은 키(key)로 값을 저장합니\"\n\"다. `HashMap`의 키는 불리언, 정수, 문자열 또는 `Eq`와 `Hash` 트레이트를 구현\"\n\"하는 임의의 다른 타입이 될 수 있습니다. 이에 대해서는 다음 섹션에서 자세히 다\"\n\"룹니다.\"\n\n#: src/std/hash.md:8\nmsgid \"\"\n\"Like vectors, `HashMap`s are growable, but HashMaps can also shrink \"\n\"themselves when they have excess space. You can create a HashMap with a \"\n\"certain starting capacity using `HashMap::with_capacity(uint)`, or use \"\n\"`HashMap::new()` to get a HashMap with a default initial capacity \"\n\"(recommended).\"\nmsgstr \"\"\n\"벡터와 마찬가지로 `HashMap`은 늘어날 수 있지만, 공간이 남을 때는 스스로 줄어\"\n\"들 수도 있습니다. `HashMap::with_capacity(uint)`를 사용하여 특정 시작 용량으\"\n\"로 HashMap을 생성하거나, `HashMap::new()`를 사용하여 기본 초기 용량을 가진 \"\n\"HashMap을 얻을 수 있습니다(권장됨).\"\n\n#: src/std/hash.md:19 src/std/hash.md:30\nmsgid \"\\\"798-1364\\\"\"\nmsgstr \"\\\"798-1364\\\"\"\n\n#: src/std/hash.md:19\nmsgid \"\"\n\"\\\"We're sorry, the call cannot be completed as dialed.\\n\"\n\"            Please hang up and try again.\\\"\"\nmsgstr \"\"\n\"\\\"죄송합니다, 전화 연결을 할 수 없습니다.\\n\"\n\"            전화를 끊고 다시 시도해 주세요.\\\"\"\n\n#: src/std/hash.md:21 src/std/hash.md:31\nmsgid \"\\\"645-7689\\\"\"\nmsgstr \"\\\"645-7689\\\"\"\n\n#: src/std/hash.md:21\nmsgid \"\"\n\"\\\"Hello, this is Mr. Awesome's Pizza. My name is Fred.\\n\"\n\"            What can I get for you today?\\\"\"\nmsgstr \"\"\n\"\\\"안녕하세요, 어썸 피자입니다. 저는 프레드라고 합니다.\\n\"\n\"            오늘 무엇을 도와드릴까요?\\\"\"\n\n#: src/std/hash.md:23\nmsgid \"\\\"Hi! Who is this again?\\\"\"\nmsgstr \"\\\"안녕! 누구시더라?\\\"\"\n\n#: src/std/hash.md:30 src/std/hash.md:36 src/std/hash.md:43\nmsgid \"\\\"Daniel\\\"\"\nmsgstr \"\\\"다니엘\\\"\"\n\n#: src/std/hash.md:31 src/std/hash.md:45 src/std/hash.md:50\nmsgid \"\\\"Ashley\\\"\"\nmsgstr \"\\\"애슐리\\\"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"Katie\\\"\"\nmsgstr \"\\\"케이티\\\"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"435-8291\\\"\"\nmsgstr \"\\\"435-8291\\\"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"Robert\\\"\"\nmsgstr \"\\\"로버트\\\"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"956-1745\\\"\"\nmsgstr \"\\\"956-1745\\\"\"\n\n#: src/std/hash.md:35\nmsgid \"// Takes a reference and returns Option<&V>\\n\"\nmsgstr \"// 참조를 인자로 받아 `Option<&V>`를 반환합니다\\n\"\n\n#: src/std/hash.md:37\nmsgid \"\\\"Calling Daniel: {}\\\"\"\nmsgstr \"\\\"다니엘에게 전화 거는 중: {}\\\"\"\n\n#: src/std/hash.md:38\nmsgid \"\\\"Don't have Daniel's number.\\\"\"\nmsgstr \"\\\"다니엘의 번호가 없습니다.\\\"\"\n\n#: src/std/hash.md:41\nmsgid \"\"\n\"// `HashMap::insert()` returns `None`\\n\"\n\"    // if the inserted value is new, `Some(value)` otherwise\\n\"\nmsgstr \"\"\n\"// `HashMap::insert()`는 삽입된 값이 새로운 것이면 `None`을,\\n\"\n\"    // 그렇지 않으면 `Some(value)`를 반환합니다\\n\"\n\n#: src/std/hash.md:43\nmsgid \"\\\"164-6743\\\"\"\nmsgstr \"\\\"164-6743\\\"\"\n\n#: src/std/hash.md:46\nmsgid \"\\\"Calling Ashley: {}\\\"\"\nmsgstr \"\\\"애슐리에게 전화 거는 중: {}\\\"\"\n\n#: src/std/hash.md:47\nmsgid \"\\\"Don't have Ashley's number.\\\"\"\nmsgstr \"\\\"애슐리의 번호가 없습니다.\\\"\"\n\n#: src/std/hash.md:52\nmsgid \"\"\n\"// `HashMap::iter()` returns an iterator that yields\\n\"\n\"    // (&'a key, &'a value) pairs in arbitrary order.\\n\"\nmsgstr \"\"\n\"// `HashMap::iter()`는 (&'a key, &'a value) 쌍을\\n\"\n\"    // 임의의 순서로 내놓는 이터레이터를 반환합니다.\\n\"\n\n#: src/std/hash.md:55\nmsgid \"\\\"Calling {}: {}\\\"\"\nmsgstr \"\\\"{}에게 전화 거는 중: {}\\\"\"\n\n#: src/std/hash.md:60\nmsgid \"\"\n\"For more information on how hashing and hash maps (sometimes called hash \"\n\"tables) work, have a look at [Hash Table Wikipedia](https://en.wikipedia.org/\"\n\"wiki/Hash_table)\"\nmsgstr \"\"\n\"해싱과 해시 맵(때때로 해시 테이블이라고도 불림)이 어떻게 작동하는지에 대한 \"\n\"더 자세한 정보는 [Wikipedia의 해시 테이블](https://en.wikipedia.org/wiki/\"\n\"Hash_table)을 참조하세요.\"\n\n#: src/std/hash/alt_key_types.md:3\nmsgid \"\"\n\"Any type that implements the `Eq` and `Hash` traits can be a key in \"\n\"`HashMap`. This includes:\"\nmsgstr \"\"\n\"`Eq`와 `Hash` 트레이트를 구현하는 어떤 타입이든 `HashMap`의 키가 될 수 있습니\"\n\"다. 여기에는 다음이 포함됩니다:\"\n\n#: src/std/hash/alt_key_types.md:6\nmsgid \"`bool` (though not very useful since there are only two possible keys)\"\nmsgstr \"`bool` (가능한 키가 두 개뿐이라 그리 유용하진 않지만요)\"\n\n#: src/std/hash/alt_key_types.md:7\nmsgid \"`int`, `uint`, and all variations thereof\"\nmsgstr \"`int`, `uint` 및 그 모든 변형들\"\n\n#: src/std/hash/alt_key_types.md:8\nmsgid \"\"\n\"`String` and `&str` (protip: you can have a `HashMap` keyed by `String` and \"\n\"call `.get()` with an `&str`)\"\nmsgstr \"\"\n\"`String`과 `&str` (꿀팁: `String`을 키로 하는 `HashMap`을 만들고 `&str`을 사\"\n\"용하여 `.get()`을 호출할 수 있습니다)\"\n\n#: src/std/hash/alt_key_types.md:11\nmsgid \"\"\n\"Note that `f32` and `f64` do _not_ implement `Hash`, likely because \"\n\"[floating-point precision errors](https://en.wikipedia.org/wiki/\"\n\"Floating_point#Accuracy_problems) would make using them as hashmap keys \"\n\"horribly error-prone.\"\nmsgstr \"\"\n\"`f32`와 `f64`는 `Hash`를 구현하지 않는다는 점에 유의하세요. 아마도 [부동 소수\"\n\"점 정밀도 에러](https://en.wikipedia.org/wiki/\"\n\"Floating_point#Accuracy_problems)로 인해 이들을 해시 맵 키로 사용하는 것이 극\"\n\"도로 에러에 취약해질 수 있기 때문일 것입니다.\"\n\n#: src/std/hash/alt_key_types.md:15\nmsgid \"\"\n\"All collection classes implement `Eq` and `Hash` if their contained type \"\n\"also respectively implements `Eq` and `Hash`. For example, `Vec<T>` will \"\n\"implement `Hash` if `T` implements `Hash`.\"\nmsgstr \"\"\n\"모든 컬렉션 클래스는 포함된 타입이 각각 `Eq`와 `Hash`를 구현한다면 `Eq`와 \"\n\"`Hash`를 구현합니다. 예를 들어, `Vec<T>`는 `T`가 `Hash`를 구현한다면 `Hash`\"\n\"를 구현합니다.\"\n\n#: src/std/hash/alt_key_types.md:19\nmsgid \"\"\n\"You can easily implement `Eq` and `Hash` for a custom type with just one \"\n\"line: `#[derive(PartialEq, Eq, Hash)]`\"\nmsgstr \"\"\n\"단 한 줄의 코드로 커스텀 타입에 대해 `Eq`와 `Hash`를 쉽게 구현할 수 있습니\"\n\"다: `#[derive(PartialEq, Eq, Hash)]`\"\n\n#: src/std/hash/alt_key_types.md:22\nmsgid \"\"\n\"The compiler will do the rest. If you want more control over the details, \"\n\"you can implement `Eq` and/or `Hash` yourself. This guide will not cover the \"\n\"specifics of implementing `Hash`.\"\nmsgstr \"\"\n\"컴파일러가 나머지를 알아서 할 것입니다. 만약 세부 사항을 더 제어하고 싶다면, \"\n\"`Eq`나 `Hash`를 직접 구현할 수 있습니다. 이 가이드에서는 `Hash` 구현의 구체적\"\n\"인 내용은 다루지 않습니다.\"\n\n#: src/std/hash/alt_key_types.md:26\nmsgid \"\"\n\"To play around with using a `struct` in `HashMap`, let's try making a very \"\n\"simple user logon system:\"\nmsgstr \"\"\n\"`HashMap`에서 `struct`를 사용하는 것을 연습해 보기 위해, 매우 간단한 사용자 \"\n\"로그인 시스템을 만들어 봅시다:\"\n\n#: src/std/hash/alt_key_types.md:31\nmsgid \"// Eq requires that you derive PartialEq on the type.\\n\"\nmsgstr \"// Eq는 해당 타입에 대해 PartialEq를 유도(derive)할 것을 요구합니다.\\n\"\n\n#: src/std/hash/alt_key_types.md:48\nmsgid \"\\\"Username: {}\\\"\"\nmsgstr \"\\\"사용자 이름: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:49\nmsgid \"\\\"Password: {}\\\"\"\nmsgstr \"\\\"비밀번호: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:50\nmsgid \"\\\"Attempting logon...\\\"\"\nmsgstr \"\\\"로그인 시도 중...\\\"\"\n\n#: src/std/hash/alt_key_types.md:59\nmsgid \"\\\"Successful logon!\\\"\"\nmsgstr \"\\\"로그인 성공!\\\"\"\n\n#: src/std/hash/alt_key_types.md:60\nmsgid \"\\\"Name: {}\\\"\"\nmsgstr \"\\\"이름: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:61\nmsgid \"\\\"Email: {}\\\"\"\nmsgstr \"\\\"이메일: {}\\\"\"\n\n#: src/std/hash/alt_key_types.md:63\nmsgid \"\\\"Login failed!\\\"\"\nmsgstr \"\\\"로그인 실패!\\\"\"\n\n#: src/std/hash/alt_key_types.md:71 src/std/hash/alt_key_types.md:82\n#: src/std/hash/alt_key_types.md:84\nmsgid \"\\\"j.everyman\\\"\"\nmsgstr \"\\\"j.everyman\\\"\"\n\n#: src/std/hash/alt_key_types.md:72 src/std/hash/alt_key_types.md:84\nmsgid \"\\\"password123\\\"\"\nmsgstr \"\\\"password123\\\"\"\n\n#: src/std/hash/alt_key_types.md:76\nmsgid \"\\\"John Everyman\\\"\"\nmsgstr \"\\\"John Everyman\\\"\"\n\n#: src/std/hash/alt_key_types.md:77\nmsgid \"\\\"j.everyman@email.com\\\"\"\nmsgstr \"\\\"j.everyman@email.com\\\"\"\n\n#: src/std/hash/alt_key_types.md:82\nmsgid \"\\\"psasword123\\\"\"\nmsgstr \"\\\"psasword123\\\"\"\n\n#: src/std/hash/hashset.md:3\nmsgid \"\"\n\"Consider a `HashSet` as a `HashMap` where we just care about the keys \"\n\"( `HashSet<T>` is, in actuality, just a wrapper around `HashMap<T, ()>`).\"\nmsgstr \"\"\n\"`HashSet`을 키에만 관심이 있는 `HashMap`이라고 생각해보세요 (`HashSet<T>`는 \"\n\"실제로 `HashMap<T, ()>`의 래퍼(wrapper)일 뿐입니다).\"\n\n#: src/std/hash/hashset.md:6\nmsgid \"\"\n\"\\\"What's the point of that?\\\" you ask. \\\"I could just store the keys in a \"\n\"`Vec`.\\\"\"\nmsgstr \"\"\n\"\\\"그게 무슨 소용이죠?\\\"라고 물으실 수 있습니다. \\\"그냥 키를 `Vec`에 저장할 수\"\n\"도 있잖아요.\\\"\"\n\n#: src/std/hash/hashset.md:8\nmsgid \"\"\n\"A `HashSet`'s unique feature is that it is guaranteed to not have duplicate \"\n\"elements. That's the contract that any set collection fulfills. `HashSet` is \"\n\"just one implementation. (see also: [`BTreeSet`](https://doc.rust-lang.org/\"\n\"std/collections/struct.BTreeSet.html))\"\nmsgstr \"\"\n\"`HashSet`의 고유한 특징은 중복된 요소가 없음을 보장한다는 것입니다. 이는 모\"\n\"든 집합(set) 컬렉션이 지키는 계약입니다. `HashSet`은 그 중 하나의 구현일 뿐입\"\n\"니다. (참고: [`BTreeSet`](https://doc.rust-lang.org/std/collections/\"\n\"struct.BTreeSet.html))\"\n\n#: src/std/hash/hashset.md:13\nmsgid \"\"\n\"If you insert a value that is already present in the `HashSet`, (i.e. the \"\n\"new value is equal to the existing and they both have the same hash), then \"\n\"the new value will replace the old.\"\nmsgstr \"\"\n\"이미 `HashSet`에 존재하는 값을 삽입하면 (즉, 새 값이 기존 값과 같고 해시도 같\"\n\"다면), 새 값이 기존 값을 대체하게 됩니다.\"\n\n#: src/std/hash/hashset.md:17\nmsgid \"\"\n\"This is great for when you never want more than one of something, or when \"\n\"you want to know if you've already got something.\"\nmsgstr \"\"\n\"이는 무언가를 중복 없이 유지하고 싶을 때나, 이미 가지고 있는지 알고 싶을 때 \"\n\"매우 유용합니다.\"\n\n#: src/std/hash/hashset.md:20\nmsgid \"But sets can do more than that.\"\nmsgstr \"하지만 집합은 그 이상의 일을 할 수 있습니다.\"\n\n#: src/std/hash/hashset.md:22\nmsgid \"\"\n\"Sets have 4 primary operations (all of the following calls return an \"\n\"iterator):\"\nmsgstr \"\"\n\"집합은 4가지 주요 연산을 가집니다 (다음 호출들은 모두 이터레이터를 반환합니\"\n\"다):\"\n\n#: src/std/hash/hashset.md:24\nmsgid \"`union`: get all the unique elements in both sets.\"\nmsgstr \"`union`(합집합): 두 집합에 있는 모든 고유한 요소들을 가져옵니다.\"\n\n#: src/std/hash/hashset.md:26\nmsgid \"\"\n\"`difference`: get all the elements that are in the first set but not the \"\n\"second.\"\nmsgstr \"\"\n\"`difference`(차집합): 첫 번째 집합에는 있지만 두 번째 집합에는 없는 모든 요소\"\n\"들을 가져옵니다.\"\n\n#: src/std/hash/hashset.md:28\nmsgid \"`intersection`: get all the elements that are only in _both_ sets.\"\nmsgstr \"\"\n\"`intersection`(교집합): 오직 *양쪽* 집합 모두에 있는 모든 요소들을 가져옵니\"\n\"다.\"\n\n#: src/std/hash/hashset.md:30\nmsgid \"\"\n\"`symmetric_difference`: get all the elements that are in one set or the \"\n\"other, but _not_ both.\"\nmsgstr \"\"\n\"`symmetric_difference`(대칭차집합): 한쪽 집합에는 있지만 *양쪽 모두*에 있지\"\n\"는 않은 모든 요소들을 가져옵니다.\"\n\n#: src/std/hash/hashset.md:33\nmsgid \"Try all of these in the following example:\"\nmsgstr \"다음 예제에서 이들 모두를 시도해 보세요:\"\n\n#: src/std/hash/hashset.md:45\nmsgid \"\"\n\"// `HashSet::insert()` returns false if\\n\"\n\"    // there was a value already present.\\n\"\nmsgstr \"// `HashSet::insert()`는 값이 이미 존재하면 false를 반환합니다.\\n\"\n\n#: src/std/hash/hashset.md:47\nmsgid \"\\\"Value 4 is already in set B!\\\"\"\nmsgstr \"\\\"값 4는 이미 집합 B에 있습니다!\\\"\"\n\n#: src/std/hash/hashset.md:52\nmsgid \"\"\n\"// If a collection's element type implements `Debug`,\\n\"\n\"    // then the collection implements `Debug`.\\n\"\n\"    // It usually prints its elements in the format `[elem1, elem2, ...]`\\n\"\nmsgstr \"\"\n\"// 컬렉션의 요소 타입이 `Debug`를 구현한다면,\\n\"\n\"// 컬렉션도 `Debug`를 구현합니다.\\n\"\n\"// 보통 `[elem1, elem2, ...]` 형식으로 요소를 출력합니다.\\n\"\n\n#: src/std/hash/hashset.md:55\nmsgid \"\\\"A: {:?}\\\"\"\nmsgstr \"\\\"A: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:56\nmsgid \"\\\"B: {:?}\\\"\"\nmsgstr \"\\\"B: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:58\nmsgid \"// Print [1, 2, 3, 4, 5] in arbitrary order\\n\"\nmsgstr \"// [1, 2, 3, 4, 5]를 임의의 순서로 출력합니다\\n\"\n\n#: src/std/hash/hashset.md:59\nmsgid \"\\\"Union: {:?}\\\"\"\nmsgstr \"\\\"합집합: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:61\nmsgid \"// This should print [1]\\n\"\nmsgstr \"// 이는 [1]을 출력해야 합니다\\n\"\n\n#: src/std/hash/hashset.md:62\nmsgid \"\\\"Difference: {:?}\\\"\"\nmsgstr \"\\\"차집합: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:64\nmsgid \"// Print [2, 3, 4] in arbitrary order.\\n\"\nmsgstr \"// [2, 3, 4]를 임의의 순서로 출력합니다.\\n\"\n\n#: src/std/hash/hashset.md:65\nmsgid \"\\\"Intersection: {:?}\\\"\"\nmsgstr \"\\\"교집합: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:67\nmsgid \"// Print [1, 5]\\n\"\nmsgstr \"// [1, 5]를 출력합니다\\n\"\n\n#: src/std/hash/hashset.md:68\nmsgid \"\\\"Symmetric Difference: {:?}\\\"\"\nmsgstr \"\\\"대칭차집합: {:?}\\\"\"\n\n#: src/std/hash/hashset.md:73\nmsgid \"\"\n\"(Examples are adapted from the [documentation.](https://doc.rust-lang.org/\"\n\"std/collections/struct.HashSet.html#method.difference))\"\nmsgstr \"\"\n\"(예제는 [문서](https://doc.rust-lang.org/std/collections/\"\n\"struct.HashSet.html#method.difference)에서 발췌 및 수정되었습니다.)\"\n\n#: src/std/rc.md:3\nmsgid \"\"\n\"When multiple ownership is needed, `Rc`(Reference Counting) can be used. \"\n\"`Rc` keeps track of the number of the references which means the number of \"\n\"owners of the value wrapped inside an `Rc`.\"\nmsgstr \"\"\n\"다중 소유권이 필요한 경우, `Rc`(참조 횟수 계산, Reference Counting)를 사용할 \"\n\"수 있습니다. `Rc`는 참조의 개수를 추적하며, 이는 `Rc` 내부에 감싸진 값의 소유\"\n\"자 수를 의미합니다.\"\n\n#: src/std/rc.md:7\nmsgid \"\"\n\"Reference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and \"\n\"decreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an \"\n\"`Rc`'s reference count becomes zero (which means there are no remaining \"\n\"owners), both the `Rc` and the value are all dropped.\"\nmsgstr \"\"\n\"`Rc`의 참조 횟수는 `Rc`가 클론될 때마다 1씩 증가하고, 클론된 `Rc`가 스코프를 \"\n\"벗어날 때마다 1씩 감소합니다. `Rc`의 참조 횟수가 0이 되면 (즉, 남은 소유자가 \"\n\"없으면), `Rc`와 그 내부의 값 모두 해제됩니다.\"\n\n#: src/std/rc.md:12\nmsgid \"\"\n\"Cloning an `Rc` never performs a deep copy. Cloning creates just another \"\n\"pointer to the wrapped value, and increments the count.\"\nmsgstr \"\"\n\"`Rc`를 클론하는 것은 결코 깊은 복사(deep copy)를 수행하지 않습니다. 클론은 단\"\n\"지 감싸진 값을 가리키는 또 다른 포인터를 생성하고, 횟수를 증가시킬 뿐입니다.\"\n\n#: src/std/rc.md:19\nmsgid \"\\\"Rc examples\\\"\"\nmsgstr \"\\\"Rc 예제\\\"\"\n\n#: src/std/rc.md:21\nmsgid \"\\\"--- rc_a is created ---\\\"\"\nmsgstr \"\\\"--- rc_a가 생성됨 ---\\\"\"\n\n#: src/std/rc.md:24 src/std/rc.md:31 src/std/rc.md:43\nmsgid \"\\\"Reference Count of rc_a: {}\\\"\"\nmsgstr \"\\\"rc_a의 참조 횟수: {}\\\"\"\n\n#: src/std/rc.md:27\nmsgid \"\\\"--- rc_a is cloned to rc_b ---\\\"\"\nmsgstr \"\\\"--- rc_a가 rc_b로 클론됨 ---\\\"\"\n\n#: src/std/rc.md:30\nmsgid \"\\\"Reference Count of rc_b: {}\\\"\"\nmsgstr \"\\\"rc_b의 참조 횟수: {}\\\"\"\n\n#: src/std/rc.md:33\nmsgid \"// Two `Rc`s are equal if their inner values are equal\\n\"\nmsgstr \"// 두 `Rc`는 내부 값이 같으면 같습니다\\n\"\n\n#: src/std/rc.md:34\nmsgid \"\\\"rc_a and rc_b are equal: {}\\\"\"\nmsgstr \"\\\"rc_a와 rc_b는 같음: {}\\\"\"\n\n#: src/std/rc.md:36\nmsgid \"// We can use methods of a value directly\\n\"\nmsgstr \"// 값의 메서드들을 직접 사용할 수 있습니다\\n\"\n\n#: src/std/rc.md:37\nmsgid \"\\\"Length of the value inside rc_a: {}\\\"\"\nmsgstr \"\\\"rc_a 내부 값의 길이: {}\\\"\"\n\n#: src/std/rc.md:38\nmsgid \"\\\"Value of rc_b: {}\\\"\"\nmsgstr \"\\\"rc_b의 값: {}\\\"\"\n\n#: src/std/rc.md:40\nmsgid \"\\\"--- rc_b is dropped out of scope ---\\\"\"\nmsgstr \"\\\"--- rc_b가 스코프를 벗어나 해제됨 ---\\\"\"\n\n#: src/std/rc.md:45\nmsgid \"\\\"--- rc_a is dropped out of scope ---\\\"\"\nmsgstr \"\\\"--- rc_a가 스코프를 벗어나 해제됨 ---\\\"\"\n\n#: src/std/rc.md:48\nmsgid \"\"\n\"// Error! `rc_examples` already moved into `rc_a`\\n\"\n\"    // And when `rc_a` is dropped, `rc_examples` is dropped together\\n\"\n\"    // println!(\\\"rc_examples: {}\\\", rc_examples);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 에러! `rc_examples`는 이미 `rc_a`로 이동되었습니다\\n\"\n\"    // 그리고 `rc_a`가 해제될 때, `rc_examples`도 함께 해제됩니다\\n\"\n\"    // println!(\\\"rc_examples: {}\\\", rc_examples);\\n\"\n\"    // TODO ^ 이 줄의 주석을 해제해 보세요\\n\"\n\n#: src/std/rc.md:57\nmsgid \"\"\n\"[std::rc](https://doc.rust-lang.org/std/rc/index.html) and [std::sync::arc]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Arc.html).\"\nmsgstr \"\"\n\"[std::rc](https://doc.rust-lang.org/std/rc/index.html)와 [std::sync::arc]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Arc.html).\"\n\n#: src/std/arc.md:1\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/std/arc.md:3\nmsgid \"\"\n\"When shared ownership between threads is needed, `Arc`(Atomically Reference \"\n\"Counted) can be used. This struct, via the `Clone` implementation can create \"\n\"a reference pointer for the location of a value in the memory heap while \"\n\"increasing the reference counter. As it shares ownership between threads, \"\n\"when the last reference pointer to a value is out of scope, the variable is \"\n\"dropped.\"\nmsgstr \"\"\n\"스레드 간의 공유 소유권이 필요한 경우, `Arc`(원자적 참조 횟수 계산, \"\n\"Atomically Reference Counted)를 사용할 수 있습니다. 이 구조체는 `Clone` 구현\"\n\"을 통해 힙 메모리에 있는 값의 위치를 가리키는 참조 포인터를 생성하고 참조 횟\"\n\"수를 증가시킵니다. 스레드 간에 소유권을 공유하므로, 값에 대한 마지막 참조 포\"\n\"인터가 스코프를 벗어날 때 변수가 해제됩니다.\"\n\n#: src/std/arc.md:15\nmsgid \"// This variable declaration is where its value is specified.\\n\"\nmsgstr \"// 이 변수 선언에서 값이 지정됩니다.\\n\"\n\n#: src/std/arc.md:16\nmsgid \"\\\"the same apple\\\"\"\nmsgstr \"\\\"같은 사과\\\"\"\n\n#: src/std/arc.md:19\nmsgid \"\"\n\"// Here there is no value specification as it is a pointer to a\\n\"\n\"        // reference in the memory heap.\\n\"\nmsgstr \"\"\n\"// 여기서는 힙 메모리의 참조를 가리키는 포인터이므로 별도의 값 지정이 없습니\"\n\"다.\\n\"\n\n#: src/std/arc.md:24\nmsgid \"\"\n\"// As Arc was used, threads can be spawned using the value allocated\\n\"\n\"            // in the Arc variable pointer's location.\\n\"\nmsgstr \"\"\n\"// `Arc`를 사용했으므로, `Arc` 변수 포인터 위치에 할당된 값을 사용하여 스레드\"\n\"를 생성할 수 있습니다.\\n\"\n\n#: src/std/arc.md:30\nmsgid \"// Make sure all Arc instances are printed from spawned threads.\\n\"\nmsgstr \"// 모든 `Arc` 인스턴스가 생성된 스레드에서 출력되도록 합니다.\\n\"\n\n#: src/std_misc.md:3\nmsgid \"\"\n\"Many other types are provided by the std library to support things such as:\"\nmsgstr \"\"\n\"표준 라이브러리는 다음과 같은 것들을 지원하기 위해 많은 다른 타입들을 제공합\"\n\"니다:\"\n\n#: src/std_misc.md:10\nmsgid \"These expand beyond what the [primitives](primitives.md) provide.\"\nmsgstr \"이들은 [기본 자료형](primitives.md)이 제공하는 것 이상으로 확장됩니다.\"\n\n#: src/std_misc/threads.md:3\nmsgid \"\"\n\"Rust provides a mechanism for spawning native OS threads via the `spawn` \"\n\"function, the argument of this function is a moving closure.\"\nmsgstr \"\"\n\"Rust는 `spawn` 함수를 통해 네이티브 OS 스레드를 생성하는 메커니즘을 제공합니\"\n\"다. 이 함수의 인자는 이동(moving) 클로저입니다.\"\n\n#: src/std_misc/threads.md:10 src/std_misc/threads/testcase_mapreduce.md:28\nmsgid \"// This is the `main` thread\\n\"\nmsgstr \"// 메인 스레드입니다\\n\"\n\n#: src/std_misc/threads.md:13\nmsgid \"// Make a vector to hold the children which are spawned.\\n\"\nmsgstr \"// 생성된 자식 스레드들을 담을 벡터를 만듭니다.\\n\"\n\n#: src/std_misc/threads.md:17\nmsgid \"// Spin up another thread\\n\"\nmsgstr \"// 또 다른 스레드를 생성합니다\\n\"\n\n#: src/std_misc/threads.md:19\nmsgid \"\\\"this is thread number {}\\\"\"\nmsgstr \"\\\"이것은 {}번 스레드입니다\\\"\"\n\n#: src/std_misc/threads.md:24\nmsgid \"// Wait for the thread to finish. Returns a result.\\n\"\nmsgstr \"// 스레드가 종료될 때까지 기다립니다. 결과를 반환합니다.\\n\"\n\n#: src/std_misc/threads.md:30\nmsgid \"These threads will be scheduled by the OS.\"\nmsgstr \"이러한 스레드들은 OS에 의해 스케줄링됩니다.\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:3\nmsgid \"\"\n\"Rust makes it very easy to parallelize data processing, without many of the \"\n\"headaches traditionally associated with such an attempt.\"\nmsgstr \"\"\n\"Rust는 전통적으로 이러한 시도와 관련된 많은 골칫거리 없이 데이터 처리를 병렬\"\n\"화하는 것을 매우 쉽게 만들어 줍니다.\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:5\nmsgid \"\"\n\"The standard library provides great threading primitives out of the box. \"\n\"These, combined with Rust's concept of Ownership and aliasing rules, \"\n\"automatically prevent data races.\"\nmsgstr \"\"\n\"표준 라이브러리는 훌륭한 스레딩 프리미티브를 즉시 제공합니다. 이들은 Rust의 \"\n\"소유권 개념 및 에일리어싱 규칙과 결합하여 자동으로 데이터 경합(data races)을 \"\n\"방지합니다.\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:9\nmsgid \"\"\n\"The aliasing rules (one writable reference XOR many readable references) \"\n\"automatically prevent you from manipulating state that is visible to other \"\n\"threads. (Where synchronization is needed, there are synchronization \"\n\"primitives like `Mutex`es or `Channel`s.)\"\nmsgstr \"\"\n\"에일리어싱 규칙(하나의 쓰기 가능 참조 XOR 여러 개의 읽기 가능 참조)은 다른 스\"\n\"레드에 보이는 상태를 조작하는 것을 자동으로 방지합니다. (동기화가 필요한 곳에\"\n\"는 `Mutex`나 `Channel`과 같은 동기화 프리미티브가 있습니다.)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:14\nmsgid \"\"\n\"In this example, we will calculate the sum of all digits in a block of \"\n\"numbers. We will do this by parcelling out chunks of the block into \"\n\"different threads. Each thread will sum its tiny block of digits, and \"\n\"subsequently we will sum the intermediate sums produced by each thread.\"\nmsgstr \"\"\n\"이 예제에서, 우리는 숫자 블록에 있는 모든 숫자의 합을 계산할 것입니다. 블록\"\n\"의 덩어리들을 서로 다른 스레드에 할당하여 이를 수행할 것입니다. 각 스레드는 \"\n\"자신의 작은 숫자 블록의 합을 구하고, 이어서 각 스레드에서 생성된 중간 합계들\"\n\"을 모두 더할 것입니다.\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:19\nmsgid \"\"\n\"Note that, although we're passing references across thread boundaries, Rust \"\n\"understands that we're only passing read-only references, and that thus no \"\n\"unsafety or data races can occur. Also because the references we're passing \"\n\"have `'static` lifetimes, Rust understands that our data won't be destroyed \"\n\"while these threads are still running. (When you need to share non-`static` \"\n\"data between threads, you can use a smart pointer like `Arc` to keep the \"\n\"data alive and avoid non-`static` lifetimes.)\"\nmsgstr \"\"\n\"스레드 경계를 넘어 참조를 전달하고 있지만, Rust는 우리가 읽기 전용 참조만 전\"\n\"달하고 있음을 이해하며, 따라서 안전하지 않은 상황이나 데이터 경합이 발생할 \"\n\"수 없음을 알고 있습니다. 또한 우리가 전달하는 참조들이 `'static` 라이프타임\"\n\"을 가지고 있기 때문에, Rust는 이 스레드들이 실행되는 동안 데이터가 파괴되지 \"\n\"않을 것임을 이해합니다. (스레드 간에 `static`이 아닌 데이터를 공유해야 할 때\"\n\"는 `Arc`와 같은 스마트 포인터를 사용하여 데이터를 유지하고 `static`이 아닌 라\"\n\"이프타임 문제를 피할 수 있습니다.)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:32\nmsgid \"\"\n\"// This is our data to process.\\n\"\n\"    // We will calculate the sum of all digits via a threaded map-reduce \"\n\"algorithm.\\n\"\n\"    // Each whitespace separated chunk will be handled in a different \"\n\"thread.\\n\"\n\"    //\\n\"\n\"    // TODO: see what happens to the output if you insert spaces!\\n\"\nmsgstr \"\"\n\"// 처리할 데이터입니다.\\n\"\n\"    // 스레드된 맵-리듀스(map-reduce) 알고리즘을 통해 모든 숫자의 합을 계산\"\n\"할 것입니다.\\n\"\n\"    // 공백으로 구분된 각 덩어리는 서로 다른 스레드에서 처리될 것입니다.\\n\"\n\"    //\\n\"\n\"    // TODO: 공백을 삽입하면 출력에 어떤 변화가 생기는지 확인해 보세요!\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:37\nmsgid \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\nmsgstr \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:46\nmsgid \"// Make a vector to hold the child-threads which we will spawn.\\n\"\nmsgstr \"// 우리가 생성할 자식 스레드들을 담을 벡터를 만듭니다.\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:49\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Map\\\" phase\\n\"\n\"     *\\n\"\n\"     * Divide our data into segments, and apply initial processing\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Map\\\" 단계\\n\"\n\"     *\\n\"\n\"     * 데이터를 세그먼트로 나누고, 초기 처리를 적용합니다\\n\"\n\"     ************************************************************************/\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:55\nmsgid \"\"\n\"// split our data into segments for individual calculation\\n\"\n\"    // each chunk will be a reference (&str) into the actual data\\n\"\nmsgstr \"\"\n\"// 개별 계산을 위해 데이터를 세그먼트로 나눕니다.\\n\"\n\"// 각 덩어리는 실제 데이터에 대한 참조(&str)가 될 것입니다.\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:59\nmsgid \"\"\n\"// Iterate over the data segments.\\n\"\n\"    // .enumerate() adds the current loop index to whatever is iterated\\n\"\n\"    // the resulting tuple \\\"(index, element)\\\" is then immediately\\n\"\n\"    // \\\"destructured\\\" into two variables, \\\"i\\\" and \\\"data_segment\\\" with \"\n\"a\\n\"\n\"    // \\\"destructuring assignment\\\"\\n\"\nmsgstr \"\"\n\"// 데이터 세그먼트들을 순회합니다.\\n\"\n\"// `.enumerate()`는 순회하는 대상에 현재 루프 인덱스를 추가합니다.\\n\"\n\"// 결과 튜플 \\\"(index, element)\\\"는 \\\"구조 분해 할당\\\"\\n\"\n\"// 을 통해 즉시 두 변수 \\\"i\\\"와 \\\"data_segment\\\"로 \\\"구조 분해\\\"됩니다.\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:65\nmsgid \"\\\"data segment {} is \\\\\\\"{}\\\\\\\"\\\"\"\nmsgstr \"\\\"데이터 세그먼트 {}는 \\\\\\\"{}\\\\\\\"입니다\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:67\nmsgid \"\"\n\"// Process each data segment in a separate thread\\n\"\n\"        //\\n\"\n\"        // spawn() returns a handle to the new thread,\\n\"\n\"        // which we MUST keep to access the returned value\\n\"\n\"        //\\n\"\n\"        // 'move || -> u32' is syntax for a closure that:\\n\"\n\"        // * takes no arguments ('||')\\n\"\n\"        // * takes ownership of its captured variables ('move') and\\n\"\n\"        // * returns an unsigned 32-bit integer ('-> u32')\\n\"\n\"        //\\n\"\n\"        // Rust is smart enough to infer the '-> u32' from\\n\"\n\"        // the closure itself so we could have left that out.\\n\"\n\"        //\\n\"\n\"        // TODO: try removing the 'move' and see what happens\\n\"\nmsgstr \"\"\n\"// 각 데이터 세그먼트를 별도의 스레드에서 처리합니다\\n\"\n\"        //\\n\"\n\"        // spawn()은 새 스레드에 대한 핸들을 반환하며,\\n\"\n\"        // 반환된 값에 접근하려면 이 핸들을 반드시 보관해야 합니다\\n\"\n\"        //\\n\"\n\"        // 'move || -> u32'는 다음과 같은 클로저 문법입니다:\\n\"\n\"        // * 인자를 취하지 않음 ('||')\\n\"\n\"        // * 캡처한 변수의 소유권을 가져옴 ('move')\\n\"\n\"        // * 부호 없는 32비트 정수를 반환함 ('-> u32')\\n\"\n\"        //\\n\"\n\"        // Rust는 클로저 자체에서 '-> u32'를 추론할 수 있을 만큼 영리하므로\\n\"\n\"        // 이를 생략할 수도 있었습니다.\\n\"\n\"        //\\n\"\n\"        // TODO: 'move'를 제거해 보고 어떤 일이 일어나는지 확인해 보세요\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:82\nmsgid \"// Calculate the intermediate sum of this segment:\\n\"\nmsgstr \"// 이 세그먼트의 중간 합계를 계산합니다:\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:84\nmsgid \"// iterate over the characters of our segment..\\n\"\nmsgstr \"// 세그먼트의 문자들을 순회합니다..\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:86\nmsgid \"// .. convert text-characters to their number value..\\n\"\nmsgstr \"// .. 텍스트 문자를 숫자 값으로 변환합니다..\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:87\nmsgid \"\\\"should be a digit\\\"\"\nmsgstr \"\\\"숫자여야 합니다\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:88\nmsgid \"// .. and sum the resulting iterator of numbers\\n\"\nmsgstr \"// .. 그리고 결과 숫지 이터레이터의 합을 구합니다\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:91\nmsgid \"// println! locks stdout, so no text-interleaving occurs\\n\"\nmsgstr \"// println!은 표준 출력을 잠그므로, 텍스트가 서로 섞이지 않습니다\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:92\nmsgid \"\\\"processed segment {}, result={}\\\"\"\nmsgstr \"\\\"세그먼트 {} 처리됨, 결과={}\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:94\nmsgid \"\"\n\"// \\\"return\\\" not needed, because Rust is an \\\"expression language\\\", the\\n\"\n\"            // last evaluated expression in each block is automatically its \"\n\"value.\\n\"\nmsgstr \"\"\n\"// Rust는 \\\"표현식 언어\\\"이므로 \\\"return\\\"이 필요하지 않습니다.\\n\"\n\"            // 각 블록에서 마지막으로 평가된 표현식이 자동으로 그 값이 됩니\"\n\"다.\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:102\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Reduce\\\" phase\\n\"\n\"     *\\n\"\n\"     * Collect our intermediate results, and combine them into a final \"\n\"result\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Reduce\\\" 단계\\n\"\n\"     *\\n\"\n\"     * 중간 결과들을 수집하여 최종 결과로 결합합니다\\n\"\n\"     ************************************************************************/\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:108\nmsgid \"\"\n\"// combine each thread's intermediate results into a single final sum.\\n\"\n\"    //\\n\"\n\"    // we use the \\\"turbofish\\\" ::<> to provide sum() with a type hint.\\n\"\n\"    //\\n\"\n\"    // TODO: try without the turbofish, by instead explicitly\\n\"\n\"    // specifying the type of final_result\\n\"\nmsgstr \"\"\n\"// 각 스레드의 중간 결과들을 하나의 최종 합계로 결합합니다.\\n\"\n\"//\\n\"\n\"// `sum()`에 타입 힌트를 제공하기 위해 \\\"터보피쉬(turbofish)\\\" `::<>`를 사용\"\n\"합니다.\\n\"\n\"//\\n\"\n\"// TODO: 터보피쉬 대신 `final_result`의 타입을 명시적으로 지정하여 시도해 보\"\n\"세요\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:116\nmsgid \"\\\"Final sum result: {}\\\"\"\nmsgstr \"\\\"최종 합계 결과: {}\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:120\nmsgid \"Assignments\"\nmsgstr \"과제\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:122\nmsgid \"\"\n\"It is not wise to let our number of threads depend on user inputted data. \"\n\"What if the user decides to insert a lot of spaces? Do we _really_ want to \"\n\"spawn 2,000 threads? Modify the program so that the data is always chunked \"\n\"into a limited number of chunks, defined by a static constant at the \"\n\"beginning of the program.\"\nmsgstr \"\"\n\"스레드 개수가 사용자 입력 데이터에 의존하게 하는 것은 현명하지 않습니다. 사용\"\n\"자가 많은 공백을 삽입하기로 한다면 어떨까요? 정말로 2,000개의 스레드를 생성하\"\n\"고 싶으신가요? 프로그램 시작 부분에 정의된 정적 상수에 따라 데이터가 항상 제\"\n\"한된 개수의 덩어리로 나뉘도록 프로그램을 수정해 보세요.\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:129\nmsgid \"[Threads](../threads.md)\"\nmsgstr \"[스레드](../threads.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:130\nmsgid \"[vectors](../../std/vec.md) and [iterators](../../trait/iter.md)\"\nmsgstr \"[벡터](../../std/vec.md)와 [이터레이터](../../trait/iter.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:131\nmsgid \"\"\n\"[closures](../../fn/closures.md), [move](../../scope/move.md) semantics and \"\n\"[`move` closures](https://doc.rust-lang.org/book/ch13-01-\"\n\"closures.html#closures-can-capture-their-environment)\"\nmsgstr \"\"\n\"[클로저](../../fn/closures.md), [이동(move)](../../scope/move.md) 의미론 및 \"\n\"[`move` 클로저](https://doc.rust-lang.org/book/ch13-01-\"\n\"closures.html#closures-can-capture-their-environment)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:132\nmsgid \"\"\n\"[destructuring](https://doc.rust-lang.org/book/ch18-03-pattern-\"\n\"syntax.html#destructuring-to-break-apart-values) assignments\"\nmsgstr \"\"\n\"[구조 분해(destructuring)](https://doc.rust-lang.org/book/ch18-03-pattern-\"\n\"syntax.html#destructuring-to-break-apart-values) 할당\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:133\nmsgid \"\"\n\"[turbofish notation](https://doc.rust-lang.org/book/appendix-02-\"\n\"operators.html?highlight=turbofish) to help type inference\"\nmsgstr \"\"\n\"타입 추론을 돕기 위한 [터보피쉬 표기법](https://doc.rust-lang.org/book/\"\n\"appendix-02-operators.html?highlight=turbofish)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:134\nmsgid \"[unwrap vs. expect](../../error/option_unwrap.md)\"\nmsgstr \"[unwrap vs. expect](../../error/option_unwrap.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:135\nmsgid \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\nmsgstr \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\n\n#: src/std_misc/channels.md:3\nmsgid \"\"\n\"Rust provides asynchronous `channels` for communication between threads. \"\n\"Channels allow a unidirectional flow of information between two end-points: \"\n\"the `Sender` and the `Receiver`.\"\nmsgstr \"\"\n\"Rust는 스레드 간 통신을 위한 비동기 `채널(channels)`을 제공합니다. 채널은 \"\n\"`Sender`와 `Receiver`라는 두 끝점 사이에서 정보의 단방향 흐름을 가능하게 합니\"\n\"다.\"\n\n#: src/std_misc/channels.md:15\nmsgid \"\"\n\"// Channels have two endpoints: the `Sender<T>` and the `Receiver<T>`,\\n\"\n\"    // where `T` is the type of the message to be transferred\\n\"\n\"    // (type annotation is superfluous)\\n\"\nmsgstr \"\"\n\"// 채널에는 두 끝점이 있습니다: `Sender<T>`와 `Receiver<T>`.\\n\"\n\"// 여기서 `T`는 전송될 메시지의 타입입니다\\n\"\n\"// (타입 어노테이션은 불필요합니다)\\n\"\n\n#: src/std_misc/channels.md:22\nmsgid \"// The sender endpoint can be copied\\n\"\nmsgstr \"// 발신자(sender) 끝점은 복사될 수 있습니다\\n\"\n\n#: src/std_misc/channels.md:25\nmsgid \"// Each thread will send its id via the channel\\n\"\nmsgstr \"// 각 스레드는 채널을 통해 자신의 id를 보낼 것입니다\\n\"\n\n#: src/std_misc/channels.md:27\nmsgid \"\"\n\"// The thread takes ownership over `thread_tx`\\n\"\n\"            // Each thread queues a message in the channel\\n\"\nmsgstr \"\"\n\"// 스레드가 `thread_tx`에 대한 소유권을 가져갑니다\\n\"\n\"// 각 스레드는 채널에 메시지를 큐에 넣습니다\\n\"\n\n#: src/std_misc/channels.md:31\nmsgid \"\"\n\"// Sending is a non-blocking operation, the thread will continue\\n\"\n\"            // immediately after sending its message\\n\"\nmsgstr \"\"\n\"// 보내기는 비차단(non-blocking) 연산이므로, 스레드는\\n\"\n\"// 메시지를 보낸 직후 계속 실행됩니다\\n\"\n\n#: src/std_misc/channels.md:33\nmsgid \"\\\"thread {} finished\\\"\"\nmsgstr \"\\\"{}번 스레드 종료\\\"\"\n\n#: src/std_misc/channels.md:39\nmsgid \"// Here, all the messages are collected\\n\"\nmsgstr \"// 여기서 모든 메시지가 수집됩니다\\n\"\n\n#: src/std_misc/channels.md:42\nmsgid \"\"\n\"// The `recv` method picks a message from the channel\\n\"\n\"        // `recv` will block the current thread if there are no messages \"\n\"available\\n\"\nmsgstr \"\"\n\"// `recv` 메서드는 채널에서 메시지를 하나 꺼냅니다\\n\"\n\"// `recv`는 사용 가능한 메시지가 없으면 현재 스레드를 차단(block)합니다\\n\"\n\n#: src/std_misc/channels.md:47\nmsgid \"// Wait for the threads to complete any remaining work\\n\"\nmsgstr \"// 스레드들이 남은 작업을 모두 완료할 때까지 기다립니다\\n\"\n\n#: src/std_misc/channels.md:49\nmsgid \"\\\"oops! the child thread panicked\\\"\"\nmsgstr \"\\\"이런! 자식 스레드에서 패닉이 발생했습니다\\\"\"\n\n#: src/std_misc/channels.md:52\nmsgid \"// Show the order in which the messages were sent\\n\"\nmsgstr \"// 메시지가 전송된 순서를 보여줍니다\\n\"\n\n#: src/std_misc/path.md:3\nmsgid \"\"\n\"The `Path` type represents file paths in the underlying filesystem. Across \"\n\"all platforms there is a single `std::path::Path` that abstracts over \"\n\"platform-specific path semantics and separators. Bring it into scope with \"\n\"`use std::path::Path;` when needed.\"\nmsgstr \"\"\n\"`Path` 타입은 기저 파일 시스템의 파일 경로를 나타냅니다. 모든 플랫폼에 걸쳐 \"\n\"플랫폼별 경로 의미론과 구분자를 추상화하는 단일 `std::path::Path`가 존재합니\"\n\"다. 필요할 때 `use std::path::Path;`를 사용하여 스코프로 가져오세요.\"\n\n#: src/std_misc/path.md:8\nmsgid \"\"\n\"A `Path` can be created from an `OsStr`, and provides several methods to get \"\n\"information from the file/directory the path points to.\"\nmsgstr \"\"\n\"`Path`는 `OsStr`로부터 생성될 수 있으며, 경로가 가리키는 파일/디렉터리로부터 \"\n\"정보를 얻기 위한 여러 메서드를 제공합니다.\"\n\n#: src/std_misc/path.md:11\nmsgid \"\"\n\"A `Path` is immutable. The owned version of `Path` is `PathBuf`. The \"\n\"relation between `Path` and `PathBuf` is similar to that of `str` and \"\n\"`String`: a `PathBuf` can be mutated in-place, and can be dereferenced to a \"\n\"`Path`.\"\nmsgstr \"\"\n\"`Path`는 불변(immutable)입니다. `Path`의 소유형(owned) 버전은 `PathBuf`입니\"\n\"다. `Path`와 `PathBuf`의 관계는 `str`과 `String`의 관계와 유사합니다. \"\n\"`PathBuf`는 그 자리에서 수정될 수 있으며, `Path`로 역참조(dereference)될 수 \"\n\"있습니다.\"\n\n#: src/std_misc/path.md:15\nmsgid \"\"\n\"Note that a `Path` is _not_ internally represented as an UTF-8 string, but \"\n\"instead is stored as an `OsString`. Therefore, converting a `Path` to a \"\n\"`&str` is _not_ free and may fail (an `Option` is returned). However, a \"\n\"`Path` can be freely converted to an `OsString` or `&OsStr` using \"\n\"`into_os_string` and `as_os_str`, respectively.\"\nmsgstr \"\"\n\"`Path`는 내부적으로 UTF-8 문자열로 표현되지 않고, 대신 `OsString`으로 저장됩\"\n\"니다. 따라서 `Path`를 `&str`로 변환하는 것은 비용이 들며 실패할 수도 있습니다\"\n\"(`Option`이 반환됩니다). 하지만 `Path`는 각각 `into_os_string`과 `as_os_str`\"\n\"을 사용하여 `OsString`이나 `&OsStr`로 자유롭게 변환될 수 있습니다.\"\n\n#: src/std_misc/path.md:25\nmsgid \"// Create a `Path` from an `&'static str`\\n\"\nmsgstr \"// &'static str로부터 Path를 생성합니다\\n\"\n\n#: src/std_misc/path.md:26\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/std_misc/path.md:28\nmsgid \"// The `display` method returns a `Display`able structure\\n\"\nmsgstr \"// `display` 메서드는 `Display` 가능한 구조체를 반환합니다\\n\"\n\n#: src/std_misc/path.md:31\nmsgid \"\"\n\"// `join` merges a path with a byte container using the OS specific\\n\"\n\"    // separator, and returns a `PathBuf`\\n\"\nmsgstr \"\"\n\"// `join`은 OS 전용 구분자를 사용하여 경로를 바이트 컨테이너와 병합하고, \"\n\"`PathBuf`를 반환합니다.\\n\"\n\n#: src/std_misc/path.md:35\nmsgid \"// `push` extends the `PathBuf` with a `&Path`\\n\"\nmsgstr \"// `push`는 `PathBuf`를 `&Path`로 확장합니다\\n\"\n\n#: src/std_misc/path.md:37\nmsgid \"\\\"myfile.tar.gz\\\"\"\nmsgstr \"\\\"myfile.tar.gz\\\"\"\n\n#: src/std_misc/path.md:39\nmsgid \"// `set_file_name` updates the file name of the `PathBuf`\\n\"\nmsgstr \"// `set_file_name`은 `PathBuf`의 파일 이름을 업데이트합니다\\n\"\n\n#: src/std_misc/path.md:40\nmsgid \"\\\"package.tgz\\\"\"\nmsgstr \"\\\"package.tgz\\\"\"\n\n#: src/std_misc/path.md:42\nmsgid \"// Convert the `PathBuf` into a string slice\\n\"\nmsgstr \"// `PathBuf`를 문자열 슬라이스로 변환합니다\\n\"\n\n#: src/std_misc/path.md:44\nmsgid \"\\\"new path is not a valid UTF-8 sequence\\\"\"\nmsgstr \"\\\"새 경로가 유효한 UTF-8 시퀀스가 아닙니다\\\"\"\n\n#: src/std_misc/path.md:45\nmsgid \"\\\"new path is {}\\\"\"\nmsgstr \"\\\"새 경로는 {}입니다\\\"\"\n\n#: src/std_misc/path.md:50\nmsgid \"Be sure to check other `Path` methods and the `Metadata` struct.\"\nmsgstr \"다른 `Path` 메서드들과 `Metadata` 구조체도 반드시 확인해 보세요.\"\n\n#: src/std_misc/path.md:54\nmsgid \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html).\"\nmsgstr \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html)와 [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html).\"\n\n#: src/std_misc/file.md:3\nmsgid \"\"\n\"The `File` struct represents a file that has been opened (it wraps a file \"\n\"descriptor), and gives read and/or write access to the underlying file.\"\nmsgstr \"\"\n\"`File` 구조체는 열려 있는 파일을 나타내며(파일 디스크립터를 감쌉니다), 기저 \"\n\"파일에 대해 읽기 및/또는 쓰기 접근 권한을 제공합니다.\"\n\n#: src/std_misc/file.md:6\nmsgid \"\"\n\"Since many things can go wrong when doing file I/O, all the `File` methods \"\n\"return the `io::Result<T>` type, which is an alias for `Result<T, \"\n\"io::Error>`.\"\nmsgstr \"\"\n\"파일 입출력을 수행할 때는 많은 것들이 잘못될 수 있으므로, 모든 `File` 메서드\"\n\"는 `Result<T, io::Error>`의 별칭인 `io::Result<T>` 타입을 반환합니다.\"\n\n#: src/std_misc/file.md:9\nmsgid \"\"\n\"This makes the failure of all I/O operations _explicit_. Thanks to this, the \"\n\"programmer can see all the failure paths, and is encouraged to handle them \"\n\"in a proactive manner.\"\nmsgstr \"\"\n\"이는 모든 입출력 연산의 실패를 *명시적*으로 만듭니다. 덕분에 프로그래머는 모\"\n\"든 실패 경로를 확인할 수 있으며, 이를 적극적인 방식으로 처리하도록 권장됩니\"\n\"다.\"\n\n#: src/std_misc/file/open.md:3\nmsgid \"The `open` function can be used to open a file in read-only mode.\"\nmsgstr \"`open` 함수는 파일을 읽기 전용 모드로 여는 데 사용될 수 있습니다.\"\n\n#: src/std_misc/file/open.md:5\nmsgid \"\"\n\"A `File` owns a resource, the file descriptor and takes care of closing the \"\n\"file when it is `drop`ed.\"\nmsgstr \"\"\n\"`File`은 리소스인 파일 디스크립터를 소유하며, `drop`될 때 파일을 닫는 것을 책\"\n\"임집니다.\"\n\n#: src/std_misc/file/open.md:14\nmsgid \"// Create a path to the desired file\\n\"\nmsgstr \"// 원하는 파일에 대한 경로를 생성합니다\\n\"\n\n#: src/std_misc/file/open.md:15\nmsgid \"\\\"hello.txt\\\"\"\nmsgstr \"\\\"hello.txt\\\"\"\n\n#: src/std_misc/file/open.md:18\nmsgid \"// Open the path in read-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"// 경로를 읽기 전용 모드로 엽니다. `io::Result<File>`을 반환합니다\\n\"\n\n#: src/std_misc/file/open.md:20\nmsgid \"\\\"couldn't open {}: {}\\\"\"\nmsgstr \"\\\"{}를 열 수 없습니다: {}\\\"\"\n\n#: src/std_misc/file/open.md:24\nmsgid \"// Read the file contents into a string, returns `io::Result<usize>`\\n\"\nmsgstr \"// 파일 내용을 문자열로 읽어옵니다. `io::Result<usize>`를 반환합니다\\n\"\n\n#: src/std_misc/file/open.md:27\nmsgid \"\\\"couldn't read {}: {}\\\"\"\nmsgstr \"\\\"{}를 읽을 수 없습니다: {}\\\"\"\n\n#: src/std_misc/file/open.md:28\nmsgid \"\\\"{} contains:\\\\n{}\\\"\"\nmsgstr \"\\\"{}의 내용:\\\\n{}\\\"\"\n\n#: src/std_misc/file/open.md:31\nmsgid \"// `file` goes out of scope, and the \\\"hello.txt\\\" file gets closed\\n\"\nmsgstr \"// `file`이 스코프를 벗어나고, \\\"hello.txt\\\" 파일이 닫힙니다\\n\"\n\n#: src/std_misc/file/open.md:35 src/std_misc/file/create.md:39\n#: src/std_misc/fs.md:108\nmsgid \"Here's the expected successful output:\"\nmsgstr \"예상되는 성공적인 출력 결과는 다음과 같습니다:\"\n\n#: src/std_misc/file/open.md:37\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt contains:\\n\"\n\"Hello World!\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt의 내용:\\n\"\n\"Hello World!\\n\"\n\"```\"\n\n#: src/std_misc/file/open.md:44\nmsgid \"\"\n\"(You are encouraged to test the previous example under different failure \"\n\"conditions: `hello.txt` doesn't exist, or `hello.txt` is not readable, etc.)\"\nmsgstr \"\"\n\"(이전 예제를 `hello.txt`가 존재하지 않거나, 읽기 권한이 없는 등 다양한 실패 \"\n\"조건에서 테스트해 보시길 권장합니다.)\"\n\n#: src/std_misc/file/create.md:3\nmsgid \"\"\n\"The `create` function opens a file in write-only mode. If the file already \"\n\"existed, the old content is destroyed. Otherwise, a new file is created.\"\nmsgstr \"\"\n\"`create` 함수는 파일을 쓰기 전용 모드로 엽니다. 파일이 이미 존재한다면 이전 \"\n\"내용은 파괴됩니다. 그렇지 않으면 새로운 파일이 생성됩니다.\"\n\n#: src/std_misc/file/create.md:9\nmsgid \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\nmsgstr \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\n\n#: src/std_misc/file/create.md:22\nmsgid \"\\\"lorem_ipsum.txt\\\"\"\nmsgstr \"\\\"lorem_ipsum.txt\\\"\"\n\n#: src/std_misc/file/create.md:25\nmsgid \"// Open a file in write-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"// 파일을 쓰기 전용 모드로 엽니다. `io::Result<File>`을 반환합니다\\n\"\n\n#: src/std_misc/file/create.md:27\nmsgid \"\\\"couldn't create {}: {}\\\"\"\nmsgstr \"\\\"{}를 생성할 수 없습니다: {}\\\"\"\n\n#: src/std_misc/file/create.md:31\nmsgid \"// Write the `LOREM_IPSUM` string to `file`, returns `io::Result<()>`\\n\"\nmsgstr \"\"\n\"// `LOREM_IPSUM` 문자열을 `file`에 씁니다. `io::Result<()>`를 반환합니다\\n\"\n\n#: src/std_misc/file/create.md:33\nmsgid \"\\\"couldn't write to {}: {}\\\"\"\nmsgstr \"\\\"{}에 쓸 수 없습니다: {}\\\"\"\n\n#: src/std_misc/file/create.md:34\nmsgid \"\\\"successfully wrote to {}\\\"\"\nmsgstr \"\\\"{}에 성공적으로 썼습니다\\\"\"\n\n#: src/std_misc/file/create.md:54\nmsgid \"\"\n\"(As in the previous example, you are encouraged to test this example under \"\n\"failure conditions.)\"\nmsgstr \"\"\n\"(이전 예제와 마찬가지로, 이 예제를 실패 조건에서 테스트해 보시길 권장합니다.)\"\n\n#: src/std_misc/file/create.md:57\nmsgid \"\"\n\"The [`OpenOptions`](https://doc.rust-lang.org/std/fs/\"\n\"struct.OpenOptions.html) struct can be used to configure how a file is \"\n\"opened.\"\nmsgstr \"\"\n\"[`OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html) 구\"\n\"조체는 파일이 열리는 방식을 구성하는 데 사용될 수 있습니다.\"\n\n#: src/std_misc/file/read_lines.md:3\nmsgid \"A naive approach\"\nmsgstr \"단순한 접근 방식\"\n\n#: src/std_misc/file/read_lines.md:5\nmsgid \"\"\n\"This might be a reasonable first attempt for a beginner's first \"\n\"implementation for reading lines from a file.\"\nmsgstr \"\"\n\"이는 초보자가 파일에서 줄을 읽기 위해 처음 시도해 볼 만한 합리적인 방식일 수 \"\n\"있습니다.\"\n\n#: src/std_misc/file/read_lines.md:22\nmsgid \"\"\n\"Since the method `lines()` returns an iterator over the lines in the file, \"\n\"we can also perform a map inline and collect the results, yielding a more \"\n\"concise and fluent expression.\"\nmsgstr \"\"\n\"`lines()` 메서드가 파일의 줄들에 대한 이터레이터를 반환하므로, 인라인에서 \"\n\"`map`을 수행하고 결과를 `collect`하여 더 간결하고 유려한 표현식을 만들 수도 \"\n\"있습니다.\"\n\n#: src/std_misc/file/read_lines.md:31\nmsgid \"// panic on possible file-reading errors\\n\"\nmsgstr \"// 발생 가능한 파일 읽기 에러에 대해 패닉을 일으킵니다\\n\"\n\n#: src/std_misc/file/read_lines.md:32\nmsgid \"// split the string into an iterator of string slices\\n\"\nmsgstr \"// 문자열을 문자열 슬라이스 이터레이터로 분할합니다\\n\"\n\n#: src/std_misc/file/read_lines.md:33\nmsgid \"// make each slice into a string\\n\"\nmsgstr \"// 각 슬라이스를 String으로 만듭니다\\n\"\n\n#: src/std_misc/file/read_lines.md:34\nmsgid \"// gather them together into a vector\\n\"\nmsgstr \"// 이들을 벡터로 모읍니다\\n\"\n\n#: src/std_misc/file/read_lines.md:38\nmsgid \"\"\n\"Note that in both examples above, we must convert the `&str` reference \"\n\"returned from `lines()` to the owned type `String`, using `.to_string()` and \"\n\"`String::from` respectively.\"\nmsgstr \"\"\n\"위의 두 예제 모두에서, `lines()`가 반환한 `&str` 참조를 `.to_string()` 또는 \"\n\"`String::from`을 사용하여 소유형인 `String`으로 변환해야 한다는 점에 유의하세\"\n\"요.\"\n\n#: src/std_misc/file/read_lines.md:42\nmsgid \"A more efficient approach\"\nmsgstr \"더 효율적인 접근 방식\"\n\n#: src/std_misc/file/read_lines.md:44\nmsgid \"\"\n\"Here we pass ownership of the open `File` to a `BufReader` struct. \"\n\"`BufReader` uses an internal buffer to reduce intermediate allocations.\"\nmsgstr \"\"\n\"여기서는 열려 있는 `File`의 소유권을 `BufReader` 구조체로 넘깁니다. \"\n\"`BufReader`는 내부 버퍼를 사용하여 중간 할당을 줄입니다.\"\n\n#: src/std_misc/file/read_lines.md:47\nmsgid \"\"\n\"We also update `read_lines` to return an iterator instead of allocating new \"\n\"`String` objects in memory for each line.\"\nmsgstr \"\"\n\"또한 각 줄마다 메모리에 새로운 `String` 객체를 할당하는 대신 이터레이터를 반\"\n\"환하도록 `read_lines`를 업데이트합니다.\"\n\n#: src/std_misc/file/read_lines.md:56\nmsgid \"// File hosts.txt must exist in the current path\\n\"\nmsgstr \"// hosts.txt 파일이 현재 경로에 존재해야 합니다\\n\"\n\n#: src/std_misc/file/read_lines.md:57\nmsgid \"\\\"./hosts.txt\\\"\"\nmsgstr \"\\\"./hosts.txt\\\"\"\n\n#: src/std_misc/file/read_lines.md:58\nmsgid \"// Consumes the iterator, returns an (Optional) String\\n\"\nmsgstr \"// 이터레이터를 소비하여, (선택적인) String을 반환합니다\\n\"\n\n#: src/std_misc/file/read_lines.md:64\nmsgid \"\"\n\"// The output is wrapped in a Result to allow matching on errors.\\n\"\n\"// Returns an Iterator to the Reader of the lines of the file.\\n\"\nmsgstr \"\"\n\"// 에러에 대한 매칭이 가능하도록 출력을 `Result`로 감쌉니다.\\n\"\n\"// 파일의 각 줄을 읽어오는 이터레이터를 반환합니다.\\n\"\n\n#: src/std_misc/file/read_lines.md:74\nmsgid \"Running this program simply prints the lines individually.\"\nmsgstr \"이 프로그램을 실행하면 단순히 각 줄을 개별적으로 출력합니다.\"\n\n#: src/std_misc/file/read_lines.md:76\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\n\n#: src/std_misc/file/read_lines.md:83\nmsgid \"\"\n\"(Note that since `File::open` expects a generic `AsRef<Path>` as argument, \"\n\"we define our generic `read_lines()` method with the same generic \"\n\"constraint, using the `where` keyword.)\"\nmsgstr \"\"\n\"(`File::open`이 인자로 제네릭 `AsRef<Path>`를 요구하므로, 우리의 제네릭 \"\n\"`read_lines()` 메서드도 `where` 키워드를 사용하여 동일한 제네릭 제약 조건을 \"\n\"정의한다는 점에 유의하세요.)\"\n\n#: src/std_misc/file/read_lines.md:86\nmsgid \"\"\n\"This process is more efficient than creating a `String` in memory with all \"\n\"of the file's contents. This can especially cause performance issues when \"\n\"working with larger files.\"\nmsgstr \"\"\n\"이 과정은 파일의 모든 내용을 메모리에 `String`으로 생성하는 것보다 효율적입니\"\n\"다. 특히 대용량 파일을 다룰 때 메모리에 모두 올리는 방식은 성능 문제를 일으\"\n\"킬 수 있습니다.\"\n\n#: src/std_misc/process.md:3\nmsgid \"\"\n\"The `process::Output` struct represents the output of a finished child \"\n\"process, and the `process::Command` struct is a process builder.\"\nmsgstr \"\"\n\"`process::Output` 구조체는 종료된 자식 프로세스의 출력을 나타내며, \"\n\"`process::Command` 구조체는 프로세스 빌더입니다.\"\n\n#: src/std_misc/process.md:10\nmsgid \"\\\"rustc\\\"\"\nmsgstr \"\\\"rustc\\\"\"\n\n#: src/std_misc/process.md:11\nmsgid \"\\\"--version\\\"\"\nmsgstr \"\\\"--version\\\"\"\n\n#: src/std_misc/process.md:13\nmsgid \"\\\"failed to execute process: {}\\\"\"\nmsgstr \"\\\"프로세스 실행 실패: {}\\\"\"\n\n#: src/std_misc/process.md:19\nmsgid \"\\\"rustc succeeded and stdout was:\\\\n{}\\\"\"\nmsgstr \"\\\"rustc가 성공했으며 표준 출력은 다음과 같습니다:\\\\n{}\\\"\"\n\n#: src/std_misc/process.md:23\nmsgid \"\\\"rustc failed and stderr was:\\\\n{}\\\"\"\nmsgstr \"\\\"rustc가 실패했으며 표준 에러는 다음과 같습니다:\\\\n{}\\\"\"\n\n#: src/std_misc/process.md:28\nmsgid \"\"\n\"(You are encouraged to try the previous example with an incorrect flag \"\n\"passed to `rustc`)\"\nmsgstr \"\"\n\"(이전 예제에서 `rustc`에 잘못된 플래그를 전달하여 시도해 보시길 권장합니다.)\"\n\n#: src/std_misc/process/pipe.md:3\nmsgid \"\"\n\"The `std::process::Child` struct represents a child process, and exposes the \"\n\"`stdin`, `stdout` and `stderr` handles for interaction with the underlying \"\n\"process via pipes.\"\nmsgstr \"\"\n\"`std::process::Child` 구조체는 자식 프로세스를 나타내며, 파이프를 통해 기저 \"\n\"프로세스와 상호작용하기 위한 `stdin`, `stdout`, `stderr` 핸들을 노출합니다.\"\n\n#: src/std_misc/process/pipe.md:11\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\nmsgstr \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\n\n#: src/std_misc/process/pipe.md:15\nmsgid \"// Spawn the `wc` command\\n\"\nmsgstr \"// `wc` 명령어를 실행(spawn)합니다\\n\"\n\n#: src/std_misc/process/pipe.md:16 src/std_misc/fs.md:12 src/std_misc/fs.md:73\n#: src/std_misc/ffi.md:11\nmsgid \"\\\"windows\\\"\"\nmsgstr \"\\\"windows\\\"\"\n\n#: src/std_misc/process/pipe.md:17\nmsgid \"\\\"powershell\\\"\"\nmsgstr \"\\\"powershell\\\"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"-Command\\\"\"\nmsgstr \"\\\"-Command\\\"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\nmsgstr \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\n\n#: src/std_misc/process/pipe.md:21\nmsgid \"\\\"wc\\\"\"\nmsgstr \"\\\"wc\\\"\"\n\n#: src/std_misc/process/pipe.md:27\nmsgid \"\\\"couldn't spawn wc: {}\\\"\"\nmsgstr \"\\\"wc를 실행할 수 없습니다: {}\\\"\"\n\n#: src/std_misc/process/pipe.md:31\nmsgid \"\"\n\"// Write a string to the `stdin` of `wc`.\\n\"\n\"    //\\n\"\n\"    // `stdin` has type `Option<ChildStdin>`, but since we know this \"\n\"instance\\n\"\n\"    // must have one, we can directly `unwrap` it.\\n\"\nmsgstr \"\"\n\"// `wc`의 표준 입력(stdin)에 문자열을 씁니다.\\n\"\n\"//\\n\"\n\"// `stdin`은 `Option<ChildStdin>` 타입이지만, 이 인스턴스에는 반드시\\n\"\n\"// 존재한다는 것을 알고 있으므로 직접 `unwrap`할 수 있습니다.\\n\"\n\n#: src/std_misc/process/pipe.md:36\nmsgid \"\\\"couldn't write to wc stdin: {}\\\"\"\nmsgstr \"\\\"wc의 표준 입력에 쓸 수 없습니다: {}\\\"\"\n\n#: src/std_misc/process/pipe.md:37\nmsgid \"\\\"sent pangram to wc\\\"\"\nmsgstr \"\\\"wc에 팬그램을 보냈습니다\\\"\"\n\n#: src/std_misc/process/pipe.md:40\nmsgid \"\"\n\"// Because `stdin` does not live after the above calls, it is `drop`ed,\\n\"\n\"    // and the pipe is closed.\\n\"\n\"    //\\n\"\n\"    // This is very important, otherwise `wc` wouldn't start processing the\\n\"\n\"    // input we just sent.\\n\"\nmsgstr \"\"\n\"// 위의 호출 이후에는 `stdin`이 더 이상 살아있지 않으므로 `drop`되고,\\n\"\n\"// 파이프가 닫힙니다.\\n\"\n\"//\\n\"\n\"// 이는 매우 중요합니다. 그렇지 않으면 `wc`가 우리가 보낸 입력을\\n\"\n\"// 처리하기 시작하지 않을 것이기 때문입니다.\\n\"\n\n#: src/std_misc/process/pipe.md:46\nmsgid \"\"\n\"// The `stdout` field also has type `Option<ChildStdout>` so must be \"\n\"unwrapped.\\n\"\nmsgstr \"\"\n\"// `stdout` 필드도 `Option<ChildStdout>` 타입이므로 `unwrap`해야 합니다.\\n\"\n\n#: src/std_misc/process/pipe.md:49\nmsgid \"\\\"couldn't read wc stdout: {}\\\"\"\nmsgstr \"\\\"wc의 표준 출력을 읽을 수 없습니다: {}\\\"\"\n\n#: src/std_misc/process/pipe.md:50\nmsgid \"\\\"wc responded with:\\\\n{}\\\"\"\nmsgstr \"\\\"wc의 응답:\\\\n{}\\\"\"\n\n#: src/std_misc/process/wait.md:3\nmsgid \"\"\n\"If you'd like to wait for a `process::Child` to finish, you must call \"\n\"`Child::wait`, which will return a `process::ExitStatus`.\"\nmsgstr \"\"\n\"`process::Child`가 종료될 때까지 기다리려면 `Child::wait`를 호출해야 하며, 이\"\n\"는 `process::ExitStatus`를 반환합니다.\"\n\n#: src/std_misc/process/wait.md:10\nmsgid \"\\\"sleep\\\"\"\nmsgstr \"\\\"sleep\\\"\"\n\n#: src/std_misc/process/wait.md:13\nmsgid \"\\\"reached end of main\\\"\"\nmsgstr \"\\\"메인의 끝에 도달함\\\"\"\n\n#: src/std_misc/process/wait.md:18\nmsgid \"\"\n\"# `wait` keeps running for 5 seconds until the `sleep 5` command finishes\\n\"\nmsgstr \"# `wait`는 `sleep 5` 명령어가 끝날 때까지 5초 동안 계속 실행됩니다\\n\"\n\n#: src/std_misc/fs.md:3\nmsgid \"\"\n\"The `std::fs` module contains several functions that deal with the \"\n\"filesystem.\"\nmsgstr \"`std::fs` 모듈은 파일 시스템을 다루는 여러 함수들을 포함하고 있습니다.\"\n\n#: src/std_misc/fs.md:10 src/std_misc/fs.md:68 src/std_misc/ffi.md:20\nmsgid \"\\\"unix\\\"\"\nmsgstr \"\\\"unix\\\"\"\n\n#: src/std_misc/fs.md:15\nmsgid \"// A simple implementation of `% cat path`\\n\"\nmsgstr \"// `% cat path`를 간단히 구현한 것\\n\"\n\n#: src/std_misc/fs.md:25\nmsgid \"// A simple implementation of `% echo s > path`\\n\"\nmsgstr \"// `% echo s > path`를 간단히 구현한 것\\n\"\n\n#: src/std_misc/fs.md:32\nmsgid \"// A simple implementation of `% touch path` (ignores existing files)\\n\"\nmsgstr \"// `% touch path`를 간단히 구현한 것 (기존 파일은 무시함)\\n\"\n\n#: src/std_misc/fs.md:42\nmsgid \"\\\"`mkdir a`\\\"\"\nmsgstr \"\\\"`mkdir a`\\\"\"\n\n#: src/std_misc/fs.md:43\nmsgid \"// Create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 디렉터리를 생성합니다. `io::Result<()>`를 반환합니다\\n\"\n\n#: src/std_misc/fs.md:45 src/std_misc/fs.md:52 src/std_misc/fs.md:58\n#: src/std_misc/fs.md:63 src/std_misc/fs.md:70 src/std_misc/fs.md:75\n#: src/std_misc/fs.md:81 src/std_misc/fs.md:88 src/std_misc/fs.md:97\n#: src/std_misc/fs.md:103\nmsgid \"\\\"! {:?}\\\"\"\nmsgstr \"\\\"! {:?}\\\"\"\n\n#: src/std_misc/fs.md:49\nmsgid \"\\\"`echo hello > a/b.txt`\\\"\"\nmsgstr \"\\\"`echo hello > a/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:50\nmsgid \"\"\n\"// The previous match can be simplified using the `unwrap_or_else` method\\n\"\nmsgstr \"\"\n\"// 이전의 `match`는 `unwrap_or_else` 메서드를 사용하여 단순화될 수 있습니다\\n\"\n\n#: src/std_misc/fs.md:51\nmsgid \"\\\"a/b.txt\\\"\"\nmsgstr \"\\\"a/b.txt\\\"\"\n\n#: src/std_misc/fs.md:55\nmsgid \"\\\"`mkdir -p a/c/d`\\\"\"\nmsgstr \"\\\"`mkdir -p a/c/d`\\\"\"\n\n#: src/std_misc/fs.md:56\nmsgid \"// Recursively create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 디렉터리를 재귀적으로 생성합니다. `io::Result<()>`를 반환합니다\\n\"\n\n#: src/std_misc/fs.md:57 src/std_misc/fs.md:102\nmsgid \"\\\"a/c/d\\\"\"\nmsgstr \"\\\"a/c/d\\\"\"\n\n#: src/std_misc/fs.md:61\nmsgid \"\\\"`touch a/c/e.txt`\\\"\"\nmsgstr \"\\\"`touch a/c/e.txt`\\\"\"\n\n#: src/std_misc/fs.md:62 src/std_misc/fs.md:96\nmsgid \"\\\"a/c/e.txt\\\"\"\nmsgstr \"\\\"a/c/e.txt\\\"\"\n\n#: src/std_misc/fs.md:66\nmsgid \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\nmsgstr \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:67\nmsgid \"// Create a symbolic link, returns `io::Result<()>`\\n\"\nmsgstr \"// 심볼릭 링크를 생성합니다. `io::Result<()>`를 반환합니다\\n\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74\nmsgid \"\\\"../b.txt\\\"\"\nmsgstr \"\\\"../b.txt\\\"\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74 src/std_misc/fs.md:80\nmsgid \"\\\"a/c/b.txt\\\"\"\nmsgstr \"\\\"a/c/b.txt\\\"\"\n\n#: src/std_misc/fs.md:79\nmsgid \"\\\"`cat a/c/b.txt`\\\"\"\nmsgstr \"\\\"`cat a/c/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:85\nmsgid \"\\\"`ls a`\\\"\"\nmsgstr \"\\\"`ls a`\\\"\"\n\n#: src/std_misc/fs.md:86\nmsgid \"// Read the contents of a directory, returns `io::Result<Vec<Path>>`\\n\"\nmsgstr \"// 디렉터리의 내용을 읽습니다. `io::Result<Vec<Path>>`를 반환합니다\\n\"\n\n#: src/std_misc/fs.md:94\nmsgid \"\\\"`rm a/c/e.txt`\\\"\"\nmsgstr \"\\\"`rm a/c/e.txt`\\\"\"\n\n#: src/std_misc/fs.md:95\nmsgid \"// Remove a file, returns `io::Result<()>`\\n\"\nmsgstr \"// 파일을 제거합니다. `io::Result<()>`를 반환합니다\\n\"\n\n#: src/std_misc/fs.md:100\nmsgid \"\\\"`rmdir a/c/d`\\\"\"\nmsgstr \"\\\"`rmdir a/c/d`\\\"\"\n\n#: src/std_misc/fs.md:101\nmsgid \"// Remove an empty directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 빈 디렉터리를 제거합니다. `io::Result<()>`를 반환합니다\\n\"\n\n#: src/std_misc/fs.md:110\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\n\n#: src/std_misc/fs.md:126\nmsgid \"And the final state of the `a` directory is:\"\nmsgstr \"`a` 디렉터리의 최종 상태는 다음과 같습니다:\"\n\n#: src/std_misc/fs.md:138\nmsgid \"An alternative way to define the function `cat` is with `?` notation:\"\nmsgstr \"`cat` 함수를 정의하는 또 다른 방법은 `?` 표기법을 사용하는 것입니다:\"\n\n#: src/std_misc/fs.md:151\nmsgid \"[`cfg!`](../attribute/cfg.md)\"\nmsgstr \"[`cfg!`](../attribute/cfg.md)\"\n\n#: src/std_misc/arg.md:3\nmsgid \"Standard Library\"\nmsgstr \"표준 라이브러리\"\n\n#: src/std_misc/arg.md:5\nmsgid \"\"\n\"The command line arguments can be accessed using `std::env::args`, which \"\n\"returns an iterator that yields a `String` for each argument:\"\nmsgstr \"\"\n\"커맨드 라인 인자들은 `std::env::args`를 통해 접근할 수 있으며, 이는 각 인자\"\n\"에 대해 `String`을 내놓는 이터레이터를 반환합니다:\"\n\n#: src/std_misc/arg.md:14\nmsgid \"// The first argument is the path that was used to call the program.\\n\"\nmsgstr \"// 첫 번째 인자는 프로그램을 호출하는 데 사용된 경로입니다.\\n\"\n\n#: src/std_misc/arg.md:15\nmsgid \"\\\"My path is {}.\\\"\"\nmsgstr \"\\\"제 경로는 {}입니다.\\\"\"\n\n#: src/std_misc/arg.md:17\nmsgid \"\"\n\"// The rest of the arguments are the passed command line parameters.\\n\"\n\"    // Call the program like this:\\n\"\n\"    //   $ ./args arg1 arg2\\n\"\nmsgstr \"\"\n\"// 나머지 인자들은 전달된 커맨드 라인 파라미터들입니다.\\n\"\n\"// 프로그램을 다음과 같이 호출해 보세요:\\n\"\n\"//   $ ./args arg1 arg2\\n\"\n\n#: src/std_misc/arg.md:20\nmsgid \"\\\"I got {:?} arguments: {:?}.\\\"\"\nmsgstr \"\\\"{}개의 인자를 받았습니다: {:?}.\\\"\"\n\n#: src/std_misc/arg.md:24\nmsgid \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"My path is ./args.\\n\"\n\"I got 3 arguments: [\\\"1\\\", \\\"2\\\", \\\"3\\\"].\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"제 경로는 ./args입니다.\\n\"\n\"3개의 인자를 받았습니다: [\\\"1\\\", \\\"2\\\", \\\"3\\\"].\\n\"\n\"```\"\n\n#: src/std_misc/arg.md:32\nmsgid \"\"\n\"Alternatively, there are numerous crates that can provide extra \"\n\"functionality when creating command-line applications. One of the more \"\n\"popular command line argument crates being [`clap`](https://rust-\"\n\"cli.github.io/book/tutorial/cli-args.html#parsing-cli-arguments-with-clap).\"\nmsgstr \"\"\n\"또는 커맨드 라인 애플리케이션을 만들 때 추가 기능을 제공하는 수많은 크레이트\"\n\"들이 있습니다. 가장 인기 있는 커맨드 라인 인자 크레이트 중 하나는 [`clap`]\"\n\"(https://rust-cli.github.io/book/tutorial/cli-args.html#parsing-cli-\"\n\"arguments-with-clap)입니다.\"\n\n#: src/std_misc/arg/matching.md:3\nmsgid \"Matching can be used to parse simple arguments:\"\nmsgstr \"`match`를 사용하여 간단한 인자들을 파싱할 수 있습니다:\"\n\n#: src/std_misc/arg/matching.md:17\nmsgid \"\"\n\"\\\"usage:\\n\"\n\"match_args <string>\\n\"\n\"    Check whether given string is the answer.\\n\"\n\"match_args {{increase|decrease}} <integer>\\n\"\n\"    Increase or decrease given integer by one.\\\"\"\nmsgstr \"\"\n\"\\\"사용법:\\n\"\n\"match_args <string>\\n\"\n\"    주어진 문자열이 정답인지 확인합니다.\\n\"\n\"match_args {{increase|decrease}} <integer>\\n\"\n\"    주어진 정수를 1만큼 증가시키거나 감소시킵니다.\\\"\"\n\n#: src/std_misc/arg/matching.md:28\nmsgid \"// no arguments passed\\n\"\nmsgstr \"// 전달된 인자가 없음\\n\"\n\n#: src/std_misc/arg/matching.md:30\nmsgid \"\\\"My name is 'match_args'. Try passing some arguments!\\\"\"\nmsgstr \"\\\"제 이름은 'match_args'입니다. 인자를 전달해 보세요!\\\"\"\n\n#: src/std_misc/arg/matching.md:32\nmsgid \"// one argument passed\\n\"\nmsgstr \"// 한 개의 인자가 전달됨\\n\"\n\n#: src/std_misc/arg/matching.md:35\nmsgid \"\\\"This is the answer!\\\"\"\nmsgstr \"\\\"정답입니다!\\\"\"\n\n#: src/std_misc/arg/matching.md:36\nmsgid \"\\\"This is not the answer.\\\"\"\nmsgstr \"\\\"정답이 아닙니다.\\\"\"\n\n#: src/std_misc/arg/matching.md:39\nmsgid \"// one command and one argument passed\\n\"\nmsgstr \"// 하나의 명령어와 하나의 인자가 전달됨\\n\"\n\n#: src/std_misc/arg/matching.md:43\nmsgid \"// parse the number\\n\"\nmsgstr \"// 숫자를 파싱합니다\\n\"\n\n#: src/std_misc/arg/matching.md:49\nmsgid \"\\\"error: second argument not an integer\\\"\"\nmsgstr \"\\\"에러: 두 번째 인자가 정수가 아닙니다\\\"\"\n\n#: src/std_misc/arg/matching.md:54\nmsgid \"// parse the command\\n\"\nmsgstr \"// 명령어를 파싱합니다\\n\"\n\n#: src/std_misc/arg/matching.md:56\nmsgid \"\\\"increase\\\"\"\nmsgstr \"\\\"increase\\\"\"\n\n#: src/std_misc/arg/matching.md:57\nmsgid \"\\\"decrease\\\"\"\nmsgstr \"\\\"decrease\\\"\"\n\n#: src/std_misc/arg/matching.md:59\nmsgid \"\\\"error: invalid command\\\"\"\nmsgstr \"\\\"에러: 유효하지 않은 명령어\\\"\"\n\n#: src/std_misc/arg/matching.md:64\nmsgid \"// all the other cases\\n\"\nmsgstr \"// 그 외의 모든 경우\\n\"\n\n#: src/std_misc/arg/matching.md:66\nmsgid \"// show a help message\\n\"\nmsgstr \"// 도움말 메시지를 표시함\\n\"\n\n#: src/std_misc/arg/matching.md:73\nmsgid \"\"\n\"If you named your program `match_args.rs` and compile it like this `rustc \"\n\"match_args.rs`, you can execute it as follows:\"\nmsgstr \"\"\n\"프로그램 이름을 `match_args.rs`라고 짓고 `rustc match_args.rs`와 같이 컴파일\"\n\"했다면, 다음과 같이 실행할 수 있습니다:\"\n\n#: src/std_misc/ffi.md:3\nmsgid \"\"\n\"Rust provides a Foreign Function Interface (FFI) to C libraries. Foreign \"\n\"functions must be declared inside an `extern` block annotated with a \"\n\"`#[link]` attribute containing the name of the foreign library.\"\nmsgstr \"\"\n\"Rust는 C 라이브러리에 대한 외부 함수 인터페이스(Foreign Function Interface, \"\n\"FFI)를 제공합니다. 외부 함수는 외부 라이브러리의 이름이 포함된 `#[link]` 속성\"\n\"이 달린 `extern` 블록 내에 선언되어야 합니다.\"\n\n#: src/std_misc/ffi.md:9\nmsgid \"// this extern block links to the libm library\\n\"\nmsgstr \"// 이 extern 블록은 libm 라이브러리에 링크됩니다\\n\"\n\n#: src/std_misc/ffi.md:12\nmsgid \"\\\"msvcrt\\\"\"\nmsgstr \"\\\"msvcrt\\\"\"\n\n#: src/std_misc/ffi.md:14 src/std_misc/ffi.md:23\nmsgid \"\"\n\"// this is a foreign function\\n\"\n\"    // that computes the square root of a single precision complex number\\n\"\nmsgstr \"\"\n\"// 이는 단정도 복소수의 제곱근을 계산하는\\n\"\n\"// 외부 함수입니다\\n\"\n\n#: src/std_misc/ffi.md:21\nmsgid \"\\\"m\\\"\"\nmsgstr \"\\\"m\\\"\"\n\n#: src/std_misc/ffi.md:29\nmsgid \"\"\n\"// Since calling foreign functions is considered unsafe,\\n\"\n\"// it's common to write safe wrappers around them.\\n\"\nmsgstr \"\"\n\"// 외부 함수를 호출하는 것은 안전하지 않은(unsafe) 것으로 간주되므로,\\n\"\n\"// 이를 감싸는 안전한 래퍼(wrapper)를 작성하는 것이 일반적입니다.\\n\"\n\n#: src/std_misc/ffi.md:37\nmsgid \"// z = -1 + 0i\\n\"\nmsgstr \"// z = -1 + 0i\\n\"\n\n#: src/std_misc/ffi.md:40\nmsgid \"// calling a foreign function is an unsafe operation\\n\"\nmsgstr \"// 외부 함수를 호출하는 것은 안전하지 않은(unsafe) 작업입니다\\n\"\n\n#: src/std_misc/ffi.md:43\nmsgid \"\\\"the square root of {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?}의 제곱근은 {:?}입니다\\\"\"\n\n#: src/std_misc/ffi.md:45\nmsgid \"// calling safe API wrapped around unsafe operation\\n\"\nmsgstr \"// unsafe 연산을 감싼 안전한 API 호출\\n\"\n\n#: src/std_misc/ffi.md:46\nmsgid \"\\\"cos({:?}) = {:?}\\\"\"\nmsgstr \"\\\"cos({:?}) = {:?}\\\"\"\n\n#: src/std_misc/ffi.md:48\nmsgid \"// Minimal implementation of single precision complex numbers\\n\"\nmsgstr \"// 단정밀도 복소수의 최소 구현\\n\"\n\n#: src/std_misc/ffi.md:60\nmsgid \"\\\"{}-{}i\\\"\"\nmsgstr \"\\\"{}-{}i\\\"\"\n\n#: src/std_misc/ffi.md:62\nmsgid \"\\\"{}+{}i\\\"\"\nmsgstr \"\\\"{}+{}i\\\"\"\n\n#: src/testing.md:3\nmsgid \"\"\n\"Rust is a programming language that cares a lot about correctness and it \"\n\"includes support for writing software tests within the language itself.\"\nmsgstr \"\"\n\"Rust는 올바름(correctness)을 매우 중요하게 생각하는 프로그래밍 언어이며, 언\"\n\"어 자체에서 소프트웨어 테스트 작성을 지원합니다.\"\n\n#: src/testing.md:6\nmsgid \"Testing comes in three styles:\"\nmsgstr \"테스트는 세 가지 스타일로 제공됩니다:\"\n\n#: src/testing.md:8\nmsgid \"[Unit](testing/unit_testing.md) testing.\"\nmsgstr \"[유닛(Unit)](testing/unit_testing.md) 테스트.\"\n\n#: src/testing.md:9\nmsgid \"[Doc](testing/doc_testing.md) testing.\"\nmsgstr \"[문서(Doc)](testing/doc_testing.md) 테스트.\"\n\n#: src/testing.md:10\nmsgid \"[Integration](testing/integration_testing.md) testing.\"\nmsgstr \"[통합(Integration)](testing/integration_testing.md) 테스트.\"\n\n#: src/testing.md:12\nmsgid \"Also Rust has support for specifying additional dependencies for tests:\"\nmsgstr \"또한 Rust는 테스트를 위한 추가 의존성 지정을 지원합니다:\"\n\n#: src/testing.md:14\nmsgid \"[Dev-dependencies](testing/dev_dependencies.md)\"\nmsgstr \"[개발 의존성(Dev-dependencies)](testing/dev_dependencies.md)\"\n\n#: src/testing.md:18\nmsgid \"\"\n\"[The Book](https://doc.rust-lang.org/book/ch11-00-testing.html) chapter on \"\n\"testing\"\nmsgstr \"\"\n\"테스트에 관한 [The Book](https://doc.rust-lang.org/book/ch11-00-\"\n\"testing.html) 장\"\n\n#: src/testing.md:19\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on doc-testing\"\nmsgstr \"\"\n\"문서 테스트(doc-testing)에 관한 [API 가이드라인](https://rust-lang-\"\n\"nursery.github.io/api-guidelines/documentation.html)\"\n\n#: src/testing/unit_testing.md:3\nmsgid \"\"\n\"Tests are Rust functions that verify that the non-test code is functioning \"\n\"in the expected manner. The bodies of test functions typically perform some \"\n\"setup, run the code we want to test, then assert whether the results are \"\n\"what we expect.\"\nmsgstr \"\"\n\"테스트는 테스트 대상 코드가 예상대로 작동하는지 확인하는 Rust 함수입니다. 테\"\n\"스트 함수의 본문은 일반적으로 설정을 수행하고, 테스트하려는 코드를 실행한 다\"\n\"음, 결과가 예상과 일치하는지 단언(assert)합니다.\"\n\n#: src/testing/unit_testing.md:8\nmsgid \"\"\n\"Most unit tests go into a `tests` [mod](../mod.md) with the `#[cfg(test)]` \"\n\"[attribute](../attribute.md). Test functions are marked with the `#[test]` \"\n\"attribute.\"\nmsgstr \"\"\n\"대부분의 유닛 테스트는 `#[cfg(test)]` [속성](../attribute.md)이 있는 `tests` \"\n\"[모듈](../mod.md)에 들어갑니다. 테스트 함수는 `#[test]` 속성으로 표시됩니다.\"\n\n#: src/testing/unit_testing.md:11\nmsgid \"\"\n\"Tests fail when something in the test function [panics](../std/panic.md). \"\n\"There are some helper [macros](../macros.md):\"\nmsgstr \"\"\n\"테스트 함수 내에서 [패닉](../std/panic.md)이 발생하면 테스트가 실패합니다. 다\"\n\"음과 같은 몇 가지 도우미 [매크로](../macros.md)가 있습니다:\"\n\n#: src/testing/unit_testing.md:14\nmsgid \"`assert!(expression)` - panics if expression evaluates to `false`.\"\nmsgstr \"\"\n\"`assert!(expression)` - 표현식의 평가 결과가 `false`이면 패닉을 발생시킵니다.\"\n\n#: src/testing/unit_testing.md:15\nmsgid \"\"\n\"`assert_eq!(left, right)` and `assert_ne!(left, right)` - testing left and \"\n\"right expressions for equality and inequality respectively.\"\nmsgstr \"\"\n\"`assert_eq!(left, right)` 및 `assert_ne!(left, right)` - 왼쪽과 오른쪽 표현식\"\n\"이 각각 같은지 또는 다른지를 테스트합니다.\"\n\n#: src/testing/unit_testing.md:22\nmsgid \"\"\n\"// This is a really bad adding function, its purpose is to fail in this\\n\"\n\"// example.\\n\"\nmsgstr \"\"\n\"// 이것은 정말 형편없는 더하기 함수입니다. 이 예제에서 실패하도록 만드는 것\"\n\"이 목적입니다.\\n\"\n\n#: src/testing/unit_testing.md:32\nmsgid \"\"\n\"// Note this useful idiom: importing names from outer (for mod tests) \"\n\"scope.\\n\"\nmsgstr \"\"\n\"// 이 유용한 관용구를 기억하세요: 외부 스코프(mod tests의 경우)에서 이름들을 \"\n\"가져옵니다.\\n\"\n\n#: src/testing/unit_testing.md:42\nmsgid \"\"\n\"// This assert would fire and test will fail.\\n\"\n\"        // Please note, that private functions can be tested too!\\n\"\nmsgstr \"\"\n\"// 이 단언(assert)은 실행될 것이고 테스트는 실패할 것입니다.\\n\"\n\"        // 참고로, 프라이빗 함수도 테스트할 수 있습니다!\\n\"\n\n#: src/testing/unit_testing.md:49\nmsgid \"Tests can be run with `cargo test`.\"\nmsgstr \"테스트는 `cargo test`로 실행할 수 있습니다.\"\n\n#: src/testing/unit_testing.md:73\nmsgid \"Tests and `?`\"\nmsgstr \"테스트와 `?`\"\n\n#: src/testing/unit_testing.md:75\nmsgid \"\"\n\"None of the previous unit test examples had a return type. But in Rust 2018, \"\n\"your unit tests can return `Result<()>`, which lets you use `?` in them! \"\n\"This can make them much more concise.\"\nmsgstr \"\"\n\"이전의 유닛 테스트 예제들에는 반환 타입이 없었습니다. 하지만 Rust 2018에서는 \"\n\"유닛 테스트가 `Result<()>`를 반환할 수 있어, 테스트 내에서 `?`를 사용할 수 있\"\n\"습니다! 이를 통해 테스트를 훨씬 더 간결하게 만들 수 있습니다.\"\n\n#: src/testing/unit_testing.md:84\nmsgid \"\\\"negative floats don't have square roots\\\"\"\nmsgstr \"\\\"음수 부동 소수점은 제곱근을 가질 수 없습니다\\\"\"\n\n#: src/testing/unit_testing.md:101\nmsgid \"\"\n\"See [\\\"The Edition Guide\\\"](https://doc.rust-lang.org/edition-guide/\"\n\"rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html) \"\n\"for more details.\"\nmsgstr \"\"\n\"더 자세한 내용은 [\\\"The Edition Guide\\\"](https://doc.rust-lang.org/edition-\"\n\"guide/rust-2018/error-handling-and-panics/question-mark-in-main-and-\"\n\"tests.html)를 참조하세요.\"\n\n#: src/testing/unit_testing.md:103\nmsgid \"Testing panics\"\nmsgstr \"패닉 테스트\"\n\n#: src/testing/unit_testing.md:105\nmsgid \"\"\n\"To check functions that should panic under certain circumstances, use \"\n\"attribute `#[should_panic]`. This attribute accepts optional parameter \"\n\"`expected = ` with the text of the panic message. If your function can panic \"\n\"in multiple ways, it helps make sure your test is testing the correct panic.\"\nmsgstr \"\"\n\"특정 상황에서 패닉이 발생해야 하는 함수를 확인하려면 `#[should_panic]` 속성\"\n\"을 사용합니다. 이 속성은 선택적 파라미터 `expected = `를 받으며, 패닉 메시지\"\n\"의 텍스트를 확인합니다. 만약 여러분의 함수가 여러 방식으로 패닉을 일으킬 수 \"\n\"있다면, 이 파라미터는 예상한 패닉이 발생했는지 확인하는 데 도움이 됩니다.\"\n\n#: src/testing/unit_testing.md:110\nmsgid \"\"\n\"**Note**: Rust also allows a shorthand form `#[should_panic = \\\"message\\\"]`, \"\n\"which works exactly like `#[should_panic(expected = \\\"message\\\")]`. Both are \"\n\"valid; the latter is more commonly used and is considered more explicit.\"\nmsgstr \"\"\n\"**참고**: Rust는 `#[should_panic = \\\"message\\\"]`와 같은 단축 형태도 허용하\"\n\"며, 이는 `#[should_panic(expected = \\\"message\\\")]`와 정확히 똑같이 작동합니\"\n\"다. 둘 다 유효하지만, 후자가 더 일반적으로 사용되며 더 명시적인 것으로 간주됩\"\n\"니다.\"\n\n#: src/testing/unit_testing.md:117 src/testing/doc_testing.md:46\nmsgid \"\\\"Divide-by-zero error\\\"\"\nmsgstr \"\\\"0으로 나누기 에러\\\"\"\n\n#: src/testing/unit_testing.md:119 src/testing/unit_testing.md:140\n#: src/testing/unit_testing.md:146\nmsgid \"\\\"Divide result is zero\\\"\"\nmsgstr \"\\\"나눗셈 결과가 0입니다\\\"\"\n\n#: src/testing/unit_testing.md:146\nmsgid \"// This also works\\n\"\nmsgstr \"// 이 방식도 작동합니다\\n\"\n\n#: src/testing/unit_testing.md:153\nmsgid \"Running these tests gives us:\"\nmsgstr \"이 테스트들을 실행하면 다음과 같은 결과를 얻습니다:\"\n\n#: src/testing/unit_testing.md:173\nmsgid \"Running specific tests\"\nmsgstr \"특정 테스트 실행하기\"\n\n#: src/testing/unit_testing.md:175\nmsgid \"\"\n\"To run specific tests one may specify the test name to `cargo test` command.\"\nmsgstr \"\"\n\"특정 테스트를 실행하려면 `cargo test` 명령에 테스트 이름을 지정하면 됩니다.\"\n\n#: src/testing/unit_testing.md:191\nmsgid \"\"\n\"To run multiple tests one may specify part of a test name that matches all \"\n\"the tests that should be run.\"\nmsgstr \"\"\n\"여러 테스트를 실행하려면 실행하려는 모든 테스트와 매칭되는 테스트 이름의 일부\"\n\"분을 지정하면 됩니다.\"\n\n#: src/testing/unit_testing.md:210\nmsgid \"Ignoring tests\"\nmsgstr \"테스트 무시하기\"\n\n#: src/testing/unit_testing.md:212\nmsgid \"\"\n\"Tests can be marked with the `#[ignore]` attribute to exclude some tests. Or \"\n\"to run them with command `cargo test -- --ignored`\"\nmsgstr \"\"\n\"일부 테스트를 제외하기 위해 `#[ignore]` 속성을 표시할 수 있습니다. 또는 \"\n\"`cargo test -- --ignored` 명령으로 무시된 테스트들만 실행할 수도 있습니다.\"\n\n#: src/testing/doc_testing.md:3\nmsgid \"\"\n\"The primary way of documenting a Rust project is through annotating the \"\n\"source code. Documentation comments are written in [CommonMark Markdown \"\n\"specification](https://commonmark.org/) and support code blocks in them. \"\n\"Rust takes care about correctness, so these code blocks are compiled and \"\n\"used as documentation tests.\"\nmsgstr \"\"\n\"Rust 프로젝트를 문서화하는 기본 방법은 소스 코드에 주석을 다는 것입니다. 문서\"\n\"화 주석은 [CommonMark Markdown 명세](https://commonmark.org/)로 작성되며 코\"\n\"드 블록을 지원합니다. Rust는 올바름(correctness)을 중요하게 생각하므로, 이러\"\n\"한 코드 블록들은 컴파일되어 문서 테스트(documentation tests)로 사용됩니다.\"\n\n#: src/testing/doc_testing.md:10\nmsgid \"\"\n\"/// First line is a short summary describing function.\\n\"\n\"///\\n\"\n\"/// The next lines present detailed documentation. Code blocks start with\\n\"\n\"/// triple backquotes and have implicit `fn main()` inside\\n\"\n\"/// and `extern crate <cratename>`. Assume we're testing a `playground` \"\n\"library\\n\"\n\"/// crate or using the Playground's Test action:\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 첫 번째 줄은 함수를 설명하는 짧은 요약입니다.\\n\"\n\"///\\n\"\n\"/// 다음 줄들은 상세한 문서화를 보여줍니다. 코드 블록은 백틱 세 개로 시작하\"\n\"며,\\n\"\n\"/// 내부적으로 암시적인 `fn main()`과 `extern crate <cratename>`을 가집니\"\n\"다.\\n\"\n\"/// `playground` 라이브러리 크레이트를 테스트하거나 플레이그라운드의\\n\"\n\"/// Test 액션을 사용하는 예시라고 가정해 봅시다:\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:24\nmsgid \"\"\n\"/// Usually doc comments may include sections \\\"Examples\\\", \\\"Panics\\\" and \"\n\"\\\"Failures\\\".\\n\"\n\"///\\n\"\n\"/// The next function divides two numbers.\\n\"\n\"///\\n\"\n\"/// # Examples\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # Panics\\n\"\n\"///\\n\"\n\"/// The function panics if the second argument is zero.\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // panics on division by zero\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 일반적으로 문서 주석에는 \\\"Examples\\\", \\\"Panics\\\", \\\"Failures\\\" 섹션이 포\"\n\"함될 수 있습니다.\\n\"\n\"///\\n\"\n\"/// 다음 함수는 두 수를 나눕니다.\\n\"\n\"///\\n\"\n\"/// # Examples\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # Panics\\n\"\n\"///\\n\"\n\"/// 두 번째 인자가 0이면 함수가 패닉을 발생시킵니다.\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // 0으로 나누기 시 패닉 발생\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:53\nmsgid \"\"\n\"Code blocks in documentation are automatically tested when running the \"\n\"regular `cargo test` command:\"\nmsgstr \"\"\n\"문서 내의 코드 블록은 일반적인 `cargo test` 명령을 실행할 때 자동으로 테스트\"\n\"됩니다:\"\n\n#: src/testing/doc_testing.md:72\nmsgid \"Motivation behind documentation tests\"\nmsgstr \"문서 테스트의 의도\"\n\n#: src/testing/doc_testing.md:74\nmsgid \"\"\n\"The main purpose of documentation tests is to serve as examples that \"\n\"exercise the functionality, which is one of the most important [guidelines]\"\n\"(https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html#examples-use--not-try-not-unwrap-c-question-mark). It \"\n\"allows using examples from docs as complete code snippets. But using `?` \"\n\"makes compilation fail since `main` returns `unit`. The ability to hide some \"\n\"source lines from documentation comes to the rescue: one may write `fn \"\n\"try_main() -> Result<(), ErrorType>`, hide it and `unwrap` it in hidden \"\n\"`main`. Sounds complicated? Here's an example:\"\nmsgstr \"\"\n\"문서 테스트의 주된 목적은 기능을 실행해보는 예시로서의 역할을 하는 것이며, 이\"\n\"는 가장 중요한 [가이드라인](https://rust-lang-nursery.github.io/api-\"\n\"guidelines/documentation.html#examples-use--not-try-not-unwrap-c-question-\"\n\"mark) 중 하나입니다. 이를 통해 문서의 예시를 완전한 코드 스니펫으로 사용할 \"\n\"수 있습니다. 하지만 `main`이 유닛 타입(`unit`)을 반환하기 때문에 `?`를 사용하\"\n\"면 컴파일에 실패합니다. 이때 문서에서 일부 소스 라인을 숨길 수 있는 기능이 도\"\n\"움이 됩니다. `fn try_main() -> Result<(), ErrorType>`을 작성하고, 이를 숨긴 \"\n\"뒤 숨겨진 `main`에서 `unwrap` 할 수 있습니다. 복잡하게 들리나요? 여기 예시가 \"\n\"있습니다:\"\n\n#: src/testing/doc_testing.md:83\nmsgid \"\"\n\"/// Using hidden `try_main` in doc tests.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // hidden lines start with `#` symbol, but they're still compilable!\\n\"\n\"/// # fn try_main() -> Result<(), String> { // line that wraps the body \"\n\"shown in doc\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // returning from try_main\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // starting main that'll unwrap()\\n\"\n\"/// #    try_main().unwrap(); // calling try_main and unwrapping\\n\"\n\"/// #                         // so that test will panic in case of error\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 문서 테스트에서 숨겨진 `try_main` 사용하기.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // `#` 기호로 시작하는 줄은 숨겨지지만, 여전히 컴파일 가능합니다!\\n\"\n\"/// # fn try_main() -> Result<(), String> { // 문서에 보여지는 본문을 감싸는 \"\n\"줄\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // try_main에서 반환\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // unwrap()을 호출할 main 시작\\n\"\n\"/// #    try_main().unwrap(); // try_main을 호출하고 unwrap하여\\n\"\n\"/// #                         // 에러 발생 시 테스트가 패닉을 일으키도록 함\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:98\nmsgid \"\\\"Divide-by-zero\\\"\"\nmsgstr \"\\\"0으로 나누기\\\"\"\n\n#: src/testing/doc_testing.md:107\nmsgid \"\"\n\"[RFC505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-\"\n\"conventions.md) on documentation style\"\nmsgstr \"\"\n\"문서 스타일에 관한 [RFC505](https://github.com/rust-lang/rfcs/blob/master/\"\n\"text/0505-api-comment-conventions.md)\"\n\n#: src/testing/doc_testing.md:108\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on documentation guidelines\"\nmsgstr \"\"\n\"문서 가이드라인에 관한 [API 가이드라인](https://rust-lang-nursery.github.io/\"\n\"api-guidelines/documentation.html)\"\n\n#: src/testing/integration_testing.md:3\nmsgid \"\"\n\"[Unit tests](unit_testing.md) are testing one module in isolation at a time: \"\n\"they're small and can test private code. Integration tests are external to \"\n\"your crate and use only its public interface in the same way any other code \"\n\"would. Their purpose is to test that many parts of your library work \"\n\"correctly together.\"\nmsgstr \"\"\n\"[유닛 테스트](unit_testing.md)는 한 번에 하나의 모듈을 격리하여 테스트합니\"\n\"다. 유닛 테스트는 크기가 작고 프라이빗 코드도 테스트할 수 있습니다. 통합 테스\"\n\"트는 크레이트 외부에 존재하며, 다른 코드와 마찬가지로 공개(public) 인터페이스\"\n\"만 사용합니다. 통합 테스트의 목적은 라이브러리의 여러 부분이 함께 올바르게 작\"\n\"동하는지 테스트하는 것입니다.\"\n\n#: src/testing/integration_testing.md:8\nmsgid \"Cargo looks for integration tests in `tests` directory next to `src`.\"\nmsgstr \"Cargo는 `src` 옆의 `tests` 디렉터리에서 통합 테스트를 찾습니다.\"\n\n#: src/testing/integration_testing.md:10 src/testing/dev_dependencies.md:17\nmsgid \"File `src/lib.rs`:\"\nmsgstr \"`src/lib.rs` 파일:\"\n\n#: src/testing/integration_testing.md:13\nmsgid \"// Define this in a crate called `adder`.\\n\"\nmsgstr \"// `adder`라는 이름의 크레이트에 이를 정의합니다.\\n\"\n\n#: src/testing/integration_testing.md:19\nmsgid \"File with test: `tests/integration_test.rs`:\"\nmsgstr \"테스트 파일: `tests/integration_test.rs`:\"\n\n#: src/testing/integration_testing.md:28\nmsgid \"Running tests with `cargo test` command:\"\nmsgstr \"`cargo test` 명령으로 테스트 실행하기:\"\n\n#: src/testing/integration_testing.md:50\nmsgid \"\"\n\"Each Rust source file in the `tests` directory is compiled as a separate \"\n\"crate. In order to share some code between integration tests we can make a \"\n\"module with public functions, importing and using it within tests.\"\nmsgstr \"\"\n\"통합 테스트 간에 일부 코드를 공유하기 위해 공개 함수가 있는 모듈을 만들고, 이\"\n\"를 테스트 내에서 가져와 사용할 수 있습니다.\"\n\n#: src/testing/integration_testing.md:54\nmsgid \"File `tests/common/mod.rs`:\"\nmsgstr \"`tests/common/mod.rs` 파일:\"\n\n#: src/testing/integration_testing.md:58\nmsgid \"\"\n\"// some setup code, like creating required files/directories, starting\\n\"\n\"    // servers, etc.\\n\"\nmsgstr \"// 필요한 파일/디렉터리 생성, 서버 시작 등과 같은 일부 설정 코드\\n\"\n\n#: src/testing/integration_testing.md:63\nmsgid \"File with test: `tests/integration_test.rs`\"\nmsgstr \"테스트 파일: `tests/integration_test.rs`\"\n\n#: src/testing/integration_testing.md:66\nmsgid \"// importing common module.\\n\"\nmsgstr \"// common 모듈 가져오기.\\n\"\n\n#: src/testing/integration_testing.md:71\nmsgid \"// using common code.\\n\"\nmsgstr \"// 공통 코드 사용하기.\\n\"\n\n#: src/testing/integration_testing.md:77\nmsgid \"\"\n\"Creating the module as `tests/common.rs` also works, but is not recommended \"\n\"because the test runner will treat the file as a test crate and try to run \"\n\"tests inside it.\"\nmsgstr \"\"\n\"`tests/common.rs`로 모듈을 만드는 것도 가능하지만, 테스트 러너가 이 파일을 테\"\n\"스트 크레이트로 취급하여 내부의 테스트를 실행하려 하므로 권장되지 않습니다.\"\n\n#: src/testing/dev_dependencies.md:1\nmsgid \"Development dependencies\"\nmsgstr \"개발 의존성\"\n\n#: src/testing/dev_dependencies.md:3\nmsgid \"\"\n\"Sometimes there is a need to have dependencies for tests (or examples, or \"\n\"benchmarks) only. Such dependencies are added to `Cargo.toml` in the `[dev-\"\n\"dependencies]` section. These dependencies are not propagated to other \"\n\"packages which depend on this package.\"\nmsgstr \"\"\n\"가끔 테스트(또는 예제, 벤치마크)만을 위한 의존성이 필요할 때가 있습니다. 이러\"\n\"한 의존성은 `Cargo.toml`의 `[dev-dependencies]` 섹션에 추가됩니다. 이 의존성\"\n\"들은 이 패키지에 의존하는 다른 패키지들로는 전파되지 않습니다.\"\n\n#: src/testing/dev_dependencies.md:8\nmsgid \"\"\n\"One such example is [`pretty_assertions`](https://docs.rs/pretty_assertions/\"\n\"1.0.0/pretty_assertions/index.html), which extends standard `assert_eq!` and \"\n\"`assert_ne!` macros, to provide colorful diff. File `Cargo.toml`:\"\nmsgstr \"\"\n\"그러한 예 중 하나로 표준 `assert_eq!` 및 `assert_ne!` 매크로를 확장하여 색상\"\n\"화된 diff를 제공하는 [`pretty_assertions`](https://docs.rs/pretty_assertions/\"\n\"1.0.0/pretty_assertions/index.html)가 있습니다. `Cargo.toml` 파일:\"\n\n#: src/testing/dev_dependencies.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"# standard crate data is left out\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"# 표준 크레이트 데이터는 생략되었습니다\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\n\n#: src/testing/dev_dependencies.md:27\nmsgid \"// crate for test-only use. Cannot be used in non-test code.\\n\"\nmsgstr \"\"\n\"// 테스트 전용으로만 사용되는 크레이트입니다. 테스트가 아닌 코드에서는 사용\"\n\"할 수 없습니다.\\n\"\n\n#: src/testing/dev_dependencies.md:38\nmsgid \"\"\n\"[Cargo](http://doc.crates.io/specifying-dependencies.html) docs on \"\n\"specifying dependencies.\"\nmsgstr \"\"\n\"의존성 지정에 관한 [Cargo](http://doc.crates.io/specifying-\"\n\"dependencies.html) 문서.\"\n\n#: src/unsafe.md:3\nmsgid \"\"\n\"As an introduction to this section, to borrow from [the official docs]\"\n\"(https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html), \\\"one should try \"\n\"to minimize the amount of unsafe code in a code base.\\\" With that in mind, \"\n\"let's get started! Unsafe annotations in Rust are used to bypass protections \"\n\"put in place by the compiler; specifically, there are four primary things \"\n\"that unsafe is used for:\"\nmsgstr \"\"\n\"이 섹션을 시작하며 [공식 문서](https://doc.rust-lang.org/book/ch19-01-unsafe-\"\n\"rust.html)의 말을 빌리자면, \\\"코드베이스에서 unsafe 코드의 양을 최소화하도록 \"\n\"노력해야 합니다.\\\" 이 점을 염두에 두고 시작해 봅시다! Rust에서 Unsafe 어노테\"\n\"이션은 컴파일러가 제공하는 보호 기능을 우회하는 데 사용됩니다. 구체적으로, \"\n\"unsafe는 다음과 같은 네 가지 주요 작업에 사용됩니다:\"\n\n#: src/unsafe.md:9\nmsgid \"dereferencing raw pointers\"\nmsgstr \"raw 포인터 역참조하기\"\n\n#: src/unsafe.md:10\nmsgid \"\"\n\"calling functions or methods which are `unsafe` (including calling a \"\n\"function over FFI, see [a previous chapter](std_misc/ffi.md) of the book)\"\nmsgstr \"\"\n\"`unsafe` 함수나 메서드 호출하기 (FFI를 통한 함수 호출 포함, 이 책의 [이전 장]\"\n\"(std_misc/ffi.md) 참조)\"\n\n#: src/unsafe.md:12\nmsgid \"accessing or modifying static mutable variables\"\nmsgstr \"정적 가변(static mutable) 변수에 접근하거나 수정하기\"\n\n#: src/unsafe.md:13\nmsgid \"implementing unsafe traits\"\nmsgstr \"unsafe 트레이트 구현하기\"\n\n#: src/unsafe.md:15\nmsgid \"Raw Pointers\"\nmsgstr \"Raw 포인터\"\n\n#: src/unsafe.md:17\nmsgid \"\"\n\"Raw pointers `*` and references `&T` function similarly, but references are \"\n\"always safe because they are guaranteed to point to valid data due to the \"\n\"borrow checker. Dereferencing a raw pointer can only be done through an \"\n\"unsafe block.\"\nmsgstr \"\"\n\"Raw 포인터 `*`와 참조 `&T`는 비슷하게 작동하지만, 참조는 빌림 검사기(borrow \"\n\"checker) 덕분에 항상 유효한 데이터를 가리킨다는 것이 보장되므로 항상 안전합니\"\n\"다. Raw 포인터의 역참조는 unsafe 블록을 통해서만 수행될 수 있습니다.\"\n\n#: src/unsafe.md:32\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Unsafe 함수 호출하기\"\n\n#: src/unsafe.md:34\nmsgid \"\"\n\"Some functions can be declared as `unsafe`, meaning it is the programmer's \"\n\"responsibility to ensure correctness instead of the compiler's. One example \"\n\"of this is [`std::slice::from_raw_parts`](https://doc.rust-lang.org/std/\"\n\"slice/fn.from_raw_parts.html) which will create a slice given a pointer to \"\n\"the first element and a length.\"\nmsgstr \"\"\n\"일부 함수는 `unsafe`로 선언될 수 있는데, 이는 컴파일러 대신 프로그래머가 올바\"\n\"름을 보장해야 할 책임이 있음을 의미합니다. 그 예로 첫 번째 요소에 대한 포인터\"\n\"와 길이를 받아 슬라이스를 생성하는 [`std::slice::from_raw_parts`](https://\"\n\"doc.rust-lang.org/std/slice/fn.from_raw_parts.html)가 있습니다.\"\n\n#: src/unsafe.md:56\nmsgid \"\"\n\"For `slice::from_raw_parts`, one of the assumptions which _must_ be upheld \"\n\"is that the pointer passed in points to valid memory and that the memory \"\n\"pointed to is of the correct type. If these invariants aren't upheld then \"\n\"the program's behaviour is undefined and there is no knowing what will \"\n\"happen.\"\nmsgstr \"\"\n\"`slice::from_raw_parts`의 경우, 반드시 지켜져야 하는 가정 중 하나는 전달된 포\"\n\"인터가 유효한 메모리를 가리키고 가리키는 메모리가 올바른 타입이어야 한다는 것\"\n\"입니다. 이러한 불변성(invariant)이 지켜지지 않으면 프로그램의 동작은 정의되\"\n\"지 않으며 어떤 일이 일어날지 알 수 없습니다.\"\n\n#: src/unsafe/asm.md:3\nmsgid \"\"\n\"Rust provides support for inline assembly via the `asm!` macro. It can be \"\n\"used to embed handwritten assembly in the assembly output generated by the \"\n\"compiler. Generally this should not be necessary, but might be where the \"\n\"required performance or timing cannot be otherwise achieved. Accessing low \"\n\"level hardware primitives, e.g. in kernel code, may also demand this \"\n\"functionality.\"\nmsgstr \"\"\n\"Rust는 `asm!` 매크로를 통해 인라인 어셈블리를 지원합니다. 이를 통해 컴파일러\"\n\"가 생성하는 어셈블리 출력에 수기로 작성한 어셈블리를 삽입할 수 있습니다. 일반\"\n\"적으로 이는 필요하지 않지만, 다른 방법으로는 필요한 성능이나 타이밍을 달성할 \"\n\"수 없는 경우에 유용할 수 있습니다. 커널 코드와 같은 저수준 하드웨어 프리미티\"\n\"브에 접근하는 경우에도 이 기능이 필요할 수 있습니다.\"\n\n#: src/unsafe/asm.md:8\nmsgid \"\"\n\"**Note**: the examples here are given in x86/x86-64 assembly, but other \"\n\"architectures are also supported.\"\nmsgstr \"\"\n\"**참고**: 여기의 예제들은 x86/x86-64 어셈블리로 제공되지만, 다른 아키텍처도 \"\n\"지원됩니다.\"\n\n#: src/unsafe/asm.md:10\nmsgid \"Inline assembly is currently supported on the following architectures:\"\nmsgstr \"인라인 어셈블리는 현재 다음 아키텍처에서 지원됩니다:\"\n\n#: src/unsafe/asm.md:12\nmsgid \"x86 and x86-64\"\nmsgstr \"x86 및 x86-64\"\n\n#: src/unsafe/asm.md:13\nmsgid \"ARM\"\nmsgstr \"ARM\"\n\n#: src/unsafe/asm.md:14\nmsgid \"AArch64\"\nmsgstr \"AArch64\"\n\n#: src/unsafe/asm.md:15\nmsgid \"RISC-V\"\nmsgstr \"RISC-V\"\n\n#: src/unsafe/asm.md:17\nmsgid \"Basic usage\"\nmsgstr \"기본 사용법\"\n\n#: src/unsafe/asm.md:19\nmsgid \"Let us start with the simplest possible example:\"\nmsgstr \"가장 간단한 예제부터 시작해 봅시다:\"\n\n#: src/unsafe/asm.md:22 src/unsafe/asm.md:42 src/unsafe/asm.md:69\n#: src/unsafe/asm.md:107 src/unsafe/asm.md:124 src/unsafe/asm.md:149\n#: src/unsafe/asm.md:183 src/unsafe/asm.md:204 src/unsafe/asm.md:221\n#: src/unsafe/asm.md:260 src/unsafe/asm.md:296 src/unsafe/asm.md:312\n#: src/unsafe/asm.md:338 src/unsafe/asm.md:376 src/unsafe/asm.md:403\n#: src/unsafe/asm.md:427 src/unsafe/asm.md:465\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe/asm.md:26\nmsgid \"\\\"nop\\\"\"\nmsgstr \"\\\"nop\\\"\"\n\n#: src/unsafe/asm.md:31\nmsgid \"\"\n\"This will insert a NOP (no operation) instruction into the assembly \"\n\"generated by the compiler. Note that all `asm!` invocations have to be \"\n\"inside an `unsafe` block, as they could insert arbitrary instructions and \"\n\"break various invariants. The instructions to be inserted are listed in the \"\n\"first argument of the `asm!` macro as a string literal.\"\nmsgstr \"\"\n\"이 코드는 컴파일러가 생성한 어셈블리에 NOP (no operation) 명령어를 삽입합니\"\n\"다. `asm!` 호출은 임의의 명령어를 삽입하여 다양한 불변성을 깰 수 있으므로 모\"\n\"두 `unsafe` 블록 안에 있어야 한다는 점에 유의하세요. 삽입할 명령어는 `asm!` \"\n\"매크로의 첫 번째 인자에 문자열 리터럴로 나열됩니다.\"\n\n#: src/unsafe/asm.md:36\nmsgid \"Inputs and outputs\"\nmsgstr \"입력과 출력\"\n\n#: src/unsafe/asm.md:38\nmsgid \"\"\n\"Now inserting an instruction that does nothing is rather boring. Let us do \"\n\"something that actually acts on data:\"\nmsgstr \"\"\n\"아무것도 하지 않는 명령어를 넣는 것은 꽤 지루합니다. 실제로 데이터에 작용하\"\n\"는 무언가를 해봅시다:\"\n\n#: src/unsafe/asm.md:47\nmsgid \"\\\"mov {}, 5\\\"\"\nmsgstr \"\\\"mov {}, 5\\\"\"\n\n#: src/unsafe/asm.md:53\nmsgid \"\"\n\"This will write the value `5` into the `u64` variable `x`. You can see that \"\n\"the string literal we use to specify instructions is actually a template \"\n\"string. It is governed by the same rules as Rust [format strings](https://\"\n\"doc.rust-lang.org/std/fmt/#syntax). The arguments that are inserted into the \"\n\"template however look a bit different than you may be familiar with. First \"\n\"we need to specify if the variable is an input or an output of the inline \"\n\"assembly. In this case it is an output. We declared this by writing `out`. \"\n\"We also need to specify in what kind of register the assembly expects the \"\n\"variable. In this case we put it in an arbitrary general purpose register by \"\n\"specifying `reg`. The compiler will choose an appropriate register to insert \"\n\"into the template and will read the variable from there after the inline \"\n\"assembly finishes executing.\"\nmsgstr \"\"\n\"이 코드는 값 `5`를 `u64` 변수 `x`에 씁니다. 명령어를 지정하는 데 사용하는 문\"\n\"자열 리터럴이 실제로는 템플릿 문자열이라는 것을 알 수 있습니다. 이는 Rust [형\"\n\"식 문자열](https://doc.rust-lang.org/std/fmt/#syntax)과 동일한 규칙의 적용을 \"\n\"받습니다. 하지만 템플릿에 삽입되는 인자들은 여러분에게 익숙한 것과는 조금 달\"\n\"라 보일 수 있습니다. 먼저 변수가 인라인 어셈블리의 입력인지 출력인지를 지정해\"\n\"야 합니다. 이 경우에는 출력입니다. 우리는 `out`을 작성하여 이를 선언했습니\"\n\"다. 또한 어셈블리가 변수를 어떤 종류의 레지스터에 두기를 기대하는지도 지정해\"\n\"야 합니다. 이 경우에는 `reg`를 지정하여 임의의 범용 레지스터에 넣었습니다. 컴\"\n\"파일러는 템플릿에 삽입할 적절한 레지스터를 선택하고, 인라인 어셈블리 실행이 \"\n\"끝난 후 해당 레지스터에서 변수를 읽어올 것입니다.\"\n\n#: src/unsafe/asm.md:66\nmsgid \"Let us see another example that also uses an input:\"\nmsgstr \"입력을 사용하는 또 다른 예제를 살펴봅시다:\"\n\n#: src/unsafe/asm.md:76\nmsgid \"\\\"mov {0}, {1}\\\"\"\nmsgstr \"\\\"mov {0}, {1}\\\"\"\n\n#: src/unsafe/asm.md:77 src/unsafe/asm.md:112 src/unsafe/asm.md:130\nmsgid \"\\\"add {0}, 5\\\"\"\nmsgstr \"\\\"add {0}, 5\\\"\"\n\n#: src/unsafe/asm.md:86\nmsgid \"\"\n\"This will add `5` to the input in variable `i` and write the result to \"\n\"variable `o`. The particular way this assembly does this is first copying \"\n\"the value from `i` to the output, and then adding `5` to it.\"\nmsgstr \"\"\n\"이 코드는 변수 `i`의 입력에 `5`를 더하고 그 결과를 변수 `o`에 씁니다. 이 어셈\"\n\"블리가 이를 수행하는 구체적인 방식은 먼저 `i`의 값을 출력으로 복사한 다음, 거\"\n\"기에 `5`를 더하는 것입니다.\"\n\n#: src/unsafe/asm.md:90\nmsgid \"The example shows a few things:\"\nmsgstr \"이 예제는 몇 가지를 보여줍니다:\"\n\n#: src/unsafe/asm.md:92\nmsgid \"\"\n\"First, we can see that `asm!` allows multiple template string arguments; \"\n\"each one is treated as a separate line of assembly code, as if they were all \"\n\"joined together with newlines between them. This makes it easy to format \"\n\"assembly code.\"\nmsgstr \"\"\n\"첫째, `asm!`이 여러 템플릿 문자열 인자를 허용한다는 것을 알 수 있습니다. 각각\"\n\"은 별도의 어셈블리 코드 줄로 처리되며, 마치 줄바꿈으로 모두 연결된 것처럼 작\"\n\"동합니다. 이를 통해 어셈블리 코드를 쉽게 포맷팅할 수 있습니다.\"\n\n#: src/unsafe/asm.md:97\nmsgid \"\"\n\"Second, we can see that inputs are declared by writing `in` instead of `out`.\"\nmsgstr \"\"\n\"둘째, `out` 대신 `in`을 작성하여 입력을 선언한다는 것을 알 수 있습니다.\"\n\n#: src/unsafe/asm.md:99\nmsgid \"\"\n\"Third, we can see that we can specify an argument number, or name as in any \"\n\"format string. For inline assembly templates this is particularly useful as \"\n\"arguments are often used more than once. For more complex inline assembly \"\n\"using this facility is generally recommended, as it improves readability, \"\n\"and allows reordering instructions without changing the argument order.\"\nmsgstr \"\"\n\"셋째, 다른 형식 문자열에서처럼 인자 번호나 이름을 지정할 수 있음을 알 수 있습\"\n\"니다. 인라인 어셈블리 템플릿에서는 인자가 한 번 이상 사용되는 경우가 많기 때\"\n\"문에 이 기능이 특히 유용합니다. 복잡한 인라인 어셈블리의 경우 이 기능을 사용\"\n\"하는 것이 일반적으로 권장되는데, 가독성을 높이고 인자 순서를 변경하지 않고도 \"\n\"명령어를 재배치할 수 있게 해주기 때문입니다.\"\n\n#: src/unsafe/asm.md:104\nmsgid \"We can further refine the above example to avoid the `mov` instruction:\"\nmsgstr \"위의 예제를 더 개선하여 `mov` 명령어를 피할 수 있습니다:\"\n\n#: src/unsafe/asm.md:118\nmsgid \"\"\n\"We can see that `inout` is used to specify an argument that is both input \"\n\"and output. This is different from specifying an input and output separately \"\n\"in that it is guaranteed to assign both to the same register.\"\nmsgstr \"\"\n\"`inout`이 입력과 출력 모두로 사용되는 인자를 지정하는 데 사용됨을 알 수 있습\"\n\"니다. 이는 입력과 출력을 따로 지정하는 것과 다른데, `inout`은 두 경우 모두 동\"\n\"일한 레지스터에 할당됨을 보장하기 때문입니다.\"\n\n#: src/unsafe/asm.md:121\nmsgid \"\"\n\"It is also possible to specify different variables for the input and output \"\n\"parts of an `inout` operand:\"\nmsgstr \"\"\n\"`inout` 피연산자의 입력과 출력 부분에 대해 서로 다른 변수를 지정하는 것도 가\"\n\"능합니다:\"\n\n#: src/unsafe/asm.md:136\nmsgid \"Late output operands\"\nmsgstr \"늦은(Late) 출력 피연산자\"\n\n#: src/unsafe/asm.md:85\nmsgid \"\"\n\"The Rust compiler is conservative with its allocation of operands. It is \"\n\"assumed that an `out` can be written at any time, and can therefore share \"\n\"its location with any other argument. However, to guarantee that the \"\n\"compiler will not use the same register for another argument because it is \"\n\"still required, use `&mut` operands:\"\nmsgstr \"\"\n\"Rust 컴파일러는 피연산자 할당에 보수적입니다. `out`은 언제든지 쓰일 수 있다\"\n\"고 가정되며, 따라서 다른 인자와 위치를 공유할 수 있습니다. 하지만 컴파일러\"\n\"가 여전히 필요하다는 이유로 다른 인자에 같은 레지스터를 사용하지 않도록 보장\"\n\"하려면 `&mut` 피연산자를 사용하세요:\"\n\n#: src/unsafe/asm.md:146\nmsgid \"\"\n\"Here is an example where `inlateout` _cannot_ be used in `release` mode or \"\n\"other optimized cases:\"\nmsgstr \"\"\n\"`release` 모드나 기타 최적화된 경우에 `inlateout`을 사용할 수 _없는_ 예시는 \"\n\"다음과 같습니다:\"\n\n#: src/unsafe/asm.md:157 src/unsafe/asm.md:189 src/unsafe/asm.md:472\nmsgid \"\\\"add {0}, {1}\\\"\"\nmsgstr \"\\\"add {0}, {1}\\\"\"\n\n#: src/unsafe/asm.md:158\nmsgid \"\\\"add {0}, {2}\\\"\"\nmsgstr \"\\\"add {0}, {2}\\\"\"\n\n#: src/unsafe/asm.md:168\nmsgid \"\"\n\"In unoptimized cases (e.g. `Debug` mode), replacing `inout(reg) a` with \"\n\"`inlateout(reg) a` in the above example can continue to give the expected \"\n\"result. However, with `release` mode or other optimized cases, using \"\n\"`inlateout(reg) a` can instead lead to the final value `a = 16`, causing the \"\n\"assertion to fail.\"\nmsgstr \"\"\n\"최적화되지 않은 경우(예: `Debug` 모드), 위 예제에서 `inout(reg) a`를 \"\n\"`inlateout(reg) a`로 대체해도 계속해서 예상된 결과를 얻을 수 있습니다. 그러\"\n\"나 `release` 모드나 기타 최적화된 경우에는 `inlateout(reg) a`를 사용하면 최\"\n\"종 값이 `a = 16`이 되어 단언(assertion)이 실패할 수 있습니다.\"\n\n#: src/unsafe/asm.md:173\nmsgid \"\"\n\"This is because in optimized cases, the compiler is free to allocate the \"\n\"same register for inputs `b` and `c` since it knows that they have the same \"\n\"value. Furthermore, when `inlateout` is used, `a` and `c` could be allocated \"\n\"to the same register, in which case the first `add` instruction would \"\n\"overwrite the initial load from variable `c`. This is in contrast to how \"\n\"using `inout(reg) a` ensures a separate register is allocated for `a`.\"\nmsgstr \"\"\n\"이는 최적화된 경우 컴파일러가 입력 `b`와 `c`에 대해 동일한 값을 가지고 있음\"\n\"을 알고 있으므로 동일한 레지스터를 할당할 수 있기 때문입니다. 또한 \"\n\"`inlateout`이 사용될 때 `a`와 `c`가 동일한 레지스터에 할당될 수 있는데, 이 경\"\n\"우 첫 번째 `add` 명령어가 변수 `c`로부터의 초기 로드 값을 덮어쓰게 됩니다. 이\"\n\"는 `inout(reg) a`를 사용하여 `a`에 대해 별도의 레지스터가 할당되도록 보장하\"\n\"는 것과 대조적입니다.\"\n\n#: src/unsafe/asm.md:179\nmsgid \"\"\n\"However, the following example can use `inlateout` since the output is only \"\n\"modified after all input registers have been read:\"\nmsgstr \"\"\n\"하지만 다음 예제에서는 모든 입력 레지스터를 읽은 후에만 출력이 수정되므로 \"\n\"`inlateout`을 사용할 수 있습니다:\"\n\n#: src/unsafe/asm.md:195\nmsgid \"\"\n\"As you can see, this assembly fragment will still work correctly if `a` and \"\n\"`b` are assigned to the same register.\"\nmsgstr \"\"\n\"보시다시피, `a`와 `b`가 동일한 레지스터에 할당되더라도 이 어셈블리 조각은 여\"\n\"전히 올바르게 작동할 것입니다.\"\n\n#: src/unsafe/asm.md:197\nmsgid \"Explicit register operands\"\nmsgstr \"명시적 레지스터 피연산자\"\n\n#: src/unsafe/asm.md:199\nmsgid \"\"\n\"Some instructions require that the operands be in a specific register. \"\n\"Therefore, Rust inline assembly provides some more specific constraint \"\n\"specifiers. While `reg` is generally available on any architecture, explicit \"\n\"registers are highly architecture specific. E.g. for x86 the general purpose \"\n\"registers `eax`, `ebx`, `ecx`, `edx`, `ebp`, `esi`, and `edi` among others \"\n\"can be addressed by their name.\"\nmsgstr \"\"\n\"일부 명령어는 피연산자가 특정 레지스터에 있어야 함을 요구합니다. 따라서 Rust \"\n\"인라인 어셈블리는 몇 가지 더 구체적인 제약 지정자를 제공합니다. `reg`는 일반\"\n\"적으로 모든 아키텍처에서 사용할 수 있지만, 명시적 레지스터는 아키텍처에 따라 \"\n\"매우 다릅니다. 예를 들어 x86의 경우 `eax`, `ebx`, `ecx`, `edx`, `ebp`, \"\n\"`esi`, `edi` 등의 범용 레지스터를 이름으로 지정할 수 있습니다.\"\n\n#: src/unsafe/asm.md:209\nmsgid \"\\\"out 0x64, eax\\\"\"\nmsgstr \"\\\"out 0x64, eax\\\"\"\n\n#: src/unsafe/asm.md:209 src/unsafe/asm.md:285\nmsgid \"\\\"eax\\\"\"\nmsgstr \"\\\"eax\\\"\"\n\n#: src/unsafe/asm.md:214\nmsgid \"\"\n\"In this example we call the `out` instruction to output the content of the \"\n\"`cmd` variable to port `0x64`. Since the `out` instruction only accepts \"\n\"`eax` (and its sub registers) as operand we had to use the `eax` constraint \"\n\"specifier.\"\nmsgstr \"\"\n\"이 예제에서는 `out` 명령어를 호출하여 `cmd` 변수의 내용을 포트 `0x64`로 출력\"\n\"합니다. `out` 명령어는 `eax` (및 그 하위 레지스터)만을 피연산자로 받아들이므\"\n\"로 `eax` 제약 지정자를 사용해야 했습니다.\"\n\n#: src/unsafe/asm.md:216\nmsgid \"\"\n\"**Note**: unlike other operand types, explicit register operands cannot be \"\n\"used in the template string: you can't use `{}` and should write the \"\n\"register name directly instead. Also, they must appear at the end of the \"\n\"operand list after all other operand types.\"\nmsgstr \"\"\n\"**참고**: 다른 피연산자 타입과 달리 명시적 레지스터 피연산자는 템플릿 문자열\"\n\"에서 사용할 수 없습니다. `{}`를 사용할 수 없으며 대신 레지스터 이름을 직접 작\"\n\"성해야 합니다. 또한 다른 모든 피연산자 타입 뒤에 피연산자 목록의 마지막에 나\"\n\"타나야 합니다.\"\n\n#: src/unsafe/asm.md:218\nmsgid \"Consider this example which uses the x86 `mul` instruction:\"\nmsgstr \"x86 `mul` 명령어를 사용하는 이 예제를 살펴보세요:\"\n\n#: src/unsafe/asm.md:230\nmsgid \"\"\n\"// The x86 mul instruction takes rax as an implicit input and writes\\n\"\n\"            // the 128-bit result of the multiplication to rax:rdx.\\n\"\n\"            \\\"mul {}\\\"\"\nmsgstr \"\"\n\"// x86 mul 명령어는 rax를 암시적 입력으로 받고\\n\"\n\"            // 128비트 곱셈 결과를 rax:rdx에 씁니다.\\n\"\n\"            \\\"mul {}\\\"\"\n\n#: src/unsafe/asm.md:234 src/unsafe/asm.md:356\nmsgid \"\\\"rax\\\"\"\nmsgstr \"\\\"rax\\\"\"\n\n#: src/unsafe/asm.md:235\nmsgid \"\\\"rdx\\\"\"\nmsgstr \"\\\"rdx\\\"\"\n\n#: src/unsafe/asm.md:244\nmsgid \"\"\n\"This uses the `mul` instruction to multiply two 64-bit inputs with a 128-bit \"\n\"result. The only explicit operand is a register, that we fill from the \"\n\"variable `a`. The second operand is implicit, and must be the `rax` \"\n\"register, which we fill from the variable `b`. The lower 64 bits of the \"\n\"result are stored in `rax` from which we fill the variable `lo`. The higher \"\n\"64 bits are stored in `rdx` from which we fill the variable `hi`.\"\nmsgstr \"\"\n\"이 코드는 `mul` 명령어를 사용하여 두 개의 64비트 입력을 곱해 128비트 결과를 \"\n\"얻습니다. 유일한 명시적 피연산자는 레지스터이며, 변수 `a`로 채웁니다. 두 번\"\n\"째 피연산자는 암시적이며 `rax` 레지스터여야 하는데, 이는 변수 `b`로 채웁니\"\n\"다. 결과의 하위 64비트는 `rax`에 저장되어 변수 `lo`를 채우고, 상위 64비트는 \"\n\"`rdx`에 저장되어 변수 `hi`를 채웁니다.\"\n\n#: src/unsafe/asm.md:250\nmsgid \"Clobbered registers\"\nmsgstr \"클로버(Clobbered) 레지스터\"\n\n#: src/unsafe/asm.md:252\nmsgid \"\"\n\"In many cases inline assembly will modify state that is not needed as an \"\n\"output. Usually this is either because we have to use a scratch register in \"\n\"the assembly or because instructions modify state that we don't need to \"\n\"further examine. This state is generally referred to as being \\\"clobbered\\\". \"\n\"We need to tell the compiler about this since it may need to save and \"\n\"restore this state around the inline assembly block.\"\nmsgstr \"\"\n\"많은 경우 인라인 어셈블리는 출력으로 필요하지 않은 상태를 수정합니다. 보통 어\"\n\"셈블리 내에서 스크래치 레지스터를 사용해야 하거나, 명령어가 더 이상 검사할 필\"\n\"요가 없는 상태를 수정하기 때문입니다. 이러한 상태를 일반적으로 \\\"클로버\"\n\"(clobbered)\\\" 되었다고 합니다. 컴파일러가 인라인 어셈블리 블록 전후로 이러한 \"\n\"상태를 저장하고 복원해야 할 수도 있으므로 이를 컴파일러에 알려야 합니다.\"\n\n#: src/unsafe/asm.md:262\nmsgid \"// three entries of four bytes each\\n\"\nmsgstr \"// 각각 4바이트인 3개의 엔트리\\n\"\n\n#: src/unsafe/asm.md:264\nmsgid \"\"\n\"// String is stored as ascii in ebx, edx, ecx in order\\n\"\n\"    // Because ebx is reserved, the asm needs to preserve the value of it.\\n\"\n\"    // So we push and pop it around the main asm.\\n\"\n\"    // 64 bit mode on 64 bit processors does not allow pushing/popping of\\n\"\n\"    // 32 bit registers (like ebx), so we have to use the extended rbx \"\n\"register instead.\\n\"\nmsgstr \"\"\n\"// 문자열은 ebx, edx, ecx 순서대로 ASCII로 저장됩니다.\\n\"\n\"    // ebx는 예약되어 있으므로, 어셈블리는 이 값을 보존해야 합니다.\\n\"\n\"    // 따라서 메인 어셈블리 전후로 push와 pop을 수행합니다.\\n\"\n\"    // 64비트 프로세서의 64비트 모드에서는 32비트 레지스터(ebx와 같은)를\\n\"\n\"    // push/pop 하는 것을 허용하지 않으므로, 대신 확장된 rbx 레지스터를 사용\"\n\"해야 합니다.\\n\"\n\n#: src/unsafe/asm.md:272\nmsgid \"\\\"push rbx\\\"\"\nmsgstr \"\\\"push rbx\\\"\"\n\n#: src/unsafe/asm.md:273\nmsgid \"\\\"cpuid\\\"\"\nmsgstr \"\\\"cpuid\\\"\"\n\n#: src/unsafe/asm.md:274\nmsgid \"\\\"mov [rdi], ebx\\\"\"\nmsgstr \"\\\"mov [rdi], ebx\\\"\"\n\n#: src/unsafe/asm.md:275\nmsgid \"\\\"mov [rdi + 4], edx\\\"\"\nmsgstr \"\\\"mov [rdi + 4], edx\\\"\"\n\n#: src/unsafe/asm.md:276\nmsgid \"\\\"mov [rdi + 8], ecx\\\"\"\nmsgstr \"\\\"mov [rdi + 8], ecx\\\"\"\n\n#: src/unsafe/asm.md:277\nmsgid \"\\\"pop rbx\\\"\"\nmsgstr \"\\\"pop rbx\\\"\"\n\n#: src/unsafe/asm.md:278\nmsgid \"\"\n\"// We use a pointer to an array for storing the values to simplify\\n\"\n\"            // the Rust code at the cost of a couple more asm instructions\\n\"\n\"            // This is more explicit with how the asm works however, as \"\n\"opposed\\n\"\n\"            // to explicit register outputs such as `out(\\\"ecx\\\") val`\\n\"\n\"            // The *pointer itself* is only an input even though it's \"\n\"written behind\\n\"\nmsgstr \"\"\n\"// 몇 가지 어셈블리 명령어를 더 사용하는 대신 Rust 코드를 단순화하기 위해\\n\"\n\"            // 값을 저장하는 데 배열 포인터를 사용합니다.\\n\"\n\"            // 하지만 이는 `out(\\\"ecx\\\") val`과 같은 명시적 레지스터 출력과\"\n\"는 반대로\\n\"\n\"            // 어셈블리가 어떻게 작동하는지 더 명시적으로 보여줍니다.\\n\"\n\"            // *포인터 자체*는 비록 그 뒤에 값이 쓰여지더라도 입력일 뿐입니\"\n\"다.\\n\"\n\n#: src/unsafe/asm.md:283 src/unsafe/asm.md:354\nmsgid \"\\\"rdi\\\"\"\nmsgstr \"\\\"rdi\\\"\"\n\n#: src/unsafe/asm.md:284\nmsgid \"// select cpuid 0, also specify eax as clobbered\\n\"\nmsgstr \"// cpuid 0을 선택하고, eax를 클로버된 것으로 지정합니다.\\n\"\n\n#: src/unsafe/asm.md:286\nmsgid \"// cpuid clobbers these registers too\\n\"\nmsgstr \"// cpuid는 이 레지스터들도 클로버합니다.\\n\"\n\n#: src/unsafe/asm.md:287\nmsgid \"\\\"ecx\\\"\"\nmsgstr \"\\\"ecx\\\"\"\n\n#: src/unsafe/asm.md:288\nmsgid \"\\\"edx\\\"\"\nmsgstr \"\\\"edx\\\"\"\n\n#: src/unsafe/asm.md:293\nmsgid \"\\\"CPU Manufacturer ID: {}\\\"\"\nmsgstr \"\\\"CPU 제조사 ID: {}\\\"\"\n\n#: src/unsafe/asm.md:300\nmsgid \"\"\n\"In the example above we use the `cpuid` instruction to read the CPU \"\n\"manufacturer ID. This instruction writes to `eax` with the maximum supported \"\n\"`cpuid` argument and `ebx`, `edx`, and `ecx` with the CPU manufacturer ID as \"\n\"ASCII bytes in that order.\"\nmsgstr \"\"\n\"위의 예제에서는 `cpuid` 명령어를 사용하여 CPU 제조사 ID를 읽습니다. 이 명령어\"\n\"는 `eax`에 지원되는 최대 `cpuid` 인자를 쓰고, `ebx`, `edx`, `ecx` 순서대로 \"\n\"CPU 제조사 ID를 ASCII 바이트로 씁니다.\"\n\n#: src/unsafe/asm.md:303\nmsgid \"\"\n\"Even though `eax` is never read we still need to tell the compiler that the \"\n\"register has been modified so that the compiler can save any values that \"\n\"were in these registers before the asm. This is done by declaring it as an \"\n\"output but with `_` instead of a variable name, which indicates that the \"\n\"output value is to be discarded.\"\nmsgstr \"\"\n\"`eax`는 결코 읽히지 않지만, 컴파일러가 어셈블리 이전의 레지스터 값을 저장할 \"\n\"수 있도록 레지스터가 수정되었음을 알려야 합니다. 이는 출력으로 선언하되 변수 \"\n\"이름 대신 `_`를 사용하여 수행하며, 이는 출력 값을 버림을 나타냅니다.\"\n\n#: src/unsafe/asm.md:305\nmsgid \"\"\n\"This code also works around the limitation that `ebx` is a reserved register \"\n\"by LLVM. That means that LLVM assumes that it has full control over the \"\n\"register and it must be restored to its original state before exiting the \"\n\"asm block, so it cannot be used as an input or output **except** if the \"\n\"compiler uses it to fulfill a general register class (e.g. `in(reg)`). This \"\n\"makes `reg` operands dangerous when using reserved registers as we could \"\n\"unknowingly corrupt our input or output because they share the same register.\"\nmsgstr \"\"\n\"이 코드는 `ebx`가 LLVM에 의해 예약된 레지스터라는 제한 사항도 해결합니다. 이\"\n\"는 LLVM이 해당 레지스터를 완전히 제어한다고 가정하며 어셈블리 블록을 종료하\"\n\"기 전에 원래 상태로 복원해야 함을 의미합니다. 따라서 컴파일러가 일반 레지스\"\n\"터 클래스(예: `in(reg)`)를 충족하기 위해 사용하는 경우를 **제외**하고는 입력\"\n\"이나 출력으로 사용할 수 없습니다. 이로 인해 예약된 레지스터를 사용할 때 \"\n\"`reg` 피연산자는 위험할 수 있는데, 동일한 레지스터를 공유하여 자신도 모르게 \"\n\"입력이나 출력을 손상시킬 수 있기 때문입니다.\"\n\n#: src/unsafe/asm.md:307\nmsgid \"\"\n\"To work around this we use `rdi` to store the pointer to the output array, \"\n\"save `ebx` via `push`, read from `ebx` inside the asm block into the array \"\n\"and then restore `ebx` to its original state via `pop`. The `push` and `pop` \"\n\"use the full 64-bit `rbx` version of the register to ensure that the entire \"\n\"register is saved. On 32 bit targets the code would instead use `ebx` in the \"\n\"`push`/`pop`.\"\nmsgstr \"\"\n\"이를 해결하기 위해 `rdi`를 사용하여 출력 배열에 대한 포인터를 저장하고, \"\n\"`push`를 통해 `ebx`를 저장한 후, 어셈블리 블록 내에서 `ebx`로부터 배열로 읽\"\n\"어 들인 다음, `pop`을 통해 `ebx`를 원래 상태로 복원합니다. 전체 레지스터가 저\"\n\"장되도록 `push`와 `pop`은 레지스터의 64비트 버전인 `rbx`를 사용합니다. 32비\"\n\"트 타겟의 경우 코드에서 대신 `ebx`를 `push`/`pop`에 사용할 것입니다.\"\n\n#: src/unsafe/asm.md:309\nmsgid \"\"\n\"This can also be used with a general register class to obtain a scratch \"\n\"register for use inside the asm code:\"\nmsgstr \"\"\n\"이는 어셈블리 코드 내부에서 사용할 스크래치 레지스터를 얻기 위해 일반 레지스\"\n\"터 클래스와 함께 사용될 수도 있습니다.\"\n\n#: src/unsafe/asm.md:314\nmsgid \"// Multiply x by 6 using shifts and adds\\n\"\nmsgstr \"// 시프트와 더하기를 사용하여 x에 6을 곱함\\n\"\n\n#: src/unsafe/asm.md:319\nmsgid \"\\\"mov {tmp}, {x}\\\"\"\nmsgstr \"\\\"mov {tmp}, {x}\\\"\"\n\n#: src/unsafe/asm.md:320\nmsgid \"\\\"shl {tmp}, 1\\\"\"\nmsgstr \"\\\"shl {tmp}, 1\\\"\"\n\n#: src/unsafe/asm.md:321\nmsgid \"\\\"shl {x}, 2\\\"\"\nmsgstr \"\\\"shl {x}, 2\\\"\"\n\n#: src/unsafe/asm.md:322\nmsgid \"\\\"add {x}, {tmp}\\\"\"\nmsgstr \"\\\"add {x}, {tmp}\\\"\"\n\n#: src/unsafe/asm.md:331\nmsgid \"Symbol operands and ABI clobbers\"\nmsgstr \"심볼 피연산자와 ABI 클로버\"\n\n#: src/unsafe/asm.md:333\nmsgid \"\"\n\"By default, `asm!` assumes that any register not specified as an output will \"\n\"have its contents preserved by the assembly code. The [`clobber_abi`]\"\n\"(https://doc.rust-lang.org/stable/reference/inline-assembly.html#abi-\"\n\"clobbers) argument to `asm!` tells the compiler to automatically insert the \"\n\"necessary clobber operands according to the given calling convention ABI: \"\n\"any register which is not fully preserved in that ABI will be treated as \"\n\"clobbered.  Multiple `clobber_abi` arguments may be provided and all \"\n\"clobbers from all specified ABIs will be inserted.\"\nmsgstr \"\"\n\"기본적으로 `asm!`은 출력으로 지정되지 않은 모든 레지스터의 내용이 어셈블리 코\"\n\"드에 의해 보존된다고 가정합니다. `asm!`의 [`clobber_abi`](https://doc.rust-\"\n\"lang.org/stable/reference/inline-assembly.html#abi-clobbers) 인자는 컴파일러\"\n\"가 주어진 호출 규약 ABI에 따라 필요한 클로버 피연산자를 자동으로 삽입하도록 \"\n\"지시합니다. 해당 ABI에서 완전히 보존되지 않는 모든 레지스터는 클로버된 것으\"\n\"로 취급됩니다. 여러 `clobber_abi` 인자를 제공할 수 있으며, 지정된 모든 ABI의 \"\n\"모든 클로버가 삽입됩니다.\"\n\n#: src/unsafe/asm.md:341 src/unsafe/asm.md:359\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe/asm.md:342\nmsgid \"\\\"arg = {}\\\"\"\nmsgstr \"\\\"인자 = {}\\\"\"\n\n#: src/unsafe/asm.md:350\nmsgid \"\\\"call {}\\\"\"\nmsgstr \"\\\"call {}\\\"\"\n\n#: src/unsafe/asm.md:351\nmsgid \"// Function pointer to call\\n\"\nmsgstr \"// 호출할 함수 포인터\\n\"\n\n#: src/unsafe/asm.md:353\nmsgid \"// 1st argument in rdi\\n\"\nmsgstr \"// 첫 번째 인자는 rdi에\\n\"\n\n#: src/unsafe/asm.md:355\nmsgid \"// Return value in rax\\n\"\nmsgstr \"// 반환 값은 rax에\\n\"\n\n#: src/unsafe/asm.md:357\nmsgid \"\"\n\"// Mark all registers which are not preserved by the \\\"C\\\" calling\\n\"\n\"            // convention as clobbered.\\n\"\nmsgstr \"\"\n\"// \\\"C\\\" 호출 규약에 의해 보존되지 않는 모든 레지스터를 클로버된 것으로 표시\"\n\"합니다.\\n\"\n\n#: src/unsafe/asm.md:367\nmsgid \"Register template modifiers\"\nmsgstr \"레지스터 템플릿 수정자\"\n\n#: src/unsafe/asm.md:369\nmsgid \"\"\n\"In some cases, fine control is needed over the way a register name is \"\n\"formatted when inserted into the template string. This is needed when an \"\n\"architecture's assembly language has several names for the same register, \"\n\"each typically being a \\\"view\\\" over a subset of the register (e.g. the low \"\n\"32 bits of a 64-bit register).\"\nmsgstr \"\"\n\"어떤 경우에는 템플릿 문자열에 삽입될 때 레지스터 이름이 포맷팅되는 방식에 대\"\n\"해 세밀한 제어가 필요합니다. 이는 아키텍처의 어셈블리 언어에 동일한 레지스터\"\n\"에 대한 여러 이름이 있을 때 필요하며, 각 이름은 일반적으로 레지스터 일부에 대\"\n\"한 \\\"뷰(view)\\\"입니다(예: 64비트 레지스터의 하위 32비트).\"\n\n#: src/unsafe/asm.md:371\nmsgid \"\"\n\"By default the compiler will always choose the name that refers to the full \"\n\"register size (e.g. `rax` on x86-64, `eax` on x86, etc).\"\nmsgstr \"\"\n\"기본적으로 컴파일러는 항상 전체 레지스터 크기를 참조하는 이름을 선택합니다\"\n\"(예: x86-64의 `rax`, x86의 `eax` 등).\"\n\n#: src/unsafe/asm.md:373\nmsgid \"\"\n\"This default can be overridden by using modifiers on the template string \"\n\"operands, just like you would with format strings:\"\nmsgstr \"\"\n\"이 기본값은 형식 문자열에서처럼 템플릿 문자열 피연산자에 수정자를 사용하여 재\"\n\"정의할 수 있습니다.\"\n\n#: src/unsafe/asm.md:382\nmsgid \"\\\"mov {0:h}, {0:l}\\\"\"\nmsgstr \"\\\"mov {0:h}, {0:l}\\\"\"\n\n#: src/unsafe/asm.md:389\nmsgid \"\"\n\"In this example, we use the `reg_abcd` register class to restrict the \"\n\"register allocator to the 4 legacy x86 registers (`ax`, `bx`, `cx`, `dx`) of \"\n\"which the first two bytes can be addressed independently.\"\nmsgstr \"\"\n\"이 예제에서는 `reg_abcd` 레지스터 클래스를 사용하여 레지스터 할당자를 처음 \"\n\"두 바이트를 독립적으로 주소 지정할 수 있는 4개의 레거시 x86 레지스터(`ax`, \"\n\"`bx`, `cx`, `dx`)로 제한합니다.\"\n\n#: src/unsafe/asm.md:391\nmsgid \"\"\n\"Let us assume that the register allocator has chosen to allocate `x` in the \"\n\"`ax` register. The `h` modifier will emit the register name for the high \"\n\"byte of that register and the `l` modifier will emit the register name for \"\n\"the low byte. The asm code will therefore be expanded as `mov ah, al` which \"\n\"copies the low byte of the value into the high byte.\"\nmsgstr \"\"\n\"레지스터 할당자가 `x`를 `ax` 레지스터에 할당하기로 선택했다고 가정해 봅시다. \"\n\"`h` 수정자는 해당 레지스터의 상위 바이트에 대한 레지스터 이름을 출력하고, \"\n\"`l` 수정자는 하위 바이트에 대한 레지스터 이름을 출력합니다. 따라서 어셈블리 \"\n\"코드는 `mov ah, al`로 확장되어 값의 하위 바이트를 상위 바이트로 복사합니다.\"\n\n#: src/unsafe/asm.md:394\nmsgid \"\"\n\"If you use a smaller data type (e.g. `u16`) with an operand and forget to \"\n\"use template modifiers, the compiler will emit a warning and suggest the \"\n\"correct modifier to use.\"\nmsgstr \"\"\n\"피연산자와 함께 더 작은 데이터 타입(예: `u16`)을 사용하면서 템플릿 수정자를 \"\n\"사용하는 것을 잊은 경우, 컴파일러는 경고를 내보내고 사용할 올바른 수정자를 제\"\n\"안합니다.\"\n\n#: src/unsafe/asm.md:396\nmsgid \"Memory address operands\"\nmsgstr \"메모리 주소 피연산자\"\n\n#: src/unsafe/asm.md:398\nmsgid \"\"\n\"Sometimes assembly instructions require operands passed via memory addresses/\"\n\"memory locations. You have to manually use the memory address syntax \"\n\"specified by the target architecture. For example, on x86/x86_64 using Intel \"\n\"assembly syntax, you should wrap inputs/outputs in `[]` to indicate they are \"\n\"memory operands:\"\nmsgstr \"\"\n\"때로는 어셈블리 명령어가 메모리 주소/메모리 위치를 통해 전달되는 피연산자를 \"\n\"요구합니다. 타겟 아키텍처에 지정된 메모리 주소 구문을 수동으로 사용해야 합니\"\n\"다. 예를 들어, Intel 어셈블리 구문을 사용하는 x86/x86_64에서는 입력/출력을 \"\n\"`[]`로 감싸서 메모리 피연산자임을 나타내야 합니다.\"\n\n#: src/unsafe/asm.md:408\nmsgid \"\\\"fldcw [{}]\\\"\"\nmsgstr \"\\\"fldcw [{}]\\\"\"\n\n#: src/unsafe/asm.md:414\nmsgid \"Labels\"\nmsgstr \"레이블\"\n\n#: src/unsafe/asm.md:416\nmsgid \"\"\n\"Any reuse of a named label, local or otherwise, can result in an assembler \"\n\"or linker error or may cause other strange behavior. Reuse of a named label \"\n\"can happen in a variety of ways including:\"\nmsgstr \"\"\n\"이름이 지정된 레이블(로컬이든 아니든)을 재사용하면 어셈블러나 링커 오류가 발\"\n\"생하거나 기타 이상한 동작이 발생할 수 있습니다. 이름이 지정된 레이블의 재사용\"\n\"은 다음과 같은 다양한 방식으로 발생할 수 있습니다.\"\n\n#: src/unsafe/asm.md:418\nmsgid \"\"\n\"explicitly: using a label more than once in one `asm!` block, or multiple \"\n\"times across blocks.\"\nmsgstr \"\"\n\"명시적으로: 하나의 `asm!` 블록에서 레이블을 두 번 이상 사용하거나, 블록 간에 \"\n\"여러 번 사용하는 경우.\"\n\n#: src/unsafe/asm.md:419\nmsgid \"\"\n\"implicitly via inlining: the compiler is allowed to instantiate multiple \"\n\"copies of an `asm!` block, for example when the function containing it is \"\n\"inlined in multiple places.\"\nmsgstr \"\"\n\"인라이닝을 통한 암시적 방식: 컴파일러는 `asm!` 블록의 여러 복사본을 인스턴스\"\n\"화할 수 있습니다. 예를 들어 해당 블록을 포함하는 함수가 여러 위치에서 인라이\"\n\"닝되는 경우가 이에 해당합니다.\"\n\n#: src/unsafe/asm.md:420\nmsgid \"\"\n\"implicitly via LTO: LTO can cause code from _other crates_ to be placed in \"\n\"the same codegen unit, and so could bring in arbitrary labels.\"\nmsgstr \"\"\n\"LTO를 통한 암시적 방식: LTO는 _다른 크레이트_의 코드를 동일한 코드 생성 단위\"\n\"에 배치할 수 있으며, 이로 인해 임의의 레이블이 유입될 수 있습니다.\"\n\n#: src/unsafe/asm.md:422\nmsgid \"\"\n\"As a consequence, you should only use GNU assembler **numeric** [local \"\n\"labels](https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-\"\n\"Labels) inside inline assembly code. Defining symbols in assembly code may \"\n\"lead to assembler and/or linker errors due to duplicate symbol definitions.\"\nmsgstr \"\"\n\"결과적으로, 인라인 어셈블리 코드 내부에서는 GNU 어셈블러 **숫자** [로컬 레이\"\n\"블](https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-Labels)\"\n\"만 사용해야 합니다. 어셈블리 코드에서 심볼을 정의하면 심볼 중복 정의로 인해 \"\n\"어셈블러 및/또는 링커 오류가 발생할 수 있습니다.\"\n\n#: src/unsafe/asm.md:424\nmsgid \"\"\n\"Moreover, on x86 when using the default Intel syntax, due to [an LLVM bug]\"\n\"(https://bugs.llvm.org/show_bug.cgi?id=36144), you shouldn't use labels \"\n\"exclusively made of `0` and `1` digits, e.g. `0`, `11` or `101010`, as they \"\n\"may end up being interpreted as binary values. Using `options(att_syntax)` \"\n\"will avoid any ambiguity, but that affects the syntax of the _entire_ `asm!` \"\n\"block. (See [Options](#options), below, for more on `options`.)\"\nmsgstr \"\"\n\"또한 x86에서 기본 Intel 구문을 사용할 때, [LLVM 버그](https://bugs.llvm.org/\"\n\"show_bug.cgi?id=36144)로 인해 `0`, `11` 또는 `101010`과 같이 `0`과 `1` 숫자로\"\n\"만 구성된 레이블은 사용하지 말아야 합니다. 이는 바이너리 값으로 해석될 수 있\"\n\"기 때문입니다. `options(att_syntax)`를 사용하면 모호함을 피할 수 있지만, 이\"\n\"는 `asm!` 블록 _전체_의 구문에 영향을 미칩니다. (`options`에 대한 자세한 내용\"\n\"은 아래의 [옵션](#options) 섹션을 참조하세요.)\"\n\n#: src/unsafe/asm.md:433\nmsgid \"\\\"mov {0}, 10\\\"\"\nmsgstr \"\\\"mov {0}, 10\\\"\"\n\n#: src/unsafe/asm.md:434 src/unsafe/asm.md:439\nmsgid \"\\\"2:\\\"\"\nmsgstr \"\\\"2:\\\"\"\n\n#: src/unsafe/asm.md:435\nmsgid \"\\\"sub {0}, 1\\\"\"\nmsgstr \"\\\"sub {0}, 1\\\"\"\n\n#: src/unsafe/asm.md:436\nmsgid \"\\\"cmp {0}, 3\\\"\"\nmsgstr \"\\\"cmp {0}, 3\\\"\"\n\n#: src/unsafe/asm.md:437\nmsgid \"\\\"jle 2f\\\"\"\nmsgstr \"\\\"jle 2f\\\"\"\n\n#: src/unsafe/asm.md:438\nmsgid \"\\\"jmp 2b\\\"\"\nmsgstr \"\\\"jmp 2b\\\"\"\n\n#: src/unsafe/asm.md:440\nmsgid \"\\\"add {0}, 2\\\"\"\nmsgstr \"\\\"add {0}, 2\\\"\"\n\n#: src/unsafe/asm.md:448\nmsgid \"\"\n\"This will decrement the `{0}` register value from 10 to 3, then add 2 and \"\n\"store it in `a`.\"\nmsgstr \"\"\n\"이 코드는 `{0}` 레지스터 값을 10에서 3으로 감소시킨 다음, 2를 더하고 그 결과\"\n\"를 `a`에 저장합니다.\"\n\n#: src/unsafe/asm.md:450\nmsgid \"This example shows a few things:\"\nmsgstr \"이 예제는 몇 가지를 보여줍니다:\"\n\n#: src/unsafe/asm.md:452\nmsgid \"\"\n\"First, that the same number can be used as a label multiple times in the \"\n\"same inline block.\"\nmsgstr \"\"\n\"첫째, 동일한 숫자를 하나의 인라인 블록 내에서 레이블로 여러 번 사용할 수 있습\"\n\"니다.\"\n\n#: src/unsafe/asm.md:453\nmsgid \"\"\n\"Second, that when a numeric label is used as a reference (as an instruction \"\n\"operand, for example), the suffixes “b” (“backward”) or ”f” (“forward”) \"\n\"should be added to the numeric label. It will then refer to the nearest \"\n\"label defined by this number in this direction.\"\nmsgstr \"\"\n\"둘째, 숫자 레이블이 참조(예: 명령어 피연산자)로 사용될 때는 숫자 레이블에 접\"\n\"미사 “b” (“backward”, 뒤로) 또는 ”f” (“forward”, 앞으로)를 추가해야 합니다. \"\n\"그러면 해당 방향에서 이 숫자로 정의된 가장 가까운 레이블을 참조하게 됩니다.\"\n\n#: src/unsafe/asm.md:458\nmsgid \"Options\"\nmsgstr \"옵션\"\n\n#: src/unsafe/asm.md:460\nmsgid \"\"\n\"By default, an inline assembly block is treated the same way as an external \"\n\"FFI function call with a custom calling convention: it may read/write \"\n\"memory, have observable side effects, etc. However, in many cases it is \"\n\"desirable to give the compiler more information about what the assembly code \"\n\"is actually doing so that it can optimize better.\"\nmsgstr \"\"\n\"기본적으로 인라인 어셈블리 블록은 커스텀 호출 규약을 사용하는 외부 FFI 함수 \"\n\"호출과 동일하게 취급됩니다. 즉, 메모리를 읽거나 쓰고, 관찰 가능한 부수 효과\"\n\"가 있을 수 있다고 가정합니다. 하지만 많은 경우 컴파일러가 더 나은 최적화를 수\"\n\"행할 수 있도록 어셈블리 코드가 실제로 무엇을 하는지에 대한 더 많은 정보를 제\"\n\"공하는 것이 바람직합니다.\"\n\n#: src/unsafe/asm.md:462\nmsgid \"Let's take our previous example of an `add` instruction:\"\nmsgstr \"이전의 `add` 명령어 예제를 다시 살펴봅시다:\"\n\n#: src/unsafe/asm.md:481\nmsgid \"\"\n\"Options can be provided as an optional final argument to the `asm!` macro. \"\n\"We specified three options here:\"\nmsgstr \"\"\n\"옵션은 `asm!` 매크로의 선택적인 마지막 인자로 제공될 수 있습니다. 여기서는 \"\n\"세 가지 옵션을 지정했습니다:\"\n\n#: src/unsafe/asm.md:483\nmsgid \"\"\n\"`pure` means that the asm code has no observable side effects and that its \"\n\"output depends only on its inputs. This allows the compiler optimizer to \"\n\"call the inline asm fewer times or even eliminate it entirely.\"\nmsgstr \"\"\n\"`pure`는 어셈블리 코드가 관찰 가능한 부수 효과가 없으며 출력이 입력에만 의존\"\n\"함을 의미합니다. 이를 통해 컴파일러 최적화 프로그램은 인라인 어셈블리를 더 적\"\n\"게 호출하거나 아예 제거할 수 있습니다.\"\n\n#: src/unsafe/asm.md:484\nmsgid \"\"\n\"`nomem` means that the asm code does not read or write to memory. By default \"\n\"the compiler will assume that inline assembly can read or write any memory \"\n\"address that is accessible to it (e.g. through a pointer passed as an \"\n\"operand, or a global).\"\nmsgstr \"\"\n\"`nomem`은 어셈블리 코드가 메모리를 읽거나 쓰지 않음을 의미합니다. 기본적으로 \"\n\"컴파일러는 인라인 어셈블리가 접근 가능한 모든 메모리 주소(예: 피연산자로 전달\"\n\"된 포인터나 전역 변수를 통해)를 읽거나 쓸 수 있다고 가정합니다.\"\n\n#: src/unsafe/asm.md:485\nmsgid \"\"\n\"`nostack` means that the asm code does not push any data onto the stack. \"\n\"This allows the compiler to use optimizations such as the stack red zone on \"\n\"x86-64 to avoid stack pointer adjustments.\"\nmsgstr \"\"\n\"`nostack`은 어셈블리 코드가 스택에 어떤 데이터도 푸시하지 않음을 의미합니다. \"\n\"이를 통해 컴파일러는 x86-64의 스택 레드 존(stack red zone)과 같은 최적화를 사\"\n\"용하여 스택 포인터 조정을 피할 수 있습니다.\"\n\n#: src/unsafe/asm.md:487\nmsgid \"\"\n\"These allow the compiler to better optimize code using `asm!`, for example \"\n\"by eliminating pure `asm!` blocks whose outputs are not needed.\"\nmsgstr \"\"\n\"이러한 옵션들은 컴파일러가 `asm!`을 사용하는 코드를 더 잘 최적화할 수 있게 해\"\n\"줍니다. 예를 들어 출력이 필요하지 않은 순수(pure) `asm!` 블록을 제거할 수 있\"\n\"습니다.\"\n\n#: src/unsafe/asm.md:489\nmsgid \"\"\n\"See the [reference](https://doc.rust-lang.org/stable/reference/inline-\"\n\"assembly.html) for the full list of available options and their effects.\"\nmsgstr \"\"\n\"사용 가능한 전체 옵션 목록과 그 효과에 대해서는 [레퍼런스](https://doc.rust-\"\n\"lang.org/stable/reference/inline-assembly.html)를 참조하세요.\"\n\n#: src/compatibility.md:3\nmsgid \"\"\n\"The Rust language is evolving rapidly, and because of this certain \"\n\"compatibility issues can arise, despite efforts to ensure forwards-\"\n\"compatibility wherever possible.\"\nmsgstr \"\"\n\"Rust 언어는 빠르게 진화하고 있으며, 이로 인해 가능한 한 전방 호환성을 보장하\"\n\"려는 노력에도 불구하고 특정 호환성 문제가 발생할 수 있습니다.\"\n\n#: src/compatibility.md:7\nmsgid \"[Raw identifiers](compatibility/raw_identifiers.md)\"\nmsgstr \"[Raw 식별자](compatibility/raw_identifiers.md)\"\n\n#: src/compatibility/raw_identifiers.md:3\nmsgid \"\"\n\"Rust, like many programming languages, has the concept of \\\"keywords\\\". \"\n\"These identifiers mean something to the language, and so you cannot use them \"\n\"in places like variable names, function names, and other places. Raw \"\n\"identifiers let you use keywords where they would not normally be allowed. \"\n\"This is particularly useful when Rust introduces new keywords, and a library \"\n\"using an older edition of Rust has a variable or function with the same name \"\n\"as a keyword introduced in a newer edition.\"\nmsgstr \"\"\n\"Rust는 많은 프로그래밍 언어와 마찬가지로 \\\"키워드\\\"라는 개념이 있습니다. 이러\"\n\"한 식별자들은 언어에 의미가 있으므로 변수 이름, 함수 이름 등에서 사용할 수 없\"\n\"습니다. Raw 식별자를 사용하면 일반적으로 허용되지 않는 위치에서 키워드를 사용\"\n\"할 수 있습니다. 이는 특히 Rust가 새로운 키워드를 도입하고, 이전 에디션의 Rust\"\n\"를 사용하는 라이브러리에 최신 에디션에서 도입된 키워드와 동일한 이름의 변수\"\n\"나 함수가 있을 때 유용합니다.\"\n\n#: src/compatibility/raw_identifiers.md:11\nmsgid \"\"\n\"For example, consider a crate `foo` compiled with the 2015 edition of Rust \"\n\"that exports a function named `try`. This keyword is reserved for a new \"\n\"feature in the 2018 edition, so without raw identifiers, we would have no \"\n\"way to name the function.\"\nmsgstr \"\"\n\"예를 들어, 2015 에디션 Rust로 컴파일된 `foo` 크레이트가 `try`라는 이름의 함수\"\n\"를 내보낸다고 가정해 봅시다. 이 키워드는 2018 에디션의 새로운 기능을 위해 예\"\n\"약되어 있으므로, Raw 식별자가 없다면 함수 이름을 지을 방법이 없을 것입니다.\"\n\n#: src/compatibility/raw_identifiers.md:24\nmsgid \"You'll get this error:\"\nmsgstr \"다음과 같은 오류가 발생합니다:\"\n\n#: src/compatibility/raw_identifiers.md:34\nmsgid \"You can write this with a raw identifier:\"\nmsgstr \"Raw 식별자를 사용하여 다음과 같이 작성할 수 있습니다:\"\n\n#: src/meta.md:3\nmsgid \"\"\n\"Some topics aren't exactly relevant to how you program runs but provide you \"\n\"tooling or infrastructure support which just makes things better for \"\n\"everyone. These topics include:\"\nmsgstr \"\"\n\"일부 주제는 프로그램의 실행 방식과 직접적인 관련은 없지만, 모든 사람에게 도움\"\n\"이 되는 도구 또는 인프라 지원을 제공합니다. 이러한 주제는 다음과 같습니다.\"\n\n#: src/meta.md:7\nmsgid \"\"\n\"[Documentation](meta/doc.md): Generate library documentation for users via \"\n\"the included `rustdoc`.\"\nmsgstr \"\"\n\"[문서화](meta/doc.md): 포함된 `rustdoc`을 통해 사용자를 위한 라이브러리 문서\"\n\"를 생성합니다.\"\n\n#: src/meta.md:9\nmsgid \"\"\n\"[Playground](meta/playground.md): Integrate the Rust Playground in your \"\n\"documentation.\"\nmsgstr \"\"\n\"[플레이그라운드](meta/playground.md): 문서에 Rust 플레이그라운드를 통합합니\"\n\"다.\"\n\n#: src/meta/doc.md:3\nmsgid \"\"\n\"Use `cargo doc` to build documentation in `target/doc`, `cargo doc --open` \"\n\"will automatically open it in your web browser.\"\nmsgstr \"\"\n\"`target/doc`에 문서를 빌드하려면 `cargo doc`을 사용하세요. `cargo doc --open`\"\n\"은 웹 브라우저에서 문서를 자동으로 엽니다.\"\n\n#: src/meta/doc.md:6\nmsgid \"\"\n\"Use `cargo test` to run all tests (including documentation tests), and \"\n\"`cargo test --doc` to only run documentation tests.\"\nmsgstr \"\"\n\"모든 테스트(문서 테스트 포함)를 실행하려면 `cargo test`를, 문서 테스트만 실행\"\n\"하려면 `cargo test --doc`을 사용하세요.\"\n\n#: src/meta/doc.md:9\nmsgid \"\"\n\"These commands will appropriately invoke `rustdoc` (and `rustc`) as required.\"\nmsgstr \"\"\n\"이러한 명령어들은 필요에 따라 `rustdoc`(및 `rustc`)을 적절히 호출합니다.\"\n\n#: src/meta/doc.md:11\nmsgid \"Doc comments\"\nmsgstr \"문서 주석\"\n\n#: src/meta/doc.md:13\nmsgid \"\"\n\"Doc comments are very useful for big projects that require documentation. \"\n\"When running `rustdoc`, these are the comments that get compiled into \"\n\"documentation. They are denoted by a `///`, and support [Markdown](https://\"\n\"en.wikipedia.org/wiki/Markdown).\"\nmsgstr \"\"\n\"문서 주석은 문서화가 필요한 큰 프로젝트에 매우 유용합니다. `rustdoc`을 실행\"\n\"할 때, 이 주석들이 문서로 컴파일됩니다. 이들은 `///`로 표시되며 [Markdown]\"\n\"(https://en.wikipedia.org/wiki/Markdown)을 지원합니다.\"\n\n#: src/meta/doc.md:18\nmsgid \"\\\"doc\\\"\"\nmsgstr \"\\\"doc\\\"\"\n\n#: src/meta/doc.md:19\nmsgid \"/// A human being is represented here\\n\"\nmsgstr \"/// 여기에 사람(human being)이 표현됩니다.\\n\"\n\n#: src/meta/doc.md:22\nmsgid \"/// A person must have a name, no matter how much Juliet may hate it\\n\"\nmsgstr \"/// 줄리엣이 아무리 싫어하더라도 사람은 이름을 가져야 합니다.\\n\"\n\n#: src/meta/doc.md:27\nmsgid \"\"\n\"/// Creates a person with the given name.\\n\"\n\"    ///\\n\"\n\"    /// # Examples\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // You can have rust code between fences inside the comments\\n\"\n\"    /// // If you pass --test to `rustdoc`, it will even test it for you!\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\nmsgstr \"\"\n\"/// 주어진 이름으로 사람을 생성합니다.\\n\"\n\"    ///\\n\"\n\"    /// # Examples\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // 주석 내부의 울타리(fence) 사이에 Rust 코드를 넣을 수 있습니다.\\n\"\n\"    /// // `rustdoc`에 --test를 전달하면, 코드 테스트까지 해줍니다!\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\n\n#: src/meta/doc.md:43\nmsgid \"\"\n\"/// Gives a friendly hello!\\n\"\n\"    ///\\n\"\n\"    /// Says \\\"Hello, [name](Person::name)\\\" to the `Person` it is called \"\n\"on.\\n\"\nmsgstr \"\"\n\"/// 친절하게 인사합니다!\\n\"\n\"    ///\\n\"\n\"    /// 호출된 `Person`의 이름을 사용하여 \\\"안녕, [name](Person::name)\\\"이라\"\n\"고 말합니다.\\n\"\n\n#: src/meta/doc.md:47\nmsgid \"\\\"Hello, {}!\\\"\"\nmsgstr \"\\\"안녕, {}!\\\"\"\n\n#: src/meta/doc.md:52\nmsgid \"\\\"John\\\"\"\nmsgstr \"\\\"존\\\"\"\n\n#: src/meta/doc.md:58\nmsgid \"\"\n\"To run the tests, first build the code as a library, then tell `rustdoc` \"\n\"where to find the library so it can link it into each doctest program:\"\nmsgstr \"\"\n\"테스트를 실행하려면 먼저 코드를 라이브러리로 빌드한 다음, `rustdoc`이 각 문\"\n\"서 테스트 프로그램에 링크할 수 있도록 라이브러리 위치를 알려주어야 합니다.\"\n\n#: src/meta/doc.md:61\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\n\n#: src/meta/doc.md:66\nmsgid \"Doc attributes\"\nmsgstr \"문서 속성\"\n\n#: src/meta/doc.md:68\nmsgid \"\"\n\"Below are a few examples of the most common `#[doc]` attributes used with \"\n\"`rustdoc`.\"\nmsgstr \"\"\n\"다음은 `rustdoc`과 함께 사용되는 가장 일반적인 `#[doc]` 속성의 몇 가지 예입니\"\n\"다.\"\n\n#: src/meta/doc.md:71\nmsgid \"`inline`\"\nmsgstr \"`inline`\"\n\n#: src/meta/doc.md:73\nmsgid \"Used to inline docs, instead of linking out to separate page.\"\nmsgstr \"\"\n\"별도의 페이지로 링크하는 대신 문서를 인라인으로 표시하는 데 사용됩니다.\"\n\n#: src/meta/doc.md:78\nmsgid \"/// bar docs\\n\"\nmsgstr \"/// bar 문서\\n\"\n\n#: src/meta/doc.md:81\nmsgid \"/// the docs for Bar\\n\"\nmsgstr \"/// Bar에 대한 문서\\n\"\n\n#: src/meta/doc.md:86\nmsgid \"`no_inline`\"\nmsgstr \"`no_inline`\"\n\n#: src/meta/doc.md:88\nmsgid \"Used to prevent linking out to separate page or anywhere.\"\nmsgstr \"별도의 페이지나 다른 곳으로 링크되는 것을 방지하는 데 사용됩니다.\"\n\n#: src/meta/doc.md:91\nmsgid \"// Example from libcore/prelude\\n\"\nmsgstr \"// libcore/prelude에서 가져온 예시\\n\"\n\n#: src/meta/doc.md:96\nmsgid \"`hidden`\"\nmsgstr \"`hidden`\"\n\n#: src/meta/doc.md:98\nmsgid \"Using this tells `rustdoc` not to include this in documentation:\"\nmsgstr \"이를 사용하면 `rustdoc`이 해당 항목을 문서에 포함하지 않도록 합니다.\"\n\n#: src/meta/doc.md:101\nmsgid \"// Example from the futures-rs library\\n\"\nmsgstr \"// futures-rs 라이브러리에서 가져온 예시\\n\"\n\n#: src/meta/doc.md:106\nmsgid \"\"\n\"For documentation, `rustdoc` is widely used by the community. It's what is \"\n\"used to generate the [std library docs](https://doc.rust-lang.org/std/).\"\nmsgstr \"\"\n\"문서화를 위해 커뮤니티에서는 `rustdoc`이 널리 사용됩니다. [표준 라이브러리 문\"\n\"서](https://doc.rust-lang.org/std/)를 생성하는 데 사용되는 도구이기도 합니다.\"\n\n#: src/meta/doc.md:111\nmsgid \"\"\n\"[The Rust Book: Making Useful Documentation Comments](https://doc.rust-\"\n\"lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-\"\n\"documentation-comments)\"\nmsgstr \"\"\n\"[The Rust Book: 유용한 문서 주석 만들기](https://doc.rust-lang.org/book/\"\n\"ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments)\"\n\n#: src/meta/doc.md:112\nmsgid \"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/index.html)\"\nmsgstr \"[rustdoc 책](https://doc.rust-lang.org/rustdoc/index.html)\"\n\n#: src/meta/doc.md:113\nmsgid \"\"\n\"[The Reference: Doc comments](https://doc.rust-lang.org/stable/reference/\"\n\"comments.html#doc-comments)\"\nmsgstr \"\"\n\"[The Reference: 문서 주석](https://doc.rust-lang.org/stable/reference/\"\n\"comments.html#doc-comments)\"\n\n#: src/meta/doc.md:114\nmsgid \"\"\n\"[RFC 1574: API Documentation Conventions](https://rust-lang.github.io/rfcs/\"\n\"1574-more-api-documentation-conventions.html#appendix-a-full-conventions-\"\n\"text)\"\nmsgstr \"\"\n\"[RFC 1574: API 문서 관례](https://rust-lang.github.io/rfcs/1574-more-api-\"\n\"documentation-conventions.html#appendix-a-full-conventions-text)\"\n\n#: src/meta/doc.md:115\nmsgid \"\"\n\"[RFC 1946: Relative links to other items from doc comments (intra-rustdoc \"\n\"links)](https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html)\"\nmsgstr \"\"\n\"[RFC 1946: 문서 주석에서 다른 아이템으로의 상대 링크 (intra-rustdoc links)]\"\n\"(https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html)\"\n\n#: src/meta/doc.md:116\nmsgid \"\"\n\"[Is there any documentation style guide for comments? (reddit)](https://\"\n\"www.reddit.com/r/rust/comments/ahb50s/\"\n\"is_there_any_documentation_style_guide_for/)\"\nmsgstr \"\"\n\"[주석에 대한 문서화 스타일 가이드가 있나요? (reddit)](https://www.reddit.com/\"\n\"r/rust/comments/ahb50s/is_there_any_documentation_style_guide_for/)\"\n\n#: src/meta/playground.md:3\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) is a way to experiment \"\n\"with Rust code through a web interface.\"\nmsgstr \"\"\n\"[Rust 플레이그라운드](https://play.rust-lang.org/)는 웹 인터페이스를 통해 \"\n\"Rust 코드를 실험해 볼 수 있는 방법입니다.\"\n\n#: src/meta/playground.md:6\nmsgid \"Using it with `mdbook`\"\nmsgstr \"`mdbook`에서 사용하기\"\n\n#: src/meta/playground.md:8\nmsgid \"\"\n\"In [`mdbook`](https://github.com/rust-lang/mdBook), you can make code \"\n\"examples playable and editable.\"\nmsgstr \"\"\n\"[`mdbook`](https://github.com/rust-lang/mdBook)에서는 코드 예제를 실행 가능하\"\n\"고 수정 가능하게 만들 수 있습니다.\"\n\n#: src/meta/playground.md:16\nmsgid \"\"\n\"This allows the reader to both run your code sample, but also modify and \"\n\"tweak it. The key here is the adding of the word `editable` to your \"\n\"codefence block separated by a comma.\"\nmsgstr \"\"\n\"이를 통해 독자는 코드 샘플을 실행할 뿐만 아니라 수정하고 조정해 볼 수도 있습\"\n\"니다. 여기서 핵심은 코드 펜스(codefence) 블록에 콤마로 구분하여 `editable`이\"\n\"라는 단어를 추가하는 것입니다.\"\n\n#: src/meta/playground.md:26\nmsgid \"\"\n\"Additionally, you can add `ignore` if you want `mdbook` to skip your code \"\n\"when it builds and tests.\"\nmsgstr \"빌드 및 테스트 시에.\"\n\n#: src/meta/playground.md:35\nmsgid \"Using it with docs\"\nmsgstr \"문서에서 사용하기\"\n\n#: src/meta/playground.md:37\nmsgid \"\"\n\"You may have noticed in some of the [official Rust docs](https://doc.rust-\"\n\"lang.org/core/) a button that says \\\"Run\\\", which opens the code sample up \"\n\"in a new tab in Rust Playground. This feature is enabled if you use the \"\n\"`#[doc]` attribute called [`html_playground_url`](https://doc.rust-lang.org/\"\n\"rustdoc/write-documentation/the-doc-attribute.html#html_playground_url).\"\nmsgstr \"\"\n\"[공식 Rust 문서](https://doc.rust-lang.org/core/) 중 일부에서 \\\"Run\\\"이라고 \"\n\"적힌 버튼을 본 적이 있을 것입니다. 이 버튼을 누르면 Rust 플레이그라운드의 새 \"\n\"탭에서 코드 샘플이 열립니다. 이 기능은 [`html_playground_url`](https://\"\n\"doc.rust-lang.org/rustdoc/write-documentation/the-doc-\"\n\"attribute.html#html_playground_url)이라는 `#[doc]` 속성을 사용하면 활성화됩니\"\n\"다.\"\n\n#: src/meta/playground.md:42\nmsgid \"\"\n\"````text\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\nmsgstr \"\"\n\"````text\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\n\n#: src/meta/playground.md:51\nmsgid \"[The Rust Playground](https://play.rust-lang.org/)\"\nmsgstr \"[Rust 플레이그라운드](https://play.rust-lang.org/)\"\n\n#: src/meta/playground.md:52\nmsgid \"\"\n\"[The Rust Playground On Github](https://github.com/integer32llc/rust-\"\n\"playground/)\"\nmsgstr \"\"\n\"[GitHub의 Rust 플레이그라운드](https://github.com/integer32llc/rust-\"\n\"playground/)\"\n\n#: src/meta/playground.md:53\nmsgid \"\"\n\"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)\"\nmsgstr \"\"\n\"[rustdoc 책](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)\"\n\n#~ msgid \"\"\n#~ \"While the former enables conditional compilation, the latter \"\n#~ \"conditionally evaluates to `true` or `false` literals, allowing for \"\n#~ \"checks at run-time. Both utilize identical argument syntax.\"\n#~ msgstr \"\"\n#~ \"전자는 조건부 컴파일을 가능하게 하는 반면, 후자는 조건부로 `true` 또는 \"\n#~ \"`false` 리터럴로 평가되어 런타임에 검사를 가능하게 합니다. 둘 다 동일한 인\"\n#~ \"자 문법을 사용합니다.\"\n\n#~ msgid \"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n#~ msgstr \"// 컴파일 타임 에러! 타입 불일치로 인해 비교할 수 없습니다:\\n\"\n\n#~ msgid \"\"\n#~ \"// This function takes ownership of the heap allocated memory from `b`\\n\"\n#~ \"    //destroy_box(b);\\n\"\n#~ msgstr \"// 이 함수는 `b`로부터 힙 할당 메모리의 소유권을 가져갑니다\\n\"\n"
  },
  {
    "path": "po/zh.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Rust By Example\\n\"\n\"POT-Creation-Date: 2025-08-08T08:55:44+08:00\\n\"\n\"PO-Revision-Date: 2024-08-17 22:13+0800\\n\"\n\"Last-Translator: Binlogo <binboy@live.com>\\n\"\n\"Language-Team: Chinese\\n\"\n\"Language: zh\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=1; plural=0;\\n\"\n\n#: src/SUMMARY.md:1\nmsgid \"Summary\"\nmsgstr \"Summary\"\n\n#: src/SUMMARY.md:3\nmsgid \"Introduction\"\nmsgstr \"介绍\"\n\n#: src/SUMMARY.md:5 src/hello.md:1\nmsgid \"Hello World\"\nmsgstr \"Hello World\"\n\n#: src/SUMMARY.md:6 src/hello/comment.md:1\nmsgid \"Comments\"\nmsgstr \"注释\"\n\n#: src/SUMMARY.md:7 src/hello/print.md:1\nmsgid \"Formatted print\"\nmsgstr \"格式化打印\"\n\n#: src/SUMMARY.md:8 src/hello/print/print_debug.md:1\nmsgid \"Debug\"\nmsgstr \"调试 Debug\"\n\n#: src/SUMMARY.md:9 src/hello/print/print_display.md:1\nmsgid \"Display\"\nmsgstr \"显示 Display\"\n\n#: src/SUMMARY.md:10 src/hello/print/print_display/testcase_list.md:1\nmsgid \"Testcase: List\"\nmsgstr \"测试实例：列表\"\n\n#: src/SUMMARY.md:11 src/hello/print/fmt.md:1\nmsgid \"Formatting\"\nmsgstr \"格式化\"\n\n#: src/SUMMARY.md:13 src/primitives.md:1\nmsgid \"Primitives\"\nmsgstr \"原生类型\"\n\n#: src/SUMMARY.md:14 src/primitives/literals.md:1\nmsgid \"Literals and operators\"\nmsgstr \"字面量和运算符\"\n\n#: src/SUMMARY.md:15 src/primitives/tuples.md:1\nmsgid \"Tuples\"\nmsgstr \"元组\"\n\n#: src/SUMMARY.md:16 src/primitives/array.md:1\nmsgid \"Arrays and Slices\"\nmsgstr \"数组和切片\"\n\n#: src/SUMMARY.md:18 src/custom_types.md:1\nmsgid \"Custom Types\"\nmsgstr \"自定义类型\"\n\n#: src/SUMMARY.md:19 src/custom_types/structs.md:1\nmsgid \"Structures\"\nmsgstr \"结构体\"\n\n#: src/SUMMARY.md:20 src/custom_types/enum.md:1\nmsgid \"Enums\"\nmsgstr \"枚举\"\n\n#: src/SUMMARY.md:21 src/custom_types/enum/enum_use.md:1\nmsgid \"use\"\nmsgstr \"use\"\n\n#: src/SUMMARY.md:22 src/custom_types/enum/c_like.md:1\nmsgid \"C-like\"\nmsgstr \"C 风格用法\"\n\n#: src/SUMMARY.md:23 src/custom_types/enum/testcase_linked_list.md:1\nmsgid \"Testcase: linked-list\"\nmsgstr \"测试实例：链表\"\n\n#: src/SUMMARY.md:24 src/custom_types/constants.md:1\nmsgid \"constants\"\nmsgstr \"常量\"\n\n#: src/SUMMARY.md:26 src/variable_bindings.md:1\nmsgid \"Variable Bindings\"\nmsgstr \"变量绑定\"\n\n#: src/SUMMARY.md:27 src/SUMMARY.md:120 src/SUMMARY.md:123\n#: src/variable_bindings/mut.md:1 src/scope/move/mut.md:1\n#: src/scope/borrow/mut.md:1\nmsgid \"Mutability\"\nmsgstr \"可变性\"\n\n#: src/SUMMARY.md:28 src/variable_bindings/scope.md:1\nmsgid \"Scope and Shadowing\"\nmsgstr \"作用域和遮蔽\"\n\n#: src/SUMMARY.md:29 src/variable_bindings/declare.md:1\nmsgid \"Declare first\"\nmsgstr \"先声明\"\n\n#: src/SUMMARY.md:30 src/variable_bindings/freeze.md:1\nmsgid \"Freezing\"\nmsgstr \"冻结\"\n\n#: src/SUMMARY.md:32 src/types.md:1\nmsgid \"Types\"\nmsgstr \"类型\"\n\n#: src/SUMMARY.md:33 src/types/cast.md:1\nmsgid \"Casting\"\nmsgstr \"类型转换\"\n\n#: src/SUMMARY.md:34 src/types/literals.md:1\nmsgid \"Literals\"\nmsgstr \"字面量\"\n\n#: src/SUMMARY.md:35 src/types/inference.md:1\nmsgid \"Inference\"\nmsgstr \"类型推断\"\n\n#: src/SUMMARY.md:36 src/SUMMARY.md:124 src/types/alias.md:1\n#: src/scope/borrow/alias.md:1\nmsgid \"Aliasing\"\nmsgstr \"别名\"\n\n#: src/SUMMARY.md:38 src/conversion.md:1\nmsgid \"Conversion\"\nmsgstr \"转换\"\n\n#: src/SUMMARY.md:39 src/conversion/from_into.md:1\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` 和 `Into`\"\n\n#: src/SUMMARY.md:40 src/conversion/try_from_try_into.md:1\nmsgid \"`TryFrom` and `TryInto`\"\nmsgstr \"`TryFrom` 和 `TryInto`\"\n\n#: src/SUMMARY.md:41\nmsgid \"To and from `String`s\"\nmsgstr \"`String` 类型转换\"\n\n#: src/SUMMARY.md:43 src/expression.md:1\nmsgid \"Expressions\"\nmsgstr \"表达式\"\n\n#: src/SUMMARY.md:45 src/flow_control.md:1\nmsgid \"Flow of Control\"\nmsgstr \"控制流\"\n\n#: src/SUMMARY.md:46 src/flow_control/if_else.md:1\nmsgid \"if/else\"\nmsgstr \"if/else\"\n\n#: src/SUMMARY.md:47 src/flow_control/loop.md:1\nmsgid \"loop\"\nmsgstr \"loop\"\n\n#: src/SUMMARY.md:48 src/flow_control/loop/nested.md:1\nmsgid \"Nesting and labels\"\nmsgstr \"嵌套和标签\"\n\n#: src/SUMMARY.md:49 src/flow_control/loop/return.md:1\nmsgid \"Returning from loops\"\nmsgstr \"在 loop 中返回值\"\n\n#: src/SUMMARY.md:50 src/flow_control/while.md:1\nmsgid \"while\"\nmsgstr \"while\"\n\n#: src/SUMMARY.md:51 src/flow_control/for.md:3\nmsgid \"for and range\"\nmsgstr \"for 和 range\"\n\n#: src/SUMMARY.md:52 src/flow_control/match.md:1\nmsgid \"match\"\nmsgstr \"match\"\n\n#: src/SUMMARY.md:53 src/flow_control/match/destructuring.md:1\nmsgid \"Destructuring\"\nmsgstr \"解构\"\n\n#: src/SUMMARY.md:54\n#: src/flow_control/match/destructuring/destructure_tuple.md:1\nmsgid \"tuples\"\nmsgstr \"元组\"\n\n#: src/SUMMARY.md:55\n#: src/flow_control/match/destructuring/destructure_slice.md:1\nmsgid \"arrays/slices\"\nmsgstr \"数组/切片\"\n\n#: src/SUMMARY.md:56 src/flow_control/match/destructuring/destructure_enum.md:1\nmsgid \"enums\"\nmsgstr \"枚举\"\n\n#: src/SUMMARY.md:57\n#: src/flow_control/match/destructuring/destructure_pointers.md:1\nmsgid \"pointers/ref\"\nmsgstr \"指针/引用\"\n\n#: src/SUMMARY.md:58\n#: src/flow_control/match/destructuring/destructure_structures.md:1\nmsgid \"structs\"\nmsgstr \"结构体\"\n\n#: src/SUMMARY.md:59 src/flow_control/match/guard.md:1\nmsgid \"Guards\"\nmsgstr \"守卫\"\n\n#: src/SUMMARY.md:60 src/flow_control/match/binding.md:1\nmsgid \"Binding\"\nmsgstr \"绑定\"\n\n#: src/SUMMARY.md:61 src/flow_control/if_let.md:1\nmsgid \"if let\"\nmsgstr \"if let\"\n\n#: src/SUMMARY.md:62 src/flow_control/let_else.md:1\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/SUMMARY.md:63 src/flow_control/while_let.md:1\nmsgid \"while let\"\nmsgstr \"while let\"\n\n#: src/SUMMARY.md:65 src/SUMMARY.md:103 src/SUMMARY.md:128 src/fn.md:1\n#: src/generics/gen_fn.md:1 src/scope/lifetime/fn.md:1\nmsgid \"Functions\"\nmsgstr \"函数\"\n\n#: src/SUMMARY.md:66 src/SUMMARY.md:129 src/scope/lifetime/methods.md:1\nmsgid \"Methods\"\nmsgstr \"方法\"\n\n#: src/SUMMARY.md:67 src/fn/closures.md:1\nmsgid \"Closures\"\nmsgstr \"闭包\"\n\n#: src/SUMMARY.md:68 src/fn/closures/capture.md:1\nmsgid \"Capturing\"\nmsgstr \"捕获\"\n\n#: src/SUMMARY.md:69 src/fn/closures/input_parameters.md:1\nmsgid \"As input parameters\"\nmsgstr \"作为输入参数\"\n\n#: src/SUMMARY.md:70 src/fn/closures/anonymity.md:1\nmsgid \"Type anonymity\"\nmsgstr \"类型匿名\"\n\n#: src/SUMMARY.md:71 src/fn/closures/input_functions.md:1\nmsgid \"Input functions\"\nmsgstr \"输入函数\"\n\n#: src/SUMMARY.md:72 src/fn/closures/output_parameters.md:1\nmsgid \"As output parameters\"\nmsgstr \"作为输出参数\"\n\n#: src/SUMMARY.md:73 src/fn/closures/closure_examples.md:1\nmsgid \"Examples in `std`\"\nmsgstr \"`std` 中的例子\"\n\n#: src/SUMMARY.md:74 src/fn/closures/closure_examples/iter_any.md:1\nmsgid \"Iterator::any\"\nmsgstr \"Iterator::any\"\n\n#: src/SUMMARY.md:75 src/fn/closures/closure_examples/iter_find.md:1\nmsgid \"Searching through iterators\"\nmsgstr \"通过迭代器搜索\"\n\n#: src/SUMMARY.md:76 src/fn/hof.md:1\nmsgid \"Higher Order Functions\"\nmsgstr \"高阶函数\"\n\n#: src/SUMMARY.md:77 src/fn/diverging.md:1\nmsgid \"Diverging functions\"\nmsgstr \"发散函数\"\n\n#: src/SUMMARY.md:79 src/mod.md:1\nmsgid \"Modules\"\nmsgstr \"模块\"\n\n#: src/SUMMARY.md:80 src/mod/visibility.md:1\nmsgid \"Visibility\"\nmsgstr \"可见性\"\n\n#: src/SUMMARY.md:81 src/mod/struct_visibility.md:1\nmsgid \"Struct visibility\"\nmsgstr \"结构体可见性\"\n\n#: src/SUMMARY.md:82 src/mod/use.md:1\nmsgid \"The `use` declaration\"\nmsgstr \"`use` 声明\"\n\n#: src/SUMMARY.md:83 src/mod/super.md:1\nmsgid \"`super` and `self`\"\nmsgstr \"`super` 和 `self`\"\n\n#: src/SUMMARY.md:84 src/mod/split.md:1\nmsgid \"File hierarchy\"\nmsgstr \"文件分层\"\n\n#: src/SUMMARY.md:86 src/SUMMARY.md:98 src/crates.md:1 src/attribute/crate.md:1\n#: src/std_misc/arg.md:30\nmsgid \"Crates\"\nmsgstr \"Crates\"\n\n#: src/SUMMARY.md:87 src/crates/lib.md:1\nmsgid \"Creating a Library\"\nmsgstr \"创建库\"\n\n#: src/SUMMARY.md:88 src/crates/using_lib.md:1\nmsgid \"Using a Library\"\nmsgstr \"使用库\"\n\n#: src/SUMMARY.md:90 src/cargo.md:1\nmsgid \"Cargo\"\nmsgstr \"Cargo\"\n\n#: src/SUMMARY.md:91 src/cargo/deps.md:1\nmsgid \"Dependencies\"\nmsgstr \"依赖\"\n\n#: src/SUMMARY.md:92 src/cargo/conventions.md:1\nmsgid \"Conventions\"\nmsgstr \"约定\"\n\n#: src/SUMMARY.md:93\nmsgid \"Tests\"\nmsgstr \"测试\"\n\n#: src/SUMMARY.md:94 src/cargo/build_scripts.md:1\nmsgid \"Build Scripts\"\nmsgstr \"构建脚本\"\n\n#: src/SUMMARY.md:96 src/attribute.md:1\nmsgid \"Attributes\"\nmsgstr \"属性\"\n\n#: src/SUMMARY.md:97 src/attribute/unused.md:1\nmsgid \"`dead_code`\"\nmsgstr \"`dead_code`\"\n\n#: src/SUMMARY.md:99 src/attribute/cfg.md:1\nmsgid \"`cfg`\"\nmsgstr \"`cfg`\"\n\n#: src/SUMMARY.md:100 src/attribute/cfg/custom.md:1\nmsgid \"Custom\"\nmsgstr \"自定义\"\n\n#: src/SUMMARY.md:102 src/generics.md:1\nmsgid \"Generics\"\nmsgstr \"泛型\"\n\n#: src/SUMMARY.md:104 src/generics/impl.md:1\nmsgid \"Implementation\"\nmsgstr \"实现\"\n\n#: src/SUMMARY.md:105 src/SUMMARY.md:131 src/SUMMARY.md:137\n#: src/generics/gen_trait.md:1 src/scope/lifetime/trait.md:1 src/trait.md:1\nmsgid \"Traits\"\nmsgstr \"特质\"\n\n#: src/SUMMARY.md:106 src/SUMMARY.md:132 src/generics/bounds.md:1\n#: src/scope/lifetime/lifetime_bounds.md:1\nmsgid \"Bounds\"\nmsgstr \"约束\"\n\n#: src/SUMMARY.md:107 src/generics/bounds/testcase_empty.md:1\nmsgid \"Testcase: empty bounds\"\nmsgstr \"测试实例：空约束\"\n\n#: src/SUMMARY.md:108 src/generics/multi_bounds.md:1\nmsgid \"Multiple bounds\"\nmsgstr \"多重约束\"\n\n#: src/SUMMARY.md:109 src/generics/where.md:1\nmsgid \"Where clauses\"\nmsgstr \"Where 分句\"\n\n#: src/SUMMARY.md:110 src/generics/new_types.md:1\nmsgid \"New Type Idiom\"\nmsgstr \"新类型惯用法\"\n\n#: src/SUMMARY.md:111 src/generics/assoc_items.md:1\nmsgid \"Associated items\"\nmsgstr \"关联项\"\n\n#: src/SUMMARY.md:112 src/generics/assoc_items/the_problem.md:1\nmsgid \"The Problem\"\nmsgstr \"问题\"\n\n#: src/SUMMARY.md:113 src/generics/assoc_items/types.md:1\nmsgid \"Associated types\"\nmsgstr \"关联类型\"\n\n#: src/SUMMARY.md:114 src/generics/phantom.md:1\nmsgid \"Phantom type parameters\"\nmsgstr \"虚类型参数\"\n\n#: src/SUMMARY.md:115 src/generics/phantom/testcase_units.md:1\nmsgid \"Testcase: unit clarification\"\nmsgstr \"测试实例：单位澄清\"\n\n#: src/SUMMARY.md:117 src/scope.md:1\nmsgid \"Scoping rules\"\nmsgstr \"作用域规则\"\n\n#: src/SUMMARY.md:118 src/scope/raii.md:1\nmsgid \"RAII\"\nmsgstr \"RAII\"\n\n#: src/SUMMARY.md:119 src/scope/move.md:1\nmsgid \"Ownership and moves\"\nmsgstr \"所有权和移动\"\n\n#: src/SUMMARY.md:121 src/scope/move/partial_move.md:1\nmsgid \"Partial moves\"\nmsgstr \"部分移动\"\n\n#: src/SUMMARY.md:122 src/scope/borrow.md:1\nmsgid \"Borrowing\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md:125 src/scope/borrow/ref.md:1\nmsgid \"The ref pattern\"\nmsgstr \"ref 模式\"\n\n#: src/SUMMARY.md:126 src/scope/lifetime.md:1\nmsgid \"Lifetimes\"\nmsgstr \"生命周期\"\n\n#: src/SUMMARY.md:127 src/scope/lifetime/explicit.md:1\nmsgid \"Explicit annotation\"\nmsgstr \"显式注解\"\n\n#: src/SUMMARY.md:130 src/scope/lifetime/struct.md:1\nmsgid \"Structs\"\nmsgstr \"结构体\"\n\n#: src/SUMMARY.md:133 src/scope/lifetime/lifetime_coercion.md:1\nmsgid \"Coercion\"\nmsgstr \"强制转换\"\n\n#: src/SUMMARY.md:134 src/scope/lifetime/static_lifetime.md:1\nmsgid \"Static\"\nmsgstr \"静态\"\n\n#: src/SUMMARY.md:135 src/scope/lifetime/elision.md:1\nmsgid \"Elision\"\nmsgstr \"省略\"\n\n#: src/SUMMARY.md:138 src/trait/derive.md:1\nmsgid \"Derive\"\nmsgstr \"派生\"\n\n#: src/SUMMARY.md:139 src/trait/dyn.md:1\nmsgid \"Returning Traits with `dyn`\"\nmsgstr \"使用 `dyn` 返回 trait\"\n\n#: src/SUMMARY.md:140 src/trait/ops.md:1\nmsgid \"Operator Overloading\"\nmsgstr \"运算符重载\"\n\n#: src/SUMMARY.md:141 src/trait/drop.md:1\nmsgid \"Drop\"\nmsgstr \"Drop\"\n\n#: src/SUMMARY.md:142 src/trait/iter.md:1\nmsgid \"Iterators\"\nmsgstr \"迭代器\"\n\n#: src/SUMMARY.md:143 src/trait/impl_trait.md:1\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md:144 src/trait/clone.md:1\nmsgid \"Clone\"\nmsgstr \"克隆\"\n\n#: src/SUMMARY.md:145 src/trait/supertraits.md:1\nmsgid \"Supertraits\"\nmsgstr \"父特质\"\n\n#: src/SUMMARY.md:146 src/trait/disambiguating.md:1\nmsgid \"Disambiguating overlapping traits\"\nmsgstr \"消除重叠特质的歧义\"\n\n#: src/SUMMARY.md:148\nmsgid \"macro_rules!\"\nmsgstr \"macro_rules!\"\n\n#: src/SUMMARY.md:149 src/macros/syntax.md:1\nmsgid \"Syntax\"\nmsgstr \"语法\"\n\n#: src/SUMMARY.md:150 src/macros/designators.md:1\nmsgid \"Designators\"\nmsgstr \"指示符\"\n\n#: src/SUMMARY.md:151 src/macros/overload.md:1\nmsgid \"Overload\"\nmsgstr \"重载\"\n\n#: src/SUMMARY.md:152 src/macros/repeat.md:1\nmsgid \"Repeat\"\nmsgstr \"重复\"\n\n#: src/SUMMARY.md:153 src/macros/dry.md:1\nmsgid \"DRY (Don't Repeat Yourself)\"\nmsgstr \"DRY(不要重复自己)\"\n\n#: src/SUMMARY.md:154\nmsgid \"DSL (Domain Specific Languages)\"\nmsgstr \"DSL(领域特定语言)\"\n\n#: src/SUMMARY.md:155\nmsgid \"Variadics\"\nmsgstr \"可变参数\"\n\n#: src/SUMMARY.md:157 src/error.md:1\nmsgid \"Error handling\"\nmsgstr \"错误处理\"\n\n#: src/SUMMARY.md:158 src/error/panic.md:1\nmsgid \"`panic`\"\nmsgstr \"`panic`\"\n\n#: src/SUMMARY.md:159\nmsgid \"`abort` & `unwind`\"\nmsgstr \"`abort` 和 `unwind`\"\n\n#: src/SUMMARY.md:160 src/error/option_unwrap.md:1\nmsgid \"`Option` & `unwrap`\"\nmsgstr \"`Option` 和 `unwrap`\"\n\n#: src/SUMMARY.md:161 src/error/option_unwrap/question_mark.md:1\nmsgid \"Unpacking options with `?`\"\nmsgstr \"使用 `?` 解包 Option\"\n\n#: src/SUMMARY.md:162 src/error/option_unwrap/map.md:1\nmsgid \"Combinators: `map`\"\nmsgstr \"组合器：`map`\"\n\n#: src/SUMMARY.md:163 src/error/option_unwrap/and_then.md:1\nmsgid \"Combinators: `and_then`\"\nmsgstr \"组合器：`and_then`\"\n\n#: src/SUMMARY.md:164\nmsgid \"Defaults: `or`, `or_else`, `get_or_insert`, `get_or_insert_with`\"\nmsgstr \"默认值：`or`、`or_else`、`get_or_insert`、`get_or_insert_with`\"\n\n#: src/SUMMARY.md:165 src/SUMMARY.md:183 src/error/result.md:1\n#: src/std/result.md:1\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md:166 src/error/result/result_map.md:1\nmsgid \"`map` for `Result`\"\nmsgstr \"`Result` 的 `map`\"\n\n#: src/SUMMARY.md:167 src/error/result/result_alias.md:1\nmsgid \"aliases for `Result`\"\nmsgstr \"`Result` 的别名\"\n\n#: src/SUMMARY.md:168 src/error/result/early_returns.md:1\nmsgid \"Early returns\"\nmsgstr \"提前返回\"\n\n#: src/SUMMARY.md:169 src/error/result/enter_question_mark.md:1\nmsgid \"Introducing `?`\"\nmsgstr \"引入 `?`\"\n\n#: src/SUMMARY.md:170 src/error/multiple_error_types.md:1\nmsgid \"Multiple error types\"\nmsgstr \"多种错误类型\"\n\n#: src/SUMMARY.md:171 src/error/multiple_error_types/option_result.md:1\nmsgid \"Pulling `Result`s out of `Option`s\"\nmsgstr \"从 `Option` 中提取 `Result`\"\n\n#: src/SUMMARY.md:172 src/error/multiple_error_types/define_error_type.md:1\nmsgid \"Defining an error type\"\nmsgstr \"定义错误类型\"\n\n#: src/SUMMARY.md:173 src/error/multiple_error_types/boxing_errors.md:1\nmsgid \"`Box`ing errors\"\nmsgstr \"使用 `Box` 将错误装箱\"\n\n#: src/SUMMARY.md:174 src/error/multiple_error_types/reenter_question_mark.md:1\nmsgid \"Other uses of `?`\"\nmsgstr \"`?` 的其他用途\"\n\n#: src/SUMMARY.md:175 src/error/multiple_error_types/wrap_error.md:1\nmsgid \"Wrapping errors\"\nmsgstr \"包装错误\"\n\n#: src/SUMMARY.md:176 src/error/iter_result.md:1\nmsgid \"Iterating over `Result`s\"\nmsgstr \"遍历 `Result`\"\n\n#: src/SUMMARY.md:178 src/std.md:1\nmsgid \"Std library types\"\nmsgstr \"标准库类型\"\n\n#: src/SUMMARY.md:179 src/std/box.md:1\nmsgid \"Box, stack and heap\"\nmsgstr \"Box、栈和堆\"\n\n#: src/SUMMARY.md:180 src/std/vec.md:1\nmsgid \"Vectors\"\nmsgstr \"Vectors\"\n\n#: src/SUMMARY.md:181 src/std/str.md:1\nmsgid \"Strings\"\nmsgstr \"字符串\"\n\n#: src/SUMMARY.md:182 src/std/option.md:1\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md:184 src/std/result/question_mark.md:1\nmsgid \"`?`\"\nmsgstr \"`?`\"\n\n#: src/SUMMARY.md:185 src/std/panic.md:1\nmsgid \"`panic!`\"\nmsgstr \"`panic!`\"\n\n#: src/SUMMARY.md:186 src/std/hash.md:1\nmsgid \"HashMap\"\nmsgstr \"HashMap\"\n\n#: src/SUMMARY.md:187 src/std/hash/alt_key_types.md:1\nmsgid \"Alternate/custom key types\"\nmsgstr \"更改或自定义键类型\"\n\n#: src/SUMMARY.md:188 src/std/hash/hashset.md:1\nmsgid \"HashSet\"\nmsgstr \"HashSet\"\n\n#: src/SUMMARY.md:189 src/std/rc.md:1\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md:190\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md:192 src/std_misc.md:1\nmsgid \"Std misc\"\nmsgstr \"标准库中的其他内容\"\n\n#: src/SUMMARY.md:193 src/std_misc.md:6 src/std_misc/threads.md:1\nmsgid \"Threads\"\nmsgstr \"线程\"\n\n#: src/SUMMARY.md:194 src/std_misc/threads/testcase_mapreduce.md:1\nmsgid \"Testcase: map-reduce\"\nmsgstr \"测试实例：map-reduce\"\n\n#: src/SUMMARY.md:195 src/std_misc.md:7 src/std_misc/channels.md:1\nmsgid \"Channels\"\nmsgstr \"信道\"\n\n#: src/SUMMARY.md:196 src/std_misc/path.md:1\nmsgid \"Path\"\nmsgstr \"路径\"\n\n#: src/SUMMARY.md:197 src/std_misc.md:8 src/std_misc/file.md:1\nmsgid \"File I/O\"\nmsgstr \"文件 I/O\"\n\n#: src/SUMMARY.md:198 src/std_misc/file/open.md:1\nmsgid \"`open`\"\nmsgstr \"`open`\"\n\n#: src/SUMMARY.md:199 src/std_misc/file/create.md:1\nmsgid \"`create`\"\nmsgstr \"`create`\"\n\n#: src/SUMMARY.md:200 src/std_misc/file/read_lines.md:1\nmsgid \"`read_lines`\"\nmsgstr \"`read_lines`\"\n\n#: src/SUMMARY.md:201 src/std_misc/process.md:1\nmsgid \"Child processes\"\nmsgstr \"子进程\"\n\n#: src/SUMMARY.md:202 src/std_misc/process/pipe.md:1\nmsgid \"Pipes\"\nmsgstr \"管道\"\n\n#: src/SUMMARY.md:203 src/std_misc/process/wait.md:1\nmsgid \"Wait\"\nmsgstr \"等待\"\n\n#: src/SUMMARY.md:204 src/std_misc/fs.md:1\nmsgid \"Filesystem Operations\"\nmsgstr \"文件系统操作\"\n\n#: src/SUMMARY.md:205 src/std_misc/arg.md:1\nmsgid \"Program arguments\"\nmsgstr \"程序参数\"\n\n#: src/SUMMARY.md:206 src/std_misc/arg/matching.md:1\nmsgid \"Argument parsing\"\nmsgstr \"参数解析\"\n\n#: src/SUMMARY.md:207 src/std_misc/ffi.md:1\nmsgid \"Foreign Function Interface\"\nmsgstr \"外部函数接口\"\n\n#: src/SUMMARY.md:209 src/cargo/test.md:1 src/testing.md:1\nmsgid \"Testing\"\nmsgstr \"测试\"\n\n#: src/SUMMARY.md:210 src/testing/unit_testing.md:1\nmsgid \"Unit testing\"\nmsgstr \"单元测试\"\n\n#: src/SUMMARY.md:211 src/testing/doc_testing.md:1\nmsgid \"Documentation testing\"\nmsgstr \"文档测试\"\n\n#: src/SUMMARY.md:212 src/testing/integration_testing.md:1\nmsgid \"Integration testing\"\nmsgstr \"集成测试\"\n\n#: src/SUMMARY.md:213\nmsgid \"Dev-dependencies\"\nmsgstr \"开发依赖\"\n\n#: src/SUMMARY.md:215 src/unsafe.md:1\nmsgid \"Unsafe Operations\"\nmsgstr \"不安全操作\"\n\n#: src/SUMMARY.md:216 src/unsafe/asm.md:1\nmsgid \"Inline assembly\"\nmsgstr \"内联汇编\"\n\n#: src/SUMMARY.md:218 src/compatibility.md:1\nmsgid \"Compatibility\"\nmsgstr \"兼容性\"\n\n#: src/SUMMARY.md:219 src/compatibility/raw_identifiers.md:1\nmsgid \"Raw identifiers\"\nmsgstr \"原始标识符\"\n\n#: src/SUMMARY.md:221 src/meta.md:1\nmsgid \"Meta\"\nmsgstr \"补充\"\n\n#: src/SUMMARY.md:222 src/meta/doc.md:1\nmsgid \"Documentation\"\nmsgstr \"文档\"\n\n#: src/SUMMARY.md:223 src/meta/playground.md:1\nmsgid \"Playground\"\nmsgstr \"Playground\"\n\n#: src/index.md:1\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/index.md:3\nmsgid \"\"\n\"[Rust](https://www.rust-lang.org/) is a modern systems programming language \"\n\"focusing on safety, speed, and concurrency. It accomplishes these goals by \"\n\"being memory safe without using garbage collection.\"\nmsgstr \"\"\n\"[Rust](https://www.rust-lang.org/) 是一门现代系统编程语言，专注于安全性、速度\"\n\"和并发性。通过内存安全而不使用垃圾回收来实现这些目标。\"\n\n#: src/index.md:7\nmsgid \"\"\n\"Rust by Example (RBE) is a collection of runnable examples that illustrate \"\n\"various Rust concepts and standard libraries. To get even more out of these \"\n\"examples, don't forget to [install Rust locally](https://www.rust-lang.org/\"\n\"tools/install) and check out the [official docs](https://doc.rust-lang.org/\"\n\"std/). Additionally for the curious, you can also [check out the source code \"\n\"for this site](https://github.com/rust-lang/rust-by-example).\"\nmsgstr \"\"\n\"《通过例子学 Rust》（Rust By Example, RBE）是一系列可运行的示例，它们展示了各\"\n\"种 Rust 概念和标准库。为了更好地利用这些示例，请不要忘记[本地安装 Rust]\"\n\"(https://www.rust-lang.org/tools/install)并查看[官方文档](https://doc.rust-\"\n\"lang.org/)。此外，好奇的话，你也可以[查看这个网站的源代码](https://\"\n\"github.com/rust-lang/rust-by-example)。\"\n\n#: src/index.md:12\nmsgid \"Now let's begin!\"\nmsgstr \"现在让我们开始吧！\"\n\n#: src/index.md:14\nmsgid \"[Hello World](hello.md) - Start with a traditional Hello World program.\"\nmsgstr \"[Hello World](hello.md) - 从一个经典的 Hello World 程序开始。\"\n\n#: src/index.md:16\nmsgid \"\"\n\"[Primitives](primitives.md) - Learn about signed integers, unsigned integers \"\n\"and other primitives.\"\nmsgstr \"\"\n\"[Primitives](primitives.md) - 学习有符号整数、无符号整数和其他原生类型。\"\n\n#: src/index.md:18\nmsgid \"[Custom Types](custom_types.md) - `struct` and `enum`.\"\nmsgstr \"[自定义类型](custom_types.md) - 结构体 `struct` 和枚举 `enum`。\"\n\n#: src/index.md:20\nmsgid \"\"\n\"[Variable Bindings](variable_bindings.md) - mutable bindings, scope, \"\n\"shadowing.\"\nmsgstr \"[变量绑定](variable_bindings.md) - 可变绑定、作用域、遮蔽。\"\n\n#: src/index.md:22\nmsgid \"[Types](types.md) - Learn about changing and defining types.\"\nmsgstr \"[类型](types.md) - 学习如何改变和定义类型。\"\n\n#: src/index.md:24\nmsgid \"\"\n\"[Conversion](conversion.md) - Convert between different types, such as \"\n\"strings, integers, and floats.\"\nmsgstr \"\"\n\"[转换](conversion.md) - 在不同类型的数据之间进行转换，如字符串、整数和浮点\"\n\"数。\"\n\n#: src/index.md:26\nmsgid \"\"\n\"[Expressions](expression.md) - Learn about Expressions & how to use them.\"\nmsgstr \"[表达式](expression.md) - 学习表达式及其使用方法。\"\n\n#: src/index.md:28\nmsgid \"[Flow of Control](flow_control.md) - `if`/`else`, `for`, and others.\"\nmsgstr \"[控制流](flow_control.md) - `if`/`else`、`for` 等。\"\n\n#: src/index.md:30\nmsgid \"\"\n\"[Functions](fn.md) - Learn about Methods, Closures and Higher Order \"\n\"Functions.\"\nmsgstr \"[函数](fn.md) - 学习方法、闭包和高阶函数。\"\n\n#: src/index.md:32\nmsgid \"[Modules](mod.md) - Organize code using modules\"\nmsgstr \"[模块](mod.md) - 使用模块组织代码\"\n\n#: src/index.md:34\nmsgid \"\"\n\"[Crates](crates.md) - A crate is a compilation unit in Rust. Learn to create \"\n\"a library.\"\nmsgstr \"[Crates](crates.md) - Crate 是 Rust 中的编译单元。学习如何创建库。\"\n\n#: src/index.md:36\nmsgid \"\"\n\"[Cargo](cargo.md) - Go through some basic features of the official Rust \"\n\"package management tool.\"\nmsgstr \"[Cargo](cargo.md) - 了解官方 Rust 包管理工具的一些基本功能。\"\n\n#: src/index.md:38\nmsgid \"\"\n\"[Attributes](attribute.md) - An attribute is metadata applied to some \"\n\"module, crate or item.\"\nmsgstr \"[属性](attribute.md) - 属性是应用于某些模块、crate 或项的元数据。\"\n\n#: src/index.md:40\nmsgid \"\"\n\"[Generics](generics.md) - Learn about writing a function or data type which \"\n\"can work for multiple types of arguments.\"\nmsgstr \"[泛型](generics.md) - 学习编写可以适用于多种类型参数的函数或数据类型。\"\n\n#: src/index.md:42\nmsgid \"\"\n\"[Scoping rules](scope.md) - Scopes play an important part in ownership, \"\n\"borrowing, and lifetimes.\"\nmsgstr \"\"\n\"[作用域规则](scope.md) - 作用域在所有权（ownership）、借用（borrowing）和生命\"\n\"周期（lifetime）中扮演重要角色。\"\n\n#: src/index.md:44\nmsgid \"\"\n\"[Traits](trait.md) - A trait is a collection of methods defined for an \"\n\"unknown type: `Self`\"\nmsgstr \"[特质](trait.md) - 特质（trait）是为未知类型 `Self` 定义的一组方法。\"\n\n#: src/index.md:46\nmsgid \"\"\n\"[Macros](macros.md) - Macros are a way of writing code that writes other \"\n\"code, which is known as metaprogramming.\"\nmsgstr \"\"\n\"[宏](macros.md) - 宏是一种编写代码以生成其他代码的方式，也被称为元编程。\"\n\n#: src/index.md:48\nmsgid \"[Error handling](error.md) - Learn Rust way of handling failures.\"\nmsgstr \"[错误处理](error.md) - 学习 Rust 处理失败的方式。\"\n\n#: src/index.md:50\nmsgid \"\"\n\"[Std library types](std.md) - Learn about some custom types provided by \"\n\"`std` library.\"\nmsgstr \"[标准库类型](std.md) - 学习 `std` 标准库提供的一些自定义类型。\"\n\n#: src/index.md:52\nmsgid \"[Std misc](std_misc.md) - More custom types for file handling, threads.\"\nmsgstr \"\"\n\"[标准库中的其他内容](std_misc.md) - 更多关于文件处理、线程的自定义类型。\"\n\n#: src/index.md:54\nmsgid \"[Testing](testing.md) - All sorts of testing in Rust.\"\nmsgstr \"[测试](testing.md) - Rust 中的各种测试方法。\"\n\n#: src/index.md:56\nmsgid \"\"\n\"[Unsafe Operations](unsafe.md) - Learn about entering a block of unsafe \"\n\"operations.\"\nmsgstr \"[不安全操作](unsafe.md) - 学习如何编写和使用不安全代码块。\"\n\n#: src/index.md:58\nmsgid \"\"\n\"[Compatibility](compatibility.md) - Handling Rust's evolution and potential \"\n\"compatibility issues.\"\nmsgstr \"\"\n\"[兼容性](compatibility.md) - 应对 Rust 语言的演进及可能出现的兼容性问题。\"\n\n#: src/index.md:60\nmsgid \"[Meta](meta.md) - Documentation, Benchmarking.\"\nmsgstr \"[补充](meta.md) - 文档，基准测试。\"\n\n#: src/hello.md:3\nmsgid \"This is the source code of the traditional Hello World program.\"\nmsgstr \"这是经典的 Hello World 程序的源代码。\"\n\n#: src/hello.md:6\nmsgid \"\"\n\"// This is a comment, and is ignored by the compiler.\\n\"\n\"// You can test this code by clicking the \\\"Run\\\" button over there ->\\n\"\n\"// or if you prefer to use your keyboard, you can use the \\\"Ctrl + Enter\\\"\\n\"\n\"// shortcut.\\n\"\nmsgstr \"\"\n\"// 这是一行注释，编译器会忽略它。\\n\"\n\"// 你可以点击右侧的 \\\"Run\\\" 按钮来测试这段代码 ->\\n\"\n\"// 如果你更习惯使用键盘，也可以使用\\\"Ctrl + Enter\\\"快捷键来运行。\\n\"\n\n#: src/hello.md:10\nmsgid \"\"\n\"// This code is editable, feel free to hack it!\\n\"\n\"// You can always return to the original code by clicking the \\\"Reset\\\" \"\n\"button ->\\n\"\nmsgstr \"\"\n\"// 这段代码是可以编辑的，请随意修改！\\n\"\n\"// 你可以随时点击 \\\"Reset\\\" 按钮恢复到初始代码 ->\\n\"\n\n#: src/hello.md:13\nmsgid \"// This is the main function.\\n\"\nmsgstr \"// 这是主函数。\\n\"\n\n#: src/hello.md:16\nmsgid \"// Statements here are executed when the compiled binary is called.\\n\"\nmsgstr \"// 当运行编译后的程序时，这里的语句会被执行。\\n\"\n\n#: src/hello.md:18\nmsgid \"// Print text to the console.\\n\"\nmsgstr \"// 在控制台打印文本。\\n\"\n\n#: src/hello.md:19 src/error/result.md:55 src/meta/playground.md:12\nmsgid \"\\\"Hello World!\\\"\"\nmsgstr \"\\\"Hello World!\\\"\"\n\n#: src/hello.md:23\nmsgid \"`println!` is a [_macro_](macros.md) that prints text to the console.\"\nmsgstr \"`println!` 是一个用于在控制台打印文本的[宏](macros.md)。\"\n\n#: src/hello.md:26\nmsgid \"A binary can be generated using the Rust compiler: `rustc`.\"\nmsgstr \"可以使用 Rust 编译器 `rustc` 来生成可执行文件。\"\n\n#: src/hello.md:32\nmsgid \"`rustc` will produce a `hello` binary that can be executed.\"\nmsgstr \"`rustc` 将生成一个名为 `hello` 的可执行文件。\"\n\n#: src/hello.md:39 src/hello/print/print_display.md:107\n#: src/hello/print/print_display/testcase_list.md:53 src/hello/print/fmt.md:70\n#: src/primitives/tuples.md:64 src/custom_types/structs.md:89\nmsgid \"Activity\"\nmsgstr \"练习\"\n\n#: src/hello.md:41\nmsgid \"\"\n\"Click 'Run' above to see the expected output. Next, add a new line with a \"\n\"second `println!` macro so that the output shows:\"\nmsgstr \"\"\n\"点击上方的\\\"运行\\\"按钮查看预期输出。接下来，添加一行新代码，再次使用 \"\n\"`println!` 宏，输出显示如下内容：\"\n\n#: src/hello/comment.md:3\nmsgid \"\"\n\"Any program requires comments, and Rust supports a few different varieties:\"\nmsgstr \"每个程序都需要注释，Rust 支持几种不同类型的注释：\"\n\n#: src/hello/comment.md:6\nmsgid \"_Regular comments_ which are ignored by the compiler:\"\nmsgstr \"**普通注释**：编译器会忽略这些注释\"\n\n#: src/hello/comment.md:7\nmsgid \"`// Line comments which go to the end of the line.`\"\nmsgstr \"`// 行注释，从双斜杠开始到行尾。`\"\n\n#: src/hello/comment.md:8\nmsgid \"`/* Block comments which go to the closing delimiter. */`\"\nmsgstr \"`/* 块注释，从开始符号到结束符号。 */`\"\n\n#: src/hello/comment.md:9\nmsgid \"\"\n\"_Doc comments_ which are parsed into HTML library [documentation](../meta/\"\n\"doc.md):\"\nmsgstr \"**文档注释**：这些注释会被解析成 HTML 格式的[库文档](../meta/doc.md)\"\n\n#: src/hello/comment.md:10\nmsgid \"`/// Generate library docs for the following item.`\"\nmsgstr \"`/// 为接下来的项生成库文档。`\"\n\n#: src/hello/comment.md:11\nmsgid \"`//! Generate library docs for the enclosing item.`\"\nmsgstr \"`//! 为当前项（如 crate、模块或函数）生成库文档。`\"\n\n#: src/hello/comment.md:15\nmsgid \"\"\n\"// This is an example of a line comment.\\n\"\n\"    // There are two slashes at the beginning of the line.\\n\"\n\"    // And nothing written after these will be read by the compiler.\\n\"\nmsgstr \"\"\n\"// 这是行注释的一个例子。\\n\"\n\"    // 在行首有两个斜杠。\\n\"\n\"    // 斜杠后面的内容编译器不会读取。\\n\"\n\n#: src/hello/comment.md:19\nmsgid \"// println!(\\\"Hello, world!\\\");\\n\"\nmsgstr \"// println!(\\\"Hello, world!\\\");\\n\"\n\n#: src/hello/comment.md:21\nmsgid \"// Run it. See? Now try deleting the two slashes, and run it again.\\n\"\nmsgstr \"// 运行看看。明白了吗？现在试着删除这两个斜杠，再运行一次。\\n\"\n\n#: src/hello/comment.md:23\nmsgid \"\"\n\"/*\\n\"\n\"     * This is another type of comment, a block comment. In general,\\n\"\n\"     * line comments are the recommended comment style. But block comments\\n\"\n\"     * are extremely useful for temporarily disabling chunks of code.\\n\"\n\"     * /* Block comments can be /* nested, */ */ so it takes only a few\\n\"\n\"     * keystrokes to comment out everything in this main() function.\\n\"\n\"     * /*/*/* Try it yourself! */*/*/\\n\"\n\"     */\"\nmsgstr \"\"\n\"/*\\n\"\n\"     * 这是另一种类型的注释，称为块注释。一般来说，推荐使用行注释。\\n\"\n\"     * 但是块注释在临时禁用大段代码时非常有用。\\n\"\n\"     * /* 块注释可以 /* 嵌套， */ */ 因此只需几次按键就能\\n\"\n\"     * 注释掉 main() 函数中的所有内容。\\n\"\n\"     * /*/*/* 你可以自己试试！ */*/*/\\n\"\n\"     */\"\n\n#: src/hello/comment.md:32\nmsgid \"\"\n\"/*\\n\"\n\"    Note: The previous column of `*` was entirely for style. There's\\n\"\n\"    no actual need for it.\\n\"\n\"    */\"\nmsgstr \"\"\n\"/*\\n\"\n\"    注意：前面的 `*` 列纯粹是为了样式美观。实际上并不需要。\\n\"\n\"    */\"\n\n#: src/hello/comment.md:37\nmsgid \"\"\n\"// Here's another powerful use of block comments: you can uncomment\\n\"\n\"    // and comment a whole block by simply adding or removing a single\\n\"\n\"    // '/' character:\\n\"\nmsgstr \"\"\n\"// 这里展示块注释的另一个强大用途：你可以通过添加或删除单个\\n\"\n\"    // '/' 字符来取消注释或注释整个代码块：\\n\"\n\n#: src/hello/comment.md:41\nmsgid \"\"\n\"/* <- add another '/' before the 1st one to uncomment the whole block\\n\"\n\"\\n\"\n\"    println!(\\\"Now\\\");\\n\"\n\"    println!(\\\"everything\\\");\\n\"\n\"    println!(\\\"executes!\\\");\\n\"\n\"    // line comments inside are not affected by either state\\n\"\n\"\\n\"\n\"    // */\"\nmsgstr \"\"\n\"/* <- 在第一个字符前再添加一个 '/' 来取消注释整个代码块\\n\"\n\"\\n\"\n\"    println!(\\\"Now\\\");\\n\"\n\"    println!(\\\"everything\\\");\\n\"\n\"    println!(\\\"executes!\\\");\\n\"\n\"    // 内部的行注释不受任何状态影响\\n\"\n\"\\n\"\n\"    // */\"\n\n#: src/hello/comment.md:50\nmsgid \"\"\n\"// You can manipulate expressions more easily with block comments\\n\"\n\"    // than with line comments. Try deleting the comment delimiters\\n\"\n\"    // to change the result:\\n\"\nmsgstr \"\"\n\"// 块注释比行注释更方便地操作表达式\\n\"\n\"    // 试试删除注释符号，看看结果会有什么变化：\\n\"\n\n#: src/hello/comment.md:53\nmsgid \"/* 90 + */\"\nmsgstr \"/* 90 + */\"\n\n#: src/hello/comment.md:54\nmsgid \"\\\"Is `x` 10 or 100? x = {}\\\"\"\nmsgstr \"\\\"`x` 是 10 还是 100？x = {}\\\"\"\n\n#: src/hello/comment.md:58 src/hello/print.md:103\n#: src/hello/print/print_debug.md:75 src/hello/print/print_display.md:128\n#: src/hello/print/print_display/testcase_list.md:62 src/hello/print/fmt.md:89\n#: src/primitives.md:64 src/custom_types/enum.md:100\n#: src/custom_types/enum/enum_use.md:45 src/custom_types/enum/c_like.md:33\n#: src/custom_types/enum/testcase_linked_list.md:78\n#: src/custom_types/constants.md:35 src/types/alias.md:30\n#: src/flow_control/for.md:121\n#: src/flow_control/match/destructuring/destructure_tuple.md:25\n#: src/flow_control/match/destructuring/destructure_slice.md:46\n#: src/flow_control/match/destructuring/destructure_enum.md:48\n#: src/flow_control/match/destructuring/destructure_pointers.md:63\n#: src/flow_control/match/destructuring/destructure_structures.md:45\n#: src/flow_control/match/guard.md:43 src/flow_control/match/binding.md:61\n#: src/flow_control/if_let.md:118 src/flow_control/let_else.md:55\n#: src/flow_control/while_let.md:56 src/fn/closures/capture.md:110\n#: src/fn/closures/input_parameters.md:84 src/fn/closures/anonymity.md:47\n#: src/fn/closures/input_functions.md:32\n#: src/fn/closures/output_parameters.md:49\n#: src/fn/closures/closure_examples/iter_any.md:50\n#: src/fn/closures/closure_examples/iter_find.md:68\n#: src/mod/struct_visibility.md:53 src/attribute/cfg.md:39 src/generics.md:59\n#: src/generics/gen_fn.md:54 src/generics/impl.md:48\n#: src/generics/gen_trait.md:39 src/generics/bounds.md:73\n#: src/generics/bounds/testcase_empty.md:37 src/generics/multi_bounds.md:32\n#: src/generics/where.md:49 src/generics/new_types.md:54\n#: src/generics/assoc_items.md:10 src/generics/assoc_items/the_problem.md:62\n#: src/generics/phantom.md:56 src/generics/phantom/testcase_units.md:75\n#: src/scope/raii.md:92 src/scope/move/partial_move.md:57\n#: src/scope/borrow/mut.md:56 src/scope/lifetime/explicit.md:68\n#: src/scope/lifetime/fn.md:58 src/scope/lifetime/methods.md:24\n#: src/scope/lifetime/struct.md:41 src/scope/lifetime/trait.md:28\n#: src/scope/lifetime/lifetime_bounds.md:46\n#: src/scope/lifetime/static_lifetime.md:133 src/scope/lifetime/elision.md:39\n#: src/trait/derive.md:65 src/trait/supertraits.md:40\n#: src/trait/disambiguating.md:60 src/error/option_unwrap/map.md:79\n#: src/error/option_unwrap/and_then.md:73\n#: src/error/option_unwrap/defaults.md:115 src/error/result/result_alias.md:41\n#: src/error/multiple_error_types/boxing_errors.md:57\n#: src/error/multiple_error_types/reenter_question_mark.md:74\n#: src/error/multiple_error_types/wrap_error.md:91 src/std.md:12\n#: src/std/rc.md:55 src/std_misc.md:12\n#: src/std_misc/threads/testcase_mapreduce.md:127 src/std_misc/path.md:53\n#: src/std_misc/fs.md:149 src/meta/doc.md:109 src/meta/playground.md:49\nmsgid \"See also:\"\nmsgstr \"另请参阅：\"\n\n#: src/hello/comment.md:60\nmsgid \"[Library documentation](../meta/doc.md)\"\nmsgstr \"[库文档](../meta/doc.md)\"\n\n#: src/hello/print.md:3\nmsgid \"\"\n\"Printing is handled by a series of [`macros`](../macros.md) defined in \"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) some of which are:\"\nmsgstr \"\"\n\"打印功能由 [`std::fmt`](https://doc.rust-lang.org/std/fmt/) 中定义的一系列[`\"\n\"宏`](../macros.md)处理，其中包括：\"\n\n#: src/hello/print.md:6\nmsgid \"`format!`: write formatted text to [`String`](../std/str.md)\"\nmsgstr \"`format!`：将格式化文本写入 [`String`](../std/str.md)\"\n\n#: src/hello/print.md:7\nmsgid \"\"\n\"`print!`: same as `format!` but the text is printed to the console \"\n\"(io::stdout).\"\nmsgstr \"`print!`：与 `format!` 类似，但文本会打印到控制台（io::stdout）\"\n\n#: src/hello/print.md:9\nmsgid \"`println!`: same as `print!` but a newline is appended.\"\nmsgstr \"`println!`：与 `print!` 类似，但会在末尾添加换行符\"\n\n#: src/hello/print.md:10\nmsgid \"\"\n\"`eprint!`: same as `print!` but the text is printed to the standard error \"\n\"(io::stderr).\"\nmsgstr \"`eprint!`：与 `print!` 类似，但文本会打印到标准错误输出（io::stderr）\"\n\n#: src/hello/print.md:12\nmsgid \"`eprintln!`: same as `eprint!` but a newline is appended.\"\nmsgstr \"`eprintln!`：与 `eprint!` 类似，但会在末尾添加换行符\"\n\n#: src/hello/print.md:14\nmsgid \"\"\n\"All parse text in the same fashion. As a plus, Rust checks formatting \"\n\"correctness at compile time.\"\nmsgstr \"\"\n\"所有这些宏都以相同的方式解析文本。此外，Rust 会在编译时检查格式化的正确性。\"\n\n#: src/hello/print.md:19\nmsgid \"\"\n\"// In general, the `{}` will be automatically replaced with any\\n\"\n\"    // arguments. These will be stringified.\\n\"\nmsgstr \"\"\n\"// 通常，`{}` 会被自动替换为任何参数。\\n\"\n\"    // 这些参数会被转换为字符串。\\n\"\n\n#: src/hello/print.md:21\nmsgid \"\\\"{} days\\\"\"\nmsgstr \"\\\"{} 天\\\"\"\n\n#: src/hello/print.md:23\nmsgid \"\"\n\"// Positional arguments can be used. Specifying an integer inside `{}`\\n\"\n\"    // determines which additional argument will be replaced. Arguments \"\n\"start\\n\"\n\"    // at 0 immediately after the format string.\\n\"\nmsgstr \"\"\n\"// 可以使用位置参数。在 `{}` 中指定一个整数\\n\"\n\"    // 来决定替换哪个额外的参数。参数编号\\n\"\n\"    // 从格式字符串后立即开始，从 0 开始。\\n\"\n\n#: src/hello/print.md:26\nmsgid \"\\\"{0}, this is {1}. {1}, this is {0}\\\"\"\nmsgstr \"\\\"{0}，这是 {1}。{1}，这是 {0}\\\"\"\n\n#: src/hello/print.md:26 src/scope/move/partial_move.md:31\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/hello/print.md:26 src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/hello/print.md:28\nmsgid \"// As can named arguments.\\n\"\nmsgstr \"// 还可以使用命名参数。\\n\"\n\n#: src/hello/print.md:29\nmsgid \"\\\"{subject} {verb} {object}\\\"\"\nmsgstr \"\\\"{subject} {verb} {object}\\\"\"\n\n#: src/hello/print.md:30\nmsgid \"\\\"the lazy dog\\\"\"\nmsgstr \"\\\"那只懒惰的狗\\\"\"\n\n#: src/hello/print.md:31\nmsgid \"\\\"the quick brown fox\\\"\"\nmsgstr \"\\\"那只敏捷的棕色狐狸\\\"\"\n\n#: src/hello/print.md:32\nmsgid \"\\\"jumps over\\\"\"\nmsgstr \"\\\"跳过\\\"\"\n\n#: src/hello/print.md:34\nmsgid \"\"\n\"// Different formatting can be invoked by specifying the format character\\n\"\n\"    // after a `:`.\\n\"\nmsgstr \"\"\n\"// 在 `:` 后指定格式字符，\\n\"\n\"    // 可以调用不同的格式化方式。\\n\"\n\n#: src/hello/print.md:36\nmsgid \"\\\"Base 10:               {}\\\"\"\nmsgstr \"\\\"十进制：               {}\\\"\"\n\n#: src/hello/print.md:36\nmsgid \"// 69420\\n\"\nmsgstr \"// 69420\\n\"\n\n#: src/hello/print.md:37\nmsgid \"\\\"Base 2 (binary):       {:b}\\\"\"\nmsgstr \"\\\"二进制：               {:b}\\\"\"\n\n#: src/hello/print.md:37\nmsgid \"// 10000111100101100\\n\"\nmsgstr \"// 10000111100101100\\n\"\n\n#: src/hello/print.md:38\nmsgid \"\\\"Base 8 (octal):        {:o}\\\"\"\nmsgstr \"\\\"八进制：               {:o}\\\"\"\n\n#: src/hello/print.md:38\nmsgid \"// 207454\\n\"\nmsgstr \"// 207454\\n\"\n\n#: src/hello/print.md:39\nmsgid \"\\\"Base 16 (hexadecimal): {:x}\\\"\"\nmsgstr \"\\\"十六进制：             {:x}\\\"\"\n\n#: src/hello/print.md:39\nmsgid \"// 10f2c\\n\"\nmsgstr \"// 10f2c\\n\"\n\n#: src/hello/print.md:41\nmsgid \"\"\n\"// You can right-justify text with a specified width. This will\\n\"\n\"    // output \\\"    1\\\". (Four white spaces and a \\\"1\\\", for a total width \"\n\"of 5.)\\n\"\nmsgstr \"\"\n\"// 可以指定宽度来右对齐文本。这将输出\\n\"\n\"    // \\\"    1\\\"。（四个空格和一个 \\\"1\\\"，总宽度为 5。）\\n\"\n\n#: src/hello/print.md:43\nmsgid \"\\\"{number:>5}\\\"\"\nmsgstr \"\\\"{number:>5}\\\"\"\n\n#: src/hello/print.md:45\nmsgid \"// You can pad numbers with extra zeroes,\\n\"\nmsgstr \"// 可以用额外的零来填充数字，\\n\"\n\n#: src/hello/print.md:46\nmsgid \"\\\"{number:0>5}\\\"\"\nmsgstr \"\\\"{number:0>5}\\\"\"\n\n#: src/hello/print.md:46\nmsgid \"\"\n\"// 00001\\n\"\n\"    // and left-adjust by flipping the sign. This will output \\\"10000\\\".\\n\"\nmsgstr \"\"\n\"// 00001\\n\"\n\"    // 通过翻转符号来左对齐。这将输出 \\\"10000\\\"。\\n\"\n\n#: src/hello/print.md:48\nmsgid \"\\\"{number:0<5}\\\"\"\nmsgstr \"\\\"{number:0<5}\\\"\"\n\n#: src/hello/print.md:48\nmsgid \"// 10000\\n\"\nmsgstr \"// 10000\\n\"\n\n#: src/hello/print.md:50\nmsgid \"\"\n\"// You can use named arguments in the format specifier by appending a `$`.\\n\"\nmsgstr \"// 在格式说明符后添加 `$` 可以使用命名参数。\\n\"\n\n#: src/hello/print.md:51\nmsgid \"\\\"{number:0>width$}\\\"\"\nmsgstr \"\\\"{number:0>width$}\\\"\"\n\n#: src/hello/print.md:53\nmsgid \"\"\n\"// Rust even checks to make sure the correct number of arguments are used.\\n\"\nmsgstr \"// Rust 甚至会检查使用的参数数量是否正确。\\n\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"My name is {0}, {1} {0}\\\"\"\nmsgstr \"\\\"我的名字是 {0}，{1} {0}\\\"\"\n\n#: src/hello/print.md:54\nmsgid \"\\\"Bond\\\"\"\nmsgstr \"\\\"Bond\\\"\"\n\n#: src/hello/print.md:55\nmsgid \"// FIXME ^ Add the missing argument: \\\"James\\\"\\n\"\nmsgstr \"// FIXME ^ 添加缺失的参数：\\\"James\\\"\\n\"\n\n#: src/hello/print.md:57\nmsgid \"\"\n\"// Only types that implement fmt::Display can be formatted with `{}`. User-\\n\"\n\"    // defined types do not implement fmt::Display by default.\\n\"\nmsgstr \"\"\n\"// 只有实现了 fmt::Display 的类型才能用 `{}` 格式化。\\n\"\n\"    // 用户定义的类型默认不实现 fmt::Display。\\n\"\n\n#: src/hello/print.md:60\nmsgid \"// disable `dead_code` which warn against unused module\\n\"\nmsgstr \"// 禁用 `dead_code`，它会警告未使用的模块\\n\"\n\n#: src/hello/print.md:63\nmsgid \"\"\n\"// This will not compile because `Structure` does not implement\\n\"\n\"    // fmt::Display.\\n\"\n\"    // println!(\\\"This struct `{}` won't print...\\\", Structure(3));\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 这无法编译，因为 `Structure` 没有实现 fmt::Display。\\n\"\n\"    // println!(\\\"这个结构体 `{}` 无法打印...\\\", Structure(3));\\n\"\n\"    // TODO ^ 尝试取消注释这一行\\n\"\n\n#: src/hello/print.md:68\nmsgid \"\"\n\"// For Rust 1.58 and above, you can directly capture the argument from a\\n\"\n\"    // surrounding variable. Just like the above, this will output\\n\"\n\"    // \\\"    1\\\", 4 white spaces and a \\\"1\\\".\\n\"\nmsgstr \"\"\n\"// 在 Rust 1.58 及以上版本，你可以直接从周围的变量捕获参数。\\n\"\n\"    // 就像上面一样，这将输出 \\\"    1\\\"，4 个空格和一个 \\\"1\\\"。\\n\"\n\n#: src/hello/print.md:73\nmsgid \"\\\"{number:>width$}\\\"\"\nmsgstr \"\\\"{number:>width$}\\\"\"\n\n#: src/hello/print.md:77\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) contains many [`traits`]\"\n\"(https://doc.rust-lang.org/std/fmt/#formatting-traits) which govern the \"\n\"display of text. The base form of two important ones are listed below:\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) 包含许多控制文本显示的 \"\n\"[`traits`](https://doc.rust-lang.org/std/fmt/#formatting-traits)。下面列出了\"\n\"两个重要的基本形式：\"\n\n#: src/hello/print.md:80\nmsgid \"\"\n\"`fmt::Debug`: Uses the `{:?}` marker. Format text for debugging purposes.\"\nmsgstr \"`fmt::Debug`: 使用 `{:?}` 标记。用于调试目的的文本格式化。\"\n\n#: src/hello/print.md:81\nmsgid \"\"\n\"`fmt::Display`: Uses the `{}` marker. Format text in a more elegant, user \"\n\"friendly fashion.\"\nmsgstr \"`fmt::Display`: 使用 `{}` 标记。以更优雅、用户友好的方式格式化文本。\"\n\n#: src/hello/print.md:84\nmsgid \"\"\n\"Here, we used `fmt::Display` because the std library provides \"\n\"implementations for these types. To print text for custom types, more steps \"\n\"are required.\"\nmsgstr \"\"\n\"这里我们使用 `fmt::Display`，因为标准库为这些类型提供了实现。要打印自定义类型\"\n\"的文本，需要额外的步骤。\"\n\n#: src/hello/print.md:87\nmsgid \"\"\n\"Implementing the `fmt::Display` trait automatically implements the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"which allows us to [convert](../conversion/string.md) the type to [`String`]\"\n\"(../std/str.md).\"\nmsgstr \"\"\n\"实现 `fmt::Display` 特性会自动实现 [`ToString`](https://doc.rust-lang.org/\"\n\"std/string/trait.ToString.html) 特性，这允许我们将该类型[转换](../conversion/\"\n\"string.md)为[`String`](../std/str.md)。\"\n\n#: src/hello/print.md:90\nmsgid \"\"\n\"In _line 43_, `#[allow(dead_code)]` is an [attribute](../attribute.md) which \"\n\"only applies to the module after it.\"\nmsgstr \"\"\n\"在 _43 行_，`#[allow(dead_code)]`是一个 [属性(attribute)](../attribute.md)，\"\n\"它只适用于它之后的模块。\"\n\n#: src/hello/print.md:92\nmsgid \"Activities\"\nmsgstr \"练习\"\n\n#: src/hello/print.md:94\nmsgid \"\"\n\"Fix the issue in the above code (see FIXME) so that it runs without error.\"\nmsgstr \"修复上述代码中的问题（参见 FIXME 注释），使其能够正常运行。\"\n\n#: src/hello/print.md:96\nmsgid \"\"\n\"Try uncommenting the line that attempts to format the `Structure` struct \"\n\"(see TODO)\"\nmsgstr \"尝试取消注释那行尝试格式化 `Structure` 结构体的代码（参见 TODO 注释）\"\n\n#: src/hello/print.md:98\nmsgid \"\"\n\"Add a `println!` macro call that prints: `Pi is roughly 3.142` by \"\n\"controlling the number of decimal places shown. For the purposes of this \"\n\"exercise, use `let pi = 3.141592` as an estimate for pi. (Hint: you may need \"\n\"to check the [`std::fmt`](https://doc.rust-lang.org/std/fmt/) documentation \"\n\"for setting the number of decimals to display)\"\nmsgstr \"\"\n\"添加一个 `println!` 宏调用，打印：`Pi 约等于 3.142`，通过控制显示的小数位数来\"\n\"实现。\\n\"\n\"在本练习中，使用 `let pi = 3.141592` 作为 pi 的近似值。（提示：你可能需要查\"\n\"阅\\n\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/) 文档来了解如何设置显示的小数\"\n\"位数）\"\n\n#: src/hello/print.md:105\nmsgid \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/), [`macros`](../macros.md), \"\n\"[`struct`](../custom_types/structs.md), [`traits`](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits), and [`dead_code`](../attribute/unused.md)\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)、[`macros`](../\"\n\"macros.md)、\\n\"\n\"[`struct`](../custom_types/structs.md)、[`traits`](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits) 和 [`dead_code`](../attribute/unused.md)\"\n\n#: src/hello/print/print_debug.md:3\nmsgid \"\"\n\"All types which want to use `std::fmt` formatting `traits` require an \"\n\"implementation to be printable. Automatic implementations are only provided \"\n\"for types such as in the `std` library. All others _must_ be manually \"\n\"implemented somehow.\"\nmsgstr \"\"\n\"所有想要使用 `std::fmt` 格式化 `traits` 的类型都需要实现才能打印。\\n\"\n\"自动实现仅为 `std` 库中的类型提供。所有其他类型都**必须**以某种方式手动实现。\"\n\n#: src/hello/print/print_debug.md:8\nmsgid \"\"\n\"The `fmt::Debug` `trait` makes this very straightforward. _All_ types can \"\n\"`derive` (automatically create) the `fmt::Debug` implementation. This is not \"\n\"true for `fmt::Display` which must be manually implemented.\"\nmsgstr \"\"\n\"`fmt::Debug` trait 使这变得非常简单。**所有**类型都可以 `derive`（自动创\"\n\"建）\\n\"\n\"`fmt::Debug` 实现。但这对 `fmt::Display` 不适用，后者必须手动实现。\"\n\n#: src/hello/print/print_debug.md:13\nmsgid \"\"\n\"// This structure cannot be printed either with `fmt::Display` or\\n\"\n\"// with `fmt::Debug`.\\n\"\nmsgstr \"// 这个结构体无法通过 `fmt::Display` 或 `fmt::Debug` 打印。\\n\"\n\n#: src/hello/print/print_debug.md:16\nmsgid \"\"\n\"// The `derive` attribute automatically creates the implementation\\n\"\n\"// required to make this `struct` printable with `fmt::Debug`.\\n\"\nmsgstr \"\"\n\"// `derive` 属性自动创建使这个 `struct` 可以用 `fmt::Debug` 打印的实现。\\n\"\n\n#: src/hello/print/print_debug.md:23\nmsgid \"All `std` library types are automatically printable with `{:?}` too:\"\nmsgstr \"所有 `std` 库类型也可以自动使用 `{:?}` 打印：\"\n\n#: src/hello/print/print_debug.md:26\nmsgid \"\"\n\"// Derive the `fmt::Debug` implementation for `Structure`. `Structure`\\n\"\n\"// is a structure which contains a single `i32`.\\n\"\nmsgstr \"\"\n\"// 为 `Structure` 派生 `fmt::Debug` 实现。`Structure` 是一个包含单个 `i32` 的\"\n\"结构体。\\n\"\n\n#: src/hello/print/print_debug.md:30\nmsgid \"\"\n\"// Put a `Structure` inside of the structure `Deep`. Make it printable\\n\"\n\"// also.\\n\"\nmsgstr \"// 在 `Deep` 结构体中放入一个 `Structure`。使其也可打印。\\n\"\n\n#: src/hello/print/print_debug.md:37\nmsgid \"// Printing with `{:?}` is similar to with `{}`.\\n\"\nmsgstr \"// 使用 `{:?}` 打印类似于使用 `{}`。\\n\"\n\n#: src/hello/print/print_debug.md:38\nmsgid \"\\\"{:?} months in a year.\\\"\"\nmsgstr \"\\\"{:?} 个月在一年中。\\\"\"\n\n#: src/hello/print/print_debug.md:39\nmsgid \"\\\"{1:?} {0:?} is the {actor:?} name.\\\"\"\nmsgstr \"\\\"{1:?} {0:?} 是这个 {actor:?} 的名字。\\\"\"\n\n#: src/hello/print/print_debug.md:40\nmsgid \"\\\"Slater\\\"\"\nmsgstr \"\\\"Slater\\\"\"\n\n#: src/hello/print/print_debug.md:41\nmsgid \"\\\"Christian\\\"\"\nmsgstr \"\\\"Christian\\\"\"\n\n#: src/hello/print/print_debug.md:42\nmsgid \"\\\"actor's\\\"\"\nmsgstr \"\\\"演员\\\"\"\n\n#: src/hello/print/print_debug.md:44\nmsgid \"// `Structure` is printable!\\n\"\nmsgstr \"// `Structure` 现在可以打印了！\\n\"\n\n#: src/hello/print/print_debug.md:45 src/hello/print/print_debug.md:49\nmsgid \"\\\"Now {:?} will print!\\\"\"\nmsgstr \"\\\"现在 {:?} 将会打印！\\\"\"\n\n#: src/hello/print/print_debug.md:47\nmsgid \"\"\n\"// The problem with `derive` is there is no control over how\\n\"\n\"    // the results look. What if I want this to just show a `7`?\\n\"\nmsgstr \"\"\n\"// `derive` 的问题是无法控制输出的样式。\\n\"\n\"    // 如果我只想显示一个 `7` 怎么办？\\n\"\n\n#: src/hello/print/print_debug.md:53\nmsgid \"\"\n\"So `fmt::Debug` definitely makes this printable but sacrifices some \"\n\"elegance. Rust also provides \\\"pretty printing\\\" with `{:#?}`.\"\nmsgstr \"\"\n\"所以 `fmt::Debug` 确实使其可打印，但牺牲了一些优雅。\\n\"\n\"Rust 还提供了使用 `{:#?}` 进行\\\"美化打印\\\"的功能。\"\n\n#: src/hello/print/print_debug.md:64 src/custom_types/structs.md:42\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/hello/print/print_debug.md:68\nmsgid \"// Pretty print\\n\"\nmsgstr \"// 美化打印\\n\"\n\n#: src/hello/print/print_debug.md:69\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/hello/print/print_debug.md:73\nmsgid \"One can manually implement `fmt::Display` to control the display.\"\nmsgstr \"可以手动实现 `fmt::Display` 来控制显示方式。\"\n\n#: src/hello/print/print_debug.md:77\nmsgid \"\"\n\"[`attributes`](https://doc.rust-lang.org/reference/attributes.html), \"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), and [`struct`](../../custom_types/structs.md)\"\nmsgstr \"\"\n\"[`attributes`](https://doc.rust-lang.org/reference/attributes.html)、\\n\"\n\"[`derive`](../../trait/derive.md)、[`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/) \\n\"\n\"和 [`struct`](../../custom_types/structs.md)\"\n\n#: src/hello/print/print_display.md:3\nmsgid \"\"\n\"`fmt::Debug` hardly looks compact and clean, so it is often advantageous to \"\n\"customize the output appearance. This is done by manually implementing \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/), which uses the `{}` \"\n\"print marker. Implementing it looks like this:\"\nmsgstr \"\"\n\"`fmt::Debug` 的输出往往不够简洁清晰，因此自定义输出外观通常更有优势。\\n\"\n\"这可以通过手动实现 [`fmt::Display`](https://doc.rust-lang.org/std/fmt/) 来完\"\n\"成，\\n\"\n\"它使用 `{}` 打印标记。实现方式如下：\"\n\n#: src/hello/print/print_display.md:9\nmsgid \"// Import (via `use`) the `fmt` module to make it available.\\n\"\nmsgstr \"// 通过 `use` 导入 `fmt` 模块使其可用。\\n\"\n\n#: src/hello/print/print_display.md:11\nmsgid \"\"\n\"// Define a structure for which `fmt::Display` will be implemented. This is\\n\"\n\"// a tuple struct named `Structure` that contains an `i32`.\\n\"\nmsgstr \"\"\n\"// 定义一个结构体，我们将为其实现 `fmt::Display`。\\n\"\n\"// 这是一个名为 `Structure` 的元组结构体，包含一个 `i32`。\\n\"\n\n#: src/hello/print/print_display.md:15\nmsgid \"\"\n\"// To use the `{}` marker, the trait `fmt::Display` must be implemented\\n\"\n\"// manually for the type.\\n\"\nmsgstr \"// 要使用 `{}` 标记，必须为该类型手动实现 `fmt::Display` trait。\\n\"\n\n#: src/hello/print/print_display.md:19\nmsgid \"// This trait requires `fmt` with this exact signature.\\n\"\nmsgstr \"// 这个 trait 要求 `fmt` 方法具有确切的签名。\\n\"\n\n#: src/hello/print/print_display.md:21\nmsgid \"\"\n\"// Write strictly the first element into the supplied output\\n\"\n\"        // stream: `f`. Returns `fmt::Result` which indicates whether the\\n\"\n\"        // operation succeeded or failed. Note that `write!` uses syntax \"\n\"which\\n\"\n\"        // is very similar to `println!`.\\n\"\nmsgstr \"\"\n\"// 将第一个元素严格写入提供的输出流 `f`。\\n\"\n\"        // 返回 `fmt::Result`，表示操作是否成功。\\n\"\n\"        // 注意 `write!` 的语法与 `println!` 非常相似。\\n\"\n\n#: src/hello/print/print_display.md:25\n#: src/hello/print/print_display/testcase_list.md:13\n#: src/hello/print/print_display/testcase_list.md:39\n#: src/hello/print/print_display/testcase_list.md:49 src/hello/print/fmt.md:53\n#: src/custom_types/enum/testcase_linked_list.md:74 src/conversion/string.md:25\n#: src/flow_control/loop.md:26 src/flow_control/while.md:21\n#: src/flow_control/for.md:23 src/flow_control/for.md:43 src/fn.md:40\n#: src/fn/closures/capture.md:96 src/fn/closures/capture.md:97\n#: src/fn/closures/anonymity.md:41 src/generics/bounds.md:12\n#: src/macros/repeat.md:24 src/macros/repeat.md:25 src/macros/repeat.md:26\n#: src/error/result.md:73 src/std/str.md:92 src/std/str.md:102\n#: src/std/str.md:106 src/std/str.md:111 src/std/result.md:72\n#: src/std/result/question_mark.md:57 src/std/result/question_mark.md:65\n#: src/std_misc/file/read_lines.md:60 src/std_misc/arg/matching.md:9\n#: src/std_misc/arg/matching.md:13\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/hello/print/print_display.md:30\nmsgid \"\"\n\"`fmt::Display` may be cleaner than `fmt::Debug` but this presents a problem \"\n\"for the `std` library. How should ambiguous types be displayed? For example, \"\n\"if the `std` library implemented a single style for all `Vec<T>`, what style \"\n\"should it be? Would it be either of these two?\"\nmsgstr \"\"\n\"`fmt::Display` 可能比 `fmt::Debug` 更简洁，但这给 `std` 库带来了一个问题：如\"\n\"何显示歧义类型？例如，如果 `std` 库为所有 `Vec<T>` 实现统一的样式，应该采用哪\"\n\"种样式？是以下两种之一吗？\"\n\n#: src/hello/print/print_display.md:35\nmsgid \"`Vec<path>`: `/:/etc:/home/username:/bin` (split on `:`)\"\nmsgstr \"`Vec<path>`：`/:/etc:/home/username:/bin`（以 `:` 分隔）\"\n\n#: src/hello/print/print_display.md:36\nmsgid \"`Vec<number>`: `1,2,3` (split on `,`)\"\nmsgstr \"`Vec<number>`：`1,2,3`（以 `,` 分隔）\"\n\n#: src/hello/print/print_display.md:38\nmsgid \"\"\n\"No, because there is no ideal style for all types and the `std` library \"\n\"doesn't presume to dictate one. `fmt::Display` is not implemented for \"\n\"`Vec<T>` or for any other generic containers. `fmt::Debug` must then be used \"\n\"for these generic cases.\"\nmsgstr \"\"\n\"答案是否定的。因为不存在适用于所有类型的理想样式，`std` 库也不应擅自规定一\"\n\"种。因此，`fmt::Display` 并未为 `Vec<T>` 或其他泛型容器实现。在这些泛型情况\"\n\"下，必须使用 `fmt::Debug`。\"\n\n#: src/hello/print/print_display.md:43\nmsgid \"\"\n\"This is not a problem though because for any new _container_ type which is \"\n\"_not_ generic, `fmt::Display` can be implemented.\"\nmsgstr \"\"\n\"不过，这不是问题。对于任何新的非泛型容器类型，都可以实现 `fmt::Display`。\"\n\n#: src/hello/print/print_display.md:47\nmsgid \"// Import `fmt`\\n\"\nmsgstr \"// 导入 `fmt`\\n\"\n\n#: src/hello/print/print_display.md:48\nmsgid \"\"\n\"// A structure holding two numbers. `Debug` will be derived so the results \"\n\"can\\n\"\n\"// be contrasted with `Display`.\\n\"\nmsgstr \"\"\n\"// 定义一个包含两个数字的结构体。派生 `Debug` 特性，\\n\"\n\"// 以便与 `Display` 的结果进行对比。\\n\"\n\n#: src/hello/print/print_display.md:53\nmsgid \"// Implement `Display` for `MinMax`.\\n\"\nmsgstr \"// 为 `MinMax` 实现 `Display` 特性。\\n\"\n\n#: src/hello/print/print_display.md:57\nmsgid \"// Use `self.number` to refer to each positional data point.\\n\"\nmsgstr \"// 使用 `self.number` 引用每个位置的数据点。\\n\"\n\n#: src/hello/print/print_display.md:58\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/hello/print/print_display.md:61\nmsgid \"// Define a structure where the fields are nameable for comparison.\\n\"\nmsgstr \"// 定义一个结构体，其字段可命名以便比较。\\n\"\n\n#: src/hello/print/print_display.md:68\nmsgid \"// Similarly, implement `Display` for `Point2D`.\\n\"\nmsgstr \"// 同样，为 `Point2D` 实现 `Display` 特性。\\n\"\n\n#: src/hello/print/print_display.md:72\nmsgid \"// Customize so only `x` and `y` are denoted.\\n\"\nmsgstr \"// 自定义实现，只显示 `x` 和 `y`。\\n\"\n\n#: src/hello/print/print_display.md:73\nmsgid \"\\\"x: {}, y: {}\\\"\"\nmsgstr \"\\\"x: {}, y: {}\\\"\"\n\n#: src/hello/print/print_display.md:80\nmsgid \"\\\"Compare structures:\\\"\"\nmsgstr \"\\\"比较结构体：\\\"\"\n\n#: src/hello/print/print_display.md:81 src/hello/print/print_display.md:94\nmsgid \"\\\"Display: {}\\\"\"\nmsgstr \"\\\"Display：{}\\\"\"\n\n#: src/hello/print/print_display.md:82 src/hello/print/print_display.md:95\nmsgid \"\\\"Debug: {:?}\\\"\"\nmsgstr \"\\\"Debug：{:?}\\\"\"\n\n#: src/hello/print/print_display.md:87\nmsgid \"\\\"The big range is {big} and the small is {small}\\\"\"\nmsgstr \"\\\"大范围是 {big}，小范围是 {small}\\\"\"\n\n#: src/hello/print/print_display.md:93\nmsgid \"\\\"Compare points:\\\"\"\nmsgstr \"\\\"比较点：\\\"\"\n\n#: src/hello/print/print_display.md:97\nmsgid \"\"\n\"// Error. Both `Debug` and `Display` were implemented, but `{:b}`\\n\"\n\"    // requires `fmt::Binary` to be implemented. This will not work.\\n\"\n\"    // println!(\\\"What does Point2D look like in binary: {:b}?\\\", point);\\n\"\nmsgstr \"\"\n\"// 错误。虽然实现了 `Debug` 和 `Display`，但 `{:b}` 需要\\n\"\n\"    // 实现 `fmt::Binary`。这行代码无法工作。\\n\"\n\"    // println!(\\\"Point2D 的二进制表示是什么：{:b}？\\\", point);\\n\"\n\n#: src/hello/print/print_display.md:103\nmsgid \"\"\n\"So, `fmt::Display` has been implemented but `fmt::Binary` has not, and \"\n\"therefore cannot be used. `std::fmt` has many such [`traits`](https://\"\n\"doc.rust-lang.org/std/fmt/#formatting-traits) and each requires its own \"\n\"implementation. This is detailed further in [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/).\"\nmsgstr \"\"\n\"因此，虽然实现了 `fmt::Display`，但未实现 `fmt::Binary`，所以无法使用。\"\n\"`std::fmt` 包含许多这样的[`traits`](https://doc.rust-lang.org/std/fmt/\"\n\"#formatting-traits)，每个都需要单独实现。更多详情请参阅 [`std::fmt`](https://\"\n\"doc.rust-lang.org/std/fmt/)。\"\n\n#: src/hello/print/print_display.md:109\nmsgid \"\"\n\"After checking the output of the above example, use the `Point2D` struct as \"\n\"a guide to add a `Complex` struct to the example. When printed in the same \"\n\"way, the output should be:\"\nmsgstr \"\"\n\"查看上述示例的输出后，参考 `Point2D` 结构体，向示例中添加一个 `Complex` 结构\"\n\"体。以相同方式打印时，输出应为：\"\n\n#: src/hello/print/print_display.md:121\nmsgid \"Bonus: Add a space before the `+`/`-` signs.\"\nmsgstr \"额外练习：在 `+`/`-` 符号前添加一个空格。\"\n\n#: src/hello/print/print_display.md:123\nmsgid \"Hints in case you get stuck:\"\nmsgstr \"如果你遇到困难，这里有三个提示：\"\n\n#: src/hello/print/print_display.md:125\nmsgid \"\"\n\"Check the documentation for [`Sign/#/0`](https://doc.rust-lang.org/std/fmt/\"\n\"#sign0) in `std::fmt`.\"\nmsgstr \"\"\n\"你可以使用 `:0>2` [用零填充到宽度为 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width)。\"\n\n#: src/hello/print/print_display.md:126\nmsgid \"\"\n\"Bonus: Check [`if`\\\\-`else`](../../flow_control/if_else.md) branching and \"\n\"the [`abs`](https://doc.rust-lang.org/std/primitive.f64.html#method.abs) \"\n\"function.\"\nmsgstr \"\"\n\"额外练习：查看 [`if`\\\\-`else`](../../flow_control/if_else.md) 分支语句以及 \"\n\"[`abs`](https://doc.rust-lang.org/std/primitive.f64.html#method.abs) 函数。\"\n\n#: src/hello/print/print_display.md:130\nmsgid \"\"\n\"[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/), [`macros`](../../macros.md), [`struct`](../../custom_types/\"\n\"structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-\"\n\"traits), and [`use`](../../mod/use.md)\"\nmsgstr \"\"\n\"[`derive`](../../trait/derive.md)、[`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/)、[`macros`](../../macros.md)、[`struct`](../../custom_types/\"\n\"structs.md)、[`trait`](https://doc.rust-lang.org/std/fmt/#formatting-traits) \"\n\"和 [`use`](../../mod/use.md)\"\n\n#: src/hello/print/print_display/testcase_list.md:3\nmsgid \"\"\n\"Implementing `fmt::Display` for a structure where the elements must each be \"\n\"handled sequentially is tricky. The problem is that each `write!` generates \"\n\"a `fmt::Result`. Proper handling of this requires dealing with _all_ the \"\n\"results. Rust provides the `?` operator for exactly this purpose.\"\nmsgstr \"\"\n\"为一个需要顺序处理元素的结构体实现 `fmt::Display` 是棘手的。问题在于每个 \"\n\"`write!` 都会生成一个 `fmt::Result`。正确处理这种情况需要处理所有的结果。\"\n\"Rust 提供了 `?` 运算符专门用于此目的。\"\n\n#: src/hello/print/print_display/testcase_list.md:8\nmsgid \"Using `?` on `write!` looks like this:\"\nmsgstr \"在 `write!` 上使用 `?` 的示例如下：\"\n\n#: src/hello/print/print_display/testcase_list.md:11\nmsgid \"\"\n\"// Try `write!` to see if it errors. If it errors, return\\n\"\n\"// the error. Otherwise continue.\\n\"\nmsgstr \"\"\n\"// 尝试执行 `write!`，检查是否出错。如果出错，返回错误。\\n\"\n\"// 否则继续执行。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:16\nmsgid \"\"\n\"With `?` available, implementing `fmt::Display` for a `Vec` is \"\n\"straightforward:\"\nmsgstr \"有了 `?` 运算符，为 `Vec` 实现 `fmt::Display` 就变得简单明了：\"\n\n#: src/hello/print/print_display/testcase_list.md:20\nmsgid \"// Import the `fmt` module.\\n\"\nmsgstr \"// 导入 `fmt` 模块。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:21\nmsgid \"// Define a structure named `List` containing a `Vec`.\\n\"\nmsgstr \"// 定义一个名为 `List` 的结构体，包含一个 `Vec`。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:27\nmsgid \"\"\n\"// Extract the value using tuple indexing,\\n\"\n\"        // and create a reference to `vec`.\\n\"\nmsgstr \"\"\n\"// 使用元组索引提取值，\\n\"\n\"        // 并创建一个指向 `vec` 的引用。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:31\nmsgid \"\\\"[\\\"\"\nmsgstr \"\\\"[\\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:33\nmsgid \"\"\n\"// Iterate over `v` in `vec` while enumerating the iteration\\n\"\n\"        // index in `index`.\\n\"\nmsgstr \"// 遍历 `vec` 中的 `v`，同时用 `index` 枚举迭代索引。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:36\nmsgid \"\"\n\"// For every element except the first, add a comma.\\n\"\n\"            // Use the ? operator to return on errors.\\n\"\nmsgstr \"\"\n\"// 除第一个元素外，为每个元素添加逗号。\\n\"\n\"            // 使用 ? 运算符在出错时返回。\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:38 src/std/str.md:36\nmsgid \"\\\", \\\"\"\nmsgstr \"\\\", \\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:42\nmsgid \"// Close the opened bracket and return a fmt::Result value.\\n\"\nmsgstr \"// 闭合左括号并返回 fmt::Result 值\\n\"\n\n#: src/hello/print/print_display/testcase_list.md:43\nmsgid \"\\\"]\\\"\"\nmsgstr \"\\\"]\\\"\"\n\n#: src/hello/print/print_display/testcase_list.md:55\nmsgid \"\"\n\"Try changing the program so that the index of each element in the vector is \"\n\"also printed. The new output should look like this:\"\nmsgstr \"\"\n\"尝试修改程序，使向量中每个元素的索引也被打印出来。新的输出应该如下所示：\"\n\n#: src/hello/print/print_display/testcase_list.md:64\nmsgid \"\"\n\"[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/\"\n\"ref.md), [`Result`](../../../std/result.md), [`struct`](../../../\"\n\"custom_types/structs.md), [`?`](../../../std/result/question_mark.md), and \"\n\"[`vec!`](../../../std/vec.md)\"\nmsgstr \"\"\n\"[`for`](../../../flow_control/for.md)、[`ref`](../../../scope/borrow/\"\n\"ref.md)、[`Result`](../../../std/result.md)、[`struct`](../../../\"\n\"custom_types/structs.md)、[`?`](../../../std/result/question_mark.md) 和 \"\n\"[`vec!`](../../../std/vec.md)\"\n\n#: src/hello/print/fmt.md:3\nmsgid \"We've seen that formatting is specified via a _format string_:\"\nmsgstr \"我们已经看到，格式化是通过一个_格式字符串_来指定的：\"\n\n#: src/hello/print/fmt.md:5\nmsgid \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\nmsgstr \"`format!(\\\"{}\\\", foo)` -> `\\\"3735928559\\\"`\"\n\n#: src/hello/print/fmt.md:6\nmsgid \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\nmsgstr \"\"\n\"`format!(\\\"0x{:X}\\\", foo)` -> [`\\\"0xDEADBEEF\\\"`](https://en.wikipedia.org/\"\n\"wiki/Deadbeef#Magic_debug_values)\"\n\n#: src/hello/print/fmt.md:7\nmsgid \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\nmsgstr \"`format!(\\\"0o{:o}\\\", foo)` -> `\\\"0o33653337357\\\"`\"\n\n#: src/hello/print/fmt.md:9\nmsgid \"\"\n\"The same variable (`foo`) can be formatted differently depending on which \"\n\"_argument type_ is used: `X` vs `o` vs _unspecified_.\"\nmsgstr \"\"\n\"同一个变量（`foo`）可以根据使用的**参数类型**而有不同的格式化方式：`X`、`o` \"\n\"或**未指定**。\"\n\n#: src/hello/print/fmt.md:12\nmsgid \"\"\n\"This formatting functionality is implemented via traits, and there is one \"\n\"trait for each argument type. The most common formatting trait is `Display`, \"\n\"which handles cases where the argument type is left unspecified: `{}` for \"\n\"instance.\"\nmsgstr \"\"\n\"这种格式化功能是通过 trait 实现的，每种参数类型都对应一个 trait。最常用的格式\"\n\"化 trait 是 `Display`，它处理参数类型未指定的情况，例如 `{}`。\"\n\n#: src/hello/print/fmt.md:21\nmsgid \"// Latitude\\n\"\nmsgstr \"// 纬度\\n\"\n\n#: src/hello/print/fmt.md:23\nmsgid \"// Longitude\\n\"\nmsgstr \"// 经度\\n\"\n\n#: src/hello/print/fmt.md:28\nmsgid \"\"\n\"// `f` is a buffer, and this method must write the formatted string into \"\n\"it.\\n\"\nmsgstr \"// `f` 是一个缓冲区，此方法必须将格式化的字符串写入其中。\\n\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'N'\"\nmsgstr \"'N'\"\n\n#: src/hello/print/fmt.md:30\nmsgid \"'S'\"\nmsgstr \"'S'\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'E'\"\nmsgstr \"'E'\"\n\n#: src/hello/print/fmt.md:31\nmsgid \"'W'\"\nmsgstr \"'W'\"\n\n#: src/hello/print/fmt.md:33\nmsgid \"\"\n\"// `write!` is like `format!`, but it will write the formatted string\\n\"\n\"        // into a buffer (the first argument).\\n\"\nmsgstr \"\"\n\"// `write!` 类似于 `format!`，但它会将格式化后的字符串\\n\"\n\"        // 写入一个缓冲区（第一个参数）。\\n\"\n\n#: src/hello/print/fmt.md:35\nmsgid \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\nmsgstr \"\\\"{}: {:.3}°{} {:.3}°{}\\\"\"\n\n#: src/hello/print/fmt.md:49\nmsgid \"\\\"Dublin\\\"\"\nmsgstr \"\\\"Dublin\\\"\"\n\n#: src/hello/print/fmt.md:50\nmsgid \"\\\"Oslo\\\"\"\nmsgstr \"\\\"Oslo\\\"\"\n\n#: src/hello/print/fmt.md:51\nmsgid \"\\\"Vancouver\\\"\"\nmsgstr \"\\\"Vancouver\\\"\"\n\n#: src/hello/print/fmt.md:60\nmsgid \"\"\n\"// Switch this to use {} once you've added an implementation\\n\"\n\"        // for fmt::Display.\\n\"\nmsgstr \"// 一旦你为 fmt::Display 添加了实现，就把这里改成使用 {}。\\n\"\n\n#: src/hello/print/fmt.md:62 src/primitives/tuples.md:60\n#: src/custom_types/structs.md:47 src/types/inference.md:23\n#: src/conversion/string.md:76 src/generics/bounds.md:49\n#: src/generics/where.md:38 src/std/str.md:137 src/std/result.md:59\n#: src/std/result.md:61 src/std/result.md:63 src/std/arc.md:26\n#: src/std_misc/channels.md:53\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/hello/print/fmt.md:67\nmsgid \"\"\n\"You can view a [full list of formatting traits](https://doc.rust-lang.org/\"\n\"std/fmt/#formatting-traits) and their argument types in the [`std::fmt`]\"\n\"(https://doc.rust-lang.org/std/fmt/) documentation.\"\nmsgstr \"\"\n\"你可以在 [`std::fmt`](https://doc.rust-lang.org/std/fmt/) 文档中查看[格式化 \"\n\"trait 的完整列表](https://doc.rust-lang.org/std/fmt/#formatting-traits)及其参\"\n\"数类型。\"\n\n#: src/hello/print/fmt.md:72\nmsgid \"\"\n\"Add an implementation of the `fmt::Display` trait for the `Color` struct \"\n\"above so that the output displays as:\"\nmsgstr \"为上面的 `Color` 结构体实现 `fmt::Display` trait，使输出显示如下：\"\n\n#: src/hello/print/fmt.md:81\nmsgid \"Three hints if you get stuck:\"\nmsgstr \"如果你遇到困难，这里有三个提示：\"\n\n#: src/hello/print/fmt.md:83\nmsgid \"\"\n\"The formula for calculating a color in the RGB color space is: `RGB = \"\n\"(R*65536)+(G*256)+B , (when R is RED, G is GREEN and B is BLUE)`. For more \"\n\"see [RGB color format & calculation](https://www.rapidtables.com/web/color/\"\n\"RGB_Color.html#rgb-format).\"\nmsgstr \"\"\n\"RGB 颜色空间中颜色的计算公式是：`RGB = (R*65536)+(G*256)+B，（其中 R 是红色，\"\n\"G 是绿色，B 是蓝色）`。更多信息请参见 [RGB 颜色格式和计算](https://\"\n\"www.rapidtables.com/web/color/RGB_Color.html#rgb-format)。\"\n\n#: src/hello/print/fmt.md:86\nmsgid \"\"\n\"You [may need to list each color more than once](https://doc.rust-lang.org/\"\n\"std/fmt/#named-parameters).\"\nmsgstr \"\"\n\"你[可能需要多次列出每种颜色](https://doc.rust-lang.org/std/fmt/#named-\"\n\"parameters)。\"\n\n#: src/hello/print/fmt.md:87\nmsgid \"\"\n\"You can [pad with zeros to a width of 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width) with `:0>2`.\"\nmsgstr \"\"\n\"你可以使用 `:0>2` [用零填充到宽度为 2](https://doc.rust-lang.org/std/fmt/\"\n\"#width)。\"\n\n#: src/hello/print/fmt.md:91\nmsgid \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\nmsgstr \"[`std::fmt`](https://doc.rust-lang.org/std/fmt/)\"\n\n#: src/primitives.md:3\nmsgid \"\"\n\"Rust provides access to a wide variety of `primitives`. A sample includes:\"\nmsgstr \"Rust 提供了多种`原生类型`。以下是一些示例：\"\n\n#: src/primitives.md:5\nmsgid \"Scalar Types\"\nmsgstr \"标量类型\"\n\n#: src/primitives.md:7\nmsgid \"\"\n\"Signed integers: `i8`, `i16`, `i32`, `i64`, `i128` and `isize` (pointer size)\"\nmsgstr \"有符号整数：`i8`、`i16`、`i32`、`i64`、`i128` 和 `isize`（指针大小）\"\n\n#: src/primitives.md:8\nmsgid \"\"\n\"Unsigned integers: `u8`, `u16`, `u32`, `u64`, `u128` and `usize` (pointer \"\n\"size)\"\nmsgstr \"无符号整数：`u8`、`u16`、`u32`、`u64`、`u128` 和 `usize`（指针大小）\"\n\n#: src/primitives.md:10\nmsgid \"Floating point: `f32`, `f64`\"\nmsgstr \"浮点数：`f32`、`f64`\"\n\n#: src/primitives.md:11\nmsgid \"`char` Unicode scalar values like `'a'`, `'α'` and `'∞'` (4 bytes each)\"\nmsgstr \"`char` Unicode 标量值，如 `'a'`、`'α'` 和 `'∞'`（每个都是 4 字节）\"\n\n#: src/primitives.md:12\nmsgid \"`bool` either `true` or `false`\"\nmsgstr \"`bool` 值为 `true` 或 `false`\"\n\n#: src/primitives.md:13\nmsgid \"The unit type `()`, whose only possible value is an empty tuple: `()`\"\nmsgstr \"单元类型 `()`，其唯一可能的值是空元组：`()`\"\n\n#: src/primitives.md:15\nmsgid \"\"\n\"Despite the value of a unit type being a tuple, it is not considered a \"\n\"compound type because it does not contain multiple values.\"\nmsgstr \"尽管单元类型的值是一个元组，但它不被视为复合类型，因为它不包含多个值。\"\n\n#: src/primitives.md:18\nmsgid \"Compound Types\"\nmsgstr \"复合类型\"\n\n#: src/primitives.md:20\nmsgid \"Arrays like `[1, 2, 3]`\"\nmsgstr \"数组，如 `[1, 2, 3]`\"\n\n#: src/primitives.md:21\nmsgid \"Tuples like `(1, true)`\"\nmsgstr \"元组，如 `(1, true)`\"\n\n#: src/primitives.md:23\nmsgid \"\"\n\"Variables can always be _type annotated_. Numbers may additionally be \"\n\"annotated via a _suffix_ or _by default_. Integers default to `i32` and \"\n\"floats to `f64`. Note that Rust can also infer types from context.\"\nmsgstr \"\"\n\"变量总是可以进行**类型标注**。数字还可以通过**后缀**或**默认方式**来标注。整\"\n\"数默认为 `i32` 类型，浮点数默认为 `f64` 类型。请注意，Rust 也可以从上下文中推\"\n\"断类型。\"\n\n#: src/primitives.md:29\nmsgid \"// Variables can be type annotated.\\n\"\nmsgstr \"// 变量可以被类型标注。\\n\"\n\n#: src/primitives.md:32\nmsgid \"// Regular annotation\\n\"\nmsgstr \"// 常规标注\\n\"\n\n#: src/primitives.md:33\nmsgid \"// Suffix annotation\\n\"\nmsgstr \"// 后缀标注\\n\"\n\n#: src/primitives.md:35\nmsgid \"// Or a default will be used.\\n\"\nmsgstr \"// 或者使用默认类型。\\n\"\n\n#: src/primitives.md:36\nmsgid \"// `f64`\\n\"\nmsgstr \"// `f64`\\n\"\n\n#: src/primitives.md:37\nmsgid \"// `i32`\\n\"\nmsgstr \"// `i32`\\n\"\n\n#: src/primitives.md:39\nmsgid \"// A type can also be inferred from context.\\n\"\nmsgstr \"// 类型也可以从上下文中推断。\\n\"\n\n#: src/primitives.md:40\nmsgid \"// Type i64 is inferred from another line.\\n\"\nmsgstr \"// 从另一行推断出类型为 i64。\\n\"\n\n#: src/primitives.md:43\nmsgid \"// A mutable variable's value can be changed.\\n\"\nmsgstr \"// 可变变量的值可以改变。\\n\"\n\n#: src/primitives.md:44\nmsgid \"// Mutable `i32`\\n\"\nmsgstr \"// 可变的 `i32`\\n\"\n\n#: src/primitives.md:47\nmsgid \"// Error! The type of a variable can't be changed.\\n\"\nmsgstr \"// 报错！变量的类型不能改变。\\n\"\n\n#: src/primitives.md:50\nmsgid \"// Variables can be overwritten with shadowing.\\n\"\nmsgstr \"// 变量可以通过遮蔽（shadowing）来覆盖。\\n\"\n\n#: src/primitives.md:53\nmsgid \"/* Compound types - Array and Tuple */\"\nmsgstr \"/* 复合类型 - 数组和元组 */\"\n\n#: src/primitives.md:55\nmsgid \"// Array signature consists of Type T and length as [T; length].\\n\"\nmsgstr \"// 数组的签名由类型 T 和长度组成，表示为 [T; length]。\\n\"\n\n#: src/primitives.md:58\nmsgid \"\"\n\"// Tuple is a collection of values of different types\\n\"\n\"    // and is constructed using parentheses ().\\n\"\nmsgstr \"\"\n\"// 元组是不同类型值的集合，\\n\"\n\"    // 使用圆括号 () 构造。\\n\"\n\n#: src/primitives.md:66\nmsgid \"\"\n\"[the `std` library](https://doc.rust-lang.org/std/), [`mut`]\"\n\"(variable_bindings/mut.md), [`inference`](types/inference.md), and \"\n\"[`shadowing`](variable_bindings/scope.md)\"\nmsgstr \"\"\n\"[`std` 库](https://doc.rust-lang.org/std/)、[`mut`](variable_bindings/\"\n\"mut.md)、[`inference`](types/inference.md) 和 [`shadowing`]\"\n\"(variable_bindings/scope.md)\"\n\n#: src/primitives/literals.md:3\nmsgid \"\"\n\"Integers `1`, floats `1.2`, characters `'a'`, strings `\\\"abc\\\"`, booleans \"\n\"`true` and the unit type `()` can be expressed using literals.\"\nmsgstr \"\"\n\"整数 `1`、浮点数 `1.2`、字符 `'a'`、字符串 `\\\"abc\\\"`、布尔值 `true` 和单元类\"\n\"型 `()` 可以用字面值表示。\"\n\n#: src/primitives/literals.md:6\nmsgid \"\"\n\"Integers can, alternatively, be expressed using hexadecimal, octal or binary \"\n\"notation using these prefixes respectively: `0x`, `0o` or `0b`.\"\nmsgstr \"\"\n\"整数也可以使用十六进制、八进制或二进制表示法，分别使用这些前缀：`0x`、`0o` \"\n\"或 `0b`。\"\n\n#: src/primitives/literals.md:9\nmsgid \"\"\n\"Underscores can be inserted in numeric literals to improve readability, e.g. \"\n\"`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.\"\nmsgstr \"\"\n\"可以在数字字面值中插入下划线以提高可读性，例如 `1_000` 与 `1000` 相同，\"\n\"`0.000_001` 与 `0.000001` 相同。\"\n\n#: src/primitives/literals.md:12\nmsgid \"\"\n\"Rust also supports scientific [E-notation](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation), e.g. `1e6`, `7.6e-4`. The associated type \"\n\"is `f64`.\"\nmsgstr \"\"\n\"Rust 还支持科学计数法 [E-notation](https://en.wikipedia.org/wiki/\"\n\"Scientific_notation#E_notation)，例如 `1e6`、`7.6e-4`。相关类型是 `f64`。\"\n\n#: src/primitives/literals.md:15\nmsgid \"\"\n\"We need to tell the compiler the type of the literals we use. For now, we'll \"\n\"use the `u32` suffix to indicate that the literal is an unsigned 32-bit \"\n\"integer, and the `i32` suffix to indicate that it's a signed 32-bit integer.\"\nmsgstr \"\"\n\"我们需要告诉编译器我们使用的字面值的类型。现在，我们将使用 `u32` 后缀来表示该\"\n\"字面值是一个无符号 32 位整数，使用 `i32` 后缀来表示它是一个有符号 32 位整数。\"\n\n#: src/primitives/literals.md:19\nmsgid \"\"\n\"The operators available and their precedence [in Rust](https://doc.rust-\"\n\"lang.org/reference/expressions.html#expression-precedence) are similar to \"\n\"other [C-like languages](https://en.wikipedia.org/wiki/\"\n\"Operator_precedence#Programming_languages).\"\nmsgstr \"\"\n\"[Rust 中](https://doc.rust-lang.org/reference/expressions.html#expression-\"\n\"precedence)可用的运算符及其优先级与其他 [类 C 语言](https://en.wikipedia.org/\"\n\"wiki/Operator_precedence#Programming_languages) 类似。\"\n\n#: src/primitives/literals.md:24\nmsgid \"// Integer addition\\n\"\nmsgstr \"// 整数加法\\n\"\n\n#: src/primitives/literals.md:25\nmsgid \"\\\"1 + 2 = {}\\\"\"\nmsgstr \"\\\"1 + 2 = {}\\\"\"\n\n#: src/primitives/literals.md:27\nmsgid \"// Integer subtraction\\n\"\nmsgstr \"// 整数减法\\n\"\n\n#: src/primitives/literals.md:28\nmsgid \"\\\"1 - 2 = {}\\\"\"\nmsgstr \"\\\"1 - 2 = {}\\\"\"\n\n#: src/primitives/literals.md:29\nmsgid \"\"\n\"// TODO ^ Try changing `1i32` to `1u32` to see why the type is important\\n\"\nmsgstr \"// TODO ^ 尝试将 `1i32` 改为 `1u32`，看看为什么类型很重要\\n\"\n\n#: src/primitives/literals.md:31\nmsgid \"// Scientific notation\\n\"\nmsgstr \"// 科学记数法\\n\"\n\n#: src/primitives/literals.md:32\nmsgid \"\\\"1e4 is {}, -2.5e-3 is {}\\\"\"\nmsgstr \"\\\"1e4 is {}, -2.5e-3 is {}\\\"\"\n\n#: src/primitives/literals.md:34\nmsgid \"// Short-circuiting boolean logic\\n\"\nmsgstr \"// 短路布尔逻辑\\n\"\n\n#: src/primitives/literals.md:35\nmsgid \"\\\"true AND false is {}\\\"\"\nmsgstr \"\\\"true AND false is {}\\\"\"\n\n#: src/primitives/literals.md:36\nmsgid \"\\\"true OR false is {}\\\"\"\nmsgstr \"\\\"true OR false is {}\\\"\"\n\n#: src/primitives/literals.md:37\nmsgid \"\\\"NOT true is {}\\\"\"\nmsgstr \"\\\"NOT true is {}\\\"\"\n\n#: src/primitives/literals.md:39\nmsgid \"// Bitwise operations\\n\"\nmsgstr \"// 位运算\\n\"\n\n#: src/primitives/literals.md:40\nmsgid \"\\\"0011 AND 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 AND 0101 is {:04b}\\\"\"\n\n#: src/primitives/literals.md:41\nmsgid \"\\\"0011 OR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 OR 0101 is {:04b}\\\"\"\n\n#: src/primitives/literals.md:42\nmsgid \"\\\"0011 XOR 0101 is {:04b}\\\"\"\nmsgstr \"\\\"0011 XOR 0101 is {:04b}\\\"\"\n\n#: src/primitives/literals.md:43\nmsgid \"\\\"1 << 5 is {}\\\"\"\nmsgstr \"\\\"1 << 5 is {}\\\"\"\n\n#: src/primitives/literals.md:44\nmsgid \"\\\"0x80 >> 2 is 0x{:x}\\\"\"\nmsgstr \"\\\"0x80 >> 2 is 0x{:x}\\\"\"\n\n#: src/primitives/literals.md:46\nmsgid \"// Use underscores to improve readability!\\n\"\nmsgstr \"// 使用下划线来提高可读性！\\n\"\n\n#: src/primitives/literals.md:47\nmsgid \"\\\"One million is written as {}\\\"\"\nmsgstr \"\\\"One million is written as {}\\\"\"\n\n#: src/primitives/tuples.md:3\nmsgid \"\"\n\"A tuple is a collection of values of different types. Tuples are constructed \"\n\"using parentheses `()`, and each tuple itself is a value with type signature \"\n\"`(T1, T2, ...)`, where `T1`, `T2` are the types of its members. Functions \"\n\"can use tuples to return multiple values, as tuples can hold any number of \"\n\"values.\"\nmsgstr \"\"\n\"元组是一个可以包含各种类型的值的集合。元组使用圆括号 `()` 来构造，而且每个元\"\n\"组本身是一个类型标记为 `(T1, T2, ...)` 的值，其中 `T1`、`T2` 是其成员的类型。\"\n\"函数可以使用元组来返回多个值，因为元组可以存储任意数量的值。\"\n\n#: src/primitives/tuples.md:9\nmsgid \"// Tuples can be used as function arguments and as return values.\\n\"\nmsgstr \"// 元组可以用作函数参数和返回值。\\n\"\n\n#: src/primitives/tuples.md:11\nmsgid \"// `let` can be used to bind the members of a tuple to variables.\\n\"\nmsgstr \"// `let` 可以用来把元组的成员绑定到变量。\\n\"\n\n#: src/primitives/tuples.md:16\nmsgid \"// The following struct is for the activity.\\n\"\nmsgstr \"// 以下结构体将用于后续练习。\\n\"\n\n#: src/primitives/tuples.md:22\nmsgid \"// A tuple with a bunch of different types.\\n\"\nmsgstr \"// 一个包含多种不同类型的元组。\\n\"\n\n#: src/primitives/tuples.md:26 src/generics.md:50 src/generics.md:55\n#: src/generics/gen_fn.md:47\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/primitives/tuples.md:28\nmsgid \"// Values can be extracted from the tuple using tuple indexing.\\n\"\nmsgstr \"// 可以使用元组索引来提取元组中的值。\\n\"\n\n#: src/primitives/tuples.md:29\nmsgid \"\\\"Long tuple first value: {}\\\"\"\nmsgstr \"\\\"长元组的第一个值：{}\\\"\"\n\n#: src/primitives/tuples.md:30\nmsgid \"\\\"Long tuple second value: {}\\\"\"\nmsgstr \"\\\"长元组的第二个值：{}\\\"\"\n\n#: src/primitives/tuples.md:32\nmsgid \"// Tuples can be tuple members.\\n\"\nmsgstr \"// 元组可以作为元组的成员。\\n\"\n\n#: src/primitives/tuples.md:35\nmsgid \"// Tuples are printable.\\n\"\nmsgstr \"// 元组是可打印的。\\n\"\n\n#: src/primitives/tuples.md:36\nmsgid \"\\\"tuple of tuples: {:?}\\\"\"\nmsgstr \"\\\"元组的元组：{:?}\\\"\"\n\n#: src/primitives/tuples.md:38\nmsgid \"\"\n\"// But long Tuples (more than 12 elements) cannot be printed.\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"Too long tuple: {:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ Uncomment the above 2 lines to see the compiler error\\n\"\nmsgstr \"\"\n\"// 但长元组（超过 12 个元素）无法打印。\\n\"\n\"    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\\n\"\n\"    //println!(\\\"过长的元组：{:?}\\\", too_long_tuple);\\n\"\n\"    // TODO ^ 取消上面两行的注释以查看编译器错误\\n\"\n\n#: src/primitives/tuples.md:44\nmsgid \"\\\"Pair is {:?}\\\"\"\nmsgstr \"\\\"对组是 {:?}\\\"\"\n\n#: src/primitives/tuples.md:46\nmsgid \"\\\"The reversed pair is {:?}\\\"\"\nmsgstr \"\\\"反转后的对组是 {:?}\\\"\"\n\n#: src/primitives/tuples.md:48\nmsgid \"\"\n\"// To create one element tuples, the comma is required to tell them apart\\n\"\n\"    // from a literal surrounded by parentheses.\\n\"\nmsgstr \"\"\n\"// 创建单元素元组时，需要使用逗号来区分它们\\n\"\n\"    // 与被括号包围的字面量。\\n\"\n\n#: src/primitives/tuples.md:50\nmsgid \"\\\"One element tuple: {:?}\\\"\"\nmsgstr \"\\\"单元素元组：{:?}\\\"\"\n\n#: src/primitives/tuples.md:51\nmsgid \"\\\"Just an integer: {:?}\\\"\"\nmsgstr \"\\\"仅是一个整数：{:?}\\\"\"\n\n#: src/primitives/tuples.md:53\nmsgid \"// Tuples can be destructured to create bindings.\\n\"\nmsgstr \"// 可以通过解构元组来创建绑定。\\n\"\n\n#: src/primitives/tuples.md:54 src/conversion/from_into.md:17\n#: src/fn/closures/input_parameters.md:52 src/std_misc/fs.md:51\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/primitives/tuples.md:57\nmsgid \"\\\"{:?}, {:?}, {:?}, {:?}\\\"\"\nmsgstr \"\\\"{:?}、{:?}、{:?}、{:?}\\\"\"\n\n#: src/primitives/tuples.md:66\nmsgid \"\"\n\"_Recap_: Add the `fmt::Display` trait to the `Matrix` struct in the above \"\n\"example, so that if you switch from printing the debug format `{:?}` to the \"\n\"display format `{}`, you see the following output:\"\nmsgstr \"\"\n\"**复习**：为上面示例中的 `Matrix` 结构体添加 `fmt::Display` trait，\\n\"\n\"这样当你从打印调试格式 `{:?}` 切换到显示格式 `{}` 时，\\n\"\n\"你会看到以下输出：\"\n\n#: src/primitives/tuples.md:75\nmsgid \"\"\n\"You may want to refer back to the example for [print display](../hello/print/\"\n\"print_display.md).\"\nmsgstr \"\"\n\"你可能需要回顾一下 [打印显示](../hello/print/print_display.md) 的示例。\"\n\n#: src/primitives/tuples.md:76\nmsgid \"\"\n\"Add a `transpose` function using the `reverse` function as a template, which \"\n\"accepts a matrix as an argument, and returns a matrix in which two elements \"\n\"have been swapped. For example:\"\nmsgstr \"\"\n\"参考 `reverse` 函数的模板，添加一个 `transpose` 函数。\\n\"\n\"该函数接受一个矩阵作为参数，并返回一个交换了两个元素的矩阵。例如：\"\n\n#: src/primitives/tuples.md:81\nmsgid \"\\\"Matrix:\\\\n{}\\\"\"\nmsgstr \"\\\"矩阵：\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:82\nmsgid \"\\\"Transpose:\\\\n{}\\\"\"\nmsgstr \"\\\"转置：\\\\n{}\\\"\"\n\n#: src/primitives/tuples.md:85\nmsgid \"Results in the output:\"\nmsgstr \"输出结果为：\"\n\n#: src/primitives/array.md:3\nmsgid \"\"\n\"An array is a collection of objects of the same type `T`, stored in \"\n\"contiguous memory. Arrays are created using brackets `[]`, and their length, \"\n\"which is known at compile time, is part of their type signature `[T; \"\n\"length]`.\"\nmsgstr \"\"\n\"数组是一种存储在连续内存中的相同类型 `T` 的对象集合。\\n\"\n\"数组使用方括号 `[]` 创建，其长度在编译时已知，\\n\"\n\"是其类型签名 `[T; length]` 的一部分。\"\n\n#: src/primitives/array.md:7\nmsgid \"\"\n\"Slices are similar to arrays, but their length is not known at compile time. \"\n\"Instead, a slice is a two-word object; the first word is a pointer to the \"\n\"data, the second word is the length of the slice. The word size is the same \"\n\"as usize, determined by the processor architecture, e.g. 64 bits on an \"\n\"x86-64. Slices can be used to borrow a section of an array and have the type \"\n\"signature `&[T]`.\"\nmsgstr \"\"\n\"切片类似于数组，但其长度在编译时未知。切片是一个双字对象：\\n\"\n\"第一个字是指向数据的指针，第二个字是切片的长度。字的大小与 usize 相同，\\n\"\n\"由处理器架构决定，例如在 x86-64 上是 64 位。切片可用于借用数组的一部分，\\n\"\n\"其类型签名为 `&[T]`。\"\n\n#: src/primitives/array.md:15\nmsgid \"// This function borrows a slice.\\n\"\nmsgstr \"// 此函数借用一个切片。\\n\"\n\n#: src/primitives/array.md:18\nmsgid \"\\\"First element of the slice: {}\\\"\"\nmsgstr \"\\\"切片的第一个元素：{}\\\"\"\n\n#: src/primitives/array.md:19\nmsgid \"\\\"The slice has {} elements\\\"\"\nmsgstr \"\\\"切片有 {} 个元素\\\"\"\n\n#: src/primitives/array.md:23\nmsgid \"// Fixed-size array (type signature is superfluous).\\n\"\nmsgstr \"// 固定大小的数组（类型签名是多余的）。\\n\"\n\n#: src/primitives/array.md:26\nmsgid \"// All elements can be initialized to the same value.\\n\"\nmsgstr \"// 所有元素可以初始化为相同的值。\\n\"\n\n#: src/primitives/array.md:29\nmsgid \"// Indexing starts at 0.\\n\"\nmsgstr \"// 索引从 0 开始。\\n\"\n\n#: src/primitives/array.md:30\nmsgid \"\\\"First element of the array: {}\\\"\"\nmsgstr \"\\\"数组的第一个元素：{}\\\"\"\n\n#: src/primitives/array.md:31\nmsgid \"\\\"Second element of the array: {}\\\"\"\nmsgstr \"\\\"数组的第二个元素：{}\\\"\"\n\n#: src/primitives/array.md:33\nmsgid \"// `len` returns the count of elements in the array.\\n\"\nmsgstr \"// `len` 返回数组中元素的数量。\\n\"\n\n#: src/primitives/array.md:34\nmsgid \"\\\"Number of elements in array: {}\\\"\"\nmsgstr \"\\\"数组中的元素数量：{}\\\"\"\n\n#: src/primitives/array.md:36\nmsgid \"// Arrays are stack allocated.\\n\"\nmsgstr \"// 数组是栈分配的。\\n\"\n\n#: src/primitives/array.md:37\nmsgid \"\\\"Array occupies {} bytes\\\"\"\nmsgstr \"\\\"数组占用 {} 字节\\\"\"\n\n#: src/primitives/array.md:39\nmsgid \"// Arrays can be automatically borrowed as slices.\\n\"\nmsgstr \"// 数组可以自动借用为切片。\\n\"\n\n#: src/primitives/array.md:40\nmsgid \"\\\"Borrow the whole array as a slice.\\\"\"\nmsgstr \"\\\"将整个数组借用为切片。\\\"\"\n\n#: src/primitives/array.md:43\nmsgid \"\"\n\"// Slices can point to a section of an array.\\n\"\n\"    // They are of the form [starting_index..ending_index].\\n\"\n\"    // `starting_index` is the first position in the slice.\\n\"\n\"    // `ending_index` is one more than the last position in the slice.\\n\"\nmsgstr \"\"\n\"// 切片可以指向数组的一部分。\\n\"\n\"    // 它们的形式是 [起始索引..结束索引]。\\n\"\n\"    // `起始索引` 是切片中的第一个位置。\\n\"\n\"    // `结束索引` 是切片中最后一个位置的后一个位置。\\n\"\n\n#: src/primitives/array.md:47\nmsgid \"\\\"Borrow a section of the array as a slice.\\\"\"\nmsgstr \"\\\"借用数组的一部分作为切片。\\\"\"\n\n#: src/primitives/array.md:50\nmsgid \"// Example of empty slice `&[]`:\\n\"\nmsgstr \"// 空切片 `&[]` 的示例：\\n\"\n\n#: src/primitives/array.md:53\nmsgid \"// Same but more verbose\\n\"\nmsgstr \"// 同样的操作，但更详细\\n\"\n\n#: src/primitives/array.md:55\nmsgid \"\"\n\"// Arrays can be safely accessed using `.get`, which returns an\\n\"\n\"    // `Option`. This can be matched as shown below, or used with\\n\"\n\"    // `.expect()` if you would like the program to exit with a nice\\n\"\n\"    // message instead of happily continue.\\n\"\nmsgstr \"\"\n\"// 可以使用 `.get` 安全地访问数组，它返回一个 `Option`。\\n\"\n\"    // 可以像下面这样对其进行匹配，或者使用 `.expect()`。\\n\"\n\"    // 如果你希望程序在访问越界时优雅地退出而不是继续执行，\\n\"\n\"    // 可以使用 `.expect()`。\\n\"\n\n#: src/primitives/array.md:59\nmsgid \"// Oops, one element too far!\\n\"\nmsgstr \"// 糟糕，访问超出了数组范围！\\n\"\n\n#: src/primitives/array.md:61\nmsgid \"\\\"{}: {}\\\"\"\nmsgstr \"\\\"{}: {}\\\"\"\n\n#: src/primitives/array.md:62\nmsgid \"\\\"Slow down! {} is too far!\\\"\"\nmsgstr \"\\\"慢着！{} 超出范围了！\\\"\"\n\n#: src/primitives/array.md:66\nmsgid \"\"\n\"// Out of bound indexing on array with constant value causes compile time \"\n\"error.\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // Out of bound indexing on slice causes runtime error.\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\nmsgstr \"\"\n\"// 使用常量值对数组的越界索引会导致编译时错误。\\n\"\n\"    //println!(\\\"{}\\\", xs[5]);\\n\"\n\"    // 对切片的越界索引会导致运行时错误。\\n\"\n\"    //println!(\\\"{}\\\", xs[..][5]);\\n\"\n\n#: src/custom_types.md:3\nmsgid \"Rust custom data types are formed mainly through the two keywords:\"\nmsgstr \"Rust 的自定义数据类型主要通过以下两个关键字来创建：\"\n\n#: src/custom_types.md:5\nmsgid \"`struct`: define a structure\"\nmsgstr \"`struct`：定义结构体\"\n\n#: src/custom_types.md:6\nmsgid \"`enum`: define an enumeration\"\nmsgstr \"`enum`：定义枚举\"\n\n#: src/custom_types.md:8\nmsgid \"Constants can also be created via the `const` and `static` keywords.\"\nmsgstr \"常量也可以通过 `const` 和 `static` 关键字来创建。\"\n\n#: src/custom_types/structs.md:3\nmsgid \"\"\n\"There are three types of structures (\\\"structs\\\") that can be created using \"\n\"the `struct` keyword:\"\nmsgstr \"使用 `struct` 关键字可以创建三种类型的结构体（\\\"structs\\\"）：\"\n\n#: src/custom_types/structs.md:6\nmsgid \"Tuple structs, which are, basically, named tuples.\"\nmsgstr \"元组结构体：本质上是具名元组。\"\n\n#: src/custom_types/structs.md:7\nmsgid \"\"\n\"The classic [C structs](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\nmsgstr \"\"\n\"经典的 [C 语言风格结构体](https://en.wikipedia.org/wiki/\"\n\"Struct_(C_programming_language))\"\n\n#: src/custom_types/structs.md:8\nmsgid \"Unit structs, which are field-less, are useful for generics.\"\nmsgstr \"单元结构体：没有字段，在泛型中很有用。\"\n\n#: src/custom_types/structs.md:11 src/custom_types/enum/enum_use.md:6\n#: src/custom_types/enum/c_like.md:6\nmsgid \"// An attribute to hide warnings for unused code.\\n\"\nmsgstr \"// 这个属性用于隐藏未使用代码的警告。\\n\"\n\n#: src/custom_types/structs.md:19\nmsgid \"// A unit struct\\n\"\nmsgstr \"// 单元结构体\\n\"\n\n#: src/custom_types/structs.md:22\nmsgid \"// A tuple struct\\n\"\nmsgstr \"// 元组结构体\\n\"\n\n#: src/custom_types/structs.md:25\nmsgid \"// A struct with two fields\\n\"\nmsgstr \"// 带有两个字段的结构体\\n\"\n\n#: src/custom_types/structs.md:31\nmsgid \"// Structs can be reused as fields of another struct\\n\"\nmsgstr \"// 结构体可以作为另一个结构体的字段\\n\"\n\n#: src/custom_types/structs.md:34\nmsgid \"\"\n\"// A rectangle can be specified by where the top left and bottom right\\n\"\n\"    // corners are in space.\\n\"\nmsgstr \"\"\n\"// 可以通过指定左上角和右下角的位置\\n\"\n\"    // 来定义一个矩形。\\n\"\n\n#: src/custom_types/structs.md:41\nmsgid \"// Create struct with field init shorthand\\n\"\nmsgstr \"// 使用字段初始化简写语法创建结构体\\n\"\n\n#: src/custom_types/structs.md:46\nmsgid \"// Print debug struct\\n\"\nmsgstr \"// 打印结构体的调试信息\\n\"\n\n#: src/custom_types/structs.md:49\nmsgid \"// Instantiate a `Point`\\n\"\nmsgstr \"// 实例化一个 `Point`\\n\"\n\n#: src/custom_types/structs.md:53\nmsgid \"// Access the fields of the point\\n\"\nmsgstr \"// 访问点的字段\\n\"\n\n#: src/custom_types/structs.md:54\nmsgid \"\\\"point coordinates: ({}, {})\\\"\"\nmsgstr \"\\\"点的坐标：({}, {})\\\"\"\n\n#: src/custom_types/structs.md:56\nmsgid \"\"\n\"// Make a new point by using struct update syntax to use the fields of our\\n\"\n\"    // other one\\n\"\nmsgstr \"\"\n\"// 使用结构体更新语法创建新的点，\\n\"\n\"    // 复用之前创建的点的字段\\n\"\n\n#: src/custom_types/structs.md:60\nmsgid \"\"\n\"// `bottom_right.y` will be the same as `another_point.y` because we used \"\n\"that field\\n\"\n\"    // from `another_point`\\n\"\nmsgstr \"\"\n\"// `bottom_right.y` 与 `another_point.y` 相同，\\n\"\n\"    // 因为我们使用了 `another_point` 的该字段\\n\"\n\n#: src/custom_types/structs.md:62\nmsgid \"\\\"second point: ({}, {})\\\"\"\nmsgstr \"\\\"第二个点：({}, {})\\\"\"\n\n#: src/custom_types/structs.md:64\nmsgid \"// Destructure the point using a `let` binding\\n\"\nmsgstr \"// 使用 `let` 绑定解构点\\n\"\n\n#: src/custom_types/structs.md:68\nmsgid \"// struct instantiation is an expression too\\n\"\nmsgstr \"// 结构体实例化也是一个表达式\\n\"\n\n#: src/custom_types/structs.md:73\nmsgid \"// Instantiate a unit struct\\n\"\nmsgstr \"// 实例化一个单元结构体\\n\"\n\n#: src/custom_types/structs.md:76\nmsgid \"// Instantiate a tuple struct\\n\"\nmsgstr \"// 实例化一个元组结构体\\n\"\n\n#: src/custom_types/structs.md:79\nmsgid \"// Access the fields of a tuple struct\\n\"\nmsgstr \"// 访问元组结构体的字段\\n\"\n\n#: src/custom_types/structs.md:80 src/custom_types/structs.md:85\nmsgid \"\\\"pair contains {:?} and {:?}\\\"\"\nmsgstr \"\\\"pair 包含 {:?} 和 {:?}\\\"\"\n\n#: src/custom_types/structs.md:82\nmsgid \"// Destructure a tuple struct\\n\"\nmsgstr \"// 解构一个元组结构体\\n\"\n\n#: src/custom_types/structs.md:91\nmsgid \"\"\n\"Add a function `rect_area` which calculates the area of a `Rectangle` (try \"\n\"using nested destructuring).\"\nmsgstr \"\"\n\"添加一个 `rect_area` 函数来计算 `Rectangle` 的面积（尝试使用嵌套解构）。\"\n\n#: src/custom_types/structs.md:93\nmsgid \"\"\n\"Add a function `square` which takes a `Point` and a `f32` as arguments, and \"\n\"returns a `Rectangle` with its top left corner on the point, and a width and \"\n\"height corresponding to the `f32`.\"\nmsgstr \"\"\n\"添加一个 `square` 函数，它接受一个 `Point` 和一个 `f32` 作为参数，返回一个 \"\n\"`Rectangle`，其左上角在该点上，宽度和高度都等于 `f32` 参数。\"\n\n#: src/custom_types/structs.md:97\nmsgid \"See also\"\nmsgstr \"另请参阅\"\n\n#: src/custom_types/structs.md:99\nmsgid \"\"\n\"[`attributes`](../attribute.md), [raw identifiers](../compatibility/\"\n\"raw_identifiers.md) and [destructuring](../flow_control/match/\"\n\"destructuring.md)\"\nmsgstr \"\"\n\"[`属性`](../attribute.md)、[原始标识符](../compatibility/raw_identifiers.md)\"\n\"和[解构](../flow_control/match/destructuring.md)\"\n\n#: src/custom_types/enum.md:3\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which may be one of a few \"\n\"different variants. Any variant which is valid as a `struct` is also valid \"\n\"in an `enum`.\"\nmsgstr \"\"\n\"`enum` 关键字允许创建一个可能是几种不同变体之一的类型。任何作为 `struct` 有效\"\n\"的变体在 `enum` 中也是有效的。\"\n\n#: src/custom_types/enum.md:8\nmsgid \"\"\n\"// Create an `enum` to classify a web event. Note how both\\n\"\n\"// names and type information together specify the variant:\\n\"\n\"// `PageLoad != PageUnload` and `KeyPress(char) != Paste(String)`.\\n\"\n\"// Each is different and independent.\\n\"\nmsgstr \"\"\n\"// 创建一个 `enum` 来分类网页事件。注意名称和类型信息如何共同指定变体：\\n\"\n\"// `PageLoad != PageUnload` 且 `KeyPress(char) != Paste(String)`。\\n\"\n\"// 每个变体都是不同且独立的。\\n\"\n\n#: src/custom_types/enum.md:13\nmsgid \"// An `enum` variant may either be `unit-like`,\\n\"\nmsgstr \"// `enum` 变体可以类似单元结构体（`unit-like`），\\n\"\n\n#: src/custom_types/enum.md:16\nmsgid \"// like tuple structs,\\n\"\nmsgstr \"// 类似元组结构体，\\n\"\n\n#: src/custom_types/enum.md:19\nmsgid \"// or c-like structures.\\n\"\nmsgstr \"// 或类似 C 语言的结构体。\\n\"\n\n#: src/custom_types/enum.md:22\nmsgid \"\"\n\"// A function which takes a `WebEvent` enum as an argument and\\n\"\n\"// returns nothing.\\n\"\nmsgstr \"// 一个接受 `WebEvent` 枚举作为参数且不返回任何值的函数。\\n\"\n\n#: src/custom_types/enum.md:27\nmsgid \"\\\"page loaded\\\"\"\nmsgstr \"\\\"页面已加载\\\"\"\n\n#: src/custom_types/enum.md:28\nmsgid \"\\\"page unloaded\\\"\"\nmsgstr \"\\\"页面已卸载\\\"\"\n\n#: src/custom_types/enum.md:29\nmsgid \"// Destructure `c` from inside the `enum` variant.\\n\"\nmsgstr \"// 从 `enum` 变体内部解构 `c`。\\n\"\n\n#: src/custom_types/enum.md:30\nmsgid \"\\\"pressed '{}'.\\\"\"\nmsgstr \"\\\"按下了'{}'键。\\\"\"\n\n#: src/custom_types/enum.md:31\nmsgid \"\\\"pasted \\\\\\\"{}\\\\\\\".\\\"\"\nmsgstr \"\\\"粘贴了\\\\\\\"{}\\\\\\\"。\\\"\"\n\n#: src/custom_types/enum.md:32\nmsgid \"// Destructure `Click` into `x` and `y`.\\n\"\nmsgstr \"// 将 `Click` 解构为 `x` 和 `y`。\\n\"\n\n#: src/custom_types/enum.md:34\nmsgid \"\\\"clicked at x={}, y={}.\\\"\"\nmsgstr \"\\\"点击坐标：x={}, y={}。\\\"\"\n\n#: src/custom_types/enum.md:40\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/custom_types/enum.md:41\nmsgid \"// `to_owned()` creates an owned `String` from a string slice.\\n\"\nmsgstr \"// `to_owned()` 从字符串切片创建一个拥有所有权的 `String`。\\n\"\n\n#: src/custom_types/enum.md:42\nmsgid \"\\\"my text\\\"\"\nmsgstr \"\\\"我的文本\\\"\"\n\n#: src/custom_types/enum.md:56\nmsgid \"Type aliases\"\nmsgstr \"类型别名\"\n\n#: src/custom_types/enum.md:58\nmsgid \"\"\n\"If you use a type alias, you can refer to each enum variant via its alias. \"\n\"This might be useful if the enum's name is too long or too generic, and you \"\n\"want to rename it.\"\nmsgstr \"\"\n\"使用类型别名可以通过别名引用每个枚举变体。当枚举名称过长或过于泛化，而你想重\"\n\"命名它时，这会很有用。\"\n\n#: src/custom_types/enum.md:67\nmsgid \"// Creates a type alias\\n\"\nmsgstr \"// 创建类型别名\\n\"\n\n#: src/custom_types/enum.md:72\nmsgid \"\"\n\"// We can refer to each variant via its alias, not its long and \"\n\"inconvenient\\n\"\n\"    // name.\\n\"\nmsgstr \"// 我们可以通过别名引用每个变体，而不是使用又长又不便的名称。\\n\"\n\n#: src/custom_types/enum.md:78\nmsgid \"\"\n\"The most common place you'll see this is in `impl` blocks using the `Self` \"\n\"alias.\"\nmsgstr \"你最常见到这种用法的地方是在使用 `Self` 别名的 `impl` 块中。\"\n\n#: src/custom_types/enum.md:96\nmsgid \"\"\n\"To learn more about enums and type aliases, you can read the [stabilization \"\n\"report](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847) from when this feature was stabilized into Rust.\"\nmsgstr \"\"\n\"要了解更多关于枚举和类型别名的信息，你可以阅读这个特性被稳定到 Rust 时的[稳定\"\n\"化报告](https://github.com/rust-lang/rust/pull/61682/\"\n\"#issuecomment-502472847)。\"\n\n#: src/custom_types/enum.md:102\nmsgid \"\"\n\"[`match`](../flow_control/match.md), [`fn`](../fn.md), and [`String`](../std/\"\n\"str.md), [\\\"Type alias enum variants\\\" RFC](https://rust-lang.github.io/rfcs/\"\n\"2338-type-alias-enum-variants.html)\"\nmsgstr \"\"\n\"[`match`](../flow_control/match.md)、[`fn`](../fn.md)、[`String`](../std/\"\n\"str.md) 和 [\\\"类型别名枚举变体\\\" RFC](https://rust-lang.github.io/rfcs/2338-\"\n\"type-alias-enum-variants.html)\"\n\n#: src/custom_types/enum/enum_use.md:3\nmsgid \"The `use` declaration can be used so manual scoping isn't needed:\"\nmsgstr \"`use` 声明可以用来避免手动作用域限定：\"\n\n#: src/custom_types/enum/enum_use.md:20\nmsgid \"\"\n\"// Explicitly `use` each name so they are available without\\n\"\n\"    // manual scoping.\\n\"\nmsgstr \"\"\n\"// 显式 `use` 每个名称，使它们可以不需要\\n\"\n\"    // 手动作用域限定就能使用。\\n\"\n\n#: src/custom_types/enum/enum_use.md:23\nmsgid \"// Automatically `use` each name inside `Role`.\\n\"\nmsgstr \"// 自动 `use` `Role` 内的每个名称。\\n\"\n\n#: src/custom_types/enum/enum_use.md:26\nmsgid \"// Equivalent to `Stage::Beginner`.\\n\"\nmsgstr \"// 等同于 `Stage::Beginner`。\\n\"\n\n#: src/custom_types/enum/enum_use.md:28\nmsgid \"// Equivalent to `Role::Student`.\\n\"\nmsgstr \"// 等同于 `Role::Student`。\\n\"\n\n#: src/custom_types/enum/enum_use.md:32\nmsgid \"// Note the lack of scoping because of the explicit `use` above.\\n\"\nmsgstr \"// 注意由于上面的显式 `use`，这里不需要作用域限定。\\n\"\n\n#: src/custom_types/enum/enum_use.md:33\nmsgid \"\\\"Beginners are starting their learning journey!\\\"\"\nmsgstr \"\\\"初学者正在开始他们的学习之旅！\\\"\"\n\n#: src/custom_types/enum/enum_use.md:34\nmsgid \"\\\"Advanced learners are mastering their subjects...\\\"\"\nmsgstr \"\\\"高级学习者正在掌握他们的科目...\\\"\"\n\n#: src/custom_types/enum/enum_use.md:38\nmsgid \"// Note again the lack of scoping.\\n\"\nmsgstr \"// 再次注意这里不需要作用域限定。\\n\"\n\n#: src/custom_types/enum/enum_use.md:39\nmsgid \"\\\"Students are acquiring knowledge!\\\"\"\nmsgstr \"\\\"学生正在获取知识！\\\"\"\n\n#: src/custom_types/enum/enum_use.md:40\nmsgid \"\\\"Teachers are spreading knowledge!\\\"\"\nmsgstr \"\\\"教师正在传播知识！\\\"\"\n\n#: src/custom_types/enum/enum_use.md:47\nmsgid \"[`match`](../../flow_control/match.md) and [`use`](../../mod/use.md)\"\nmsgstr \"[`match`](../../flow_control/match.md) 和 [`use`](../../mod/use.md)\"\n\n#: src/custom_types/enum/c_like.md:3\nmsgid \"`enum` can also be used as C-like enums.\"\nmsgstr \"`enum` 也可以像 C 语言那样使用。\"\n\n#: src/custom_types/enum/c_like.md:8\nmsgid \"// enum with implicit discriminator (starts at 0)\\n\"\nmsgstr \"// 带隐式判别值的枚举（从 0 开始）\\n\"\n\n#: src/custom_types/enum/c_like.md:15\nmsgid \"// enum with explicit discriminator\\n\"\nmsgstr \"// 带显式判别值的枚举\\n\"\n\n#: src/custom_types/enum/c_like.md:24\nmsgid \"// `enums` can be cast as integers.\\n\"\nmsgstr \"// `enum` 可以转换为整数。\\n\"\n\n#: src/custom_types/enum/c_like.md:25\nmsgid \"\\\"zero is {}\\\"\"\nmsgstr \"\\\"zero 的值是 {}\\\"\"\n\n#: src/custom_types/enum/c_like.md:26\nmsgid \"\\\"one is {}\\\"\"\nmsgstr \"\\\"one 的值是 {}\\\"\"\n\n#: src/custom_types/enum/c_like.md:28\nmsgid \"\\\"roses are #{:06x}\\\"\"\nmsgstr \"\\\"玫瑰的颜色是 #{:06x}\\\"\"\n\n#: src/custom_types/enum/c_like.md:29\nmsgid \"\\\"violets are #{:06x}\\\"\"\nmsgstr \"\\\"紫罗兰的颜色是 #{:06x}\\\"\"\n\n#: src/custom_types/enum/c_like.md:35\nmsgid \"[casting](../../types/cast.md)\"\nmsgstr \"[类型转换](../../types/cast.md)\"\n\n#: src/custom_types/enum/testcase_linked_list.md:3\nmsgid \"A common way to implement a linked-list is via `enums`:\"\nmsgstr \"使用 `enum` 是实现链表的常见方法：\"\n\n#: src/custom_types/enum/testcase_linked_list.md:9\nmsgid \"\"\n\"// Cons: Tuple struct that wraps an element and a pointer to the next node\\n\"\nmsgstr \"// Cons：包含一个元素和指向下一节点指针的元组结构体\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:11\nmsgid \"// Nil: A node that signifies the end of the linked list\\n\"\nmsgstr \"// Nil：表示链表末尾的节点\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:14\nmsgid \"// Methods can be attached to an enum\\n\"\nmsgstr \"// 可以为枚举实现方法\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:17\nmsgid \"// Create an empty list\\n\"\nmsgstr \"// 创建空链表\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:19\nmsgid \"// `Nil` has type `List`\\n\"\nmsgstr \"// `Nil` 的类型是 `List`\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:23\nmsgid \"\"\n\"// Consume a list, and return the same list with a new element at its front\\n\"\nmsgstr \"// 消耗一个链表，并返回在其头部添加新元素后的链表\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:25\nmsgid \"// `Cons` also has type List\\n\"\nmsgstr \"// `Cons` 的类型也是 List\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:29\nmsgid \"// Return the length of the list\\n\"\nmsgstr \"// 返回链表长度\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:31\nmsgid \"\"\n\"// `self` has to be matched, because the behavior of this method\\n\"\n\"        // depends on the variant of `self`\\n\"\n\"        // `self` has type `&List`, and `*self` has type `List`, matching on \"\n\"a\\n\"\n\"        // concrete type `T` is preferred over a match on a reference `&T`\\n\"\n\"        // after Rust 2018 you can use self here and tail (with no ref) \"\n\"below as well,\\n\"\n\"        // rust will infer &s and ref tail.\\n\"\n\"        // See https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\nmsgstr \"\"\n\"// 需要对 `self` 进行匹配，因为方法的行为取决于 `self` 的变体\\n\"\n\"        // `self` 的类型是 `&List`，而 `*self` 的类型是 `List`\\n\"\n\"        // 匹配具体类型 `T` 优于匹配引用 `&T`\\n\"\n\"        // 在 Rust 2018 版本后，这里可以直接使用 self，下面可以使用 tail（无\"\n\"需 ref）\\n\"\n\"        // Rust 会自动推断为 &s 和 ref tail\\n\"\n\"        // 参见 https://doc.rust-lang.org/edition-guide/rust-2018/ownership-\"\n\"and-lifetimes/default-match-bindings.html\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:39\nmsgid \"\"\n\"// Can't take ownership of the tail, because `self` is borrowed;\\n\"\n\"            // instead take a reference to the tail\\n\"\n\"            // And it'a a non-tail recursive call which may cause stack \"\n\"overflow for long lists.\\n\"\nmsgstr \"\"\n\"// 无法获取 tail 的所有权，因为 `self` 是借用的；\\n\"\n\"            // 所以取 tail 的引用\\n\"\n\"            // 这是一个非尾递归调用，对于长列表可能导致栈溢出。\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:43\nmsgid \"// Base Case: An empty list has zero length\\n\"\nmsgstr \"// 基本情况：空链表长度为零\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:48\nmsgid \"// Return representation of the list as a (heap allocated) string\\n\"\nmsgstr \"// 返回链表的字符串表示（堆分配）\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:52\nmsgid \"\"\n\"// `format!` is similar to `print!`, but returns a heap\\n\"\n\"                // allocated string instead of printing to the console\\n\"\nmsgstr \"\"\n\"// `format!` 类似于 `print!`，但返回堆分配的字符串，\\n\"\n\"                // 而不是打印到控制台\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:54 src/generics/impl.md:44\nmsgid \"\\\"{}, {}\\\"\"\nmsgstr \"\\\"{}, {}\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:57\nmsgid \"\\\"Nil\\\"\"\nmsgstr \"\\\"Nil\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:64\nmsgid \"// Create an empty linked list\\n\"\nmsgstr \"// 创建空链表\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:67\nmsgid \"// Prepend some elements\\n\"\nmsgstr \"// 在头部添加一些元素\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:72\nmsgid \"// Show the final state of the list\\n\"\nmsgstr \"// 显示链表的最终状态\\n\"\n\n#: src/custom_types/enum/testcase_linked_list.md:73\nmsgid \"\\\"linked list has length: {}\\\"\"\nmsgstr \"\\\"链表长度为：{}\\\"\"\n\n#: src/custom_types/enum/testcase_linked_list.md:80\nmsgid \"[`Box`](../../std/box.md) and [methods](../../fn/methods.md)\"\nmsgstr \"[`Box`](../../std/box.md) 和[方法](../../fn/methods.md)\"\n\n#: src/custom_types/constants.md:3\nmsgid \"\"\n\"Rust has two different types of constants which can be declared in any scope \"\n\"including global. Both require explicit type annotation:\"\nmsgstr \"\"\n\"Rust 有两种常量类型，可以在任何作用域（包括全局作用域）中声明。两者都需要显式\"\n\"类型标注：\"\n\n#: src/custom_types/constants.md:6\nmsgid \"`const`: An unchangeable value (the common case).\"\nmsgstr \"`const`：不可变值（常见用法）。\"\n\n#: src/custom_types/constants.md:7\nmsgid \"\"\n\"`static`: A possibly mutable variable with [`'static`](../scope/lifetime/\"\n\"static_lifetime.md) lifetime. The static lifetime is inferred and does not \"\n\"have to be specified. Accessing or modifying a mutable static variable is \"\n\"[`unsafe`](../unsafe.md).\"\nmsgstr \"\"\n\"`static`：具有 [`'static`](../scope/lifetime/static_lifetime.md) 生命周期的可\"\n\"能可变变量。静态生命周期会被自动推断，无需明确指定。访问或修改可变静态变量是 \"\n\"[`unsafe`](../unsafe.md) 的。\"\n\n#: src/custom_types/constants.md:12\nmsgid \"// Globals are declared outside all other scopes.\\n\"\nmsgstr \"// 全局变量在所有其他作用域之外声明。\\n\"\n\n#: src/custom_types/constants.md:13\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/custom_types/constants.md:17\nmsgid \"// Access constant in some function\\n\"\nmsgstr \"// 在函数中访问常量\\n\"\n\n#: src/custom_types/constants.md:24\nmsgid \"// Access constant in the main thread\\n\"\nmsgstr \"// 在主线程中访问常量\\n\"\n\n#: src/custom_types/constants.md:25\nmsgid \"\\\"This is {}\\\"\"\nmsgstr \"\\\"这是 {}\\\"\"\n\n#: src/custom_types/constants.md:26\nmsgid \"\\\"The threshold is {}\\\"\"\nmsgstr \"\\\"阈值为 {}\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"{} is {}\\\"\"\nmsgstr \"\\\"{} 是 {}\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"big\\\"\"\nmsgstr \"\\\"大的\\\"\"\n\n#: src/custom_types/constants.md:27\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"小的\\\"\"\n\n#: src/custom_types/constants.md:29\nmsgid \"// Error! Cannot modify a `const`.\\n\"\nmsgstr \"// 错误！不能修改 `const`。\\n\"\n\n#: src/custom_types/constants.md:31 src/variable_bindings/scope.md:22\n#: src/variable_bindings/declare.md:27 src/variable_bindings/freeze.md:16\n#: src/types/cast.md:19 src/types/cast.md:28 src/flow_control/for.md:95\n#: src/scope/borrow.md:41 src/scope/borrow/mut.md:52 src/std/vec.md:32\n#: src/std/vec.md:45 src/std/hash/hashset.md:48\nmsgid \"// FIXME ^ Comment out this line\\n\"\nmsgstr \"// 修复：^ 注释掉此行\\n\"\n\n#: src/custom_types/constants.md:37\nmsgid \"\"\n\"[The `const`/`static` RFC](https://github.com/rust-lang/rfcs/blob/master/\"\n\"text/0246-const-vs-static.md), [`'static` lifetime](../scope/lifetime/\"\n\"static_lifetime.md)\"\nmsgstr \"\"\n\"[`const`/`static` RFC](https://github.com/rust-lang/rfcs/blob/master/text/\"\n\"0246-const-vs-static.md)，[`'static` 生命周期](../scope/lifetime/\"\n\"static_lifetime.md)\"\n\n#: src/variable_bindings.md:3\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings can be type \"\n\"annotated when declared. However, in most cases, the compiler will be able \"\n\"to infer the type of the variable from the context, heavily reducing the \"\n\"annotation burden.\"\nmsgstr \"\"\n\"Rust 通过静态类型提供类型安全。变量绑定在声明时可以添加类型注解。然而，在大多\"\n\"数情况下，编译器能够从上下文推断出变量类型，大大减少了类型注解的负担。\"\n\n#: src/variable_bindings.md:8\nmsgid \"\"\n\"Values (like literals) can be bound to variables, using the `let` binding.\"\nmsgstr \"可以使用 `let` 关键字将值（如字面量）绑定到变量。\"\n\n#: src/variable_bindings.md:16\nmsgid \"// copy `an_integer` into `copied_integer`\\n\"\nmsgstr \"// 将 `an_integer` 复制到 `copied_integer`\\n\"\n\n#: src/variable_bindings.md:19\nmsgid \"\\\"An integer: {:?}\\\"\"\nmsgstr \"\\\"整数：{:?}\\\"\"\n\n#: src/variable_bindings.md:20\nmsgid \"\\\"A boolean: {:?}\\\"\"\nmsgstr \"\\\"布尔值：{:?}\\\"\"\n\n#: src/variable_bindings.md:21\nmsgid \"\\\"Meet the unit value: {:?}\\\"\"\nmsgstr \"\\\"单元值：{:?}\\\"\"\n\n#: src/variable_bindings.md:23\nmsgid \"\"\n\"// The compiler warns about unused variable bindings; these warnings can\\n\"\n\"    // be silenced by prefixing the variable name with an underscore\\n\"\nmsgstr \"\"\n\"// 编译器会对未使用的变量绑定发出警告\\n\"\n\"    // 可以通过在变量名前加下划线来消除这些警告\\n\"\n\n#: src/variable_bindings.md:28\nmsgid \"\"\n\"// FIXME ^ Prefix with an underscore to suppress the warning\\n\"\n\"    // Please note that warnings may not be shown in a browser\\n\"\nmsgstr \"\"\n\"// 修复：^ 在变量名前加下划线以消除警告\\n\"\n\"    // 注意：在浏览器中可能不会显示警告\\n\"\n\n#: src/variable_bindings/mut.md:3\nmsgid \"\"\n\"Variable bindings are immutable by default, but this can be overridden using \"\n\"the `mut` modifier.\"\nmsgstr \"变量绑定默认是不可变的，但可以使用 `mut` 修饰符来改变这一行为。\"\n\n#: src/variable_bindings/mut.md:11\nmsgid \"\\\"Before mutation: {}\\\"\"\nmsgstr \"\\\"修改前：{}\\\"\"\n\n#: src/variable_bindings/mut.md:13\nmsgid \"// Ok\\n\"\nmsgstr \"// 正确\\n\"\n\n#: src/variable_bindings/mut.md:16\nmsgid \"\\\"After mutation: {}\\\"\"\nmsgstr \"\\\"修改后：{}\\\"\"\n\n#: src/variable_bindings/mut.md:18\nmsgid \"// Error! Cannot assign a new value to an immutable variable\\n\"\nmsgstr \"// 错误！不能给不可变变量赋新值\\n\"\n\n#: src/variable_bindings/mut.md:23\nmsgid \"The compiler will throw a detailed diagnostic about mutability errors.\"\nmsgstr \"编译器会对可变性错误给出详细的诊断信息。\"\n\n#: src/variable_bindings/scope.md:3\nmsgid \"\"\n\"Variable bindings have a scope, and are constrained to live in a _block_. A \"\n\"block is a collection of statements enclosed by braces `{}`.\"\nmsgstr \"\"\n\"变量绑定有作用域，它们被限制在一个**代码块**中生存。代码块是由花括号 `{}` 包\"\n\"围的一系列语句。\"\n\n#: src/variable_bindings/scope.md:8\nmsgid \"// This binding lives in the main function\\n\"\nmsgstr \"// 这个绑定存在于 main 函数中\\n\"\n\n#: src/variable_bindings/scope.md:11\nmsgid \"// This is a block, and has a smaller scope than the main function\\n\"\nmsgstr \"// 这是一个代码块，它的作用域比 main 函数小\\n\"\n\n#: src/variable_bindings/scope.md:13\nmsgid \"// This binding only exists in this block\\n\"\nmsgstr \"// 这个绑定只存在于此代码块中\\n\"\n\n#: src/variable_bindings/scope.md:16\nmsgid \"\\\"inner short: {}\\\"\"\nmsgstr \"\\\"内部 short：{}\\\"\"\n\n#: src/variable_bindings/scope.md:18\nmsgid \"// End of the block\\n\"\nmsgstr \"// 代码块结束\\n\"\n\n#: src/variable_bindings/scope.md:20\nmsgid \"// Error! `short_lived_binding` doesn't exist in this scope\\n\"\nmsgstr \"// 错误！`short_lived_binding` 在此作用域中不存在\\n\"\n\n#: src/variable_bindings/scope.md:21\nmsgid \"\\\"outer short: {}\\\"\"\nmsgstr \"\\\"外部 short：{}\\\"\"\n\n#: src/variable_bindings/scope.md:24\nmsgid \"\\\"outer long: {}\\\"\"\nmsgstr \"\\\"外部 long：{}\\\"\"\n\n#: src/variable_bindings/scope.md:28\nmsgid \"\"\n\"Also, [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) \"\n\"is allowed.\"\nmsgstr \"\"\n\"此外，Rust 允许[变量遮蔽](https://en.wikipedia.org/wiki/Variable_shadowing)。\"\n\n#: src/variable_bindings/scope.md:35\nmsgid \"\\\"before being shadowed: {}\\\"\"\nmsgstr \"\\\"被遮蔽前：{}\\\"\"\n\n#: src/variable_bindings/scope.md:37\nmsgid \"// This binding *shadows* the outer one\\n\"\nmsgstr \"// 这个绑定*遮蔽*了外部的绑定\\n\"\n\n#: src/variable_bindings/scope.md:38\nmsgid \"\\\"abc\\\"\"\nmsgstr \"\\\"abc\\\"\"\n\n#: src/variable_bindings/scope.md:40\nmsgid \"\\\"shadowed in inner block: {}\\\"\"\nmsgstr \"\\\"内部代码块中被遮蔽：{}\\\"\"\n\n#: src/variable_bindings/scope.md:42\nmsgid \"\\\"outside inner block: {}\\\"\"\nmsgstr \"\\\"内部代码块外：{}\\\"\"\n\n#: src/variable_bindings/scope.md:44\nmsgid \"// This binding *shadows* the previous binding\\n\"\nmsgstr \"// 这个绑定*遮蔽*了之前的绑定\\n\"\n\n#: src/variable_bindings/scope.md:46\nmsgid \"\\\"shadowed in outer block: {}\\\"\"\nmsgstr \"\\\"外部代码块中被遮蔽：{}\\\"\"\n\n#: src/variable_bindings/declare.md:3\nmsgid \"\"\n\"It is possible to declare variable bindings first and initialize them later, \"\n\"but all variable bindings must be initialized before they are used: the \"\n\"compiler forbids use of uninitialized variable bindings, as it would lead to \"\n\"undefined behavior.\"\nmsgstr \"\"\n\"可以先声明变量绑定然后再初始化，但所有变量绑定在使用前必须先初始化：编译器禁\"\n\"止使用未初始化的变量绑定，因为这会导致未定义行为。\"\n\n#: src/variable_bindings/declare.md:5\nmsgid \"\"\n\"It is not common to declare a variable binding and initialize it later in \"\n\"the function. It is more difficult for a reader to find the initialization \"\n\"when initialization is separated from declaration. It is common to declare \"\n\"and initialize a variable binding near where the variable will be used.\"\nmsgstr \"\"\n\"在函数中先声明变量绑定而稍后再初始化的做法并不常见。当初始化与声明分离时，读\"\n\"者更难找到初始化的位置。更常见的做法是在变量即将使用的地方附近声明并初始化变\"\n\"量绑定。\"\n\n#: src/variable_bindings/declare.md:11\nmsgid \"// Declare a variable binding\\n\"\nmsgstr \"// 声明一个变量绑定\\n\"\n\n#: src/variable_bindings/declare.md:17\nmsgid \"// Initialize the binding\\n\"\nmsgstr \"// 初始化绑定\\n\"\n\n#: src/variable_bindings/declare.md:21\nmsgid \"\\\"a binding: {}\\\"\"\nmsgstr \"\\\"绑定：{}\\\"\"\n\n#: src/variable_bindings/declare.md:25\nmsgid \"// Error! Use of uninitialized binding\\n\"\nmsgstr \"// 错误！使用未初始化的绑定\\n\"\n\n#: src/variable_bindings/declare.md:26 src/variable_bindings/declare.md:31\nmsgid \"\\\"another binding: {}\\\"\"\nmsgstr \"\\\"另一个绑定：{}\\\"\"\n\n#: src/variable_bindings/freeze.md:3\nmsgid \"\"\n\"When data is bound by the same name immutably, it also _freezes_. _Frozen_ \"\n\"data can't be modified until the immutable binding goes out of scope:\"\nmsgstr \"\"\n\"当数据以相同名称被不可变地绑定时，它也会**冻结**。被冻结的数据在不可变绑定离\"\n\"开作用域之前不能被修改：\"\n\n#: src/variable_bindings/freeze.md:11\nmsgid \"// Shadowing by immutable `_mutable_integer`\\n\"\nmsgstr \"// 通过不可变的 `_mutable_integer` 进行遮蔽\\n\"\n\n#: src/variable_bindings/freeze.md:14\nmsgid \"// Error! `_mutable_integer` is frozen in this scope\\n\"\nmsgstr \"// 错误！`_mutable_integer` 在此作用域中被冻结\\n\"\n\n#: src/variable_bindings/freeze.md:18\nmsgid \"// `_mutable_integer` goes out of scope\\n\"\nmsgstr \"// `_mutable_integer` 离开作用域\\n\"\n\n#: src/variable_bindings/freeze.md:21\nmsgid \"// Ok! `_mutable_integer` is not frozen in this scope\\n\"\nmsgstr \"// 正确！`_mutable_integer` 在此作用域中未被冻结\\n\"\n\n#: src/types.md:3\nmsgid \"\"\n\"Rust provides several mechanisms to change or define the type of primitive \"\n\"and user defined types. The following sections cover:\"\nmsgstr \"\"\n\"Rust 提供了几种机制来更改或定义原生类型和用户定义类型。以下部分将介绍：\"\n\n#: src/types.md:6\nmsgid \"[Casting](types/cast.md) between primitive types\"\nmsgstr \"原生类型之间的[类型转换](types/cast.md)\"\n\n#: src/types.md:7\nmsgid \"Specifying the desired type of [literals](types/literals.md)\"\nmsgstr \"指定[字面量](types/literals.md)的类型\"\n\n#: src/types.md:8\nmsgid \"Using [type inference](types/inference.md)\"\nmsgstr \"使用[类型推断](types/inference.md)\"\n\n#: src/types.md:9\nmsgid \"[Aliasing](types/alias.md) types\"\nmsgstr \"类型[别名](types/alias.md)\"\n\n#: src/types/cast.md:3\nmsgid \"\"\n\"Rust provides no implicit type conversion (coercion) between primitive \"\n\"types. But, explicit type conversion (casting) can be performed using the \"\n\"`as` keyword.\"\nmsgstr \"\"\n\"Rust 不支持原始类型之间的隐式类型转换（强制转换）。但可以使用 `as` 关键字进行\"\n\"显式类型转换（转型）。\"\n\n#: src/types/cast.md:6\nmsgid \"\"\n\"Rules for converting between integral types follow C conventions generally, \"\n\"except in cases where C has undefined behavior. The behavior of all casts \"\n\"between integral types is well defined in Rust.\"\nmsgstr \"\"\n\"整数类型之间的转换规则通常遵循 C 语言惯例，但 C 中存在未定义行为的情况除外。\"\n\"在 Rust 中，所有整数类型之间的转换行为都有明确定义。\"\n\n#: src/types/cast.md:11\nmsgid \"// Suppress all warnings from casts which overflow.\\n\"\nmsgstr \"// 抑制所有由溢出转换引起的警告。\\n\"\n\n#: src/types/cast.md:17\nmsgid \"// Error! No implicit conversion\\n\"\nmsgstr \"// 错误！不允许隐式转换\\n\"\n\n#: src/types/cast.md:21\nmsgid \"// Explicit conversion\\n\"\nmsgstr \"// 显式转换\\n\"\n\n#: src/types/cast.md:25\nmsgid \"\"\n\"// Error! There are limitations in conversion rules.\\n\"\n\"    // A float cannot be directly converted to a char.\\n\"\nmsgstr \"\"\n\"// 错误！转换规则有限制。\\n\"\n\"    // 浮点数不能直接转换为字符。\\n\"\n\n#: src/types/cast.md:30\nmsgid \"\\\"Casting: {} -> {} -> {}\\\"\"\nmsgstr \"\\\"类型转换：{} -> {} -> {}\\\"\"\n\n#: src/types/cast.md:32\nmsgid \"\"\n\"// when casting any value to an unsigned type, T,\\n\"\n\"    // T::MAX + 1 is added or subtracted until the value\\n\"\n\"    // fits into the new type\\n\"\nmsgstr \"\"\n\"// 当将任何值转换为无符号类型 T 时，\\n\"\n\"    // 会反复加上或减去 T::MAX + 1，直到该值\\n\"\n\"    // 适合新类型\\n\"\n\n#: src/types/cast.md:36\nmsgid \"// 1000 already fits in a u16\\n\"\nmsgstr \"// 1000 已经适合 u16\\n\"\n\n#: src/types/cast.md:37\nmsgid \"\\\"1000 as a u16 is: {}\\\"\"\nmsgstr \"\\\"1000 转换为 u16 是：{}\\\"\"\n\n#: src/types/cast.md:39\nmsgid \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // Under the hood, the first 8 least significant bits (LSB) are kept,\\n\"\n\"    // while the rest towards the most significant bit (MSB) get truncated.\\n\"\nmsgstr \"\"\n\"// 1000 - 256 - 256 - 256 = 232\\n\"\n\"    // 实际上，保留了最低有效位（LSB）的前 8 位，\\n\"\n\"    // 而朝最高有效位（MSB）方向的其余位被截断。\\n\"\n\n#: src/types/cast.md:42 src/types/cast.md:61\nmsgid \"\\\"1000 as a u8 is : {}\\\"\"\nmsgstr \"\\\"1000 转换为 u8 是：{}\\\"\"\n\n#: src/types/cast.md:43\nmsgid \"// -1 + 256 = 255\\n\"\nmsgstr \"// -1 + 256 = 255\\n\"\n\n#: src/types/cast.md:44\nmsgid \"\\\"  -1 as a u8 is : {}\\\"\"\nmsgstr \"\\\"  -1 转换为 u8 是：{}\\\"\"\n\n#: src/types/cast.md:46\nmsgid \"// For positive numbers, this is the same as the modulus\\n\"\nmsgstr \"// 对于正数，这等同于取模运算\\n\"\n\n#: src/types/cast.md:47\nmsgid \"\\\"1000 mod 256 is : {}\\\"\"\nmsgstr \"\\\"1000 对 256 取模是：{}\\\"\"\n\n#: src/types/cast.md:49\nmsgid \"\"\n\"// When casting to a signed type, the (bitwise) result is the same as\\n\"\n\"    // first casting to the corresponding unsigned type. If the most \"\n\"significant\\n\"\n\"    // bit of that value is 1, then the value is negative.\\n\"\nmsgstr \"\"\n\"// 当转换为有符号类型时，（按位）结果等同于\\n\"\n\"    // 先转换为对应的无符号类型。如果该值的最高有效位\\n\"\n\"    // 为 1，则该值为负数。\\n\"\n\n#: src/types/cast.md:53\nmsgid \"// Unless it already fits, of course.\\n\"\nmsgstr \"// 当然，如果已经适合的话就不需要转换。\\n\"\n\n#: src/types/cast.md:54\nmsgid \"\\\" 128 as a i16 is: {}\\\"\"\nmsgstr \"\\\" 128 转换为 i16 是：{}\\\"\"\n\n#: src/types/cast.md:56\nmsgid \"\"\n\"// In boundary case 128 value in 8-bit two's complement representation is \"\n\"-128\\n\"\nmsgstr \"// 边界情况：128 在 8 位二进制补码表示中为 -128\\n\"\n\n#: src/types/cast.md:57\nmsgid \"\\\" 128 as a i8 is : {}\\\"\"\nmsgstr \"\\\" 128 转换为 i8 是：{}\\\"\"\n\n#: src/types/cast.md:59\nmsgid \"\"\n\"// repeating the example above\\n\"\n\"    // 1000 as u8 -> 232\\n\"\nmsgstr \"\"\n\"// 重复上面的例子\\n\"\n\"    // 1000 转换为 u8 -> 232\\n\"\n\n#: src/types/cast.md:62\nmsgid \"\"\n\"// and the value of 232 in 8-bit two's complement representation is -24\\n\"\nmsgstr \"// 而 232 在 8 位二进制补码表示中为 -24\\n\"\n\n#: src/types/cast.md:63\nmsgid \"\\\" 232 as a i8 is : {}\\\"\"\nmsgstr \"\\\" 232 转换为 i8 是：{}\\\"\"\n\n#: src/types/cast.md:65\nmsgid \"\"\n\"// Since Rust 1.45, the `as` keyword performs a *saturating cast*\\n\"\n\"    // when casting from float to int. If the floating point value exceeds\\n\"\n\"    // the upper bound or is less than the lower bound, the returned value\\n\"\n\"    // will be equal to the bound crossed.\\n\"\nmsgstr \"\"\n\"// 从 Rust 1.45 开始，`as` 关键字在浮点数转整数时执行*饱和转换*\\n\"\n\"    // 如果浮点值超出上界或低于下界，返回值\\n\"\n\"    // 将等于所越过的边界值。\\n\"\n\n#: src/types/cast.md:70\nmsgid \"// 300.0 as u8 is 255\\n\"\nmsgstr \"// 300.0 转换为 u8 是 255\\n\"\n\n#: src/types/cast.md:71 src/types/cast.md:82\nmsgid \"\\\" 300.0 as u8 is : {}\\\"\"\nmsgstr \"\\\" 300.0 转换为 u8 是：{}\\\"\"\n\n#: src/types/cast.md:72\nmsgid \"// -100.0 as u8 is 0\\n\"\nmsgstr \"// -100.0 转换为 u8 是 0\\n\"\n\n#: src/types/cast.md:73 src/types/cast.md:84\nmsgid \"\\\"-100.0 as u8 is : {}\\\"\"\nmsgstr \"\\\"-100.0 转换为 u8 是：{}\\\"\"\n\n#: src/types/cast.md:74 src/types/cast.md:85\nmsgid \"// nan as u8 is 0\\n\"\nmsgstr \"// NaN 转换为 u8 是 0\\n\"\n\n#: src/types/cast.md:75 src/types/cast.md:86\nmsgid \"\\\"   nan as u8 is : {}\\\"\"\nmsgstr \"\\\"   NaN 转换为 u8 是：{}\\\"\"\n\n#: src/types/cast.md:77\nmsgid \"\"\n\"// This behavior incurs a small runtime cost and can be avoided\\n\"\n\"    // with unsafe methods, however the results might overflow and\\n\"\n\"    // return **unsound values**. Use these methods wisely:\\n\"\nmsgstr \"\"\n\"// 这种行为会产生少量运行时开销，可以通过不安全方法避免，\\n\"\n\"    // 但结果可能溢出并返回**不可靠的值**。请谨慎使用这些方法：\\n\"\n\n#: src/types/cast.md:81\nmsgid \"// 300.0 as u8 is 44\\n\"\nmsgstr \"// 300.0 转换为 u8 是 44\\n\"\n\n#: src/types/cast.md:83\nmsgid \"// -100.0 as u8 is 156\\n\"\nmsgstr \"// -100.0 转换为 u8 是 156\\n\"\n\n#: src/types/literals.md:3\nmsgid \"\"\n\"Numeric literals can be type annotated by adding the type as a suffix. As an \"\n\"example, to specify that the literal `42` should have the type `i32`, write \"\n\"`42i32`.\"\nmsgstr \"\"\n\"数字字面值可以通过添加类型后缀进行类型标注。例如，要指定字面值 `42` 的类型为 \"\n\"`i32`，可以写成 `42i32`。\"\n\n#: src/types/literals.md:6\nmsgid \"\"\n\"The type of unsuffixed numeric literals will depend on how they are used. If \"\n\"no constraint exists, the compiler will use `i32` for integers, and `f64` \"\n\"for floating-point numbers.\"\nmsgstr \"\"\n\"无后缀数字字面值的类型取决于其使用方式。如果没有约束，编译器将对整数使用 \"\n\"`i32`，对浮点数使用 `f64`。\"\n\n#: src/types/literals.md:12\nmsgid \"// Suffixed literals, their types are known at initialization\\n\"\nmsgstr \"// 带后缀的字面值，其类型在初始化时确定\\n\"\n\n#: src/types/literals.md:17\nmsgid \"// Unsuffixed literals, their types depend on how they are used\\n\"\nmsgstr \"// 无后缀的字面值，其类型取决于使用方式\\n\"\n\n#: src/types/literals.md:21\nmsgid \"// `size_of_val` returns the size of a variable in bytes\\n\"\nmsgstr \"// `size_of_val` 返回变量的字节大小\\n\"\n\n#: src/types/literals.md:22\nmsgid \"\\\"size of `x` in bytes: {}\\\"\"\nmsgstr \"\\\"`x` 的字节大小：{}\\\"\"\n\n#: src/types/literals.md:23\nmsgid \"\\\"size of `y` in bytes: {}\\\"\"\nmsgstr \"\\\"`y` 的字节大小：{}\\\"\"\n\n#: src/types/literals.md:24\nmsgid \"\\\"size of `z` in bytes: {}\\\"\"\nmsgstr \"\\\"`z` 的字节大小：{}\\\"\"\n\n#: src/types/literals.md:25\nmsgid \"\\\"size of `i` in bytes: {}\\\"\"\nmsgstr \"\\\"`i` 的字节大小：{}\\\"\"\n\n#: src/types/literals.md:26\nmsgid \"\\\"size of `f` in bytes: {}\\\"\"\nmsgstr \"\\\"`f` 的字节大小：{}\\\"\"\n\n#: src/types/literals.md:30\nmsgid \"\"\n\"There are some concepts used in the previous code that haven't been \"\n\"explained yet, here's a brief explanation for the impatient readers:\"\nmsgstr \"\"\n\"前面的代码中使用了一些尚未解释的概念。为了满足迫不及待的读者，这里简要说明如\"\n\"下：\"\n\n#: src/types/literals.md:33\nmsgid \"\"\n\"`std::mem::size_of_val` is a function, but called with its _full path_. Code \"\n\"can be split in logical units called _modules_. In this case, the \"\n\"`size_of_val` function is defined in the `mem` module, and the `mem` module \"\n\"is defined in the `std` _crate_. For more details, see [modules](../mod.md) \"\n\"and [crates](../crates.md).\"\nmsgstr \"\"\n\"`std::mem::size_of_val` 是一个函数，这里使用了它的\\\"完整路径\\\"来调用。代码可\"\n\"以被划分为称为\\\"模块\\\"的逻辑单元。在这个例子中，`size_of_val` 函数定义在 \"\n\"`mem` 模块中，而 `mem` 模块则定义在 `std` crate 中。更多详情请参阅[模块](../\"\n\"mod.md)和[crate](../crates.md)。\"\n\n#: src/types/inference.md:3\nmsgid \"\"\n\"The type inference engine is pretty smart. It does more than looking at the \"\n\"type of the value expression during an initialization. It also looks at how \"\n\"the variable is used afterwards to infer its type. Here's an advanced \"\n\"example of type inference:\"\nmsgstr \"\"\n\"类型推断引擎相当智能。它不仅在初始化时分析值表达式的类型，还会根据变量后续的\"\n\"使用方式来推断其类型。下面是一个类型推断的高级示例：\"\n\n#: src/types/inference.md:10\nmsgid \"\"\n\"// Because of the annotation, the compiler knows that `elem` has type u8.\\n\"\nmsgstr \"// 通过类型注解，编译器得知 `elem` 的类型为 u8 \\n\"\n\n#: src/types/inference.md:13\nmsgid \"// Create an empty vector (a growable array).\\n\"\nmsgstr \"// 创建一个空向量（可增长的数组）\\n\"\n\n#: src/types/inference.md:15\nmsgid \"\"\n\"// At this point the compiler doesn't know the exact type of `vec`, it\\n\"\n\"    // just knows that it's a vector of something (`Vec<_>`).\\n\"\nmsgstr \"\"\n\"// 此时编译器还不知道 `vec` 的具体类型，\\n\"\n\"    // 只知道它是某种类型的向量（`Vec<_>`）。\\n\"\n\n#: src/types/inference.md:18\nmsgid \"// Insert `elem` in the vector.\\n\"\nmsgstr \"// 将 `elem` 插入向量中\\n\"\n\n#: src/types/inference.md:20\nmsgid \"\"\n\"// Aha! Now the compiler knows that `vec` is a vector of `u8`s (`Vec<u8>`)\\n\"\n\"    // TODO ^ Try commenting out the `vec.push(elem)` line\\n\"\nmsgstr \"\"\n\"// 啊哈！现在编译器知道 `vec` 是 `u8` 类型的向量（`Vec<u8>`）\\n\"\n\"    // TODO ^ 尝试注释掉 `vec.push(elem)` 这一行\\n\"\n\n#: src/types/inference.md:27\nmsgid \"\"\n\"No type annotation of variables was needed, the compiler is happy and so is \"\n\"the programmer!\"\nmsgstr \"无需为变量添加类型注解，编译器和程序员都很满意！\"\n\n#: src/types/alias.md:3\nmsgid \"\"\n\"The `type` statement can be used to give a new name to an existing type. \"\n\"Types must have `UpperCamelCase` names, or the compiler will raise a \"\n\"warning. The exception to this rule are the primitive types: `usize`, `f32`, \"\n\"etc.\"\nmsgstr \"\"\n\"`type` 语句用于为现有类型创建新名称。类型名必须使用 `UpperCamelCase`（大驼\"\n\"峰）命名，否则编译器会发出警告。此规则的例外是原始类型，如 `usize`、`f32` \"\n\"等。\"\n\n#: src/types/alias.md:8\nmsgid \"// `NanoSecond`, `Inch`, and `U64` are new names for `u64`.\\n\"\nmsgstr \"// `NanoSecond`、`Inch` 和 `U64` 都是 `u64` 的新名称。\\n\"\n\n#: src/types/alias.md:14\nmsgid \"// `NanoSecond` = `Inch` = `U64` = `u64`.\\n\"\nmsgstr \"// `NanoSecond` = `Inch` = `U64` = `u64`。\\n\"\n\n#: src/types/alias.md:18\nmsgid \"\"\n\"// Note that type aliases *don't* provide any extra type safety, because\\n\"\n\"    // aliases are *not* new types\\n\"\nmsgstr \"// 注意，类型别名*不会*提供额外的类型安全性，因为别名*不是*新类型\\n\"\n\n#: src/types/alias.md:20\nmsgid \"\\\"{} nanoseconds + {} inches = {} unit?\\\"\"\nmsgstr \"\\\"{} 纳秒 + {} 英寸 = {} 单位？\\\"\"\n\n#: src/types/alias.md:27\nmsgid \"\"\n\"The main use of aliases is to reduce boilerplate; for example the \"\n\"`io::Result<T>` type is an alias for the `Result<T, io::Error>` type.\"\nmsgstr \"\"\n\"别名的主要用途是减少重复代码。例如，`io::Result<T>` 类型是 `Result<T, \"\n\"io::Error>` 类型的别名。\"\n\n#: src/types/alias.md:32\nmsgid \"[Attributes](../attribute.md)\"\nmsgstr \"[属性](../attribute.md)\"\n\n#: src/conversion.md:3\nmsgid \"\"\n\"Primitive types can be converted to each other through [casting](types/\"\n\"cast.md).\"\nmsgstr \"原始类型可以通过[类型转换](types/cast.md)相互转换。\"\n\n#: src/conversion.md:5\nmsgid \"\"\n\"Rust addresses conversion between custom types (i.e., `struct` and `enum`) \"\n\"by the use of [traits](trait.md). The generic conversions will use the \"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`Into`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.Into.html) traits. However \"\n\"there are more specific ones for the more common cases, in particular when \"\n\"converting to and from `String`s.\"\nmsgstr \"\"\n\"Rust 通过使用[特质](trait.md)来处理自定义类型（如 `struct` 和 `enum`）之间的\"\n\"转换。通用转换使用 [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html) 和 [`Into`](https://doc.rust-lang.org/std/convert/\"\n\"trait.Into.html) 特质。然而，对于更常见的情况，特别是与 `String` 相互转换时，\"\n\"还有一些更具体的特质。\"\n\n#: src/conversion/from_into.md:3\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) traits are \"\n\"inherently linked, and this is actually part of its implementation. If you \"\n\"are able to convert type A from type B, then it should be easy to believe \"\n\"that we should be able to convert type B to type A.\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) 和 [`Into`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.Into.html) 特质本质上是相互关联\"\n\"的，这实际上是其实现的一部分。如果你能将类型 A 从类型 B 转换，那么我们也应该\"\n\"能够将类型 B 转换为类型 A。\"\n\n#: src/conversion/from_into.md:7\nmsgid \"`From`\"\nmsgstr \"`From`\"\n\n#: src/conversion/from_into.md:9\nmsgid \"\"\n\"The [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) trait \"\n\"allows for a type to define how to create itself from another type, hence \"\n\"providing a very simple mechanism for converting between several types. \"\n\"There are numerous implementations of this trait within the standard library \"\n\"for conversion of primitive and common types.\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) 特质允许一个\"\n\"类型定义如何从另一个类型创建自身，从而提供了一种非常简单的机制来在多种类型之\"\n\"间进行转换。标准库中有许多这个特质的实现，用于原始类型和常见类型的转换。\"\n\n#: src/conversion/from_into.md:14\nmsgid \"For example we can easily convert a `str` into a `String`\"\nmsgstr \"例如，我们可以轻松地将 `str` 转换为 `String`\"\n\n#: src/conversion/from_into.md:21\nmsgid \"We can do something similar for defining a conversion for our own type.\"\nmsgstr \"我们可以为自己的类型定义类似的转换。\"\n\n#: src/conversion/from_into.md:39 src/conversion/from_into.md:68\n#: src/conversion/from_into.md:98\nmsgid \"\\\"My number is {:?}\\\"\"\nmsgstr \"\\\"我的数字是 {:?}\\\"\"\n\n#: src/conversion/from_into.md:43\nmsgid \"`Into`\"\nmsgstr \"`Into`\"\n\n#: src/conversion/from_into.md:45\nmsgid \"\"\n\"The [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) trait is \"\n\"simply the reciprocal of the `From` trait. It defines how to convert a type \"\n\"into another type.\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) 特质简单来说\"\n\"就是 `From` 特质的反向操作。它定义了如何将一个类型转换为另一个类型。\"\n\n#: src/conversion/from_into.md:48\nmsgid \"\"\n\"Calling `into()` typically requires us to specify the result type as the \"\n\"compiler is unable to determine this most of the time.\"\nmsgstr \"\"\n\"调用 `into()` 通常需要我们指定结果类型，因为编译器大多数时候无法确定这一点。\"\n\n#: src/conversion/from_into.md:66\nmsgid \"// Try removing the type annotation\\n\"\nmsgstr \"// 尝试移除类型标注\\n\"\n\n#: src/conversion/from_into.md:72\nmsgid \"`From` and `Into` are interchangeable\"\nmsgstr \"`From` 和 `Into` 是可互换的\"\n\n#: src/conversion/from_into.md:74\nmsgid \"\"\n\"`From` and `Into` are designed to be complementary. We do not need to \"\n\"provide an implementation for both traits. If you have implemented the \"\n\"`From` trait for your type, `Into` will call it when necessary. Note, \"\n\"however, that the converse is not true: implementing `Into` for your type \"\n\"will not automatically provide it with an implementation of `From`.\"\nmsgstr \"\"\n\"`From` 和 `Into` 被设计为互补的。我们不需要为两个特质都提供实现。如果你为你的\"\n\"类型实现了 `From` 特质，`Into` 会在必要时调用它。但请注意，反过来并不成立：为\"\n\"你的类型实现 `Into` 不会自动为它提供 `From` 的实现。\"\n\n#: src/conversion/from_into.md:86\nmsgid \"// Define `From`\\n\"\nmsgstr \"// 定义 `From`\\n\"\n\n#: src/conversion/from_into.md:96\nmsgid \"// use `Into`\\n\"\nmsgstr \"// 使用 `Into`\\n\"\n\n#: src/conversion/try_from_try_into.md:3\nmsgid \"\"\n\"Similar to [`From` and `Into`](from_into.html), [`TryFrom`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryFrom.html) and [`TryInto`](https://doc.rust-\"\n\"lang.org/std/convert/trait.TryInto.html) are generic traits for converting \"\n\"between types. Unlike `From`/`Into`, the `TryFrom`/`TryInto` traits are used \"\n\"for fallible conversions, and as such, return [`Result`](https://doc.rust-\"\n\"lang.org/std/result/enum.Result.html)s.\"\nmsgstr \"\"\n\"与 [`From` 和 `Into`](from_into.html) 类似，[`TryFrom`] 和 [`TryInto`] 是用于\"\n\"类型转换的泛型特质。与 `From`/`Into` 不同，`TryFrom`/`TryInto` 特质用于可能失\"\n\"败的转换，因此返回 [`Result`]。\\n\"\n\"\\n\"\n\"[`TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html\\n\"\n\"[`TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html\\n\"\n\"[`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html\"\n\n#: src/conversion/try_from_try_into.md:33\nmsgid \"// TryFrom\\n\"\nmsgstr \"// TryFrom\\n\"\n\n#: src/conversion/try_from_try_into.md:38\nmsgid \"// TryInto\\n\"\nmsgstr \"// TryInto\\n\"\n\n#: src/conversion/string.md:1\nmsgid \"To and from Strings\"\nmsgstr \"字符串的转换\"\n\n#: src/conversion/string.md:3\nmsgid \"Converting to String\"\nmsgstr \"转换为字符串\"\n\n#: src/conversion/string.md:5\nmsgid \"\"\n\"To convert any type to a `String` is as simple as implementing the \"\n\"[`ToString`](https://doc.rust-lang.org/std/string/trait.ToString.html) trait \"\n\"for the type. Rather than doing so directly, you should implement the \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html) trait \"\n\"which automatically provides [`ToString`](https://doc.rust-lang.org/std/\"\n\"string/trait.ToString.html) and also allows printing the type as discussed \"\n\"in the section on [`print!`](../hello/print.md).\"\nmsgstr \"\"\n\"要将任何类型转换为 `String`，只需为该类型实现 [`ToString`](https://doc.rust-\"\n\"lang.org/std/string/trait.ToString.html) 特质即可。但更好的做法是实现 \"\n\"[`fmt::Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html) 特质，\"\n\"它不仅会自动提供 [`ToString`](https://doc.rust-lang.org/std/string/\"\n\"trait.ToString.html)，还允许打印该类型，就像在 [`print!`](../hello/print.md) \"\n\"部分讨论的那样。\"\n\n#: src/conversion/string.md:19\nmsgid \"\\\"Circle of radius {}\\\"\"\nmsgstr \"\\\"半径为 {} 的圆\\\"\"\n\n#: src/conversion/string.md:29\nmsgid \"Parsing a String\"\nmsgstr \"解析字符串\"\n\n#: src/conversion/string.md:31\nmsgid \"\"\n\"It's useful to convert strings into many types, but one of the more common \"\n\"string operations is to convert them from string to number. The idiomatic \"\n\"approach to this is to use the [`parse`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) function and either to arrange for type \"\n\"inference or to specify the type to parse using the 'turbofish' syntax. Both \"\n\"alternatives are shown in the following example.\"\nmsgstr \"\"\n\"将字符串转换为其他类型很有用，其中最常见的操作之一是将字符串转换为数字。惯用\"\n\"的方法是使用 [`parse`] 函数，可以通过类型推断或使用\\\"涡轮鱼\\\"语法指定要解析的\"\n\"类型。以下示例展示了这两种方法。\\n\"\n\"\\n\"\n\"[`parse`]: https://doc.rust-lang.org/std/primitive.str.html#method.parse\"\n\n#: src/conversion/string.md:37\nmsgid \"\"\n\"This will convert the string into the type specified as long as the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait is \"\n\"implemented for that type. This is implemented for numerous types within the \"\n\"standard library.\"\nmsgstr \"\"\n\"只要为目标类型实现了 [`FromStr`] 特质，就可以将字符串转换为指定的类型。标准库\"\n\"中为许多类型实现了这个特质。\\n\"\n\"\\n\"\n\"[`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html\"\n\n#: src/conversion/string.md:43 src/std_misc/process/wait.md:10\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/conversion/string.md:44 src/error/result.md:33 src/error/result.md:68\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:75\n#: src/error/result/result_alias.md:36 src/error/result/early_returns.md:36\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:67\nmsgid \"\\\"10\\\"\"\nmsgstr \"\\\"10\\\"\"\n\n#: src/conversion/string.md:47\nmsgid \"\\\"Sum: {:?}\\\"\"\nmsgstr \"\\\"总和：{:?}\\\"\"\n\n#: src/conversion/string.md:51\nmsgid \"\"\n\"To obtain this functionality on a user defined type simply implement the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"that type.\"\nmsgstr \"\"\n\"要在自定义类型上获得这个功能，只需为该类型实现 [`FromStr`] 特质。\\n\"\n\"\\n\"\n\"[`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html\"\n\n#: src/conversion/string.md:74\nmsgid \"\\\"    3 \\\"\"\nmsgstr \"\\\"    3 \\\"\"\n\n#: src/expression.md:3\nmsgid \"A Rust program is (mostly) made up of a series of statements:\"\nmsgstr \"Rust 程序（主要）由一系列语句组成：\"\n\n#: src/expression.md:7\nmsgid \"\"\n\"// statement\\n\"\n\"    // statement\\n\"\n\"    // statement\\n\"\nmsgstr \"\"\n\"// 语句\\n\"\n\"    // 语句\\n\"\n\"    // 语句\\n\"\n\n#: src/expression.md:13\nmsgid \"\"\n\"There are a few kinds of statements in Rust. The most common two are \"\n\"declaring a variable binding, and using a `;` with an expression:\"\nmsgstr \"\"\n\"Rust 中有几种语句。最常见的两种是声明变量绑定，以及在表达式后使用分号 `;`：\"\n\n#: src/expression.md:18\nmsgid \"// variable binding\\n\"\nmsgstr \"// 变量绑定\\n\"\n\n#: src/expression.md:21\nmsgid \"// expression;\\n\"\nmsgstr \"// 表达式;\\n\"\n\n#: src/expression.md:28\nmsgid \"\"\n\"Blocks are expressions too, so they can be used as values in assignments. \"\n\"The last expression in the block will be assigned to the place expression \"\n\"such as a local variable. However, if the last expression of the block ends \"\n\"with a semicolon, the return value will be `()`.\"\nmsgstr \"\"\n\"代码块也是表达式，因此可以在赋值中作为值使用。代码块中的最后一个表达式会被赋\"\n\"值给左值表达式（如局部变量）。但是，如果代码块的最后一个表达式以分号结尾，返\"\n\"回值将是 `()`。\"\n\n#: src/expression.md:41\nmsgid \"// This expression will be assigned to `y`\\n\"\nmsgstr \"// 这个表达式将被赋值给 `y`\\n\"\n\n#: src/expression.md:46\nmsgid \"\"\n\"// The semicolon suppresses this expression and `()` is assigned to `z`\\n\"\nmsgstr \"// 分号抑制了这个表达式，`()` 被赋值给 `z`\\n\"\n\n#: src/expression.md:50\nmsgid \"\\\"x is {:?}\\\"\"\nmsgstr \"\\\"x 是 {:?}\\\"\"\n\n#: src/expression.md:51\nmsgid \"\\\"y is {:?}\\\"\"\nmsgstr \"\\\"y 是 {:?}\\\"\"\n\n#: src/expression.md:52\nmsgid \"\\\"z is {:?}\\\"\"\nmsgstr \"\\\"z 是 {:?}\\\"\"\n\n#: src/flow_control.md:3\nmsgid \"\"\n\"An integral part of any programming language are ways to modify control \"\n\"flow: `if`/`else`, `for`, and others. Let's talk about them in Rust.\"\nmsgstr \"\"\n\"控制流是任何编程语言的重要组成部分，如 `if`/`else`、`for` 等。让我们来讨论 \"\n\"Rust 中的这些内容。\"\n\n#: src/flow_control/if_else.md:3\nmsgid \"\"\n\"Branching with `if`\\\\-`else` is similar to other languages. Unlike many of \"\n\"them, the boolean condition doesn't need to be surrounded by parentheses, \"\n\"and each condition is followed by a block. `if`\\\\-`else` conditionals are \"\n\"expressions, and, all branches must return the same type.\"\nmsgstr \"\"\n\"`if`-`else` 分支结构与其他语言类似。不同之处在于，布尔条件不需要用括号括起\"\n\"来，每个条件后面都跟着一个代码块。`if`-`else` 条件是表达式，所有分支必须返回\"\n\"相同的类型。\"\n\n#: src/flow_control/if_else.md:13\nmsgid \"\\\"{} is negative\\\"\"\nmsgstr \"\\\"{} 是负数\\\"\"\n\n#: src/flow_control/if_else.md:15\nmsgid \"\\\"{} is positive\\\"\"\nmsgstr \"\\\"{} 是正数\\\"\"\n\n#: src/flow_control/if_else.md:17\nmsgid \"\\\"{} is zero\\\"\"\nmsgstr \"\\\"{} 是零\\\"\"\n\n#: src/flow_control/if_else.md:22\nmsgid \"\\\", and is a small number, increase ten-fold\\\"\"\nmsgstr \"\\\"，是一个小数字，扩大十倍\\\"\"\n\n#: src/flow_control/if_else.md:24\nmsgid \"// This expression returns an `i32`.\\n\"\nmsgstr \"// 这个表达式返回 `i32` 类型。\\n\"\n\n#: src/flow_control/if_else.md:27\nmsgid \"\\\", and is a big number, halve the number\\\"\"\nmsgstr \"\\\"，是一个大数字，将数字减半\\\"\"\n\n#: src/flow_control/if_else.md:29\nmsgid \"// This expression must return an `i32` as well.\\n\"\nmsgstr \"// 这个表达式也必须返回 `i32` 类型。\\n\"\n\n#: src/flow_control/if_else.md:31\nmsgid \"// TODO ^ Try suppressing this expression with a semicolon.\\n\"\nmsgstr \"// TODO ^ 尝试用分号结束这个表达式。\\n\"\n\n#: src/flow_control/if_else.md:33\nmsgid \"\"\n\"//   ^ Don't forget to put a semicolon here! All `let` bindings need it.\\n\"\nmsgstr \"//   ^ 别忘了在这里加分号！所有 `let` 绑定都需要它。\\n\"\n\n#: src/flow_control/if_else.md:35 src/flow_control/match.md:35\nmsgid \"\\\"{} -> {}\\\"\"\nmsgstr \"\\\"{} -> {}\\\"\"\n\n#: src/flow_control/loop.md:3\nmsgid \"Rust provides a `loop` keyword to indicate an infinite loop.\"\nmsgstr \"Rust 提供 `loop` 关键字来表示无限循环。\"\n\n#: src/flow_control/loop.md:5\nmsgid \"\"\n\"The `break` statement can be used to exit a loop at anytime, whereas the \"\n\"`continue` statement can be used to skip the rest of the iteration and start \"\n\"a new one.\"\nmsgstr \"\"\n\"`break` 语句可以随时退出循环，而 `continue` 语句可以跳过当前迭代的剩余部分并\"\n\"开始下一次迭代。\"\n\n#: src/flow_control/loop.md:13\nmsgid \"\\\"Let's count until infinity!\\\"\"\nmsgstr \"\\\"让我们数到无穷大！\\\"\"\n\n#: src/flow_control/loop.md:15\nmsgid \"// Infinite loop\\n\"\nmsgstr \"// 无限循环\\n\"\n\n#: src/flow_control/loop.md:20\nmsgid \"\\\"three\\\"\"\nmsgstr \"\\\"three\\\"\"\n\n#: src/flow_control/loop.md:22\nmsgid \"// Skip the rest of this iteration\\n\"\nmsgstr \"// 跳过本次迭代的剩余部分\\n\"\n\n#: src/flow_control/loop.md:29\nmsgid \"\\\"OK, that's enough\\\"\"\nmsgstr \"\\\"好了，够了\\\"\"\n\n#: src/flow_control/loop.md:31\nmsgid \"// Exit this loop\\n\"\nmsgstr \"// 退出这个循环\\n\"\n\n#: src/flow_control/loop/nested.md:3\nmsgid \"\"\n\"It's possible to `break` or `continue` outer loops when dealing with nested \"\n\"loops. In these cases, the loops must be annotated with some `'label`, and \"\n\"the label must be passed to the `break`/`continue` statement.\"\nmsgstr \"\"\n\"在处理嵌套循环时，可以 `break` 或 `continue` 外层循环。这种情况下，循环必须\"\n\"用 `'label` 标记，并且必须将标签传递给 `break`/`continue` 语句。\"\n\n#: src/flow_control/loop/nested.md:12\nmsgid \"\\\"Entered the outer loop\\\"\"\nmsgstr \"\\\"进入外层循环\\\"\"\n\n#: src/flow_control/loop/nested.md:15\nmsgid \"\\\"Entered the inner loop\\\"\"\nmsgstr \"\\\"进入内层循环\\\"\"\n\n#: src/flow_control/loop/nested.md:17\nmsgid \"\"\n\"// This would break only the inner loop\\n\"\n\"            //break;\\n\"\nmsgstr \"\"\n\"// 这只会中断内层循环\\n\"\n\"            //break;\\n\"\n\n#: src/flow_control/loop/nested.md:20\nmsgid \"// This breaks the outer loop\\n\"\nmsgstr \"// 这会中断外层循环\\n\"\n\n#: src/flow_control/loop/nested.md:24\nmsgid \"\\\"This point will never be reached\\\"\"\nmsgstr \"\\\"这一点永远不会到达\\\"\"\n\n#: src/flow_control/loop/nested.md:27\nmsgid \"\\\"Exited the outer loop\\\"\"\nmsgstr \"\\\"退出外层循环\\\"\"\n\n#: src/flow_control/loop/return.md:3\nmsgid \"\"\n\"One of the uses of a `loop` is to retry an operation until it succeeds. If \"\n\"the operation returns a value though, you might need to pass it to the rest \"\n\"of the code: put it after the `break`, and it will be returned by the `loop` \"\n\"expression.\"\nmsgstr \"\"\n\"`loop` 的一个用途是重试操作直到成功。如果操作返回一个值，你可能需要将它传递给\"\n\"代码的其余部分：将它放在 `break` 之后，它将被 `loop` 表达式返回。\"\n\n#: src/flow_control/while.md:3\nmsgid \"\"\n\"The `while` keyword can be used to run a loop while a condition is true.\"\nmsgstr \"`while` 关键字用于在条件为真时运行循环。\"\n\n#: src/flow_control/while.md:5\nmsgid \"\"\n\"Let's write the infamous [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) \"\n\"using a `while` loop.\"\nmsgstr \"\"\n\"让我们用 `while` 循环来编写著名的 [FizzBuzz](https://en.wikipedia.org/wiki/\"\n\"Fizz_buzz) 程序。\"\n\n#: src/flow_control/while.md:9\nmsgid \"// A counter variable\\n\"\nmsgstr \"// 计数器变量\\n\"\n\n#: src/flow_control/while.md:12\nmsgid \"// Loop while `n` is less than 101\\n\"\nmsgstr \"// 当 `n` 小于 101 时继续循环\\n\"\n\n#: src/flow_control/while.md:15 src/flow_control/for.md:17\n#: src/flow_control/for.md:37 src/fn.md:34\nmsgid \"\\\"fizzbuzz\\\"\"\nmsgstr \"\\\"fizzbuzz\\\"\"\n\n#: src/flow_control/while.md:17 src/flow_control/for.md:19\n#: src/flow_control/for.md:39 src/fn.md:36\nmsgid \"\\\"fizz\\\"\"\nmsgstr \"\\\"fizz\\\"\"\n\n#: src/flow_control/while.md:19 src/flow_control/for.md:21\n#: src/flow_control/for.md:41 src/fn.md:38\nmsgid \"\\\"buzz\\\"\"\nmsgstr \"\\\"buzz\\\"\"\n\n#: src/flow_control/while.md:24\nmsgid \"// Increment counter\\n\"\nmsgstr \"// 计数器递增\\n\"\n\n#: src/flow_control/for.md:1\nmsgid \"for loops\"\nmsgstr \"for 循环\"\n\n#: src/flow_control/for.md:5\nmsgid \"\"\n\"The `for in` construct can be used to iterate through an `Iterator`. One of \"\n\"the easiest ways to create an iterator is to use the range notation `a..b`. \"\n\"This yields values from `a` (inclusive) to `b` (exclusive) in steps of one.\"\nmsgstr \"\"\n\"`for in` 结构可用于遍历 `Iterator`。创建迭代器最简单的方法之一是使用区间表示\"\n\"法 `a..b`。这会生成从 `a`（包含）到 `b`（不包含）的值，步长为 1。\"\n\n#: src/flow_control/for.md:10\nmsgid \"Let's write FizzBuzz using `for` instead of `while`.\"\nmsgstr \"让我们用 `for` 而不是 `while` 来编写 FizzBuzz。\"\n\n#: src/flow_control/for.md:14 src/flow_control/for.md:34\nmsgid \"// `n` will take the values: 1, 2, ..., 100 in each iteration\\n\"\nmsgstr \"// `n` 在每次迭代中将取值：1, 2, ..., 100\\n\"\n\n#: src/flow_control/for.md:29\nmsgid \"\"\n\"Alternatively, `a..=b` can be used for a range that is inclusive on both \"\n\"ends. The above can be written as:\"\nmsgstr \"另外，可以使用 `a..=b` 表示两端都包含的范围。上面的代码可以改写为：\"\n\n#: src/flow_control/for.md:49\nmsgid \"for and iterators\"\nmsgstr \"for 与迭代器\"\n\n#: src/flow_control/for.md:51\nmsgid \"\"\n\"The `for in` construct is able to interact with an `Iterator` in several \"\n\"ways. As discussed in the section on the [Iterator](../trait/iter.md) trait, \"\n\"by default the `for` loop will apply the `into_iter` function to the \"\n\"collection. However, this is not the only means of converting collections \"\n\"into iterators.\"\nmsgstr \"\"\n\"`for in` 结构能以多种方式与 `Iterator` 交互。正如在 [Iterator](../trait/\"\n\"iter.md) 特质一节中讨论的那样，默认情况下 `for` 循环会对集合应用 `into_iter` \"\n\"函数。然而，这并不是将集合转换为迭代器的唯一方法。\"\n\n#: src/flow_control/for.md:56\nmsgid \"\"\n\"`into_iter`, `iter` and `iter_mut` all handle the conversion of a collection \"\n\"into an iterator in different ways, by providing different views on the data \"\n\"within.\"\nmsgstr \"\"\n\"`into_iter`、`iter` 和 `iter_mut` 都以不同的方式处理集合到迭代器的转换，通过\"\n\"提供对数据的不同视图。\"\n\n#: src/flow_control/for.md:60\nmsgid \"\"\n\"`iter` - This borrows each element of the collection through each iteration. \"\n\"Thus leaving the collection untouched and available for reuse after the loop.\"\nmsgstr \"\"\n\"`iter` - 在每次迭代中借用集合的每个元素。因此，集合保持不变，并且在循环之后可\"\n\"以重复使用。\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:85\n#: src/flow_control/for.md:104\nmsgid \"\\\"Frank\\\"\"\nmsgstr \"\\\"Frank\\\"\"\n\n#: src/flow_control/for.md:65 src/flow_control/for.md:69\n#: src/flow_control/for.md:85 src/flow_control/for.md:89\n#: src/flow_control/for.md:104 src/flow_control/for.md:108\nmsgid \"\\\"Ferris\\\"\"\nmsgstr \"\\\"Ferris\\\"\"\n\n#: src/flow_control/for.md:69 src/flow_control/for.md:89\n#: src/flow_control/for.md:108\nmsgid \"\\\"There is a rustacean among us!\\\"\"\nmsgstr \"\\\"我们中间有一个 Rustacean！\\\"\"\n\n#: src/flow_control/for.md:70\nmsgid \"// TODO ^ Try deleting the & and matching just \\\"Ferris\\\"\\n\"\nmsgstr \"// TODO ^ 尝试删除 & 并只匹配 \\\"Ferris\\\"\\n\"\n\n#: src/flow_control/for.md:71 src/flow_control/for.md:90\nmsgid \"\\\"Hello {}\\\"\"\nmsgstr \"\\\"你好 {}\\\"\"\n\n#: src/flow_control/for.md:75 src/flow_control/for.md:94\n#: src/flow_control/for.md:113\nmsgid \"\\\"names: {:?}\\\"\"\nmsgstr \"\\\"names: {:?}\\\"\"\n\n#: src/flow_control/for.md:79\nmsgid \"\"\n\"`into_iter` - This consumes the collection so that on each iteration the \"\n\"exact data is provided. Once the collection has been consumed it is no \"\n\"longer available for reuse as it has been 'moved' within the loop.\"\nmsgstr \"\"\n\"`into_iter` - 这会消耗集合，使得在每次迭代中提供确切的数据。一旦集合被消耗，\"\n\"它就不再可用于重复使用，因为它已经在循环中被\\\"移动\\\"了。\"\n\n#: src/flow_control/for.md:99\nmsgid \"\"\n\"`iter_mut` - This mutably borrows each element of the collection, allowing \"\n\"for the collection to be modified in place.\"\nmsgstr \"`iter_mut` - 这会可变地借用集合的每个元素，允许在原地修改集合。\"\n\n#: src/flow_control/for.md:109\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"你好\\\"\"\n\n#: src/flow_control/for.md:117\nmsgid \"\"\n\"In the above snippets note the type of `match` branch, that is the key \"\n\"difference in the types of iteration. The difference in type then of course \"\n\"implies differing actions that are able to be performed.\"\nmsgstr \"\"\n\"在上面的代码片段中，注意 `match` 分支的类型，这是迭代类型的关键区别。类型的差\"\n\"异意味着可以执行不同的操作。\"\n\n#: src/flow_control/for.md:123\nmsgid \"[Iterator](../trait/iter.md)\"\nmsgstr \"[迭代器](../trait/iter.md)\"\n\n#: src/flow_control/match.md:3\nmsgid \"\"\n\"Rust provides pattern matching via the `match` keyword, which can be used \"\n\"like a C `switch`. The first matching arm is evaluated and all possible \"\n\"values must be covered.\"\nmsgstr \"\"\n\"Rust 通过 `match` 关键字提供模式匹配，类似于 C 语言的 `switch`。第一个匹配的\"\n\"分支会被求值，并且必须覆盖所有可能的值。\"\n\n#: src/flow_control/match.md:10\nmsgid \"// TODO ^ Try different values for `number`\\n\"\nmsgstr \"// TODO ^ 尝试为 `number` 赋不同的值\\n\"\n\n#: src/flow_control/match.md:12\nmsgid \"\\\"Tell me about {}\\\"\"\nmsgstr \"\\\"告诉我关于 {} 的信息\\\"\"\n\n#: src/flow_control/match.md:14\nmsgid \"// Match a single value\\n\"\nmsgstr \"// 匹配单个值\\n\"\n\n#: src/flow_control/match.md:15\nmsgid \"\\\"One!\\\"\"\nmsgstr \"\\\"一！\\\"\"\n\n#: src/flow_control/match.md:16\nmsgid \"// Match several values\\n\"\nmsgstr \"// 匹配多个值\\n\"\n\n#: src/flow_control/match.md:17\nmsgid \"\\\"This is a prime\\\"\"\nmsgstr \"\\\"这是个质数\\\"\"\n\n#: src/flow_control/match.md:18\nmsgid \"\"\n\"// TODO ^ Try adding 13 to the list of prime values\\n\"\n\"        // Match an inclusive range\\n\"\nmsgstr \"\"\n\"// TODO ^ 尝试将 13 添加到质数列表中\\n\"\n\"        // 匹配一个闭区间范围\\n\"\n\n#: src/flow_control/match.md:20\nmsgid \"\\\"A teen\\\"\"\nmsgstr \"\\\"一个青少年\\\"\"\n\n#: src/flow_control/match.md:21\nmsgid \"// Handle the rest of cases\\n\"\nmsgstr \"// 处理其余情况\\n\"\n\n#: src/flow_control/match.md:22\nmsgid \"\\\"Ain't special\\\"\"\nmsgstr \"\\\"没什么特别的\\\"\"\n\n#: src/flow_control/match.md:23\nmsgid \"// TODO ^ Try commenting out this catch-all arm\\n\"\nmsgstr \"// TODO ^ 尝试注释掉这个匹配所有情况的分支\\n\"\n\n#: src/flow_control/match.md:27\nmsgid \"// Match is an expression too\\n\"\nmsgstr \"// match 也是一个表达式\\n\"\n\n#: src/flow_control/match.md:29\nmsgid \"// The arms of a match must cover all the possible values\\n\"\nmsgstr \"// match 的分支必须覆盖所有可能的值\\n\"\n\n#: src/flow_control/match.md:32\nmsgid \"// TODO ^ Try commenting out one of these arms\\n\"\nmsgstr \"// TODO ^ 尝试注释掉其中一个分支\\n\"\n\n#: src/flow_control/match/destructuring.md:3\nmsgid \"A `match` block can destructure items in a variety of ways.\"\nmsgstr \"`match` 块可以以多种方式解构项。\"\n\n#: src/flow_control/match/destructuring.md:5\nmsgid \"[Destructuring Tuples](destructuring/destructure_tuple.md)\"\nmsgstr \"[解构元组](destructuring/destructure_tuple.md)\"\n\n#: src/flow_control/match/destructuring.md:6\nmsgid \"[Destructuring Arrays and Slices](destructuring/destructure_slice.md)\"\nmsgstr \"[解构数组和切片](destructuring/destructure_slice.md)\"\n\n#: src/flow_control/match/destructuring.md:7\nmsgid \"[Destructuring Enums](destructuring/destructure_enum.md)\"\nmsgstr \"[解构枚举](destructuring/destructure_enum.md)\"\n\n#: src/flow_control/match/destructuring.md:8\nmsgid \"[Destructuring Pointers](destructuring/destructure_pointers.md)\"\nmsgstr \"[解构指针](destructuring/destructure_pointers.md)\"\n\n#: src/flow_control/match/destructuring.md:9\nmsgid \"[Destructuring Structures](destructuring/destructure_structures.md)\"\nmsgstr \"[解构结构体](destructuring/destructure_structures.md)\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:3\nmsgid \"Tuples can be destructured in a `match` as follows:\"\nmsgstr \"元组可以在 `match` 中按如下方式解构：\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:8\nmsgid \"// TODO ^ Try different values for `triple`\\n\"\nmsgstr \"// TODO ^ 尝试为 `triple` 赋不同的值\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:10\nmsgid \"\\\"Tell me about {:?}\\\"\"\nmsgstr \"\\\"告诉我关于 {:?} 的信息\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:11\nmsgid \"// Match can be used to destructure a tuple\\n\"\nmsgstr \"// match 可用于解构元组\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:13\nmsgid \"// Destructure the second and third elements\\n\"\nmsgstr \"// 解构第二和第三个元素\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:14\nmsgid \"\\\"First is `0`, `y` is {:?}, and `z` is {:?}\\\"\"\nmsgstr \"\\\"第一个是 `0`，`y` 是 {:?}，`z` 是 {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:15\nmsgid \"\\\"First is `1` and the rest doesn't matter\\\"\"\nmsgstr \"\\\"第一个是 `1`，其余的不重要\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:16\nmsgid \"\\\"last is `2` and the rest doesn't matter\\\"\"\nmsgstr \"\\\"最后一个是 `2`，其余的不重要\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:17\nmsgid \"\\\"First is `3`, last is `4`, and the rest doesn't matter\\\"\"\nmsgstr \"\\\"第一个是 `3`，最后一个是 `4`，其余的不重要\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:18\nmsgid \"// `..` can be used to ignore the rest of the tuple\\n\"\nmsgstr \"// `..` 可用于忽略元组中的其余部分\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:19\nmsgid \"\\\"It doesn't matter what they are\\\"\"\nmsgstr \"\\\"它们是什么并不重要\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:20\nmsgid \"// `_` means don't bind the value to a variable\\n\"\nmsgstr \"// `_` 表示不将值绑定到变量\\n\"\n\n#: src/flow_control/match/destructuring/destructure_tuple.md:27\nmsgid \"[Tuples](../../../primitives/tuples.md)\"\nmsgstr \"[元组](../../../primitives/tuples.md)\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:3\nmsgid \"Like tuples, arrays and slices can be destructured this way:\"\nmsgstr \"与元组类似，数组和切片也可以用这种方式解构：\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:7\nmsgid \"// Try changing the values in the array, or make it a slice!\\n\"\nmsgstr \"// 尝试改变数组中的值，或将其变成切片！\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:11\nmsgid \"\"\n\"// Binds the second and the third elements to the respective variables\\n\"\nmsgstr \"// 将第二个和第三个元素分别绑定到相应的变量\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:13\nmsgid \"\\\"array[0] = 0, array[1] = {}, array[2] = {}\\\"\"\nmsgstr \"\\\"array[0] = 0，array[1] = {}，array[2] = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:15\nmsgid \"// Single values can be ignored with _\\n\"\nmsgstr \"// 单个值可以用 _ 忽略\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:17\nmsgid \"\\\"array[0] = 1, array[2] = {} and array[1] was ignored\\\"\"\nmsgstr \"\\\"array[0] = 1，array[2] = {}，array[1] 被忽略了\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:21\nmsgid \"// You can also bind some and ignore the rest\\n\"\nmsgstr \"// 你也可以绑定一部分值并忽略其余的\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:23\nmsgid \"\\\"array[0] = -1, array[1] = {} and all the other ones were ignored\\\"\"\nmsgstr \"\\\"array[0] = -1，array[1] = {}，其他所有的都被忽略了\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:26\nmsgid \"\"\n\"// The code below would not compile\\n\"\n\"        // [-1, second] => ...\\n\"\nmsgstr \"\"\n\"// 下面的代码无法编译\\n\"\n\"        // [-1, second] => ...\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:29\nmsgid \"\"\n\"// Or store them in another array/slice (the type depends on\\n\"\n\"        // that of the value that is being matched against)\\n\"\nmsgstr \"\"\n\"// 或者将它们存储在另一个数组/切片中（类型取决于\\n\"\n\"        // 正在匹配的值的类型）\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:32\nmsgid \"\\\"array[0] = 3, array[1] = {} and the other elements were {:?}\\\"\"\nmsgstr \"\\\"array[0] = 3，array[1] = {}，其他元素是 {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:36\nmsgid \"\"\n\"// Combining these patterns, we can, for example, bind the first and\\n\"\n\"        // last values, and store the rest of them in a single array\\n\"\nmsgstr \"\"\n\"// 结合这些模式，我们可以，例如，绑定第一个和\\n\"\n\"        // 最后一个值，并将其余的存储在一个单独的数组中\\n\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:39\nmsgid \"\\\"array[0] = {}, middle = {:?}, array[2] = {}\\\"\"\nmsgstr \"\\\"array[0] = {}，中间部分 = {:?}，array[2] = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_slice.md:48\nmsgid \"\"\n\"[Arrays and Slices](../../../primitives/array.md) and [Binding](../\"\n\"binding.md) for `@` sigil\"\nmsgstr \"\"\n\"关于 `@` 符号的更多信息，请参阅[数组和切片](../../../primitives/array.md)和\"\n\"[绑定](../binding.md)\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:3\nmsgid \"An `enum` is destructured similarly:\"\nmsgstr \"`enum` 的解构方式类似：\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:6\nmsgid \"\"\n\"// `allow` required to silence warnings because only\\n\"\n\"// one variant is used.\\n\"\nmsgstr \"// 使用 `allow` 来抑制警告，因为只使用了一个变体。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:10\nmsgid \"// These 3 are specified solely by their name.\\n\"\nmsgstr \"// 这 3 个仅通过名称指定。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:14\nmsgid \"// These likewise tie `u32` tuples to different names: color models.\\n\"\nmsgstr \"// 这些同样将 `u32` 元组与不同的名称（颜色模型）关联。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:24\nmsgid \"// TODO ^ Try different variants for `color`\\n\"\nmsgstr \"// TODO ^ 尝试为 `color` 使用不同的变体\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:26\nmsgid \"\\\"What color is it?\\\"\"\nmsgstr \"\\\"这是什么颜色？\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:27\nmsgid \"// An `enum` can be destructured using a `match`.\\n\"\nmsgstr \"// 可以使用 `match` 来解构 `enum`。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:29\nmsgid \"\\\"The color is Red!\\\"\"\nmsgstr \"\\\"颜色是红色！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:30\nmsgid \"\\\"The color is Blue!\\\"\"\nmsgstr \"\\\"颜色是蓝色！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:31\nmsgid \"\\\"The color is Green!\\\"\"\nmsgstr \"\\\"颜色是绿色！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:33\nmsgid \"\\\"Red: {}, green: {}, and blue: {}!\\\"\"\nmsgstr \"\\\"红：{}，绿：{}，蓝：{}！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:35\nmsgid \"\\\"Hue: {}, saturation: {}, value: {}!\\\"\"\nmsgstr \"\\\"色相：{}，饱和度：{}，明度：{}！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:37\nmsgid \"\\\"Hue: {}, saturation: {}, lightness: {}!\\\"\"\nmsgstr \"\\\"色相：{}，饱和度：{}，亮度：{}！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:39\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}!\\\"\"\nmsgstr \"\\\"青：{}，品红：{}，黄：{}！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:41\nmsgid \"\\\"Cyan: {}, magenta: {}, yellow: {}, key (black): {}!\\\"\"\nmsgstr \"\\\"青：{}，品红：{}，黄：{}，黑（K）：{}！\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:43\nmsgid \"// Don't need another arm because all variants have been examined\\n\"\nmsgstr \"// 不需要其他分支，因为所有变体都已检查\\n\"\n\n#: src/flow_control/match/destructuring/destructure_enum.md:50\nmsgid \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md), [color models](https://\"\n\"en.wikipedia.org/wiki/Color_model) and [`enum`](../../../custom_types/\"\n\"enum.md)\"\nmsgstr \"\"\n\"[`#[allow(...)]`](../../../attribute/unused.md)、[颜色模型](https://\"\n\"en.wikipedia.org/wiki/Color_model)和[`enum`](../../../custom_types/enum.md)\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:3\nmsgid \"\"\n\"For pointers, a distinction needs to be made between destructuring and \"\n\"dereferencing as they are different concepts which are used differently from \"\n\"languages like C/C++.\"\nmsgstr \"\"\n\"对于指针，需要区分解构和解引用，因为它们是不同的概念，其用法与 C/C++ 等语言不\"\n\"同。\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:7\nmsgid \"Dereferencing uses `*`\"\nmsgstr \"解引用使用 `*`\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:8\nmsgid \"Destructuring uses `&`, `ref`, and `ref mut`\"\nmsgstr \"解构使用 `&`、`ref` 和 `ref mut`\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:12\nmsgid \"\"\n\"// Assign a reference of type `i32`. The `&` signifies there\\n\"\n\"    // is a reference being assigned.\\n\"\nmsgstr \"\"\n\"// 分配一个 `i32` 类型的引用。`&` 表示\\n\"\n\"    // 正在分配一个引用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:17\nmsgid \"\"\n\"// If `reference` is pattern matched against `&val`, it results\\n\"\n\"        // in a comparison like:\\n\"\n\"        // `&i32`\\n\"\n\"        // `&val`\\n\"\n\"        // ^ We see that if the matching `&`s are dropped, then the `i32`\\n\"\n\"        // should be assigned to `val`.\\n\"\nmsgstr \"\"\n\"// 如果 `reference` 与 `&val` 进行模式匹配，结果\\n\"\n\"        // 就像这样的比较：\\n\"\n\"        // `&i32`\\n\"\n\"        // `&val`\\n\"\n\"        // ^ 我们可以看到，如果去掉匹配的 `&`，那么 `i32`\\n\"\n\"        // 应该被赋值给 `val`。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:23\nmsgid \"\\\"Got a value via destructuring: {:?}\\\"\"\nmsgstr \"\\\"通过解构获得的值：{:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:26\nmsgid \"// To avoid the `&`, you dereference before matching.\\n\"\nmsgstr \"// 为了避免 `&`，你可以在匹配前解引用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:28\nmsgid \"\\\"Got a value via dereferencing: {:?}\\\"\"\nmsgstr \"\\\"通过解引用获得的值：{:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:31\nmsgid \"\"\n\"// What if you don't start with a reference? `reference` was a `&`\\n\"\n\"    // because the right side was already a reference. This is not\\n\"\n\"    // a reference because the right side is not one.\\n\"\nmsgstr \"\"\n\"// 如果你一开始没有引用怎么办？`reference` 是一个 `&`\\n\"\n\"    // 因为右侧已经是一个引用。这不是\\n\"\n\"    // 一个引用，因为右侧不是引用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:36\nmsgid \"\"\n\"// Rust provides `ref` for exactly this purpose. It modifies the\\n\"\n\"    // assignment so that a reference is created for the element; this\\n\"\n\"    // reference is assigned.\\n\"\nmsgstr \"\"\n\"// Rust 提供 `ref` 正是为了这个目的。它修改了\\n\"\n\"    // 赋值，为元素创建一个引用；\\n\"\n\"    // 这个引用被赋值。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:41\nmsgid \"\"\n\"// Accordingly, by defining 2 values without references, references\\n\"\n\"    // can be retrieved via `ref` and `ref mut`.\\n\"\nmsgstr \"\"\n\"// 相应地，通过定义两个没有引用的值，\\n\"\n\"    // 可以通过 `ref` 和 `ref mut` 获取引用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:46\nmsgid \"// Use `ref` keyword to create a reference.\\n\"\nmsgstr \"// 使用 `ref` 关键字创建引用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:48\nmsgid \"\\\"Got a reference to a value: {:?}\\\"\"\nmsgstr \"\\\"获得了一个值的引用：{:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:51\nmsgid \"// Use `ref mut` similarly.\\n\"\nmsgstr \"// 类似地使用 `ref mut`。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:54\nmsgid \"\"\n\"// Got a reference. Gotta dereference it before we can\\n\"\n\"            // add anything to it.\\n\"\nmsgstr \"\"\n\"// 获得了一个引用。在我们能够\\n\"\n\"            // 对其进行任何添加操作之前，必须先解引用。\\n\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:57\nmsgid \"\\\"We added 10. `mut_value`: {:?}\\\"\"\nmsgstr \"\\\"我们加了 10。`mut_value`：{:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_pointers.md:65\nmsgid \"[The ref pattern](../../../scope/borrow/ref.md)\"\nmsgstr \"[ref 模式](../../../scope/borrow/ref.md)\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:3\nmsgid \"Similarly, a `struct` can be destructured as shown:\"\nmsgstr \"同样，`struct` 可以按如下方式解构：\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:12\nmsgid \"// Try changing the values in the struct to see what happens\\n\"\nmsgstr \"// 尝试更改结构体中的值，看看会发生什么\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:16\nmsgid \"\\\"First of x is 1, b = {},  y = {} \\\"\"\nmsgstr \"\\\"x 的第一个元素是 1，b = {}，y = {}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:18\nmsgid \"\"\n\"// you can destructure structs and rename the variables,\\n\"\n\"        // the order is not important\\n\"\nmsgstr \"\"\n\"// 你可以解构结构体并重命名变量，\\n\"\n\"        // 顺序并不重要\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:20\nmsgid \"\\\"y is 2, i = {:?}\\\"\"\nmsgstr \"\\\"y 为 2，i = {:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:22\nmsgid \"// and you can also ignore some variables:\\n\"\nmsgstr \"// 你也可以忽略某些变量：\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:23\nmsgid \"\\\"y = {}, we don't care about x\\\"\"\nmsgstr \"\\\"y = {}，我们不关心 x 的值\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:24\nmsgid \"\"\n\"// this will give an error: pattern does not mention field `x`\\n\"\n\"        //Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\nmsgstr \"\"\n\"// 这会导致错误：模式中未提及字段 `x`\\n\"\n\"        //Foo { y } => println!(\\\"y = {}\\\", y),\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:30\nmsgid \"// You do not need a match block to destructure structs:\\n\"\nmsgstr \"// 解构结构体不一定需要 match 块：\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:32\nmsgid \"\\\"Outside: x0 = {x0:?}, y0 = {y0}\\\"\"\nmsgstr \"\\\"外部：x0 = {x0:?}，y0 = {y0}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:34\nmsgid \"// Destructuring works with nested structs as well:\\n\"\nmsgstr \"// 解构也适用于嵌套结构体：\\n\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:41\nmsgid \"\\\"Nested: nested_x = {nested_x:?}, nested_y = {nested_y:?}\\\"\"\nmsgstr \"\\\"嵌套：nested_x = {nested_x:?}，nested_y = {nested_y:?}\\\"\"\n\n#: src/flow_control/match/destructuring/destructure_structures.md:47\nmsgid \"[Structs](../../../custom_types/structs.md)\"\nmsgstr \"[结构体](../../../custom_types/structs.md)\"\n\n#: src/flow_control/match/guard.md:3\nmsgid \"A `match` _guard_ can be added to filter the arm.\"\nmsgstr \"`match` 分支可以使用**守卫**进行额外的筛选。\"\n\n#: src/flow_control/match/guard.md:14\nmsgid \"// ^ TODO try different values for `temperature`\\n\"\nmsgstr \"// ^ TODO：尝试为 `temperature` 赋予不同的值\\n\"\n\n#: src/flow_control/match/guard.md:17\nmsgid \"\\\"{}C is above 30 Celsius\\\"\"\nmsgstr \"\\\"{}°C 高于 30°C\\\"\"\n\n#: src/flow_control/match/guard.md:18\nmsgid \"// The `if condition` part ^ is a guard\\n\"\nmsgstr \"// `if condition` 部分 ^ 就是守卫\\n\"\n\n#: src/flow_control/match/guard.md:19\nmsgid \"\\\"{}C is equal to or below 30 Celsius\\\"\"\nmsgstr \"\\\"{}°C 不高于 30°C\\\"\"\n\n#: src/flow_control/match/guard.md:21\nmsgid \"\\\"{}F is above 86 Fahrenheit\\\"\"\nmsgstr \"\\\"{}°F 高于 86°F\\\"\"\n\n#: src/flow_control/match/guard.md:22\nmsgid \"\\\"{}F is equal to or below 86 Fahrenheit\\\"\"\nmsgstr \"\\\"{}°F 不高于 86°F\\\"\"\n\n#: src/flow_control/match/guard.md:27\nmsgid \"\"\n\"Note that the compiler won't take guard conditions into account when \"\n\"checking if all patterns are covered by the match expression.\"\nmsgstr \"\"\n\"注意，编译器在检查 match 表达式是否涵盖了所有模式时，不会考虑守卫条件。\"\n\n#: src/flow_control/match/guard.md:35\nmsgid \"\\\"Zero\\\"\"\nmsgstr \"\\\"零\\\"\"\n\n#: src/flow_control/match/guard.md:36\nmsgid \"\\\"Greater than zero\\\"\"\nmsgstr \"\\\"大于零\\\"\"\n\n#: src/flow_control/match/guard.md:37\nmsgid \"\"\n\"// _ => unreachable!(\\\"Should never happen.\\\"),\\n\"\n\"        // TODO ^ uncomment to fix compilation\\n\"\nmsgstr \"\"\n\"// _ => unreachable!(\\\"不应该发生。\\\"),\\n\"\n\"        // TODO ^ 取消注释以修复编译错误\\n\"\n\n#: src/flow_control/match/guard.md:45\nmsgid \"\"\n\"[Tuples](../../primitives/tuples.md) [Enums](../../custom_types/enum.md)\"\nmsgstr \"[元组](../../primitives/tuples.md) [枚举](../../custom_types/enum.md)\"\n\n#: src/flow_control/match/binding.md:3\nmsgid \"\"\n\"Indirectly accessing a variable makes it impossible to branch and use that \"\n\"variable without re-binding. `match` provides the `@` sigil for binding \"\n\"values to names:\"\nmsgstr \"\"\n\"间接访问变量时，无法在分支中使用该变量而不重新绑定。`match` 提供了 `@` 符号，\"\n\"用于将值绑定到名称：\"\n\n#: src/flow_control/match/binding.md:8\nmsgid \"// A function `age` which returns a `u32`.\\n\"\nmsgstr \"// 一个返回 `u32` 的 `age` 函数。\\n\"\n\n#: src/flow_control/match/binding.md:14\nmsgid \"\\\"Tell me what type of person you are\\\"\"\nmsgstr \"\\\"告诉我你是什么类型的人\\\"\"\n\n#: src/flow_control/match/binding.md:17\nmsgid \"\\\"I haven't celebrated my first birthday yet\\\"\"\nmsgstr \"\\\"我还没有过第一个生日\\\"\"\n\n#: src/flow_control/match/binding.md:18\nmsgid \"\"\n\"// Could `match` 1 ..= 12 directly but then what age\\n\"\n\"        // would the child be?\\n\"\n\"        // Could `match` n and use an `if` guard, but would\\n\"\n\"        // not contribute to exhaustiveness checks.\\n\"\n\"        // (Although in this case that would not matter since\\n\"\n\"        // a \\\"catch-all\\\" pattern is present at the bottom)\\n\"\n\"        // Instead, bind to `n` for the sequence of 1 ..= 12.\\n\"\n\"        // Now the age can be reported.\\n\"\nmsgstr \"\"\n\"// 我们可以直接 `match` 1 ..= 12，但那样的话如何确定\\n\"\n\"        // 孩子的确切年龄呢？\\n\"\n\"        // 可以 `match` n 并使用 `if` 守卫，但这并不是\\n\"\n\"        // 穷尽性检查。\\n\"\n\"        // （虽然在这种情况下无关紧要，因为底部有一个\\n\"\n\"        // \\\"兜底\\\" 模式）\\n\"\n\"        // 因此，将 1 ..= 12 序列绑定到 `n`。\\n\"\n\"        // 现在可以报告年龄了。\\n\"\n\n#: src/flow_control/match/binding.md:26\nmsgid \"\\\"I'm a child of age {:?}\\\"\"\nmsgstr \"\\\"我是 {:?} 岁的儿童\\\"\"\n\n#: src/flow_control/match/binding.md:27\nmsgid \"\\\"I'm a teen of age {:?}\\\"\"\nmsgstr \"\\\"我是 {:?} 岁的青少年\\\"\"\n\n#: src/flow_control/match/binding.md:28\nmsgid \"// Nothing bound. Return the result.\\n\"\nmsgstr \"// 没有绑定。直接返回结果。\\n\"\n\n#: src/flow_control/match/binding.md:29\nmsgid \"\\\"I'm an old person of age {:?}\\\"\"\nmsgstr \"\\\"我是 {:?} 岁的成年人\\\"\"\n\n#: src/flow_control/match/binding.md:34\nmsgid \"\"\n\"You can also use binding to \\\"destructure\\\" `enum` variants, such as \"\n\"`Option`:\"\nmsgstr \"你也可以使用绑定来\\\"解构\\\" `enum` 变体，例如 `Option`：\"\n\n#: src/flow_control/match/binding.md:43\nmsgid \"\"\n\"// Got `Some` variant, match if its value, bound to `n`,\\n\"\n\"        // is equal to 42.\\n\"\n\"        // Could also use `Some(42)` and print `\\\"The Awnser: 42!\\\"`\\n\"\n\"        // but that would require changing `42` in 2 spots should\\n\"\n\"        // you ever wish to change it.\\n\"\n\"        // Could also use `Some(n) if n == 42` and print `\\\"The Awnser: {n}!\"\n\"\\\"`\\n\"\n\"        // but that would not contribute to exhaustiveness checks.\\n\"\n\"        // (Although in this case that would not matter since\\n\"\n\"        // the next arm is a \\\"catch-all\\\" pattern)\\n\"\nmsgstr \"\"\n\"// 匹配到 `Some` 变体，检查其绑定到 `n` 的值\\n\"\n\"        // 是否等于 42。\\n\"\n\"        // 也可以使用 `Some(42)` 并打印 `\\\"答案是: 42!\\\"`\\n\"\n\"        // 但如果想要改变这个值，就需要在两个地方修改 `42`。\\n\"\n\"        // 也可以使用 `Some(n) if n == 42` 并打印 `\\\"答案是: {n}!\\\"`\\n\"\n\"        // 但这不是穷尽性检查。\\n\"\n\"        // （虽然在这种情况下无关紧要，因为\\n\"\n\"        // 下一个分支是\\\"兜底\\\"模式）\\n\"\n\n#: src/flow_control/match/binding.md:52\nmsgid \"\\\"The Answer: {}!\\\"\"\nmsgstr \"\\\"答案是：{}！\\\"\"\n\n#: src/flow_control/match/binding.md:53\nmsgid \"// Match any other number.\\n\"\nmsgstr \"// 匹配任何其他数字\\n\"\n\n#: src/flow_control/match/binding.md:54\nmsgid \"\\\"Not interesting... {}\\\"\"\nmsgstr \"\\\"不感兴趣... {}\\\"\"\n\n#: src/flow_control/match/binding.md:55\nmsgid \"// Match anything else (`None` variant).\\n\"\nmsgstr \"// 匹配其他任何情况（`None` 变体）\\n\"\n\n#: src/flow_control/match/binding.md:63\nmsgid \"\"\n\"[`functions`](../../fn.md), [`enums`](../../custom_types/enum.md) and \"\n\"[`Option`](../../std/option.md)\"\nmsgstr \"\"\n\"[`函数`](../../fn.md)、[`枚举`](../../custom_types/enum.md) 和 [`Option`]\"\n\"(../../std/option.md)\"\n\n#: src/flow_control/if_let.md:3\nmsgid \"\"\n\"For some use cases, when matching enums, `match` is awkward. For example:\"\nmsgstr \"在某些情况下，使用 `match` 匹配枚举可能会显得繁琐。例如：\"\n\n#: src/flow_control/if_let.md:6 src/flow_control/while_let.md:7\n#: src/flow_control/while_let.md:35\nmsgid \"// Make `optional` of type `Option<i32>`\\n\"\nmsgstr \"// 创建 `Option<i32>` 类型的 `optional`\\n\"\n\n#: src/flow_control/if_let.md:10\nmsgid \"\\\"This is a really long string and `{:?}`\\\"\"\nmsgstr \"\\\"这是一个很长的字符串，其中包含 `{:?}`\\\"\"\n\n#: src/flow_control/if_let.md:12\nmsgid \"\"\n\"// ^ Required because `match` is exhaustive. Doesn't it seem\\n\"\n\"    // like wasted space?\\n\"\nmsgstr \"\"\n\"// ^ 这是必需的，因为 `match` 要求穷举所有情况。\\n\"\n\"    // 是不是觉得有些浪费空间？\\n\"\n\n#: src/flow_control/if_let.md:18\nmsgid \"\"\n\"`if let` is cleaner for this use case and in addition allows various failure \"\n\"options to be specified:\"\nmsgstr \"对于这种情况，`if let` 更加简洁，而且还允许指定各种失败时的处理选项：\"\n\n#: src/flow_control/if_let.md:23\nmsgid \"// All have type `Option<i32>`\\n\"\nmsgstr \"// 以下都是 `Option<i32>` 类型\\n\"\n\n#: src/flow_control/if_let.md:28\nmsgid \"\"\n\"// The `if let` construct reads: \\\"if `let` destructures `number` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`).\\n\"\nmsgstr \"\"\n\"// `if let` 结构的含义是：如果 `let` 能将 `number` 解构为\\n\"\n\"    // `Some(i)`，则执行代码块（`{}`）。\\n\"\n\n#: src/flow_control/if_let.md:31 src/flow_control/if_let.md:36\n#: src/flow_control/if_let.md:46\nmsgid \"\\\"Matched {:?}!\\\"\"\nmsgstr \"\\\"匹配到 {:?}！\\\"\"\n\n#: src/flow_control/if_let.md:34\nmsgid \"// If you need to specify a failure, use an else:\\n\"\nmsgstr \"// 如果需要指定匹配失败的情况，可以使用 else：\\n\"\n\n#: src/flow_control/if_let.md:38\nmsgid \"// Destructure failed. Change to the failure case.\\n\"\nmsgstr \"// 解构失败。转到失败处理的情况。\\n\"\n\n#: src/flow_control/if_let.md:39 src/flow_control/if_let.md:50\nmsgid \"\\\"Didn't match a number. Let's go with a letter!\\\"\"\nmsgstr \"\\\"没有匹配到数字。那就用一个字母吧！\\\"\"\n\n#: src/flow_control/if_let.md:42\nmsgid \"// Provide an altered failing condition.\\n\"\nmsgstr \"// 提供一个修改后的失败条件。\\n\"\n\n#: src/flow_control/if_let.md:47\nmsgid \"\"\n\"// Destructure failed. Evaluate an `else if` condition to see if the\\n\"\n\"    // alternate failure branch should be taken:\\n\"\nmsgstr \"// 解构失败。评估 `else if` 条件，看是否应该执行替代的失败分支：\\n\"\n\n#: src/flow_control/if_let.md:52\nmsgid \"// The condition evaluated false. This branch is the default:\\n\"\nmsgstr \"// 条件判断为假。这个分支是默认情况：\\n\"\n\n#: src/flow_control/if_let.md:53\nmsgid \"\\\"I don't like letters. Let's go with an emoticon :)!\\\"\"\nmsgstr \"\\\"我不喜欢字母。那就用个表情符号吧 :)！\\\"\"\n\n#: src/flow_control/if_let.md:58\nmsgid \"In the same way, `if let` can be used to match any enum value:\"\nmsgstr \"同样地，`if let` 可以用来匹配任何枚举值：\"\n\n#: src/flow_control/if_let.md:61\nmsgid \"// Our example enum\\n\"\nmsgstr \"// 我们的示例枚举\\n\"\n\n#: src/flow_control/if_let.md:69\nmsgid \"// Create example variables\\n\"\nmsgstr \"// 创建示例变量\\n\"\n\n#: src/flow_control/if_let.md:74 src/flow_control/if_let.md:110\nmsgid \"// Variable a matches Foo::Bar\\n\"\nmsgstr \"// 变量 a 匹配 Foo::Bar\\n\"\n\n#: src/flow_control/if_let.md:76 src/flow_control/if_let.md:113\nmsgid \"\\\"a is foobar\\\"\"\nmsgstr \"\\\"a 是 foobar\\\"\"\n\n#: src/flow_control/if_let.md:79\nmsgid \"\"\n\"// Variable b does not match Foo::Bar\\n\"\n\"    // So this will print nothing\\n\"\nmsgstr \"\"\n\"// 变量 b 不匹配 Foo::Bar\\n\"\n\"    // 所以这里不会打印任何内容\\n\"\n\n#: src/flow_control/if_let.md:82\nmsgid \"\\\"b is foobar\\\"\"\nmsgstr \"\\\"b 是 foobar\\\"\"\n\n#: src/flow_control/if_let.md:85\nmsgid \"\"\n\"// Variable c matches Foo::Qux which has a value\\n\"\n\"    // Similar to Some() in the previous example\\n\"\nmsgstr \"\"\n\"// 变量 c 匹配 Foo::Qux，它包含一个值\\n\"\n\"    // 类似于前面例子中的 Some()\\n\"\n\n#: src/flow_control/if_let.md:88\nmsgid \"\\\"c is {}\\\"\"\nmsgstr \"\\\"c 是 {}\\\"\"\n\n#: src/flow_control/if_let.md:91\nmsgid \"// Binding also works with `if let`\\n\"\nmsgstr \"// `if let` 也可以进行绑定\\n\"\n\n#: src/flow_control/if_let.md:93\nmsgid \"\\\"c is one hundred\\\"\"\nmsgstr \"\\\"c 是一百\\\"\"\n\n#: src/flow_control/if_let.md:98\nmsgid \"\"\n\"Another benefit is that `if let` allows us to match non-parameterized enum \"\n\"variants. This is true even in cases where the enum doesn't implement or \"\n\"derive `PartialEq`. In such cases `if Foo::Bar == a` would fail to compile, \"\n\"because instances of the enum cannot be equated, however `if let` will \"\n\"continue to work.\"\nmsgstr \"\"\n\"`if let` 的另一个优点是它允许我们匹配非参数化的枚举变体。即使在枚举没有实现或\"\n\"派生 `PartialEq` 的情况下也是如此。在这种情况下，`if Foo::Bar == a` 将无法编\"\n\"译，因为枚举的实例无法进行相等比较，但 `if let` 仍然可以正常工作。\"\n\n#: src/flow_control/if_let.md:100\nmsgid \"Would you like a challenge? Fix the following example to use `if let`:\"\nmsgstr \"想要挑战一下吗？请修改以下示例，使用 `if let`：\"\n\n#: src/flow_control/if_let.md:103\nmsgid \"\"\n\"// This enum purposely neither implements nor derives PartialEq.\\n\"\n\"// That is why comparing Foo::Bar == a fails below.\\n\"\nmsgstr \"\"\n\"// 这个枚举故意既不实现也不派生 PartialEq。\\n\"\n\"// 这就是为什么下面比较 Foo::Bar == a 会失败。\\n\"\n\n#: src/flow_control/if_let.md:112\nmsgid \"// ^-- this causes a compile-time error. Use `if let` instead.\\n\"\nmsgstr \"// ^-- 这会导致编译时错误。请改用 `if let`。\\n\"\n\n#: src/flow_control/if_let.md:120\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/160)\"\nmsgstr \"\"\n\"[`枚举`](../custom_types/enum.md)、[`Option`](../std/option.md) 和 [RFC]\"\n\"(https://github.com/rust-lang/rfcs/pull/160)\"\n\n#: src/flow_control/let_else.md:3\nmsgid \"🛈 stable since: rust 1.65\"\nmsgstr \"🛈 自 Rust 1.65 版本起稳定\"\n\n#: src/flow_control/let_else.md:5\nmsgid \"\"\n\"🛈 you can target specific edition by compiling like this `rustc --\"\n\"edition=2021 main.rs`\"\nmsgstr \"🛈 你可以通过这种方式编译来指定特定版本：`rustc --edition=2021 main.rs`\"\n\n#: src/flow_control/let_else.md:8\nmsgid \"\"\n\"With `let`\\\\-`else`, a refutable pattern can match and bind variables in the \"\n\"surrounding scope like a normal `let`, or else diverge (e.g. `break`, \"\n\"`return`, `panic!`) when the pattern doesn't match.\"\nmsgstr \"\"\n\"`let`-`else` 语法允许可能失败的模式匹配像普通 `let` 一样绑定变量到当前作用\"\n\"域，或在匹配失败时执行中断操作（如 `break`、`return`、`panic!`）。\"\n\n#: src/flow_control/let_else.md:16 src/flow_control/let_else.md:39\n#: src/std/str.md:41\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/flow_control/let_else.md:18 src/flow_control/let_else.md:42\nmsgid \"\\\"Can't segment count item pair: '{s}'\\\"\"\nmsgstr \"\\\"无法分割计数项对：'{s}'\\\"\"\n\n#: src/flow_control/let_else.md:21 src/flow_control/let_else.md:47\nmsgid \"\\\"Can't parse integer: '{count_str}'\\\"\"\nmsgstr \"\\\"无法解析整数：'{count_str}'\\\"\"\n\n#: src/flow_control/let_else.md:27 src/flow_control/let_else.md:52\nmsgid \"\\\"3 chairs\\\"\"\nmsgstr \"\\\"3 chairs\\\"\"\n\n#: src/flow_control/let_else.md:27 src/flow_control/let_else.md:52\nmsgid \"\\\"chairs\\\"\"\nmsgstr \"\\\"chairs\\\"\"\n\n#: src/flow_control/let_else.md:31\nmsgid \"\"\n\"The scope of name bindings is the main thing that makes this different from \"\n\"`match` or `if let`\\\\-`else` expressions. You could previously approximate \"\n\"these patterns with an unfortunate bit of repetition and an outer `let`:\"\nmsgstr \"\"\n\"名称绑定的作用域是使其区别于 `match` 或 `if let`-`else` 表达式的主要特点。在\"\n\"此之前，你可能需要通过一些冗余的重复和外部 `let` 来近似实现这些模式：\"\n\n#: src/flow_control/let_else.md:57\nmsgid \"\"\n\"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) and \"\n\"the [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html).\"\nmsgstr \"\"\n\"[Option](../std/option.md)、[match](./match.md)、[if let](./if_let.md) 和 \"\n\"[let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html)。\"\n\n#: src/flow_control/while_let.md:3\nmsgid \"\"\n\"Similar to `if let`, `while let` can make awkward `match` sequences more \"\n\"tolerable. Consider the following sequence that increments `i`:\"\nmsgstr \"\"\n\"与 `if let` 类似，`while let` 可以简化繁琐的 `match` 序列。让我们来看一个递\"\n\"增 `i` 的例子：\"\n\n#: src/flow_control/while_let.md:9\nmsgid \"// Repeatedly try this test.\\n\"\nmsgstr \"// 重复执行此测试。\\n\"\n\n#: src/flow_control/while_let.md:13\nmsgid \"// If `optional` destructures, evaluate the block.\\n\"\nmsgstr \"// 如果 `optional` 解构成功，则执行代码块。\\n\"\n\n#: src/flow_control/while_let.md:16 src/flow_control/while_let.md:42\nmsgid \"\\\"Greater than 9, quit!\\\"\"\nmsgstr \"\\\"大于 9，退出！\\\"\"\n\n#: src/flow_control/while_let.md:19 src/flow_control/while_let.md:45\nmsgid \"\\\"`i` is `{:?}`. Try again.\\\"\"\nmsgstr \"\\\"`i` 是 `{:?}`。再试一次。\\\"\"\n\n#: src/flow_control/while_let.md:22\nmsgid \"// ^ Requires 3 indentations!\\n\"\nmsgstr \"// ^ 需要 3 层缩进！\\n\"\n\n#: src/flow_control/while_let.md:24\nmsgid \"// Quit the loop when the destructure fails:\\n\"\nmsgstr \"// 当解构失败时退出循环：\\n\"\n\n#: src/flow_control/while_let.md:26\nmsgid \"// ^ Why should this be required? There must be a better way!\\n\"\nmsgstr \"// ^ 为什么需要这样？一定有更好的方法！\\n\"\n\n#: src/flow_control/while_let.md:31\nmsgid \"Using `while let` makes this sequence much nicer:\"\nmsgstr \"使用 `while let` 可以让这个序列更加简洁：\"\n\n#: src/flow_control/while_let.md:38\nmsgid \"\"\n\"// This reads: \\\"while `let` destructures `optional` into\\n\"\n\"    // `Some(i)`, evaluate the block (`{}`). Else `break`.\\n\"\nmsgstr \"\"\n\"// 这段代码的含义是：当 `let` 将 `optional` 解构为 `Some(i)` 时，\\n\"\n\"    // 执行代码块 `{}`，否则 `break`。\\n\"\n\n#: src/flow_control/while_let.md:48\nmsgid \"\"\n\"// ^ Less rightward drift and doesn't require\\n\"\n\"        // explicitly handling the failing case.\\n\"\nmsgstr \"// ^ 减少了代码缩进右移，无需显式处理失败情况\\n\"\n\n#: src/flow_control/while_let.md:51\nmsgid \"\"\n\"// ^ `if let` had additional optional `else`/`else if`\\n\"\n\"    // clauses. `while let` does not have these.\\n\"\nmsgstr \"\"\n\"// ^ `if let` 可以有额外的 `else`/`else if` 子句，`while let` 则没有。\\n\"\n\n#: src/flow_control/while_let.md:58\nmsgid \"\"\n\"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the \"\n\"[RFC](https://github.com/rust-lang/rfcs/pull/214)\"\nmsgstr \"\"\n\"[`enum`](../custom_types/enum.md)、[`Option`](../std/option.md) 和 [RFC]\"\n\"(https://github.com/rust-lang/rfcs/pull/214)\"\n\n#: src/fn.md:3\nmsgid \"\"\n\"Functions are declared using the `fn` keyword. Its arguments are type \"\n\"annotated, just like variables, and, if the function returns a value, the \"\n\"return type must be specified after an arrow `->`.\"\nmsgstr \"\"\n\"函数使用 `fn` 关键字声明。函数参数需要标注类型，就像变量一样。如果函数返回\"\n\"值，则必须在箭头 `->` 后指定返回类型。\"\n\n#: src/fn.md:7\nmsgid \"\"\n\"The final expression in the function will be used as return value. \"\n\"Alternatively, the `return` statement can be used to return a value earlier \"\n\"from within the function, even from inside loops or `if` statements.\"\nmsgstr \"\"\n\"函数的最后一个表达式将作为返回值。另外，可以使用 `return` 语句在函数内部提前\"\n\"返回值，甚至可以在循环或 `if` 语句内部使用。\"\n\n#: src/fn.md:11\nmsgid \"Let's rewrite FizzBuzz using functions!\"\nmsgstr \"让我们用函数重写 FizzBuzz 吧！\"\n\n#: src/fn.md:14\nmsgid \"\"\n\"// Unlike C/C++, there's no restriction on the order of function \"\n\"definitions\\n\"\nmsgstr \"// 与 C/C++ 不同，Rust 中函数定义的顺序没有限制\\n\"\n\n#: src/fn.md:16\nmsgid \"// We can use this function here, and define it somewhere later\\n\"\nmsgstr \"// 我们可以在这里使用函数，并在稍后的某处定义它\\n\"\n\n#: src/fn.md:19\nmsgid \"// Function that returns a boolean value\\n\"\nmsgstr \"// 返回布尔值的函数\\n\"\n\n#: src/fn.md:22\nmsgid \"// Corner case, early return\\n\"\nmsgstr \"// 特殊情况，提前返回\\n\"\n\n#: src/fn.md:27\nmsgid \"// This is an expression, the `return` keyword is not necessary here\\n\"\nmsgstr \"// 这是一个表达式，此处不需要 `return` 关键字\\n\"\n\n#: src/fn.md:30\nmsgid \"\"\n\"// Functions that \\\"don't\\\" return a value, actually return the unit type \"\n\"`()`\\n\"\nmsgstr \"// \\\"无返回值\\\"的函数实际上返回单元类型 `()`\\n\"\n\n#: src/fn.md:43\nmsgid \"\"\n\"// When a function returns `()`, the return type can be omitted from the\\n\"\n\"// signature\\n\"\nmsgstr \"// 当函数返回 `()` 时，可以在函数签名中省略返回类型\\n\"\n\n#: src/fn/methods.md:1\nmsgid \"Associated functions & Methods\"\nmsgstr \"关联函数和方法\"\n\n#: src/fn/methods.md:3\nmsgid \"\"\n\"Some functions are connected to a particular type. These come in two forms: \"\n\"associated functions, and methods. Associated functions are functions that \"\n\"are defined on a type generally, while methods are associated functions that \"\n\"are called on a particular instance of a type.\"\nmsgstr \"\"\n\"某些函数与特定类型相关联。这些函数有两种形式：关联函数和方法。关联函数是在类\"\n\"型上定义的函数，而方法是在类型的特定实例上调用的关联函数。\"\n\n#: src/fn/methods.md:13\nmsgid \"\"\n\"// Implementation block, all `Point` associated functions & methods go in \"\n\"here\\n\"\nmsgstr \"// 实现块，所有 `Point` 的关联函数和方法都在此处定义\\n\"\n\n#: src/fn/methods.md:16\nmsgid \"\"\n\"// This is an \\\"associated function\\\" because this function is associated \"\n\"with\\n\"\n\"    // a particular type, that is, Point.\\n\"\n\"    //\\n\"\n\"    // Associated functions don't need to be called with an instance.\\n\"\n\"    // These functions are generally used like constructors.\\n\"\nmsgstr \"\"\n\"// 这是一个\\\"关联函数\\\"，因为这个函数与特定类型 Point 相关联。\\n\"\n\"    //\\n\"\n\"    // 关联函数不需要通过实例来调用。\\n\"\n\"    // 这些函数通常用作构造函数。\\n\"\n\n#: src/fn/methods.md:25\nmsgid \"// Another associated function, taking two arguments:\\n\"\nmsgstr \"// 另一个接受两个参数的关联函数：\\n\"\n\n#: src/fn/methods.md:37\nmsgid \"\"\n\"// This is a method\\n\"\n\"    // `&self` is sugar for `self: &Self`, where `Self` is the type of the\\n\"\n\"    // caller object. In this case `Self` = `Rectangle`\\n\"\nmsgstr \"\"\n\"// 这是一个方法\\n\"\n\"    // `&self` 是 `self: &Self` 的语法糖，其中 `Self` 是调用者对象的类型。\\n\"\n\"    // 在这个例子中 `Self` = `Rectangle`\\n\"\n\n#: src/fn/methods.md:41\nmsgid \"// `self` gives access to the struct fields via the dot operator\\n\"\nmsgstr \"// `self` 通过点运算符访问结构体字段\\n\"\n\n#: src/fn/methods.md:45\nmsgid \"\"\n\"// `abs` is a `f64` method that returns the absolute value of the\\n\"\n\"        // caller\\n\"\nmsgstr \"// `abs` 是 `f64` 类型的方法，返回调用者的绝对值\\n\"\n\n#: src/fn/methods.md:57\nmsgid \"\"\n\"// This method requires the caller object to be mutable\\n\"\n\"    // `&mut self` desugars to `self: &mut Self`\\n\"\nmsgstr \"\"\n\"// 这个方法要求调用对象是可变的\\n\"\n\"    // `&mut self` 是 `self: &mut Self` 的语法糖\\n\"\n\n#: src/fn/methods.md:67\nmsgid \"// `Pair` owns resources: two heap allocated integers\\n\"\nmsgstr \"// `Pair` 拥有两个堆分配的整数资源\\n\"\n\n#: src/fn/methods.md:72\nmsgid \"\"\n\"// This method \\\"consumes\\\" the resources of the caller object\\n\"\n\"    // `self` desugars to `self: Self`\\n\"\nmsgstr \"\"\n\"// 这个方法会\\\"消耗\\\"调用对象的资源\\n\"\n\"    // `self` 是 `self: Self` 的语法糖\\n\"\n\n#: src/fn/methods.md:75\nmsgid \"// Destructure `self`\\n\"\nmsgstr \"// 解构 `self`\\n\"\n\n#: src/fn/methods.md:78\nmsgid \"\\\"Destroying Pair({}, {})\\\"\"\nmsgstr \"\\\"正在销毁 Pair({}, {})\\\"\"\n\n#: src/fn/methods.md:80\nmsgid \"// `first` and `second` go out of scope and get freed\\n\"\nmsgstr \"// `first` 和 `second` 超出作用域并被释放\\n\"\n\n#: src/fn/methods.md:86\nmsgid \"// Associated functions are called using double colons\\n\"\nmsgstr \"// 使用双冒号调用关联函数\\n\"\n\n#: src/fn/methods.md:91\nmsgid \"\"\n\"// Methods are called using the dot operator\\n\"\n\"    // Note that the first argument `&self` is implicitly passed, i.e.\\n\"\n\"    // `rectangle.perimeter()` === `Rectangle::perimeter(&rectangle)`\\n\"\nmsgstr \"\"\n\"// 使用点运算符调用方法\\n\"\n\"    // 注意，第一个参数 `&self` 是隐式传递的\\n\"\n\"    // 即 `rectangle.perimeter()` 等同于 `Rectangle::perimeter(&rectangle)`\\n\"\n\n#: src/fn/methods.md:94\nmsgid \"\\\"Rectangle perimeter: {}\\\"\"\nmsgstr \"\\\"矩形周长：{}\\\"\"\n\n#: src/fn/methods.md:95\nmsgid \"\\\"Rectangle area: {}\\\"\"\nmsgstr \"\\\"矩形面积：{}\\\"\"\n\n#: src/fn/methods.md:102\nmsgid \"\"\n\"// Error! `rectangle` is immutable, but this method requires a mutable\\n\"\n\"    // object\\n\"\n\"    //rectangle.translate(1.0, 0.0);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`rectangle` 是不可变的，但这个方法需要可变对象\\n\"\n\"    //rectangle.translate(1.0, 0.0);\\n\"\n\"    // TODO ^ 尝试取消这行的注释\\n\"\n\n#: src/fn/methods.md:107\nmsgid \"// Okay! Mutable objects can call mutable methods\\n\"\nmsgstr \"// 正确！可变对象可以调用可变方法\\n\"\n\n#: src/fn/methods.md:114\nmsgid \"\"\n\"// Error! Previous `destroy` call \\\"consumed\\\" `pair`\\n\"\n\"    //pair.destroy();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 报错！之前的 `destroy` 调用已经\\\"消耗\\\"了 `pair`\\n\"\n\"    //pair.destroy();\\n\"\n\"    // TODO ^ 尝试取消注释这一行\\n\"\n\n#: src/fn/closures.md:3\nmsgid \"\"\n\"Closures are functions that can capture the enclosing environment. For \"\n\"example, a closure that captures the `x` variable:\"\nmsgstr \"闭包是可以捕获周围环境的函数。例如，下面是一个捕获变量 `x` 的闭包：\"\n\n#: src/fn/closures.md:10\nmsgid \"\"\n\"The syntax and capabilities of closures make them very convenient for on the \"\n\"fly usage. Calling a closure is exactly like calling a function. However, \"\n\"both input and return types _can_ be inferred and input variable names \"\n\"_must_ be specified.\"\nmsgstr \"\"\n\"闭包的语法和功能使其非常适合即时使用。调用闭包与调用函数完全相同。不过，闭包\"\n\"的输入和返回类型**可以**被推断，而输入变量名**必须**指定。\"\n\n#: src/fn/closures.md:15\nmsgid \"Other characteristics of closures include:\"\nmsgstr \"闭包的其他特点包括：\"\n\n#: src/fn/closures.md:17\nmsgid \"using `||` instead of `()` around input variables.\"\nmsgstr \"使用 `||` 而不是 `()` 来包围输入变量。\"\n\n#: src/fn/closures.md:18\nmsgid \"\"\n\"optional body delimitation (`{}`) for a single line expression (mandatory \"\n\"otherwise).\"\nmsgstr \"单行表达式可省略函数体定界符（`{}`），其他情况则必须使用\"\n\n#: src/fn/closures.md:19\nmsgid \"the ability to capture the outer environment variables.\"\nmsgstr \"能够捕获外部环境的变量\"\n\n#: src/fn/closures.md:25\nmsgid \"\"\n\"// A regular function can't refer to variables in the enclosing environment\\n\"\n\"    //fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"    // TODO: uncomment the line above and see the compiler error. The \"\n\"compiler\\n\"\n\"    // suggests that we define a closure instead.\\n\"\nmsgstr \"\"\n\"// 常规函数无法引用外部环境的变量\\n\"\n\"    //fn function(i: i32) -> i32 { i + outer_var }\\n\"\n\"    // TODO：取消上面这行的注释，查看编译器错误\\n\"\n\"    // 编译器会建议我们定义一个闭包来替代\\n\"\n\n#: src/fn/closures.md:30\nmsgid \"\"\n\"// Closures are anonymous, here we are binding them to references.\\n\"\n\"    // Annotation is identical to function annotation but is optional\\n\"\n\"    // as are the `{}` wrapping the body. These nameless functions\\n\"\n\"    // are assigned to appropriately named variables.\\n\"\nmsgstr \"\"\n\"// 闭包是匿名的，这里我们将它们绑定到引用\\n\"\n\"    // 注解与函数注解相同，但是可选的\\n\"\n\"    // 包裹函数体的 `{}` 也是可选的\\n\"\n\"    // 这些无名函数被赋值给适当命名的变量\\n\"\n\n#: src/fn/closures.md:37\nmsgid \"// Call the closures.\\n\"\nmsgstr \"// 调用闭包\\n\"\n\n#: src/fn/closures.md:38\nmsgid \"\\\"closure_annotated: {}\\\"\"\nmsgstr \"\\\"closure_annotated：{}\\\"\"\n\n#: src/fn/closures.md:39\nmsgid \"\\\"closure_inferred: {}\\\"\"\nmsgstr \"\\\"closure_inferred：{}\\\"\"\n\n#: src/fn/closures.md:40\nmsgid \"\"\n\"// Once closure's type has been inferred, it cannot be inferred again with \"\n\"another type.\\n\"\n\"    //println!(\\\"cannot reuse closure_inferred with another type: {}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"    // TODO: uncomment the line above and see the compiler error.\\n\"\nmsgstr \"\"\n\"// 闭包类型一旦被推断，就不能再用其他类型重新推断。\\n\"\n\"    //println!(\\\"不能用其他类型重用 closure_inferred：{}\\\", \"\n\"closure_inferred(42i64));\\n\"\n\"    // TODO：取消上面这行的注释，观察编译器错误。\\n\"\n\n#: src/fn/closures.md:44\nmsgid \"\"\n\"// A closure taking no arguments which returns an `i32`.\\n\"\n\"    // The return type is inferred.\\n\"\nmsgstr \"\"\n\"// 一个无参数并返回 `i32` 的闭包。\\n\"\n\"    // 返回类型是推断的。\\n\"\n\n#: src/fn/closures.md:47\nmsgid \"\\\"closure returning one: {}\\\"\"\nmsgstr \"\\\"返回 1 的闭包：{}\\\"\"\n\n#: src/fn/closures/capture.md:3\nmsgid \"\"\n\"Closures are inherently flexible and will do what the functionality requires \"\n\"to make the closure work without annotation. This allows capturing to \"\n\"flexibly adapt to the use case, sometimes moving and sometimes borrowing. \"\n\"Closures can capture variables:\"\nmsgstr \"\"\n\"闭包本质上很灵活，无需注解就能根据功能需求自动适应。这使得捕获可以灵活地适应\"\n\"不同场景，有时移动，有时借用。闭包可以通过以下方式捕获变量：\"\n\n#: src/fn/closures/capture.md:8\nmsgid \"by reference: `&T`\"\nmsgstr \"通过引用：`&T`\"\n\n#: src/fn/closures/capture.md:9\nmsgid \"by mutable reference: `&mut T`\"\nmsgstr \"通过可变引用：`&mut T`\"\n\n#: src/fn/closures/capture.md:10\nmsgid \"by value: `T`\"\nmsgstr \"通过值：`T`\"\n\n#: src/fn/closures/capture.md:12\nmsgid \"\"\n\"They preferentially capture variables by reference and only go lower when \"\n\"required.\"\nmsgstr \"闭包优先通过引用捕获变量，仅在必要时才使用更底部的的捕获方式。\"\n\n#: src/fn/closures/capture.md:19\nmsgid \"\\\"green\\\"\"\nmsgstr \"\\\"green\\\"\"\n\n#: src/fn/closures/capture.md:21\nmsgid \"\"\n\"// A closure to print `color` which immediately borrows (`&`) `color` and\\n\"\n\"    // stores the borrow and closure in the `print` variable. It will \"\n\"remain\\n\"\n\"    // borrowed until `print` is used the last time.\\n\"\n\"    //\\n\"\n\"    // `println!` only requires arguments by immutable reference so it \"\n\"doesn't\\n\"\n\"    // impose anything more restrictive.\\n\"\nmsgstr \"\"\n\"// 打印 `color` 的闭包，立即借用（`&`）`color` 并\\n\"\n\"    // 将借用和闭包存储在 `print` 变量中。借用状态\\n\"\n\"    // 将持续到 `print` 最后一次使用。\\n\"\n\"    //\\n\"\n\"    // `println!` 只需要不可变引用参数，所以\\n\"\n\"    // 不会施加更多限制。\\n\"\n\n#: src/fn/closures/capture.md:27\nmsgid \"\\\"`color`: {}\\\"\"\nmsgstr \"\\\"`color`: {}\\\"\"\n\n#: src/fn/closures/capture.md:29\nmsgid \"// Call the closure using the borrow.\\n\"\nmsgstr \"// 使用借用调用闭包。\\n\"\n\n#: src/fn/closures/capture.md:32\nmsgid \"\"\n\"// `color` can be borrowed immutably again, because the closure only holds\\n\"\n\"    // an immutable reference to `color`.\\n\"\nmsgstr \"\"\n\"// `color` 可以再次被不可变借用，因为闭包只持有\\n\"\n\"    // `color` 的不可变引用。\\n\"\n\n#: src/fn/closures/capture.md:37\nmsgid \"// A move or reborrow is allowed after the final use of `print`\\n\"\nmsgstr \"// `print` 最后一次使用后，允许移动或重新借用\\n\"\n\n#: src/fn/closures/capture.md:42\nmsgid \"\"\n\"// A closure to increment `count` could take either `&mut count` or `count`\\n\"\n\"    // but `&mut count` is less restrictive so it takes that. Immediately\\n\"\n\"    // borrows `count`.\\n\"\n\"    //\\n\"\n\"    // A `mut` is required on `inc` because a `&mut` is stored inside. \"\n\"Thus,\\n\"\n\"    // calling the closure mutates `count` which requires a `mut`.\\n\"\nmsgstr \"\"\n\"// 增加 `count` 的闭包可以接受 `&mut count` 或 `count`，\\n\"\n\"    // 但 `&mut count` 限制更少，所以选择它。立即\\n\"\n\"    // 借用 `count`。\\n\"\n\"    //\\n\"\n\"    // `inc` 需要 `mut` 因为内部存储了 `&mut`。因此，\\n\"\n\"    // 调用闭包会修改 `count`，这需要 `mut`。\\n\"\n\n#: src/fn/closures/capture.md:50\nmsgid \"\\\"`count`: {}\\\"\"\nmsgstr \"\\\"`count`: {}\\\"\"\n\n#: src/fn/closures/capture.md:53\nmsgid \"// Call the closure using a mutable borrow.\\n\"\nmsgstr \"// 使用可变借用调用闭包。\\n\"\n\n#: src/fn/closures/capture.md:56\nmsgid \"\"\n\"// The closure still mutably borrows `count` because it is called later.\\n\"\n\"    // An attempt to reborrow will lead to an error.\\n\"\n\"    // let _reborrow = &count;\\n\"\n\"    // ^ TODO: try uncommenting this line.\\n\"\nmsgstr \"\"\n\"// 闭包仍然可变借用 `count`，因为它稍后会被调用。\\n\"\n\"    // 尝试重新借用会导致错误。\\n\"\n\"    // let _reborrow = &count; \\n\"\n\"    // ^ TODO：尝试取消注释这行。\\n\"\n\n#: src/fn/closures/capture.md:62\nmsgid \"\"\n\"// The closure no longer needs to borrow `&mut count`. Therefore, it is\\n\"\n\"    // possible to reborrow without an error\\n\"\nmsgstr \"\"\n\"// 闭包不再需要借用 `&mut count`。因此，\\n\"\n\"    // 可以在没有错误的情况下重新借用\\n\"\n\n#: src/fn/closures/capture.md:67\nmsgid \"// A non-copy type.\\n\"\nmsgstr \"// 不可复制类型。\\n\"\n\n#: src/fn/closures/capture.md:70\nmsgid \"\"\n\"// `mem::drop` requires `T` so this must take by value. A copy type\\n\"\n\"    // would copy into the closure leaving the original untouched.\\n\"\n\"    // A non-copy must move and so `movable` immediately moves into\\n\"\n\"    // the closure.\\n\"\nmsgstr \"\"\n\"// `mem::drop` 需要 `T`，所以这里必须通过值获取。可复制类型\\n\"\n\"    // 会被复制到闭包中，原始值保持不变。\\n\"\n\"    // 不可复制类型必须移动，所以 `movable` 立即移动到闭包中。\\n\"\n\n#: src/fn/closures/capture.md:75\nmsgid \"\\\"`movable`: {:?}\\\"\"\nmsgstr \"\\\"`movable`: {:?}\\\"\"\n\n#: src/fn/closures/capture.md:79\nmsgid \"// `consume` consumes the variable so this can only be called once.\\n\"\nmsgstr \"// `consume` 消耗了变量，所以只能调用一次。\\n\"\n\n#: src/fn/closures/capture.md:81\nmsgid \"\"\n\"// consume();\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\"// consume();\\n\"\n\"    // ^ TODO：尝试取消注释这行。\\n\"\n\n#: src/fn/closures/capture.md:86\nmsgid \"\"\n\"Using `move` before vertical pipes forces closure to take ownership of \"\n\"captured variables:\"\nmsgstr \"在竖线前使用 `move` 强制闭包获取捕获变量的所有权：\"\n\n#: src/fn/closures/capture.md:91\nmsgid \"// `Vec` has non-copy semantics.\\n\"\nmsgstr \"// `Vec` 是非复制语义。\\n\"\n\n#: src/fn/closures/capture.md:99\nmsgid \"\"\n\"// println!(\\\"There're {} elements in vec\\\", haystack.len());\\n\"\n\"    // ^ Uncommenting above line will result in compile-time error\\n\"\n\"    // because borrow checker doesn't allow re-using variable after it\\n\"\n\"    // has been moved.\\n\"\nmsgstr \"\"\n\"// println!(\\\"vec 中有 {} 个元素\\\", haystack.len());\\n\"\n\"    // ^ 取消上面这行的注释会导致编译时错误\\n\"\n\"    // 因为借用检查器不允许在变量被移动后重用。\\n\"\n\"    \\n\"\n\n#: src/fn/closures/capture.md:104\nmsgid \"\"\n\"// Removing `move` from closure's signature will cause closure\\n\"\n\"    // to borrow _haystack_ variable immutably, hence _haystack_ is still\\n\"\n\"    // available and uncommenting above line will not cause an error.\\n\"\nmsgstr \"\"\n\"// 从闭包签名中移除 `move` 将导致闭包\\n\"\n\"    // 不可变借用 _haystack_ 变量，因此 _haystack_ 仍可用，\\n\"\n\"    // 取消注释上面的行不会导致错误。\\n\"\n\n#: src/fn/closures/capture.md:112\nmsgid \"\"\n\"[`Box`](../../std/box.md) and [`std::mem::drop`](https://doc.rust-lang.org/\"\n\"std/mem/fn.drop.html)\"\nmsgstr \"\"\n\"[`Box`](../../std/box.md) 和 [`std::mem::drop`](https://doc.rust-lang.org/\"\n\"std/mem/fn.drop.html)\"\n\n#: src/fn/closures/input_parameters.md:3\nmsgid \"\"\n\"While Rust chooses how to capture variables on the fly mostly without type \"\n\"annotation, this ambiguity is not allowed when writing functions. When \"\n\"taking a closure as an input parameter, the closure's complete type must be \"\n\"annotated using one of a few `traits`, and they're determined by what the \"\n\"closure does with captured value. In order of decreasing restriction, they \"\n\"are:\"\nmsgstr \"\"\n\"Rust 通常能自动选择如何捕获变量，无需类型标注。但在编写函数时，这种模糊性是不\"\n\"允许的。当将闭包作为输入参数时，必须使用特定的 `trait` 来注解闭包的完整类型。\"\n\"这些 trait 由闭包对捕获值的处理方式决定。按限制程度从高到低排列如下：\"\n\n#: src/fn/closures/input_parameters.md:10\nmsgid \"`Fn`: the closure uses the captured value by reference (`&T`)\"\nmsgstr \"`Fn`：闭包通过引用使用捕获的值（`&T`）\"\n\n#: src/fn/closures/input_parameters.md:11\nmsgid \"\"\n\"`FnMut`: the closure uses the captured value by mutable reference (`&mut T`)\"\nmsgstr \"`FnMut`：闭包通过可变引用使用捕获的值（`&mut T`）\"\n\n#: src/fn/closures/input_parameters.md:12\nmsgid \"`FnOnce`: the closure uses the captured value by value (`T`)\"\nmsgstr \"`FnOnce`：闭包通过值使用捕获的值（`T`）\"\n\n#: src/fn/closures/input_parameters.md:14\nmsgid \"\"\n\"On a variable-by-variable basis, the compiler will capture variables in the \"\n\"least restrictive manner possible.\"\nmsgstr \"编译器会以尽可能最少限制的方式逐个捕获变量。\"\n\n#: src/fn/closures/input_parameters.md:17\nmsgid \"\"\n\"For instance, consider a parameter annotated as `FnOnce`. This specifies \"\n\"that the closure _may_ capture by `&T`, `&mut T`, or `T`, but the compiler \"\n\"will ultimately choose based on how the captured variables are used in the \"\n\"closure.\"\nmsgstr \"\"\n\"例如，考虑一个注解为 `FnOnce` 的参数。这表示闭包**可能**通过 `&T`、`&mut T` \"\n\"或 `T` 进行捕获，但编译器最终会根据捕获变量在闭包中的使用方式来决定。\"\n\n#: src/fn/closures/input_parameters.md:22\nmsgid \"\"\n\"This is because if a move is possible, then any type of borrow should also \"\n\"be possible. Note that the reverse is not true. If the parameter is \"\n\"annotated as `Fn`, then capturing variables by `&mut T` or `T` are not \"\n\"allowed. However, `&T` is allowed.\"\nmsgstr \"\"\n\"这是因为如果可以移动，那么任何类型的借用也应该是可能的。注意反过来并不成立。\"\n\"如果参数被注解为 `Fn`，那么通过 `&mut T` 或 `T` 捕获变量是不允许的。但 `&T` \"\n\"是允许的。\"\n\n#: src/fn/closures/input_parameters.md:27\nmsgid \"\"\n\"In the following example, try swapping the usage of `Fn`, `FnMut`, and \"\n\"`FnOnce` to see what happens:\"\nmsgstr \"\"\n\"在下面的例子中，尝试交换 `Fn`、`FnMut` 和 `FnOnce` 的用法，看看会发生什么：\"\n\n#: src/fn/closures/input_parameters.md:31\nmsgid \"\"\n\"// A function which takes a closure as an argument and calls it.\\n\"\n\"// <F> denotes that F is a \\\"Generic type parameter\\\"\\n\"\nmsgstr \"\"\n\"// 这个函数接受一个闭包作为参数并调用它\\n\"\n\"// <F> 表示 F 是一个\\\"泛型类型参数\\\"\\n\"\n\n#: src/fn/closures/input_parameters.md:34\nmsgid \"// The closure takes no input and returns nothing.\\n\"\nmsgstr \"// 这个闭包不接受输入也不返回任何值\\n\"\n\n#: src/fn/closures/input_parameters.md:36\nmsgid \"// ^ TODO: Try changing this to `Fn` or `FnMut`.\\n\"\nmsgstr \"// ^ TODO：试着将其改为 `Fn` 或 `FnMut`\\n\"\n\n#: src/fn/closures/input_parameters.md:40\nmsgid \"// A function which takes a closure and returns an `i32`.\\n\"\nmsgstr \"// 这个函数接受一个闭包并返回 `i32`\\n\"\n\n#: src/fn/closures/input_parameters.md:43\nmsgid \"// The closure takes an `i32` and returns an `i32`.\\n\"\nmsgstr \"// 这个闭包接受一个 `i32` 并返回一个 `i32`\\n\"\n\n#: src/fn/closures/input_parameters.md:53\nmsgid \"\"\n\"// A non-copy type.\\n\"\n\"    // `to_owned` creates owned data from borrowed one\\n\"\nmsgstr \"\"\n\"// 一个非复制类型\\n\"\n\"    // `to_owned` 从借用的数据创建拥有所有权的数据\\n\"\n\n#: src/fn/closures/input_parameters.md:55\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"goodbye\\\"\"\n\n#: src/fn/closures/input_parameters.md:57\nmsgid \"\"\n\"// Capture 2 variables: `greeting` by reference and\\n\"\n\"    // `farewell` by value.\\n\"\nmsgstr \"\"\n\"// 捕获两个变量：通过引用捕获 `greeting`，\\n\"\n\"    // 通过值捕获 `farewell`\\n\"\n\n#: src/fn/closures/input_parameters.md:60\nmsgid \"// `greeting` is by reference: requires `Fn`.\\n\"\nmsgstr \"// `greeting` 是通过引用捕获的：需要 `Fn`\\n\"\n\n#: src/fn/closures/input_parameters.md:61\nmsgid \"\\\"I said {}.\\\"\"\nmsgstr \"\\\"我说{}。\\\"\"\n\n#: src/fn/closures/input_parameters.md:63\nmsgid \"\"\n\"// Mutation forces `farewell` to be captured by\\n\"\n\"        // mutable reference. Now requires `FnMut`.\\n\"\nmsgstr \"\"\n\"// 修改强制 `farewell` 通过可变引用捕获\\n\"\n\"        // 现在需要 `FnMut`\\n\"\n\n#: src/fn/closures/input_parameters.md:65\nmsgid \"\\\"!!!\\\"\"\nmsgstr \"\\\"！！！\\\"\"\n\n#: src/fn/closures/input_parameters.md:66\nmsgid \"\\\"Then I screamed {}.\\\"\"\nmsgstr \"\\\"然后我喊{}。\\\"\"\n\n#: src/fn/closures/input_parameters.md:67\nmsgid \"\\\"Now I can sleep. zzzzz\\\"\"\nmsgstr \"\\\"现在我可以睡觉了。呼呼\\\"\"\n\n#: src/fn/closures/input_parameters.md:69\nmsgid \"\"\n\"// Manually calling drop forces `farewell` to\\n\"\n\"        // be captured by value. Now requires `FnOnce`.\\n\"\nmsgstr \"\"\n\"// 手动调用 drop 强制 `farewell` 通过值捕获\\n\"\n\"        // 现在需要 `FnOnce`\\n\"\n\n#: src/fn/closures/input_parameters.md:74\nmsgid \"// Call the function which applies the closure.\\n\"\nmsgstr \"// 调用应用闭包的函数\\n\"\n\n#: src/fn/closures/input_parameters.md:77\nmsgid \"// `double` satisfies `apply_to_3`'s trait bound\\n\"\nmsgstr \"// `double` 满足 `apply_to_3` 的 trait 约束\\n\"\n\n#: src/fn/closures/input_parameters.md:80\nmsgid \"\\\"3 doubled: {}\\\"\"\nmsgstr \"\\\"3 的两倍是：{}\\\"\"\n\n#: src/fn/closures/input_parameters.md:86\nmsgid \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html), [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md), \"\n\"[where](../../generics/where.md) and [`FnOnce`](https://doc.rust-lang.org/\"\n\"std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[`std::mem::drop`](https://doc.rust-lang.org/std/mem/fn.drop.html)、[`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html)、[`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html)、[泛型](../../generics.md)、\"\n\"[where](../../generics/where.md) 和 [`FnOnce`](https://doc.rust-lang.org/std/\"\n\"ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/anonymity.md:3\nmsgid \"\"\n\"Closures succinctly capture variables from enclosing scopes. Does this have \"\n\"any consequences? It surely does. Observe how using a closure as a function \"\n\"parameter requires [generics](../../generics.md), which is necessary because \"\n\"of how they are defined:\"\nmsgstr \"\"\n\"闭包能简洁地从外部作用域捕获变量。这会有什么影响吗？当然会有。注意观察如何将\"\n\"闭包作为函数参数使用时需要[泛型](../../generics.md)，这是由于闭包的定义方式所\"\n\"决定的：\"\n\n#: src/fn/closures/anonymity.md:9\nmsgid \"// `F` must be generic.\\n\"\nmsgstr \"// `F` 必须是泛型\\n\"\n\n#: src/fn/closures/anonymity.md:16\nmsgid \"\"\n\"When a closure is defined, the compiler implicitly creates a new anonymous \"\n\"structure to store the captured variables inside, meanwhile implementing the \"\n\"functionality via one of the `traits`: `Fn`, `FnMut`, or `FnOnce` for this \"\n\"unknown type. This type is assigned to the variable which is stored until \"\n\"calling.\"\nmsgstr \"\"\n\"当定义一个闭包时，编译器会隐式创建一个新的匿名结构来存储内部捕获的变量，同时\"\n\"通过 `Fn`、`FnMut` 或 `FnOnce` 这些 `trait` 之一为这个未知类型实现功能。这个\"\n\"类型被赋给变量并存储，直到被调用。\"\n\n#: src/fn/closures/anonymity.md:22\nmsgid \"\"\n\"Since this new type is of unknown type, any usage in a function will require \"\n\"generics. However, an unbounded type parameter `<T>` would still be \"\n\"ambiguous and not be allowed. Thus, bounding by one of the `traits`: `Fn`, \"\n\"`FnMut`, or `FnOnce` (which it implements) is sufficient to specify its type.\"\nmsgstr \"\"\n\"由于这个新类型是未知类型，在函数中使用时就需要泛型。然而，一个无界的类型参数 \"\n\"`<T>` 仍然会是模糊的，不被允许。因此，通过 `Fn`、`FnMut` 或 `FnOnce` 这些 \"\n\"`trait` 之一（它实现的）来约束就足以指定其类型。\"\n\n#: src/fn/closures/anonymity.md:28\nmsgid \"\"\n\"// `F` must implement `Fn` for a closure which takes no\\n\"\n\"// inputs and returns nothing - exactly what is required\\n\"\n\"// for `print`.\\n\"\nmsgstr \"\"\n\"// `F` 必须实现 `Fn` 用于一个不接受输入且不返回任何内容的闭包\\n\"\n\"// - 这正是 `print` 所需要的\\n\"\n\n#: src/fn/closures/anonymity.md:39\nmsgid \"\"\n\"// Capture `x` into an anonymous type and implement\\n\"\n\"    // `Fn` for it. Store it in `print`.\\n\"\nmsgstr \"\"\n\"// 将 `x` 捕获到一个匿名类型中并为其实现 `Fn`\\n\"\n\"    // 将其存储在 `print` 中\\n\"\n\n#: src/fn/closures/anonymity.md:49\nmsgid \"\"\n\"[A thorough analysis](https://huonw.github.io/blog/2015/05/finding-closure-\"\n\"in-rust/), [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[深入分析](https://huonw.github.io/blog/2015/05/finding-closure-in-rust/)、\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html)、[`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html) 和 [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\n\n#: src/fn/closures/input_functions.md:3\nmsgid \"\"\n\"Since closures may be used as arguments, you might wonder if the same can be \"\n\"said about functions. And indeed they can! If you declare a function that \"\n\"takes a closure as parameter, then any function that satisfies the trait \"\n\"bound of that closure can be passed as a parameter.\"\nmsgstr \"\"\n\"既然闭包可以作为参数使用，你可能会想知道函数是否也可以这样。确实可以！如果你\"\n\"声明一个函数，它接受一个闭包作为参数，那么任何满足该闭包 trait 约束的函数都可\"\n\"以作为参数传递。\"\n\n#: src/fn/closures/input_functions.md:9\nmsgid \"\"\n\"// Define a function which takes a generic `F` argument\\n\"\n\"// bounded by `Fn`, and calls it\\n\"\nmsgstr \"// 定义一个函数，它接受一个由 `Fn` 约束的泛型参数 `F`，并调用它\\n\"\n\n#: src/fn/closures/input_functions.md:14\nmsgid \"// Define a wrapper function satisfying the `Fn` bound\\n\"\nmsgstr \"// 定义一个满足 `Fn` 约束的包装函数\\n\"\n\n#: src/fn/closures/input_functions.md:17\nmsgid \"\\\"I'm a function!\\\"\"\nmsgstr \"\\\"我是函数！\\\"\"\n\n#: src/fn/closures/input_functions.md:21\nmsgid \"// Define a closure satisfying the `Fn` bound\\n\"\nmsgstr \"// 定义一个满足 `Fn` 约束的闭包\\n\"\n\n#: src/fn/closures/input_functions.md:22\nmsgid \"\\\"I'm a closure!\\\"\"\nmsgstr \"\\\"我是闭包！\\\"\"\n\n#: src/fn/closures/input_functions.md:29\nmsgid \"\"\n\"As an additional note, the `Fn`, `FnMut`, and `FnOnce` `traits` dictate how \"\n\"a closure captures variables from the enclosing scope.\"\nmsgstr \"\"\n\"另外需要注意的是，`Fn`、`FnMut` 和 `FnOnce` 这些 trait 决定了闭包如何从外部作\"\n\"用域捕获变量。\"\n\n#: src/fn/closures/input_functions.md:34\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`](https://doc.rust-\"\n\"lang.org/std/ops/trait.FnOnce.html)\"\nmsgstr \"\"\n\"[`Fn`]、[`FnMut`] 和 [`FnOnce`]\\n\"\n\"\\n\"\n\"[`Fn`]: https://doc.rust-lang.org/std/ops/trait.Fn.html\\n\"\n\"[`FnMut`]: https://doc.rust-lang.org/std/ops/trait.FnMut.html\\n\"\n\"[`FnOnce`]: https://doc.rust-lang.org/std/ops/trait.FnOnce.html\"\n\n#: src/fn/closures/output_parameters.md:3\nmsgid \"\"\n\"Closures as input parameters are possible, so returning closures as output \"\n\"parameters should also be possible. However, anonymous closure types are, by \"\n\"definition, unknown, so we have to use `impl Trait` to return them.\"\nmsgstr \"\"\n\"既然闭包可以作为输入参数，那么将闭包作为输出参数返回也应该是可行的。然而，匿\"\n\"名闭包类型本质上是未知的，因此我们必须使用 `impl Trait` 来返回它们。\"\n\n#: src/fn/closures/output_parameters.md:8\nmsgid \"The valid traits for returning a closure are:\"\nmsgstr \"可用于返回闭包的有效 trait 包括：\"\n\n#: src/fn/closures/output_parameters.md:10\nmsgid \"`Fn`\"\nmsgstr \"`Fn`\"\n\n#: src/fn/closures/output_parameters.md:11\nmsgid \"`FnMut`\"\nmsgstr \"`FnMut`\"\n\n#: src/fn/closures/output_parameters.md:12\nmsgid \"`FnOnce`\"\nmsgstr \"`FnOnce`\"\n\n#: src/fn/closures/output_parameters.md:14\nmsgid \"\"\n\"Beyond this, the `move` keyword must be used, which signals that all \"\n\"captures occur by value. This is required because any captures by reference \"\n\"would be dropped as soon as the function exited, leaving invalid references \"\n\"in the closure.\"\nmsgstr \"\"\n\"此外，必须使用 `move` 关键字，它表示所有捕获都是按值进行的。这是必要的，因为\"\n\"任何通过引用捕获的变量都会在函数退出时被丢弃，从而在闭包中留下无效的引用。\"\n\n#: src/fn/closures/output_parameters.md:21\nmsgid \"\\\"Fn\\\"\"\nmsgstr \"\\\"Fn\\\"\"\n\n#: src/fn/closures/output_parameters.md:23\n#: src/fn/closures/output_parameters.md:29\n#: src/fn/closures/output_parameters.md:35\nmsgid \"\\\"This is a: {}\\\"\"\nmsgstr \"\\\"这是一个：{}\\\"\"\n\n#: src/fn/closures/output_parameters.md:27\nmsgid \"\\\"FnMut\\\"\"\nmsgstr \"\\\"FnMut\\\"\"\n\n#: src/fn/closures/output_parameters.md:33\nmsgid \"\\\"FnOnce\\\"\"\nmsgstr \"\\\"FnOnce\\\"\"\n\n#: src/fn/closures/output_parameters.md:51\nmsgid \"\"\n\"[`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), [`FnMut`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnMut.html), [Generics](../../generics.md) \"\n\"and [impl Trait](../../trait/impl_trait.md).\"\nmsgstr \"\"\n\"[`Fn`]、[`FnMut`]、[泛型]和 [impl Trait]\\n\"\n\"\\n\"\n\"[`Fn`]: https://doc.rust-lang.org/std/ops/trait.Fn.html\\n\"\n\"[`FnMut`]: https://doc.rust-lang.org/std/ops/trait.FnMut.html\\n\"\n\"[泛型]: ../../generics.md\\n\"\n\"[impl Trait]: ../../trait/impl_trait.md\"\n\n#: src/fn/closures/closure_examples.md:3\nmsgid \"\"\n\"This section contains a few examples of using closures from the `std` \"\n\"library.\"\nmsgstr \"本节包含一些使用 `std` 库中闭包的示例。\"\n\n#: src/fn/closures/closure_examples/iter_any.md:3\nmsgid \"\"\n\"`Iterator::any` is a function which when passed an iterator, will return \"\n\"`true` if any element satisfies the predicate. Otherwise `false`. Its \"\n\"signature:\"\nmsgstr \"\"\n\"`Iterator::any` 是一个函数，它接受一个迭代器作为参数。如果任何元素满足给定的\"\n\"条件，则返回 `true`，否则返回 `false`。其签名如下：\"\n\n#: src/fn/closures/closure_examples/iter_any.md:9\n#: src/fn/closures/closure_examples/iter_find.md:9\nmsgid \"// The type being iterated over.\\n\"\nmsgstr \"// 被迭代的类型\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:12\nmsgid \"\"\n\"// `any` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\"// `any` 接受 `&mut self`，意味着调用者可能被借用\\n\"\n\"    // 和修改，但不会被消耗\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `Self::Item` states it takes\\n\"\n\"        // arguments to the closure by value.\\n\"\nmsgstr \"\"\n\"// `FnMut` 表示任何捕获的变量最多只能被修改，不能被消耗\\n\"\n\"        // `Self::Item` 表示它通过值将参数传递给闭包\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:27\nmsgid \"// `iter()` for vecs yields `&i32`. Destructure to `i32`.\\n\"\nmsgstr \"// 对 vec 使用 `iter()` 产生 `&i32`，解构为 `i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:28\nmsgid \"\\\"2 in vec1: {}\\\"\"\nmsgstr \"\\\"2 在 vec1 中：{}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:29\nmsgid \"// `into_iter()` for vecs yields `i32`. No destructuring required.\\n\"\nmsgstr \"// 对 vec 使用 `into_iter()` 产生 `i32`，无需解构\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:30\nmsgid \"\\\"2 in vec2: {}\\\"\"\nmsgstr \"\\\"2 在 vec2 中：{}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:32\nmsgid \"\"\n\"// `iter()` only borrows `vec1` and its elements, so they can be used again\\n\"\nmsgstr \"// `iter()` 只借用 `vec1` 及其元素，所以它们可以再次使用\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:33\nmsgid \"\\\"vec1 len: {}\\\"\"\nmsgstr \"\\\"vec1 长度：{}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:34\nmsgid \"\\\"First element of vec1 is: {}\\\"\"\nmsgstr \"\\\"vec1 的第一个元素是：{}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:35\nmsgid \"\"\n\"// `into_iter()` does move `vec2` and its elements, so they cannot be used \"\n\"again\\n\"\n\"    // println!(\\\"First element of vec2 is: {}\\\", vec2[0]);\\n\"\n\"    // println!(\\\"vec2 len: {}\\\", vec2.len());\\n\"\n\"    // TODO: uncomment two lines above and see compiler errors.\\n\"\nmsgstr \"\"\n\"// `into_iter()` 会移动 `vec2` 及其元素，所以它们不能再次使用\\n\"\n\"    // println!(\\\"vec2 的第一个元素是：{}\\\", vec2[0]);\\n\"\n\"    // println!(\\\"vec2 长度：{}\\\", vec2.len());\\n\"\n\"    // TODO：取消上面两行的注释，观察编译器错误\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:43\nmsgid \"// `iter()` for arrays yields `&i32`.\\n\"\nmsgstr \"// 对数组使用 `iter()` 产生 `&i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:44\nmsgid \"\\\"2 in array1: {}\\\"\"\nmsgstr \"\\\"2 在 array1 中：{}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:45\nmsgid \"// `into_iter()` for arrays yields `i32`.\\n\"\nmsgstr \"// 对数组使用 `into_iter()` 产生 `i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_any.md:46\nmsgid \"\\\"2 in array2: {}\\\"\"\nmsgstr \"\\\"2 在 array2 中：{}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_any.md:52\nmsgid \"\"\n\"[`std::iter::Iterator::any`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.any)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::any`]\\n\"\n\"\\n\"\n\"[`std::iter::Iterator::any`]: https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.any\"\n\n#: src/fn/closures/closure_examples/iter_find.md:3\nmsgid \"\"\n\"`Iterator::find` is a function which iterates over an iterator and searches \"\n\"for the first value which satisfies some condition. If none of the values \"\n\"satisfy the condition, it returns `None`. Its signature:\"\nmsgstr \"\"\n\"`Iterator::find` 是一个函数，它遍历迭代器并搜索满足特定条件的第一个值。如果没\"\n\"有值满足条件，则返回 `None`。其签名如下：\"\n\n#: src/fn/closures/closure_examples/iter_find.md:12\nmsgid \"\"\n\"// `find` takes `&mut self` meaning the caller may be borrowed\\n\"\n\"    // and modified, but not consumed.\\n\"\nmsgstr \"\"\n\"// `find` 接受 `&mut self`，这意味着调用者可能被借用\\n\"\n\"    // 和修改，但不会被消耗。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:15\nmsgid \"\"\n\"// `FnMut` meaning any captured variable may at most be\\n\"\n\"        // modified, not consumed. `&Self::Item` states it takes\\n\"\n\"        // arguments to the closure by reference.\\n\"\nmsgstr \"\"\n\"// `FnMut` 表示任何捕获的变量最多只能被修改，不能被消耗。\\n\"\n\"        // `&Self::Item` 表示它通过引用将参数传递给闭包。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:27\nmsgid \"// `iter()` for vecs yields `&i32`.\\n\"\nmsgstr \"// 对 vec 使用 `iter()` 会产生 `&i32`。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:29\nmsgid \"// `into_iter()` for vecs yields `i32`.\\n\"\nmsgstr \"// 对 vec 使用 `into_iter()` 会产生 `i32`。\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:32\nmsgid \"\"\n\"// `iter()` for vecs yields `&i32`, and we want to reference one of its\\n\"\n\"    // items, so we have to destructure `&&i32` to `i32`\\n\"\nmsgstr \"\"\n\"// 对 vec 使用 `iter()` 会产生 `&i32`，而我们想要引用其中的一个\\n\"\n\"    // 元素，所以我们必须将 `&&i32` 解构为 `i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:34\nmsgid \"\\\"Find 2 in vec1: {:?}\\\"\"\nmsgstr \"\\\"在 vec1 中查找 2：{:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:35\nmsgid \"\"\n\"// `into_iter()` for vecs yields `i32`, and we want to reference one of\\n\"\n\"    // its items, so we have to destructure `&i32` to `i32`\\n\"\nmsgstr \"\"\n\"// 对 vec 使用 `into_iter()` 会产生 `i32`，而我们想要引用其中的\\n\"\n\"    // 一个元素，所以我们必须将 `&i32` 解构为 `i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:37\nmsgid \"\\\"Find 2 in vec2: {:?}\\\"\"\nmsgstr \"\\\"在 vec2 中查找 2：{:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:42\nmsgid \"// `iter()` for arrays yields `&&i32`\\n\"\nmsgstr \"// 对数组使用 `iter()` 会产生 `&&i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:43\nmsgid \"\\\"Find 2 in array1: {:?}\\\"\"\nmsgstr \"\\\"在 array1 中查找 2：{:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:44\nmsgid \"// `into_iter()` for arrays yields `&i32`\\n\"\nmsgstr \"// 对数组使用 `into_iter()` 会产生 `&i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:45\nmsgid \"\\\"Find 2 in array2: {:?}\\\"\"\nmsgstr \"\\\"在 array2 中查找 2：{:?}\\\"\"\n\n#: src/fn/closures/closure_examples/iter_find.md:49\nmsgid \"\"\n\"`Iterator::find` gives you a reference to the item. But if you want the \"\n\"_index_ of the item, use `Iterator::position`.\"\nmsgstr \"\"\n\"`Iterator::find` 返回元素的引用。如果需获取元素的**索引**，则使用 \"\n\"`Iterator::position`。\"\n\n#: src/fn/closures/closure_examples/iter_find.md:56\nmsgid \"\"\n\"// `iter()` for vecs yields `&i32` and `position()` does not take a \"\n\"reference, so\\n\"\n\"    // we have to destructure `&i32` to `i32`\\n\"\nmsgstr \"\"\n\"// 对 vec 使用 `iter()` 会产生 `&i32`，而 `position()` 不接受引用，所以\\n\"\n\"    // 我们必须将 `&i32` 解构为 `i32`\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:61\nmsgid \"\"\n\"// `into_iter()` for vecs yields `i32` and `position()` does not take a \"\n\"reference, so\\n\"\n\"    // we do not have to destructure\\n\"\nmsgstr \"\"\n\"// 对 vec 使用 `into_iter()` 会产生 `i32`，而 `position()` 不接受引用，所以\\n\"\n\"    // 我们不需要进行解构\\n\"\n\n#: src/fn/closures/closure_examples/iter_find.md:70\nmsgid \"\"\n\"[`std::iter::Iterator::find`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::find`]\\n\"\n\"\\n\"\n\"[`std::iter::Iterator::find`]: https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find\"\n\n#: src/fn/closures/closure_examples/iter_find.md:72\nmsgid \"\"\n\"[`std::iter::Iterator::find_map`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find_map)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::find_map`]\\n\"\n\"\\n\"\n\"[`std::iter::Iterator::find_map`]: https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.find_map\"\n\n#: src/fn/closures/closure_examples/iter_find.md:74\nmsgid \"\"\n\"[`std::iter::Iterator::position`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.position)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::position`]\\n\"\n\"\\n\"\n\"[`std::iter::Iterator::position`]: https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.position\"\n\n#: src/fn/closures/closure_examples/iter_find.md:76\nmsgid \"\"\n\"[`std::iter::Iterator::rposition`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.rposition)\"\nmsgstr \"\"\n\"[`std::iter::Iterator::rposition`]\\n\"\n\"\\n\"\n\"[`std::iter::Iterator::rposition`]: https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html#method.rposition\"\n\n#: src/fn/hof.md:3\nmsgid \"\"\n\"Rust provides Higher Order Functions (HOF). These are functions that take \"\n\"one or more functions and/or produce a more useful function. HOFs and lazy \"\n\"iterators give Rust its functional flavor.\"\nmsgstr \"\"\n\"Rust 提供了高阶函数（Higher Order Functions，HOF）。这些函数接受一个或多个函\"\n\"数作为参数，并/或产生一个更有用的函数。HOF 和惰性迭代器赋予了 Rust 函数式编程\"\n\"的特性。\"\n\n#: src/fn/hof.md:13\nmsgid \"\\\"Find the sum of all the numbers with odd squares under 1000\\\"\"\nmsgstr \"\\\"找出所有平方为奇数且小于 1000 的数字之和\\\"\"\n\n#: src/fn/hof.md:16\nmsgid \"\"\n\"// Imperative approach\\n\"\n\"    // Declare accumulator variable\\n\"\nmsgstr \"\"\n\"// 命令式方法\\n\"\n\"    // 声明累加器变量\\n\"\n\n#: src/fn/hof.md:19\nmsgid \"// Iterate: 0, 1, 2, ... to infinity\\n\"\nmsgstr \"// 迭代：从 0, 1, 2, ... 到无穷大\\n\"\n\n#: src/fn/hof.md:21\nmsgid \"// Square the number\\n\"\nmsgstr \"// 计算数字的平方\\n\"\n\n#: src/fn/hof.md:25\nmsgid \"// Break loop if exceeded the upper limit\\n\"\nmsgstr \"// 如果超过上限则跳出循环\\n\"\n\n#: src/fn/hof.md:28\nmsgid \"// Accumulate value, if it's odd\\n\"\nmsgstr \"// 如果是奇数，则累加值\\n\"\n\n#: src/fn/hof.md:32\nmsgid \"\\\"imperative style: {}\\\"\"\nmsgstr \"\\\"命令式风格：{}\\\"\"\n\n#: src/fn/hof.md:34\nmsgid \"// Functional approach\\n\"\nmsgstr \"// 函数式方法\\n\"\n\n#: src/fn/hof.md:36\nmsgid \"// All natural numbers squared\\n\"\nmsgstr \"// 所有自然数的平方\\n\"\n\n#: src/fn/hof.md:37\nmsgid \"// Below upper limit\\n\"\nmsgstr \"// 小于上限\\n\"\n\n#: src/fn/hof.md:38\nmsgid \"// That are odd\\n\"\nmsgstr \"// 筛选奇数\\n\"\n\n#: src/fn/hof.md:39\nmsgid \"// Sum them\\n\"\nmsgstr \"// 求和\\n\"\n\n#: src/fn/hof.md:40\nmsgid \"\\\"functional style: {}\\\"\"\nmsgstr \"\\\"函数式风格：{}\\\"\"\n\n#: src/fn/hof.md:44\nmsgid \"\"\n\"[Option](https://doc.rust-lang.org/core/option/enum.Option.html) and \"\n\"[Iterator](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"implement their fair share of HOFs.\"\nmsgstr \"\"\n\"[Option] 和 [Iterator] 实现了相当多的高阶函数。\\n\"\n\"\\n\"\n\"[Option]: https://doc.rust-lang.org/core/option/enum.Option.html\\n\"\n\"[Iterator]: https://doc.rust-lang.org/core/iter/trait.Iterator.html\"\n\n#: src/fn/diverging.md:3\nmsgid \"\"\n\"Diverging functions never return. They are marked using `!`, which is an \"\n\"empty type.\"\nmsgstr \"发散函数永不返回。它们使用 `!` 标记，这是一个空类型。\"\n\n#: src/fn/diverging.md:7 src/fn/diverging.md:35\nmsgid \"\\\"This call never returns.\\\"\"\nmsgstr \"\\\"此调用永不返回。\\\"\"\n\n#: src/fn/diverging.md:11\nmsgid \"\"\n\"As opposed to all the other types, this one cannot be instantiated, because \"\n\"the set of all possible values this type can have is empty. Note that, it is \"\n\"different from the `()` type, which has exactly one possible value.\"\nmsgstr \"\"\n\"与所有其他类型相反，这个类型不能被实例化，因为这个类型可能拥有的所有可能值的\"\n\"集合是空的。注意，它与 `()` 类型不同，后者恰好有一个可能的值。\"\n\n#: src/fn/diverging.md:15\nmsgid \"\"\n\"For example, this function returns as usual, although there is no \"\n\"information in the return value.\"\nmsgstr \"例如，这个函数像往常一样返回，尽管返回值中没有任何信息。\"\n\n#: src/fn/diverging.md:25\nmsgid \"\\\"This function returns and you can see this line.\\\"\"\nmsgstr \"\\\"这个函数返回了，你可以看到这一行。\\\"\"\n\n#: src/fn/diverging.md:29\nmsgid \"\"\n\"As opposed to this function, which will never return the control back to the \"\n\"caller.\"\nmsgstr \"与之相对的是这个函数，它永远不会将控制权返回给调用者。\"\n\n#: src/fn/diverging.md:36\nmsgid \"\\\"You will never see this line!\\\"\"\nmsgstr \"\\\"你永远不会看到这一行！\\\"\"\n\n#: src/fn/diverging.md:40\nmsgid \"\"\n\"Although this might seem like an abstract concept, it is actually very \"\n\"useful and often handy. The main advantage of this type is that it can be \"\n\"cast to any other type, making it versatile in situations where an exact \"\n\"type is required, such as in match branches. This flexibility allows us to \"\n\"write code like this:\"\nmsgstr \"\"\n\"虽然这看起来像是一个抽象概念，但它实际上非常有用且经常派上用场。这种类型的主\"\n\"要优势是它可以被转换为任何其他类型，这使得它在需要精确类型的情况下非常灵活，\"\n\"比如在 match 分支中。这种灵活性允许我们编写如下代码：\"\n\n#: src/fn/diverging.md:50\nmsgid \"\"\n\"// Notice that the return type of this match expression must be u32\\n\"\n\"            // because of the type of the \\\"addition\\\" variable.\\n\"\nmsgstr \"\"\n\"// 注意这个 match 表达式的返回类型必须是 u32，\\n\"\n\"            // 因为 \\\"addition\\\" 变量的类型是 u32。\\n\"\n\n#: src/fn/diverging.md:53\nmsgid \"// The \\\"i\\\" variable is of type u32, which is perfectly fine.\\n\"\nmsgstr \"// \\\"i\\\" 变量的类型是 u32，这完全没问题。\\n\"\n\n#: src/fn/diverging.md:55\nmsgid \"\"\n\"// On the other hand, the \\\"continue\\\" expression does not return\\n\"\n\"                // u32, but it is still fine, because it never returns and \"\n\"therefore\\n\"\n\"                // does not violate the type requirements of the match \"\n\"expression.\\n\"\nmsgstr \"\"\n\"// 另一方面，\\\"continue\\\" 表达式不返回 u32，\\n\"\n\"                // 但这仍然可以，因为它永远不会返回，\\n\"\n\"                // 因此不违反 match 表达式的类型要求。\\n\"\n\n#: src/fn/diverging.md:64\nmsgid \"\\\"Sum of odd numbers up to 9 (excluding): {}\\\"\"\nmsgstr \"\\\"9 以下（不包括 9）的奇数之和：{}\\\"\"\n\n#: src/fn/diverging.md:68\nmsgid \"\"\n\"It is also the return type of functions that loop forever (e.g. `loop {}`) \"\n\"like network servers or functions that terminate the process (e.g. `exit()`).\"\nmsgstr \"\"\n\"它也是永远循环的函数（例如 `loop {}`）的返回类型，比如网络服务器，或终止进程\"\n\"的函数（例如 `exit()`）。\"\n\n#: src/mod.md:3\nmsgid \"\"\n\"Rust provides a powerful module system that can be used to hierarchically \"\n\"split code in logical units (modules), and manage visibility (public/\"\n\"private) between them.\"\nmsgstr \"\"\n\"Rust 提供了一个强大的模块系统，可以用来将代码分层地拆分成逻辑单元（模块），并\"\n\"管理它们之间的可见性（公有/私有）。\"\n\n#: src/mod.md:7\nmsgid \"\"\n\"A module is a collection of items: functions, structs, traits, `impl` \"\n\"blocks, and even other modules.\"\nmsgstr \"\"\n\"一个模块是一系列项的集合：函数、结构体、trait、`impl` 块，甚至其他模块。\"\n\n#: src/mod/visibility.md:3\nmsgid \"\"\n\"By default, the items in a module have private visibility, but this can be \"\n\"overridden with the `pub` modifier. Only the public items of a module can be \"\n\"accessed from outside the module scope.\"\nmsgstr \"\"\n\"默认情况下，模块中的项具有私有可见性，但可以使用 `pub` 修饰符来覆盖这一默认行\"\n\"为。只有模块中的公有项可以从模块作用域外部访问。\"\n\n#: src/mod/visibility.md:8\nmsgid \"// A module named `my_mod`\\n\"\nmsgstr \"// 一个名为 `my_mod` 的模块\\n\"\n\n#: src/mod/visibility.md:10\nmsgid \"// Items in modules default to private visibility.\\n\"\nmsgstr \"// 模块中的项默认为私有可见性。\\n\"\n\n#: src/mod/visibility.md:12\nmsgid \"\\\"called `my_mod::private_function()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::private_function()`\\\"\"\n\n#: src/mod/visibility.md:15\nmsgid \"// Use the `pub` modifier to override default visibility.\\n\"\nmsgstr \"// 使用 `pub` 修饰符来覆盖默认的可见性。\\n\"\n\n#: src/mod/visibility.md:17\nmsgid \"\\\"called `my_mod::function()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::function()`\\\"\"\n\n#: src/mod/visibility.md:20\nmsgid \"\"\n\"// Items can access other items in the same module,\\n\"\n\"    // even when private.\\n\"\nmsgstr \"\"\n\"// 同一模块中的项可以访问其他项，\\n\"\n\"    // 即使是私有的。\\n\"\n\n#: src/mod/visibility.md:23\nmsgid \"\\\"called `my_mod::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"调用了 `my_mod::indirect_access()`，它\\\\n> \\\"\"\n\n#: src/mod/visibility.md:27\nmsgid \"// Modules can also be nested\\n\"\nmsgstr \"// 模块也可以嵌套\\n\"\n\n#: src/mod/visibility.md:30\nmsgid \"\\\"called `my_mod::nested::function()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::nested::function()`\\\"\"\n\n#: src/mod/visibility.md:35\nmsgid \"\\\"called `my_mod::nested::private_function()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::nested::private_function()`\\\"\"\n\n#: src/mod/visibility.md:38\nmsgid \"\"\n\"// Functions declared using `pub(in path)` syntax are only visible\\n\"\n\"        // within the given path. `path` must be a parent or ancestor \"\n\"module\\n\"\nmsgstr \"\"\n\"// 使用 `pub(in path)` 语法声明的函数只在给定的路径中可见。\\n\"\n\"        // `path` 必须是父模块或祖先模块\\n\"\n\n#: src/mod/visibility.md:41\nmsgid \"\\\"called `my_mod::nested::public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\\\"调用了 `my_mod::nested::public_function_in_my_mod()`，它\\\\n> \\\"\"\n\n#: src/mod/visibility.md:45\nmsgid \"\"\n\"// Functions declared using `pub(self)` syntax are only visible within\\n\"\n\"        // the current module, which is the same as leaving them private\\n\"\nmsgstr \"\"\n\"// 使用 `pub(self)` 语法声明的函数只在当前模块中可见，\\n\"\n\"        // 这与将它们保持为私有是一样的\\n\"\n\n#: src/mod/visibility.md:48\nmsgid \"\\\"called `my_mod::nested::public_function_in_nested()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::nested::public_function_in_nested()`\\\"\"\n\n#: src/mod/visibility.md:51\nmsgid \"\"\n\"// Functions declared using `pub(super)` syntax are only visible within\\n\"\n\"        // the parent module\\n\"\nmsgstr \"\"\n\"// 使用 `pub(super)` 语法声明的函数仅在父模块中可见\\n\"\n\"        \\n\"\n\n#: src/mod/visibility.md:54\nmsgid \"\\\"called `my_mod::nested::public_function_in_super_mod()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::nested::public_function_in_super_mod()`\\\"\"\n\n#: src/mod/visibility.md:59\nmsgid \"\\\"called `my_mod::call_public_function_in_my_mod()`, that\\\\n> \\\"\"\nmsgstr \"\\\"调用了 `my_mod::call_public_function_in_my_mod()`，它\\\\n> \\\"\"\n\n#: src/mod/visibility.md:61\nmsgid \"\\\"> \\\"\"\nmsgstr \"\\\"> \\\"\"\n\n#: src/mod/visibility.md:65\nmsgid \"// pub(crate) makes functions visible only within the current crate\\n\"\nmsgstr \"// pub(crate) 使函数仅在当前 crate 内可见\\n\"\n\n#: src/mod/visibility.md:67\nmsgid \"\\\"called `my_mod::public_function_in_crate()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::public_function_in_crate()`\\\"\"\n\n#: src/mod/visibility.md:70\nmsgid \"// Nested modules follow the same rules for visibility\\n\"\nmsgstr \"// 嵌套模块遵循相同的可见性规则\\n\"\n\n#: src/mod/visibility.md:74\nmsgid \"\\\"called `my_mod::private_nested::function()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::private_nested::function()`\\\"\"\n\n#: src/mod/visibility.md:77\nmsgid \"\"\n\"// Private parent items will still restrict the visibility of a child item,\\n\"\n\"        // even if it is declared as visible within a bigger scope.\\n\"\nmsgstr \"\"\n\"// 私有父项仍会限制子项的可见性，\\n\"\n\"        // 即使子项被声明为在更大范围内可见。\\n\"\n\n#: src/mod/visibility.md:81\nmsgid \"\\\"called `my_mod::private_nested::restricted_function()`\\\"\"\nmsgstr \"\\\"调用了 `my_mod::private_nested::restricted_function()`\\\"\"\n\n#: src/mod/visibility.md:87 src/mod/use.md:25 src/mod/super.md:8\n#: src/mod/split.md:24\nmsgid \"\\\"called `function()`\\\"\"\nmsgstr \"\\\"调用了 `function()`\\\"\"\n\n#: src/mod/visibility.md:91\nmsgid \"\"\n\"// Modules allow disambiguation between items that have the same name.\\n\"\nmsgstr \"// 模块允许消除同名项之间的歧义。\\n\"\n\n#: src/mod/visibility.md:95\nmsgid \"\"\n\"// Public items, including those inside nested modules, can be\\n\"\n\"    // accessed from outside the parent module.\\n\"\nmsgstr \"// 公有项（包括嵌套模块内的）可以从父模块外部访问。\\n\"\n\n#: src/mod/visibility.md:101\nmsgid \"// pub(crate) items can be called from anywhere in the same crate\\n\"\nmsgstr \"// pub(crate) 项可以在同一个 crate 的任何地方调用\\n\"\n\n#: src/mod/visibility.md:104\nmsgid \"\"\n\"// pub(in path) items can only be called from within the module specified\\n\"\n\"    // Error! function `public_function_in_my_mod` is private\\n\"\n\"    //my_mod::nested::public_function_in_my_mod();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// pub(in path) 项只能在指定的模块内调用\\n\"\n\"    // 错误！函数 `public_function_in_my_mod` 是私有的\\n\"\n\"    //my_mod::nested::public_function_in_my_mod();\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/visibility.md:109\nmsgid \"\"\n\"// Private items of a module cannot be directly accessed, even if\\n\"\n\"    // nested in a public module:\\n\"\nmsgstr \"// 模块的私有项不能被直接访问，即使它们嵌套在公有模块中：\\n\"\n\n#: src/mod/visibility.md:112\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`private_function` 是私有的\\n\"\n\"    //my_mod::private_function();\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/visibility.md:116\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //my_mod::nested::private_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`private_function` 是私有的\\n\"\n\"    //my_mod::nested::private_function();\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/visibility.md:120\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`private_nested` 是一个私有模块\\n\"\n\"    //my_mod::private_nested::function();\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/visibility.md:124\nmsgid \"\"\n\"// Error! `private_nested` is a private module\\n\"\n\"    //my_mod::private_nested::restricted_function();\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`private_nested` 是一个私有模块\\n\"\n\"    //my_mod::private_nested::restricted_function();\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/struct_visibility.md:3\nmsgid \"\"\n\"Structs have an extra level of visibility with their fields. The visibility \"\n\"defaults to private, and can be overridden with the `pub` modifier. This \"\n\"visibility only matters when a struct is accessed from outside the module \"\n\"where it is defined, and has the goal of hiding information (encapsulation).\"\nmsgstr \"\"\n\"结构体的字段具有额外的可见性级别。字段默认为私有，可以使用 `pub` 修饰符来覆\"\n\"盖。这种可见性只在从结构体定义模块外部访问时才有意义，其目的是实现信息隐藏\"\n\"（封装）。\"\n\n#: src/mod/struct_visibility.md:10\nmsgid \"// A public struct with a public field of generic type `T`\\n\"\nmsgstr \"// 一个具有泛型类型 `T` 公有字段的公有结构体\\n\"\n\n#: src/mod/struct_visibility.md:15\nmsgid \"// A public struct with a private field of generic type `T`\\n\"\nmsgstr \"// 一个具有泛型类型 `T` 私有字段的公有结构体\\n\"\n\n#: src/mod/struct_visibility.md:21\nmsgid \"// A public constructor method\\n\"\nmsgstr \"// 一个公有的构造方法\\n\"\n\n#: src/mod/struct_visibility.md:31\nmsgid \"// Public structs with public fields can be constructed as usual\\n\"\nmsgstr \"// 具有公有字段的公有结构体可以正常构造\\n\"\n\n#: src/mod/struct_visibility.md:32\nmsgid \"\\\"public information\\\"\"\nmsgstr \"\\\"公开信息\\\"\"\n\n#: src/mod/struct_visibility.md:34\nmsgid \"// and their fields can be normally accessed.\\n\"\nmsgstr \"// 且可以正常访问其字段。\\n\"\n\n#: src/mod/struct_visibility.md:35\nmsgid \"\\\"The open box contains: {}\\\"\"\nmsgstr \"\\\"打开的盒子包含：{}\\\"\"\n\n#: src/mod/struct_visibility.md:37\nmsgid \"\"\n\"// Public structs with private fields cannot be constructed using field \"\n\"names.\\n\"\n\"    // Error! `ClosedBox` has private fields\\n\"\n\"    //let closed_box = my::ClosedBox { contents: \\\"classified \"\n\"information\\\" };\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 具有私有字段的公有结构体不能使用字段名来构造。\\n\"\n\"    // 错误！`ClosedBox` 有私有字段\\n\"\n\"    //let closed_box = my::ClosedBox { contents: \\\"机密信息\\\" };\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/struct_visibility.md:42\nmsgid \"\"\n\"// However, structs with private fields can be created using\\n\"\n\"    // public constructors\\n\"\nmsgstr \"// 然而，具有私有字段的结构体可以使用公有构造函数创建\\n\"\n\n#: src/mod/struct_visibility.md:44\nmsgid \"\\\"classified information\\\"\"\nmsgstr \"\\\"机密信息\\\"\"\n\n#: src/mod/struct_visibility.md:46\nmsgid \"\"\n\"// and the private fields of a public struct cannot be accessed.\\n\"\n\"    // Error! The `contents` field is private\\n\"\n\"    //println!(\\\"The closed box contains: {}\\\", _closed_box.contents);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 且无法访问公有结构体的私有字段。\\n\"\n\"    // 错误！`contents` 字段是私有的\\n\"\n\"    //println!(\\\"封闭的盒子包含：{}\\\", _closed_box.contents);\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/mod/struct_visibility.md:55\nmsgid \"[generics](../generics.md) and [methods](../fn/methods.md)\"\nmsgstr \"[泛型](../generics.md)和[方法](../fn/methods.md)\"\n\n#: src/mod/use.md:3\nmsgid \"\"\n\"The `use` declaration can be used to bind a full path to a new name, for \"\n\"easier access. It is often used like this:\"\nmsgstr \"\"\n\"`use` 声明可以将完整路径绑定到新名称，以便更轻松地访问。它通常这样使用：\"\n\n#: src/mod/use.md:18\nmsgid \"You can use the `as` keyword to bind imports to a different name:\"\nmsgstr \"你可以使用 `as` 关键字将导入绑定到不同的名称：\"\n\n#: src/mod/use.md:21\nmsgid \"// Bind the `deeply::nested::function` path to `other_function`.\\n\"\nmsgstr \"// 将 `deeply::nested::function` 路径绑定到 `other_function`。\\n\"\n\n#: src/mod/use.md:31\nmsgid \"\\\"called `deeply::nested::function()`\\\"\"\nmsgstr \"\\\"调用了 `deeply::nested::function()`\\\"\"\n\n#: src/mod/use.md:37\nmsgid \"// Easier access to `deeply::nested::function`\\n\"\nmsgstr \"// 更方便地访问 `deeply::nested::function`\\n\"\n\n#: src/mod/use.md:40\nmsgid \"\\\"Entering block\\\"\"\nmsgstr \"\\\"进入代码块\\\"\"\n\n#: src/mod/use.md:42\nmsgid \"\"\n\"// This is equivalent to `use deeply::nested::function as function`.\\n\"\n\"        // This `function()` will shadow the outer one.\\n\"\nmsgstr \"\"\n\"// 这等同于 `use deeply::nested::function as function`。\\n\"\n\"        // 这个 `function()` 将遮蔽外部的同名函数。\\n\"\n\n#: src/mod/use.md:46\nmsgid \"\"\n\"// `use` bindings have a local scope. In this case, the\\n\"\n\"        // shadowing of `function()` is only in this block.\\n\"\nmsgstr \"\"\n\"// `use` 绑定具有局部作用域。在这种情况下，\\n\"\n\"        // `function()` 的遮蔽仅在此代码块内有效。\\n\"\n\n#: src/mod/use.md:50\nmsgid \"\\\"Leaving block\\\"\"\nmsgstr \"\\\"离开代码块\\\"\"\n\n#: src/mod/super.md:3\nmsgid \"\"\n\"The `super` and `self` keywords can be used in the path to remove ambiguity \"\n\"when accessing items and to prevent unnecessary hardcoding of paths.\"\nmsgstr \"\"\n\"`super` 和 `self` 关键字可以在路径中使用，以消除访问项目时的歧义，并避免不必\"\n\"要的路径硬编码。\"\n\n#: src/mod/super.md:13\nmsgid \"\\\"called `cool::function()`\\\"\"\nmsgstr \"\\\"调用了 `cool::function()`\\\"\"\n\n#: src/mod/super.md:19 src/mod/split.md:49\nmsgid \"\\\"called `my::function()`\\\"\"\nmsgstr \"\\\"调用了 `my::function()`\\\"\"\n\n#: src/mod/super.md:24\nmsgid \"\\\"called `my::cool::function()`\\\"\"\nmsgstr \"\\\"调用了 `my::cool::function()`\\\"\"\n\n#: src/mod/super.md:29\nmsgid \"// Let's access all the functions named `function` from this scope!\\n\"\nmsgstr \"// 让我们从这个作用域访问所有名为 `function` 的函数！\\n\"\n\n#: src/mod/super.md:30\nmsgid \"\\\"called `my::indirect_call()`, that\\\\n> \\\"\"\nmsgstr \"\\\"调用了 `my::indirect_call()`，它\\\\n> \\\"\"\n\n#: src/mod/super.md:32\nmsgid \"\"\n\"// The `self` keyword refers to the current module scope - in this case \"\n\"`my`.\\n\"\n\"        // Calling `self::function()` and calling `function()` directly both \"\n\"give\\n\"\n\"        // the same result, because they refer to the same function.\\n\"\nmsgstr \"\"\n\"// `self` 关键字指的是当前模块作用域 - 在这里是 `my`。\\n\"\n\"        // 调用 `self::function()` 和直接调用 `function()` 都会\\n\"\n\"        // 得到相同的结果，因为它们指向同一个函数。\\n\"\n\n#: src/mod/super.md:38\nmsgid \"// We can also use `self` to access another module inside `my`:\\n\"\nmsgstr \"// 我们也可以使用 `self` 来访问 `my` 内的另一个模块：\\n\"\n\n#: src/mod/super.md:41\nmsgid \"\"\n\"// The `super` keyword refers to the parent scope (outside the `my` \"\n\"module).\\n\"\nmsgstr \"// `super` 关键字指的是父作用域（`my` 模块之外）。\\n\"\n\n#: src/mod/super.md:44\nmsgid \"\"\n\"// This will bind to the `cool::function` in the *crate* scope.\\n\"\n\"        // In this case the crate scope is the outermost scope.\\n\"\nmsgstr \"\"\n\"// 这将绑定到 *crate* 作用域中的 `cool::function`。\\n\"\n\"        // 在这种情况下，crate 作用域是最外层作用域。\\n\"\n\n#: src/mod/split.md:3\nmsgid \"\"\n\"Modules can be mapped to a file/directory hierarchy. Let's break down the \"\n\"[visibility example](visibility.md) in files:\"\nmsgstr \"\"\n\"模块可以映射到文件/目录层次结构。让我们将[可见性示例](visibility.md)拆分成多\"\n\"个文件：\"\n\n#: src/mod/split.md:16\nmsgid \"In `split.rs`:\"\nmsgstr \"在 `split.rs` 文件中：\"\n\n#: src/mod/split.md:19\nmsgid \"\"\n\"// This declaration will look for a file named `my.rs` and will\\n\"\n\"// insert its contents inside a module named `my` under this scope\\n\"\nmsgstr \"\"\n\"// 这个声明会查找名为 `my.rs` 的文件，并将其内容\\n\"\n\"// 插入到当前作用域下名为 `my` 的模块中\\n\"\n\n#: src/mod/split.md:39\nmsgid \"In `my.rs`:\"\nmsgstr \"在 `my.rs` 文件中：\"\n\n#: src/mod/split.md:42\nmsgid \"\"\n\"// Similarly `mod inaccessible` and `mod nested` will locate the \"\n\"`nested.rs`\\n\"\n\"// and `inaccessible.rs` files and insert them here under their respective\\n\"\n\"// modules\\n\"\nmsgstr \"\"\n\"// 同样，`mod inaccessible` 和 `mod nested` 会分别定位到\\n\"\n\"// `nested.rs` 和 `inaccessible.rs` 文件，\\n\"\n\"// 并将它们的内容插入到这里对应的模块中\\n\"\n\n#: src/mod/split.md:53\nmsgid \"\\\"called `my::private_function()`\\\"\"\nmsgstr \"\\\"调用了 `my::private_function()`\\\"\"\n\n#: src/mod/split.md:57\nmsgid \"\\\"called `my::indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"调用了 `my::indirect_access()`，它\\\\n> \\\"\"\n\n#: src/mod/split.md:63\nmsgid \"In `my/nested.rs`:\"\nmsgstr \"在 `my/nested.rs` 文件中：\"\n\n#: src/mod/split.md:67\nmsgid \"\\\"called `my::nested::function()`\\\"\"\nmsgstr \"\\\"调用了 `my::nested::function()`\\\"\"\n\n#: src/mod/split.md:72\nmsgid \"\\\"called `my::nested::private_function()`\\\"\"\nmsgstr \"\\\"调用了 `my::nested::private_function()`\\\"\"\n\n#: src/mod/split.md:76\nmsgid \"In `my/inaccessible.rs`:\"\nmsgstr \"在 `my/inaccessible.rs` 文件中：\"\n\n#: src/mod/split.md:81\nmsgid \"\\\"called `my::inaccessible::public_function()`\\\"\"\nmsgstr \"\\\"调用了 `my::inaccessible::public_function()`\\\"\"\n\n#: src/mod/split.md:85\nmsgid \"Let's check that things still work as before:\"\nmsgstr \"让我们检查一下是否一切仍然如之前一样正常运行：\"\n\n#: src/crates.md:3\nmsgid \"\"\n\"A crate is a compilation unit in Rust. Whenever `rustc some_file.rs` is \"\n\"called, `some_file.rs` is treated as the _crate file_. If `some_file.rs` has \"\n\"`mod` declarations in it, then the contents of the module files would be \"\n\"inserted in places where `mod` declarations in the crate file are found, \"\n\"_before_ running the compiler over it. In other words, modules do _not_ get \"\n\"compiled individually, only crates get compiled.\"\nmsgstr \"\"\n\"在 Rust 中，crate 是一个编译单元。每当执行 `rustc some_file.rs` 时，\"\n\"`some_file.rs` 就被视为**crate 文件**。如果 `some_file.rs` 中包含 `mod` 声\"\n\"明，那么模块文件的内容会在编译器处理之前被插入到 crate 文件中 `mod` 声明的位\"\n\"置。换句话说，模块**不会**被单独编译，只有 crate 才会被编译。\"\n\n#: src/crates.md:10\nmsgid \"\"\n\"A crate can be compiled into a binary or into a library. By default, `rustc` \"\n\"will produce a binary from a crate. This behavior can be overridden by \"\n\"passing the `--crate-type` flag to `lib`.\"\nmsgstr \"\"\n\"一个 crate 可以被编译成二进制文件或库。默认情况下，`rustc` 会将 crate 编译成\"\n\"二进制文件。通过向 `rustc` 传递 `--crate-type` 标志并指定 `lib`，可以改变这一\"\n\"默认行为。\"\n\n#: src/crates/lib.md:3\nmsgid \"Let's create a library, and then see how to link it to another crate.\"\nmsgstr \"让我们创建一个库，然后看看如何将它链接到另一个 crate。\"\n\n#: src/crates/lib.md:5\nmsgid \"In `rary.rs`:\"\nmsgstr \"在 `rary.rs` 文件中：\"\n\n#: src/crates/lib.md:9 src/attribute/crate.md:19\nmsgid \"\\\"called rary's `public_function()`\\\"\"\nmsgstr \"\\\"调用了 rary 的 `public_function()`\\\"\"\n\n#: src/crates/lib.md:13 src/attribute/crate.md:23\nmsgid \"\\\"called rary's `private_function()`\\\"\"\nmsgstr \"\\\"调用了 rary 的 `private_function()`\\\"\"\n\n#: src/crates/lib.md:17 src/attribute/crate.md:27\nmsgid \"\\\"called rary's `indirect_access()`, that\\\\n> \\\"\"\nmsgstr \"\\\"调用了 rary 的 `indirect_access()`，它\\\\n> \\\"\"\n\n#: src/crates/lib.md:29\nmsgid \"\"\n\"Libraries get prefixed with \\\"lib\\\", and by default they get named after \"\n\"their crate file, but this default name can be overridden by passing the `--\"\n\"crate-name` option to `rustc` or by using the [`crate_name` attribute](../\"\n\"attribute/crate.md).\"\nmsgstr \"\"\n\"库文件名会自动添加 \\\"lib\\\" 前缀，默认使用 crate 文件的名称。但可以通过向 \"\n\"`rustc` 传递 `--crate-name` 选项或使用 [`crate_name` 属性](../attribute/\"\n\"crate.md) 来覆盖这个默认名称。\"\n\n#: src/crates/using_lib.md:3\nmsgid \"\"\n\"To link a crate to this new library you may use `rustc`'s `--extern` flag. \"\n\"All of its items will then be imported under a module named the same as the \"\n\"library. This module generally behaves the same way as any other module.\"\nmsgstr \"\"\n\"要将 crate 链接到这个新库，可以使用 `rustc` 的 `--extern` 标志。库中的所有项\"\n\"目都会被导入到一个与库同名的模块下。这个模块的行为通常与其他模块相同。\"\n\n#: src/crates/using_lib.md:8\nmsgid \"\"\n\"// extern crate rary; // May be required for Rust 2015 edition or earlier\\n\"\nmsgstr \"// extern crate rary; // Rust 2015 版本或更早版本可能需要此声明\\n\"\n\n#: src/crates/using_lib.md:13\nmsgid \"\"\n\"// Error! `private_function` is private\\n\"\n\"    //rary::private_function();\\n\"\nmsgstr \"\"\n\"// 错误！`private_function` 是私有的\\n\"\n\"    //rary::private_function();\\n\"\n\n#: src/cargo.md:3\nmsgid \"\"\n\"`cargo` is the official Rust package management tool. It has lots of really \"\n\"useful features to improve code quality and developer velocity! These include\"\nmsgstr \"\"\n\"`cargo` 是 Rust 的官方包管理工具。它提供了许多非常有用的功能，可以提高代码质\"\n\"量和开发效率！这些功能包括：\"\n\n#: src/cargo.md:6\nmsgid \"\"\n\"Dependency management and integration with [crates.io](https://crates.io) \"\n\"(the official Rust package registry)\"\nmsgstr \"\"\n\"依赖管理和与 [crates.io](https://crates.io)（Rust 官方包注册中心）的集成\"\n\n#: src/cargo.md:8\nmsgid \"Awareness of unit tests\"\nmsgstr \"支持单元测试\"\n\n#: src/cargo.md:9\nmsgid \"Awareness of benchmarks\"\nmsgstr \"支持基准测试\"\n\n#: src/cargo.md:11\nmsgid \"\"\n\"This chapter will go through some quick basics, but you can find the \"\n\"comprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/).\"\nmsgstr \"\"\n\"本章将快速介绍一些基础知识，更全面的文档可以在 [Cargo 手册](https://doc.rust-\"\n\"lang.org/cargo/) 中找到。\"\n\n#: src/cargo/deps.md:3\nmsgid \"\"\n\"Most programs have dependencies on some libraries. If you have ever managed \"\n\"dependencies by hand, you know how much of a pain this can be. Luckily, the \"\n\"Rust ecosystem comes standard with `cargo`! `cargo` can manage dependencies \"\n\"for a project.\"\nmsgstr \"\"\n\"大多数程序都依赖于一些库。如果你曾经手动管理过依赖，你就知道这有多么痛苦。幸\"\n\"运的是，Rust 生态系统标配了 `cargo`！`cargo` 可以为项目管理依赖。\"\n\n#: src/cargo/deps.md:8\nmsgid \"To create a new Rust project,\"\nmsgstr \"要创建一个新的 Rust 项目，可以使用以下命令：\"\n\n#: src/cargo/deps.md:11\nmsgid \"# A binary\\n\"\nmsgstr \"# 创建二进制项目\\n\"\n\n#: src/cargo/deps.md:13\nmsgid \"# A library\\n\"\nmsgstr \"# 创建库项目\\n\"\n\n#: src/cargo/deps.md:18\nmsgid \"\"\n\"For the rest of this chapter, let's assume we are making a binary, rather \"\n\"than a library, but all of the concepts are the same.\"\nmsgstr \"\"\n\"在本章的剩余部分，我们假设我们正在创建一个二进制项目，而不是一个库项目，但所\"\n\"有的概念都是相同的。\"\n\n#: src/cargo/deps.md:21\nmsgid \"After the above commands, you should see a file hierarchy like this:\"\nmsgstr \"执行上述命令后，你应该会看到如下的文件结构：\"\n\n#: src/cargo/deps.md:35\nmsgid \"\"\n\"The `main.rs` is the root source file for your new `foo` project -- nothing \"\n\"new there. The `Cargo.toml` is the config file for `cargo` for this project. \"\n\"If you look inside it, you should see something like this:\"\nmsgstr \"\"\n\"`main.rs` 是你新建的 `foo` 项目的主源文件 —— 这一点没什么新鲜的。\"\n\"`Cargo.toml` 则是这个项目的 `cargo` 配置文件。如果你查看它的内容，应该会看到\"\n\"类似这样的内容：\"\n\n#: src/cargo/deps.md:39\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"```\"\n\n#: src/cargo/deps.md:48\nmsgid \"\"\n\"The `name` field under `[package]` determines the name of the project. This \"\n\"is used by `crates.io` if you publish the crate (more later). It is also the \"\n\"name of the output binary when you compile.\"\nmsgstr \"\"\n\"`[package]` 下的 `name` 字段决定了项目的名称。如果你将 crate 发布到 \"\n\"`crates.io`（稍后会详细介绍），这个名称将被使用。同时，它也是编译时生成的二进\"\n\"制文件的名称。\"\n\n#: src/cargo/deps.md:52\nmsgid \"\"\n\"The `version` field is a crate version number using [Semantic Versioning]\"\n\"(http://semver.org/).\"\nmsgstr \"\"\n\"`version` 字段是使用[语义化版本控制](http://semver.org/)的 crate 版本号。\"\n\n#: src/cargo/deps.md:55\nmsgid \"\"\n\"The `authors` field is a list of authors used when publishing the crate.\"\nmsgstr \"`authors` 字段是发布 crate 时使用的作者列表。\"\n\n#: src/cargo/deps.md:57\nmsgid \"\"\n\"The `[dependencies]` section lets you add dependencies for your project.\"\nmsgstr \"`[dependencies]` 部分允许你为项目添加依赖。\"\n\n#: src/cargo/deps.md:59\nmsgid \"\"\n\"For example, suppose that we want our program to have a great CLI. You can \"\n\"find lots of great packages on [crates.io](https://crates.io) (the official \"\n\"Rust package registry). One popular choice is [clap](https://crates.io/\"\n\"crates/clap). As of this writing, the most recent published version of \"\n\"`clap` is `2.27.1`. To add a dependency to our program, we can simply add \"\n\"the following to our `Cargo.toml` under `[dependencies]`: `clap = \"\n\"\\\"2.27.1\\\"`. And that's it! You can start using `clap` in your program.\"\nmsgstr \"\"\n\"举个例子，假设我们想让程序拥有一个出色的命令行界面（CLI）。你可以在 \"\n\"[crates.io](https://crates.io)（Rust 官方包注册中心）上找到许多优秀的包。其\"\n\"中，[clap](https://crates.io/crates/clap) 是一个广受欢迎的选择。在撰写本文\"\n\"时，`clap` 的最新发布版本是 `2.27.1`。要在我们的程序中添加这个依赖，只需在 \"\n\"`Cargo.toml` 的 `[dependencies]` 下添加：`clap = \\\"2.27.1\\\"`。就这么简单！现\"\n\"在你就可以在程序中使用 `clap` 了。\"\n\n#: src/cargo/deps.md:67\nmsgid \"\"\n\"`cargo` also supports [other types of dependencies](https://doc.rust-\"\n\"lang.org/cargo/reference/specifying-dependencies.html). Here is just a small \"\n\"sampling:\"\nmsgstr \"\"\n\"`cargo` 还支持[其他类型的依赖](https://doc.rust-lang.org/cargo/reference/\"\n\"specifying-dependencies.html)。这里给出一个简单的示例：\"\n\n#: src/cargo/deps.md:70\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"clap = \\\"2.27.1\\\" # from crates.io\\n\"\n\"rand = { git = \\\"https://github.com/rust-lang-nursery/rand\\\" } # from online \"\n\"repo\\n\"\n\"bar = { path = \\\"../bar\\\" } # from a path in the local filesystem\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"foo\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"authors = [\\\"mark\\\"]\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"clap = \\\"2.27.1\\\" # 来自 crates.io\\n\"\n\"rand = { git = \\\"https://github.com/rust-lang-nursery/rand\\\" } # 来自在线仓\"\n\"库\\n\"\n\"bar = { path = \\\"../bar\\\" } # 来自本地文件系统的路径\\n\"\n\"```\"\n\n#: src/cargo/deps.md:82\nmsgid \"\"\n\"`cargo` is more than a dependency manager. All of the available \"\n\"configuration options are listed in the [format specification](https://\"\n\"doc.rust-lang.org/cargo/reference/manifest.html) of `Cargo.toml`.\"\nmsgstr \"\"\n\"`cargo` 不仅仅是一个依赖管理器。`Cargo.toml` 的[格式规范](https://doc.rust-\"\n\"lang.org/cargo/reference/manifest.html)中列出了所有可用的配置选项。\"\n\n#: src/cargo/deps.md:86\nmsgid \"\"\n\"To build our project we can execute `cargo build` anywhere in the project \"\n\"directory (including subdirectories!). We can also do `cargo run` to build \"\n\"and run. Notice that these commands will resolve all dependencies, download \"\n\"crates if needed, and build everything, including your crate. (Note that it \"\n\"only rebuilds what it has not already built, similar to `make`).\"\nmsgstr \"\"\n\"我们可以在项目目录的任何位置（包括子目录！）执行 `cargo build` 来构建项目。也\"\n\"可以使用 `cargo run` 来构建并运行。请注意，这些命令会解析所有依赖，必要时下\"\n\"载 crate，并构建所有内容，包括你的 crate。（值得一提的是，它只会重新构建尚未\"\n\"构建的部分，类似于 `make`）。\"\n\n#: src/cargo/deps.md:92\nmsgid \"Voila! That's all there is to it!\"\nmsgstr \"瞧！就是这么简单！\"\n\n#: src/cargo/conventions.md:3\nmsgid \"In the previous chapter, we saw the following directory hierarchy:\"\nmsgstr \"在上一章中，我们看到了如下目录结构：\"\n\n#: src/cargo/conventions.md:12\nmsgid \"\"\n\"Suppose that we wanted to have two binaries in the same project, though. \"\n\"What then?\"\nmsgstr \"那么，如果我们想在同一个项目中包含两个二进制文件，该怎么办呢？\"\n\n#: src/cargo/conventions.md:15\nmsgid \"\"\n\"It turns out that `cargo` supports this. The default binary name is `main`, \"\n\"as we saw before, but you can add additional binaries by placing them in a \"\n\"`bin/` directory:\"\nmsgstr \"\"\n\"`cargo` 实际上支持这种需求。如我们之前所见，默认的二进制文件名是 `main`，但你\"\n\"可以通过在 `bin/` 目录中放置额外的文件来添加其他二进制文件：\"\n\n#: src/cargo/conventions.md:28\nmsgid \"\"\n\"To tell `cargo` to only compile or run this binary, we just pass `cargo` the \"\n\"`--bin my_other_bin` flag, where `my_other_bin` is the name of the binary we \"\n\"want to work with.\"\nmsgstr \"\"\n\"如果要指示 `cargo` 只编译或运行特定的二进制文件，只需传递 `--bin \"\n\"my_other_bin` 标志，其中 `my_other_bin` 是我们想要处理的二进制文件的名称。\"\n\n#: src/cargo/conventions.md:32\nmsgid \"\"\n\"In addition to extra binaries, `cargo` supports [more features](https://\"\n\"doc.rust-lang.org/cargo/guide/project-layout.html) such as benchmarks, \"\n\"tests, and examples.\"\nmsgstr \"\"\n\"除了额外的二进制文件，`cargo` 还支持[更多功能](https://doc.rust-lang.org/\"\n\"cargo/guide/project-layout.html)，如基准测试、测试和示例。\"\n\n#: src/cargo/conventions.md:35\nmsgid \"In the next chapter, we will look more closely at tests.\"\nmsgstr \"在下一章中，我们将更详细地探讨测试。\"\n\n#: src/cargo/test.md:3\nmsgid \"\"\n\"As we know testing is integral to any piece of software! Rust has first-\"\n\"class support for unit and integration testing ([see this chapter](https://\"\n\"doc.rust-lang.org/book/ch11-00-testing.html) in TRPL).\"\nmsgstr \"\"\n\"众所周知，测试是任何软件不可或缺的一部分！Rust 为单元测试和集成测试提供了一流\"\n\"的支持（参见《Rust 程序设计语言》中的[这一章](https://doc.rust-lang.org/book/\"\n\"ch11-00-testing.html)）。\"\n\n#: src/cargo/test.md:7\nmsgid \"\"\n\"From the testing chapters linked above, we see how to write unit tests and \"\n\"integration tests. Organizationally, we can place unit tests in the modules \"\n\"they test and integration tests in their own `tests/` directory:\"\nmsgstr \"\"\n\"从上面链接的测试章节中，我们了解了如何编写单元测试和集成测试。在组织结构上，\"\n\"我们可以将单元测试放在它们所测试的模块中，而将集成测试放在专门的 `tests/` 目\"\n\"录中：\"\n\n#: src/cargo/test.md:22\nmsgid \"\"\n\"Each file in `tests` is a separate [integration test](https://doc.rust-\"\n\"lang.org/book/ch11-03-test-organization.html#integration-tests), i.e. a test \"\n\"that is meant to test your library as if it were being called from a \"\n\"dependent crate.\"\nmsgstr \"\"\n\"`tests` 目录中的每个文件都是一个独立的[集成测试](https://doc.rust-lang.org/\"\n\"book/ch11-03-test-organization.html#integration-tests)，即旨在测试你的库，就\"\n\"像它被依赖的 crate 调用一样。\"\n\n#: src/cargo/test.md:27\nmsgid \"\"\n\"The [Testing](../testing.md) chapter elaborates on the three different \"\n\"testing styles: [Unit](../testing/unit_testing.md), [Doc](../testing/\"\n\"doc_testing.md), and [Integration](../testing/integration_testing.md).\"\nmsgstr \"\"\n\"[测试](../testing.md)章节详细阐述了三种不同的测试风格：[单元测试](../testing/\"\n\"unit_testing.md)、[文档测试](../testing/doc_testing.md)和[集成测试](../\"\n\"testing/integration_testing.md)。\"\n\n#: src/cargo/test.md:30\nmsgid \"`cargo` naturally provides an easy way to run all of your tests!\"\nmsgstr \"`cargo` 自然提供了一种简便的方式来运行所有测试！\"\n\n#: src/cargo/test.md:36\nmsgid \"You should see output like this:\"\nmsgstr \"你将看到类似这样的输出：\"\n\n#: src/cargo/test.md:38\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ cargo test\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 4 tests\\n\"\n\"test test_bar ... ok\\n\"\n\"test test_baz ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"test test_foo ... ok\\n\"\n\"\\n\"\n\"test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\\n\"\n\"```\"\n\n#: src/cargo/test.md:53\nmsgid \"You can also run tests whose name matches a pattern:\"\nmsgstr \"你还可以运行名称匹配特定模式的测试：\"\n\n#: src/cargo/test.md:59\nmsgid \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ cargo test test_foo\\n\"\n\"   Compiling blah v0.1.0 (file:///nobackup/blah)\\n\"\n\"    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\\n\"\n\"     Running target/debug/deps/blah-d3b32b97275ec472\\n\"\n\"\\n\"\n\"running 2 tests\\n\"\n\"test test_foo ... ok\\n\"\n\"test test_foo_bar ... ok\\n\"\n\"\\n\"\n\"test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\\n\"\n\"```\"\n\n#: src/cargo/test.md:72\nmsgid \"\"\n\"One word of caution: Cargo may run multiple tests concurrently, so make sure \"\n\"that they don't race with each other.\"\nmsgstr \"\"\n\"需要注意：Cargo 可能会并发运行多个测试，因此请确保它们之间不会产生竞态条件。\"\n\n#: src/cargo/test.md:75\nmsgid \"\"\n\"One example of this concurrency causing issues is if two tests output to a \"\n\"file, such as below:\"\nmsgstr \"\"\n\"并发可能导致问题的一个例子是，如果两个测试同时输出到同一个文件，如下所示：\"\n\n#: src/cargo/test.md:81\nmsgid \"// Import the necessary modules\\n\"\nmsgstr \"// 导入必要的模块\\n\"\n\n#: src/cargo/test.md:85\nmsgid \"// This test writes to a file\\n\"\nmsgstr \"// 这个测试向文件写入内容\\n\"\n\n#: src/cargo/test.md:88 src/cargo/test.md:105\nmsgid \"// Opens the file ferris.txt or creates one if it doesn't exist.\\n\"\nmsgstr \"// 打开 ferris.txt 文件，如果不存在则创建一个\\n\"\n\n#: src/cargo/test.md:92 src/cargo/test.md:109\nmsgid \"\\\"ferris.txt\\\"\"\nmsgstr \"\\\"ferris.txt\\\"\"\n\n#: src/cargo/test.md:93 src/cargo/test.md:110\nmsgid \"\\\"Failed to open ferris.txt\\\"\"\nmsgstr \"\\\"无法打开 ferris.txt\\\"\"\n\n#: src/cargo/test.md:95\nmsgid \"// Print \\\"Ferris\\\" 5 times.\\n\"\nmsgstr \"// 循环打印 \\\"Ferris\\\" 5 次\\n\"\n\n#: src/cargo/test.md:97\nmsgid \"\\\"Ferris\\\\n\\\"\"\nmsgstr \"\\\"Ferris\\\\n\\\"\"\n\n#: src/cargo/test.md:98 src/cargo/test.md:115\nmsgid \"\\\"Could not write to ferris.txt\\\"\"\nmsgstr \"\\\"无法写入 ferris.txt\\\"\"\n\n#: src/cargo/test.md:102\nmsgid \"// This test tries to write to the same file\\n\"\nmsgstr \"// 这个测试尝试写入同一个文件\\n\"\n\n#: src/cargo/test.md:112\nmsgid \"// Print \\\"Corro\\\" 5 times.\\n\"\nmsgstr \"// 循环打印 \\\"Corro\\\" 5 次\\n\"\n\n#: src/cargo/test.md:114\nmsgid \"\\\"Corro\\\\n\\\"\"\nmsgstr \"\\\"Corro\\\\n\\\"\"\n\n#: src/cargo/test.md:121\nmsgid \"Although the intent is to get the following:\"\nmsgstr \"尽管预期结果应该是：\"\n\n#: src/cargo/test.md:137\nmsgid \"What actually gets put into `ferris.txt` is this:\"\nmsgstr \"但实际写入 `ferris.txt` 的内容可能是这样的：\"\n\n#: src/cargo/build_scripts.md:3\nmsgid \"\"\n\"Sometimes a normal build from `cargo` is not enough. Perhaps your crate \"\n\"needs some pre-requisites before `cargo` will successfully compile, things \"\n\"like code generation, or some native code that needs to be compiled. To \"\n\"solve this problem we have build scripts that Cargo can run.\"\nmsgstr \"\"\n\"有时候，`cargo` 的常规构建可能不足以满足需求。你的 crate 可能在 `cargo` 成功\"\n\"编译之前需要一些先决条件，比如代码生成，或者需要编译一些本地代码。为了解决这\"\n\"个问题，我们可以使用 Cargo 能够运行的构建脚本。\"\n\n#: src/cargo/build_scripts.md:8\nmsgid \"\"\n\"To add a build script to your package it can either be specified in the \"\n\"`Cargo.toml` as follows:\"\nmsgstr \"要为你的包添加构建脚本，可以在 `Cargo.toml` 中指定，如下所示：\"\n\n#: src/cargo/build_scripts.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"...\\n\"\n\"build = \\\"build.rs\\\"\\n\"\n\"```\"\n\n#: src/cargo/build_scripts.md:17\nmsgid \"\"\n\"Otherwise Cargo will look for a `build.rs` file in the project directory by \"\n\"default.\"\nmsgstr \"如果没有指定，Cargo 默认会在项目目录中查找 `build.rs` 文件。\"\n\n#: src/cargo/build_scripts.md:20\nmsgid \"How to use a build script\"\nmsgstr \"如何使用构建脚本\"\n\n#: src/cargo/build_scripts.md:22\nmsgid \"\"\n\"The build script is simply another Rust file that will be compiled and \"\n\"invoked prior to compiling anything else in the package. Hence it can be \"\n\"used to fulfill pre-requisites of your crate.\"\nmsgstr \"\"\n\"构建脚本只是另一个 Rust 文件，它会在编译包中的其他内容之前被编译和调用。因\"\n\"此，它可以用来满足你的 crate 的先决条件。\"\n\n#: src/cargo/build_scripts.md:26\nmsgid \"\"\n\"Cargo provides the script with inputs via environment variables [specified \"\n\"here](https://doc.rust-lang.org/cargo/reference/environment-\"\n\"variables.html#environment-variables-cargo-sets-for-build-scripts) that can \"\n\"be used.\"\nmsgstr \"\"\n\"Cargo 通过环境变量为脚本提供输入，这些环境变量可以被使用。具体参见[这里的说\"\n\"明](https://doc.rust-lang.org/cargo/reference/environment-\"\n\"variables.html#environment-variables-cargo-sets-for-build-scripts)。\"\n\n#: src/cargo/build_scripts.md:29\nmsgid \"\"\n\"The script provides output via stdout. All lines printed are written to \"\n\"`target/debug/build/<pkg>/output`. Further, lines prefixed with `cargo:` \"\n\"will be interpreted by Cargo directly and hence can be used to define \"\n\"parameters for the package's compilation.\"\nmsgstr \"\"\n\"脚本通过标准输出提供输出。所有打印的行都会被写入 `target/debug/build/<pkg>/\"\n\"output`。此外，以 `cargo:` 为前缀的行会被 Cargo 直接解释，因此可以用来为包的\"\n\"编译定义参数。\"\n\n#: src/cargo/build_scripts.md:34\nmsgid \"\"\n\"For further specification and examples have a read of the [Cargo \"\n\"specification](https://doc.rust-lang.org/cargo/reference/build-scripts.html).\"\nmsgstr \"\"\n\"如需了解更多详细规范和示例，请参阅 [Cargo 构建脚本规范](https://doc.rust-\"\n\"lang.org/cargo/reference/build-scripts.html)。\"\n\n#: src/attribute.md:3\nmsgid \"\"\n\"An attribute is metadata applied to some module, crate or item. This \"\n\"metadata can be used to/for:\"\nmsgstr \"属性是应用于模块、crate 或条目的元数据。这些元数据可用于以下目的：\"\n\n#: src/attribute.md:8\nmsgid \"[conditional compilation of code](attribute/cfg.md)\"\nmsgstr \"[代码的条件编译](attribute/cfg.md)\"\n\n#: src/attribute.md:9\nmsgid \"\"\n\"[set crate name, version and type (binary or library)](attribute/crate.md)\"\nmsgstr \"[设置 crate 的名称、版本和类型（二进制或库）](attribute/crate.md)\"\n\n#: src/attribute.md:10\nmsgid \"\"\n\"disable [lints](https://en.wikipedia.org/wiki/Lint_%28software%29) (warnings)\"\nmsgstr \"\"\n\"禁用 [代码检查](https://en.wikipedia.org/wiki/Lint_%28software%29)（警告）\"\n\n#: src/attribute.md:11\nmsgid \"enable compiler features (macros, glob imports, etc.)\"\nmsgstr \"启用编译器特性（如宏、全局导入等）\"\n\n#: src/attribute.md:12\nmsgid \"link to a foreign library\"\nmsgstr \"链接外部库\"\n\n#: src/attribute.md:13\nmsgid \"mark functions as unit tests\"\nmsgstr \"将函数标记为单元测试\"\n\n#: src/attribute.md:14\nmsgid \"mark functions that will be part of a benchmark\"\nmsgstr \"将函数标记为基准测试的一部分\"\n\n#: src/attribute.md:15\nmsgid \"\"\n\"[attribute like macros](https://doc.rust-lang.org/book/ch19-06-\"\n\"macros.html#attribute-like-macros)\"\nmsgstr \"\"\n\"[类属性宏](https://doc.rust-lang.org/book/ch19-06-macros.html#attribute-like-\"\n\"macros)\"\n\n#: src/attribute.md:17\nmsgid \"\"\n\"Attributes look like `#[outer_attribute]` or `#![inner_attribute]`, with the \"\n\"difference between them being where they apply.\"\nmsgstr \"\"\n\"属性的形式为 `#[outer_attribute]`（外部属性）或 `#![inner_attribute]`（内部属\"\n\"性），它们的区别在于应用的位置。\"\n\n#: src/attribute.md:20\nmsgid \"\"\n\"`#[outer_attribute]` applies to the [item](https://doc.rust-lang.org/stable/\"\n\"reference/items.html) immediately following it. Some examples of items are: \"\n\"a function, a module declaration, a constant, a structure, an enum. Here is \"\n\"an example where attribute `#[derive(Debug)]` applies to the struct \"\n\"`Rectangle`:\"\nmsgstr \"\"\n\"`#[outer_attribute]` 应用于紧随其后的[条目](https://doc.rust-lang.org/stable/\"\n\"reference/items.html)。条目的例子包括：函数、模块声明、常量、结构体、枚举等。\"\n\"以下是一个示例，其中属性 `#[derive(Debug)]` 应用于结构体 `Rectangle`：\"\n\n#: src/attribute.md:34\nmsgid \"\"\n\"`#![inner_attribute]` applies to the enclosing [item](https://doc.rust-\"\n\"lang.org/stable/reference/items.html) (typically a module or a crate). In \"\n\"other words, this attribute is interpreted as applying to the entire scope \"\n\"in which it's placed. Here is an example where `#![allow(unused_variables)]` \"\n\"applies to the whole crate (if placed in `main.rs`):\"\nmsgstr \"\"\n\"`#![inner_attribute]` 应用于包含它的[条目](https://doc.rust-lang.org/stable/\"\n\"reference/items.html)（通常是模块或 crate）。换句话说，这种属性被解释为应用于\"\n\"它所在的整个作用域。以下是一个示例，其中 `#![allow(unused_variables)]` 应用于\"\n\"整个 crate（如果放置在 `main.rs` 中）：\"\n\n#: src/attribute.md:44\nmsgid \"// This would normally warn about an unused variable.\\n\"\nmsgstr \"// 这通常会警告未使用的变量。\\n\"\n\n#: src/attribute.md:48\nmsgid \"Attributes can take arguments with different syntaxes:\"\nmsgstr \"属性可以使用不同的语法接受参数：\"\n\n#: src/attribute.md:50\nmsgid \"`#[attribute = \\\"value\\\"]`\"\nmsgstr \"`#[attribute = \\\"value\\\"]`\"\n\n#: src/attribute.md:51\nmsgid \"`#[attribute(key = \\\"value\\\")]`\"\nmsgstr \"`#[attribute(key = \\\"value\\\")]`\"\n\n#: src/attribute.md:52\nmsgid \"`#[attribute(value)]`\"\nmsgstr \"`#[attribute(value)]`\"\n\n#: src/attribute.md:54\nmsgid \"\"\n\"Attributes can have multiple values and can be separated over multiple \"\n\"lines, too:\"\nmsgstr \"属性可以有多个值，也可以跨多行分隔：\"\n\n#: src/attribute/unused.md:3\nmsgid \"\"\n\"The compiler provides a `dead_code` [_lint_](https://en.wikipedia.org/wiki/\"\n\"Lint_%28software%29) that will warn about unused functions. An _attribute_ \"\n\"can be used to disable the lint.\"\nmsgstr \"\"\n\"编译器提供了一个 `dead_code` [lint](https://en.wikipedia.org/wiki/\"\n\"Lint_%28software%29)，用于警告未使用的函数。可以使用**属性**来禁用这个 lint。\"\n\n#: src/attribute/unused.md:9\nmsgid \"\"\n\"// `#[allow(dead_code)]` is an attribute that disables the `dead_code` lint\\n\"\nmsgstr \"// `#[allow(dead_code)]` 是一个用于禁用 `dead_code` lint 的属性\\n\"\n\n#: src/attribute/unused.md:14\nmsgid \"// FIXME ^ Add an attribute to suppress the warning\\n\"\nmsgstr \"// FIXME ^ 添加一个属性来抑制警告\\n\"\n\n#: src/attribute/unused.md:22\nmsgid \"\"\n\"Note that in real programs, you should eliminate dead code. In these \"\n\"examples we'll allow dead code in some places because of the interactive \"\n\"nature of the examples.\"\nmsgstr \"\"\n\"注意，在实际程序中，你应该消除无用代码。在这些示例中，我们会在某些地方允许存\"\n\"在无用代码，这是因为这些示例具有交互性质。\"\n\n#: src/attribute/crate.md:3\nmsgid \"\"\n\"The `crate_type` attribute can be used to tell the compiler whether a crate \"\n\"is a binary or a library (and even which type of library), and the \"\n\"`crate_name` attribute can be used to set the name of the crate.\"\nmsgstr \"\"\n\"`crate_type` 属性可用于告诉编译器一个 crate 是二进制文件还是库（甚至是哪种类\"\n\"型的库），而 `crate_name` 属性可用于设置 crate 的名称。\"\n\n#: src/attribute/crate.md:7\nmsgid \"\"\n\"However, it is important to note that both the `crate_type` and `crate_name` \"\n\"attributes have **no** effect whatsoever when using Cargo, the Rust package \"\n\"manager. Since Cargo is used for the majority of Rust projects, this means \"\n\"real-world uses of `crate_type` and `crate_name` are relatively limited.\"\nmsgstr \"\"\n\"然而，需要注意的是，当使用 Rust 的包管理器 Cargo 时，`crate_type` 和 \"\n\"`crate_name` 属性**完全不起作用**。由于大多数 Rust 项目都使用 Cargo，这意味\"\n\"着 `crate_type` 和 `crate_name` 在实际使用中的应用相对有限。\"\n\n#: src/attribute/crate.md:13\nmsgid \"// This crate is a library\\n\"\nmsgstr \"// 这个 crate 是一个库\\n\"\n\n#: src/attribute/crate.md:14\nmsgid \"\\\"lib\\\"\"\nmsgstr \"\\\"lib\\\"\"\n\n#: src/attribute/crate.md:14\nmsgid \"// The library is named \\\"rary\\\"\\n\"\nmsgstr \"// 这个库的名称是 \\\"rary\\\"\\n\"\n\n#: src/attribute/crate.md:16\nmsgid \"\\\"rary\\\"\"\nmsgstr \"\\\"rary\\\"\"\n\n#: src/attribute/crate.md:33\nmsgid \"\"\n\"When the `crate_type` attribute is used, we no longer need to pass the `--\"\n\"crate-type` flag to `rustc`.\"\nmsgstr \"\"\n\"当使用 `crate_type` 属性时，我们就不再需要向 `rustc` 传递 `--crate-type` 标\"\n\"志。\"\n\n#: src/attribute/cfg.md:3\nmsgid \"\"\n\"Configuration conditional checks are possible through two different \"\n\"operators:\"\nmsgstr \"配置条件检查可以通过两种不同的操作符实现：\"\n\n#: src/attribute/cfg.md:5\nmsgid \"the `cfg` attribute: `#[cfg(...)]` in attribute position\"\nmsgstr \"`cfg` 属性：在属性位置使用 `#[cfg(...)]`\"\n\n#: src/attribute/cfg.md:6\nmsgid \"the `cfg!` macro: `cfg!(...)` in boolean expressions\"\nmsgstr \"`cfg!` 宏：在布尔表达式中使用 `cfg!(...)`\"\n\n#: src/attribute/cfg.md:8\nmsgid \"\"\n\"While the former enables conditional compilation, the latter conditionally \"\n\"evaluates to `true` or `false` literals allowing for checks at run-time. \"\n\"Both utilize identical argument syntax.\"\nmsgstr \"\"\n\"前者启用条件编译，后者在运行时条件性地求值为 `true` 或 `false` 字面量，允许在\"\n\"运行时进行检查。两者使用相同的参数语法。\"\n\n#: src/attribute/cfg.md:12\nmsgid \"\"\n\"`cfg!`, unlike `#[cfg]`, does not remove any code and only evaluates to true \"\n\"or false. For example, all blocks in an if/else expression need to be valid \"\n\"when `cfg!` is used for the condition, regardless of what `cfg!` is \"\n\"evaluating.\"\nmsgstr \"\"\n\"`cfg!` 与 `#[cfg]` 不同，它不会移除任何代码，只会求值为 true 或 false。例如，\"\n\"当 `cfg!` 用于条件时，if/else 表达式中的所有代码块都需要是有效的，无论 `cfg!\"\n\"` 正在评估什么。\"\n\n#: src/attribute/cfg.md:15\nmsgid \"// This function only gets compiled if the target OS is linux\\n\"\nmsgstr \"// 这个函数只有在目标操作系统是 linux 时才会被编译\\n\"\n\n#: src/attribute/cfg.md:16 src/attribute/cfg.md:22 src/attribute/cfg.md:31\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\\\"linux\\\"\"\n\n#: src/attribute/cfg.md:18\nmsgid \"\\\"You are running linux!\\\"\"\nmsgstr \"\\\"你正在运行 Linux！\\\"\"\n\n#: src/attribute/cfg.md:20\nmsgid \"\"\n\"// And this function only gets compiled if the target OS is *not* linux\\n\"\nmsgstr \"// 而这个函数只有在目标操作系统**不是** Linux 时才会被编译\\n\"\n\n#: src/attribute/cfg.md:24\nmsgid \"\\\"You are *not* running linux!\\\"\"\nmsgstr \"\\\"你**不是**在运行 Linux！\\\"\"\n\n#: src/attribute/cfg.md:30\nmsgid \"\\\"Are you sure?\\\"\"\nmsgstr \"\\\"你确定吗？\\\"\"\n\n#: src/attribute/cfg.md:32\nmsgid \"\\\"Yes. It's definitely linux!\\\"\"\nmsgstr \"\\\"是的，这绝对是 Linux！\\\"\"\n\n#: src/attribute/cfg.md:34\nmsgid \"\\\"Yes. It's definitely *not* linux!\\\"\"\nmsgstr \"\\\"是的，这绝对**不是** Linux！\\\"\"\n\n#: src/attribute/cfg.md:41\nmsgid \"\"\n\"[the reference](https://doc.rust-lang.org/reference/\"\n\"attributes.html#conditional-compilation), [`cfg!`](https://doc.rust-lang.org/\"\n\"std/macro.cfg!.html), and [macros](../macros.md).\"\nmsgstr \"\"\n\"[参考文档](https://doc.rust-lang.org/reference/attributes.html#conditional-\"\n\"compilation)、[`cfg!` 宏](https://doc.rust-lang.org/std/macro.cfg!.html)和\"\n\"[宏](../macros.md)。\"\n\n#: src/attribute/cfg/custom.md:3\nmsgid \"\"\n\"Some conditionals like `target_os` are implicitly provided by `rustc`, but \"\n\"custom conditionals must be passed to `rustc` using the `--cfg` flag.\"\nmsgstr \"\"\n\"一些条件（如 `target_os`）是由 `rustc` 隐式提供的，但自定义条件必须通过 `--\"\n\"cfg` 标志传递给 `rustc`。\"\n\n#: src/attribute/cfg/custom.md:9\nmsgid \"\\\"condition met!\\\"\"\nmsgstr \"\\\"条件满足！\\\"\"\n\n#: src/attribute/cfg/custom.md:17\nmsgid \"Try to run this to see what happens without the custom `cfg` flag.\"\nmsgstr \"尝试运行这段代码，看看没有自定义 `cfg` 标志会发生什么。\"\n\n#: src/attribute/cfg/custom.md:19\nmsgid \"With the custom `cfg` flag:\"\nmsgstr \"使用自定义 `cfg` 标志：\"\n\n#: src/generics.md:3\nmsgid \"\"\n\"_Generics_ is the topic of generalizing types and functionalities to broader \"\n\"cases. This is extremely useful for reducing code duplication in many ways, \"\n\"but can call for rather involved syntax. Namely, being generic requires \"\n\"taking great care to specify over which types a generic type is actually \"\n\"considered valid. The simplest and most common use of generics is for type \"\n\"parameters.\"\nmsgstr \"\"\n\"**泛型**是一个关于将类型和功能泛化以适用于更广泛情况的主题。这在多方面都非常\"\n\"有用，可以大大减少代码重复，但可能需要相对复杂的语法。具体来说，使用泛型需要\"\n\"非常谨慎地指定泛型类型在哪些类型上是有效的。泛型最简单和最常见的用途是类型参\"\n\"数。\"\n\n#: src/generics.md:10\nmsgid \"\"\n\"A type parameter is specified as generic by the use of angle brackets and \"\n\"upper [camel case](https://en.wikipedia.org/wiki/CamelCase): `<Aaa, \"\n\"Bbb, ...>`. \\\"Generic type parameters\\\" are typically represented as `<T>`. \"\n\"In Rust, \\\"generic\\\" also describes anything that accepts one or more \"\n\"generic type parameters `<T>`. Any type specified as a generic type \"\n\"parameter is generic, and everything else is concrete (non-generic).\"\nmsgstr \"\"\n\"类型参数通过使用尖括号和大写[驼峰命名法](https://en.wikipedia.org/wiki/\"\n\"CamelCase)来指定为泛型：`<Aaa, Bbb, ...>`。\\\"泛型类型参数\\\"通常表示为 `<T>`。\"\n\"在 Rust 中，\\\"泛型\\\"也用来描述任何接受一个或多个泛型类型参数 `<T>` 的东西。任\"\n\"何被指定为泛型类型参数的类型都是泛型的，而其他所有类型都是具体的（非泛型）。\"\n\n#: src/generics.md:16\nmsgid \"\"\n\"For example, defining a _generic function_ named `foo` that takes an \"\n\"argument `T` of any type:\"\nmsgstr \"\"\n\"例如，定义一个名为 `foo` 的**泛型函数**，它接受一个任意类型的参数 `T`：\"\n\n#: src/generics.md:23\nmsgid \"\"\n\"Because `T` has been specified as a generic type parameter using `<T>`, it \"\n\"is considered generic when used here as `(arg: T)`. This is the case even if \"\n\"`T` has previously been defined as a `struct`.\"\nmsgstr \"\"\n\"因为 `T` 已经使用 `<T>` 指定为泛型类型参数，所以在这里用作 `(arg: T)` 时被视\"\n\"为泛型。即使 `T` 之前已被定义为一个 `struct`，这种情况也成立。\"\n\n#: src/generics.md:27\nmsgid \"This example shows some of the syntax in action:\"\nmsgstr \"下面的例子展示了一些泛型语法的实际应用：\"\n\n#: src/generics.md:30\nmsgid \"// A concrete type `A`.\\n\"\nmsgstr \"// 具体类型 `A`\\n\"\n\n#: src/generics.md:32\nmsgid \"\"\n\"// In defining the type `Single`, the first use of `A` is not preceded by \"\n\"`<A>`.\\n\"\n\"// Therefore, `Single` is a concrete type, and `A` is defined as above.\\n\"\nmsgstr \"\"\n\"// 定义 `Single` 类型时，首次使用 `A` 前没有 `<A>`\\n\"\n\"// 因此，`Single` 是具体类型，`A` 即上面定义的类型\\n\"\n\n#: src/generics.md:35\nmsgid \"//            ^ Here is `Single`s first use of the type `A`.\\n\"\nmsgstr \"//            ^ 这里是 `Single` 首次使用 `A` 类型\\n\"\n\n#: src/generics.md:37\nmsgid \"\"\n\"// Here, `<T>` precedes the first use of `T`, so `SingleGen` is a generic \"\n\"type.\\n\"\n\"// Because the type parameter `T` is generic, it could be anything, \"\n\"including\\n\"\n\"// the concrete type `A` defined at the top.\\n\"\nmsgstr \"\"\n\"// 这里 `<T>` 在首次使用 `T` 之前，所以 `SingleGen` 是泛型\\n\"\n\"// 由于类型参数 `T` 是泛型，它可以是任何类型\\n\"\n\"// 包括上面定义的具体类型 `A`\\n\"\n\n#: src/generics.md:44\nmsgid \"// `Single` is concrete and explicitly takes `A`.\\n\"\nmsgstr \"// `Single` 是具体类型，明确接受 `A`\\n\"\n\n#: src/generics.md:47\nmsgid \"\"\n\"// Create a variable `_char` of type `SingleGen<char>`\\n\"\n\"    // and give it the value `SingleGen('a')`.\\n\"\n\"    // Here, `SingleGen` has a type parameter explicitly specified.\\n\"\nmsgstr \"\"\n\"// 创建 `SingleGen<char>` 类型的变量 `_char`\\n\"\n\"    // 并赋值为 `SingleGen('a')`\\n\"\n\"    // 这里 `SingleGen` 明确指定了类型参数\\n\"\n\n#: src/generics.md:52\nmsgid \"// `SingleGen` can also have a type parameter implicitly specified:\\n\"\nmsgstr \"// `SingleGen` 也可以隐式指定类型参数：\\n\"\n\n#: src/generics.md:53\nmsgid \"// Uses `A` defined at the top.\\n\"\nmsgstr \"// 使用上面定义的 `A`\\n\"\n\n#: src/generics.md:54\nmsgid \"// Uses `i32`.\\n\"\nmsgstr \"// 使用 `i32`\\n\"\n\n#: src/generics.md:55\nmsgid \"// Uses `char`.\\n\"\nmsgstr \"// 使用 `char`\\n\"\n\n#: src/generics.md:61\nmsgid \"[`structs`](custom_types/structs.md)\"\nmsgstr \"[`结构体`](custom_types/structs.md)\"\n\n#: src/generics/gen_fn.md:3\nmsgid \"\"\n\"The same set of rules can be applied to functions: a type `T` becomes \"\n\"generic when preceded by `<T>`.\"\nmsgstr \"同样的规则也适用于函数：当类型 `T` 前面加上 `<T>` 时，它就变成了泛型。\"\n\n#: src/generics/gen_fn.md:6\nmsgid \"\"\n\"Using generic functions sometimes requires explicitly specifying type \"\n\"parameters. This may be the case if the function is called where the return \"\n\"type is generic, or if the compiler doesn't have enough information to infer \"\n\"the necessary type parameters.\"\nmsgstr \"\"\n\"使用泛型函数有时需要明确指定类型参数。这种情况可能出现在函数返回类型是泛型\"\n\"时，或者编译器没有足够信息推断必要的类型参数时。\"\n\n#: src/generics/gen_fn.md:11\nmsgid \"\"\n\"A function call with explicitly specified type parameters looks like: `fun::\"\n\"<A, B, ...>()`.\"\nmsgstr \"明确指定类型参数的函数调用看起来像这样：`fun::<A, B, ...>()`。\"\n\n#: src/generics/gen_fn.md:15\nmsgid \"// Concrete type `A`.\\n\"\nmsgstr \"// 具体类型 `A`\\n\"\n\n#: src/generics/gen_fn.md:16\nmsgid \"// Concrete type `S`.\\n\"\nmsgstr \"// 具体类型 `S`\\n\"\n\n#: src/generics/gen_fn.md:17\nmsgid \"// Generic type `SGen`.\\n\"\nmsgstr \"// 泛型 `SGen`\\n\"\n\n#: src/generics/gen_fn.md:18\nmsgid \"\"\n\"// The following functions all take ownership of the variable passed into\\n\"\n\"// them and immediately go out of scope, freeing the variable.\\n\"\nmsgstr \"\"\n\"// 以下函数都获取传入变量的所有权\\n\"\n\"// 并立即离开作用域，释放该变量\\n\"\n\n#: src/generics/gen_fn.md:21\nmsgid \"\"\n\"// Define a function `reg_fn` that takes an argument `_s` of type `S`.\\n\"\n\"// This has no `<T>` so this is not a generic function.\\n\"\nmsgstr \"\"\n\"// 定义函数 `reg_fn`，接受一个 `S` 类型的参数 `_s`\\n\"\n\"// 由于没有 `<T>`，所以这不是泛型函数\\n\"\n\n#: src/generics/gen_fn.md:25\nmsgid \"\"\n\"// Define a function `gen_spec_t` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// It has been explicitly given the type parameter `A`, but because `A` has \"\n\"not\\n\"\n\"// been specified as a generic type parameter for `gen_spec_t`, it is not \"\n\"generic.\\n\"\nmsgstr \"\"\n\"// 定义函数 `gen_spec_t`，接受一个 `SGen<T>` 类型的参数 `_s`\\n\"\n\"// 虽然明确给定了类型参数 `A`，但因为 `A` 并未被指定为\\n\"\n\"// `gen_spec_t` 的泛型类型参数，所以这个函数不是泛型的\\n\"\n\n#: src/generics/gen_fn.md:30\nmsgid \"\"\n\"// Define a function `gen_spec_i32` that takes an argument `_s` of type \"\n\"`SGen<i32>`.\\n\"\n\"// It has been explicitly given the type parameter `i32`, which is a \"\n\"specific type.\\n\"\n\"// Because `i32` is not a generic type, this function is also not generic.\\n\"\nmsgstr \"\"\n\"// 定义函数 `gen_spec_i32`，接受一个 `SGen<i32>` 类型的参数 `_s`\\n\"\n\"// 明确指定了类型参数 `i32`，这是一个具体类型\\n\"\n\"// 由于 `i32` 不是泛型类型，所以这个函数也不是泛型的\\n\"\n\n#: src/generics/gen_fn.md:35\nmsgid \"\"\n\"// Define a function `generic` that takes an argument `_s` of type \"\n\"`SGen<T>`.\\n\"\n\"// Because `SGen<T>` is preceded by `<T>`, this function is generic over \"\n\"`T`.\\n\"\nmsgstr \"\"\n\"// 定义函数 `generic`，接受一个 `SGen<T>` 类型的参数 `_s`\\n\"\n\"// 由于 `SGen<T>` 前面有 `<T>`，所以这个函数是关于 `T` 的泛型函数\\n\"\n\n#: src/generics/gen_fn.md:41\nmsgid \"// Using the non-generic functions\\n\"\nmsgstr \"// 使用非泛型函数\\n\"\n\n#: src/generics/gen_fn.md:42\nmsgid \"// Concrete type.\\n\"\nmsgstr \"// 具体类型\\n\"\n\n#: src/generics/gen_fn.md:43\nmsgid \"// Implicitly specified type parameter `A`.\\n\"\nmsgstr \"// 隐式指定类型参数 `A`\\n\"\n\n#: src/generics/gen_fn.md:44\nmsgid \"// Implicitly specified type parameter `i32`.\\n\"\nmsgstr \"// 隐式指定类型参数 `i32`\\n\"\n\n#: src/generics/gen_fn.md:46\nmsgid \"// Explicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"// 为 `generic()` 显式指定类型参数 `char`\\n\"\n\n#: src/generics/gen_fn.md:49\nmsgid \"// Implicitly specified type parameter `char` to `generic()`.\\n\"\nmsgstr \"// 为 `generic()` 隐式指定类型参数 `char`\\n\"\n\n#: src/generics/gen_fn.md:50\nmsgid \"'c'\"\nmsgstr \"'c'\"\n\n#: src/generics/gen_fn.md:56\nmsgid \"[functions](../fn.md) and [`struct`s](../custom_types/structs.md)\"\nmsgstr \"[函数](../fn.md)和[`结构体`](../custom_types/structs.md)\"\n\n#: src/generics/impl.md:3\nmsgid \"Similar to functions, implementations require care to remain generic.\"\nmsgstr \"与函数类似，实现（`impl`）在涉及泛型时也需要谨慎处理。\"\n\n#: src/generics/impl.md:6\nmsgid \"// Concrete type `S`\\n\"\nmsgstr \"// 具体类型 `S`\\n\"\n\n#: src/generics/impl.md:7\nmsgid \"// Generic type `GenericVal`\\n\"\nmsgstr \"// 泛型类型 `GenericVal`\\n\"\n\n#: src/generics/impl.md:8\nmsgid \"// impl of GenericVal where we explicitly specify type parameters:\\n\"\nmsgstr \"// GenericVal 的实现，这里我们显式指定类型参数：\\n\"\n\n#: src/generics/impl.md:10\nmsgid \"// Specify `f32`\\n\"\nmsgstr \"// 指定 `f32`\\n\"\n\n#: src/generics/impl.md:11\nmsgid \"// Specify `S` as defined above\\n\"\nmsgstr \"// 指定上面定义的 `S`\\n\"\n\n#: src/generics/impl.md:12\nmsgid \"// `<T>` Must precede the type to remain generic\\n\"\nmsgstr \"// `<T>` 必须放在类型前面以保持泛型\\n\"\n\n#: src/generics/impl.md:25\nmsgid \"// impl of Val\\n\"\nmsgstr \"// Val 的实现\\n\"\n\n#: src/generics/impl.md:32\nmsgid \"// impl of GenVal for a generic type `T`\\n\"\nmsgstr \"// 为泛型类型 `T` 实现 GenVal\\n\"\n\n#: src/generics/impl.md:50\nmsgid \"\"\n\"[functions returning references](../scope/lifetime/fn.md), [`impl`](../fn/\"\n\"methods.md), and [`struct`](../custom_types/structs.md)\"\nmsgstr \"\"\n\"[返回引用的函数](../scope/lifetime/fn.md)、[`impl`](../fn/methods.md) 和[结构\"\n\"体](../custom_types/structs.md)\"\n\n#: src/generics/gen_trait.md:3\nmsgid \"\"\n\"Of course `trait`s can also be generic. Here we define one which \"\n\"reimplements the `Drop` `trait` as a generic method to `drop` itself and an \"\n\"input.\"\nmsgstr \"\"\n\"当然，`trait` 也可以是泛型的。这里我们定义了一个泛型 trait，它重新实现了 \"\n\"`Drop` trait，用于释放自身和一个输入参数。\"\n\n#: src/generics/gen_trait.md:7\nmsgid \"// Non-copyable types.\\n\"\nmsgstr \"// 不可复制的类型。\\n\"\n\n#: src/generics/gen_trait.md:10\nmsgid \"// A trait generic over `T`.\\n\"\nmsgstr \"// 一个泛型 trait，使用类型参数 `T`。\\n\"\n\n#: src/generics/gen_trait.md:13\nmsgid \"\"\n\"// Define a method on the caller type which takes an\\n\"\n\"    // additional single parameter `T` and does nothing with it.\\n\"\nmsgstr \"\"\n\"// 在调用者类型上定义一个方法，该方法接受一个\\n\"\n\"    // 额外的类型为 `T` 的参数，但不对其进行任何操作。\\n\"\n\n#: src/generics/gen_trait.md:17\nmsgid \"\"\n\"// Implement `DoubleDrop<T>` for any generic parameter `T` and\\n\"\n\"// caller `U`.\\n\"\nmsgstr \"// 为任意泛型参数 `T` 和调用者 `U` 实现 `DoubleDrop<T>`。\\n\"\n\n#: src/generics/gen_trait.md:21\nmsgid \"\"\n\"// This method takes ownership of both passed arguments,\\n\"\n\"    // deallocating both.\\n\"\nmsgstr \"\"\n\"// 此方法获取两个传入参数的所有权，\\n\"\n\"    // 并释放它们的内存。\\n\"\n\n#: src/generics/gen_trait.md:30\nmsgid \"// Deallocate `empty` and `null`.\\n\"\nmsgstr \"// 释放 `empty` 和 `null` 的内存。\\n\"\n\n#: src/generics/gen_trait.md:33\nmsgid \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO: Try uncommenting these lines.\\n\"\nmsgstr \"\"\n\"//empty;\\n\"\n\"    //null;\\n\"\n\"    // ^ TODO：尝试取消这些行的注释。\\n\"\n\n#: src/generics/gen_trait.md:41\nmsgid \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html), [`struct`](../\"\n\"custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html)、[`struct`](../\"\n\"custom_types/structs.md) 和 [`trait`](../trait.md)\"\n\n#: src/generics/bounds.md:3\nmsgid \"\"\n\"When working with generics, the type parameters often must use traits as \"\n\"_bounds_ to stipulate what functionality a type implements. For example, the \"\n\"following example uses the trait `Display` to print and so it requires `T` \"\n\"to be bound by `Display`; that is, `T` _must_ implement `Display`.\"\nmsgstr \"\"\n\"在使用泛型时，类型参数通常需要使用 trait 作为**约束**，以规定类型应实现哪些功\"\n\"能。例如，下面的示例使用 `Display` trait 来打印，因此它要求 `T` 必须受 \"\n\"`Display` 约束；换句话说，`T` **必须**实现 `Display`。\"\n\n#: src/generics/bounds.md:9\nmsgid \"\"\n\"// Define a function `printer` that takes a generic type `T` which\\n\"\n\"// must implement trait `Display`.\\n\"\nmsgstr \"\"\n\"// 定义一个函数 `printer`，它接受一个泛型类型 `T`，\\n\"\n\"// 该类型必须实现 `Display` trait。\\n\"\n\n#: src/generics/bounds.md:16\nmsgid \"\"\n\"Bounding restricts the generic to types that conform to the bounds. That is:\"\nmsgstr \"约束将泛型限制为符合约束条件的类型。也就是说：\"\n\n#: src/generics/bounds.md:20\nmsgid \"\"\n\"// Error! `Vec<T>` does not implement `Display`. This\\n\"\n\"// specialization will fail.\\n\"\nmsgstr \"\"\n\"// 错误！`Vec<T>` 没有实现 `Display`。\\n\"\n\"// 这个特化将会失败。\\n\"\n\n#: src/generics/bounds.md:26\nmsgid \"\"\n\"Another effect of bounding is that generic instances are allowed to access \"\n\"the [methods](../fn/methods.md) of traits specified in the bounds. For \"\n\"example:\"\nmsgstr \"\"\n\"约束的另一个作用是允许泛型实例访问约束中指定的 trait 的[方法](../fn/\"\n\"methods.md)。例如：\"\n\n#: src/generics/bounds.md:30\nmsgid \"// A trait which implements the print marker: `{:?}`.\\n\"\nmsgstr \"// 实现打印标记 `{:?}` 的 trait。\\n\"\n\n#: src/generics/bounds.md:45\nmsgid \"\"\n\"// The generic `T` must implement `Debug`. Regardless\\n\"\n\"// of the type, this will work properly.\\n\"\nmsgstr \"\"\n\"// 泛型 `T` 必须实现 `Debug`。无论 `T` 是什么类型，\\n\"\n\"// 这个函数都能正常工作。\\n\"\n\n#: src/generics/bounds.md:51\nmsgid \"\"\n\"// `T` must implement `HasArea`. Any type which meets\\n\"\n\"// the bound can access `HasArea`'s function `area`.\\n\"\nmsgstr \"\"\n\"// `T` 必须实现 `HasArea`。任何满足这个约束的类型\\n\"\n\"// 都可以访问 `HasArea` 的 `area` 方法。\\n\"\n\n#: src/generics/bounds.md:61\nmsgid \"\\\"Area: {}\\\"\"\nmsgstr \"\\\"面积：{}\\\"\"\n\n#: src/generics/bounds.md:63\nmsgid \"\"\n\"//print_debug(&_triangle);\\n\"\n\"    //println!(\\\"Area: {}\\\", area(&_triangle));\\n\"\n\"    // ^ TODO: Try uncommenting these.\\n\"\n\"    // | Error: Does not implement either `Debug` or `HasArea`.\\n\"\nmsgstr \"\"\n\"//print_debug(&_triangle);\\n\"\n\"    //println!(\\\"面积：{}\\\", area(&_triangle));\\n\"\n\"    // ^ TODO：尝试取消这些注释。\\n\"\n\"    // | 错误：未实现 `Debug` 或 `HasArea`。\\n\"\n\n#: src/generics/bounds.md:70\nmsgid \"\"\n\"As an additional note, [`where`](../generics/where.md) clauses can also be \"\n\"used to apply bounds in some cases to be more expressive.\"\nmsgstr \"\"\n\"另外值得注意的是，在某些情况下可以使用 [`where`](../generics/where.md) 子句来\"\n\"应用约束，以使表达更加清晰。\"\n\n#: src/generics/bounds.md:75\nmsgid \"\"\n\"[`std::fmt`](../hello/print.md), [`struct`s](../custom_types/structs.md), \"\n\"and [`trait`s](../trait.md)\"\nmsgstr \"\"\n\"[`std::fmt`](../hello/print.md)、[`struct`](../custom_types/structs.md)和 \"\n\"[`trait`](../trait.md)\"\n\n#: src/generics/bounds/testcase_empty.md:3\nmsgid \"\"\n\"A consequence of how bounds work is that even if a `trait` doesn't include \"\n\"any functionality, you can still use it as a bound. `Eq` and `Copy` are \"\n\"examples of such `trait`s from the `std` library.\"\nmsgstr \"\"\n\"约束的工作机制导致即使一个 `trait` 不包含任何功能，你仍然可以将其用作约束。\"\n\"`std` 库中的 `Eq` 和 `Copy` 就是这种 `trait` 的例子。\"\n\n#: src/generics/bounds/testcase_empty.md:17\nmsgid \"\"\n\"// These functions are only valid for types which implement these\\n\"\n\"// traits. The fact that the traits are empty is irrelevant.\\n\"\nmsgstr \"\"\n\"// 这些函数只对实现了这些 trait 的类型有效。\\n\"\n\"// 这些 trait 是否为空并不重要。\\n\"\n\n#: src/generics/bounds/testcase_empty.md:20\nmsgid \"\\\"red\\\"\"\nmsgstr \"\\\"红色\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:21\nmsgid \"\\\"blue\\\"\"\nmsgstr \"\\\"蓝色\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:28\nmsgid \"\"\n\"// `red()` won't work on a blue jay nor vice versa\\n\"\n\"    // because of the bounds.\\n\"\nmsgstr \"// 由于约束的存在，`red()` 不能用于蓝松鸟，反之亦然。\\n\"\n\n#: src/generics/bounds/testcase_empty.md:30\nmsgid \"\\\"A cardinal is {}\\\"\"\nmsgstr \"\\\"红雀是{}\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:31\nmsgid \"\\\"A blue jay is {}\\\"\"\nmsgstr \"\\\"蓝松鸟是{}\\\"\"\n\n#: src/generics/bounds/testcase_empty.md:32\nmsgid \"\"\n\"//println!(\\\"A turkey is {}\\\", red(&_turkey));\\n\"\n\"    // ^ TODO: Try uncommenting this line.\\n\"\nmsgstr \"\"\n\"//println!(\\\"火鸡是{}\\\", red(&_turkey));\\n\"\n\"    // ^ TODO：尝试取消这行的注释。\\n\"\n\n#: src/generics/bounds/testcase_empty.md:39\nmsgid \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`std::marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html), \"\n\"and [`trait`s](../../trait.md)\"\nmsgstr \"\"\n\"[`std::cmp::Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html)、\"\n\"[`std::marker::Copy`](https://doc.rust-lang.org/std/marker/trait.Copy.html) \"\n\"和 [`trait`](../../trait.md)\"\n\n#: src/generics/multi_bounds.md:3\nmsgid \"\"\n\"Multiple bounds for a single type can be applied with a `+`. Like normal, \"\n\"different types are separated with `,`.\"\nmsgstr \"可以使用 `+` 为单个类型指定多个约束。按照惯例，不同的类型用 `,` 分隔。\"\n\n#: src/generics/multi_bounds.md:10\nmsgid \"\\\"Debug: `{:?}`\\\"\"\nmsgstr \"\\\"Debug：`{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:11\nmsgid \"\\\"Display: `{}`\\\"\"\nmsgstr \"\\\"Display：`{}`\\\"\"\n\n#: src/generics/multi_bounds.md:15\nmsgid \"\\\"t: `{:?}`\\\"\"\nmsgstr \"\\\"t：`{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:16\nmsgid \"\\\"u: `{:?}`\\\"\"\nmsgstr \"\\\"u：`{:?}`\\\"\"\n\n#: src/generics/multi_bounds.md:20\nmsgid \"\\\"words\\\"\"\nmsgstr \"\\\"words\\\"\"\n\n#: src/generics/multi_bounds.md:25\nmsgid \"\"\n\"//compare_prints(&array);\\n\"\n\"    // TODO ^ Try uncommenting this.\\n\"\nmsgstr \"\"\n\"//compare_prints(&array);\\n\"\n\"    // TODO：尝试取消此行注释。\\n\"\n\n#: src/generics/multi_bounds.md:34\nmsgid \"[`std::fmt`](../hello/print.md) and [`trait`s](../trait.md)\"\nmsgstr \"[`std::fmt`](../hello/print.md) 和 [`trait`](../trait.md)\"\n\n#: src/generics/where.md:3\nmsgid \"\"\n\"A bound can also be expressed using a `where` clause immediately before the \"\n\"opening `{`, rather than at the type's first mention. Additionally, `where` \"\n\"clauses can apply bounds to arbitrary types, rather than just to type \"\n\"parameters.\"\nmsgstr \"\"\n\"约束也可以使用 `where` 子句来表达，它位于开括号 `{` 之前，而不是在类型首次提\"\n\"及时。此外，`where` 子句可以将约束应用于任意类型，而不仅限于类型参数。\"\n\n#: src/generics/where.md:8\nmsgid \"Some cases that a `where` clause is useful:\"\nmsgstr \"`where` 子句在以下情况下特别有用：\"\n\n#: src/generics/where.md:10\nmsgid \"When specifying generic types and bounds separately is clearer:\"\nmsgstr \"当单独指定泛型类型和约束更清晰时：\"\n\n#: src/generics/where.md:14\nmsgid \"// Expressing bounds with a `where` clause\\n\"\nmsgstr \"// 使用 `where` 子句表达约束\\n\"\n\n#: src/generics/where.md:21\nmsgid \"\"\n\"When using a `where` clause is more expressive than using normal syntax. The \"\n\"`impl` in this example cannot be directly expressed without a `where` clause:\"\nmsgstr \"\"\n\"当使用 `where` 子句比使用普通语法更具表现力时。这个例子中的 `impl` 如果不使\"\n\"用 `where` 子句就无法直接表达：\"\n\n#: src/generics/where.md:30\nmsgid \"\"\n\"// Because we would otherwise have to express this as `T: Debug` or\\n\"\n\"// use another method of indirect approach, this requires a `where` clause:\\n\"\nmsgstr \"\"\n\"// 这里需要一个 `where` 子句：否则就必须将其表达为 `T: Debug` 或\\n\"\n\"// 使用另一种间接方法，\\n\"\n\n#: src/generics/where.md:35\nmsgid \"\"\n\"// We want `Option<T>: Debug` as our bound because that is what's\\n\"\n\"    // being printed. Doing otherwise would be using the wrong bound.\\n\"\nmsgstr \"\"\n\"// 我们需要 `Option<T>: Debug` 作为我们的约束，因为这是\\n\"\n\"    // 正在被打印的内容。否则就会使用错误的约束。\\n\"\n\n#: src/generics/where.md:51\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md), \"\n\"[`struct`](../custom_types/structs.md), and [`trait`](../trait.md)\"\nmsgstr \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md)、\"\n\"[`struct`](../custom_types/structs.md) 和 [`trait`](../trait.md)\"\n\n#: src/generics/new_types.md:3\nmsgid \"\"\n\"The `newtype` idiom gives compile time guarantees that the right type of \"\n\"value is supplied to a program.\"\nmsgstr \"`newtype` 模式在编译时保证了程序接收到正确类型的值。\"\n\n#: src/generics/new_types.md:6\nmsgid \"\"\n\"For example, an age verification function that checks age in years, _must_ \"\n\"be given a value of type `Years`.\"\nmsgstr \"\"\n\"例如，一个检查年龄（以年为单位）的年龄验证函数，**必须**接收 `Years` 类型的\"\n\"值。\"\n\n#: src/generics/new_types.md:21\nmsgid \"/// truncates partial years\\n\"\nmsgstr \"/// 截断不足一年的部分\\n\"\n\n#: src/generics/new_types.md:34 src/generics/new_types.md:35\nmsgid \"\\\"Is an adult? {}\\\"\"\nmsgstr \"\\\"是否成年？{}\\\"\"\n\n#: src/generics/new_types.md:36\nmsgid \"// println!(\\\"Is an adult? {}\\\", is_adult(&age_days));\\n\"\nmsgstr \"// println!(\\\"是否成年？{}\\\", is_adult(&age_days));\\n\"\n\n#: src/generics/new_types.md:40\nmsgid \"\"\n\"Uncomment the last print statement to observe that the type supplied must be \"\n\"`Years`.\"\nmsgstr \"取消最后一个 print 语句的注释，你会发现所提供的类型必须是 `Years`。\"\n\n#: src/generics/new_types.md:42\nmsgid \"\"\n\"To obtain the `newtype`'s value as the base type, you may use the tuple or \"\n\"destructuring syntax like so:\"\nmsgstr \"\"\n\"要获取 `newtype` 的基本类型值，你可以使用元组语法或解构语法，如下所示：\"\n\n#: src/generics/new_types.md:49\nmsgid \"// Tuple\\n\"\nmsgstr \"// 元组语法\\n\"\n\n#: src/generics/new_types.md:50\nmsgid \"// Destructuring\\n\"\nmsgstr \"// 解构语法\\n\"\n\n#: src/generics/new_types.md:56\nmsgid \"[`structs`](../custom_types/structs.md)\"\nmsgstr \"[`struct`](../custom_types/structs.md)\"\n\n#: src/generics/assoc_items.md:3\nmsgid \"\"\n\"\\\"Associated Items\\\" refers to a set of rules pertaining to [`item`](https://\"\n\"doc.rust-lang.org/reference/items.html)s of various types. It is an \"\n\"extension to `trait` generics, and allows `trait`s to internally define new \"\n\"items.\"\nmsgstr \"\"\n\"\\\"关联项\\\"是指与各种类型的[`项`](https://doc.rust-lang.org/reference/\"\n\"items.html)相关的一组规则。它是 `trait` 泛型的扩展，允许 `trait` 在内部定义新\"\n\"的项。\"\n\n#: src/generics/assoc_items.md:7\nmsgid \"\"\n\"One such item is called an _associated type_, providing simpler usage \"\n\"patterns when the `trait` is generic over its container type.\"\nmsgstr \"\"\n\"其中一种项被称为**关联类型**，当 `trait` 对其容器类型是泛型时，它提供了更简洁\"\n\"的使用模式。\"\n\n#: src/generics/assoc_items.md:12\nmsgid \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\nmsgstr \"\"\n\"[RFC](https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-\"\n\"items.md)\"\n\n#: src/generics/assoc_items/the_problem.md:3\nmsgid \"\"\n\"A `trait` that is generic over its container type has type specification \"\n\"requirements - users of the `trait` _must_ specify all of its generic types.\"\nmsgstr \"\"\n\"对于容器类型是泛型的 `trait`，有类型规范要求 —— `trait` 的使用者**必须**指定\"\n\"所有的泛型类型。\"\n\n#: src/generics/assoc_items/the_problem.md:6\nmsgid \"\"\n\"In the example below, the `Contains` `trait` allows the use of the generic \"\n\"types `A` and `B`. The trait is then implemented for the `Container` type, \"\n\"specifying `i32` for `A` and `B` so that it can be used with `fn \"\n\"difference()`.\"\nmsgstr \"\"\n\"在下面的例子中，`Contains` trait 允许使用泛型类型 `A` 和 `B`。然后为 \"\n\"`Container` 类型实现该 trait，将 `A` 和 `B` 指定为 `i32`，以便与 `fn \"\n\"difference()` 一起使用。\"\n\n#: src/generics/assoc_items/the_problem.md:10\nmsgid \"\"\n\"Because `Contains` is generic, we are forced to explicitly state _all_ of \"\n\"the generic types for `fn difference()`. In practice, we want a way to \"\n\"express that `A` and `B` are determined by the _input_ `C`. As you will see \"\n\"in the next section, associated types provide exactly that capability.\"\nmsgstr \"\"\n\"由于 `Contains` 是泛型的，我们不得不为 `fn difference()` 显式声明**所有**泛型\"\n\"类型。实际上，我们希望有一种方法来表达 `A` 和 `B` 是由**输入** `C` 决定的。正\"\n\"如你将在下一节中看到的，关联类型恰好提供了这种能力。\"\n\n#: src/generics/assoc_items/the_problem.md:17\n#: src/generics/assoc_items/types.md:36\nmsgid \"\"\n\"// A trait which checks if 2 items are stored inside of container.\\n\"\n\"// Also retrieves first or last value.\\n\"\nmsgstr \"\"\n\"// 一个检查容器内是否存储了两个项的 trait。\\n\"\n\"// 同时可以检索第一个或最后一个值。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:21\nmsgid \"// Explicitly requires `A` and `B`.\\n\"\nmsgstr \"// 显式要求 `A` 和 `B`\\n\"\n\n#: src/generics/assoc_items/the_problem.md:22\n#: src/generics/assoc_items/the_problem.md:23\nmsgid \"// Doesn't explicitly require `A` or `B`.\\n\"\nmsgstr \"// 不需要显式指定 `A` 或 `B`\\n\"\n\n#: src/generics/assoc_items/the_problem.md:27\nmsgid \"// True if the numbers stored are equal.\\n\"\nmsgstr \"// 如果存储的数字相等则返回 true\\n\"\n\n#: src/generics/assoc_items/the_problem.md:32\n#: src/generics/assoc_items/types.md:60\nmsgid \"// Grab the first number.\\n\"\nmsgstr \"// 获取第一个数字\\n\"\n\n#: src/generics/assoc_items/the_problem.md:35\n#: src/generics/assoc_items/types.md:63\nmsgid \"// Grab the last number.\\n\"\nmsgstr \"// 获取最后一个数字\\n\"\n\n#: src/generics/assoc_items/the_problem.md:38\nmsgid \"\"\n\"// `C` contains `A` and `B`. In light of that, having to express `A` and\\n\"\n\"// `B` again is a nuisance.\\n\"\nmsgstr \"\"\n\"// `C` 已经包含了 `A` 和 `B`。考虑到这一点，\\n\"\n\"// 再次指定 `A` 和 `B` 就显得多余且麻烦。\\n\"\n\n#: src/generics/assoc_items/the_problem.md:52\n#: src/generics/assoc_items/types.md:77\nmsgid \"\\\"Does container contain {} and {}: {}\\\"\"\nmsgstr \"\\\"容器是否包含 {} 和 {}：{}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:55\n#: src/generics/assoc_items/types.md:80\nmsgid \"\\\"First number: {}\\\"\"\nmsgstr \"\\\"第一个数字：{}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:56\n#: src/generics/assoc_items/types.md:81\nmsgid \"\\\"Last number: {}\\\"\"\nmsgstr \"\\\"最后一个数字：{}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:58\n#: src/generics/assoc_items/types.md:83\nmsgid \"\\\"The difference is: {}\\\"\"\nmsgstr \"\\\"差值为：{}\\\"\"\n\n#: src/generics/assoc_items/the_problem.md:64\nmsgid \"\"\n\"[`struct`s](../../custom_types/structs.md), and [`trait`s](../../trait.md)\"\nmsgstr \"[`struct`](../../custom_types/structs.md) 和 [`trait`](../../trait.md)\"\n\n#: src/generics/assoc_items/types.md:3\nmsgid \"\"\n\"The use of \\\"Associated types\\\" improves the overall readability of code by \"\n\"moving inner types locally into a trait as _output_ types. Syntax for the \"\n\"`trait` definition is as follows:\"\nmsgstr \"\"\n\"使用\\\"关联类型\\\"通过将内部类型局部移动到 trait 中作为**输出**类型，提高了代码\"\n\"的整体可读性。trait 定义的语法如下：\"\n\n#: src/generics/assoc_items/types.md:8\nmsgid \"\"\n\"// `A` and `B` are defined in the trait via the `type` keyword.\\n\"\n\"// (Note: `type` in this context is different from `type` when used for\\n\"\n\"// aliases).\\n\"\nmsgstr \"\"\n\"// `A` 和 `B` 在 trait 中通过 `type` 关键字定义。\\n\"\n\"// （注意：这里的 `type` 与用于类型别名的 `type` 不同）\\n\"\n\n#: src/generics/assoc_items/types.md:15\nmsgid \"// Updated syntax to refer to these new types generically.\\n\"\nmsgstr \"// 更新后的语法，用于泛型地引用这些新类型\\n\"\n\n#: src/generics/assoc_items/types.md:20\nmsgid \"\"\n\"Note that functions that use the `trait` `Contains` are no longer required \"\n\"to express `A` or `B` at all:\"\nmsgstr \"注意，使用 `Contains` trait 的函数不再需要显式指定 `A` 或 `B`：\"\n\n#: src/generics/assoc_items/types.md:24\nmsgid \"// Without using associated types\\n\"\nmsgstr \"// 不使用关联类型\\n\"\n\n#: src/generics/assoc_items/types.md:27\nmsgid \"// Using associated types\\n\"\nmsgstr \"// 使用关联类型\\n\"\n\n#: src/generics/assoc_items/types.md:32\nmsgid \"\"\n\"Let's rewrite the example from the previous section using associated types:\"\nmsgstr \"让我们使用关联类型重写上一节的示例：\"\n\n#: src/generics/assoc_items/types.md:40\nmsgid \"// Define generic types here which methods will be able to utilize.\\n\"\nmsgstr \"// 在此定义泛型类型，方法将能够使用这些类型\\n\"\n\n#: src/generics/assoc_items/types.md:50\nmsgid \"\"\n\"// Specify what types `A` and `B` are. If the `input` type\\n\"\n\"    // is `Container(i32, i32)`, the `output` types are determined\\n\"\n\"    // as `i32` and `i32`.\\n\"\nmsgstr \"\"\n\"// 指定 `A` 和 `B` 的具体类型。如果 `input` 类型\\n\"\n\"    // 是 `Container(i32, i32)`，那么 `output` 类型\\n\"\n\"    // 就被确定为 `i32` 和 `i32`\\n\"\n\n#: src/generics/assoc_items/types.md:56\nmsgid \"// `&Self::A` and `&Self::B` are also valid here.\\n\"\nmsgstr \"// 在这里使用 `&Self::A` 和 `&Self::B` 也是有效的。\\n\"\n\n#: src/generics/phantom.md:3\nmsgid \"\"\n\"A phantom type parameter is one that doesn't show up at runtime, but is \"\n\"checked statically (and only) at compile time.\"\nmsgstr \"虚类型参数是一种在运行时不会出现，但在编译时会进行静态检查的类型参数。\"\n\n#: src/generics/phantom.md:6\nmsgid \"\"\n\"Data types can use extra generic type parameters to act as markers or to \"\n\"perform type checking at compile time. These extra parameters hold no \"\n\"storage values, and have no runtime behavior.\"\nmsgstr \"\"\n\"数据类型可以使用额外的泛型类型参数作为标记，或在编译时进行类型检查。这些额外\"\n\"的参数不占用存储空间，也没有运行时行为。\"\n\n#: src/generics/phantom.md:10\nmsgid \"\"\n\"In the following example, we combine [std::marker::PhantomData](https://\"\n\"doc.rust-lang.org/std/marker/struct.PhantomData.html) with the phantom type \"\n\"parameter concept to create tuples containing different data types.\"\nmsgstr \"\"\n\"在下面的示例中，我们将 [`std::marker::PhantomData`](https://doc.rust-\"\n\"lang.org/std/marker/struct.PhantomData.html) 与虚类型参数的概念结合，创建包含\"\n\"不同数据类型的元组。\"\n\n#: src/generics/phantom.md:16\nmsgid \"\"\n\"// A phantom tuple struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"// 一个虚元组结构体，它在 `A` 上是泛型的，带有隐藏参数 `B`。\\n\"\n\n#: src/generics/phantom.md:18 src/generics/phantom.md:22\nmsgid \"// Allow equality test for this type.\\n\"\nmsgstr \"// 允许对此类型进行相等性测试。\\n\"\n\n#: src/generics/phantom.md:20\nmsgid \"\"\n\"// A phantom type struct which is generic over `A` with hidden parameter \"\n\"`B`.\\n\"\nmsgstr \"// 一个虚类型结构体，它在 `A` 上是泛型的，带有隐藏参数 `B`。\\n\"\n\n#: src/generics/phantom.md:24\nmsgid \"\"\n\"// Note: Storage is allocated for generic type `A`, but not for `B`.\\n\"\n\"//       Therefore, `B` cannot be used in computations.\\n\"\nmsgstr \"\"\n\"// 注意：为泛型类型 `A` 分配了存储空间，但没有为 `B` 分配。\\n\"\n\"//       因此，`B` 不能用于计算。\\n\"\n\n#: src/generics/phantom.md:29\nmsgid \"\"\n\"// Here, `f32` and `f64` are the hidden parameters.\\n\"\n\"    // PhantomTuple type specified as `<char, f32>`.\\n\"\nmsgstr \"\"\n\"// 这里，`f32` 和 `f64` 是隐藏参数。\\n\"\n\"    // PhantomTuple 类型指定为 `<char, f32>`。\\n\"\n\n#: src/generics/phantom.md:31 src/generics/phantom.md:33\n#: src/generics/phantom.md:37 src/generics/phantom.md:42\n#: src/scope/borrow/ref.md:12\nmsgid \"'Q'\"\nmsgstr \"'Q'\"\n\n#: src/generics/phantom.md:32\nmsgid \"// PhantomTuple type specified as `<char, f64>`.\\n\"\nmsgstr \"// PhantomTuple 类型指定为 `<char, f64>`。\\n\"\n\n#: src/generics/phantom.md:35\nmsgid \"// Type specified as `<char, f32>`.\\n\"\nmsgstr \"// 类型指定为 `<char, f32>`。\\n\"\n\n#: src/generics/phantom.md:40\nmsgid \"// Type specified as `<char, f64>`.\\n\"\nmsgstr \"// 类型指定为 `<char, f64>`。\\n\"\n\n#: src/generics/phantom.md:46\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 yields: {}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\nmsgstr \"\"\n\"// 编译时错误！类型不匹配，无法比较：\\n\"\n\"    // println!(\\\"_tuple1 == _tuple2 的结果是：{}\\\",\\n\"\n\"    //           _tuple1 == _tuple2);\\n\"\n\n#: src/generics/phantom.md:50\nmsgid \"\"\n\"// Compile-time Error! Type mismatch so these cannot be compared:\\n\"\n\"    // println!(\\\"_struct1 == _struct2 yields: {}\\\",\\n\"\n\"    //           _struct1 == _struct2);\\n\"\nmsgstr \"\"\n\"// 编译时错误！类型不匹配，无法比较：\\n\"\n\"    // println!(\\\"_struct1 == _struct2 的结果是：{}\\\",\\n\"\n\"    //           _struct1 == _struct2);\\n\"\n\n#: src/generics/phantom.md:58\nmsgid \"\"\n\"[Derive](../trait/derive.md), [struct](../custom_types/structs.md), and \"\n\"[TupleStructs](../custom_types/structs.md)\"\nmsgstr \"\"\n\"[派生（Derive）](../trait/derive.md)、[结构体（struct）](../custom_types/\"\n\"structs.md)和[元组结构体（TupleStructs）](../custom_types/structs.md)\"\n\n#: src/generics/phantom/testcase_units.md:3\nmsgid \"\"\n\"A useful method of unit conversions can be examined by implementing `Add` \"\n\"with a phantom type parameter. The `Add` `trait` is examined below:\"\nmsgstr \"\"\n\"通过使用虚类型参数实现 `Add` trait，我们可以探索一种有用的单位转换方法。下面\"\n\"我们来看看 `Add` trait：\"\n\n#: src/generics/phantom/testcase_units.md:7\nmsgid \"\"\n\"// This construction would impose: `Self + RHS = Output`\\n\"\n\"// where RHS defaults to Self if not specified in the implementation.\\n\"\nmsgstr \"\"\n\"// 这个结构会强制要求：`Self + RHS = Output`\\n\"\n\"// 其中，如果在实现中未指定 RHS，它将默认为 Self。\\n\"\n\n#: src/generics/phantom/testcase_units.md:14\nmsgid \"// `Output` must be `T<U>` so that `T<U> + T<U> = T<U>`.\\n\"\nmsgstr \"// `Output` 必须是 `T<U>`，以确保 `T<U> + T<U> = T<U>`。\\n\"\n\n#: src/generics/phantom/testcase_units.md:22\nmsgid \"The whole implementation:\"\nmsgstr \"完整实现如下：\"\n\n#: src/generics/phantom/testcase_units.md:27\nmsgid \"/// Create void enumerations to define unit types.\\n\"\nmsgstr \"/// 创建空枚举以定义单位类型。\\n\"\n\n#: src/generics/phantom/testcase_units.md:33\nmsgid \"\"\n\"/// `Length` is a type with phantom type parameter `Unit`,\\n\"\n\"/// and is not generic over the length type (that is `f64`).\\n\"\n\"///\\n\"\n\"/// `f64` already implements the `Clone` and `Copy` traits.\\n\"\nmsgstr \"\"\n\"/// `Length` 是一个带有虚类型参数 `Unit` 的类型，\\n\"\n\"/// 它不是长度类型（即 `f64`）的泛型。\\n\"\n\"///\\n\"\n\"/// `f64` 已经实现了 `Clone` 和 `Copy` trait。\\n\"\n\n#: src/generics/phantom/testcase_units.md:40\nmsgid \"/// The `Add` trait defines the behavior of the `+` operator.\\n\"\nmsgstr \"/// `Add` trait 定义了 `+` 运算符的行为。\\n\"\n\n#: src/generics/phantom/testcase_units.md:45\nmsgid \"// add() returns a new `Length` struct containing the sum.\\n\"\nmsgstr \"// add() 返回一个包含和的新 `Length` 结构体。\\n\"\n\n#: src/generics/phantom/testcase_units.md:47\nmsgid \"// `+` calls the `Add` implementation for `f64`.\\n\"\nmsgstr \"// `+` 调用 `f64` 的 `Add` 实现。\\n\"\n\n#: src/generics/phantom/testcase_units.md:53\nmsgid \"// Specifies `one_foot` to have phantom type parameter `Inch`.\\n\"\nmsgstr \"// 指定 `one_foot` 具有虚类型参数 `Inch`。\\n\"\n\n#: src/generics/phantom/testcase_units.md:55\nmsgid \"// `one_meter` has phantom type parameter `Mm`.\\n\"\nmsgstr \"// `one_meter` 具有虚类型参数 `Mm`。\\n\"\n\n#: src/generics/phantom/testcase_units.md:58\nmsgid \"\"\n\"// `+` calls the `add()` method we implemented for `Length<Unit>`.\\n\"\n\"    //\\n\"\n\"    // Since `Length` implements `Copy`, `add()` does not consume\\n\"\n\"    // `one_foot` and `one_meter` but copies them into `self` and `rhs`.\\n\"\nmsgstr \"\"\n\"// `+` 调用我们为 `Length<Unit>` 实现的 `add()` 方法。\\n\"\n\"    //\\n\"\n\"    // 由于 `Length` 实现了 `Copy`，`add()` 不会消耗\\n\"\n\"    // `one_foot` 和 `one_meter`，而是将它们复制到 `self` 和 `rhs` 中。\\n\"\n\n#: src/generics/phantom/testcase_units.md:65\nmsgid \"// Addition works.\\n\"\nmsgstr \"// 加法运算正常工作。\\n\"\n\n#: src/generics/phantom/testcase_units.md:66\nmsgid \"\\\"one foot + one_foot = {:?} in\\\"\"\nmsgstr \"\\\"一英尺 + 一英尺 = {:?} 英寸\\\"\"\n\n#: src/generics/phantom/testcase_units.md:67\nmsgid \"\\\"one meter + one_meter = {:?} mm\\\"\"\nmsgstr \"\\\"一米 + 一米 = {:?} 毫米\\\"\"\n\n#: src/generics/phantom/testcase_units.md:69\nmsgid \"\"\n\"// Nonsensical operations fail as they should:\\n\"\n\"    // Compile-time Error: type mismatch.\\n\"\n\"    //let one_feter = one_foot + one_meter;\\n\"\nmsgstr \"\"\n\"// 无意义的操作会按预期失败：\\n\"\n\"    // 编译时错误：类型不匹配。\\n\"\n\"    //let one_feter = one_foot + one_meter;\\n\"\n\n#: src/generics/phantom/testcase_units.md:77\nmsgid \"\"\n\"[Borrowing (`&`)](../../scope/borrow.md), [Bounds (`X: Y`)](../../generics/\"\n\"bounds.md), [enum](../../custom_types/enum.md), [impl & self](../../fn/\"\n\"methods.md), [Overloading](../../trait/ops.md), [ref](../../scope/borrow/\"\n\"ref.md), [Traits (`X for Y`)](../../trait.md), and [TupleStructs](../../\"\n\"custom_types/structs.md).\"\nmsgstr \"\"\n\"[借用（`&`）](../../scope/borrow.md)、[约束（`X: Y`）](../../generics/\"\n\"bounds.md)、[枚举](../../custom_types/enum.md)、[impl 和 self](../../fn/\"\n\"methods.md)、[运算符重载](../../trait/ops.md)、[ref](../../scope/borrow/\"\n\"ref.md)、[trait（`X for Y`）](../../trait.md)以及[元组结构体](../../\"\n\"custom_types/structs.md)。\"\n\n#: src/scope.md:3\nmsgid \"\"\n\"Scopes play an important part in ownership, borrowing, and lifetimes. That \"\n\"is, they indicate to the compiler when borrows are valid, when resources can \"\n\"be freed, and when variables are created or destroyed.\"\nmsgstr \"\"\n\"作用域在所有权、借用和生命周期中扮演着重要角色。它们向编译器指示借用何时有\"\n\"效、资源何时可以被释放，以及变量何时被创建或销毁。\"\n\n#: src/scope/raii.md:3\nmsgid \"\"\n\"Variables in Rust do more than just hold data in the stack: they also _own_ \"\n\"resources, e.g. `Box<T>` owns memory in the heap. Rust enforces [RAII]\"\n\"(https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization) \"\n\"(Resource Acquisition Is Initialization), so whenever an object goes out of \"\n\"scope, its destructor is called and its owned resources are freed.\"\nmsgstr \"\"\n\"Rust 中的变量不仅仅是在栈上保存数据：它们还**拥有**资源，例如 `Box<T>` 拥有堆\"\n\"上的内存。Rust 强制执行 [RAII](https://en.wikipedia.org/wiki/\"\n\"Resource_Acquisition_Is_Initialization)（资源获取即初始化），因此每当一个对象\"\n\"离开作用域时，它的析构函数就会被调用，它拥有的资源也会被释放。\"\n\n#: src/scope/raii.md:8\nmsgid \"\"\n\"This behavior shields against _resource leak_ bugs, so you'll never have to \"\n\"manually free memory or worry about memory leaks again! Here's a quick \"\n\"showcase:\"\nmsgstr \"\"\n\"这种行为可以防止**资源泄漏**错误，因此你再也不用手动释放内存或担心内存泄漏\"\n\"了！以下是一个简单示例：\"\n\n#: src/scope/raii.md:12\nmsgid \"// raii.rs\\n\"\nmsgstr \"// raii.rs\\n\"\n\n#: src/scope/raii.md:14 src/scope/raii.md:21 src/scope/raii.md:26\nmsgid \"// Allocate an integer on the heap\\n\"\nmsgstr \"// 在堆上分配一个整数\\n\"\n\n#: src/scope/raii.md:17\nmsgid \"// `_box1` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box1` 在此处被销毁，内存被释放\\n\"\n\n#: src/scope/raii.md:24\nmsgid \"// A nested scope:\\n\"\nmsgstr \"// 一个嵌套的作用域：\\n\"\n\n#: src/scope/raii.md:29\nmsgid \"// `_box3` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box3` 在此处被销毁，内存被释放\\n\"\n\n#: src/scope/raii.md:32\nmsgid \"\"\n\"// Creating lots of boxes just for fun\\n\"\n\"    // There's no need to manually free memory!\\n\"\nmsgstr \"\"\n\"// 创建大量的 box（仅为演示）\\n\"\n\"    // 无需手动释放内存！\\n\"\n\n#: src/scope/raii.md:38\nmsgid \"// `_box2` is destroyed here, and memory gets freed\\n\"\nmsgstr \"// `_box2` 在此处被销毁，内存被释放\\n\"\n\n#: src/scope/raii.md:42\nmsgid \"\"\n\"Of course, we can double check for memory errors using [`valgrind`](http://\"\n\"valgrind.org/info/):\"\nmsgstr \"\"\n\"当然，我们可以使用 [`valgrind`](http://valgrind.org/info/) 来再次检查内存错\"\n\"误：\"\n\n#: src/scope/raii.md:65\nmsgid \"No leaks here!\"\nmsgstr \"这里没有内存泄漏！\"\n\n#: src/scope/raii.md:67\nmsgid \"Destructor\"\nmsgstr \"析构函数\"\n\n#: src/scope/raii.md:69\nmsgid \"\"\n\"The notion of a destructor in Rust is provided through the [`Drop`](https://\"\n\"doc.rust-lang.org/std/ops/trait.Drop.html) trait. The destructor is called \"\n\"when the resource goes out of scope. This trait is not required to be \"\n\"implemented for every type, only implement it for your type if you require \"\n\"its own destructor logic.\"\nmsgstr \"\"\n\"Rust 中的析构函数概念是通过 [`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html) trait 提供的。当资源离开作用域时，析构函数会被调用。并非每种\"\n\"类型都需要实现这个 trait，只有当你需要为自己的类型实现特定的析构逻辑时才需要\"\n\"实现它。\"\n\n#: src/scope/raii.md:74\nmsgid \"\"\n\"Run the below example to see how the [`Drop`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Drop.html) trait works. When the variable in the `main` function \"\n\"goes out of scope the custom destructor will be invoked.\"\nmsgstr \"\"\n\"运行下面的示例来了解 [`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html) trait 是如何工作的。当 `main` 函数中的变量离开作用域时，自定\"\n\"义的析构函数将被调用。\"\n\n#: src/scope/raii.md:82\nmsgid \"\\\"ToDrop is being dropped\\\"\"\nmsgstr \"\\\"ToDrop 正在被丢弃\\\"\"\n\n#: src/scope/raii.md:88\nmsgid \"\\\"Made a ToDrop!\\\"\"\nmsgstr \"\\\"创建了一个 ToDrop！\\\"\"\n\n#: src/scope/raii.md:94\nmsgid \"[Box](../std/box.md)\"\nmsgstr \"[Box](../std/box.md)\"\n\n#: src/scope/move.md:3\nmsgid \"\"\n\"Because variables are in charge of freeing their own resources, **resources \"\n\"can only have one owner**. This prevents resources from being freed more \"\n\"than once. Note that not all variables own resources (e.g. [references](../\"\n\"flow_control/match/destructuring/destructure_pointers.md)).\"\nmsgstr \"\"\n\"由于变量负责释放它们自己的资源，**资源只能有一个所有者**。这可以防止资源被多\"\n\"次释放。请注意，并非所有变量都拥有资源（例如[引用](../flow_control/match/\"\n\"destructuring/destructure_pointers.md)）。\"\n\n#: src/scope/move.md:8\nmsgid \"\"\n\"When doing assignments (`let x = y`) or passing function arguments by value \"\n\"(`foo(x)`), the _ownership_ of the resources is transferred. In Rust-speak, \"\n\"this is known as a _move_.\"\nmsgstr \"\"\n\"当进行赋值（`let x = y`）或按值传递函数参数（`foo(x)`）时，资源的**所有权**会\"\n\"被转移。在 Rust 中，这被称为**移动**（move）。\"\n\n#: src/scope/move.md:12\nmsgid \"\"\n\"After moving resources, the previous owner can no longer be used. This \"\n\"avoids creating dangling pointers.\"\nmsgstr \"资源移动后，原所有者将无法再被使用。这避免了悬垂指针的产生。\"\n\n#: src/scope/move.md:16\nmsgid \"// This function takes ownership of the heap allocated memory\\n\"\nmsgstr \"// 此函数获取堆分配内存的所有权\\n\"\n\n#: src/scope/move.md:18\nmsgid \"\\\"Destroying a box that contains {}\\\"\"\nmsgstr \"\\\"正在销毁一个包含 {} 的 box\\\"\"\n\n#: src/scope/move.md:20\nmsgid \"// `c` is destroyed and the memory freed\\n\"\nmsgstr \"// `c` 被销毁，内存被释放\\n\"\n\n#: src/scope/move.md:24\nmsgid \"// _Stack_ allocated integer\\n\"\nmsgstr \"// **栈**分配的整数\\n\"\n\n#: src/scope/move.md:27\nmsgid \"// *Copy* `x` into `y` - no resources are moved\\n\"\nmsgstr \"// 将 `x` **复制**到 `y` - 没有资源被移动\\n\"\n\n#: src/scope/move.md:30\nmsgid \"// Both values can be independently used\\n\"\nmsgstr \"// 两个值可以独立使用\\n\"\n\n#: src/scope/move.md:31\nmsgid \"\\\"x is {}, and y is {}\\\"\"\nmsgstr \"\\\"x 是 {}，y 是 {}\\\"\"\n\n#: src/scope/move.md:33\nmsgid \"// `a` is a pointer to a _heap_ allocated integer\\n\"\nmsgstr \"// `a` 是指向**堆**分配整数的指针\\n\"\n\n#: src/scope/move.md:36\nmsgid \"\\\"a contains: {}\\\"\"\nmsgstr \"\\\"a 包含：{}\\\"\"\n\n#: src/scope/move.md:38\nmsgid \"// *Move* `a` into `b`\\n\"\nmsgstr \"// 将 `a` **移动**到 `b`\\n\"\n\n#: src/scope/move.md:40\nmsgid \"\"\n\"// The pointer address of `a` is copied (not the data) into `b`.\\n\"\n\"    // Both are now pointers to the same heap allocated data, but\\n\"\n\"    // `b` now owns it.\\n\"\nmsgstr \"\"\n\"// `a` 的指针地址（而非数据）被复制到 `b`\\n\"\n\"    // 现在两者都指向同一块堆分配的数据\\n\"\n\"    // 但 `b` 现在拥有它\\n\"\n\n#: src/scope/move.md:44\nmsgid \"\"\n\"// Error! `a` can no longer access the data, because it no longer owns the\\n\"\n\"    // heap memory\\n\"\n\"    //println!(\\\"a contains: {}\\\", a);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`a` 不再拥有堆内存，因此无法访问数据\\n\"\n\"    //println!(\\\"a 包含：{}\\\", a);\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/scope/move.md:49\nmsgid \"\"\n\"// This function takes ownership of the heap allocated memory from `b`\\n\"\nmsgstr \"// 此函数从 `b` 获取堆分配内存的所有权\\n\"\n\n#: src/scope/move.md:52\nmsgid \"\"\n\"// Since the heap memory has been freed at this point, this action would\\n\"\n\"    // result in dereferencing freed memory, but it's forbidden by the \"\n\"compiler\\n\"\n\"    // Error! Same reason as the previous Error\\n\"\n\"    //println!(\\\"b contains: {}\\\", b);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 此时堆内存已被释放，这个操作会导致解引用已释放的内存\\n\"\n\"    // 但编译器禁止这样做\\n\"\n\"    // 错误！原因与前面的错误相同\\n\"\n\"    //println!(\\\"b 包含：{}\\\", b);\\n\"\n\"    // TODO ^ 尝试取消此行注释\\n\"\n\n#: src/scope/move/mut.md:3\nmsgid \"Mutability of data can be changed when ownership is transferred.\"\nmsgstr \"当所有权转移时，数据的可变性可以改变。\"\n\n#: src/scope/move/mut.md:9\nmsgid \"\\\"immutable_box contains {}\\\"\"\nmsgstr \"\\\"immutable_box 包含 {}\\\"\"\n\n#: src/scope/move/mut.md:11\nmsgid \"\"\n\"// Mutability error\\n\"\n\"    //*immutable_box = 4;\\n\"\nmsgstr \"\"\n\"// 可变性错误\\n\"\n\"    //*immutable_box = 4;\\n\"\n\n#: src/scope/move/mut.md:14\nmsgid \"// *Move* the box, changing the ownership (and mutability)\\n\"\nmsgstr \"// *移动*盒子，改变所有权（和可变性）\\n\"\n\n#: src/scope/move/mut.md:17\nmsgid \"\\\"mutable_box contains {}\\\"\"\nmsgstr \"\\\"mutable_box 包含 {}\\\"\"\n\n#: src/scope/move/mut.md:19\nmsgid \"// Modify the contents of the box\\n\"\nmsgstr \"// 修改盒子的内容\\n\"\n\n#: src/scope/move/mut.md:22\nmsgid \"\\\"mutable_box now contains {}\\\"\"\nmsgstr \"\\\"mutable_box 现在包含 {}\\\"\"\n\n#: src/scope/move/partial_move.md:3\nmsgid \"\"\n\"Within the [destructuring](../../flow_control/match/destructuring.md) of a \"\n\"single variable, both `by-move` and `by-reference` pattern bindings can be \"\n\"used at the same time. Doing this will result in a _partial move_ of the \"\n\"variable, which means that parts of the variable will be moved while other \"\n\"parts stay. In such a case, the parent variable cannot be used afterwards as \"\n\"a whole, however the parts that are only referenced (and not moved) can \"\n\"still be used. Note that types that implement the [`Drop` trait](../../trait/\"\n\"drop.md) cannot be partially moved from, because its `drop` method would use \"\n\"it afterwards as a whole.\"\nmsgstr \"\"\n\"在对单个变量进行[解构](../../flow_control/match/destructuring.md)时，可以同时\"\n\"使用 `by-move` 和 `by-reference` 模式绑定。这样做会导致变量的**部分移动**，这\"\n\"意味着变量的一部分会被移动，而其他部分保持不变。在这种情况下，父级变量之后不\"\n\"能作为一个整体使用，但是仍然可以使用只被引用（而不是被移动）的部分。注意，实\"\n\"现了 [`Drop` 特质](../../trait/drop.md) 的类型不能被部分移动，因为其 `drop` \"\n\"方法会在之后将其作为整体使用。\"\n\n#: src/scope/move/partial_move.md:22\nmsgid \"\"\n\"// Error! cannot move out of a type which implements the `Drop` trait\\n\"\n\"    //impl Drop for Person {\\n\"\n\"    //    fn drop(&mut self) {\\n\"\n\"    //        println!(\\\"Dropping the person struct {:?}\\\", self)\\n\"\n\"    //    }\\n\"\n\"    //}\\n\"\n\"    // TODO ^ Try uncommenting these lines\\n\"\nmsgstr \"\"\n\"// 错误！无法从实现了 `Drop` 特质的类型中移动\\n\"\n\"    //impl Drop for Person {\\n\"\n\"    //    fn drop(&mut self) {\\n\"\n\"    //        println!(\\\"Dropping the person struct {:?}\\\", self)\\n\"\n\"    //    }\\n\"\n\"    //}\\n\"\n\"    // TODO ^ 尝试取消注释这些行\\n\"\n\n#: src/scope/move/partial_move.md:35\nmsgid \"// `name` is moved out of person, but `age` is referenced\\n\"\nmsgstr \"// `name` 从 person 中被移出，但 `age` 只是被引用\\n\"\n\n#: src/scope/move/partial_move.md:38\nmsgid \"\\\"The person's age is {}\\\"\"\nmsgstr \"\\\"此人的年龄是 {}\\\"\"\n\n#: src/scope/move/partial_move.md:40\nmsgid \"\\\"The person's name is {}\\\"\"\nmsgstr \"\\\"此人的姓名是 {}\\\"\"\n\n#: src/scope/move/partial_move.md:42\nmsgid \"\"\n\"// Error! borrow of partially moved value: `person` partial move occurs\\n\"\n\"    //println!(\\\"The person struct is {:?}\\\", person);\\n\"\nmsgstr \"\"\n\"// 错误！借用部分移动的值：`person` 发生部分移动\\n\"\n\"    //println!(\\\"person 结构体是 {:?}\\\", person);\\n\"\n\n#: src/scope/move/partial_move.md:45\nmsgid \"\"\n\"// `person` cannot be used but `person.age` can be used as it is not moved\\n\"\nmsgstr \"// `person` 不能使用，但 `person.age` 可以使用，因为它没有被移动\\n\"\n\n#: src/scope/move/partial_move.md:46\nmsgid \"\\\"The person's age from person struct is {}\\\"\"\nmsgstr \"\\\"从 person 结构体中获取的年龄是 {}\\\"\"\n\n#: src/scope/move/partial_move.md:50\nmsgid \"\"\n\"(In this example, we store the `age` variable on the heap to illustrate the \"\n\"partial move: deleting `ref` in the above code would give an error as the \"\n\"ownership of `person.age` would be moved to the variable `age`. If \"\n\"`Person.age` were stored on the stack, `ref` would not be required as the \"\n\"definition of `age` would copy the data from `person.age` without moving it.)\"\nmsgstr \"\"\n\"（在这个例子中，我们将 `age` 变量存储在堆上以说明部分移动：删除上面代码中的 \"\n\"`ref` 会导致错误，因为 `person.age` 的所有权会被移动到变量 `age`。如果 \"\n\"`Person.age` 存储在栈上，就不需要 `ref`，因为 `age` 的定义会从 `person.age` \"\n\"复制数据而不是移动它。）\"\n\n#: src/scope/move/partial_move.md:59\nmsgid \"[destructuring](../../flow_control/match/destructuring.md)\"\nmsgstr \"[解构](../../flow_control/match/destructuring.md)\"\n\n#: src/scope/borrow.md:3\nmsgid \"\"\n\"Most of the time, we'd like to access data without taking ownership over it. \"\n\"To accomplish this, Rust uses a _borrowing_ mechanism. Instead of passing \"\n\"objects by value (`T`), objects can be passed by reference (`&T`).\"\nmsgstr \"\"\n\"大多数情况下，我们希望访问数据而不获取其所有权。为了实现这一点，Rust 使用了**\"\n\"借用**机制。对象可以通过引用（`&T`）传递，而不是按值（`T`）传递。\"\n\n#: src/scope/borrow.md:7\nmsgid \"\"\n\"The compiler statically guarantees (via its borrow checker) that references \"\n\"_always_ point to valid objects. That is, while references to an object \"\n\"exist, the object cannot be destroyed.\"\nmsgstr \"\"\n\"编译器通过其借用检查器静态地保证引用**始终**指向有效的对象。也就是说，当存在\"\n\"指向一个对象的引用时，该对象就不能被销毁。\"\n\n#: src/scope/borrow.md:12\nmsgid \"// This function takes ownership of a box and destroys it\\n\"\nmsgstr \"// 此函数获取一个盒子的所有权并销毁它\\n\"\n\n#: src/scope/borrow.md:14\nmsgid \"\\\"Destroying box that contains {}\\\"\"\nmsgstr \"\\\"正在销毁包含 {} 的盒子\\\"\"\n\n#: src/scope/borrow.md:16\nmsgid \"// This function borrows an i32\\n\"\nmsgstr \"// 此函数借用一个 i32\\n\"\n\n#: src/scope/borrow.md:19\nmsgid \"\\\"This int is: {}\\\"\"\nmsgstr \"\\\"这个整数是：{}\\\"\"\n\n#: src/scope/borrow.md:23\nmsgid \"\"\n\"// Create a boxed i32 in the heap, and an i32 on the stack\\n\"\n\"    // Remember: numbers can have arbitrary underscores added for \"\n\"readability\\n\"\n\"    // 5_i32 is the same as 5i32\\n\"\nmsgstr \"\"\n\"// 在堆上创建一个装箱的 i32，在栈上创建一个 i32\\n\"\n\"    // 注意：数字可以添加任意下划线以提高可读性\\n\"\n\"    // 5_i32 与 5i32 相同\\n\"\n\n#: src/scope/borrow.md:29\nmsgid \"\"\n\"// Borrow the contents of the box. Ownership is not taken,\\n\"\n\"    // so the contents can be borrowed again.\\n\"\nmsgstr \"\"\n\"// 借用盒子的数据。所有权未被获取，\\n\"\n\"    // 所以数据可以再次被借用。\\n\"\n\n#: src/scope/borrow.md:35\nmsgid \"// Take a reference to the data contained inside the box\\n\"\nmsgstr \"// 获取盒子内数据的引用\\n\"\n\n#: src/scope/borrow.md:38\nmsgid \"\"\n\"// Error!\\n\"\n\"        // Can't destroy `boxed_i32` while the inner value is borrowed later \"\n\"in scope.\\n\"\nmsgstr \"\"\n\"// 错误！\\n\"\n\"        // 当内部值在作用域内稍后被借用时，不能销毁 `boxed_i32`。\\n\"\n\n#: src/scope/borrow.md:43\nmsgid \"// Attempt to borrow `_ref_to_i32` after inner value is destroyed\\n\"\nmsgstr \"// 尝试在内部值被销毁后借用 `_ref_to_i32`\\n\"\n\n#: src/scope/borrow.md:45\nmsgid \"// `_ref_to_i32` goes out of scope and is no longer borrowed.\\n\"\nmsgstr \"// `_ref_to_i32` 超出作用域，不再被借用。\\n\"\n\n#: src/scope/borrow.md:48\nmsgid \"\"\n\"// `boxed_i32` can now give up ownership to `eat_box_i32` and be destroyed\\n\"\nmsgstr \"// `boxed_i32` 现在可以将所有权交给 `eat_box_i32` 并被销毁\\n\"\n\n#: src/scope/borrow/mut.md:3\nmsgid \"\"\n\"Mutable data can be mutably borrowed using `&mut T`. This is called a \"\n\"_mutable reference_ and gives read/write access to the borrower. In \"\n\"contrast, `&T` borrows the data via an immutable reference, and the borrower \"\n\"can read the data but not modify it:\"\nmsgstr \"\"\n\"可变数据可以使用 `&mut T` 进行可变借用。这被称为**可变引用**，并给予借用者读\"\n\"写访问权。相比之下，`&T` 通过不可变引用借用数据，借用者可以读取数据但不能修改\"\n\"它：\"\n\n#: src/scope/borrow/mut.md:12\nmsgid \"\"\n\"// `&'static str` is a reference to a string allocated in read only memory\\n\"\nmsgstr \"// `&'static str` 是对分配在只读内存中的字符串的引用\\n\"\n\n#: src/scope/borrow/mut.md:17\nmsgid \"// This function takes a reference to a book\\n\"\nmsgstr \"// 此函数接受一个对 Book 类型的引用\\n\"\n\n#: src/scope/borrow/mut.md:20\nmsgid \"\\\"I immutably borrowed {} - {} edition\\\"\"\nmsgstr \"\\\"我不可变地借用了《{}》- {} 版\\\"\"\n\n#: src/scope/borrow/mut.md:22\nmsgid \"\"\n\"// This function takes a reference to a mutable book and changes `year` to \"\n\"2014\\n\"\nmsgstr \"// 此函数接受一个对可变 Book 的引用，并将 `year` 改为 2014\\n\"\n\n#: src/scope/borrow/mut.md:26\nmsgid \"\\\"I mutably borrowed {} - {} edition\\\"\"\nmsgstr \"\\\"我可变地借用了《{}》- {} 版\\\"\"\n\n#: src/scope/borrow/mut.md:30\nmsgid \"// Create an immutable Book named `immutabook`\\n\"\nmsgstr \"// 创建一个名为 `immutabook` 的不可变 Book 实例\\n\"\n\n#: src/scope/borrow/mut.md:32\nmsgid \"// string literals have type `&'static str`\\n\"\nmsgstr \"// 字符串字面量的类型是 `&'static str`\\n\"\n\n#: src/scope/borrow/mut.md:33\nmsgid \"\\\"Douglas Hofstadter\\\"\"\nmsgstr \"\\\"Douglas Hofstadter\\\"\"\n\n#: src/scope/borrow/mut.md:34\nmsgid \"\\\"Gödel, Escher, Bach\\\"\"\nmsgstr \"\\\"哥德尔、埃舍尔、巴赫\\\"\"\n\n#: src/scope/borrow/mut.md:38\nmsgid \"// Create a mutable copy of `immutabook` and call it `mutabook`\\n\"\nmsgstr \"// 创建 `immutabook` 的可变副本，并命名为 `mutabook`\\n\"\n\n#: src/scope/borrow/mut.md:41\nmsgid \"// Immutably borrow an immutable object\\n\"\nmsgstr \"// 不可变地借用一个不可变对象\\n\"\n\n#: src/scope/borrow/mut.md:44\nmsgid \"// Immutably borrow a mutable object\\n\"\nmsgstr \"// 不可变地借用一个可变对象\\n\"\n\n#: src/scope/borrow/mut.md:47\nmsgid \"// Borrow a mutable object as mutable\\n\"\nmsgstr \"// 可变地借用一个可变对象\\n\"\n\n#: src/scope/borrow/mut.md:50\nmsgid \"// Error! Cannot borrow an immutable object as mutable\\n\"\nmsgstr \"// 错误！不能将不可变对象作为可变对象借用\\n\"\n\n#: src/scope/borrow/mut.md:58\nmsgid \"[`static`](../lifetime/static_lifetime.md)\"\nmsgstr \"[`static`](../lifetime/static_lifetime.md)\"\n\n#: src/scope/borrow/alias.md:3\nmsgid \"\"\n\"Data can be immutably borrowed any number of times, but while immutably \"\n\"borrowed, the original data can't be mutably borrowed. On the other hand, \"\n\"only _one_ mutable borrow is allowed at a time. The original data can be \"\n\"borrowed again only _after_ the mutable reference has been used for the last \"\n\"time.\"\nmsgstr \"\"\n\"数据可以被不可变借用任意次数，但在不可变借用期间，原始数据不能被可变借用。另\"\n\"一方面，同一时间只允许**一个**可变借用。只有在可变引用最后一次使用之后，原始\"\n\"数据才能再次被借用。\"\n\n#: src/scope/borrow/alias.md:17\nmsgid \"// Data can be accessed via the references and the original owner\\n\"\nmsgstr \"// 可以通过引用和原始所有者访问数据\\n\"\n\n#: src/scope/borrow/alias.md:18 src/scope/borrow/alias.md:27\n#: src/scope/borrow/alias.md:49\nmsgid \"\\\"Point has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\\\"点的坐标为：({}, {}, {})\\\"\"\n\n#: src/scope/borrow/alias.md:21\nmsgid \"\"\n\"// Error! Can't borrow `point` as mutable because it's currently\\n\"\n\"    // borrowed as immutable.\\n\"\n\"    // let mutable_borrow = &mut point;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！不能将 `point` 作为可变借用，因为它当前被不可变借用。\\n\"\n\"    // let mutable_borrow = &mut point;\\n\"\n\"    // TODO ^ 尝试取消注释此行\\n\"\n\n#: src/scope/borrow/alias.md:26\nmsgid \"// The borrowed values are used again here\\n\"\nmsgstr \"// 这里再次使用了借用的值\\n\"\n\n#: src/scope/borrow/alias.md:30\nmsgid \"\"\n\"// The immutable references are no longer used for the rest of the code so\\n\"\n\"    // it is possible to reborrow with a mutable reference.\\n\"\nmsgstr \"\"\n\"// 不可变引用在代码的剩余部分不再使用\\n\"\n\"    // 因此可以用可变引用重新借用。\\n\"\n\n#: src/scope/borrow/alias.md:34\nmsgid \"// Change data via mutable reference\\n\"\nmsgstr \"// 通过可变引用修改数据\\n\"\n\n#: src/scope/borrow/alias.md:39\nmsgid \"\"\n\"// Error! Can't borrow `point` as immutable because it's currently\\n\"\n\"    // borrowed as mutable.\\n\"\n\"    // let y = &point.y;\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！不能将 `point` 作为不可变借用，因为它当前被可变借用。\\n\"\n\"    // let y = &point.y;\\n\"\n\"    // TODO ^ 尝试取消注释此行\\n\"\n\n#: src/scope/borrow/alias.md:44\nmsgid \"\"\n\"// Error! Can't print because `println!` takes an immutable reference.\\n\"\n\"    // println!(\\\"Point Z coordinate is {}\\\", point.z);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！无法打印，因为 `println!` 需要一个不可变引用。\\n\"\n\"    // println!(\\\"点的 Z 坐标是 {}\\\", point.z);\\n\"\n\"    // TODO ^ 尝试取消注释此行\\n\"\n\n#: src/scope/borrow/alias.md:48\nmsgid \"// Ok! Mutable references can be passed as immutable to `println!`\\n\"\nmsgstr \"// 正确！可变引用可以作为不可变引用传递给 `println!`\\n\"\n\n#: src/scope/borrow/alias.md:52\nmsgid \"\"\n\"// The mutable reference is no longer used for the rest of the code so it\\n\"\n\"    // is possible to reborrow\\n\"\nmsgstr \"// 可变引用在代码的剩余部分不再使用，所以可以重新借用\\n\"\n\n#: src/scope/borrow/alias.md:55\nmsgid \"\\\"Point now has coordinates: ({}, {}, {})\\\"\"\nmsgstr \"\\\"点现在的坐标为：({}, {}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:3\nmsgid \"\"\n\"When doing pattern matching or destructuring via the `let` binding, the \"\n\"`ref` keyword can be used to take references to the fields of a struct/\"\n\"tuple. The example below shows a few instances where this can be useful:\"\nmsgstr \"\"\n\"在使用 `let` 绑定进行模式匹配或解构时，可以使用 `ref` 关键字来获取结构体或元\"\n\"组字段的引用。以下示例展示了几个这种用法有用的场景：\"\n\n#: src/scope/borrow/ref.md:14\nmsgid \"\"\n\"// A `ref` borrow on the left side of an assignment is equivalent to\\n\"\n\"    // an `&` borrow on the right side.\\n\"\nmsgstr \"// 赋值左侧的 `ref` 借用等同于右侧的 `&` 借用。\\n\"\n\n#: src/scope/borrow/ref.md:19\nmsgid \"\\\"ref_c1 equals ref_c2: {}\\\"\"\nmsgstr \"\\\"ref_c1 等于 ref_c2：{}\\\"\"\n\n#: src/scope/borrow/ref.md:23\nmsgid \"// `ref` is also valid when destructuring a struct.\\n\"\nmsgstr \"// 在解构结构体时，`ref` 也是有效的。\\n\"\n\n#: src/scope/borrow/ref.md:25\nmsgid \"// `ref_to_x` is a reference to the `x` field of `point`.\\n\"\nmsgstr \"// `ref_to_x` 是 `point` 的 `x` 字段的引用。\\n\"\n\n#: src/scope/borrow/ref.md:28\nmsgid \"// Return a copy of the `x` field of `point`.\\n\"\nmsgstr \"// 返回 `point` 的 `x` 字段的副本。\\n\"\n\n#: src/scope/borrow/ref.md:32\nmsgid \"// A mutable copy of `point`\\n\"\nmsgstr \"// `point` 的可变副本\\n\"\n\n#: src/scope/borrow/ref.md:36\nmsgid \"// `ref` can be paired with `mut` to take mutable references.\\n\"\nmsgstr \"// `ref` 可以与 `mut` 配合使用来获取可变引用。\\n\"\n\n#: src/scope/borrow/ref.md:39\nmsgid \"// Mutate the `y` field of `mutable_point` via a mutable reference.\\n\"\nmsgstr \"// 通过可变引用修改 `mutable_point` 的 `y` 字段。\\n\"\n\n#: src/scope/borrow/ref.md:43\nmsgid \"\\\"point is ({}, {})\\\"\"\nmsgstr \"\\\"point 的坐标是 ({}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:44\nmsgid \"\\\"mutable_point is ({}, {})\\\"\"\nmsgstr \"\\\"mutable_point 的坐标是 ({}, {})\\\"\"\n\n#: src/scope/borrow/ref.md:46\nmsgid \"// A mutable tuple that includes a pointer\\n\"\nmsgstr \"// 包含指针的可变元组\\n\"\n\n#: src/scope/borrow/ref.md:50\nmsgid \"// Destructure `mutable_tuple` to change the value of `last`.\\n\"\nmsgstr \"// 解构 `mutable_tuple` 以修改 `last` 的值。\\n\"\n\n#: src/scope/borrow/ref.md:55\nmsgid \"\\\"tuple is {:?}\\\"\"\nmsgstr \"\\\"元组是 {:?}\\\"\"\n\n#: src/scope/lifetime.md:3\nmsgid \"\"\n\"A _lifetime_ is a construct the compiler (or more specifically, its _borrow \"\n\"checker_) uses to ensure all borrows are valid. Specifically, a variable's \"\n\"lifetime begins when it is created and ends when it is destroyed. While \"\n\"lifetimes and scopes are often referred to together, they are not the same.\"\nmsgstr \"\"\n\"**生命周期**是编译器（更具体地说是其**借用检查器**）用来确保所有借用都有效的\"\n\"一种机制。具体来说，变量的生命周期从创建时开始，到销毁时结束。尽管生命周期和\"\n\"作用域经常被一同提及，但它们并不完全相同。\"\n\n#: src/scope/lifetime.md:8\nmsgid \"\"\n\"Take, for example, the case where we borrow a variable via `&`. The borrow \"\n\"has a lifetime that is determined by where it is declared. As a result, the \"\n\"borrow is valid as long as it ends before the lender is destroyed. However, \"\n\"the scope of the borrow is determined by where the reference is used.\"\nmsgstr \"\"\n\"举个例子，当我们通过 `&` 借用一个变量时，这个借用的生命周期由其声明位置决定。\"\n\"因此，只要借用在出借者被销毁之前结束，它就是有效的。然而，借用的作用域则由引\"\n\"用使用的位置决定。\"\n\n#: src/scope/lifetime.md:13\nmsgid \"\"\n\"In the following example and in the rest of this section, we will see how \"\n\"lifetimes relate to scopes, as well as how the two differ.\"\nmsgstr \"\"\n\"在接下来的例子和本节的其余部分中，我们将看到生命周期如何与作用域相关联，以及\"\n\"两者之间的区别。\"\n\n#: src/scope/lifetime.md:17\nmsgid \"\"\n\"// Lifetimes are annotated below with lines denoting the creation\\n\"\n\"// and destruction of each variable.\\n\"\n\"// `i` has the longest lifetime because its scope entirely encloses\\n\"\n\"// both `borrow1` and `borrow2`. The duration of `borrow1` compared\\n\"\n\"// to `borrow2` is irrelevant since they are disjoint.\\n\"\nmsgstr \"\"\n\"// 下面用线条标注了每个变量的创建和销毁，以表示生命周期。\\n\"\n\"// `i` 的生命周期最长，因为它的作用域完全包含了 `borrow1` 和 `borrow2`。\\n\"\n\"// `borrow1` 相对于 `borrow2` 的持续时间是无关紧要的，因为它们是不相交的。\\n\"\n\"// （译注：为避免中文的宽度显示问题，下面注释没有翻译） \\n\"\n\n#: src/scope/lifetime.md:23\nmsgid \"\"\n\"// Lifetime for `i` starts. ────────────────┐\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// Lifetime for `i` starts. ────────────────┐\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:25 src/scope/lifetime.md:32\nmsgid \"//                                                   │\\n\"\nmsgstr \"//                                                   │\\n\"\n\n#: src/scope/lifetime.md:26\nmsgid \"\"\n\"// `borrow1` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\"// `borrow1` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\n\n#: src/scope/lifetime.md:28\nmsgid \"\\\"borrow1: {}\\\"\"\nmsgstr \"\\\"borrow1: {}\\\"\"\n\n#: src/scope/lifetime.md:28 src/scope/lifetime.md:35\nmsgid \"//              ││\\n\"\nmsgstr \"//              ││\\n\"\n\n#: src/scope/lifetime.md:29\nmsgid \"\"\n\"// `borrow1` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `borrow1` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:33\nmsgid \"\"\n\"// `borrow2` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\nmsgstr \"\"\n\"// `borrow2` lifetime starts. ──┐│\\n\"\n\"        //                                                ││\\n\"\n\n#: src/scope/lifetime.md:35\nmsgid \"\\\"borrow2: {}\\\"\"\nmsgstr \"\\\"borrow2: {}\\\"\"\n\n#: src/scope/lifetime.md:36\nmsgid \"\"\n\"// `borrow2` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\nmsgstr \"\"\n\"// `borrow2` ends. ─────────────────────────────────┘│\\n\"\n\"    //                                                     │\\n\"\n\n#: src/scope/lifetime.md:38\nmsgid \"// Lifetime ends. ─────────────────────────────────────┘\\n\"\nmsgstr \"// Lifetime ends. ─────────────────────────────────────┘\\n\"\n\n#: src/scope/lifetime.md:41\nmsgid \"\"\n\"Note that no names or types are assigned to label lifetimes. This restricts \"\n\"how lifetimes will be able to be used as we will see.\"\nmsgstr \"\"\n\"请注意，生命周期标签没有被赋予名称或类型。这限制了生命周期的使用方式，我们将\"\n\"在后面看到这一点。\"\n\n#: src/scope/lifetime/explicit.md:3\nmsgid \"\"\n\"The borrow checker uses explicit lifetime annotations to determine how long \"\n\"references should be valid. In cases where lifetimes are not elided[^1], \"\n\"Rust requires explicit annotations to determine what the lifetime of a \"\n\"reference should be. The syntax for explicitly annotating a lifetime uses an \"\n\"apostrophe character as follows:\"\nmsgstr \"\"\n\"借用检查器使用显式生命周期注解来确定引用应该有效多长时间。在生命周期没有被省\"\n\"略[^1]的情况下，Rust 需要显式注解来确定引用的生命周期。显式注解生命周期的语法\"\n\"使用撇号字符，如下所示：\"\n\n#: src/scope/lifetime/explicit.md:10\nmsgid \"// `foo` has a lifetime parameter `'a`\\n\"\nmsgstr \"// `foo` 有一个生命周期参数 `'a`\\n\"\n\n#: src/scope/lifetime/explicit.md:14\nmsgid \"\"\n\"Similar to [closures](../../fn/closures/anonymity.md), using lifetimes \"\n\"requires generics. Additionally, this lifetime syntax indicates that the \"\n\"lifetime of `foo` may not exceed that of `'a`. Explicit annotation of a type \"\n\"has the form `&'a T` where `'a` has already been introduced.\"\nmsgstr \"\"\n\"类似于[闭包](../../fn/closures/anonymity.md)，使用生命周期需要泛型。此外，这\"\n\"种生命周期语法表示 `foo` 的生命周期不能超过 `'a` 的生命周期。类型的显式注解形\"\n\"式为 `&'a T`，其中 `'a` 已经被引入。\"\n\n#: src/scope/lifetime/explicit.md:19\nmsgid \"In cases with multiple lifetimes, the syntax is similar:\"\nmsgstr \"在有多个生命周期的情况下，语法类似：\"\n\n#: src/scope/lifetime/explicit.md:22\nmsgid \"// `foo` has lifetime parameters `'a` and `'b`\\n\"\nmsgstr \"// `foo` 有生命周期参数 `'a` 和 `'b`\\n\"\n\n#: src/scope/lifetime/explicit.md:26\nmsgid \"\"\n\"In this case, the lifetime of `foo` cannot exceed that of either `'a` _or_ \"\n\"`'b`.\"\nmsgstr \"在这种情况下，`foo` 的生命周期不能超过 `'a` **或** `'b` 的生命周期。\"\n\n#: src/scope/lifetime/explicit.md:28\nmsgid \"See the following example for explicit lifetime annotation in use:\"\nmsgstr \"请看下面的例子，展示了显式生命周期注解的使用：\"\n\n#: src/scope/lifetime/explicit.md:31\nmsgid \"\"\n\"// `print_refs` takes two references to `i32` which have different\\n\"\n\"// lifetimes `'a` and `'b`. These two lifetimes must both be at\\n\"\n\"// least as long as the function `print_refs`.\\n\"\nmsgstr \"\"\n\"// `print_refs` 接受两个 `i32` 的引用，它们有不同的\\n\"\n\"// 生命周期 `'a` 和 `'b`。这两个生命周期都必须\\n\"\n\"// 至少和函数 `print_refs` 一样长。\\n\"\n\n#: src/scope/lifetime/explicit.md:35\nmsgid \"\\\"x is {} and y is {}\\\"\"\nmsgstr \"\\\"x 是 {}，y 是 {}\\\"\"\n\n#: src/scope/lifetime/explicit.md:37\nmsgid \"\"\n\"// A function which takes no arguments, but has a lifetime parameter `'a`.\\n\"\nmsgstr \"// 一个没有参数但有生命周期参数 `'a` 的函数。\\n\"\n\n#: src/scope/lifetime/explicit.md:42\nmsgid \"// ERROR: `_x` does not live long enough\\n\"\nmsgstr \"// 错误：`_x` 的生命周期不够长\\n\"\n\n#: src/scope/lifetime/explicit.md:44\nmsgid \"\"\n\"// Attempting to use the lifetime `'a` as an explicit type annotation\\n\"\n\"    // inside the function will fail because the lifetime of `&_x` is \"\n\"shorter\\n\"\n\"    // than that of `_y`. A short lifetime cannot be coerced into a longer \"\n\"one.\\n\"\nmsgstr \"\"\n\"// 尝试在函数内部使用生命周期 `'a` 作为显式类型标注会失败，\\n\"\n\"    // 因为 `&_x` 的生命周期比 `_y` 的短。\\n\"\n\"    // 短生命周期无法强制转换为长生命周期。\\n\"\n\n#: src/scope/lifetime/explicit.md:50\nmsgid \"// Create variables to be borrowed below.\\n\"\nmsgstr \"// 创建将要被借用的变量。\\n\"\n\n#: src/scope/lifetime/explicit.md:53\nmsgid \"// Borrows (`&`) of both variables are passed into the function.\\n\"\nmsgstr \"// 将两个变量的借用（`&`）传递给函数。\\n\"\n\n#: src/scope/lifetime/explicit.md:55\nmsgid \"\"\n\"// Any input which is borrowed must outlive the borrower.\\n\"\n\"    // In other words, the lifetime of `four` and `nine` must\\n\"\n\"    // be longer than that of `print_refs`.\\n\"\nmsgstr \"\"\n\"// 任何被借用的输入必须比借用者存活更久。\\n\"\n\"    // 换句话说，`four` 和 `nine` 的生命周期必须\\n\"\n\"    // 比 `print_refs` 的生命周期更长。\\n\"\n\n#: src/scope/lifetime/explicit.md:60\nmsgid \"\"\n\"// `failed_borrow` contains no references to force `'a` to be\\n\"\n\"    // longer than the lifetime of the function, but `'a` is longer.\\n\"\n\"    // Because the lifetime is never constrained, it defaults to `'static`.\\n\"\nmsgstr \"\"\n\"// `failed_borrow` 不包含任何引用来强制 `'a` 比函数的生命周期更长，\\n\"\n\"    // 但 `'a` 实际上更长。\\n\"\n\"    // 因为生命周期从未被约束，它默认为 `'static`。\\n\"\n\n#: src/scope/lifetime/explicit.md:66\nmsgid \"\"\n\"[elision](elision.md) implicitly annotates lifetimes and so is different.\"\nmsgstr \"[省略（elision）](elision.md)隐式地注解生命周期，因此与显式注解不同。\"\n\n#: src/scope/lifetime/explicit.md:70\nmsgid \"[generics](../../generics.md) and [closures](../../fn/closures.md)\"\nmsgstr \"\"\n\"[泛型（generics）](../../generics.md)和[闭包（closures）](../../fn/\"\n\"closures.md)\"\n\n#: src/scope/lifetime/fn.md:3\nmsgid \"\"\n\"Ignoring [elision](elision.md), function signatures with lifetimes have a \"\n\"few constraints:\"\nmsgstr \"\"\n\"排除[省略（elision）](elision.md)的情况，带有生命周期的函数签名有以下几个约\"\n\"束：\"\n\n#: src/scope/lifetime/fn.md:5\nmsgid \"any reference _must_ have an annotated lifetime.\"\nmsgstr \"任何引用**必须**有一个标注的生命周期。\"\n\n#: src/scope/lifetime/fn.md:6\nmsgid \"\"\n\"any reference being returned _must_ have the same lifetime as an input or be \"\n\"`static`.\"\nmsgstr \"任何被返回的引用**必须**具有与输入相同的生命周期或者是 `static`。\"\n\n#: src/scope/lifetime/fn.md:9\nmsgid \"\"\n\"Additionally, note that returning references without input is banned if it \"\n\"would result in returning references to invalid data. The following example \"\n\"shows off some valid forms of functions with lifetimes:\"\nmsgstr \"\"\n\"此外，请注意，如果返回引用而没有输入会导致返回指向无效数据的引用，这是被禁止\"\n\"的。以下示例展示了一些带有生命周期的有效函数形式：\"\n\n#: src/scope/lifetime/fn.md:14\nmsgid \"\"\n\"// One input reference with lifetime `'a` which must live\\n\"\n\"// at least as long as the function.\\n\"\nmsgstr \"// 一个具有生命周期 `'a` 的输入引用，它必须至少与函数存活一样长。\\n\"\n\n#: src/scope/lifetime/fn.md:17\nmsgid \"\\\"`print_one`: x is {}\\\"\"\nmsgstr \"\\\"`print_one`：x 是 {}\\\"\"\n\n#: src/scope/lifetime/fn.md:19\nmsgid \"// Mutable references are possible with lifetimes as well.\\n\"\nmsgstr \"// 可变引用也可以有生命周期。\\n\"\n\n#: src/scope/lifetime/fn.md:24\nmsgid \"\"\n\"// Multiple elements with different lifetimes. In this case, it\\n\"\n\"// would be fine for both to have the same lifetime `'a`, but\\n\"\n\"// in more complex cases, different lifetimes may be required.\\n\"\nmsgstr \"\"\n\"// 多个具有不同生命周期的元素。在这种情况下，\\n\"\n\"// 两者都有相同的生命周期 `'a` 是可以的，但\\n\"\n\"// 在更复杂的情况下，可能需要不同的生命周期。\\n\"\n\n#: src/scope/lifetime/fn.md:29\nmsgid \"\\\"`print_multi`: x is {}, y is {}\\\"\"\nmsgstr \"\\\"`print_multi`：x 是 {}，y 是 {}\\\"\"\n\n#: src/scope/lifetime/fn.md:31\nmsgid \"\"\n\"// Returning references that have been passed in is acceptable.\\n\"\n\"// However, the correct lifetime must be returned.\\n\"\nmsgstr \"\"\n\"// 返回已传入的引用是可以接受的。\\n\"\n\"// 但是，必须返回正确的生命周期。\\n\"\n\n#: src/scope/lifetime/fn.md:35\nmsgid \"\"\n\"//fn invalid_output<'a>() -> &'a String { &String::from(\\\"foo\\\") }\\n\"\n\"// The above is invalid: `'a` must live longer than the function.\\n\"\n\"// Here, `&String::from(\\\"foo\\\")` would create a `String`, followed by a\\n\"\n\"// reference. Then the data is dropped upon exiting the scope, leaving\\n\"\n\"// a reference to invalid data to be returned.\\n\"\nmsgstr \"\"\n\"//fn invalid_output<'a>() -> &'a String { &String::from(\\\"foo\\\") }\\n\"\n\"// 上面的代码是无效的：`'a` 必须比函数存活更长。\\n\"\n\"// 这里的 `&String::from(\\\"foo\\\")` 会创建一个 `String`，然后创建一个引用。\\n\"\n\"// 接着，在退出作用域时数据被丢弃，导致返回一个指向无效数据的引用。\\n\"\n\n#: src/scope/lifetime/fn.md:60\nmsgid \"[Functions](../../fn.md)\"\nmsgstr \"[函数](../../fn.md)\"\n\n#: src/scope/lifetime/methods.md:3\nmsgid \"Methods are annotated similarly to functions:\"\nmsgstr \"方法的生命周期注解与函数类似：\"\n\n#: src/scope/lifetime/methods.md:9\nmsgid \"// Annotate lifetimes as in a standalone function.\\n\"\nmsgstr \"// 像独立函数一样注解生命周期。\\n\"\n\n#: src/scope/lifetime/methods.md:12\nmsgid \"\\\"`print`: {}\\\"\"\nmsgstr \"\\\"`print`：{}\\\"\"\n\n#: src/scope/lifetime/methods.md:26\nmsgid \"[methods](../../fn/methods.md)\"\nmsgstr \"[方法](../../fn/methods.md)\"\n\n#: src/scope/lifetime/struct.md:3\nmsgid \"Annotation of lifetimes in structures are also similar to functions:\"\nmsgstr \"结构体中生命周期的注解也与函数类似：\"\n\n#: src/scope/lifetime/struct.md:6\nmsgid \"\"\n\"// A type `Borrowed` which houses a reference to an\\n\"\n\"// `i32`. The reference to `i32` must outlive `Borrowed`.\\n\"\nmsgstr \"\"\n\"// `Borrowed` 类型包含一个 `i32` 的引用。\\n\"\n\"// 这个 `i32` 的引用必须比 `Borrowed` 存活更久。\\n\"\n\n#: src/scope/lifetime/struct.md:10\nmsgid \"// Similarly, both references here must outlive this structure.\\n\"\nmsgstr \"// 同样，这里的两个引用都必须比这个结构体存活更久。\\n\"\n\n#: src/scope/lifetime/struct.md:17\nmsgid \"// An enum which is either an `i32` or a reference to one.\\n\"\nmsgstr \"// 一个枚举，可以是 `i32`，或者是 `i32` 的引用。\\n\"\n\n#: src/scope/lifetime/struct.md:34 src/scope/lifetime/struct.md:36\nmsgid \"\\\"x is borrowed in {:?}\\\"\"\nmsgstr \"\\\"x 在 {:?} 中被借用\\\"\"\n\n#: src/scope/lifetime/struct.md:35\nmsgid \"\\\"x and y are borrowed in {:?}\\\"\"\nmsgstr \"\\\"x 和 y 在 {:?} 中被借用\\\"\"\n\n#: src/scope/lifetime/struct.md:37\nmsgid \"\\\"y is *not* borrowed in {:?}\\\"\"\nmsgstr \"\\\"y 在 {:?} 中**没有**被借用\\\"\"\n\n#: src/scope/lifetime/struct.md:43\nmsgid \"[`struct`s](../../custom_types/structs.md)\"\nmsgstr \"[`struct`（结构体）](../../custom_types/structs.md)\"\n\n#: src/scope/lifetime/trait.md:3\nmsgid \"\"\n\"Annotation of lifetimes in trait methods basically are similar to functions. \"\n\"Note that `impl` may have annotation of lifetimes too.\"\nmsgstr \"\"\n\"trait 方法中的生命周期注解基本上与函数类似。注意，`impl` 也可能需要生命周期注\"\n\"解。\"\n\n#: src/scope/lifetime/trait.md:7\nmsgid \"// A struct with annotation of lifetimes.\\n\"\nmsgstr \"// 一个带有生命周期注解的结构体。\\n\"\n\n#: src/scope/lifetime/trait.md:12\nmsgid \"// Annotate lifetimes to impl.\\n\"\nmsgstr \"// 为 impl 添加生命周期注解。\\n\"\n\n#: src/scope/lifetime/trait.md:24\nmsgid \"\\\"b is {:?}\\\"\"\nmsgstr \"\\\"b 是 {:?}\\\"\"\n\n#: src/scope/lifetime/trait.md:30\nmsgid \"[`trait`s](../../trait.md)\"\nmsgstr \"[`trait`](../../trait.md)\"\n\n#: src/scope/lifetime/lifetime_bounds.md:3\nmsgid \"\"\n\"Just like generic types can be bounded, lifetimes (themselves generic) use \"\n\"bounds as well. The `:` character has a slightly different meaning here, but \"\n\"`+` is the same. Note how the following read:\"\nmsgstr \"\"\n\"正如泛型类型可以被约束一样，生命周期（本身也是泛型）也可以使用约束。这里的 \"\n\"`:` 符号含义略有不同，但 `+` 的用法相同。请注意以下表达的含义：\"\n\n#: src/scope/lifetime/lifetime_bounds.md:7\nmsgid \"`T: 'a`: _All_ references in `T` must outlive lifetime `'a`.\"\nmsgstr \"`T: 'a`：`T` 中的**所有**引用必须比生命周期 `'a` 存活更久。\"\n\n#: src/scope/lifetime/lifetime_bounds.md:8\nmsgid \"\"\n\"`T: Trait + 'a`: Type `T` must implement trait `Trait` and _all_ references \"\n\"in `T` must outlive `'a`.\"\nmsgstr \"\"\n\"`T: Trait + 'a`：类型 `T` 必须实现 trait `Trait`，并且 `T` 中的**所有**引用必\"\n\"须比 `'a` 存活更久。\"\n\n#: src/scope/lifetime/lifetime_bounds.md:11\nmsgid \"\"\n\"The example below shows the above syntax in action used after keyword \"\n\"`where`:\"\nmsgstr \"下面的例子展示了上述语法在 `where` 关键字之后的实际应用：\"\n\n#: src/scope/lifetime/lifetime_bounds.md:14\nmsgid \"// Trait to bound with.\\n\"\nmsgstr \"// 用于约束的 trait。\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:17\nmsgid \"\"\n\"// `Ref` contains a reference to a generic type `T` that has\\n\"\n\"// some lifetime `'a` unknown by `Ref`. `T` is bounded such that any\\n\"\n\"// *references* in `T` must outlive `'a`. Additionally, the lifetime\\n\"\n\"// of `Ref` may not exceed `'a`.\\n\"\nmsgstr \"\"\n\"// `Ref` 包含一个指向泛型类型 `T` 的引用，`T` 具有一个 `Ref` 未知的\\n\"\n\"// 生命周期 `'a`。`T` 受到约束，使得 `T` 中的任何*引用*必须比 `'a` 存活更\"\n\"久。\\n\"\n\"// 此外，`Ref` 的生命周期不能超过 `'a`。\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:22\nmsgid \"// A generic function which prints using the `Debug` trait.\\n\"\nmsgstr \"// 一个使用 `Debug` trait 进行打印的泛型函数。\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:26\nmsgid \"\\\"`print`: t is {:?}\\\"\"\nmsgstr \"\\\"`print`: t 是 {:?}\\\"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:28\nmsgid \"\"\n\"// Here a reference to `T` is taken where `T` implements\\n\"\n\"// `Debug` and all *references* in `T` outlive `'a`. In\\n\"\n\"// addition, `'a` must outlive the function.\\n\"\nmsgstr \"\"\n\"// 这里取了一个 `T` 的引用，其中 `T` 实现了\\n\"\n\"// `Debug` 并且 `T` 中的所有*引用*都比 `'a` 存活更久。\\n\"\n\"// 此外，`'a` 必须比函数存活更久。\\n\"\n\n#: src/scope/lifetime/lifetime_bounds.md:34\nmsgid \"\\\"`print_ref`: t is {:?}\\\"\"\nmsgstr \"\\\"`print_ref`: t 是 {:?}\\\"\"\n\n#: src/scope/lifetime/lifetime_bounds.md:48\nmsgid \"\"\n\"[generics](../../generics.md), [bounds in generics](../../generics/\"\n\"bounds.md), and [multiple bounds in generics](../../generics/multi_bounds.md)\"\nmsgstr \"\"\n\"[泛型](../../generics.md)、[泛型中的约束](../../generics/bounds.md)和[泛型中\"\n\"的多重约束](../../generics/multi_bounds.md)\"\n\n#: src/scope/lifetime/lifetime_coercion.md:3\nmsgid \"\"\n\"A longer lifetime can be coerced into a shorter one so that it works inside \"\n\"a scope it normally wouldn't work in. This comes in the form of inferred \"\n\"coercion by the Rust compiler, and also in the form of declaring a lifetime \"\n\"difference:\"\nmsgstr \"\"\n\"一个较长的生命周期可以被强制转换为一个较短的生命周期，使其能在通常无法工作的\"\n\"作用域内工作。这种转换可以通过 Rust 编译器的推断自动完成，也可以通过声明不同\"\n\"的生命周期的形式实现：\"\n\n#: src/scope/lifetime/lifetime_coercion.md:9\nmsgid \"\"\n\"// Here, Rust infers a lifetime that is as short as possible.\\n\"\n\"// The two references are then coerced to that lifetime.\\n\"\nmsgstr \"\"\n\"// 在这里，Rust 推断出一个尽可能短的生命周期。\\n\"\n\"// 然后两个引用被强制转换为该生命周期。\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:14\nmsgid \"\"\n\"// `<'a: 'b, 'b>` reads as lifetime `'a` is at least as long as `'b`.\\n\"\n\"// Here, we take in an `&'a i32` and return a `&'b i32` as a result of \"\n\"coercion.\\n\"\nmsgstr \"\"\n\"// `<'a: 'b, 'b>` 表示生命周期 `'a` 至少和 `'b` 一样长。\\n\"\n\"// 这里，我们接收一个 `&'a i32` 并返回一个 `&'b i32` 作为强制转换的结果。\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:22\nmsgid \"// Longer lifetime\\n\"\nmsgstr \"// 较长的生命周期\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:25\nmsgid \"// Shorter lifetime\\n\"\nmsgstr \"// 较短的生命周期\\n\"\n\n#: src/scope/lifetime/lifetime_coercion.md:27\nmsgid \"\\\"The product is {}\\\"\"\nmsgstr \"\\\"乘积是 {}\\\"\"\n\n#: src/scope/lifetime/lifetime_coercion.md:28\nmsgid \"\\\"{} is the first\\\"\"\nmsgstr \"\\\"{} 是第一个\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:3\nmsgid \"\"\n\"Rust has a few reserved lifetime names. One of those is `'static`. You might \"\n\"encounter it in two situations:\"\nmsgstr \"\"\n\"Rust 有几个保留的生命周期名称。其中之一是 `'static`。你可能在两种情况下遇到\"\n\"它：\"\n\n#: src/scope/lifetime/static_lifetime.md:7\nmsgid \"// A reference with 'static lifetime:\\n\"\nmsgstr \"// 具有 'static 生命周期的引用：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:8\nmsgid \"\\\"hello world\\\"\"\nmsgstr \"\\\"你好，世界\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:9\nmsgid \"// 'static as part of a trait bound:\\n\"\nmsgstr \"// 'static 作为 trait 约束的一部分：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:14\nmsgid \"\"\n\"Both are related but subtly different and this is a common source for \"\n\"confusion when learning Rust. Here are some examples for each situation:\"\nmsgstr \"\"\n\"这两种情况虽然相关但有微妙的区别，这也是学习 Rust 时常见的困惑来源。以下是每\"\n\"种情况的一些例子：\"\n\n#: src/scope/lifetime/static_lifetime.md:17\nmsgid \"Reference lifetime\"\nmsgstr \"引用生命周期\"\n\n#: src/scope/lifetime/static_lifetime.md:19\nmsgid \"\"\n\"As a reference lifetime `'static` indicates that the data pointed to by the \"\n\"reference lives for the remaining lifetime of the running program. It can \"\n\"still be coerced to a shorter lifetime.\"\nmsgstr \"\"\n\"作为引用生命周期，`'static` 表示该引用指向的数据在程序的整个剩余运行期间都有\"\n\"效。它仍然可以被强制转换为更短的生命周期。\"\n\n#: src/scope/lifetime/static_lifetime.md:23\nmsgid \"\"\n\"There are two common ways to make a variable with `'static` lifetime, and \"\n\"both are stored in the read-only memory of the binary:\"\nmsgstr \"\"\n\"有两种常见的方法可以创建具有 `'static` 生命周期的变量，它们都存储在二进制文件\"\n\"的只读内存中：\"\n\n#: src/scope/lifetime/static_lifetime.md:26\nmsgid \"Make a constant with the `static` declaration.\"\nmsgstr \"使用 `static` 声明创建一个常量。\"\n\n#: src/scope/lifetime/static_lifetime.md:27\nmsgid \"Make a `string` literal which has type: `&'static str`.\"\nmsgstr \"创建一个字符串字面量，其类型为：`&'static str`。\"\n\n#: src/scope/lifetime/static_lifetime.md:29\nmsgid \"See the following example for a display of each method:\"\nmsgstr \"请看下面的例子，展示了这些方法：\"\n\n#: src/scope/lifetime/static_lifetime.md:32\nmsgid \"// Make a constant with `'static` lifetime.\\n\"\nmsgstr \"// 创建一个具有 `'static` 生命周期的常量。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:34\nmsgid \"\"\n\"// Returns a reference to `NUM` where its `'static`\\n\"\n\"// lifetime is coerced to that of the input argument.\\n\"\nmsgstr \"\"\n\"// 返回一个指向 `NUM` 的引用，其中 `'static` 生命周期\\n\"\n\"// 被强制转换为输入参数的生命周期。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:43\nmsgid \"// Make a `string` literal and print it:\\n\"\nmsgstr \"// 创建一个字符串字面量并打印它：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:44\nmsgid \"\\\"I'm in read-only memory\\\"\"\nmsgstr \"\\\"我存储在只读内存中\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:45\nmsgid \"\\\"static_string: {}\\\"\"\nmsgstr \"\\\"static_string 的值：{}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:47\nmsgid \"\"\n\"// When `static_string` goes out of scope, the reference\\n\"\n\"        // can no longer be used, but the data remains in the binary.\\n\"\nmsgstr \"\"\n\"// 当 `static_string` 离开作用域时，该引用\\n\"\n\"        // 不能再被使用，但数据仍然保留在二进制文件中。\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:52\nmsgid \"// Make an integer to use for `coerce_static`:\\n\"\nmsgstr \"// 创建一个整数用于 `coerce_static` 函数：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:55\nmsgid \"// Coerce `NUM` to lifetime of `lifetime_num`:\\n\"\nmsgstr \"// 将 `NUM` 的生命周期强制转换为与 `lifetime_num` 一致：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:58\nmsgid \"\\\"coerced_static: {}\\\"\"\nmsgstr \"\\\"coerced_static: {}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:61\nmsgid \"\\\"NUM: {} stays accessible!\\\"\"\nmsgstr \"\\\"NUM：{} 仍然可以访问！\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:65\nmsgid \"\"\n\"Since `'static` references only need to be valid for the _remainder_ of a \"\n\"program's life, they can be created while the program is executed. Just to \"\n\"demonstrate, the below example uses [`Box::leak`](https://doc.rust-lang.org/\"\n\"std/boxed/struct.Box.html#method.leak) to dynamically create `'static` \"\n\"references. In that case it definitely doesn't live for the entire duration, \"\n\"but only from the leaking point onward.\"\nmsgstr \"\"\n\"`'static` 引用只需在程序生命周期的**剩余部分**有效，因此可以在程序执行过程中\"\n\"创建。为了演示这一点，下面的例子使用 [`Box::leak`](https://doc.rust-lang.org/\"\n\"std/boxed/struct.Box.html#method.leak) 动态创建 `'static` 引用。在这种情况\"\n\"下，它显然不会存在于整个程序生命周期，而只是从泄漏点开始存在。\"\n\n#: src/scope/lifetime/static_lifetime.md:90\nmsgid \"Trait bound\"\nmsgstr \"Trait 约束\"\n\n#: src/scope/lifetime/static_lifetime.md:92\nmsgid \"\"\n\"As a trait bound, it means the type does not contain any non-static \"\n\"references. Eg. the receiver can hold on to the type for as long as they \"\n\"want and it will never become invalid until they drop it.\"\nmsgstr \"\"\n\"作为 trait 约束时，它表示该类型不包含任何非静态引用。例如，接收者可以随意持有\"\n\"该类型，直到主动丢弃之前，它都不会变为无效。\"\n\n#: src/scope/lifetime/static_lifetime.md:96\nmsgid \"\"\n\"It's important to understand this means that any owned data always passes a \"\n\"`'static` lifetime bound, but a reference to that owned data generally does \"\n\"not:\"\nmsgstr \"\"\n\"理解这一点很重要：任何拥有所有权的数据总是满足 `'static` 生命周期约束，但对该\"\n\"数据的引用通常不满足：\"\n\n#: src/scope/lifetime/static_lifetime.md:104\nmsgid \"\\\"'static value passed in is: {:?}\\\"\"\nmsgstr \"\\\"传入的 'static 值是：{:?}\\\"\"\n\n#: src/scope/lifetime/static_lifetime.md:108\nmsgid \"// i is owned and contains no references, thus it's 'static:\\n\"\nmsgstr \"// i 拥有所有权且不包含任何引用，因此它是 'static 的：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:112\nmsgid \"\"\n\"// oops, &i only has the lifetime defined by the scope of\\n\"\n\"    // main(), so it's not 'static:\\n\"\nmsgstr \"\"\n\"// 糟糕，&i 的生命周期仅由 main() 的作用域定义，\\n\"\n\"    // 所以它不是 'static 的：\\n\"\n\n#: src/scope/lifetime/static_lifetime.md:118\nmsgid \"The compiler will tell you:\"\nmsgstr \"编译器会提示你：\"\n\n#: src/scope/lifetime/static_lifetime.md:135\nmsgid \"[`'static` constants](../../custom_types/constants.md)\"\nmsgstr \"[`'static` 常量](../../custom_types/constants.md)\"\n\n#: src/scope/lifetime/elision.md:3\nmsgid \"\"\n\"Some lifetime patterns are overwhelmingly common and so the borrow checker \"\n\"will allow you to omit them to save typing and to improve readability. This \"\n\"is known as elision. Elision exists in Rust solely because these patterns \"\n\"are common.\"\nmsgstr \"\"\n\"有些生命周期模式非常常见，因此借用检查器允许省略它们以减少代码量并提高可读\"\n\"性。这被称为省略。Rust 中的省略存在的唯一原因是这些模式很常见。\"\n\n#: src/scope/lifetime/elision.md:8\nmsgid \"\"\n\"The following code shows a few examples of elision. For a more comprehensive \"\n\"description of elision, see [lifetime elision](https://doc.rust-lang.org/\"\n\"book/ch10-03-lifetime-syntax.html#lifetime-elision) in the book.\"\nmsgstr \"\"\n\"以下代码展示了一些省略的例子。要更全面地了解省略，请参阅 Rust 程序设计语言中\"\n\"的[生命周期省略](https://doc.rust-lang.org/book/ch10-03-lifetime-\"\n\"syntax.html#lifetime-elision)章节。\"\n\n#: src/scope/lifetime/elision.md:12\nmsgid \"\"\n\"// `elided_input` and `annotated_input` essentially have identical \"\n\"signatures\\n\"\n\"// because the lifetime of `elided_input` is inferred by the compiler:\\n\"\nmsgstr \"\"\n\"// `elided_input` 和 `annotated_input` 本质上具有相同的签名\\n\"\n\"// 因为 `elided_input` 的生命周期是由编译器推断的：\\n\"\n\n#: src/scope/lifetime/elision.md:15\nmsgid \"\\\"`elided_input`: {}\\\"\"\nmsgstr \"\\\"`elided_input`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:19\nmsgid \"\\\"`annotated_input`: {}\\\"\"\nmsgstr \"\\\"`annotated_input`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:21\nmsgid \"\"\n\"// Similarly, `elided_pass` and `annotated_pass` have identical signatures\\n\"\n\"// because the lifetime is added implicitly to `elided_pass`:\\n\"\nmsgstr \"\"\n\"// 同样，`elided_pass` 和 `annotated_pass` 具有相同的签名\\n\"\n\"// 因为生命周期被隐式地添加到 `elided_pass`：\\n\"\n\n#: src/scope/lifetime/elision.md:34\nmsgid \"\\\"`elided_pass`: {}\\\"\"\nmsgstr \"\\\"`elided_pass`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:35\nmsgid \"\\\"`annotated_pass`: {}\\\"\"\nmsgstr \"\\\"`annotated_pass`: {}\\\"\"\n\n#: src/scope/lifetime/elision.md:41\nmsgid \"\"\n\"[elision](https://doc.rust-lang.org/book/ch10-03-lifetime-\"\n\"syntax.html#lifetime-elision)\"\nmsgstr \"\"\n\"[省略](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#lifetime-\"\n\"elision)\"\n\n#: src/trait.md:3\nmsgid \"\"\n\"A `trait` is a collection of methods defined for an unknown type: `Self`. \"\n\"They can access other methods declared in the same trait.\"\nmsgstr \"\"\n\"`trait` 是为未知类型 `Self` 定义的一组方法集合。这些方法可以访问同一 trait 中\"\n\"声明的其他方法。\"\n\n#: src/trait.md:6\nmsgid \"\"\n\"Traits can be implemented for any data type. In the example below, we define \"\n\"`Animal`, a group of methods. The `Animal` `trait` is then implemented for \"\n\"the `Sheep` data type, allowing the use of methods from `Animal` with a \"\n\"`Sheep`.\"\nmsgstr \"\"\n\"trait 可以为任何数据类型实现。在下面的例子中，我们定义了 `Animal`，一组方法的\"\n\"集合。然后为 `Sheep` 数据类型实现 `Animal` trait，这样就可以对 `Sheep` 使用 \"\n\"`Animal` 中的方法。\"\n\n#: src/trait.md:15\nmsgid \"\"\n\"// Associated function signature; `Self` refers to the implementor type.\\n\"\nmsgstr \"// 关联函数签名；`Self` 指代实现者类型。\\n\"\n\n#: src/trait.md:18\nmsgid \"// Method signatures; these will return a string.\\n\"\nmsgstr \"// 方法签名；这些方法将返回一个字符串。\\n\"\n\n#: src/trait.md:22\nmsgid \"// Traits can provide default method definitions.\\n\"\nmsgstr \"// trait 可以提供默认的方法实现。\\n\"\n\n#: src/trait.md:24\nmsgid \"\\\"{} says {}\\\"\"\nmsgstr \"\\\"{} 说 {}\\\"\"\n\n#: src/trait.md:35\nmsgid \"// Implementor methods can use the implementor's trait methods.\\n\"\nmsgstr \"// 实现者的方法可以使用实现者的 trait 方法。\\n\"\n\n#: src/trait.md:36\nmsgid \"\\\"{} is already naked...\\\"\"\nmsgstr \"\\\"{} 已经剃过毛了...\\\"\"\n\n#: src/trait.md:38\nmsgid \"\\\"{} gets a haircut!\\\"\"\nmsgstr \"\\\"{} 剃了个毛！\\\"\"\n\n#: src/trait.md:44 src/trait/dyn.md:25\nmsgid \"// Implement the `Animal` trait for `Sheep`.\\n\"\nmsgstr \"// 为 `Sheep` 实现 `Animal` trait\\n\"\n\n#: src/trait.md:47\nmsgid \"// `Self` is the implementor type: `Sheep`.\\n\"\nmsgstr \"// `Self` 是实现者类型，即 `Sheep`\\n\"\n\n#: src/trait.md:58\nmsgid \"\\\"baaaaah?\\\"\"\nmsgstr \"\\\"咩～？\\\"\"\n\n#: src/trait.md:60 src/trait/dyn.md:29\nmsgid \"\\\"baaaaah!\\\"\"\nmsgstr \"\\\"咩～！\\\"\"\n\n#: src/trait.md:64\nmsgid \"// Default trait methods can be overridden.\\n\"\nmsgstr \"// 可以重写默认的 trait 方法\\n\"\n\n#: src/trait.md:66\nmsgid \"// For example, we can add some quiet contemplation.\\n\"\nmsgstr \"// 例如，我们可以添加一些安静的思考\\n\"\n\n#: src/trait.md:67\nmsgid \"\\\"{} pauses briefly... {}\\\"\"\nmsgstr \"\\\"{} 短暂停顿…… {}\\\"\"\n\n#: src/trait.md:72\nmsgid \"// Type annotation is necessary in this case.\\n\"\nmsgstr \"// 在这种情况下需要类型标注\\n\"\n\n#: src/trait.md:73\nmsgid \"\\\"Dolly\\\"\"\nmsgstr \"\\\"多莉\\\"\"\n\n#: src/trait.md:74\nmsgid \"// TODO ^ Try removing the type annotations.\\n\"\nmsgstr \"// TODO ^ 尝试移除类型标注\\n\"\n\n#: src/trait/derive.md:3\nmsgid \"\"\n\"The compiler is capable of providing basic implementations for some traits \"\n\"via the `#[derive]` [attribute](../attribute.md). These traits can still be \"\n\"manually implemented if a more complex behavior is required.\"\nmsgstr \"\"\n\"编译器可以通过 `#[derive]` [属性](../attribute.md)为某些 trait 提供基本实现。\"\n\"如果需要更复杂的行为，这些 trait 仍然可以手动实现。\"\n\n#: src/trait/derive.md:7\nmsgid \"The following is a list of derivable traits:\"\nmsgstr \"以下是可派生的 trait 列表：\"\n\n#: src/trait/derive.md:9\nmsgid \"\"\n\"Comparison traits: [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html), \"\n\"[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html), \"\n\"[`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html), [`PartialOrd`]\"\n\"(https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html).\"\nmsgstr \"\"\n\"比较 trait：[`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html)、\"\n\"[`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html)、\"\n\"[`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html)、[`PartialOrd`]\"\n\"(https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html)。\"\n\n#: src/trait/derive.md:11\nmsgid \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html), to create \"\n\"`T` from `&T` via a copy.\"\nmsgstr \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html)，通过复制 \"\n\"`&T` 创建 `T`。\"\n\n#: src/trait/derive.md:12\nmsgid \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html), to give a \"\n\"type 'copy semantics' instead of 'move semantics'.\"\nmsgstr \"\"\n\"[`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html)，使类型具备\"\n\"\\\"复制语义\\\"而不是\\\"移动语义\\\"。\"\n\n#: src/trait/derive.md:13\nmsgid \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html), to compute a \"\n\"hash from `&T`.\"\nmsgstr \"\"\n\"[`Hash`](https://doc.rust-lang.org/std/hash/trait.Hash.html)，从 `&T` 计算哈\"\n\"希值。\"\n\n#: src/trait/derive.md:14\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html), to \"\n\"create an empty instance of a data type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html)，创建一\"\n\"个数据类型的空实例。\"\n\n#: src/trait/derive.md:15\nmsgid \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html), to format a \"\n\"value using the `{:?}` formatter.\"\nmsgstr \"\"\n\"[`Debug`](https://doc.rust-lang.org/std/fmt/trait.Debug.html)，使用 `{:?}` 格\"\n\"式化器来格式化一个值。\"\n\n#: src/trait/derive.md:18\nmsgid \"// `Centimeters`, a tuple struct that can be compared\\n\"\nmsgstr \"// `Centimeters`，一个可比较的元组结构体\\n\"\n\n#: src/trait/derive.md:21\nmsgid \"// `Inches`, a tuple struct that can be printed\\n\"\nmsgstr \"// `Inches`，一个可打印的元组结构体\\n\"\n\n#: src/trait/derive.md:33\nmsgid \"// `Seconds`, a tuple struct with no additional attributes\\n\"\nmsgstr \"// `Seconds`，一个没有额外属性的元组结构体\\n\"\n\n#: src/trait/derive.md:40\nmsgid \"\"\n\"// Error: `Seconds` can't be printed; it doesn't implement the `Debug` \"\n\"trait\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误：`Seconds` 无法打印，因为它没有实现 `Debug` trait\\n\"\n\"    //println!(\\\"One second looks like: {:?}\\\", _one_second);\\n\"\n\"    // TODO ^ 尝试取消这行的注释\\n\"\n\n#: src/trait/derive.md:44\nmsgid \"\"\n\"// Error: `Seconds` can't be compared; it doesn't implement the `PartialEq` \"\n\"trait\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误：`Seconds` 无法比较，因为它没有实现 `PartialEq` trait\\n\"\n\"    //let _this_is_true = (_one_second == _one_second);\\n\"\n\"    // TODO ^ 尝试取消这行的注释\\n\"\n\n#: src/trait/derive.md:50\nmsgid \"\\\"One foot equals {:?}\\\"\"\nmsgstr \"\\\"一英尺等于 {:?}\\\"\"\n\n#: src/trait/derive.md:56\nmsgid \"\\\"smaller\\\"\"\nmsgstr \"\\\"更小\\\"\"\n\n#: src/trait/derive.md:58\nmsgid \"\\\"bigger\\\"\"\nmsgstr \"\\\"更大\\\"\"\n\n#: src/trait/derive.md:61\nmsgid \"\\\"One foot is {} than one meter.\\\"\"\nmsgstr \"\\\"一英尺比一米{}\\\"\"\n\n#: src/trait/derive.md:67\nmsgid \"[`derive`](https://doc.rust-lang.org/reference/attributes.html#derive)\"\nmsgstr \"[`derive`](https://doc.rust-lang.org/reference/attributes.html#derive)\"\n\n#: src/trait/dyn.md:3\nmsgid \"\"\n\"The Rust compiler needs to know how much space every function's return type \"\n\"requires. This means all your functions have to return a concrete type. \"\n\"Unlike other languages, if you have a trait like `Animal`, you can't write a \"\n\"function that returns `Animal`, because its different implementations will \"\n\"need different amounts of memory.\"\nmsgstr \"\"\n\"Rust 编译器需要知道每个函数的返回类型所需的内存空间。这意味着所有函数都必须返\"\n\"回一个具体类型。与其他语言不同，如果你有一个像 `Animal` 这样的 trait，你不能\"\n\"编写一个直接返回 `Animal` 的函数，因为它的不同实现可能需要不同大小的内存。\"\n\n#: src/trait/dyn.md:8\nmsgid \"\"\n\"However, there's an easy workaround. Instead of returning a trait object \"\n\"directly, our functions return a `Box` which _contains_ some `Animal`. A \"\n\"`box` is just a reference to some memory in the heap. Because a reference \"\n\"has a statically-known size, and the compiler can guarantee it points to a \"\n\"heap-allocated `Animal`, we can return a trait from our function!\"\nmsgstr \"\"\n\"然而，有一个简单的解决方法。我们可以让函数返回一个**包含** `Animal` 的 \"\n\"`Box`，而不是直接返回 trait 对象。`Box` 本质上是一个指向堆内存的引用。由于引\"\n\"用的大小是静态已知的，且编译器可以保证它指向堆上分配的 `Animal`，这样我们就能\"\n\"从函数中返回一个 trait 了！\"\n\n#: src/trait/dyn.md:13\nmsgid \"\"\n\"Rust tries to be as explicit as possible whenever it allocates memory on the \"\n\"heap. So if your function returns a pointer-to-trait-on-heap in this way, \"\n\"you need to write the return type with the `dyn` keyword, e.g. `Box<dyn \"\n\"Animal>`.\"\nmsgstr \"\"\n\"Rust 在堆上分配内存时力求明确。因此，如果你的函数以这种方式返回一个指向堆上 \"\n\"trait 的指针，你需要在返回类型中使用 `dyn` 关键字，例如 `Box<dyn Animal>`。\"\n\n#: src/trait/dyn.md:22\nmsgid \"// Instance method signature\\n\"\nmsgstr \"// 实例方法签名\\n\"\n\n#: src/trait/dyn.md:32\nmsgid \"// Implement the `Animal` trait for `Cow`.\\n\"\nmsgstr \"// 为 `Cow` 实现 `Animal` trait\\n\"\n\n#: src/trait/dyn.md:36\nmsgid \"\\\"moooooo!\\\"\"\nmsgstr \"\\\"哞~哞~哞~\\\"\"\n\n#: src/trait/dyn.md:39\nmsgid \"\"\n\"// Returns some struct that implements Animal, but we don't know which one \"\n\"at compile time.\\n\"\nmsgstr \"\"\n\"// 返回某个实现了 Animal 的结构体，但在编译时我们并不知道具体是哪一个\\n\"\n\n#: src/trait/dyn.md:52\nmsgid \"\\\"You've randomly chosen an animal, and it says {}\\\"\"\nmsgstr \"\\\"你随机选择了一个动物，它说：{}\\\"\"\n\n#: src/trait/ops.md:3\nmsgid \"\"\n\"In Rust, many of the operators can be overloaded via traits. That is, some \"\n\"operators can be used to accomplish different tasks based on their input \"\n\"arguments. This is possible because operators are syntactic sugar for method \"\n\"calls. For example, the `+` operator in `a + b` calls the `add` method (as \"\n\"in `a.add(b)`). This `add` method is part of the `Add` trait. Hence, the `+` \"\n\"operator can be used by any implementor of the `Add` trait.\"\nmsgstr \"\"\n\"在 Rust 中，许多运算符可以通过 trait 进行重载。这意味着某些运算符可以根据输入\"\n\"参数执行不同的任务。之所以可能，是因为运算符实际上是方法调用的语法糖。例如，\"\n\"`a + b` 中的 `+` 运算符会调用 `add` 方法（相当于 `a.add(b)`）。这个 `add` 方\"\n\"法是 `Add` trait 的一部分。因此，任何实现了 `Add` trait 的类型都可以使用 `+` \"\n\"运算符。\"\n\n#: src/trait/ops.md:9\nmsgid \"\"\n\"A list of the traits, such as `Add`, that overload operators can be found in \"\n\"[`core::ops`](https://doc.rust-lang.org/core/ops/).\"\nmsgstr \"\"\n\"可以在 [`core::ops`](https://doc.rust-lang.org/core/ops/) 模块中找到用于重载\"\n\"运算符的 trait 列表，如 `Add` 等。\"\n\n#: src/trait/ops.md:22\nmsgid \"\"\n\"// The `std::ops::Add` trait is used to specify the functionality of `+`.\\n\"\n\"// Here, we make `Add<Bar>` - the trait for addition with a RHS of type \"\n\"`Bar`.\\n\"\n\"// The following block implements the operation: Foo + Bar = FooBar\\n\"\nmsgstr \"\"\n\"// `std::ops::Add` trait 用于指定 `+` 的功能\\n\"\n\"// 这里我们实现 `Add<Bar>` - 这个 trait 用于与 `Bar` 类型的右操作数相加\\n\"\n\"// 下面的代码块实现了操作：Foo + Bar = FooBar\\n\"\n\n#: src/trait/ops.md:30\nmsgid \"\\\"> Foo.add(Bar) was called\\\"\"\nmsgstr \"\\\"> 调用了 Foo.add(Bar)\\\"\"\n\n#: src/trait/ops.md:35\nmsgid \"\"\n\"// By reversing the types, we end up implementing non-commutative addition.\\n\"\n\"// Here, we make `Add<Foo>` - the trait for addition with a RHS of type \"\n\"`Foo`.\\n\"\n\"// This block implements the operation: Bar + Foo = BarFoo\\n\"\nmsgstr \"\"\n\"// 通过交换类型顺序，我们实现了非交换加法。\\n\"\n\"// 这里我们实现 `Add<Foo>` trait —— 用于处理右操作数类型为 `Foo` 的加法。\\n\"\n\"// 此代码块实现了如下操作：Bar + Foo = BarFoo\\n\"\n\n#: src/trait/ops.md:43\nmsgid \"\\\"> Bar.add(Foo) was called\\\"\"\nmsgstr \"\\\"> 调用了 Bar.add(Foo)\\\"\"\n\n#: src/trait/ops.md:50\nmsgid \"\\\"Foo + Bar = {:?}\\\"\"\nmsgstr \"\\\"Foo + Bar = {:?}\\\"\"\n\n#: src/trait/ops.md:51\nmsgid \"\\\"Bar + Foo = {:?}\\\"\"\nmsgstr \"\\\"Bar + Foo = {:?}\\\"\"\n\n#: src/trait/ops.md:55 src/testing.md:16 src/testing/doc_testing.md:105\n#: src/testing/dev_dependencies.md:36\nmsgid \"See Also\"\nmsgstr \"参见\"\n\n#: src/trait/ops.md:57\nmsgid \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html), [Syntax Index]\"\n\"(https://doc.rust-lang.org/book/appendix-02-operators.html)\"\nmsgstr \"\"\n\"[Add](https://doc.rust-lang.org/core/ops/trait.Add.html)，[语法索引](https://\"\n\"doc.rust-lang.org/book/appendix-02-operators.html)\"\n\n#: src/trait/drop.md:3\nmsgid \"\"\n\"The [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) trait only \"\n\"has one method: `drop`, which is called automatically when an object goes \"\n\"out of scope. The main use of the `Drop` trait is to free the resources that \"\n\"the implementor instance owns.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) trait 只有一个方\"\n\"法：`drop`，它会在对象离开作用域时自动调用。`Drop` trait 的主要用途是释放实现\"\n\"该 trait 的实例所拥有的资源。\"\n\n#: src/trait/drop.md:7\nmsgid \"\"\n\"`Box`, `Vec`, `String`, `File`, and `Process` are some examples of types \"\n\"that implement the `Drop` trait to free resources. The `Drop` trait can also \"\n\"be manually implemented for any custom data type.\"\nmsgstr \"\"\n\"`Box`、`Vec`、`String`、`File` 和 `Process` 是一些实现了 `Drop` trait 以释放\"\n\"资源的类型示例。你也可以为任何自定义数据类型手动实现 `Drop` trait。\"\n\n#: src/trait/drop.md:11\nmsgid \"\"\n\"The following example adds a print to console to the `drop` function to \"\n\"announce when it is called.\"\nmsgstr \"\"\n\"下面的例子在 `drop` 函数中添加了一个控制台打印，用于宣告它被调用的时机。\"\n\n#: src/trait/drop.md:18\nmsgid \"// This trivial implementation of `drop` adds a print to console.\\n\"\nmsgstr \"// 这个简单的 `drop` 实现添加了一个控制台打印\\n\"\n\n#: src/trait/drop.md:22\nmsgid \"\\\"> Dropping {}\\\"\"\nmsgstr \"\\\"> 正在释放 {}\\\"\"\n\n#: src/trait/drop.md:27 src/std_misc/path.md:33 src/std_misc/fs.md:44\n#: src/std_misc/fs.md:87\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/trait/drop.md:29\nmsgid \"// block A\\n\"\nmsgstr \"// 块 A\\n\"\n\n#: src/trait/drop.md:31 src/std_misc/path.md:33\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/trait/drop.md:33\nmsgid \"// block B\\n\"\nmsgstr \"// 块 B\\n\"\n\n#: src/trait/drop.md:35 src/std_misc/path.md:36\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/trait/drop.md:36\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/trait/drop.md:38\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"正在退出块 B\\\"\"\n\n#: src/trait/drop.md:40\nmsgid \"\\\"Just exited block B\\\"\"\nmsgstr \"\\\"刚刚退出了块 B\\\"\"\n\n#: src/trait/drop.md:42\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"正在退出块 A\\\"\"\n\n#: src/trait/drop.md:44\nmsgid \"\\\"Just exited block A\\\"\"\nmsgstr \"\\\"刚刚退出了块 A\\\"\"\n\n#: src/trait/drop.md:46\nmsgid \"// Variable can be manually dropped using the `drop` function\\n\"\nmsgstr \"// 可以使用 `drop` 函数手动释放变量\\n\"\n\n#: src/trait/drop.md:48\nmsgid \"// TODO ^ Try commenting this line\\n\"\nmsgstr \"// TODO ^ 试试注释掉这一行\\n\"\n\n#: src/trait/drop.md:50\nmsgid \"\\\"end of the main function\\\"\"\nmsgstr \"\\\"main 函数结束\\\"\"\n\n#: src/trait/drop.md:52\nmsgid \"\"\n\"// `_a` *won't* be `drop`ed again here, because it already has been\\n\"\n\"    // (manually) `drop`ed\\n\"\nmsgstr \"\"\n\"// `_a` 在这里**不会**被再次 `drop`，因为它已经\\n\"\n\"    // 被（手动）`drop` 过了\\n\"\n\n#: src/trait/drop.md:57\nmsgid \"\"\n\"For a more practical example, here's how the `Drop` trait can be used to \"\n\"automatically clean up temporary files when they're no longer needed:\"\nmsgstr \"\"\n\"下面是一个更实用的例子，展示如何使用 `Drop` 特质在不再需要临时文件时自动清理\"\n\"它们：\"\n\n#: src/trait/drop.md:71\nmsgid \"// Note: File::create() will overwrite existing files\\n\"\nmsgstr \"// 注意：File::create() 会覆盖现有文件\\n\"\n\n#: src/trait/drop.md:77\nmsgid \"\"\n\"// When TempFile is dropped:\\n\"\n\"// 1. First, the File will be automatically closed (Drop for File)\\n\"\n\"// 2. Then our drop implementation will remove the file\\n\"\nmsgstr \"\"\n\"// 当 TempFile 被丢弃时：\\n\"\n\"// 1. 首先，File 会自动关闭（File 的 Drop 实现）\\n\"\n\"// 2. 然后我们的 drop 实现会删除文件\\n\"\n\n#: src/trait/drop.md:83\nmsgid \"// Note: File is already closed at this point\\n\"\nmsgstr \"// 注意：文件在此时已经关闭\\n\"\n\n#: src/trait/drop.md:85\nmsgid \"\\\"Failed to remove temporary file: {}\\\"\"\nmsgstr \"\\\"删除临时文件失败：{}\\\"\"\n\n#: src/trait/drop.md:87\nmsgid \"\\\"> Dropped temporary file: {:?}\\\"\"\nmsgstr \"\\\"> 已丢弃临时文件：{:?}\\\"\"\n\n#: src/trait/drop.md:92\nmsgid \"// Create a new scope to demonstrate drop behavior\\n\"\nmsgstr \"// 创建新作用域来演示丢弃行为\\n\"\n\n#: src/trait/drop.md:94\nmsgid \"\\\"test.txt\\\"\"\nmsgstr \"\\\"test.txt\\\"\"\n\n#: src/trait/drop.md:95\nmsgid \"\\\"Temporary file created\\\"\"\nmsgstr \"\\\"已创建临时文件\\\"\"\n\n#: src/trait/drop.md:96\nmsgid \"// File will be automatically cleaned up when temp goes out of scope\\n\"\nmsgstr \"// 当 temp 超出作用域时，文件会自动清理\\n\"\n\n#: src/trait/drop.md:98\nmsgid \"\\\"End of scope - file should be cleaned up\\\"\"\nmsgstr \"\\\"作用域结束 - 文件应该被清理\\\"\"\n\n#: src/trait/drop.md:100\nmsgid \"// We can also manually drop if needed\\n\"\nmsgstr \"// 如果需要，我们也可以手动丢弃\\n\"\n\n#: src/trait/drop.md:101\nmsgid \"\\\"another_test.txt\\\"\"\nmsgstr \"\\\"another_test.txt\\\"\"\n\n#: src/trait/drop.md:102\nmsgid \"// Explicitly drop the file\\n\"\nmsgstr \"// 显式丢弃文件\\n\"\n\n#: src/trait/drop.md:103\nmsgid \"\\\"Manually dropped file\\\"\"\nmsgstr \"\\\"手动丢弃的文件\\\"\"\n\n#: src/trait/iter.md:3\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html) \"\n\"trait is used to implement iterators over collections such as arrays.\"\nmsgstr \"\"\n\"[`Iterator`](https://doc.rust-lang.org/core/iter/trait.Iterator.html) trait \"\n\"用于实现对数组等集合的迭代器。\"\n\n#: src/trait/iter.md:6\nmsgid \"\"\n\"The trait requires only a method to be defined for the `next` element, which \"\n\"may be manually defined in an `impl` block or automatically defined (as in \"\n\"arrays and ranges).\"\nmsgstr \"\"\n\"该 trait 只要求为 `next` 元素定义一个方法，这个方法可以在 `impl` 块中手动定\"\n\"义，也可以自动定义（如在数组和区间中）。\"\n\n#: src/trait/iter.md:10\nmsgid \"\"\n\"As a point of convenience for common situations, the `for` construct turns \"\n\"some collections into iterators using the [`.into_iter()`](https://doc.rust-\"\n\"lang.org/std/iter/trait.IntoIterator.html) method.\"\nmsgstr \"\"\n\"为了在常见情况下提供便利，`for` 结构使用 [`.into_iter()`](https://doc.rust-\"\n\"lang.org/std/iter/trait.IntoIterator.html) 方法将某些集合转换为迭代器。\"\n\n#: src/trait/iter.md:18\nmsgid \"\"\n\"// Implement `Iterator` for `Fibonacci`.\\n\"\n\"// The `Iterator` trait only requires a method to be defined for the `next` \"\n\"element,\\n\"\n\"// and an `associated type` to declare the return type of the iterator.\\n\"\nmsgstr \"\"\n\"// 为 `Fibonacci` 实现 `Iterator`。\\n\"\n\"// `Iterator` 特质只要求为 `next` 元素定义一个方法，\\n\"\n\"// 并需要一个`关联类型`来声明迭代器的返回类型。\\n\"\n\n#: src/trait/iter.md:23\nmsgid \"// We can refer to this type using Self::Item\\n\"\nmsgstr \"// 我们可以使用 Self::Item 引用这个类型\\n\"\n\n#: src/trait/iter.md:26\nmsgid \"\"\n\"// Here, we define the sequence using `.curr` and `.next`.\\n\"\n\"    // The return type is `Option<T>`:\\n\"\n\"    //     * When the `Iterator` is finished, `None` is returned.\\n\"\n\"    //     * Otherwise, the next value is wrapped in `Some` and returned.\\n\"\n\"    // We use Self::Item in the return type, so we can change\\n\"\n\"    // the type without having to update the function signatures.\\n\"\nmsgstr \"\"\n\"// 这里，我们使用 `.curr` 和 `.next` 定义序列。\\n\"\n\"    // 返回类型是 `Option<T>`：\\n\"\n\"    //     * 当 `Iterator` 结束时，返回 `None`。\\n\"\n\"    //     * 否则，将下一个值包装在 `Some` 中并返回。\\n\"\n\"    // 我们在返回类型中使用 Self::Item，这样可以更改\\n\"\n\"    // 类型而无需更新函数签名。\\n\"\n\n#: src/trait/iter.md:38\nmsgid \"\"\n\"// Since there's no endpoint to a Fibonacci sequence, the `Iterator`\\n\"\n\"        // will never return `None`, and `Some` is always returned.\\n\"\nmsgstr \"\"\n\"// 由于斐波那契序列没有终点，`Iterator` \\n\"\n\"        // 永远不会返回 `None`，始终返回 `Some`。\\n\"\n\n#: src/trait/iter.md:43\nmsgid \"// Returns a Fibonacci sequence generator\\n\"\nmsgstr \"// 返回一个斐波那契序列生成器\\n\"\n\n#: src/trait/iter.md:50\nmsgid \"// `0..3` is an `Iterator` that generates: 0, 1, and 2.\\n\"\nmsgstr \"// `0..3` 是一个生成 0、1 和 2 的 `Iterator`。\\n\"\n\n#: src/trait/iter.md:53\nmsgid \"\\\"Four consecutive `next` calls on 0..3\\\"\"\nmsgstr \"\\\"对 0..3 连续调用四次 `next`\\\"\"\n\n#: src/trait/iter.md:54 src/trait/iter.md:55 src/trait/iter.md:56\n#: src/trait/iter.md:57 src/std_misc/fs.md:90\nmsgid \"\\\"> {:?}\\\"\"\nmsgstr \"\\\"> {:?}\\\"\"\n\n#: src/trait/iter.md:59\nmsgid \"\"\n\"// `for` works through an `Iterator` until it returns `None`.\\n\"\n\"    // Each `Some` value is unwrapped and bound to a variable (here, `i`).\\n\"\nmsgstr \"\"\n\"// `for` 遍历 `Iterator` 直到它返回 `None`。\\n\"\n\"    // 每个 `Some` 值被解包并绑定到一个变量（这里是 `i`）。\\n\"\n\n#: src/trait/iter.md:61\nmsgid \"\\\"Iterate through 0..3 using `for`\\\"\"\nmsgstr \"\\\"使用 `for` 遍历 0..3\\\"\"\n\n#: src/trait/iter.md:63 src/trait/iter.md:69 src/trait/iter.md:75\n#: src/trait/iter.md:83 src/std/vec.md:50 src/std/str.md:22\n#: src/std_misc/fs.md:82\nmsgid \"\\\"> {}\\\"\"\nmsgstr \"\\\"> {}\\\"\"\n\n#: src/trait/iter.md:66\nmsgid \"// The `take(n)` method reduces an `Iterator` to its first `n` terms.\\n\"\nmsgstr \"// `take(n)` 方法将 `Iterator` 限制为其前 `n` 项。\\n\"\n\n#: src/trait/iter.md:67\nmsgid \"\\\"The first four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\\\"斐波那契序列的前四项是：\\\"\"\n\n#: src/trait/iter.md:72\nmsgid \"\"\n\"// The `skip(n)` method shortens an `Iterator` by dropping its first `n` \"\n\"terms.\\n\"\nmsgstr \"// `skip(n)` 方法通过跳过前 `n` 项来缩短 `Iterator`。\\n\"\n\n#: src/trait/iter.md:73\nmsgid \"\\\"The next four terms of the Fibonacci sequence are: \\\"\"\nmsgstr \"\\\"斐波那契序列的接下来四项是：\\\"\"\n\n#: src/trait/iter.md:80\nmsgid \"// The `iter` method produces an `Iterator` over an array/slice.\\n\"\nmsgstr \"// `iter` 方法为数组/切片创建一个 `Iterator`。\\n\"\n\n#: src/trait/iter.md:81\nmsgid \"\\\"Iterate the following array {:?}\\\"\"\nmsgstr \"\\\"遍历以下数组 {:?}\\\"\"\n\n#: src/trait/impl_trait.md:3\nmsgid \"`impl Trait` can be used in two locations:\"\nmsgstr \"`impl Trait` 可以在两个位置使用：\"\n\n#: src/trait/impl_trait.md:5\nmsgid \"as an argument type\"\nmsgstr \"作为参数类型\"\n\n#: src/trait/impl_trait.md:6\nmsgid \"as a return type\"\nmsgstr \"作为返回类型\"\n\n#: src/trait/impl_trait.md:8\nmsgid \"As an argument type\"\nmsgstr \"作为参数类型\"\n\n#: src/trait/impl_trait.md:10\nmsgid \"\"\n\"If your function is generic over a trait but you don't mind the specific \"\n\"type, you can simplify the function declaration using `impl Trait` as the \"\n\"type of the argument.\"\nmsgstr \"\"\n\"如果你的函数对某个 trait 是泛型的，但不关心具体类型，你可以使用 `impl Trait` \"\n\"作为参数类型来简化函数声明。\"\n\n#: src/trait/impl_trait.md:12\nmsgid \"For example, consider the following code:\"\nmsgstr \"例如，考虑以下代码：\"\n\n#: src/trait/impl_trait.md:18 src/trait/impl_trait.md:37\nmsgid \"// For each line in the source\\n\"\nmsgstr \"// 遍历数据源中的每一行\\n\"\n\n#: src/trait/impl_trait.md:20 src/trait/impl_trait.md:39\nmsgid \"\"\n\"// If the line was read successfully, process it, if not, return the error\\n\"\nmsgstr \"// 如果成功读取行，则处理它；否则，返回错误\\n\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40 src/std/str.md:41\nmsgid \"','\"\nmsgstr \"','\"\n\n#: src/trait/impl_trait.md:21 src/trait/impl_trait.md:40\nmsgid \"// Split the line separated by commas\\n\"\nmsgstr \"// 按逗号分割行\\n\"\n\n#: src/trait/impl_trait.md:22 src/trait/impl_trait.md:41\nmsgid \"// Remove leading and trailing whitespace\\n\"\nmsgstr \"// 去除首尾空白\\n\"\n\n#: src/trait/impl_trait.md:23 src/trait/impl_trait.md:42\nmsgid \"// Collect all strings in a row into a Vec<String>\\n\"\nmsgstr \"// 将该行的所有字符串收集到 Vec<String> 中\\n\"\n\n#: src/trait/impl_trait.md:26 src/trait/impl_trait.md:45\nmsgid \"// Collect all lines into a Vec<Vec<String>>\\n\"\nmsgstr \"// 将所有行收集到 Vec<Vec<String>> 中\\n\"\n\n#: src/trait/impl_trait.md:30\nmsgid \"\"\n\"`parse_csv_document` is generic, allowing it to take any type which \"\n\"implements BufRead, such as `BufReader<File>` or `[u8]`, but it's not \"\n\"important what type `R` is, and `R` is only used to declare the type of \"\n\"`src`, so the function can also be written as:\"\nmsgstr \"\"\n\"`parse_csv_document` 是泛型函数，可以接受任何实现了 `BufRead` 的类型，如 \"\n\"`BufReader<File>` 或 `[u8]`。但具体的 `R` 类型并不重要，`R` 仅用于声明 `src` \"\n\"的类型。因此，这个函数也可以写成：\"\n\n#: src/trait/impl_trait.md:49\nmsgid \"\"\n\"Note that using `impl Trait` as an argument type means that you cannot \"\n\"explicitly state what form of the function you use, i.e. \"\n\"`parse_csv_document::<std::io::Empty>(std::io::empty())` will not work with \"\n\"the second example.\"\nmsgstr \"\"\n\"注意，使用 `impl Trait` 作为参数类型意味着你无法显式指定使用的函数形式。例\"\n\"如，`parse_csv_document::<std::io::Empty>(std::io::empty())` 在第二个例子中将\"\n\"无法工作。\"\n\n#: src/trait/impl_trait.md:51\nmsgid \"As a return type\"\nmsgstr \"作为返回类型\"\n\n#: src/trait/impl_trait.md:53\nmsgid \"\"\n\"If your function returns a type that implements `MyTrait`, you can write its \"\n\"return type as `-> impl MyTrait`. This can help simplify your type \"\n\"signatures quite a lot!\"\nmsgstr \"\"\n\"如果函数返回一个实现了 `MyTrait` 的类型，你可以将其返回类型写为 `-> impl \"\n\"MyTrait`。这可以大大简化类型签名！\"\n\n#: src/trait/impl_trait.md:59\nmsgid \"\"\n\"// This function combines two `Vec<i32>` and returns an iterator over it.\\n\"\n\"// Look how complicated its return type is!\\n\"\nmsgstr \"\"\n\"// 这个函数合并两个 `Vec<i32>` 并返回一个迭代器。\\n\"\n\"// 看看它的返回类型有多复杂！\\n\"\n\n#: src/trait/impl_trait.md:68\nmsgid \"\"\n\"// This is the exact same function, but its return type uses `impl Trait`.\\n\"\n\"// Look how much simpler it is!\\n\"\nmsgstr \"\"\n\"// 这是完全相同的函数，但它的返回类型使用了 `impl Trait`。\\n\"\n\"// 看看它变得多么简单！\\n\"\n\n#: src/trait/impl_trait.md:87\nmsgid \"\\\"all done\\\"\"\nmsgstr \"\\\"全部完成\\\"\"\n\n#: src/trait/impl_trait.md:91\nmsgid \"\"\n\"More importantly, some Rust types can't be written out. For example, every \"\n\"closure has its own unnamed concrete type. Before `impl Trait` syntax, you \"\n\"had to allocate on the heap in order to return a closure. But now you can do \"\n\"it all statically, like this:\"\nmsgstr \"\"\n\"更重要的是，某些 Rust 类型无法直接写出。例如，每个闭包都有自己的未命名具体类\"\n\"型。在 `impl Trait` 语法出现之前，你必须在堆上分配内存才能返回闭包。但现在你\"\n\"可以完全静态地做到这一点，像这样：\"\n\n#: src/trait/impl_trait.md:97\nmsgid \"// Returns a function that adds `y` to its input\\n\"\nmsgstr \"// 返回一个将 `y` 加到输入值上的函数\\n\"\n\n#: src/trait/impl_trait.md:109\nmsgid \"\"\n\"You can also use `impl Trait` to return an iterator that uses `map` or \"\n\"`filter` closures! This makes using `map` and `filter` easier. Because \"\n\"closure types don't have names, you can't write out an explicit return type \"\n\"if your function returns iterators with closures. But with `impl Trait` you \"\n\"can do this easily:\"\nmsgstr \"\"\n\"你还可以使用 `impl Trait` 返回一个使用 `map` 或 `filter` 闭包的迭代器！这使得\"\n\"使用 `map` 和 `filter` 更加容易。由于闭包类型没有名称，如果你的函数返回带有闭\"\n\"包的迭代器，你无法写出显式的返回类型。但使用 `impl Trait`，你可以轻松实现：\"\n\n#: src/trait/clone.md:3\nmsgid \"\"\n\"When dealing with resources, the default behavior is to transfer them during \"\n\"assignments or function calls. However, sometimes we need to make a copy of \"\n\"the resource as well.\"\nmsgstr \"\"\n\"在处理资源时，默认行为是在赋值或函数调用期间转移它们。然而，有时我们也需要复\"\n\"制资源。\"\n\n#: src/trait/clone.md:7\nmsgid \"\"\n\"The [`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html) trait \"\n\"helps us do exactly this. Most commonly, we can use the `.clone()` method \"\n\"defined by the `Clone` trait.\"\nmsgstr \"\"\n\"[`Clone`](https://doc.rust-lang.org/std/clone/trait.Clone.html) trait 帮助我\"\n\"们实现这一点。最常见的是，我们可以使用 `Clone` trait 定义的 `.clone()` 方法。\"\n\n#: src/trait/clone.md:11\nmsgid \"// A unit struct without resources\\n\"\nmsgstr \"// 一个不包含资源的单元结构体\\n\"\n\n#: src/trait/clone.md:14\nmsgid \"// A tuple struct with resources that implements the `Clone` trait\\n\"\nmsgstr \"// 一个包含资源并实现了 `Clone` trait 的元组结构体\\n\"\n\n#: src/trait/clone.md:20\nmsgid \"// Instantiate `Unit`\\n\"\nmsgstr \"// 实例化 `Unit`\\n\"\n\n#: src/trait/clone.md:22\nmsgid \"// Copy `Unit`, there are no resources to move\\n\"\nmsgstr \"// 复制 `Unit`，没有资源需要移动\\n\"\n\n#: src/trait/clone.md:25\nmsgid \"// Both `Unit`s can be used independently\\n\"\nmsgstr \"// 两个 `Unit` 可以独立使用\\n\"\n\n#: src/trait/clone.md:26 src/trait/clone.md:31\nmsgid \"\\\"original: {:?}\\\"\"\nmsgstr \"\\\"原始: {:?}\\\"\"\n\n#: src/trait/clone.md:27\nmsgid \"\\\"copy: {:?}\\\"\"\nmsgstr \"\\\"复制: {:?}\\\"\"\n\n#: src/trait/clone.md:29\nmsgid \"// Instantiate `Pair`\\n\"\nmsgstr \"// 实例化 `Pair`\\n\"\n\n#: src/trait/clone.md:33\nmsgid \"// Move `pair` into `moved_pair`, moves resources\\n\"\nmsgstr \"// 将 `pair` 移动到 `moved_pair`，资源也随之移动\\n\"\n\n#: src/trait/clone.md:35\nmsgid \"\\\"moved: {:?}\\\"\"\nmsgstr \"\\\"已移动: {:?}\\\"\"\n\n#: src/trait/clone.md:37\nmsgid \"\"\n\"// Error! `pair` has lost its resources\\n\"\n\"    //println!(\\\"original: {:?}\\\", pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`pair` 已失去其资源\\n\"\n\"    //println!(\\\"原始: {:?}\\\", pair);\\n\"\n\"    // TODO ^ 尝试取消注释此行\\n\"\n\n#: src/trait/clone.md:41\nmsgid \"// Clone `moved_pair` into `cloned_pair` (resources are included)\\n\"\nmsgstr \"// 将 `moved_pair` 克隆到 `cloned_pair`（包括资源）\\n\"\n\n#: src/trait/clone.md:43\nmsgid \"// Drop the moved original pair using std::mem::drop\\n\"\nmsgstr \"// 使用 std::mem::drop 丢弃已移动的原始对\\n\"\n\n#: src/trait/clone.md:46\nmsgid \"\"\n\"// Error! `moved_pair` has been dropped\\n\"\n\"    //println!(\\\"moved and dropped: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`moved_pair` 已被丢弃\\n\"\n\"    //println!(\\\"已移动并丢弃: {:?}\\\", moved_pair);\\n\"\n\"    // TODO ^ 尝试取消注释此行\\n\"\n\n#: src/trait/clone.md:50\nmsgid \"// The result from .clone() can still be used!\\n\"\nmsgstr \"// .clone() 的结果仍然可以使用！\\n\"\n\n#: src/trait/clone.md:51\nmsgid \"\\\"clone: {:?}\\\"\"\nmsgstr \"\\\"克隆: {:?}\\\"\"\n\n#: src/trait/supertraits.md:3\nmsgid \"\"\n\"Rust doesn't have \\\"inheritance\\\", but you can define a trait as being a \"\n\"superset of another trait. For example:\"\nmsgstr \"\"\n\"Rust 没有“继承”，但你可以将一个 trait 定义为另一个 trait 的超集。例如：\"\n\n#: src/trait/supertraits.md:10\nmsgid \"\"\n\"// Person is a supertrait of Student.\\n\"\n\"// Implementing Student requires you to also impl Person.\\n\"\nmsgstr \"\"\n\"// Person 是 Student 的超 trait。\\n\"\n\"// 实现 Student 需要你同时实现 Person。\\n\"\n\n#: src/trait/supertraits.md:20\nmsgid \"\"\n\"// CompSciStudent (computer science student) is a subtrait of both \"\n\"Programmer\\n\"\n\"// and Student. Implementing CompSciStudent requires you to impl both \"\n\"supertraits.\\n\"\nmsgstr \"\"\n\"// CompSciStudent（计算机科学学生）是 Programmer 和 Student 的子 trait。\\n\"\n\"// 实现 CompSciStudent 需要你实现两个超 trait。\\n\"\n\n#: src/trait/supertraits.md:29\nmsgid \"\"\n\"\\\"My name is {} and I attend {}. My favorite language is {}. My Git username \"\n\"is {}\\\"\"\nmsgstr \"\"\n\"\\\"我的名字是 {}，我就读于 {}。我最喜欢的语言是 {}。我的 Git 用户名是 {}\\\"\"\n\n#: src/trait/supertraits.md:42\nmsgid \"\"\n\"[The Rust Programming Language chapter on supertraits](https://doc.rust-\"\n\"lang.org/book/ch19-03-advanced-traits.html#using-supertraits-to-require-one-\"\n\"traits-functionality-within-another-trait)\"\nmsgstr \"\"\n\"[《Rust 程序设计语言》中关于超 trait 的章节](https://doc.rust-lang.org/book/\"\n\"ch19-03-advanced-traits.html#using-supertraits-to-require-one-traits-\"\n\"functionality-within-another-trait)\"\n\n#: src/trait/disambiguating.md:3\nmsgid \"\"\n\"A type can implement many different traits. What if two traits both require \"\n\"the same name for a function? For example, many traits might have a method \"\n\"named `get()`. They might even have different return types!\"\nmsgstr \"\"\n\"一个类型可以实现多个不同的 trait。如果两个 trait 都要求函数使用相同的名称，该\"\n\"怎么办？例如，许多 trait 可能都有一个名为 `get()` 的方法，它们甚至可能有不同\"\n\"的返回类型！\"\n\n#: src/trait/disambiguating.md:7\nmsgid \"\"\n\"Good news: because each trait implementation gets its own `impl` block, it's \"\n\"clear which trait's `get` method you're implementing.\"\nmsgstr \"\"\n\"好消息是：由于每个 trait 实现都有自己的 `impl` 块，因此很容易分清楚你正在实现\"\n\"哪个 trait 的 `get` 方法。\"\n\n#: src/trait/disambiguating.md:10\nmsgid \"\"\n\"What about when it comes time to _call_ those methods? To disambiguate \"\n\"between them, we have to use Fully Qualified Syntax.\"\nmsgstr \"\"\n\"那么在调用这些方法时又该如何处理呢？为了消除它们之间的歧义，我们必须使用完全\"\n\"限定语法。\"\n\n#: src/trait/disambiguating.md:15\nmsgid \"// Get the selected username out of this widget\\n\"\nmsgstr \"// 从这个小部件中获取选定的用户名\\n\"\n\n#: src/trait/disambiguating.md:20\nmsgid \"// Get the selected age out of this widget\\n\"\nmsgstr \"// 从这个小部件中获取选定的年龄\\n\"\n\n#: src/trait/disambiguating.md:23\nmsgid \"// A form with both a UsernameWidget and an AgeWidget\\n\"\nmsgstr \"// 一个同时包含 UsernameWidget 和 AgeWidget 的表单\\n\"\n\n#: src/trait/disambiguating.md:44 src/trait/disambiguating.md:54\nmsgid \"\\\"rustacean\\\"\"\nmsgstr \"\\\"rustacean\\\"\"\n\n#: src/trait/disambiguating.md:48\nmsgid \"\"\n\"// If you uncomment this line, you'll get an error saying\\n\"\n\"    // \\\"multiple `get` found\\\". Because, after all, there are multiple \"\n\"methods\\n\"\n\"    // named `get`.\\n\"\n\"    // println!(\\\"{}\\\", form.get());\\n\"\nmsgstr \"\"\n\"// 如果你取消注释这一行，你会得到一个错误，提示\\n\"\n\"    // \\\"找到多个 `get`\\\"。这是因为确实存在多个\\n\"\n\"    // 名为 `get` 的方法。\\n\"\n\"    // println!(\\\"{}\\\", form.get());\\n\"\n\n#: src/trait/disambiguating.md:62\nmsgid \"\"\n\"[The Rust Programming Language chapter on Fully Qualified syntax](https://\"\n\"doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-\"\n\"for-disambiguation-calling-methods-with-the-same-name)\"\nmsgstr \"\"\n\"[《Rust 程序设计语言》中关于完全限定语法的章节](https://doc.rust-lang.org/\"\n\"book/ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-\"\n\"calling-methods-with-the-same-name)\"\n\n#: src/macros.md:1\nmsgid \"`macro_rules!`\"\nmsgstr \"`macro_rules!`\"\n\n#: src/macros.md:3\nmsgid \"\"\n\"Rust provides a powerful macro system that allows metaprogramming. As you've \"\n\"seen in previous chapters, macros look like functions, except that their \"\n\"name ends with a bang `!`, but instead of generating a function call, macros \"\n\"are expanded into source code that gets compiled with the rest of the \"\n\"program. However, unlike macros in C and other languages, Rust macros are \"\n\"expanded into abstract syntax trees, rather than string preprocessing, so \"\n\"you don't get unexpected precedence bugs.\"\nmsgstr \"\"\n\"Rust 提供了一个强大的宏系统，支持元编程。正如你在前面章节中所看到的，宏看起来\"\n\"像函数，只是它们的名字以感叹号 `!` 结尾。但与生成函数调用不同，宏会展开成源代\"\n\"码，然后与程序的其余部分一起编译。与 C 和其他语言中的宏不同，Rust 宏展开成抽\"\n\"象语法树，而不是进行字符串预处理，因此你不会遇到意外的优先级错误。\"\n\n#: src/macros.md:11\nmsgid \"Macros are created using the `macro_rules!` macro.\"\nmsgstr \"宏是使用 `macro_rules!` 宏来创建的。\"\n\n#: src/macros.md:14\nmsgid \"// This is a simple macro named `say_hello`.\\n\"\nmsgstr \"// 这是一个名为 `say_hello` 的简单宏。\\n\"\n\n#: src/macros.md:16\nmsgid \"// `()` indicates that the macro takes no argument.\\n\"\nmsgstr \"// `()` 表示该宏不接受任何参数。\\n\"\n\n#: src/macros.md:18\nmsgid \"// The macro will expand into the contents of this block.\\n\"\nmsgstr \"// 宏将展开成这个代码块的内容。\\n\"\n\n#: src/macros.md:19\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Hello!\\\"\"\n\n#: src/macros.md:24\nmsgid \"// This call will expand into `println!(\\\"Hello!\\\")`\\n\"\nmsgstr \"// 这个调用将展开成 `println!(\\\"Hello!\\\")`\\n\"\n\n#: src/macros.md:29\nmsgid \"So why are macros useful?\"\nmsgstr \"那么，为什么宏是有用的呢？\"\n\n#: src/macros.md:31\nmsgid \"\"\n\"Don't repeat yourself. There are many cases where you may need similar \"\n\"functionality in multiple places but with different types. Often, writing a \"\n\"macro is a useful way to avoid repeating code. (More on this later)\"\nmsgstr \"\"\n\"不要重复自己。在许多情况下，你可能需要在多个地方使用相似的功能，但类型不同。\"\n\"通常，编写宏是避免代码重复的有效方法。（稍后会详细介绍）\"\n\n#: src/macros.md:35\nmsgid \"\"\n\"Domain-specific languages. Macros allow you to define special syntax for a \"\n\"specific purpose. (More on this later)\"\nmsgstr \"领域特定语言。宏允许你为特定目的定义专门的语法。（稍后会详细介绍）\"\n\n#: src/macros.md:38\nmsgid \"\"\n\"Variadic interfaces. Sometimes you want to define an interface that takes a \"\n\"variable number of arguments. An example is `println!` which could take any \"\n\"number of arguments, depending on the format string. (More on this later)\"\nmsgstr \"\"\n\"可变参数接口。有时你可能想定义一个接受可变数量参数的接口。例如 `println!`，它\"\n\"可以根据格式字符串接受任意数量的参数。（稍后会详细介绍）\"\n\n#: src/macros/syntax.md:3\nmsgid \"\"\n\"In following subsections, we will show how to define macros in Rust. There \"\n\"are three basic ideas:\"\nmsgstr \"在接下来的小节中，我们将展示如何在 Rust 中定义宏。有三个基本概念：\"\n\n#: src/macros/syntax.md:6\nmsgid \"[Patterns and Designators](designators.md)\"\nmsgstr \"[模式和指示符](designators.md)\"\n\n#: src/macros/syntax.md:7\nmsgid \"[Overloading](overload.md)\"\nmsgstr \"[重载](overload.md)\"\n\n#: src/macros/syntax.md:8\nmsgid \"[Repetition](repeat.md)\"\nmsgstr \"[重复](repeat.md)\"\n\n#: src/macros/designators.md:3\nmsgid \"\"\n\"The arguments of a macro are prefixed by a dollar sign `$` and type \"\n\"annotated with a _designator_:\"\nmsgstr \"宏的参数以美元符号 `$` 为前缀，并用**指示符**来标注类型：\"\n\n#: src/macros/designators.md:8\nmsgid \"\"\n\"// This macro takes an argument of designator `ident` and\\n\"\n\"    // creates a function named `$func_name`.\\n\"\n\"    // The `ident` designator is used for variable/function names.\\n\"\nmsgstr \"\"\n\"// 这个宏接受一个 `ident` 指示符的参数，\\n\"\n\"    // 并创建一个名为 `$func_name` 的函数。\\n\"\n\"    // `ident` 指示符用于变量/函数名。\\n\"\n\n#: src/macros/designators.md:13\nmsgid \"// The `stringify!` macro converts an `ident` into a string.\\n\"\nmsgstr \"// `stringify!` 宏将 `ident` 转换为字符串。\\n\"\n\n#: src/macros/designators.md:14\nmsgid \"\\\"You called {:?}()\\\"\"\nmsgstr \"\\\"你调用了 {:?}()\\\"\"\n\n#: src/macros/designators.md:19\nmsgid \"// Create functions named `foo` and `bar` with the above macro.\\n\"\nmsgstr \"// 使用上面的宏创建名为 `foo` 和 `bar` 的函数。\\n\"\n\n#: src/macros/designators.md:25\nmsgid \"\"\n\"// This macro takes an expression of type `expr` and prints\\n\"\n\"    // it as a string along with its result.\\n\"\n\"    // The `expr` designator is used for expressions.\\n\"\nmsgstr \"\"\n\"// 这个宏接受一个 `expr` 类型的表达式，\\n\"\n\"    // 并将其作为字符串打印出来，同时打印其结果。\\n\"\n\"    // `expr` 指示符用于表达式。\\n\"\n\n#: src/macros/designators.md:29\nmsgid \"// `stringify!` will convert the expression *as it is* into a string.\\n\"\nmsgstr \"// `stringify!` 将表达式**原样**转换为字符串。\\n\"\n\n#: src/macros/designators.md:30\nmsgid \"\\\"{:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} = {:?}\\\"\"\n\n#: src/macros/designators.md:42\nmsgid \"// Recall that blocks are expressions too!\\n\"\nmsgstr \"// 记住，代码块也是表达式！\\n\"\n\n#: src/macros/designators.md:51\nmsgid \"These are some of the available designators:\"\nmsgstr \"以下是一些可用的指示符：\"\n\n#: src/macros/designators.md:53\nmsgid \"`block`\"\nmsgstr \"`block`\"\n\n#: src/macros/designators.md:54\nmsgid \"`expr` is used for expressions\"\nmsgstr \"`expr` 用于表达式\"\n\n#: src/macros/designators.md:55\nmsgid \"`ident` is used for variable/function names\"\nmsgstr \"`ident` 用于变量/函数名\"\n\n#: src/macros/designators.md:56\nmsgid \"`item`\"\nmsgstr \"`item`\"\n\n#: src/macros/designators.md:57\nmsgid \"`literal` is used for literal constants\"\nmsgstr \"`literal` 用于字面常量\"\n\n#: src/macros/designators.md:58\nmsgid \"`pat` (_pattern_)\"\nmsgstr \"`pat`（**模式** _pattern_）\"\n\n#: src/macros/designators.md:59\nmsgid \"`path`\"\nmsgstr \"`path`\"\n\n#: src/macros/designators.md:60\nmsgid \"`stmt` (_statement_)\"\nmsgstr \"`stmt`（**语句** _statement_）\"\n\n#: src/macros/designators.md:61\nmsgid \"`tt` (_token tree_)\"\nmsgstr \"`tt`（**标记树** _token tree_）\"\n\n#: src/macros/designators.md:62\nmsgid \"`ty` (_type_)\"\nmsgstr \"`ty`（**类型** _type_）\"\n\n#: src/macros/designators.md:63\nmsgid \"`vis` (_visibility qualifier_)\"\nmsgstr \"`vis`（**可见性限定符** _visibility qualifier_）\"\n\n#: src/macros/designators.md:65\nmsgid \"\"\n\"For a complete list, see the [Rust Reference](https://doc.rust-lang.org/\"\n\"reference/macros-by-example.html).\"\nmsgstr \"\"\n\"完整列表请参阅 [Rust 参考手册](https://doc.rust-lang.org/reference/macros-by-\"\n\"example.html)。\"\n\n#: src/macros/overload.md:3\nmsgid \"\"\n\"Macros can be overloaded to accept different combinations of arguments. In \"\n\"that regard, `macro_rules!` can work similarly to a match block:\"\nmsgstr \"\"\n\"宏可以被重载以接受不同的参数组合。在这方面，`macro_rules!` 的工作方式类似于 \"\n\"match 块：\"\n\n#: src/macros/overload.md:7\nmsgid \"\"\n\"// `test!` will compare `$left` and `$right`\\n\"\n\"// in different ways depending on how you invoke it:\\n\"\nmsgstr \"\"\n\"// `test!` 将以不同的方式比较 `$left` 和 `$right`\\n\"\n\"// 具体取决于你如何调用它：\\n\"\n\n#: src/macros/overload.md:10\nmsgid \"\"\n\"// Arguments don't need to be separated by a comma.\\n\"\n\"    // Any template can be used!\\n\"\nmsgstr \"\"\n\"// 参数不需要用逗号分隔。\\n\"\n\"    // 可以使用任何模板！\\n\"\n\n#: src/macros/overload.md:13\nmsgid \"\\\"{:?} and {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} 和 {:?} 是 {:?}\\\"\"\n\n#: src/macros/overload.md:18\nmsgid \"// ^ each arm must end with a semicolon.\\n\"\nmsgstr \"// ^ 每个分支必须以分号结束。\\n\"\n\n#: src/macros/overload.md:20\nmsgid \"\\\"{:?} or {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} 或 {:?} 是 {:?}\\\"\"\n\n#: src/macros/repeat.md:3\nmsgid \"\"\n\"Macros can use `+` in the argument list to indicate that an argument may \"\n\"repeat at least once, or `*`, to indicate that the argument may repeat zero \"\n\"or more times.\"\nmsgstr \"\"\n\"宏可以在参数列表中使用 `+` 来表示一个参数可能重复至少一次，或使用 `*` 来表示\"\n\"一个参数可能重复零次或多次。\"\n\n#: src/macros/repeat.md:7\nmsgid \"\"\n\"In the following example, surrounding the matcher with `$(...),+` will match \"\n\"one or more expression, separated by commas. Also note that the semicolon is \"\n\"optional on the last case.\"\nmsgstr \"\"\n\"在下面的例子中，用 `$(...),+` 包围匹配器将匹配一个或多个由逗号分隔的表达式。\"\n\"另外请注意，最后一个情况的分号是可选的。\"\n\n#: src/macros/repeat.md:12\nmsgid \"// `find_min!` will calculate the minimum of any number of arguments.\\n\"\nmsgstr \"// `find_min!` 将计算任意数量参数中的最小值。\\n\"\n\n#: src/macros/repeat.md:14\nmsgid \"// Base case:\\n\"\nmsgstr \"// 基本情况：\\n\"\n\n#: src/macros/repeat.md:16\nmsgid \"// `$x` followed by at least one `$y,`\\n\"\nmsgstr \"// `$x` 后面至少跟着一个 `$y,`\\n\"\n\n#: src/macros/repeat.md:18\nmsgid \"// Call `find_min!` on the tail `$y`\\n\"\nmsgstr \"// 对剩余的 `$y` 递归调用 `find_min!`\\n\"\n\n#: src/macros/dry.md:3\nmsgid \"\"\n\"Macros allow writing DRY code by factoring out the common parts of functions \"\n\"and/or test suites. Here is an example that implements and tests the `+=`, \"\n\"`*=` and `-=` operators on `Vec<T>`:\"\nmsgstr \"\"\n\"宏通过提取函数和/或测试套件的共同部分，使我们能够编写符合 DRY（Don't Repeat \"\n\"Yourself）原则的代码。下面是一个在 `Vec<T>` 上实现并测试 `+=`、`*=` 和 `-=` \"\n\"运算符的示例：\"\n\n#: src/macros/dry.md:11\nmsgid \"\"\n\"// The `tt` (token tree) designator is used for\\n\"\n\"    // operators and tokens.\\n\"\nmsgstr \"\"\n\"// `tt`（token tree，标记树）指示符用于\\n\"\n\"    // 运算符和标记。\\n\"\n\n#: src/macros/dry.md:15\nmsgid \"\\\"{:?}: dimension mismatch: {:?} {:?} {:?}\\\"\"\nmsgstr \"\\\"{:?}：维度不匹配：{:?} {:?} {:?}\\\"\"\n\n#: src/macros/dry.md:30\nmsgid \"// *x = x.$method(*y);\\n\"\nmsgstr \"// *x = x.$method(*y);\\n\"\n\n#: src/macros/dry.md:35\nmsgid \"// Implement `add_assign`, `mul_assign`, and `sub_assign` functions.\\n\"\nmsgstr \"// 实现 `add_assign`、`mul_assign` 和 `sub_assign` 函数。\\n\"\n\n#: src/macros/dry.md:60\nmsgid \"// Test `add_assign`, `mul_assign`, and `sub_assign`.\\n\"\nmsgstr \"// 测试 `add_assign`、`mul_assign` 和 `sub_assign`。\\n\"\n\n#: src/macros/dsl.md:1\nmsgid \"Domain Specific Languages (DSLs)\"\nmsgstr \"领域特定语言（DSL）\"\n\n#: src/macros/dsl.md:3\nmsgid \"\"\n\"A DSL is a mini \\\"language\\\" embedded in a Rust macro. It is completely \"\n\"valid Rust because the macro system expands into normal Rust constructs, but \"\n\"it looks like a small language. This allows you to define concise or \"\n\"intuitive syntax for some special functionality (within bounds).\"\nmsgstr \"\"\n\"DSL 是嵌入在 Rust 宏中的一种微型\\\"语言\\\"。它是完全有效的 Rust 代码，因为宏系\"\n\"统会将其展开为普通的 Rust 结构，但它看起来像一种小型语言。这使你能够为某些特\"\n\"定功能定义简洁或直观的语法（在一定范围内）。\"\n\n#: src/macros/dsl.md:8\nmsgid \"\"\n\"Suppose that I want to define a little calculator API. I would like to \"\n\"supply an expression and have the output printed to console.\"\nmsgstr \"\"\n\"假设我想定义一个简单的计算器 API。我希望提供一个表达式，并将计算结果打印到控\"\n\"制台。\"\n\n#: src/macros/dsl.md:15\nmsgid \"// Force types to be unsigned integers\\n\"\nmsgstr \"// 强制类型为无符号整数\\n\"\n\n#: src/macros/dsl.md:16 src/macros/variadics.md:15\nmsgid \"\\\"{} = {}\\\"\"\nmsgstr \"\\\"{} = {}\\\"\"\n\n#: src/macros/dsl.md:23\nmsgid \"// hehehe `eval` is _not_ a Rust keyword!\\n\"\nmsgstr \"// 嘿嘿，`eval` 可不是 Rust 的关键字哦！\\n\"\n\n#: src/macros/dsl.md:32 src/macros/variadics.md:35\nmsgid \"Output:\"\nmsgstr \"输出：\"\n\n#: src/macros/dsl.md:39\nmsgid \"\"\n\"This was a very simple example, but much more complex interfaces have been \"\n\"developed, such as [`lazy_static`](https://crates.io/crates/lazy_static) or \"\n\"[`clap`](https://crates.io/crates/clap).\"\nmsgstr \"\"\n\"这个例子非常简单，但已经有很多利用宏开发的复杂接口，比如 [`lazy_static`]\"\n\"(https://crates.io/crates/lazy_static) 或 [`clap`](https://crates.io/crates/\"\n\"clap)。\"\n\n#: src/macros/dsl.md:43\nmsgid \"\"\n\"Also, note the two pairs of braces in the macro. The outer ones are part of \"\n\"the syntax of `macro_rules!`, in addition to `()` or `[]`.\"\nmsgstr \"\"\n\"另外，注意宏中的两对大括号。外层的大括号是 `macro_rules!` 语法的一部分，除此\"\n\"之外还可以使用 `()` 或 `[]`。\"\n\n#: src/macros/variadics.md:1\nmsgid \"Variadic Interfaces\"\nmsgstr \"可变参数接口\"\n\n#: src/macros/variadics.md:3\nmsgid \"\"\n\"A _variadic_ interface takes an arbitrary number of arguments. For example, \"\n\"`println!` can take an arbitrary number of arguments, as determined by the \"\n\"format string.\"\nmsgstr \"\"\n\"**可变参数**接口可以接受任意数量的参数。例如，`println!` 可以接受任意数量的参\"\n\"数，这由格式字符串决定。\"\n\n#: src/macros/variadics.md:7\nmsgid \"\"\n\"We can extend our `calculate!` macro from the previous section to be \"\n\"variadic:\"\nmsgstr \"我们可以将上一节的 `calculate!` 宏扩展为可变参数的形式：\"\n\n#: src/macros/variadics.md:11\nmsgid \"// The pattern for a single `eval`\\n\"\nmsgstr \"// 单个 `eval` 的模式\\n\"\n\n#: src/macros/variadics.md:14\nmsgid \"// Force types to be integers\\n\"\nmsgstr \"// 强制类型为整数\\n\"\n\n#: src/macros/variadics.md:19\nmsgid \"// Decompose multiple `eval`s recursively\\n\"\nmsgstr \"// 递归分解多个 `eval`\\n\"\n\n#: src/macros/variadics.md:27\nmsgid \"// Look ma! Variadic `calculate!`!\\n\"\nmsgstr \"// 瞧瞧！这是可变参数的 `calculate!`！\\n\"\n\n#: src/error.md:3\nmsgid \"\"\n\"Error handling is the process of handling the possibility of failure. For \"\n\"example, failing to read a file and then continuing to use that _bad_ input \"\n\"would clearly be problematic. Noticing and explicitly managing those errors \"\n\"saves the rest of the program from various pitfalls.\"\nmsgstr \"\"\n\"错误处理是处理可能出现失败情况的过程。例如，读取文件失败后继续使用那个**错误\"\n\"的**输入显然会导致问题。注意并明确管理这些错误可以使程序的其他部分避免各种陷\"\n\"阱。\"\n\n#: src/error.md:8\nmsgid \"\"\n\"There are various ways to deal with errors in Rust, which are described in \"\n\"the following subchapters. They all have more or less subtle differences and \"\n\"different use cases. As a rule of thumb:\"\nmsgstr \"\"\n\"Rust 中有多种处理错误的方法，这些方法将在接下来的小节中详细介绍。它们或多或少\"\n\"都有一些细微的差别和不同的使用场景。一般来说：\"\n\n#: src/error.md:12\nmsgid \"\"\n\"An explicit `panic` is mainly useful for tests and dealing with \"\n\"unrecoverable errors. For prototyping it can be useful, for example when \"\n\"dealing with functions that haven't been implemented yet, but in those cases \"\n\"the more descriptive `unimplemented` is better. In tests `panic` is a \"\n\"reasonable way to explicitly fail.\"\nmsgstr \"\"\n\"显式的 `panic` 主要用于测试和处理不可恢复的错误。在原型开发中，它可能会有用，\"\n\"例如在处理尚未实现的函数时。但在这些情况下，使用更具描述性的 `unimplemented` \"\n\"会更好。在测试中，`panic` 是一种合理的显式失败方式。\"\n\n#: src/error.md:17\nmsgid \"\"\n\"The `Option` type is for when a value is optional or when the lack of a \"\n\"value is not an error condition. For example the parent of a directory - `/` \"\n\"and `C:` don't have one. When dealing with `Option`s, `unwrap` is fine for \"\n\"prototyping and cases where it's absolutely certain that there is guaranteed \"\n\"to be a value. However `expect` is more useful since it lets you specify an \"\n\"error message in case something goes wrong anyway.\"\nmsgstr \"\"\n\"`Option` 类型用于值是可选的情况，或者缺少值不构成错误条件的情况。例如目录的父\"\n\"目录 - `/` 和 `C:` 就没有父目录。在处理 `Option` 时，对于原型设计和绝对确定有\"\n\"值的情况，使用 `unwrap` 是可以的。然而，`expect` 更有用，因为它允许你指定一个\"\n\"错误消息，以防万一出错。\"\n\n#: src/error.md:24\nmsgid \"\"\n\"When there is a chance that things do go wrong and the caller has to deal \"\n\"with the problem, use `Result`. You can `unwrap` and `expect` them as well \"\n\"(please don't do that unless it's a test or quick prototype).\"\nmsgstr \"\"\n\"当有可能出错且调用者必须处理问题时，请使用 `Result`。你也可以对它们使用 \"\n\"`unwrap` 和 `expect`（除非是测试或快速原型，否则请不要这样做）。\"\n\n#: src/error.md:28\nmsgid \"\"\n\"For a more rigorous discussion of error handling, refer to the error \"\n\"handling section in the [official book](https://doc.rust-lang.org/book/\"\n\"ch09-00-error-handling.html).\"\nmsgstr \"\"\n\"关于错误处理更详尽的讨论，请参阅[官方文档](https://doc.rust-lang.org/book/\"\n\"ch09-00-error-handling.html)中的错误处理章节。\"\n\n#: src/error/panic.md:3\nmsgid \"\"\n\"The simplest error handling mechanism we will see is `panic`. It prints an \"\n\"error message, starts unwinding the stack, and usually exits the program. \"\n\"Here, we explicitly call `panic` on our error condition:\"\nmsgstr \"\"\n\"我们将看到的最简单的错误处理机制是 `panic`。它会打印一条错误消息，开始展开\"\n\"栈，并通常会退出程序。在这里，我们在错误条件下显式调用 `panic`：\"\n\n#: src/error/panic.md:9\nmsgid \"// You shouldn't drink too many sugary beverages.\\n\"\nmsgstr \"// 你不应该喝太多含糖饮料。\\n\"\n\n#: src/error/panic.md:10 src/error/panic.md:17 src/error/abort_unwind.md:10\n#: src/error/abort_unwind.md:23 src/error/abort_unwind.md:41\n#: src/error/abort_unwind.md:50 src/error/option_unwrap.md:32\n#: src/error/option_unwrap.md:43 src/error/option_unwrap.md:50\nmsgid \"\\\"lemonade\\\"\"\nmsgstr \"\\\"柠檬水\\\"\"\n\n#: src/error/panic.md:10 src/error/option_unwrap.md:43\nmsgid \"\\\"AAAaaaaa!!!!\\\"\"\nmsgstr \"\\\"啊啊啊啊啊！！！！\\\"\"\n\n#: src/error/panic.md:12 src/error/abort_unwind.md:17\n#: src/error/abort_unwind.md:44\nmsgid \"\\\"Some refreshing {} is all I need.\\\"\"\nmsgstr \"\\\"来点清爽的{}就是我现在需要的。\\\"\"\n\n#: src/error/panic.md:16 src/error/abort_unwind.md:22\n#: src/error/abort_unwind.md:49 src/error/option_unwrap.md:49\nmsgid \"\\\"water\\\"\"\nmsgstr \"\\\"水\\\"\"\n\n#: src/error/panic.md:18\nmsgid \"\\\"still water\\\"\"\nmsgstr \"\\\"纯净水\\\"\"\n\n#: src/error/panic.md:22\nmsgid \"\"\n\"The first call to `drink` works. The second panics and thus the third is \"\n\"never called.\"\nmsgstr \"\"\n\"第一次调用 `drink` 正常执行。第二次调用会引发 panic，因此第三次调用永远不会被\"\n\"执行。\"\n\n#: src/error/abort_unwind.md:1\nmsgid \"`abort` and `unwind`\"\nmsgstr \"`abort` 和 `unwind`\"\n\n#: src/error/abort_unwind.md:3\nmsgid \"\"\n\"The previous section illustrates the error handling mechanism `panic`.  \"\n\"Different code paths can be conditionally compiled based on the panic \"\n\"setting. The current values available are `unwind` and `abort`.\"\nmsgstr \"\"\n\"上一节介绍了错误处理机制 `panic`。可以根据 panic 设置有条件地编译不同的代码路\"\n\"径。当前可用的值有 `unwind` 和 `abort`。\"\n\n#: src/error/abort_unwind.md:5\nmsgid \"\"\n\"Building on the prior lemonade example, we explicitly use the panic strategy \"\n\"to exercise different lines of code.\"\nmsgstr \"基于之前的柠檬水示例，我们明确使用 panic 策略来执行不同的代码行。\"\n\n#: src/error/abort_unwind.md:9\nmsgid \"// You shouldn't drink too much sugary beverages.\\n\"\nmsgstr \"// 你不应该喝太多含糖饮料。\\n\"\n\n#: src/error/abort_unwind.md:11\nmsgid \"\\\"abort\\\"\"\nmsgstr \"\\\"中止\\\"\"\n\n#: src/error/abort_unwind.md:12 src/error/abort_unwind.md:37\nmsgid \"\\\"This is not your party. Run!!!!\\\"\"\nmsgstr \"\\\"这不是你的派对。快跑！！！！\\\"\"\n\n#: src/error/abort_unwind.md:14 src/error/abort_unwind.md:32\nmsgid \"\\\"Spit it out!!!!\\\"\"\nmsgstr \"\\\"快吐出来！！！！\\\"\"\n\n#: src/error/abort_unwind.md:27\nmsgid \"\"\n\"Here is another example focusing on rewriting `drink()` and explicitly use \"\n\"the `unwind` keyword.\"\nmsgstr \"\"\n\"这里是另一个示例，重点是重写 `drink()` 函数并明确使用 `unwind` 关键字。\"\n\n#: src/error/abort_unwind.md:30 src/error/abort_unwind.md:35\nmsgid \"\\\"unwind\\\"\"\nmsgstr \"\\\"unwind\\\"\"\n\n#: src/error/abort_unwind.md:54\nmsgid \"\"\n\"The panic strategy can be set from the command line by using `abort` or \"\n\"`unwind`.\"\nmsgstr \"可以通过命令行使用 `abort` 或 `unwind` 来设置 panic 策略。\"\n\n#: src/error/option_unwrap.md:3\nmsgid \"\"\n\"In the last example, we showed that we can induce program failure at will. \"\n\"We told our program to `panic` if we drink a sugary lemonade. But what if we \"\n\"expect _some_ drink but don't receive one? That case would be just as bad, \"\n\"so it needs to be handled!\"\nmsgstr \"\"\n\"在上一个例子中，我们展示了如何主动引发程序失败。我们让程序在喝含糖柠檬水时触\"\n\"发 `panic`。但如果我们期望得到**某种**饮料却没有收到呢？这种情况同样糟糕，所\"\n\"以需要处理！\"\n\n#: src/error/option_unwrap.md:8\nmsgid \"\"\n\"We _could_ test this against the null string (`\\\"\\\"`) as we do with a \"\n\"lemonade. Since we're using Rust, let's instead have the compiler point out \"\n\"cases where there's no drink.\"\nmsgstr \"\"\n\"我们**可以**像处理柠檬水那样对空字符串（`\\\"\\\"`）进行测试。但既然我们使用的是 \"\n\"Rust，不如让编译器指出没有饮料的情况。\"\n\n#: src/error/option_unwrap.md:12\nmsgid \"\"\n\"An `enum` called `Option<T>` in the `std` library is used when absence is a \"\n\"possibility. It manifests itself as one of two \\\"options\\\":\"\nmsgstr \"\"\n\"`std` 库中的 `Option<T>` 枚举用于处理可能存在缺失的情况。它表现为两个\\\"选项\"\n\"\\\"之一：\"\n\n#: src/error/option_unwrap.md:15\nmsgid \"`Some(T)`: An element of type `T` was found\"\nmsgstr \"`Some(T)`：找到了一个 `T` 类型的元素\"\n\n#: src/error/option_unwrap.md:16\nmsgid \"`None`: No element was found\"\nmsgstr \"`None`：没有找到元素\"\n\n#: src/error/option_unwrap.md:18\nmsgid \"\"\n\"These cases can either be explicitly handled via `match` or implicitly with \"\n\"`unwrap`. Implicit handling will either return the inner element or `panic`.\"\nmsgstr \"\"\n\"这些情况可以通过 `match` 显式处理，也可以用 `unwrap` 隐式处理。隐式处理要么返\"\n\"回内部元素，要么触发 `panic`。\"\n\n#: src/error/option_unwrap.md:21\nmsgid \"\"\n\"Note that it's possible to manually customize `panic` with [expect](https://\"\n\"doc.rust-lang.org/std/option/enum.Option.html#method.expect), but `unwrap` \"\n\"otherwise leaves us with a less meaningful output than explicit handling. In \"\n\"the following example, explicit handling yields a more controlled result \"\n\"while retaining the option to `panic` if desired.\"\nmsgstr \"\"\n\"注意，可以使用 [`expect`](https://doc.rust-lang.org/std/option/\"\n\"enum.Option.html#method.expect) 手动自定义 `panic`，但 `unwrap` 相比显式处理\"\n\"会产生一个不太有意义的输出。在下面的例子中，显式处理产生了一个更可控的结果，\"\n\"同时保留了在需要时触发 `panic` 的选项。\"\n\n#: src/error/option_unwrap.md:27\nmsgid \"\"\n\"// The adult has seen it all, and can handle any drink well.\\n\"\n\"// All drinks are handled explicitly using `match`.\\n\"\nmsgstr \"\"\n\"// 成年人见多识广，可以很好地处理任何饮料。\\n\"\n\"// 所有饮料都使用 `match` 显式处理。\\n\"\n\n#: src/error/option_unwrap.md:30\nmsgid \"// Specify a course of action for each case.\\n\"\nmsgstr \"// 为每种情况指定一个处理方案。\\n\"\n\n#: src/error/option_unwrap.md:32\nmsgid \"\\\"Yuck! Too sugary.\\\"\"\nmsgstr \"\\\"呸！太甜了。\\\"\"\n\n#: src/error/option_unwrap.md:33\nmsgid \"\\\"{}? How nice.\\\"\"\nmsgstr \"\\\"{}？真不错。\\\"\"\n\n#: src/error/option_unwrap.md:34\nmsgid \"\\\"No drink? Oh well.\\\"\"\nmsgstr \"\\\"没有饮料？好吧。\\\"\"\n\n#: src/error/option_unwrap.md:37\nmsgid \"\"\n\"// Others will `panic` before drinking sugary drinks.\\n\"\n\"// All drinks are handled implicitly using `unwrap`.\\n\"\nmsgstr \"\"\n\"// 其他人在喝含糖饮料前会触发 `panic`。\\n\"\n\"// 所有饮料都使用 `unwrap` 隐式处理。\\n\"\n\n#: src/error/option_unwrap.md:41\nmsgid \"// `unwrap` returns a `panic` when it receives a `None`.\\n\"\nmsgstr \"// 当 `unwrap` 收到 `None` 时会触发 `panic`。\\n\"\n\n#: src/error/option_unwrap.md:45\nmsgid \"\\\"I love {}s!!!!!\\\"\"\nmsgstr \"\\\"我超爱{}！！！！！\\\"\"\n\n#: src/error/option_unwrap.md:57\nmsgid \"\\\"coffee\\\"\"\nmsgstr \"\\\"咖啡\\\"\"\n\n#: src/error/option_unwrap/question_mark.md:3\nmsgid \"\"\n\"You can unpack `Option`s by using `match` statements, but it's often easier \"\n\"to use the `?` operator. If `x` is an `Option`, then evaluating `x?` will \"\n\"return the underlying value if `x` is `Some`, otherwise it will terminate \"\n\"whatever function is being executed and return `None`.\"\nmsgstr \"\"\n\"你可以使用 `match` 语句来解包 `Option`，但使用 `?` 运算符通常更简便。如果 \"\n\"`x` 是一个 `Option`，那么求值 `x?` 将在 `x` 是 `Some` 时返回其内部值，否则它\"\n\"将终止当前执行的函数并返回 `None`。\"\n\n#: src/error/option_unwrap/question_mark.md:10\nmsgid \"\"\n\"// If `current_age` is `None`, this returns `None`.\\n\"\n\"    // If `current_age` is `Some`, the inner `u8` value + 1\\n\"\n\"    // gets assigned to `next_age`\\n\"\nmsgstr \"\"\n\"// 如果 `current_age` 是 `None`，这将返回 `None`。\\n\"\n\"    // 如果 `current_age` 是 `Some`，内部的 `u8` 值加 1\\n\"\n\"    // 后被赋值给 `next_age`\\n\"\n\n#: src/error/option_unwrap/question_mark.md:14\nmsgid \"\\\"Next year I will be {}\\\"\"\nmsgstr \"\\\"明年我将会 {} 岁\\\"\"\n\n#: src/error/option_unwrap/question_mark.md:18\nmsgid \"You can chain many `?`s together to make your code much more readable.\"\nmsgstr \"你可以将多个 `?` 链接在一起，使你的代码更易读。\"\n\n#: src/error/option_unwrap/question_mark.md:38\nmsgid \"\"\n\"// Gets the area code of the phone number of the person's job, if it \"\n\"exists.\\n\"\nmsgstr \"// 如果存在，获取此人工作电话号码的区号。\\n\"\n\n#: src/error/option_unwrap/question_mark.md:40\nmsgid \"\"\n\"// This would need many nested `match` statements without the `?` operator.\\n\"\n\"        // It would take a lot more code - try writing it yourself and see \"\n\"which\\n\"\n\"        // is easier.\\n\"\nmsgstr \"\"\n\"// 如果没有 `?` 运算符，这将需要许多嵌套的 `match` 语句。\\n\"\n\"        // 这将需要更多的代码 - 试着自己写一下，看看哪种方式\\n\"\n\"        // 更容易。\\n\"\n\n#: src/error/option_unwrap/map.md:3\nmsgid \"\"\n\"`match` is a valid method for handling `Option`s. However, you may \"\n\"eventually find heavy usage tedious, especially with operations only valid \"\n\"with an input. In these cases, [combinators](https://doc.rust-lang.org/\"\n\"reference/glossary.html#combinator) can be used to manage control flow in a \"\n\"modular fashion.\"\nmsgstr \"\"\n\"`match` 是处理 `Option` 的有效方法。然而，频繁使用可能会让人感到繁琐，尤其是\"\n\"在只有输入时才有效的操作中。在这些情况下，可以使用[组合器](https://doc.rust-\"\n\"lang.org/reference/glossary.html#combinator)以模块化的方式管理控制流。\"\n\n#: src/error/option_unwrap/map.md:8\nmsgid \"\"\n\"`Option` has a built in method called `map()`, a combinator for the simple \"\n\"mapping of `Some -> Some` and `None -> None`. Multiple `map()` calls can be \"\n\"chained together for even more flexibility.\"\nmsgstr \"\"\n\"`Option` 有一个内置方法 `map()`，这是一个用于简单映射 `Some -> Some` 和 \"\n\"`None -> None` 的组合器。多个 `map()` 调用可以链式使用，从而提供更大的灵活\"\n\"性。\"\n\n#: src/error/option_unwrap/map.md:12\nmsgid \"\"\n\"In the following example, `process()` replaces all functions previous to it \"\n\"while staying compact.\"\nmsgstr \"在下面的例子中，`process()` 函数以简洁的方式替代了之前的所有函数。\"\n\n#: src/error/option_unwrap/map.md:23\nmsgid \"\"\n\"// Peeling food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the peeled food.\\n\"\nmsgstr \"\"\n\"// 剥皮食物。如果没有食物，则返回 `None`。\\n\"\n\"// 否则，返回剥皮后的食物。\\n\"\n\n#: src/error/option_unwrap/map.md:32\nmsgid \"\"\n\"// Chopping food. If there isn't any, then return `None`.\\n\"\n\"// Otherwise, return the chopped food.\\n\"\nmsgstr \"\"\n\"// 切碎食物。如果没有食物，则返回 `None`。\\n\"\n\"// 否则，返回切碎后的食物。\\n\"\n\n#: src/error/option_unwrap/map.md:41\nmsgid \"\"\n\"// Cooking food. Here, we showcase `map()` instead of `match` for case \"\n\"handling.\\n\"\nmsgstr \"\"\n\"// 烹饪食物。这里我们展示了使用 `map()` 而非 `match` 来处理不同情况。\\n\"\n\n#: src/error/option_unwrap/map.md:46\nmsgid \"\"\n\"// A function to peel, chop, and cook food all in sequence.\\n\"\n\"// We chain multiple uses of `map()` to simplify the code.\\n\"\nmsgstr \"\"\n\"// 一个按顺序剥皮、切碎和烹饪食物的函数。\\n\"\n\"// 我们通过链式调用多个 `map()` 来简化代码。\\n\"\n\n#: src/error/option_unwrap/map.md:54\nmsgid \"// Check whether there's food or not before trying to eat it!\\n\"\nmsgstr \"// 在尝试吃之前，先检查是否有食物！\\n\"\n\n#: src/error/option_unwrap/map.md:58\nmsgid \"\\\"Mmm. I love {:?}\\\"\"\nmsgstr \"\\\"嗯，我喜欢 {:?}\\\"\"\n\n#: src/error/option_unwrap/map.md:59\nmsgid \"\\\"Oh no! It wasn't edible.\\\"\"\nmsgstr \"\\\"哎呀！这不能吃。\\\"\"\n\n#: src/error/option_unwrap/map.md:70\nmsgid \"// Let's try the simpler looking `process()` now.\\n\"\nmsgstr \"// 现在让我们试试看起来更简洁的 `process()` 函数。\\n\"\n\n#: src/error/option_unwrap/map.md:81\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\nmsgstr \"\"\n\"[闭包](../../fn/closures.md)、[`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html)、[`Option::map()`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html#method.map)\"\n\n#: src/error/option_unwrap/and_then.md:3\nmsgid \"\"\n\"`map()` was described as a chainable way to simplify `match` statements. \"\n\"However, using `map()` on a function that returns an `Option<T>` results in \"\n\"the nested `Option<Option<T>>`. Chaining multiple calls together can then \"\n\"become confusing. That's where another combinator called `and_then()`, known \"\n\"in some languages as flatmap, comes in.\"\nmsgstr \"\"\n\"`map()` 被描述为一种可链式调用的方式来简化 `match` 语句。然而，在返回 \"\n\"`Option<T>` 的函数上使用 `map()` 会导致嵌套的 `Option<Option<T>>`。链式调用多\"\n\"个这样的函数可能会变得令人困惑。这时，另一个称为 `and_then()` 的组合器（在某\"\n\"些语言中称为 flatmap）就派上用场了。\"\n\n#: src/error/option_unwrap/and_then.md:9\nmsgid \"\"\n\"`and_then()` calls its function input with the wrapped value and returns the \"\n\"result. If the `Option` is `None`, then it returns `None` instead.\"\nmsgstr \"\"\n\"`and_then()` 使用包装的值调用其函数输入并返回结果。如果 `Option` 是 `None`，\"\n\"则直接返回 `None`。\"\n\n#: src/error/option_unwrap/and_then.md:11\nmsgid \"\"\n\"In the following example, `cookable_v3()` results in an `Option<Food>`. \"\n\"Using `map()` instead of `and_then()` would have given an \"\n\"`Option<Option<Food>>`, which is an invalid type for `eat()`.\"\nmsgstr \"\"\n\"在下面的例子中，`cookable_v3()` 返回一个 `Option<Food>`。如果使用 `map()` 而\"\n\"不是 `and_then()`，将会得到一个 `Option<Option<Food>>`，这对于 `eat()` 函数来\"\n\"说是一个无效的类型。\"\n\n#: src/error/option_unwrap/and_then.md:20\nmsgid \"// We don't have the ingredients to make Sushi.\\n\"\nmsgstr \"// 我们没有制作寿司的原料。\\n\"\n\n#: src/error/option_unwrap/and_then.md:28\nmsgid \"// We have the recipe for everything except Cordon Bleu.\\n\"\nmsgstr \"// 我们有除了蓝带猪排以外所有菜品的食谱。\\n\"\n\n#: src/error/option_unwrap/and_then.md:36\nmsgid \"\"\n\"// To make a dish, we need both the recipe and the ingredients.\\n\"\n\"// We can represent the logic with a chain of `match`es:\\n\"\nmsgstr \"\"\n\"// 要做一道菜，我们需要食谱和原料。\\n\"\n\"// 我们可以用一系列的 `match` 来表示这个逻辑：\\n\"\n\n#: src/error/option_unwrap/and_then.md:45\nmsgid \"\"\n\"// This can conveniently be rewritten more compactly with `and_then()`:\\n\"\nmsgstr \"// 这可以使用 `and_then()` 更简洁地重写：\\n\"\n\n#: src/error/option_unwrap/and_then.md:50\nmsgid \"\"\n\"// Otherwise we'd need to `flatten()` an `Option<Option<Food>>`\\n\"\n\"// to get an `Option<Food>`:\\n\"\nmsgstr \"\"\n\"// 否则我们需要对 `Option<Option<Food>>` 使用 `flatten()`\\n\"\n\"// 来获得 `Option<Food>`：\\n\"\n\n#: src/error/option_unwrap/and_then.md:59\nmsgid \"\\\"Yay! On {:?} we get to eat {:?}.\\\"\"\nmsgstr \"\\\"太好了！在 {:?} 我们可以吃到 {:?}。\\\"\"\n\n#: src/error/option_unwrap/and_then.md:60\nmsgid \"\\\"Oh no. We don't get to eat on {:?}?\\\"\"\nmsgstr \"\\\"哦不。我们在 {:?} 没有东西吃吗？\\\"\"\n\n#: src/error/option_unwrap/and_then.md:75\nmsgid \"\"\n\"[closures](../../fn/closures.md), [`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html), [`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then), and [`Option::flatten()`]\"\n\"(https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\nmsgstr \"\"\n\"[闭包](../../fn/closures.md)、[`Option`](https://doc.rust-lang.org/std/\"\n\"option/enum.Option.html)、[`Option::and_then()`](https://doc.rust-lang.org/\"\n\"std/option/enum.Option.html#method.and_then) 和 [`Option::flatten()`]\"\n\"(https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten)\"\n\n#: src/error/option_unwrap/defaults.md:1\nmsgid \"Unpacking options and defaults\"\nmsgstr \"解包 Option 和设置默认值\"\n\n#: src/error/option_unwrap/defaults.md:3\nmsgid \"\"\n\"There is more than one way to unpack an `Option` and fall back on a default \"\n\"if it is `None`. To choose the one that meets our needs, we need to consider \"\n\"the following:\"\nmsgstr \"\"\n\"有多种方法可以解包 `Option` 并在其为 `None` 时使用默认值。为了选择满足我们需\"\n\"求的方法，我们需要考虑以下几点：\"\n\n#: src/error/option_unwrap/defaults.md:5\nmsgid \"do we need eager or lazy evaluation?\"\nmsgstr \"我们需要立即求值还是惰性求值？\"\n\n#: src/error/option_unwrap/defaults.md:6\nmsgid \"\"\n\"do we need to keep the original empty value intact, or modify it in place?\"\nmsgstr \"我们需要保持原始的空值不变，还是就地修改它？\"\n\n#: src/error/option_unwrap/defaults.md:8\nmsgid \"`or()` is chainable, evaluates eagerly, keeps empty value intact\"\nmsgstr \"`or()` 可链式调用，立即求值，保持空值不变\"\n\n#: src/error/option_unwrap/defaults.md:10\nmsgid \"\"\n\"`or()`is chainable and eagerly evaluates its argument, as is shown in the \"\n\"following example. Note that because `or`'s arguments are evaluated eagerly, \"\n\"the variable passed to `or` is moved.\"\nmsgstr \"\"\n\"`or()` 可以链式调用，并且会立即求值其参数，如下例所示。注意，由于 `or` 的参数\"\n\"是立即求值的，传递给 `or` 的变量会被移动。\"\n\n#: src/error/option_unwrap/defaults.md:22\n#: src/error/option_unwrap/defaults.md:55\nmsgid \"\\\"first_available_fruit: {:?}\\\"\"\nmsgstr \"\\\"第一个可用的水果：{:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:23\nmsgid \"// first_available_fruit: Some(Orange)\\n\"\nmsgstr \"// first_available_fruit: Some(Orange)\\n\"\n\n#: src/error/option_unwrap/defaults.md:25\nmsgid \"\"\n\"// `or` moves its argument.\\n\"\n\"    // In the example above, `or(orange)` returned a `Some`, so `or(apple)` \"\n\"was not invoked.\\n\"\n\"    // But the variable named `apple` has been moved regardless, and cannot \"\n\"be used anymore.\\n\"\n\"    // println!(\\\"Variable apple was moved, so this line won't compile: {:?}\"\n\"\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\"// `or` 会移动其参数。\\n\"\n\"    // 在上面的例子中，`or(orange)` 返回了 `Some`，所以 `or(apple)` 没有被调\"\n\"用。\\n\"\n\"    // 但是名为 `apple` 的变量无论如何都被移动了，不能再使用。\\n\"\n\"    // println!(\\\"变量 apple 被移动了，所以这行不会编译：{:?}\\\", apple);\\n\"\n\"    // TODO：取消上面这行的注释来查看编译器错误\\n\"\n\n#: src/error/option_unwrap/defaults.md:33\nmsgid \"`or_else()` is chainable, evaluates lazily, keeps empty value intact\"\nmsgstr \"`or_else()` 可以链式调用，惰性求值，保持空值不变\"\n\n#: src/error/option_unwrap/defaults.md:35\nmsgid \"\"\n\"Another alternative is to use `or_else`, which is also chainable, and \"\n\"evaluates lazily, as is shown in the following example:\"\nmsgstr \"\"\n\"另一种选择是使用 `or_else`，它同样支持链式调用，并且采用惰性求值。以下是一个\"\n\"示例：\"\n\n#: src/error/option_unwrap/defaults.md:44\nmsgid \"\\\"Providing kiwi as fallback\\\"\"\nmsgstr \"\\\"提供猕猴桃作为备选\\\"\"\n\n#: src/error/option_unwrap/defaults.md:48\n#: src/error/option_unwrap/defaults.md:93\nmsgid \"\\\"Providing lemon as fallback\\\"\"\nmsgstr \"\\\"提供柠檬作为备选\\\"\"\n\n#: src/error/option_unwrap/defaults.md:56\nmsgid \"\"\n\"// Providing kiwi as fallback\\n\"\n\"    // first_available_fruit: Some(Kiwi)\\n\"\nmsgstr \"\"\n\"// 提供猕猴桃作为备选\\n\"\n\"    // first_available_fruit: Some(Kiwi)\\n\"\n\n#: src/error/option_unwrap/defaults.md:61\nmsgid \"`get_or_insert()` evaluates eagerly, modifies empty value in place\"\nmsgstr \"`get_or_insert()` 立即求值，原地修改空值\"\n\n#: src/error/option_unwrap/defaults.md:63\nmsgid \"\"\n\"To make sure that an `Option` contains a value, we can use `get_or_insert` \"\n\"to modify it in place with a fallback value, as is shown in the following \"\n\"example. Note that `get_or_insert` eagerly evaluates its parameter, so \"\n\"variable `apple` is moved:\"\nmsgstr \"\"\n\"为确保 `Option` 包含一个值，我们可以使用 `get_or_insert` 来原地修改它，提供一\"\n\"个备选值。下面的例子展示了这一点。请注意，`get_or_insert` 会立即求值其参数，\"\n\"因此变量 `apple` 会被移动：\"\n\n#: src/error/option_unwrap/defaults.md:73\n#: src/error/option_unwrap/defaults.md:98\nmsgid \"\\\"first_available_fruit is: {:?}\\\"\"\nmsgstr \"\\\"第一个可用的水果是：{:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:74\n#: src/error/option_unwrap/defaults.md:99\nmsgid \"\\\"my_fruit is: {:?}\\\"\"\nmsgstr \"\\\"我的水果是：{:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:75\nmsgid \"\"\n\"// first_available_fruit is: Apple\\n\"\n\"    // my_fruit is: Some(Apple)\\n\"\n\"    //println!(\\\"Variable named `apple` is moved: {:?}\\\", apple);\\n\"\n\"    // TODO: uncomment the line above to see the compiler error\\n\"\nmsgstr \"\"\n\"// first_available_fruit is: Apple\\n\"\n\"    // my_fruit is: Some(Apple)\\n\"\n\"    //println!(\\\"名为 `apple` 的变量已被移动：{:?}\\\", apple);\\n\"\n\"    // TODO：取消上面这行的注释以查看编译器错误\\n\"\n\n#: src/error/option_unwrap/defaults.md:82\nmsgid \"`get_or_insert_with()` evaluates lazily, modifies empty value in place\"\nmsgstr \"`get_or_insert_with()` 惰性求值，原地修改空值\"\n\n#: src/error/option_unwrap/defaults.md:84\nmsgid \"\"\n\"Instead of explicitly providing a value to fall back on, we can pass a \"\n\"closure to `get_or_insert_with`, as follows:\"\nmsgstr \"\"\n\"我们可以向 `get_or_insert_with` 传递一个闭包，而不是显式提供一个备选值。示例\"\n\"如下：\"\n\n#: src/error/option_unwrap/defaults.md:100\nmsgid \"\"\n\"// Providing lemon as fallback\\n\"\n\"    // first_available_fruit is: Lemon\\n\"\n\"    // my_fruit is: Some(Lemon)\\n\"\nmsgstr \"\"\n\"// 提供柠檬作为备选\\n\"\n\"    // first_available_fruit is: Lemon\\n\"\n\"    // my_fruit is: Some(Lemon)\\n\"\n\n#: src/error/option_unwrap/defaults.md:104\nmsgid \"\"\n\"// If the Option has a value, it is left unchanged, and the closure is not \"\n\"invoked\\n\"\nmsgstr \"// 如果 Option 已有值，它将保持不变，闭包不会被调用\\n\"\n\n#: src/error/option_unwrap/defaults.md:107\nmsgid \"\\\"should_be_apple is: {:?}\\\"\"\nmsgstr \"\\\"should_be_apple 的值为：{:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:108\nmsgid \"\\\"my_apple is unchanged: {:?}\\\"\"\nmsgstr \"\\\"my_apple 保持不变：{:?}\\\"\"\n\n#: src/error/option_unwrap/defaults.md:109\nmsgid \"\"\n\"// The output is a follows. Note that the closure `get_lemon_as_fallback` is \"\n\"not invoked\\n\"\n\"    // should_be_apple is: Apple\\n\"\n\"    // my_apple is unchanged: Some(Apple)\\n\"\nmsgstr \"\"\n\"// 输出如下。注意闭包 `get_lemon_as_fallback` 并未被调用\\n\"\n\"    // should_be_apple is: Apple\\n\"\n\"    // my_apple is unchanged: Some(Apple)\\n\"\n\n#: src/error/option_unwrap/defaults.md:117\nmsgid \"\"\n\"[`closures`](https://doc.rust-lang.org/book/ch13-01-closures.html), \"\n\"[`get_or_insert`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.get_or_insert), [`get_or_insert_with`](https://\"\n\"doc.rust-lang.org/core/option/enum.Option.html#method.get_or_insert_with), \"\n\"[`moved variables`](https://doc.rust-lang.org/book/ch04-02-references-and-\"\n\"borrowing.html), [`or`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.or), [`or_else`](https://doc.rust-lang.org/core/\"\n\"option/enum.Option.html#method.or_else)\"\nmsgstr \"\"\n\"[`闭包`](https://doc.rust-lang.org/book/ch13-01-closures.html)、\"\n\"[`get_or_insert`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.get_or_insert)、[`get_or_insert_with`](https://\"\n\"doc.rust-lang.org/core/option/enum.Option.html#method.get_or_insert_with)、[`\"\n\"变量移动`](https://doc.rust-lang.org/book/ch04-02-references-and-\"\n\"borrowing.html)、[`or`](https://doc.rust-lang.org/core/option/\"\n\"enum.Option.html#method.or)、[`or_else`](https://doc.rust-lang.org/core/\"\n\"option/enum.Option.html#method.or_else)\"\n\n#: src/error/result.md:3\nmsgid \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html) is a \"\n\"richer version of the [`Option`](https://doc.rust-lang.org/std/option/\"\n\"enum.Option.html) type that describes possible _error_ instead of possible \"\n\"_absence_.\"\nmsgstr \"\"\n\"[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html) 是 \"\n\"[`Option`](https://doc.rust-lang.org/std/option/enum.Option.html) 类型的增强\"\n\"版，它描述可能的**错误**而非可能的**缺失**。\"\n\n#: src/error/result.md:6\nmsgid \"That is, `Result<T, E>` could have one of two outcomes:\"\nmsgstr \"也就是说，`Result<T, E>` 可能有两种结果之一：\"\n\n#: src/error/result.md:8\nmsgid \"`Ok(T)`: An element `T` was found\"\nmsgstr \"`Ok(T)`：找到了一个 `T` 类型的元素\"\n\n#: src/error/result.md:9\nmsgid \"`Err(E)`: An error was found with element `E`\"\nmsgstr \"`Err(E)`：发生了一个 `E` 类型的错误\"\n\n#: src/error/result.md:11\nmsgid \"\"\n\"By convention, the expected outcome is `Ok` while the unexpected outcome is \"\n\"`Err`.\"\nmsgstr \"按照惯例，预期的结果是 `Ok`，而意外的结果是 `Err`。\"\n\n#: src/error/result.md:13\nmsgid \"\"\n\"Like `Option`, `Result` has many methods associated with it. `unwrap()`, for \"\n\"example, either yields the element `T` or `panic`s. For case handling, there \"\n\"are many combinators between `Result` and `Option` that overlap.\"\nmsgstr \"\"\n\"与 `Option` 类似，`Result` 也有许多关联方法。例如，`unwrap()` 要么返回元素 \"\n\"`T`，要么触发 `panic`。对于情况处理，`Result` 和 `Option` 之间有许多重叠的组\"\n\"合子。\"\n\n#: src/error/result.md:17\nmsgid \"\"\n\"In working with Rust, you will likely encounter methods that return the \"\n\"`Result` type, such as the [`parse()`](https://doc.rust-lang.org/std/\"\n\"primitive.str.html#method.parse) method. It might not always be possible to \"\n\"parse a string into the other type, so `parse()` returns a `Result` \"\n\"indicating possible failure.\"\nmsgstr \"\"\n\"在使用 Rust 时，你可能会遇到返回 `Result` 类型的方法，比如 [`parse()`]\"\n\"(https://doc.rust-lang.org/std/primitive.str.html#method.parse) 方法。将字符\"\n\"串解析为其他类型并非总是可行，因此 `parse()` 返回一个 `Result` 来表示可能的失\"\n\"败。\"\n\n#: src/error/result.md:22\nmsgid \"\"\n\"Let's see what happens when we successfully and unsuccessfully `parse()` a \"\n\"string:\"\nmsgstr \"让我们看看成功和失败地 `parse()` 一个字符串会发生什么：\"\n\n#: src/error/result.md:26\nmsgid \"// Let's try using `unwrap()` to get the number out. Will it bite us?\\n\"\nmsgstr \"// 让我们尝试使用 `unwrap()` 来获取数字。这样做会有问题吗？\\n\"\n\n#: src/error/result.md:33 src/error/result.md:36\n#: src/error/result/result_map.md:42 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:75 src/error/result/result_map.md:79\n#: src/error/result/result_alias.md:36 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:36 src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:34\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:67\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/error/result.md:34 src/error/result.md:37\nmsgid \"\\\"double is {}\\\"\"\nmsgstr \"\\\"double is {}\\\"\"\n\n#: src/error/result.md:36 src/error/result/result_map.md:46\n#: src/error/result/result_map.md:79 src/error/result/result_alias.md:37\n#: src/error/result/early_returns.md:37\n#: src/error/result/enter_question_mark.md:35\n#: src/error/result/enter_question_mark.md:68\nmsgid \"\\\"t\\\"\"\nmsgstr \"\\\"t\\\"\"\n\n#: src/error/result.md:41\nmsgid \"\"\n\"In the unsuccessful case, `parse()` leaves us with an error for `unwrap()` \"\n\"to `panic` on. Additionally, the `panic` exits our program and provides an \"\n\"unpleasant error message.\"\nmsgstr \"\"\n\"在解析失败的情况下，`parse()` 会返回一个错误，导致 `unwrap()` 触发 panic。此\"\n\"外，panic 会终止程序并输出一条不友好的错误信息。\"\n\n#: src/error/result.md:45\nmsgid \"\"\n\"To improve the quality of our error message, we should be more specific \"\n\"about the return type and consider explicitly handling the error.\"\nmsgstr \"\"\n\"为了提高错误信息的质量，我们应该更明确地指定返回类型，并考虑显式地处理错误。\"\n\n#: src/error/result.md:48\nmsgid \"Using `Result` in `main`\"\nmsgstr \"在 `main` 函数中使用 `Result`\"\n\n#: src/error/result.md:50\nmsgid \"\"\n\"The `Result` type can also be the return type of the `main` function if \"\n\"specified explicitly. Typically the `main` function will be of the form:\"\nmsgstr \"\"\n\"如果显式指定，`Result` 类型也可以作为 `main` 函数的返回类型。通常，`main` 函\"\n\"数的形式如下：\"\n\n#: src/error/result.md:59\nmsgid \"\"\n\"However `main` is also able to have a return type of `Result`. If an error \"\n\"occurs within the `main` function it will return an error code and print a \"\n\"debug representation of the error (using the [`Debug`](https://doc.rust-\"\n\"lang.org/std/fmt/trait.Debug.html) trait). The following example shows such \"\n\"a scenario and touches on aspects covered in [the following section](result/\"\n\"early_returns.md).\"\nmsgstr \"\"\n\"然而，`main` 函数也可以返回 `Result` 类型。如果 `main` 函数内发生错误，它将返\"\n\"回一个错误代码并打印该错误的调试表示（使用 [`Debug`] trait）。以下示例展示了\"\n\"这种情况，并涉及了[下一节]中讨论的内容。\\n\"\n\"\\n\"\n\"[`Debug`]: https://doc.rust-lang.org/std/fmt/trait.Debug.html\\n\"\n\"[下一节]: result/early_returns.md\"\n\n#: src/error/result/result_map.md:3\nmsgid \"\"\n\"Panicking in the previous example's `multiply` does not make for robust \"\n\"code. Generally, we want to return the error to the caller so it can decide \"\n\"what is the right way to respond to errors.\"\nmsgstr \"\"\n\"在前面示例的 `multiply` 函数中使用 panic 并不能产生健壮的代码。通常，我们希望\"\n\"将错误返回给调用者，让它决定如何正确地处理错误。\"\n\n#: src/error/result/result_map.md:7\nmsgid \"\"\n\"We first need to know what kind of error type we are dealing with. To \"\n\"determine the `Err` type, we look to [`parse()`](https://doc.rust-lang.org/\"\n\"std/primitive.str.html#method.parse), which is implemented with the \"\n\"[`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait for \"\n\"[`i32`](https://doc.rust-lang.org/std/primitive.i32.html). As a result, the \"\n\"`Err` type is specified as [`ParseIntError`](https://doc.rust-lang.org/std/\"\n\"num/struct.ParseIntError.html).\"\nmsgstr \"\"\n\"首先，我们需要知道我们正在处理的错误类型。要确定 `Err` 类型，我们可以查看 \"\n\"[`parse()`] 方法，它是通过 [`FromStr`] trait 为 [`i32`] 实现的。因此，`Err` \"\n\"类型被指定为 [`ParseIntError`]。\\n\"\n\"\\n\"\n\"[`parse()`]: https://doc.rust-lang.org/std/primitive.str.html#method.parse\\n\"\n\"[`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html\\n\"\n\"[`i32`]: https://doc.rust-lang.org/std/primitive.i32.html\\n\"\n\"[`ParseIntError`]: https://doc.rust-lang.org/std/num/\"\n\"struct.ParseIntError.html\"\n\n#: src/error/result/result_map.md:12\nmsgid \"\"\n\"In the example below, the straightforward `match` statement leads to code \"\n\"that is overall more cumbersome.\"\nmsgstr \"在下面的示例中，直接使用 `match` 语句会导致整体代码更加繁琐。\"\n\n#: src/error/result/result_map.md:17\nmsgid \"\"\n\"// With the return type rewritten, we use pattern matching without \"\n\"`unwrap()`.\\n\"\nmsgstr \"// 重写返回类型后，我们使用模式匹配而不是 `unwrap()`。\\n\"\n\n#: src/error/result/result_map.md:35 src/error/result/result_map.md:68\n#: src/error/result/result_alias.md:30 src/error/result/early_returns.md:30\n#: src/error/result/enter_question_mark.md:28\n#: src/error/result/enter_question_mark.md:61\nmsgid \"\\\"n is {}\\\"\"\nmsgstr \"\\\"n 是 {}\\\"\"\n\n#: src/error/result/result_map.md:36 src/error/result/result_map.md:69\n#: src/error/result/result_alias.md:31 src/error/result/early_returns.md:31\n#: src/error/result/enter_question_mark.md:29\n#: src/error/result/enter_question_mark.md:62\n#: src/error/multiple_error_types/define_error_type.md:55\n#: src/error/multiple_error_types/boxing_errors.md:42\n#: src/error/multiple_error_types/reenter_question_mark.md:54\n#: src/error/multiple_error_types/wrap_error.md:68\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"错误：{}\\\"\"\n\n#: src/error/result/result_map.md:41 src/error/result/result_map.md:74\nmsgid \"// This still presents a reasonable answer.\\n\"\nmsgstr \"// 这仍然给出了一个合理的答案。\\n\"\n\n#: src/error/result/result_map.md:45 src/error/result/result_map.md:78\nmsgid \"// The following now provides a much more helpful error message.\\n\"\nmsgstr \"// 以下代码现在提供了一个更有帮助的错误消息。\\n\"\n\n#: src/error/result/result_map.md:51\nmsgid \"\"\n\"Luckily, `Option`'s `map`, `and_then`, and many other combinators are also \"\n\"implemented for `Result`. [`Result`](https://doc.rust-lang.org/std/result/\"\n\"enum.Result.html) contains a complete listing.\"\nmsgstr \"\"\n\"幸运的是，`Option` 的 `map`、`and_then` 以及许多其他组合器也为 `Result` 实现\"\n\"了。[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html) 文档中\"\n\"包含了完整的列表。\"\n\n#: src/error/result/result_map.md:56\nmsgid \"\"\n\"// As with `Option`, we can use combinators such as `map()`.\\n\"\n\"// This function is otherwise identical to the one above and reads:\\n\"\n\"// Multiply if both values can be parsed from str, otherwise pass on the \"\n\"error.\\n\"\nmsgstr \"\"\n\"// 与 `Option` 类似，我们可以使用诸如 `map()` 之类的组合器。\\n\"\n\"// 这个函数除此之外与上面的函数相同，其含义为：\\n\"\n\"// 如果两个值都可以从字符串解析，则相乘；否则传递错误。\\n\"\n\n#: src/error/result/result_alias.md:3\nmsgid \"\"\n\"How about when we want to reuse a specific `Result` type many times? Recall \"\n\"that Rust allows us to create [aliases](../../types/alias.md). Conveniently, \"\n\"we can define one for the specific `Result` in question.\"\nmsgstr \"\"\n\"如果我们想多次重用特定的 `Result` 类型，该怎么办？回想一下，Rust 允许我们创建\"\n\"[别名](../../types/alias.md)。方便的是，我们可以为特定的 `Result` 定义一个别\"\n\"名。\"\n\n#: src/error/result/result_alias.md:7\nmsgid \"\"\n\"At a module level, creating aliases can be particularly helpful. Errors \"\n\"found in a specific module often have the same `Err` type, so a single alias \"\n\"can succinctly define _all_ associated `Results`. This is so useful that the \"\n\"`std` library even supplies one: [`io::Result`](https://doc.rust-lang.org/\"\n\"std/io/type.Result.html)!\"\nmsgstr \"\"\n\"在模块级别，创建别名特别有用。在特定模块中发现的错误通常具有相同的 `Err` 类\"\n\"型，因此单个别名可以简洁地定义**所有**相关的 `Result`。这非常实用，以至于 \"\n\"`std` 库甚至提供了一个：[`io::Result`](https://doc.rust-lang.org/std/io/\"\n\"type.Result.html)！\"\n\n#: src/error/result/result_alias.md:12\nmsgid \"Here's a quick example to show off the syntax:\"\nmsgstr \"这里有一个简单的例子来展示语法：\"\n\n#: src/error/result/result_alias.md:16\nmsgid \"\"\n\"// Define a generic alias for a `Result` with the error type \"\n\"`ParseIntError`.\\n\"\nmsgstr \"// 为错误类型为 `ParseIntError` 的 `Result` 定义一个泛型别名。\\n\"\n\n#: src/error/result/result_alias.md:19\nmsgid \"// Use the above alias to refer to our specific `Result` type.\\n\"\nmsgstr \"// 使用上面定义的别名来引用我们特定的 `Result` 类型。\\n\"\n\n#: src/error/result/result_alias.md:26\nmsgid \"// Here, the alias again allows us to save some space.\\n\"\nmsgstr \"// 在这里，别名再次让我们节省了一些代码空间。\\n\"\n\n#: src/error/result/result_alias.md:43\nmsgid \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\nmsgstr \"[`io::Result`](https://doc.rust-lang.org/std/io/type.Result.html)\"\n\n#: src/error/result/early_returns.md:3\nmsgid \"\"\n\"In the previous example, we explicitly handled the errors using combinators. \"\n\"Another way to deal with this case analysis is to use a combination of \"\n\"`match` statements and _early returns_.\"\nmsgstr \"\"\n\"在前面的例子中，我们使用组合器显式地处理了错误。处理这种情况分析的另一种方法\"\n\"是使用 `match` 语句和**提前返回**的组合。\"\n\n#: src/error/result/early_returns.md:7\nmsgid \"\"\n\"That is, we can simply stop executing the function and return the error if \"\n\"one occurs. For some, this form of code can be easier to both read and \"\n\"write. Consider this version of the previous example, rewritten using early \"\n\"returns:\"\nmsgstr \"\"\n\"也就是说，如果发生错误，我们可以简单地停止执行函数并返回错误。对某些人来说，\"\n\"这种形式的代码可能更容易阅读和编写。考虑使用提前返回重写的前面示例的这个版\"\n\"本：\"\n\n#: src/error/result/early_returns.md:41\nmsgid \"\"\n\"At this point, we've learned to explicitly handle errors using combinators \"\n\"and early returns. While we generally want to avoid panicking, explicitly \"\n\"handling all of our errors is cumbersome.\"\nmsgstr \"\"\n\"到目前为止，我们已经学会了使用组合器和提前返回来显式处理错误。虽然我们通常想\"\n\"避免 panic，但显式处理所有错误是很繁琐的。\"\n\n#: src/error/result/early_returns.md:45\nmsgid \"\"\n\"In the next section, we'll introduce `?` for the cases where we simply need \"\n\"to `unwrap` without possibly inducing `panic`.\"\nmsgstr \"\"\n\"在下一节中，我们将介绍 `?` 运算符，用于我们只需要 `unwrap` 而不可能引发 \"\n\"`panic` 的情况。\"\n\n#: src/error/result/enter_question_mark.md:3\nmsgid \"\"\n\"Sometimes we just want the simplicity of `unwrap` without the possibility of \"\n\"a `panic`. Until now, `unwrap` has forced us to nest deeper and deeper when \"\n\"what we really wanted was to get the variable _out_. This is exactly the \"\n\"purpose of `?`.\"\nmsgstr \"\"\n\"有时我们只想要 `unwrap` 的简单性，而不希望有 `panic` 的可能。到目前为止，当我\"\n\"们真正想要的是获取变量**值**时，`unwrap` 迫使我们不断地增加嵌套。这正是 `?` \"\n\"运算符的目的。\"\n\n#: src/error/result/enter_question_mark.md:7\nmsgid \"Upon finding an `Err`, there are two valid actions to take:\"\nmsgstr \"当遇到 `Err` 时，有两种可行的处理方式：\"\n\n#: src/error/result/enter_question_mark.md:9\nmsgid \"`panic!` which we already decided to try to avoid if possible\"\nmsgstr \"1. 使用 `panic!`（我们已经决定尽可能避免这种方式）\"\n\n#: src/error/result/enter_question_mark.md:10\nmsgid \"`return` because an `Err` means it cannot be handled\"\nmsgstr \"2. 使用 `return`（因为 `Err` 表示无法处理该错误）\"\n\n#: src/error/result/enter_question_mark.md:12\nmsgid \"\"\n\"`?` is _almost_[^†] exactly equivalent to an `unwrap` which `return`s \"\n\"instead of `panic`king on `Err`s. Let's see how we can simplify the earlier \"\n\"example that used combinators:\"\nmsgstr \"\"\n\"`?` 运算符**几乎**[^†]等同于在遇到 `Err` 时执行 `return` 而非 `panic` 的 \"\n\"`unwrap`。让我们看看如何简化之前使用组合器的例子：\"\n\n#: src/error/result/enter_question_mark.md:39\nmsgid \"The `try!` macro\"\nmsgstr \"`try!` 宏\"\n\n#: src/error/result/enter_question_mark.md:41\nmsgid \"\"\n\"Before there was `?`, the same functionality was achieved with the `try!` \"\n\"macro. The `?` operator is now recommended, but you may still find `try!` \"\n\"when looking at older code. The same `multiply` function from the previous \"\n\"example would look like this using `try!`:\"\nmsgstr \"\"\n\"在 `?` 运算符出现之前，相同的功能是通过 `try!` 宏实现的。现在推荐使用 `?` 运\"\n\"算符，但在查看旧代码时，你可能仍会遇到 `try!`。使用 `try!` 宏，前面例子中的 \"\n\"`multiply` 函数会是这样的：\"\n\n#: src/error/result/enter_question_mark.md:47\nmsgid \"\"\n\"// To compile and run this example without errors, while using Cargo, change \"\n\"the value\\n\"\n\"// of the `edition` field, in the `[package]` section of the `Cargo.toml` \"\n\"file, to \\\"2015\\\".\\n\"\nmsgstr \"\"\n\"// 要使用 Cargo 编译并运行此示例而不出错，请将 `Cargo.toml` 文件中\\n\"\n\"// `[package]` 部分的 `edition` 字段值更改为 \\\"2015\\\"。\\n\"\n\n#: src/error/result/enter_question_mark.md:72\nmsgid \"\"\n\"See [re-enter ?](../multiple_error_types/reenter_question_mark.md) for more \"\n\"details.\"\nmsgstr \"\"\n\"更多详情请参阅[重新认识 ?](../multiple_error_types/\"\n\"reenter_question_mark.md)。\"\n\n#: src/error/multiple_error_types.md:3\nmsgid \"\"\n\"The previous examples have always been very convenient; `Result`s interact \"\n\"with other `Result`s and `Option`s interact with other `Option`s.\"\nmsgstr \"\"\n\"前面的例子一直都很方便：`Result` 与 `Result` 交互，`Option` 与 `Option` 交\"\n\"互。\"\n\n#: src/error/multiple_error_types.md:6\nmsgid \"\"\n\"Sometimes an `Option` needs to interact with a `Result`, or a `Result<T, \"\n\"Error1>` needs to interact with a `Result<T, Error2>`. In those cases, we \"\n\"want to manage our different error types in a way that makes them composable \"\n\"and easy to interact with.\"\nmsgstr \"\"\n\"有时，`Option` 需要与 `Result` 交互，或者 `Result<T, Error1>` 需要与 \"\n\"`Result<T, Error2>` 交互。在这些情况下，我们希望以一种使不同错误类型可组合且\"\n\"易于交互的方式来管理它们。\"\n\n#: src/error/multiple_error_types.md:11\nmsgid \"\"\n\"In the following code, two instances of `unwrap` generate different error \"\n\"types. `Vec::first` returns an `Option`, while `parse::<i32>` returns a \"\n\"`Result<i32, ParseIntError>`:\"\nmsgstr \"\"\n\"在下面的代码中，两个 `unwrap` 实例生成了不同的错误类型。`Vec::first` 返回一\"\n\"个 `Option`，而 `parse::<i32>` 返回一个 `Result<i32, ParseIntError>`：\"\n\n#: src/error/multiple_error_types.md:17\nmsgid \"// Generate error 1\\n\"\nmsgstr \"// 生成错误 1\\n\"\n\n#: src/error/multiple_error_types.md:18\nmsgid \"// Generate error 2\\n\"\nmsgstr \"// 生成错误 2\\n\"\n\n#: src/error/multiple_error_types.md:22\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/wrap_error.md:77 src/error/iter_result.md:40\nmsgid \"\\\"42\\\"\"\nmsgstr \"\\\"42\\\"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"93\\\"\"\nmsgstr \"\\\"93\\\"\"\n\n#: src/error/multiple_error_types.md:22 src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:16\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:45\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:60\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:47\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:59\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:77\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"18\\\"\"\nmsgstr \"\\\"18\\\"\"\n\n#: src/error/multiple_error_types.md:24\n#: src/error/multiple_error_types/option_result.md:18\n#: src/error/multiple_error_types/option_result.md:47\n#: src/error/multiple_error_types/define_error_type.md:62\n#: src/error/multiple_error_types/boxing_errors.md:49\n#: src/error/multiple_error_types/reenter_question_mark.md:61\n#: src/error/multiple_error_types/wrap_error.md:79 src/error/iter_result.md:7\n#: src/error/iter_result.md:24 src/error/iter_result.md:40\n#: src/error/iter_result.md:60 src/error/iter_result.md:75\n#: src/error/iter_result.md:90\nmsgid \"\\\"tofu\\\"\"\nmsgstr \"\\\"tofu\\\"\"\n\n#: src/error/multiple_error_types.md:26 src/error/multiple_error_types.md:28\n#: src/error/multiple_error_types.md:31\n#: src/error/multiple_error_types/define_error_type.md:54\n#: src/error/multiple_error_types/boxing_errors.md:41\n#: src/error/multiple_error_types/reenter_question_mark.md:53\n#: src/error/multiple_error_types/wrap_error.md:66\nmsgid \"\\\"The first doubled is {}\\\"\"\nmsgstr \"\\\"第一个数的两倍是 {}\\\"\"\n\n#: src/error/multiple_error_types.md:29\n#: src/error/multiple_error_types/option_result.md:23\nmsgid \"// Error 1: the input vector is empty\\n\"\nmsgstr \"// 错误 1：输入向量为空\\n\"\n\n#: src/error/multiple_error_types.md:32\n#: src/error/multiple_error_types/option_result.md:26\nmsgid \"// Error 2: the element doesn't parse to a number\\n\"\nmsgstr \"// 错误 2：元素无法解析为数字\\n\"\n\n#: src/error/multiple_error_types.md:36\nmsgid \"\"\n\"Over the next sections, we'll see several strategies for handling these kind \"\n\"of problems.\"\nmsgstr \"在接下来的章节中，我们将探讨几种处理此类问题的策略。\"\n\n#: src/error/multiple_error_types/option_result.md:3\nmsgid \"\"\n\"The most basic way of handling mixed error types is to just embed them in \"\n\"each other.\"\nmsgstr \"处理混合错误类型最基本的方法是将它们相互嵌套。\"\n\n#: src/error/multiple_error_types/option_result.md:20\n#: src/error/multiple_error_types/option_result.md:22\n#: src/error/multiple_error_types/option_result.md:25\n#: src/error/multiple_error_types/option_result.md:49\n#: src/error/multiple_error_types/option_result.md:50\n#: src/error/multiple_error_types/option_result.md:51\nmsgid \"\\\"The first doubled is {:?}\\\"\"\nmsgstr \"\\\"第一个数的两倍是 {:?}\\\"\"\n\n#: src/error/multiple_error_types/option_result.md:30\nmsgid \"\"\n\"There are times when we'll want to stop processing on errors (like with [`?`]\"\n\"(../result/enter_question_mark.md)) but keep going when the `Option` is \"\n\"`None`. The `transpose` function comes in handy to swap the `Result` and \"\n\"`Option`.\"\nmsgstr \"\"\n\"有时我们希望在遇到错误时停止处理（例如使用 [`?`](../result/\"\n\"enter_question_mark.md)），但在 `Option` 为 `None` 时继续执行。这时 \"\n\"`transpose` 函数就派上用场了，它可以方便地交换 `Result` 和 `Option`。\"\n\n#: src/error/multiple_error_types/define_error_type.md:3\nmsgid \"\"\n\"Sometimes it simplifies the code to mask all of the different errors with a \"\n\"single type of error.  We'll show this with a custom error.\"\nmsgstr \"\"\n\"有时，用单一类型的错误来掩盖所有不同的错误可以简化代码。我们将通过自定义错误\"\n\"来演示这一点。\"\n\n#: src/error/multiple_error_types/define_error_type.md:6\nmsgid \"\"\n\"Rust allows us to define our own error types. In general, a \\\"good\\\" error \"\n\"type:\"\nmsgstr \"Rust 允许我们定义自己的错误类型。通常，一个\\\"好的\\\"错误类型应该：\"\n\n#: src/error/multiple_error_types/define_error_type.md:8\nmsgid \"Represents different errors with the same type\"\nmsgstr \"用同一类型表示不同的错误\"\n\n#: src/error/multiple_error_types/define_error_type.md:9\nmsgid \"Presents nice error messages to the user\"\nmsgstr \"向用户展示友好的错误消息\"\n\n#: src/error/multiple_error_types/define_error_type.md:10\nmsgid \"Is easy to compare with other types\"\nmsgstr \"易于与其他类型进行比较\"\n\n#: src/error/multiple_error_types/define_error_type.md:11\nmsgid \"Good: `Err(EmptyVec)`\"\nmsgstr \"好的示例：`Err(EmptyVec)`\"\n\n#: src/error/multiple_error_types/define_error_type.md:12\nmsgid \"\"\n\"Bad: `Err(\\\"Please use a vector with at least one element\\\".to_owned())`\"\nmsgstr \"不好的示例：`Err(\\\"请使用至少包含一个元素的向量\\\".to_owned())`\"\n\n#: src/error/multiple_error_types/define_error_type.md:13\nmsgid \"Can hold information about the error\"\nmsgstr \"能够保存错误的相关信息\"\n\n#: src/error/multiple_error_types/define_error_type.md:14\nmsgid \"Good: `Err(BadChar(c, position))`\"\nmsgstr \"好的示例：`Err(BadChar(c, position))`\"\n\n#: src/error/multiple_error_types/define_error_type.md:15\nmsgid \"Bad: `Err(\\\"+ cannot be used here\\\".to_owned())`\"\nmsgstr \"不好的示例：`Err(\\\"此处不能使用 +\\\".to_owned())`\"\n\n#: src/error/multiple_error_types/define_error_type.md:16\nmsgid \"Composes well with other errors\"\nmsgstr \"能够与其他错误很好地组合\"\n\n#: src/error/multiple_error_types/define_error_type.md:22\nmsgid \"\"\n\"// Define our error types. These may be customized for our error handling \"\n\"cases.\\n\"\n\"// Now we will be able to write our own errors, defer to an underlying \"\n\"error\\n\"\n\"// implementation, or do something in between.\\n\"\nmsgstr \"\"\n\"// 定义我们的错误类型。这些可以根据我们的错误处理情况进行自定义。\\n\"\n\"// 现在我们可以编写自己的错误，依赖底层的错误实现，\\n\"\n\"// 或者在两者之间做一些处理。\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:28\nmsgid \"\"\n\"// Generation of an error is completely separate from how it is displayed.\\n\"\n\"// There's no need to be concerned about cluttering complex logic with the \"\n\"display style.\\n\"\n\"//\\n\"\n\"// Note that we don't store any extra info about the errors. This means we \"\n\"can't state\\n\"\n\"// which string failed to parse without modifying our types to carry that \"\n\"information.\\n\"\nmsgstr \"\"\n\"// 错误的生成与其显示方式是完全分离的。\\n\"\n\"// 无需担心显示样式会使复杂的逻辑变得混乱。\\n\"\n\"//\\n\"\n\"// 注意，我们没有存储关于错误的任何额外信息。这意味着如果不修改类型\\n\"\n\"// 来携带相关信息，我们就无法指出具体是哪个字符串解析失败了。\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:36\n#: src/error/multiple_error_types/boxing_errors.md:23\n#: src/error/multiple_error_types/reenter_question_mark.md:37\nmsgid \"\\\"invalid first item to double\\\"\"\nmsgstr \"\\\"无效的第一个待加倍项\\\"\"\n\n#: src/error/multiple_error_types/define_error_type.md:42\nmsgid \"// Change the error to our new type.\\n\"\nmsgstr \"// 将错误更改为我们的新类型。\\n\"\n\n#: src/error/multiple_error_types/define_error_type.md:46\nmsgid \"// Update to the new error type here also.\\n\"\nmsgstr \"// 这里也更新为新的错误类型。\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:3\nmsgid \"\"\n\"A way to write simple code while preserving the original errors is to [`Box`]\"\n\"(https://doc.rust-lang.org/std/boxed/struct.Box.html) them.  The drawback is \"\n\"that the underlying error type is only known at runtime and not [statically \"\n\"determined](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#trait-\"\n\"objects-perform-dynamic-dispatch).\"\nmsgstr \"\"\n\"一种既能编写简洁代码又能保留原始错误信息的方法是使用 [`Box`](https://\"\n\"doc.rust-lang.org/std/boxed/struct.Box.html) 将它们装箱。这种方法的缺点是底层\"\n\"错误类型只能在运行时确定，而不是[静态确定](https://doc.rust-lang.org/book/\"\n\"ch17-02-trait-objects.html#trait-objects-perform-dynamic-dispatch)的。\"\n\n#: src/error/multiple_error_types/boxing_errors.md:7\nmsgid \"\"\n\"The stdlib helps in boxing our errors by having `Box` implement conversion \"\n\"from any type that implements the `Error` trait into the trait object \"\n\"`Box<Error>`, via [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html).\"\nmsgstr \"\"\n\"标准库通过让 `Box` 实现从任何实现了 `Error` trait 的类型到 trait 对象 \"\n\"`Box<Error>` 的转换来帮助我们装箱错误，这是通过 [`From`](https://doc.rust-\"\n\"lang.org/std/convert/trait.From.html) 实现的。\"\n\n#: src/error/multiple_error_types/boxing_errors.md:14\n#: src/error/multiple_error_types/reenter_question_mark.md:28\nmsgid \"// Change the alias to use `Box<dyn error::Error>`.\\n\"\nmsgstr \"// 将别名改为使用 `Box<dyn error::Error>`。\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:31\n#: src/error/multiple_error_types/boxing_errors.md:34\nmsgid \"// Converts to Box\\n\"\nmsgstr \"// 转换为 Box\\n\"\n\n#: src/error/multiple_error_types/boxing_errors.md:59\nmsgid \"\"\n\"[Dynamic dispatch](https://doc.rust-lang.org/book/ch17-02-trait-\"\n\"objects.html#trait-objects-perform-dynamic-dispatch) and [`Error` trait]\"\n\"(https://doc.rust-lang.org/std/error/trait.Error.html)\"\nmsgstr \"\"\n\"[动态分发](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#trait-\"\n\"objects-perform-dynamic-dispatch)和 [`Error` trait](https://doc.rust-\"\n\"lang.org/std/error/trait.Error.html)\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:3\nmsgid \"\"\n\"Notice in the previous example that our immediate reaction to calling \"\n\"`parse` is to `map` the error from a library error into a boxed error:\"\nmsgstr \"\"\n\"注意在前面的例子中，我们对调用 `parse` 的直接反应是将库错误通过 `map` 转换为\"\n\"一个装箱的错误：\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:12\nmsgid \"\"\n\"Since this is a simple and common operation, it would be convenient if it \"\n\"could be elided. Alas, because `and_then` is not sufficiently flexible, it \"\n\"cannot. However, we can instead use `?`.\"\nmsgstr \"\"\n\"由于这是一个简单且常见的操作，如果能够省略就会很方便。可惜的是，由于 \"\n\"`and_then` 不够灵活，所以无法实现这一点。不过，我们可以使用 `?` 来替代。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:16\nmsgid \"\"\n\"`?` was previously explained as either `unwrap` or `return Err(err)`. This \"\n\"is only mostly true. It actually means `unwrap` or `return \"\n\"Err(From::from(err))`. Since `From::from` is a conversion utility between \"\n\"different types, this means that if you `?` where the error is convertible \"\n\"to the return type, it will convert automatically.\"\nmsgstr \"\"\n\"之前我们将 `?` 解释为 `unwrap` 或 `return Err(err)`。这只是大致正确。实际上，\"\n\"它的含义是 `unwrap` 或 `return Err(From::from(err))`。由于 `From::from` 是不\"\n\"同类型之间的转换工具，这意味着如果你在错误可转换为返回类型的地方使用 `?`，它\"\n\"将自动进行转换。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:22\nmsgid \"\"\n\"Here, we rewrite the previous example using `?`. As a result, the `map_err` \"\n\"will go away when `From::from` is implemented for our error type:\"\nmsgstr \"\"\n\"在这里，我们使用 `?` 重写了前面的例子。当为我们的错误类型实现 `From::from` \"\n\"后，`map_err` 就不再需要了：\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:42\nmsgid \"\"\n\"// The same structure as before but rather than chain all `Results`\\n\"\n\"// and `Options` along, we `?` to get the inner value out immediately.\\n\"\nmsgstr \"\"\n\"// 结构与之前相同，但不再链式处理所有的 `Result` 和 `Option`，\\n\"\n\"// 而是使用 `?` 立即获取内部值。\\n\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:69\nmsgid \"\"\n\"This is actually fairly clean now. Compared with the original `panic`, it is \"\n\"very similar to replacing the `unwrap` calls with `?` except that the return \"\n\"types are `Result`. As a result, they must be destructured at the top level.\"\nmsgstr \"\"\n\"现在代码变得相当简洁了。与原来使用 `panic` 的版本相比，这种方法非常类似于用 \"\n\"`?` 替换 `unwrap` 调用，只是返回类型变成了 `Result`。因此，需要在顶层对结果进\"\n\"行解构。\"\n\n#: src/error/multiple_error_types/reenter_question_mark.md:76\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and [`?\"\n\"`](https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\nmsgstr \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html)和[`?`运\"\n\"算符](https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-\"\n\"question-mark-operator)\"\n\n#: src/error/multiple_error_types/wrap_error.md:3\nmsgid \"An alternative to boxing errors is to wrap them in your own error type.\"\nmsgstr \"除了将错误装箱外，另一种方法是将它们包装在你自定义的错误类型中。\"\n\n#: src/error/multiple_error_types/wrap_error.md:16\nmsgid \"\"\n\"// We will defer to the parse error implementation for their error.\\n\"\n\"    // Supplying extra info requires adding more data to the type.\\n\"\nmsgstr \"\"\n\"// 我们将使用解析错误的实现来处理它们的错误。\\n\"\n\"    // 提供额外信息需要向类型添加更多数据。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:25\nmsgid \"\\\"please use a vector with at least one element\\\"\"\nmsgstr \"\\\"请使用至少包含一个元素的向量\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:26\nmsgid \"\"\n\"// The wrapped error contains additional information and is available\\n\"\n\"            // via the source() method.\\n\"\nmsgstr \"// 包装的错误包含额外信息，可通过 source() 方法获取。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:29\nmsgid \"\\\"the provided string could not be parsed as int\\\"\"\nmsgstr \"\\\"提供的字符串无法解析为整数\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:38\nmsgid \"\"\n\"// The cause is the underlying implementation error type. Is implicitly\\n\"\n\"            // cast to the trait object `&error::Error`. This works because \"\n\"the\\n\"\n\"            // underlying type already implements the `Error` trait.\\n\"\nmsgstr \"\"\n\"// 错误原因是底层实现的错误类型。它被隐式地\\n\"\n\"            // 转换为 trait 对象 `&error::Error`。这是可行的，因为\\n\"\n\"            // 底层类型已经实现了 `Error` trait。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:45\nmsgid \"\"\n\"// Implement the conversion from `ParseIntError` to `DoubleError`.\\n\"\n\"// This will be automatically called by `?` if a `ParseIntError`\\n\"\n\"// needs to be converted into a `DoubleError`.\\n\"\nmsgstr \"\"\n\"// 实现从 `ParseIntError` 到 `DoubleError` 的转换。\\n\"\n\"// 当需要将 `ParseIntError` 转换为 `DoubleError` 时，\\n\"\n\"// `?` 运算符会自动调用这个转换。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:57\nmsgid \"\"\n\"// Here we implicitly use the `ParseIntError` implementation of `From` \"\n\"(which\\n\"\n\"    // we defined above) in order to create a `DoubleError`.\\n\"\nmsgstr \"\"\n\"// 这里我们隐式使用了 `ParseIntError` 的 `From` 实现（我们在上面定义的）\\n\"\n\"    // 来创建一个 `DoubleError`。\\n\"\n\n#: src/error/multiple_error_types/wrap_error.md:70\nmsgid \"\\\"  Caused by: {}\\\"\"\nmsgstr \"\\\"  错误原因：{}\\\"\"\n\n#: src/error/multiple_error_types/wrap_error.md:87\nmsgid \"\"\n\"This adds a bit more boilerplate for handling errors and might not be needed \"\n\"in all applications. There are some libraries that can take care of the \"\n\"boilerplate for you.\"\nmsgstr \"\"\n\"这种方法增加了一些处理错误的样板代码，可能并非所有应用程序都需要。有一些库可\"\n\"以帮你处理这些样板代码。\"\n\n#: src/error/multiple_error_types/wrap_error.md:93\nmsgid \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n\"[`Enums`](../../custom_types/enum.md)\"\nmsgstr \"\"\n\"[`From::from`](https://doc.rust-lang.org/std/convert/trait.From.html) 和[`枚\"\n\"举`](../../custom_types/enum.md)\"\n\n#: src/error/multiple_error_types/wrap_error.md:95\nmsgid \"\"\n\"[`Crates for handling errors`](https://crates.io/keywords/error-handling)\"\nmsgstr \"[处理错误的 crate](https://crates.io/keywords/error-handling)\"\n\n#: src/error/iter_result.md:3\nmsgid \"An `Iter::map` operation might fail, for example:\"\nmsgstr \"`Iter::map` 操作可能会失败，例如：\"\n\n#: src/error/iter_result.md:12 src/error/iter_result.md:29\n#: src/error/iter_result.md:65\nmsgid \"\\\"Results: {:?}\\\"\"\nmsgstr \"\\\"结果：{:?}\\\"\"\n\n#: src/error/iter_result.md:16\nmsgid \"Let's step through strategies for handling this.\"\nmsgstr \"让我们逐步介绍处理这种情况的策略。\"\n\n#: src/error/iter_result.md:18\nmsgid \"Ignore the failed items with `filter_map()`\"\nmsgstr \"使用 `filter_map()` 忽略失败的项\"\n\n#: src/error/iter_result.md:20\nmsgid \"\"\n\"`filter_map` calls a function and filters out the results that are `None`.\"\nmsgstr \"`filter_map` 调用一个函数并过滤掉结果为 `None` 的项。\"\n\n#: src/error/iter_result.md:33\nmsgid \"Collect the failed items with `map_err()` and `filter_map()`\"\nmsgstr \"使用 `map_err()` 和 `filter_map()` 收集失败的项\"\n\n#: src/error/iter_result.md:35\nmsgid \"\"\n\"`map_err` calls a function with the error, so by adding that to the previous \"\n\"`filter_map` solution we can save them off to the side while iterating.\"\nmsgstr \"\"\n\"`map_err` 会对错误调用一个函数，因此将其添加到之前的 `filter_map` 解决方案\"\n\"中，我们可以在迭代时将错误项保存到一旁。\"\n\n#: src/error/iter_result.md:40\nmsgid \"\\\"999\\\"\"\nmsgstr \"\\\"999\\\"\"\n\n#: src/error/iter_result.md:47 src/error/iter_result.md:80\n#: src/error/iter_result.md:97\nmsgid \"\\\"Numbers: {:?}\\\"\"\nmsgstr \"\\\"数字：{:?}\\\"\"\n\n#: src/error/iter_result.md:48 src/error/iter_result.md:81\n#: src/error/iter_result.md:98\nmsgid \"\\\"Errors: {:?}\\\"\"\nmsgstr \"\\\"错误：{:?}\\\"\"\n\n#: src/error/iter_result.md:52\nmsgid \"Fail the entire operation with `collect()`\"\nmsgstr \"使用 `collect()` 使整个操作失败\"\n\n#: src/error/iter_result.md:54\nmsgid \"\"\n\"`Result` implements `FromIterator` so that a vector of results \"\n\"(`Vec<Result<T, E>>`) can be turned into a result with a vector \"\n\"(`Result<Vec<T>, E>`). Once an `Result::Err` is found, the iteration will \"\n\"terminate.\"\nmsgstr \"\"\n\"`Result` 实现了 `FromIterator` trait，因此结果的向量（`Vec<Result<T, E>>`）可\"\n\"以转换为包含向量的结果（`Result<Vec<T>, E>`）。一旦遇到 `Result::Err`，迭代就\"\n\"会终止。\"\n\n#: src/error/iter_result.md:69\nmsgid \"This same technique can be used with `Option`.\"\nmsgstr \"这种技巧同样适用于 `Option`。\"\n\n#: src/error/iter_result.md:71\nmsgid \"Collect all valid values and failures with `partition()`\"\nmsgstr \"使用 `partition()` 收集所有有效值和失败项\"\n\n#: src/error/iter_result.md:85\nmsgid \"\"\n\"When you look at the results, you'll note that everything is still wrapped \"\n\"in `Result`.  A little more boilerplate is needed for this.\"\nmsgstr \"\"\n\"当你查看结果时，你会注意到所有内容仍然被包装在 `Result` 中。这需要一些额外的\"\n\"样板代码。\"\n\n#: src/std.md:3\nmsgid \"\"\n\"The `std` library provides many custom types which expands drastically on \"\n\"the `primitives`. Some of these include:\"\nmsgstr \"`std` 库提供了许多自定义类型，大大扩展了\\\"原生类型\\\"的功能。其中包括：\"\n\n#: src/std.md:6\nmsgid \"growable `String`s like: `\\\"hello world\\\"`\"\nmsgstr \"可增长的 `String`，例如：`\\\"hello world\\\"`\"\n\n#: src/std.md:7\nmsgid \"growable vectors: `[1, 2, 3]`\"\nmsgstr \"可增长的向量（vector）：`[1, 2, 3]`\"\n\n#: src/std.md:8\nmsgid \"optional types: `Option<i32>`\"\nmsgstr \"可选类型：`Option<i32>`\"\n\n#: src/std.md:9\nmsgid \"error handling types: `Result<i32, i32>`\"\nmsgstr \"错误处理类型：`Result<i32, i32>`\"\n\n#: src/std.md:10\nmsgid \"heap allocated pointers: `Box<i32>`\"\nmsgstr \"堆分配的指针：`Box<i32>`\"\n\n#: src/std.md:14 src/std_misc.md:14\nmsgid \"\"\n\"[primitives](primitives.md) and [the std library](https://doc.rust-lang.org/\"\n\"std/)\"\nmsgstr \"[原生类型](primitives.md)和[标准库](https://doc.rust-lang.org/std/)\"\n\n#: src/std/box.md:3\nmsgid \"\"\n\"All values in Rust are stack allocated by default. Values can be _boxed_ \"\n\"(allocated on the heap) by creating a `Box<T>`. A box is a smart pointer to \"\n\"a heap allocated value of type `T`. When a box goes out of scope, its \"\n\"destructor is called, the inner object is destroyed, and the memory on the \"\n\"heap is freed.\"\nmsgstr \"\"\n\"在 Rust 中，所有值默认都是栈分配的。通过创建 `Box<T>`，可以将值**装箱**（在堆\"\n\"上分配）。Box 是指向堆分配的 `T` 类型值的智能指针。当 Box 离开作用域时，会调\"\n\"用其析构函数，内部对象被销毁，堆上的内存被释放。\"\n\n#: src/std/box.md:8\nmsgid \"\"\n\"Boxed values can be dereferenced using the `*` operator; this removes one \"\n\"layer of indirection.\"\nmsgstr \"可以使用 `*` 运算符解引用装箱的值，这会移除一层间接引用。\"\n\n#: src/std/box.md:20\nmsgid \"\"\n\"// A Rectangle can be specified by where its top left and bottom right\\n\"\n\"// corners are in space\\n\"\nmsgstr \"// 可以通过指定左上角和右下角在空间中的位置来定义矩形\\n\"\n\n#: src/std/box.md:34\nmsgid \"// Allocate this point on the heap, and return a pointer to it\\n\"\nmsgstr \"// 在堆上分配这个点，并返回指向它的指针\\n\"\n\n#: src/std/box.md:39\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // Stack allocated variables\\n\"\nmsgstr \"\"\n\"// （所有的类型标注都不是必须的）\\n\"\n\"    // 栈分配的变量\\n\"\n\n#: src/std/box.md:47\nmsgid \"// Heap allocated rectangle\\n\"\nmsgstr \"// 堆分配的矩形\\n\"\n\n#: src/std/box.md:53\nmsgid \"// The output of functions can be boxed\\n\"\nmsgstr \"// 函数的输出可以被装箱\\n\"\n\n#: src/std/box.md:56\nmsgid \"// Double indirection\\n\"\nmsgstr \"// 双重间接引用\\n\"\n\n#: src/std/box.md:59\nmsgid \"\\\"Point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Point 在栈上占用 {} 字节\\\"\"\n\n#: src/std/box.md:61\nmsgid \"\\\"Rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"Rectangle 在栈上占用 {} 字节\\\"\"\n\n#: src/std/box.md:64\nmsgid \"// box size == pointer size\\n\"\nmsgstr \"// box 大小 == 指针大小\\n\"\n\n#: src/std/box.md:65\nmsgid \"\\\"Boxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"装箱的 point 在栈上占用 {} 字节\\\"\"\n\n#: src/std/box.md:67\nmsgid \"\\\"Boxed rectangle occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"装箱的 rectangle 在栈上占用 {} 字节\\\"\"\n\n#: src/std/box.md:69\nmsgid \"\\\"Boxed box occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"装箱的 box 在栈上占用 {} 字节\\\"\"\n\n#: src/std/box.md:72\nmsgid \"// Copy the data contained in `boxed_point` into `unboxed_point`\\n\"\nmsgstr \"// 将 `boxed_point` 中的数据复制到 `unboxed_point`\\n\"\n\n#: src/std/box.md:74\nmsgid \"\\\"Unboxed point occupies {} bytes on the stack\\\"\"\nmsgstr \"\\\"未装箱的 point 在栈上占用 {} 字节\\\"\"\n\n#: src/std/vec.md:3\nmsgid \"\"\n\"Vectors are re-sizable arrays. Like slices, their size is not known at \"\n\"compile time, but they can grow or shrink at any time. A vector is \"\n\"represented using 3 parameters:\"\nmsgstr \"\"\n\"向量（Vector）是可调整大小的数组。与切片（Slice）类似，它们的大小在编译时是未\"\n\"知的，但可以随时增长或缩小。向量由 3 个参数表示：\"\n\n#: src/std/vec.md:7\nmsgid \"pointer to the data\"\nmsgstr \"指向数据的指针\"\n\n#: src/std/vec.md:8\nmsgid \"length\"\nmsgstr \"长度\"\n\n#: src/std/vec.md:9\nmsgid \"capacity\"\nmsgstr \"容量\"\n\n#: src/std/vec.md:11\nmsgid \"\"\n\"The capacity indicates how much memory is reserved for the vector. The \"\n\"vector can grow as long as the length is smaller than the capacity. When \"\n\"this threshold needs to be surpassed, the vector is reallocated with a \"\n\"larger capacity.\"\nmsgstr \"\"\n\"容量表示为向量预留的内存量。只要长度小于容量，向量就可以增长。当需要超过这个\"\n\"阈值时，向量会被重新分配更大的容量。\"\n\n#: src/std/vec.md:17\nmsgid \"// Iterators can be collected into vectors\\n\"\nmsgstr \"// 迭代器可以被收集到向量中\\n\"\n\n#: src/std/vec.md:19\nmsgid \"\\\"Collected (0..10) into: {:?}\\\"\"\nmsgstr \"\\\"将 (0..10) 收集到：{:?}\\\"\"\n\n#: src/std/vec.md:21\nmsgid \"// The `vec!` macro can be used to initialize a vector\\n\"\nmsgstr \"// 可以使用 `vec!` 宏初始化向量\\n\"\n\n#: src/std/vec.md:23\nmsgid \"\\\"Initial vector: {:?}\\\"\"\nmsgstr \"\\\"初始向量：{:?}\\\"\"\n\n#: src/std/vec.md:25\nmsgid \"// Insert new element at the end of the vector\\n\"\nmsgstr \"// 在向量末尾插入新元素\\n\"\n\n#: src/std/vec.md:26\nmsgid \"\\\"Push 4 into the vector\\\"\"\nmsgstr \"\\\"将 4 推入向量\\\"\"\n\n#: src/std/vec.md:28\nmsgid \"\\\"Vector: {:?}\\\"\"\nmsgstr \"\\\"向量：{:?}\\\"\"\n\n#: src/std/vec.md:30\nmsgid \"// Error! Immutable vectors can't grow\\n\"\nmsgstr \"// 错误！不可变向量无法增长\\n\"\n\n#: src/std/vec.md:34\nmsgid \"\"\n\"// The `len` method yields the number of elements currently stored in a \"\n\"vector\\n\"\nmsgstr \"// `len` 方法返回当前存储在向量中的元素数量\\n\"\n\n#: src/std/vec.md:35\nmsgid \"\\\"Vector length: {}\\\"\"\nmsgstr \"\\\"向量长度：{}\\\"\"\n\n#: src/std/vec.md:37\nmsgid \"// Indexing is done using the square brackets (indexing starts at 0)\\n\"\nmsgstr \"// 使用方括号进行索引（索引从 0 开始）\\n\"\n\n#: src/std/vec.md:38\nmsgid \"\\\"Second element: {}\\\"\"\nmsgstr \"\\\"第二个元素：{}\\\"\"\n\n#: src/std/vec.md:40\nmsgid \"// `pop` removes the last element from the vector and returns it\\n\"\nmsgstr \"// `pop` 移除并返回向量的最后一个元素\\n\"\n\n#: src/std/vec.md:41\nmsgid \"\\\"Pop last element: {:?}\\\"\"\nmsgstr \"\\\"弹出最后一个元素：{:?}\\\"\"\n\n#: src/std/vec.md:43\nmsgid \"// Out of bounds indexing yields a panic\\n\"\nmsgstr \"// 越界索引会导致 panic\\n\"\n\n#: src/std/vec.md:44\nmsgid \"\\\"Fourth element: {}\\\"\"\nmsgstr \"\\\"第四个元素：{}\\\"\"\n\n#: src/std/vec.md:47\nmsgid \"// `Vector`s can be easily iterated over\\n\"\nmsgstr \"// 可以轻松地遍历 `Vector`\\n\"\n\n#: src/std/vec.md:48\nmsgid \"\\\"Contents of xs:\\\"\"\nmsgstr \"\\\"xs 的内容：\\\"\"\n\n#: src/std/vec.md:53\nmsgid \"\"\n\"// A `Vector` can also be iterated over while the iteration\\n\"\n\"    // count is enumerated in a separate variable (`i`)\\n\"\nmsgstr \"\"\n\"// 遍历 `Vector` 时，可以同时用一个单独的变量（`i`）\\n\"\n\"    // 来枚举迭代计数\\n\"\n\n#: src/std/vec.md:56\nmsgid \"\\\"In position {} we have value {}\\\"\"\nmsgstr \"\\\"在位置 {} 的值是 {}\\\"\"\n\n#: src/std/vec.md:59\nmsgid \"\"\n\"// Thanks to `iter_mut`, mutable `Vector`s can also be iterated\\n\"\n\"    // over in a way that allows modifying each value\\n\"\nmsgstr \"\"\n\"// 借助 `iter_mut`，可变的 `Vector` 也可以被遍历，\\n\"\n\"    // 并且允许修改每个值\\n\"\n\n#: src/std/vec.md:64\nmsgid \"\\\"Updated vector: {:?}\\\"\"\nmsgstr \"\\\"更新后的向量：{:?}\\\"\"\n\n#: src/std/vec.md:68\nmsgid \"\"\n\"More `Vec` methods can be found under the [std::vec](https://doc.rust-\"\n\"lang.org/std/vec/) module\"\nmsgstr \"\"\n\"更多 `Vec` 方法可以在 [std::vec](https://doc.rust-lang.org/std/vec/) 模块中找\"\n\"到\"\n\n#: src/std/str.md:3\nmsgid \"The two most used string types in Rust are `String` and `&str`.\"\nmsgstr \"Rust 中最常用的两种字符串类型是 `String` 和 `&str`。\"\n\n#: src/std/str.md:5\nmsgid \"\"\n\"A `String` is stored as a vector of bytes (`Vec<u8>`), but guaranteed to \"\n\"always be a valid UTF-8 sequence. `String` is heap allocated, growable and \"\n\"not null terminated.\"\nmsgstr \"\"\n\"`String` 存储为字节向量（`Vec<u8>`），但保证始终是有效的 UTF-8 序列。\"\n\"`String` 在堆上分配，可增长，且不以 null 结尾。\"\n\n#: src/std/str.md:9\nmsgid \"\"\n\"`&str` is a slice (`&[u8]`) that always points to a valid UTF-8 sequence, \"\n\"and can be used to view into a `String`, just like `&[T]` is a view into \"\n\"`Vec<T>`.\"\nmsgstr \"\"\n\"`&str` 是一个切片（`&[u8]`），它始终指向一个有效的 UTF-8 序列，可以用来查看 \"\n\"`String`，就像 `&[T]` 是 `Vec<T>` 的一个视图一样。\"\n\n#: src/std/str.md:14\nmsgid \"\"\n\"// (all the type annotations are superfluous)\\n\"\n\"    // A reference to a string allocated in read only memory\\n\"\nmsgstr \"\"\n\"// （所有的类型注解都不是必须的）\\n\"\n\"    // 一个指向只读内存中分配的字符串的引用\\n\"\n\n#: src/std/str.md:16\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\"\"\nmsgstr \"\\\"敏捷的棕色狐狸跳过懒惰的狗\\\"\"\n\n#: src/std/str.md:17\nmsgid \"\\\"Pangram: {}\\\"\"\nmsgstr \"\\\"全字母句：{}\\\"\"\n\n#: src/std/str.md:19\nmsgid \"// Iterate over words in reverse, no new string is allocated\\n\"\nmsgstr \"// 反向遍历单词，不会分配新的字符串\\n\"\n\n#: src/std/str.md:20\nmsgid \"\\\"Words in reverse\\\"\"\nmsgstr \"\\\"单词逆序\\\"\"\n\n#: src/std/str.md:25\nmsgid \"// Copy chars into a vector, sort and remove duplicates\\n\"\nmsgstr \"// 将字符复制到向量中，排序并去重\\n\"\n\n#: src/std/str.md:30\nmsgid \"// Create an empty and growable `String`\\n\"\nmsgstr \"// 创建一个空的、可增长的 `String`\\n\"\n\n#: src/std/str.md:33\nmsgid \"// Insert a char at the end of string\\n\"\nmsgstr \"// 在字符串末尾插入一个字符\\n\"\n\n#: src/std/str.md:35\nmsgid \"// Insert a string at the end of string\\n\"\nmsgstr \"// 在字符串末尾追加另一个字符串\\n\"\n\n#: src/std/str.md:39\nmsgid \"\"\n\"// The trimmed string is a slice to the original string, hence no new\\n\"\n\"    // allocation is performed\\n\"\nmsgstr \"// 修剪后的字符串是原始字符串的一个切片，因此不会进行新的内存分配\\n\"\n\n#: src/std/str.md:43\nmsgid \"\\\"Used characters: {}\\\"\"\nmsgstr \"\\\"使用的字符：{}\\\"\"\n\n#: src/std/str.md:45\nmsgid \"// Heap allocate a string\\n\"\nmsgstr \"// 在堆上分配一个字符串\\n\"\n\n#: src/std/str.md:46\nmsgid \"\\\"I like dogs\\\"\"\nmsgstr \"\\\"我喜欢狗\\\"\"\n\n#: src/std/str.md:47\nmsgid \"// Allocate new memory and store the modified string there\\n\"\nmsgstr \"// 分配新的内存并在其中存储修改后的字符串\\n\"\n\n#: src/std/str.md:48\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"狗\\\"\"\n\n#: src/std/str.md:48\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"猫\\\"\"\n\n#: src/std/str.md:50\nmsgid \"\\\"Alice says: {}\\\"\"\nmsgstr \"\\\"爱丽丝说：{}\\\"\"\n\n#: src/std/str.md:51\nmsgid \"\\\"Bob says: {}\\\"\"\nmsgstr \"\\\"鲍勃说：{}\\\"\"\n\n#: src/std/str.md:55\nmsgid \"\"\n\"More `str`/`String` methods can be found under the [std::str](https://\"\n\"doc.rust-lang.org/std/str/) and [std::string](https://doc.rust-lang.org/std/\"\n\"string/) modules\"\nmsgstr \"\"\n\"更多 `str` 和 `String` 的方法可以在 [std::str](https://doc.rust-lang.org/std/\"\n\"str/) 和 [std::string](https://doc.rust-lang.org/std/string/) 模块中找到\"\n\n#: src/std/str.md:60\nmsgid \"Literals and escapes\"\nmsgstr \"字面值和转义字符\"\n\n#: src/std/str.md:62\nmsgid \"\"\n\"There are multiple ways to write string literals with special characters in \"\n\"them. All result in a similar `&str` so it's best to use the form that is \"\n\"the most convenient to write. Similarly there are multiple ways to write \"\n\"byte string literals, which all result in `&[u8; N]`.\"\nmsgstr \"\"\n\"有多种方式可以编写包含特殊字符的字符串字面值。所有方式都会产生类似的 `&str`，\"\n\"因此最好使用最方便编写的形式。同样，也有多种方式可以编写字节字符串字面值，它\"\n\"们都会产生 `&[u8; N]` 类型。\"\n\n#: src/std/str.md:67\nmsgid \"\"\n\"Generally special characters are escaped with a backslash character: `\\\\`. \"\n\"This way you can add any character to your string, even unprintable ones and \"\n\"ones that you don't know how to type. If you want a literal backslash, \"\n\"escape it with another one: `\\\\\\\\`\"\nmsgstr \"\"\n\"通常，特殊字符用反斜杠（`\\\\`）进行转义。这样你可以在字符串中添加任何字符，包\"\n\"括不可打印的字符和你不知道如何输入的字符。如果你想要一个字面的反斜杠，用另一\"\n\"个反斜杠转义它：`\\\\\\\\`\"\n\n#: src/std/str.md:72\nmsgid \"\"\n\"String or character literal delimiters occurring within a literal must be \"\n\"escaped: `\\\"\\\\\\\"\\\"`, `'\\\\''`.\"\nmsgstr \"\"\n\"出现在字面值内的字符串或字符字面值分隔符必须被转义：`\\\"\\\\\\\"\\\"` 和 `'\\\\''`。\"\n\n#: src/std/str.md:76\nmsgid \"// You can use escapes to write bytes by their hexadecimal values...\\n\"\nmsgstr \"// 你可以使用转义来通过十六进制值写入字节...\\n\"\n\n#: src/std/str.md:77\nmsgid \"\\\"I'm writing \\\\x52\\\\x75\\\\x73\\\\x74!\\\"\"\nmsgstr \"\\\"我正在写 \\\\x52\\\\x75\\\\x73\\\\x74！\\\"\"\n\n#: src/std/str.md:78\nmsgid \"\\\"What are you doing\\\\x3F (\\\\\\\\x3F means ?) {}\\\"\"\nmsgstr \"\\\"你在做什么\\\\x3F（\\\\\\\\x3F 表示 ?）{}\\\"\"\n\n#: src/std/str.md:80\nmsgid \"// ...or Unicode code points.\\n\"\nmsgstr \"// ...或 Unicode 码点。\\n\"\n\n#: src/std/str.md:81\nmsgid \"\\\"\\\\u{211D}\\\"\"\nmsgstr \"\\\"\\\\u{211D}\\\"\"\n\n#: src/std/str.md:82\nmsgid \"\\\"\\\\\\\"DOUBLE-STRUCK CAPITAL R\\\\\\\"\\\"\"\nmsgstr \"\\\"\\\\\\\"双线大写 R\\\\\\\"\\\"\"\n\n#: src/std/str.md:84\nmsgid \"\\\"Unicode character {} (U+211D) is called {}\\\"\"\nmsgstr \"\\\"Unicode 字符 {} (U+211D) 被称为 {}\\\"\"\n\n#: src/std/str.md:88\nmsgid \"\"\n\"\\\"String literals\\n\"\n\"                        can span multiple lines.\\n\"\n\"                        The linebreak and indentation here ->\\\\\\n\"\n\"                        <- can be escaped too!\\\"\"\nmsgstr \"\"\n\"\\\"字符串字面值\\n\"\n\"                        可以跨越多行。\\n\"\n\"                        这里的换行和缩进 ->\\\\\\n\"\n\"                        <- 也可以被转义！\\\"\"\n\n#: src/std/str.md:96\nmsgid \"\"\n\"Sometimes there are just too many characters that need to be escaped or it's \"\n\"just much more convenient to write a string out as-is. This is where raw \"\n\"string literals come into play.\"\nmsgstr \"\"\n\"有时需要转义的字符太多，或者直接按原样写出字符串会更方便。这时就可以使用原始\"\n\"字符串字面值。\"\n\n#: src/std/str.md:101\nmsgid \"r\\\"Escapes don't work here: \\\\x3F \\\\u{211D}\\\"\"\nmsgstr \"r\\\"转义在这里不起作用：\\\\x3F \\\\u{211D}\\\"\"\n\n#: src/std/str.md:104\nmsgid \"// If you need quotes in a raw string, add a pair of #s\\n\"\nmsgstr \"// 如果你需要在原始字符串中使用引号，可以添加一对 #\\n\"\n\n#: src/std/str.md:105\nmsgid \"r#\\\"And then I said: \\\"There is no escape!\\\"\\\"#\"\nmsgstr \"r#\\\"然后我说：\\\"无处可逃！\\\"\\\"#\"\n\n#: src/std/str.md:108\nmsgid \"\"\n\"// If you need \\\"# in your string, just use more #s in the delimiter.\\n\"\n\"    // You can use up to 255 #s.\\n\"\nmsgstr \"\"\n\"// 如果你需要在字符串中使用 \\\"#，只需在分隔符中使用更多的 #。\\n\"\n\"    // 你最多可以使用 255 个 #。\\n\"\n\n#: src/std/str.md:110\nmsgid \"r###\\\"A string with \\\"# in it. And even \\\"##!\\\"###\"\nmsgstr \"r###\\\"一个包含 \\\"# 的字符串。甚至还有 \\\"##！\\\"###\"\n\n#: src/std/str.md:115\nmsgid \"\"\n\"Want a string that's not UTF-8? (Remember, `str` and `String` must be valid \"\n\"UTF-8). Or maybe you want an array of bytes that's mostly text? Byte strings \"\n\"to the rescue!\"\nmsgstr \"\"\n\"想要一个非 UTF-8 的字符串吗？（请记住，`str` 和 `String` 必须是有效的 \"\n\"UTF-8）。或者你想要一个主要是文本的字节数组？字节字符串来帮忙！\"\n\n#: src/std/str.md:122\nmsgid \"// Note that this is not actually a `&str`\\n\"\nmsgstr \"// 注意，这实际上不是一个 `&str`\\n\"\n\n#: src/std/str.md:123\nmsgid \"b\\\"this is a byte string\\\"\"\nmsgstr \"b\\\"这是一个字节字符串\\\"\"\n\n#: src/std/str.md:125\nmsgid \"\"\n\"// Byte arrays don't have the `Display` trait, so printing them is a bit \"\n\"limited\\n\"\nmsgstr \"// 字节数组没有 `Display` trait，所以打印它们有一些限制\\n\"\n\n#: src/std/str.md:126\nmsgid \"\\\"A byte string: {:?}\\\"\"\nmsgstr \"\\\"一个字节字符串：{:?}\\\"\"\n\n#: src/std/str.md:128\nmsgid \"// Byte strings can have byte escapes...\\n\"\nmsgstr \"// 字节字符串可以包含字节转义...\\n\"\n\n#: src/std/str.md:129\nmsgid \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 as bytes\\\"\"\nmsgstr \"b\\\"\\\\x52\\\\x75\\\\x73\\\\x74 作为字节\\\"\"\n\n#: src/std/str.md:130\nmsgid \"\"\n\"// ...but no unicode escapes\\n\"\n\"    // let escaped = b\\\"\\\\u{211D} is not allowed\\\";\\n\"\nmsgstr \"\"\n\"// ...但不允许 Unicode 转义\\n\"\n\"    // let escaped = b\\\"\\\\u{211D} 是不允许的\\\";\\n\"\n\n#: src/std/str.md:132\nmsgid \"\\\"Some escaped bytes: {:?}\\\"\"\nmsgstr \"\\\"一些转义的字节：{:?}\\\"\"\n\n#: src/std/str.md:135\nmsgid \"// Raw byte strings work just like raw strings\\n\"\nmsgstr \"// 原始字节字符串的工作方式与原始字符串相同\\n\"\n\n#: src/std/str.md:136\nmsgid \"br\\\"\\\\u{211D} is not escaped here\\\"\"\nmsgstr \"br\\\"\\\\u{211D} 在这里不会被转义\\\"\"\n\n#: src/std/str.md:139\nmsgid \"// Converting a byte array to `str` can fail\\n\"\nmsgstr \"// 将字节数组转换为 `str` 可能会失败\\n\"\n\n#: src/std/str.md:141\nmsgid \"\\\"And the same as text: '{}'\\\"\"\nmsgstr \"\\\"作为文本的相同内容：'{}'\\\"\"\n\n#: src/std/str.md:144\nmsgid \"\"\n\"br#\\\"You can also use \\\"fancier\\\" formatting, \\\\\\n\"\n\"                    like with normal raw strings\\\"#\"\nmsgstr \"\"\n\"br#\\\"你也可以使用\\\"更花哨的\\\"格式，\\\\\\n\"\n\"                    就像普通的原始字符串一样\\\"#\"\n\n#: src/std/str.md:147\nmsgid \"// Byte strings don't have to be UTF-8\\n\"\nmsgstr \"// 字节字符串不必是 UTF-8 编码\\n\"\n\n#: src/std/str.md:148\nmsgid \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\nmsgstr \"b\\\"\\\\x82\\\\xe6\\\\x82\\\\xa8\\\\x82\\\\xb1\\\\x82\\\\xbb\\\"\"\n\n#: src/std/str.md:148\nmsgid \"// \\\"ようこそ\\\" in SHIFT-JIS\\n\"\nmsgstr \"// SHIFT-JIS 编码的 \\\"ようこそ\\\"\\n\"\n\n#: src/std/str.md:150\nmsgid \"// But then they can't always be converted to `str`\\n\"\nmsgstr \"// 但它们并不总是能被转换为 `str`\\n\"\n\n#: src/std/str.md:152\nmsgid \"\\\"Conversion successful: '{}'\\\"\"\nmsgstr \"\\\"转换成功：'{}'\\\"\"\n\n#: src/std/str.md:153\nmsgid \"\\\"Conversion failed: {:?}\\\"\"\nmsgstr \"\\\"转换失败：{:?}\\\"\"\n\n#: src/std/str.md:158\nmsgid \"\"\n\"For conversions between character encodings check out the [encoding](https://\"\n\"crates.io/crates/encoding) crate.\"\nmsgstr \"\"\n\"对于字符编码之间的转换，请查看 [encoding](https://crates.io/crates/encoding) \"\n\"crate。\"\n\n#: src/std/str.md:160\nmsgid \"\"\n\"A more detailed listing of the ways to write string literals and escape \"\n\"characters is given in the ['Tokens' chapter](https://doc.rust-lang.org/\"\n\"reference/tokens.html) of the Rust Reference.\"\nmsgstr \"\"\n\"关于编写字符串字面值和转义字符的更详细说明，请参阅 Rust 参考手册的[「标记」章\"\n\"节](https://doc.rust-lang.org/reference/tokens.html)。\"\n\n#: src/std/option.md:3\nmsgid \"\"\n\"Sometimes it's desirable to catch the failure of some parts of a program \"\n\"instead of calling `panic!`; this can be accomplished using the `Option` \"\n\"enum.\"\nmsgstr \"\"\n\"有时我们希望捕获程序某些部分的失败，而不是调用 `panic!`。这可以通过使用 \"\n\"`Option` 枚举来实现。\"\n\n#: src/std/option.md:6\nmsgid \"The `Option<T>` enum has two variants:\"\nmsgstr \"`Option<T>` 枚举有两个变体：\"\n\n#: src/std/option.md:8\nmsgid \"`None`, to indicate failure or lack of value, and\"\nmsgstr \"`None`：表示失败或缺少值，以及\"\n\n#: src/std/option.md:9\nmsgid \"`Some(value)`, a tuple struct that wraps a `value` with type `T`.\"\nmsgstr \"`Some(value)`：一个元组结构体，包装了类型为 `T` 的 `value`。\"\n\n#: src/std/option.md:12\nmsgid \"// An integer division that doesn't `panic!`\\n\"\nmsgstr \"// 一个不会触发 `panic!` 的整数除法\\n\"\n\n#: src/std/option.md:15\nmsgid \"// Failure is represented as the `None` variant\\n\"\nmsgstr \"// 失败用 `None` 变体表示\\n\"\n\n#: src/std/option.md:18\nmsgid \"// Result is wrapped in a `Some` variant\\n\"\nmsgstr \"// 结果被包装在 `Some` 变体中\\n\"\n\n#: src/std/option.md:22\nmsgid \"// This function handles a division that may not succeed\\n\"\nmsgstr \"// 这个函数处理可能不成功的除法运算\\n\"\n\n#: src/std/option.md:25\nmsgid \"// `Option` values can be pattern matched, just like other enums\\n\"\nmsgstr \"// `Option` 值可以进行模式匹配，就像其他枚举一样\\n\"\n\n#: src/std/option.md:27\nmsgid \"\\\"{} / {} failed!\\\"\"\nmsgstr \"\\\"{} / {} 失败！\\\"\"\n\n#: src/std/option.md:29\nmsgid \"\\\"{} / {} = {}\\\"\"\nmsgstr \"\\\"{} / {} = {}\\\"\"\n\n#: src/std/option.md:38\nmsgid \"// Binding `None` to a variable needs to be type annotated\\n\"\nmsgstr \"// 将 `None` 绑定到变量时需要进行类型注解\\n\"\n\n#: src/std/option.md:44\nmsgid \"// Unwrapping a `Some` variant will extract the value wrapped.\\n\"\nmsgstr \"// 解包 `Some` 变体将提取其中包装的值。\\n\"\n\n#: src/std/option.md:45 src/std/option.md:48\nmsgid \"\\\"{:?} unwraps to {:?}\\\"\"\nmsgstr \"\\\"{:?} 解包后得到 {:?}\\\"\"\n\n#: src/std/option.md:47\nmsgid \"// Unwrapping a `None` variant will `panic!`\\n\"\nmsgstr \"// 解包 `None` 变体将触发 `panic!`\\n\"\n\n#: src/std/result.md:3\nmsgid \"\"\n\"We've seen that the `Option` enum can be used as a return value from \"\n\"functions that may fail, where `None` can be returned to indicate failure. \"\n\"However, sometimes it is important to express _why_ an operation failed. To \"\n\"do this we have the `Result` enum.\"\nmsgstr \"\"\n\"我们已经看到 `Option` 枚举可以用作可能失败的函数的返回值，其中 `None` 用于表\"\n\"示失败。\\n\"\n\"然而，有时表达操作失败的**原因**很重要。为此，我们有 `Result` 枚举。\"\n\n#: src/std/result.md:8\nmsgid \"The `Result<T, E>` enum has two variants:\"\nmsgstr \"`Result<T, E>` 枚举有两个变体：\"\n\n#: src/std/result.md:10\nmsgid \"\"\n\"`Ok(value)` which indicates that the operation succeeded, and wraps the \"\n\"`value` returned by the operation. (`value` has type `T`)\"\nmsgstr \"\"\n\"`Ok(value)`：表示操作成功，并包装了操作返回的 `value`。（`value` 的类型为 \"\n\"`T`）\"\n\n#: src/std/result.md:12\nmsgid \"\"\n\"`Err(why)`, which indicates that the operation failed, and wraps `why`, \"\n\"which (hopefully) explains the cause of the failure. (`why` has type `E`)\"\nmsgstr \"\"\n\"`Err(why)`：表示操作失败，并包装了 `why`，它（希望）解释了失败的原因。\"\n\"（`why` 的类型为 `E`）\"\n\n#: src/std/result.md:17\nmsgid \"// Mathematical \\\"errors\\\" we want to catch\\n\"\nmsgstr \"// 我们想要捕获的数学\\\"错误\\\"\\n\"\n\n#: src/std/result.md:29\nmsgid \"\"\n\"// This operation would `fail`, instead let's return the reason of\\n\"\n\"            // the failure wrapped in `Err`\\n\"\nmsgstr \"// 这个操作会\\\"失败\\\"，所以我们返回包装在 `Err` 中的失败原因\\n\"\n\n#: src/std/result.md:33\nmsgid \"// This operation is valid, return the result wrapped in `Ok`\\n\"\nmsgstr \"// 这个操作是有效的，返回包装在 `Ok` 中的结果\\n\"\n\n#: src/std/result.md:54\nmsgid \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\nmsgstr \"// `op(x, y)` === `sqrt(ln(x / y))`\\n\"\n\n#: src/std/result.md:57\nmsgid \"// This is a three level match pyramid!\\n\"\nmsgstr \"// 这是一个三层的匹配金字塔！\\n\"\n\n#: src/std/result.md:71\nmsgid \"// Will this fail?\\n\"\nmsgstr \"// 这会失败吗？\\n\"\n\n#: src/std/result/question_mark.md:3\nmsgid \"\"\n\"Chaining results using match can get pretty untidy; luckily, the `?` \"\n\"operator can be used to make things pretty again. `?` is used at the end of \"\n\"an expression returning a `Result`, and is equivalent to a match expression, \"\n\"where the `Err(err)` branch expands to an early `return \"\n\"Err(From::from(err))`, and the `Ok(ok)` branch expands to an `ok` expression.\"\nmsgstr \"\"\n\"使用 match 链式处理结果可能会变得相当混乱；幸运的是，我们可以使用 `?` 运算符\"\n\"来让代码变得整洁。`?` 运算符用在返回 `Result` 的表达式末尾，等效于一个 match \"\n\"表达式。在这个表达式中，`Err(err)` 分支会展开为提前返回的 `return \"\n\"Err(From::from(err))`，而 `Ok(ok)` 分支则展开为 `ok` 表达式。\"\n\n#: src/std/result/question_mark.md:44\nmsgid \"// Intermediate function\\n\"\nmsgstr \"// 中间函数\\n\"\n\n#: src/std/result/question_mark.md:46\nmsgid \"// if `div` \\\"fails\\\", then `DivisionByZero` will be `return`ed\\n\"\nmsgstr \"// 如果 `div` \\\"失败\\\"，则会 `return` `DivisionByZero`\\n\"\n\n#: src/std/result/question_mark.md:49\nmsgid \"// if `ln` \\\"fails\\\", then `NonPositiveLogarithm` will be `return`ed\\n\"\nmsgstr \"// 如果 `ln` \\\"失败\\\"，则会 `return` `NonPositiveLogarithm`\\n\"\n\n#: src/std/result/question_mark.md:59\nmsgid \"\\\"logarithm of non-positive number\\\"\"\nmsgstr \"\\\"非正数的对数\\\"\"\n\n#: src/std/result/question_mark.md:61 src/std/panic.md:15\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"除以零\\\"\"\n\n#: src/std/result/question_mark.md:63\nmsgid \"\\\"square root of negative number\\\"\"\nmsgstr \"\\\"负数的平方根\\\"\"\n\n#: src/std/result/question_mark.md:75\nmsgid \"\"\n\"Be sure to check the [documentation](https://doc.rust-lang.org/std/result/\"\n\"index.html), as there are many methods to map/compose `Result`.\"\nmsgstr \"\"\n\"请务必查阅 [文档](https://doc.rust-lang.org/std/result/index.html)，其中包含\"\n\"了许多用于映射和组合 `Result` 的方法。\"\n\n#: src/std/panic.md:3\nmsgid \"\"\n\"The `panic!` macro can be used to generate a panic and start unwinding its \"\n\"stack. While unwinding, the runtime will take care of freeing all the \"\n\"resources _owned_ by the thread by calling the destructor of all its objects.\"\nmsgstr \"\"\n\"`panic!` 宏可用于生成一个 panic 并开始展开其栈。在展开过程中，运行时会通过调\"\n\"用该线程所有对象的析构函数来释放线程**拥有**的所有资源。\"\n\n#: src/std/panic.md:7\nmsgid \"\"\n\"Since we are dealing with programs with only one thread, `panic!` will cause \"\n\"the program to report the panic message and exit.\"\nmsgstr \"\"\n\"由于我们处理的是只有一个线程的程序，`panic!` 会导致程序报告 panic 消息并退\"\n\"出。\"\n\n#: src/std/panic.md:11\nmsgid \"// Re-implementation of integer division (/)\\n\"\nmsgstr \"// 重新实现整数除法（/）\\n\"\n\n#: src/std/panic.md:14\nmsgid \"// Division by zero triggers a panic\\n\"\nmsgstr \"// 除以零会触发 panic\\n\"\n\n#: src/std/panic.md:20\nmsgid \"// The `main` task\\n\"\nmsgstr \"// `main` 任务\\n\"\n\n#: src/std/panic.md:23\nmsgid \"// Heap allocated integer\\n\"\nmsgstr \"// 堆分配的整数\\n\"\n\n#: src/std/panic.md:26\nmsgid \"// This operation will trigger a task failure\\n\"\nmsgstr \"// 这个操作将触发任务失败\\n\"\n\n#: src/std/panic.md:29\nmsgid \"\\\"This point won't be reached!\\\"\"\nmsgstr \"\\\"这个点不会被执行到！\\\"\"\n\n#: src/std/panic.md:31\nmsgid \"// `_x` should get destroyed at this point\\n\"\nmsgstr \"// `_x` 应该在此处被销毁\\n\"\n\n#: src/std/panic.md:35\nmsgid \"Let's check that `panic!` doesn't leak memory.\"\nmsgstr \"让我们验证 `panic!` 不会导致内存泄漏。\"\n\n#: src/std/hash.md:3\nmsgid \"\"\n\"Where vectors store values by an integer index, `HashMap`s store values by \"\n\"key. `HashMap` keys can be booleans, integers, strings, or any other type \"\n\"that implements the `Eq` and `Hash` traits. More on this in the next section.\"\nmsgstr \"\"\n\"向量（Vector）通过整数索引存储值，而 `HashMap` 则通过键存储值。`HashMap` 的键\"\n\"可以是布尔值、整数、字符串，或任何其他实现了 `Eq` 和 `Hash` trait 的类型。下\"\n\"一节将详细介绍这一点。\"\n\n#: src/std/hash.md:8\nmsgid \"\"\n\"Like vectors, `HashMap`s are growable, but HashMaps can also shrink \"\n\"themselves when they have excess space. You can create a HashMap with a \"\n\"certain starting capacity using `HashMap::with_capacity(uint)`, or use \"\n\"`HashMap::new()` to get a HashMap with a default initial capacity \"\n\"(recommended).\"\nmsgstr \"\"\n\"与向量类似，`HashMap` 也可以增长，但当有多余空间时，HashMap 还能自动收缩。你\"\n\"可以使用 `HashMap::with_capacity(uint)` 创建一个具有指定初始容量的 HashMap，\"\n\"或使用 `HashMap::new()` 来获得一个具有默认初始容量的 HashMap（推荐）。\"\n\n#: src/std/hash.md:19 src/std/hash.md:30\nmsgid \"\\\"798-1364\\\"\"\nmsgstr \"\\\"798-1364\\\"\"\n\n#: src/std/hash.md:19\nmsgid \"\"\n\"\\\"We're sorry, the call cannot be completed as dialed.\\n\"\n\"            Please hang up and try again.\\\"\"\nmsgstr \"\"\n\"\\\"很抱歉，无法接通您拨打的电话。\\n\"\n\"            请挂机后重试。\\\"\"\n\n#: src/std/hash.md:21 src/std/hash.md:31\nmsgid \"\\\"645-7689\\\"\"\nmsgstr \"\\\"645-7689\\\"\"\n\n#: src/std/hash.md:21\nmsgid \"\"\n\"\\\"Hello, this is Mr. Awesome's Pizza. My name is Fred.\\n\"\n\"            What can I get for you today?\\\"\"\nmsgstr \"\"\n\"\\\"您好，这里是 Awesome 先生的披萨店。我是 Fred。\\n\"\n\"            请问今天您想点些什么？\\\"\"\n\n#: src/std/hash.md:23\nmsgid \"\\\"Hi! Who is this again?\\\"\"\nmsgstr \"\\\"嗨！请问是哪位？\\\"\"\n\n#: src/std/hash.md:30 src/std/hash.md:36 src/std/hash.md:43\nmsgid \"\\\"Daniel\\\"\"\nmsgstr \"\\\"Daniel\\\"\"\n\n#: src/std/hash.md:31 src/std/hash.md:45 src/std/hash.md:50\nmsgid \"\\\"Ashley\\\"\"\nmsgstr \"\\\"Ashley\\\"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"Katie\\\"\"\nmsgstr \"\\\"Katie\\\"\"\n\n#: src/std/hash.md:32\nmsgid \"\\\"435-8291\\\"\"\nmsgstr \"\\\"435-8291\\\"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"Robert\\\"\"\nmsgstr \"\\\"Robert\\\"\"\n\n#: src/std/hash.md:33\nmsgid \"\\\"956-1745\\\"\"\nmsgstr \"\\\"956-1745\\\"\"\n\n#: src/std/hash.md:35\nmsgid \"// Takes a reference and returns Option<&V>\\n\"\nmsgstr \"// 接受一个引用并返回 Option<&V>\\n\"\n\n#: src/std/hash.md:37\nmsgid \"\\\"Calling Daniel: {}\\\"\"\nmsgstr \"\\\"正在呼叫 Daniel：{}\\\"\"\n\n#: src/std/hash.md:38\nmsgid \"\\\"Don't have Daniel's number.\\\"\"\nmsgstr \"\\\"没有 Daniel 的电话号码。\\\"\"\n\n#: src/std/hash.md:41\nmsgid \"\"\n\"// `HashMap::insert()` returns `None`\\n\"\n\"    // if the inserted value is new, `Some(value)` otherwise\\n\"\nmsgstr \"\"\n\"// 如果插入的值是新的，`HashMap::insert()` 返回 `None`\\n\"\n\"    // 否则返回 `Some(value)`\\n\"\n\n#: src/std/hash.md:43\nmsgid \"\\\"164-6743\\\"\"\nmsgstr \"\\\"164-6743\\\"\"\n\n#: src/std/hash.md:46\nmsgid \"\\\"Calling Ashley: {}\\\"\"\nmsgstr \"\\\"正在呼叫 Ashley：{}\\\"\"\n\n#: src/std/hash.md:47\nmsgid \"\\\"Don't have Ashley's number.\\\"\"\nmsgstr \"\\\"没有 Ashley 的电话号码。\\\"\"\n\n#: src/std/hash.md:52\nmsgid \"\"\n\"// `HashMap::iter()` returns an iterator that yields\\n\"\n\"    // (&'a key, &'a value) pairs in arbitrary order.\\n\"\nmsgstr \"\"\n\"// `HashMap::iter()` 返回一个迭代器，该迭代器以任意顺序生成\\n\"\n\"    // (&'a key, &'a value) 键值对。\\n\"\n\n#: src/std/hash.md:55\nmsgid \"\\\"Calling {}: {}\\\"\"\nmsgstr \"\\\"正在呼叫{}：{}\\\"\"\n\n#: src/std/hash.md:60\nmsgid \"\"\n\"For more information on how hashing and hash maps (sometimes called hash \"\n\"tables) work, have a look at [Hash Table Wikipedia](https://en.wikipedia.org/\"\n\"wiki/Hash_table)\"\nmsgstr \"\"\n\"要了解更多关于哈希和哈希映射（有时称为哈希表）的工作原理，请参阅[哈希表的维基\"\n\"百科页面](https://en.wikipedia.org/wiki/Hash_table)\"\n\n#: src/std/hash/alt_key_types.md:3\nmsgid \"\"\n\"Any type that implements the `Eq` and `Hash` traits can be a key in \"\n\"`HashMap`. This includes:\"\nmsgstr \"\"\n\"任何实现了 `Eq` 和 `Hash` trait 的类型都可以作为 `HashMap` 的键。这包括：\"\n\n#: src/std/hash/alt_key_types.md:6\nmsgid \"`bool` (though not very useful since there are only two possible keys)\"\nmsgstr \"`bool`（虽然用处不大，因为只有两个可能的键值）\"\n\n#: src/std/hash/alt_key_types.md:7\nmsgid \"`int`, `uint`, and all variations thereof\"\nmsgstr \"`int`、`uint` 及其所有变体\"\n\n#: src/std/hash/alt_key_types.md:8\nmsgid \"\"\n\"`String` and `&str` (protip: you can have a `HashMap` keyed by `String` and \"\n\"call `.get()` with an `&str`)\"\nmsgstr \"\"\n\"`String` 和 `&str`（专业提示：你可以使用 `String` 作为 `HashMap` 的键，并用 \"\n\"`&str` 调用 `.get()` 方法）\"\n\n#: src/std/hash/alt_key_types.md:11\nmsgid \"\"\n\"Note that `f32` and `f64` do _not_ implement `Hash`, likely because \"\n\"[floating-point precision errors](https://en.wikipedia.org/wiki/\"\n\"Floating_point#Accuracy_problems) would make using them as hashmap keys \"\n\"horribly error-prone.\"\nmsgstr \"\"\n\"注意，`f32` 和 `f64` **并未**实现 `Hash` trait，这很可能是因为[浮点数精度误\"\n\"差](https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems)会导致将它\"\n\"们用作哈希映射的键时极易出错。\"\n\n#: src/std/hash/alt_key_types.md:15\nmsgid \"\"\n\"All collection classes implement `Eq` and `Hash` if their contained type \"\n\"also respectively implements `Eq` and `Hash`. For example, `Vec<T>` will \"\n\"implement `Hash` if `T` implements `Hash`.\"\nmsgstr \"\"\n\"如果集合类中包含的类型分别实现了 `Eq` 和 `Hash`，那么这些集合类也会实现 `Eq` \"\n\"和 `Hash`。例如，如果 `T` 实现了 `Hash`，那么 `Vec<T>` 也会实现 `Hash`。\"\n\n#: src/std/hash/alt_key_types.md:19\nmsgid \"\"\n\"You can easily implement `Eq` and `Hash` for a custom type with just one \"\n\"line: `#[derive(PartialEq, Eq, Hash)]`\"\nmsgstr \"\"\n\"你可以通过一行代码轻松地为自定义类型实现 `Eq` 和 `Hash`：\"\n\"`#[derive(PartialEq, Eq, Hash)]`\"\n\n#: src/std/hash/alt_key_types.md:22\nmsgid \"\"\n\"The compiler will do the rest. If you want more control over the details, \"\n\"you can implement `Eq` and/or `Hash` yourself. This guide will not cover the \"\n\"specifics of implementing `Hash`.\"\nmsgstr \"\"\n\"编译器会完成剩余的工作。如果你想对细节有更多控制，可以自己实现 `Eq` 和/或 \"\n\"`Hash`。本指南不会涉及实现 `Hash` 的具体细节。\"\n\n#: src/std/hash/alt_key_types.md:26\nmsgid \"\"\n\"To play around with using a `struct` in `HashMap`, let's try making a very \"\n\"simple user logon system:\"\nmsgstr \"\"\n\"为了尝试在 `HashMap` 中使用 `struct`，让我们来创建一个非常简单的用户登录系\"\n\"统：\"\n\n#: src/std/hash/alt_key_types.md:31\nmsgid \"// Eq requires that you derive PartialEq on the type.\\n\"\nmsgstr \"// Eq 要求你在类型上派生 PartialEq。\\n\"\n\n#: src/std/hash/alt_key_types.md:48\nmsgid \"\\\"Username: {}\\\"\"\nmsgstr \"\\\"用户名：{}\\\"\"\n\n#: src/std/hash/alt_key_types.md:49\nmsgid \"\\\"Password: {}\\\"\"\nmsgstr \"\\\"密码：{}\\\"\"\n\n#: src/std/hash/alt_key_types.md:50\nmsgid \"\\\"Attempting logon...\\\"\"\nmsgstr \"\\\"正在尝试登录...\\\"\"\n\n#: src/std/hash/alt_key_types.md:59\nmsgid \"\\\"Successful logon!\\\"\"\nmsgstr \"\\\"登录成功！\\\"\"\n\n#: src/std/hash/alt_key_types.md:60\nmsgid \"\\\"Name: {}\\\"\"\nmsgstr \"\\\"姓名：{}\\\"\"\n\n#: src/std/hash/alt_key_types.md:61\nmsgid \"\\\"Email: {}\\\"\"\nmsgstr \"\\\"电子邮箱：{}\\\"\"\n\n#: src/std/hash/alt_key_types.md:63\nmsgid \"\\\"Login failed!\\\"\"\nmsgstr \"\\\"登录失败！\\\"\"\n\n#: src/std/hash/alt_key_types.md:71 src/std/hash/alt_key_types.md:82\n#: src/std/hash/alt_key_types.md:84\nmsgid \"\\\"j.everyman\\\"\"\nmsgstr \"\\\"j.everyman\\\"\"\n\n#: src/std/hash/alt_key_types.md:72 src/std/hash/alt_key_types.md:84\nmsgid \"\\\"password123\\\"\"\nmsgstr \"\\\"password123\\\"\"\n\n#: src/std/hash/alt_key_types.md:76\nmsgid \"\\\"John Everyman\\\"\"\nmsgstr \"\\\"John Everyman\\\"\"\n\n#: src/std/hash/alt_key_types.md:77\nmsgid \"\\\"j.everyman@email.com\\\"\"\nmsgstr \"\\\"j.everyman@email.com\\\"\"\n\n#: src/std/hash/alt_key_types.md:82\nmsgid \"\\\"psasword123\\\"\"\nmsgstr \"\\\"psasword123\\\"\"\n\n#: src/std/hash/hashset.md:3\nmsgid \"\"\n\"Consider a `HashSet` as a `HashMap` where we just care about the keys \"\n\"( `HashSet<T>` is, in actuality, just a wrapper around `HashMap<T, ()>`).\"\nmsgstr \"\"\n\"可以将 `HashSet` 视为一个只关心键的 `HashMap`（实际上，`HashSet<T>` 只是 \"\n\"`HashMap<T, ()>` 的封装）。\"\n\n#: src/std/hash/hashset.md:6\nmsgid \"\"\n\"\\\"What's the point of that?\\\" you ask. \\\"I could just store the keys in a \"\n\"`Vec`.\\\"\"\nmsgstr \"你可能会问：\\\"这有什么意义？我可以直接把键存储在 `Vec` 中啊。\\\"\"\n\n#: src/std/hash/hashset.md:8\nmsgid \"\"\n\"A `HashSet`'s unique feature is that it is guaranteed to not have duplicate \"\n\"elements. That's the contract that any set collection fulfills. `HashSet` is \"\n\"just one implementation. (see also: [`BTreeSet`](https://doc.rust-lang.org/\"\n\"std/collections/struct.BTreeSet.html))\"\nmsgstr \"\"\n\"`HashSet` 的独特之处在于它保证不会有重复元素。这是所有集合类型都应满足的约\"\n\"定。`HashSet` 只是其中一种实现。（另请参阅：[`BTreeSet`](https://doc.rust-\"\n\"lang.org/std/collections/struct.BTreeSet.html)）\"\n\n#: src/std/hash/hashset.md:13\nmsgid \"\"\n\"If you insert a value that is already present in the `HashSet`, (i.e. the \"\n\"new value is equal to the existing and they both have the same hash), then \"\n\"the new value will replace the old.\"\nmsgstr \"\"\n\"如果你插入一个已存在于 `HashSet` 中的值（即新值等于现有值，且它们的哈希值相\"\n\"同），那么新值将替换旧值。\"\n\n#: src/std/hash/hashset.md:17\nmsgid \"\"\n\"This is great for when you never want more than one of something, or when \"\n\"you want to know if you've already got something.\"\nmsgstr \"\"\n\"当你不希望某个元素出现多次，或者想知道是否已经拥有某个元素时，这非常有用。\"\n\n#: src/std/hash/hashset.md:20\nmsgid \"But sets can do more than that.\"\nmsgstr \"但是集合的功能不仅限于此。\"\n\n#: src/std/hash/hashset.md:22\nmsgid \"\"\n\"Sets have 4 primary operations (all of the following calls return an \"\n\"iterator):\"\nmsgstr \"集合有 4 种主要操作（以下所有调用都返回一个迭代器）：\"\n\n#: src/std/hash/hashset.md:24\nmsgid \"`union`: get all the unique elements in both sets.\"\nmsgstr \"并集（`union`）：获取两个集合中的所有唯一元素。\"\n\n#: src/std/hash/hashset.md:26\nmsgid \"\"\n\"`difference`: get all the elements that are in the first set but not the \"\n\"second.\"\nmsgstr \"\"\n\"差集（`difference`）：获取存在于第一个集合但不在第二个集合中的所有元素。\"\n\n#: src/std/hash/hashset.md:28\nmsgid \"`intersection`: get all the elements that are only in _both_ sets.\"\nmsgstr \"交集（`intersection`）：获取**同时**存在于两个集合中的所有元素。\"\n\n#: src/std/hash/hashset.md:30\nmsgid \"\"\n\"`symmetric_difference`: get all the elements that are in one set or the \"\n\"other, but _not_ both.\"\nmsgstr \"\"\n\"对称差（`symmetric_difference`）：获取存在于其中一个集合中，但**不**同时存在\"\n\"于两个集合中的所有元素。\"\n\n#: src/std/hash/hashset.md:33\nmsgid \"Try all of these in the following example:\"\nmsgstr \"在下面的例子中尝试这些操作：\"\n\n#: src/std/hash/hashset.md:45\nmsgid \"\"\n\"// `HashSet::insert()` returns false if\\n\"\n\"    // there was a value already present.\\n\"\nmsgstr \"// 如果集合中已存在该值，`HashSet::insert()` 将返回 false。\\n\"\n\n#: src/std/hash/hashset.md:47\nmsgid \"\\\"Value 4 is already in set B!\\\"\"\nmsgstr \"\\\"值 4 已存在于集合 B 中！\\\"\"\n\n#: src/std/hash/hashset.md:52\nmsgid \"\"\n\"// If a collection's element type implements `Debug`,\\n\"\n\"    // then the collection implements `Debug`.\\n\"\n\"    // It usually prints its elements in the format `[elem1, elem2, ...]`\\n\"\nmsgstr \"\"\n\"// 如果集合的元素类型实现了 `Debug` 特征，\\n\"\n\"    // 那么该集合也会实现 `Debug` 特征。\\n\"\n\"    // 通常会以 `[elem1, elem2, ...]` 的格式打印其元素\\n\"\n\n#: src/std/hash/hashset.md:55\nmsgid \"\\\"A: {:?}\\\"\"\nmsgstr \"\\\"A：{:?}\\\"\"\n\n#: src/std/hash/hashset.md:56\nmsgid \"\\\"B: {:?}\\\"\"\nmsgstr \"\\\"B：{:?}\\\"\"\n\n#: src/std/hash/hashset.md:58\nmsgid \"// Print [1, 2, 3, 4, 5] in arbitrary order\\n\"\nmsgstr \"// 以任意顺序打印 [1, 2, 3, 4, 5]\\n\"\n\n#: src/std/hash/hashset.md:59\nmsgid \"\\\"Union: {:?}\\\"\"\nmsgstr \"\\\"并集：{:?}\\\"\"\n\n#: src/std/hash/hashset.md:61\nmsgid \"// This should print [1]\\n\"\nmsgstr \"// 这里应该打印 [1]\\n\"\n\n#: src/std/hash/hashset.md:62\nmsgid \"\\\"Difference: {:?}\\\"\"\nmsgstr \"\\\"差集：{:?}\\\"\"\n\n#: src/std/hash/hashset.md:64\nmsgid \"// Print [2, 3, 4] in arbitrary order.\\n\"\nmsgstr \"// 以任意顺序打印 [2, 3, 4]\\n\"\n\n#: src/std/hash/hashset.md:65\nmsgid \"\\\"Intersection: {:?}\\\"\"\nmsgstr \"\\\"交集：{:?}\\\"\"\n\n#: src/std/hash/hashset.md:67\nmsgid \"// Print [1, 5]\\n\"\nmsgstr \"// 打印 [1, 5]\\n\"\n\n#: src/std/hash/hashset.md:68\nmsgid \"\\\"Symmetric Difference: {:?}\\\"\"\nmsgstr \"\\\"对称差：{:?}\\\"\"\n\n#: src/std/hash/hashset.md:73\nmsgid \"\"\n\"(Examples are adapted from the [documentation.](https://doc.rust-lang.org/\"\n\"std/collections/struct.HashSet.html#method.difference))\"\nmsgstr \"\"\n\"（示例改编自[官方文档](https://doc.rust-lang.org/std/collections/\"\n\"struct.HashSet.html#method.difference)）\"\n\n#: src/std/rc.md:3\nmsgid \"\"\n\"When multiple ownership is needed, `Rc`(Reference Counting) can be used. \"\n\"`Rc` keeps track of the number of the references which means the number of \"\n\"owners of the value wrapped inside an `Rc`.\"\nmsgstr \"\"\n\"当需要多重所有权时，可以使用 `Rc`（引用计数，Reference Counting）。`Rc` 会跟\"\n\"踪引用的数量，即包裹在 `Rc` 内部的值的所有者数量。\"\n\n#: src/std/rc.md:7\nmsgid \"\"\n\"Reference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and \"\n\"decreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an \"\n\"`Rc`'s reference count becomes zero (which means there are no remaining \"\n\"owners), both the `Rc` and the value are all dropped.\"\nmsgstr \"\"\n\"每当克隆一个 `Rc` 时，其引用计数就会增加 1；每当一个克隆的 `Rc` 离开作用域\"\n\"时，引用计数就会减少 1。当 `Rc` 的引用计数变为零（意味着没有剩余的所有者）\"\n\"时，`Rc` 及其包含的值都会被丢弃。\"\n\n#: src/std/rc.md:12\nmsgid \"\"\n\"Cloning an `Rc` never performs a deep copy. Cloning creates just another \"\n\"pointer to the wrapped value, and increments the count.\"\nmsgstr \"\"\n\"克隆 `Rc` 从不执行深拷贝。克隆只是创建另一个指向被包裹值的指针，并增加计数。\"\n\n#: src/std/rc.md:19\nmsgid \"\\\"Rc examples\\\"\"\nmsgstr \"\\\"Rc 示例\\\"\"\n\n#: src/std/rc.md:21\nmsgid \"\\\"--- rc_a is created ---\\\"\"\nmsgstr \"\\\"--- rc_a 已创建 ---\\\"\"\n\n#: src/std/rc.md:24 src/std/rc.md:31 src/std/rc.md:43\nmsgid \"\\\"Reference Count of rc_a: {}\\\"\"\nmsgstr \"\\\"rc_a 的引用计数：{}\\\"\"\n\n#: src/std/rc.md:27\nmsgid \"\\\"--- rc_a is cloned to rc_b ---\\\"\"\nmsgstr \"\\\"--- rc_a 被克隆为 rc_b ---\\\"\"\n\n#: src/std/rc.md:30\nmsgid \"\\\"Reference Count of rc_b: {}\\\"\"\nmsgstr \"\\\"rc_b 的引用计数：{}\\\"\"\n\n#: src/std/rc.md:33\nmsgid \"// Two `Rc`s are equal if their inner values are equal\\n\"\nmsgstr \"// 两个 `Rc` 如果内部值相等，则它们相等\\n\"\n\n#: src/std/rc.md:34\nmsgid \"\\\"rc_a and rc_b are equal: {}\\\"\"\nmsgstr \"\\\"rc_a 和 rc_b 是否相等：{}\\\"\"\n\n#: src/std/rc.md:36\nmsgid \"// We can use methods of a value directly\\n\"\nmsgstr \"// 我们可以直接使用值的方法\\n\"\n\n#: src/std/rc.md:37\nmsgid \"\\\"Length of the value inside rc_a: {}\\\"\"\nmsgstr \"\\\"rc_a 内部值的长度：{}\\\"\"\n\n#: src/std/rc.md:38\nmsgid \"\\\"Value of rc_b: {}\\\"\"\nmsgstr \"\\\"rc_b 的值：{}\\\"\"\n\n#: src/std/rc.md:40\nmsgid \"\\\"--- rc_b is dropped out of scope ---\\\"\"\nmsgstr \"\\\"--- rc_b 超出作用域被释放 ---\\\"\"\n\n#: src/std/rc.md:45\nmsgid \"\\\"--- rc_a is dropped out of scope ---\\\"\"\nmsgstr \"\\\"--- rc_a 超出作用域被释放 ---\\\"\"\n\n#: src/std/rc.md:48\nmsgid \"\"\n\"// Error! `rc_examples` already moved into `rc_a`\\n\"\n\"    // And when `rc_a` is dropped, `rc_examples` is dropped together\\n\"\n\"    // println!(\\\"rc_examples: {}\\\", rc_examples);\\n\"\n\"    // TODO ^ Try uncommenting this line\\n\"\nmsgstr \"\"\n\"// 错误！`rc_examples` 已经被移动到 `rc_a` 中\\n\"\n\"    // 当 `rc_a` 被释放时，`rc_examples` 也会一同被释放\\n\"\n\"    // println!(\\\"rc_examples: {}\\\", rc_examples);\\n\"\n\"    // TODO：尝试取消注释上面这行\\n\"\n\n#: src/std/rc.md:57\nmsgid \"\"\n\"[std::rc](https://doc.rust-lang.org/std/rc/index.html) and [std::sync::arc]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Arc.html).\"\nmsgstr \"\"\n\"[`std::rc`](https://doc.rust-lang.org/std/rc/index.html) 和 \"\n\"[`std::sync::arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html)。\"\n\n#: src/std/arc.md:1\nmsgid \"Arc\"\nmsgstr \"Arc（原子引用计数）\"\n\n#: src/std/arc.md:3\nmsgid \"\"\n\"When shared ownership between threads is needed, `Arc`(Atomically Reference \"\n\"Counted) can be used. This struct, via the `Clone` implementation can create \"\n\"a reference pointer for the location of a value in the memory heap while \"\n\"increasing the reference counter. As it shares ownership between threads, \"\n\"when the last reference pointer to a value is out of scope, the variable is \"\n\"dropped.\"\nmsgstr \"\"\n\"当需要在线程间共享所有权时，可以使用 `Arc`（原子引用计数，Atomically \"\n\"Reference Counted）。通过 `Clone` 实现，这个结构体可以为堆内存中值的位置创建\"\n\"一个引用指针，同时增加引用计数。由于它在线程间共享所有权，当指向某个值的最后\"\n\"一个引用指针超出作用域时，该变量就会被释放。\"\n\n#: src/std/arc.md:15\nmsgid \"// This variable declaration is where its value is specified.\\n\"\nmsgstr \"// 在这个变量声明中指定了它的值。\\n\"\n\n#: src/std/arc.md:16\nmsgid \"\\\"the same apple\\\"\"\nmsgstr \"\\\"同一个苹果\\\"\"\n\n#: src/std/arc.md:19\nmsgid \"\"\n\"// Here there is no value specification as it is a pointer to a\\n\"\n\"        // reference in the memory heap.\\n\"\nmsgstr \"// 这里没有指定值，因为它是指向堆内存中引用的指针。\\n\"\n\n#: src/std/arc.md:24\nmsgid \"\"\n\"// As Arc was used, threads can be spawned using the value allocated\\n\"\n\"            // in the Arc variable pointer's location.\\n\"\nmsgstr \"// 由于使用了 Arc，可以使用 Arc 变量指针所指向的值来生成线程。\\n\"\n\n#: src/std/arc.md:30\nmsgid \"// Make sure all Arc instances are printed from spawned threads.\\n\"\nmsgstr \"// 确保所有 Arc 实例都从生成的线程中打印出来。\\n\"\n\n#: src/std_misc.md:3\nmsgid \"\"\n\"Many other types are provided by the std library to support things such as:\"\nmsgstr \"标准库提供了许多其他类型来支持各种功能，例如：\"\n\n#: src/std_misc.md:10\nmsgid \"These expand beyond what the [primitives](primitives.md) provide.\"\nmsgstr \"这些类型扩展了[基本类型](primitives.md)所提供的功能。\"\n\n#: src/std_misc/threads.md:3\nmsgid \"\"\n\"Rust provides a mechanism for spawning native OS threads via the `spawn` \"\n\"function, the argument of this function is a moving closure.\"\nmsgstr \"\"\n\"Rust 通过 `spawn` 函数提供了一种生成原生操作系统线程的机制，该函数的参数是一\"\n\"个移动闭包。\"\n\n#: src/std_misc/threads.md:10 src/std_misc/threads/testcase_mapreduce.md:28\nmsgid \"// This is the `main` thread\\n\"\nmsgstr \"// 这是主线程\\n\"\n\n#: src/std_misc/threads.md:13\nmsgid \"// Make a vector to hold the children which are spawned.\\n\"\nmsgstr \"// 创建一个向量来存储生成的子线程\\n\"\n\n#: src/std_misc/threads.md:17\nmsgid \"// Spin up another thread\\n\"\nmsgstr \"// 启动一个新线程\\n\"\n\n#: src/std_misc/threads.md:19\nmsgid \"\\\"this is thread number {}\\\"\"\nmsgstr \"\\\"这是第 {} 号线程\\\"\"\n\n#: src/std_misc/threads.md:24\nmsgid \"// Wait for the thread to finish. Returns a result.\\n\"\nmsgstr \"// 等待线程完成，返回一个结果\\n\"\n\n#: src/std_misc/threads.md:30\nmsgid \"These threads will be scheduled by the OS.\"\nmsgstr \"这些线程将由操作系统进行调度。\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:3\nmsgid \"\"\n\"Rust makes it very easy to parallelize data processing, without many of the \"\n\"headaches traditionally associated with such an attempt.\"\nmsgstr \"Rust 使并行数据处理变得非常简单，避免了传统并行处理中常见的诸多问题。\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:5\nmsgid \"\"\n\"The standard library provides great threading primitives out of the box. \"\n\"These, combined with Rust's concept of Ownership and aliasing rules, \"\n\"automatically prevent data races.\"\nmsgstr \"\"\n\"标准库提供了开箱即用的优秀线程原语。这些原语结合 Rust 的所有权概念和别名规\"\n\"则，自动防止了数据竞争。\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:9\nmsgid \"\"\n\"The aliasing rules (one writable reference XOR many readable references) \"\n\"automatically prevent you from manipulating state that is visible to other \"\n\"threads. (Where synchronization is needed, there are synchronization \"\n\"primitives like `Mutex`es or `Channel`s.)\"\nmsgstr \"\"\n\"别名规则（一个可写引用异或多个可读引用）自动防止你操作对其他线程可见的状态。\"\n\"（在需要同步的情况下，可以使用 `Mutex` 或 `Channel` 等同步原语。）\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:14\nmsgid \"\"\n\"In this example, we will calculate the sum of all digits in a block of \"\n\"numbers. We will do this by parcelling out chunks of the block into \"\n\"different threads. Each thread will sum its tiny block of digits, and \"\n\"subsequently we will sum the intermediate sums produced by each thread.\"\nmsgstr \"\"\n\"在这个例子中，我们将计算一个数字块中所有数字的总和。我们通过将数字块分成小块\"\n\"并分配给不同的线程来完成这个任务。每个线程将计算其小块数字的总和，随后我们将\"\n\"汇总每个线程产生的中间结果。\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:19\nmsgid \"\"\n\"Note that, although we're passing references across thread boundaries, Rust \"\n\"understands that we're only passing read-only references, and that thus no \"\n\"unsafety or data races can occur. Also because the references we're passing \"\n\"have `'static` lifetimes, Rust understands that our data won't be destroyed \"\n\"while these threads are still running. (When you need to share non-`static` \"\n\"data between threads, you can use a smart pointer like `Arc` to keep the \"\n\"data alive and avoid non-`static` lifetimes.)\"\nmsgstr \"\"\n\"注意，尽管我们在线程间传递引用，但 Rust 理解我们只是传递只读引用，因此不会发\"\n\"生不安全操作或数据竞争。此外，由于我们传递的引用具有 `'static` 生命周期，\"\n\"Rust 确保这些线程运行时数据不会被销毁。（当需要在线程间共享非 `static` 数据\"\n\"时，可以使用 `Arc` 等智能指针来保持数据存活并避免非 `static` 生命周期。）\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:32\nmsgid \"\"\n\"// This is our data to process.\\n\"\n\"    // We will calculate the sum of all digits via a threaded map-reduce \"\n\"algorithm.\\n\"\n\"    // Each whitespace separated chunk will be handled in a different \"\n\"thread.\\n\"\n\"    //\\n\"\n\"    // TODO: see what happens to the output if you insert spaces!\\n\"\nmsgstr \"\"\n\"// 这是我们要处理的数据\\n\"\n\"    // 我们将通过一个线程化的 map-reduce 算法计算所有数字的总和\\n\"\n\"    // 每个由空格分隔的块将在不同的线程中处理\\n\"\n\"    //\\n\"\n\"    // TODO：试试插入空格会对输出有什么影响！\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:37\nmsgid \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\nmsgstr \"\"\n\"\\\"86967897737416471853297327050364959\\n\"\n\"11861322575564723963297542624962850\\n\"\n\"70856234701860851907960690014725639\\n\"\n\"38397966707106094172783238747669219\\n\"\n\"52380795257888236525459303330302837\\n\"\n\"58495327135744041048897885734297812\\n\"\n\"69920216438980873548808413720956532\\n\"\n\"16278424637452589860345374828574668\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:46\nmsgid \"// Make a vector to hold the child-threads which we will spawn.\\n\"\nmsgstr \"// 创建一个向量来存储我们将要生成的子线程。\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:49\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Map\\\" phase\\n\"\n\"     *\\n\"\n\"     * Divide our data into segments, and apply initial processing\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Map\\\"阶段\\n\"\n\"     *\\n\"\n\"     * 将数据分割成多个段，并进行初步处理\\n\"\n\"     ************************************************************************/\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:55\nmsgid \"\"\n\"// split our data into segments for individual calculation\\n\"\n\"    // each chunk will be a reference (&str) into the actual data\\n\"\nmsgstr \"\"\n\"// 将数据分割成多个段以进行单独计算\\n\"\n\"    // 每个数据块都是指向实际数据的引用（&str）\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:59\nmsgid \"\"\n\"// Iterate over the data segments.\\n\"\n\"    // .enumerate() adds the current loop index to whatever is iterated\\n\"\n\"    // the resulting tuple \\\"(index, element)\\\" is then immediately\\n\"\n\"    // \\\"destructured\\\" into two variables, \\\"i\\\" and \\\"data_segment\\\" with \"\n\"a\\n\"\n\"    // \\\"destructuring assignment\\\"\\n\"\nmsgstr \"\"\n\"// 遍历数据段\\n\"\n\"    // .enumerate() 为迭代的每个元素添加当前循环索引\\n\"\n\"    // 生成的元组\\\"(索引, 元素)\\\"随后立即通过\\n\"\n\"    // \\\"解构赋值\\\"被\\\"解构\\\"为两个变量：\\\"i\\\"和\\\"data_segment\\\"\\n\"\n\"    // \\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:65\nmsgid \"\\\"data segment {} is \\\\\\\"{}\\\\\\\"\\\"\"\nmsgstr \"\\\"数据段 {} 是\\\\\\\"{}\\\\\\\"\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:67\nmsgid \"\"\n\"// Process each data segment in a separate thread\\n\"\n\"        //\\n\"\n\"        // spawn() returns a handle to the new thread,\\n\"\n\"        // which we MUST keep to access the returned value\\n\"\n\"        //\\n\"\n\"        // 'move || -> u32' is syntax for a closure that:\\n\"\n\"        // * takes no arguments ('||')\\n\"\n\"        // * takes ownership of its captured variables ('move') and\\n\"\n\"        // * returns an unsigned 32-bit integer ('-> u32')\\n\"\n\"        //\\n\"\n\"        // Rust is smart enough to infer the '-> u32' from\\n\"\n\"        // the closure itself so we could have left that out.\\n\"\n\"        //\\n\"\n\"        // TODO: try removing the 'move' and see what happens\\n\"\nmsgstr \"\"\n\"// 在单独的线程中处理每个数据段\\n\"\n\"        //\\n\"\n\"        // spawn() 返回新线程的句柄，\\n\"\n\"        // 我们必须保留该句柄以访问返回值\\n\"\n\"        //\\n\"\n\"        // 'move || -> u32' 是一个闭包的语法，它：\\n\"\n\"        // * 不接受参数（'||'）\\n\"\n\"        // * 获取其捕获变量的所有权（'move'）\\n\"\n\"        // * 返回一个无符号 32 位整数（'-> u32'）\\n\"\n\"        //\\n\"\n\"        // Rust 足够智能，能从闭包本身推断出 '-> u32'，\\n\"\n\"        // 所以我们可以省略它。\\n\"\n\"        //\\n\"\n\"        // TODO：尝试移除 'move' 并观察结果\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:82\nmsgid \"// Calculate the intermediate sum of this segment:\\n\"\nmsgstr \"// 计算此段的中间和：\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:84\nmsgid \"// iterate over the characters of our segment..\\n\"\nmsgstr \"// 遍历此段中的字符...\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:86\nmsgid \"// .. convert text-characters to their number value..\\n\"\nmsgstr \"// ...将文本字符转换为对应的数值...\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:87\nmsgid \"\\\"should be a digit\\\"\"\nmsgstr \"\\\"应该是一个数字\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:88\nmsgid \"// .. and sum the resulting iterator of numbers\\n\"\nmsgstr \"// ...并对结果数字迭代器求和\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:91\nmsgid \"// println! locks stdout, so no text-interleaving occurs\\n\"\nmsgstr \"// println! 会锁定标准输出，因此不会出现文本交错\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:92\nmsgid \"\\\"processed segment {}, result={}\\\"\"\nmsgstr \"\\\"已处理段 {}，结果={}\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:94\nmsgid \"\"\n\"// \\\"return\\\" not needed, because Rust is an \\\"expression language\\\", the\\n\"\n\"            // last evaluated expression in each block is automatically its \"\n\"value.\\n\"\nmsgstr \"\"\n\"// 不需要使用 \\\"return\\\"，因为 Rust 是一种\\\"表达式语言\\\"，\\n\"\n\"// 每个代码块中最后求值的表达式会自动成为该块的返回值。\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:102\nmsgid \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"Reduce\\\" phase\\n\"\n\"     *\\n\"\n\"     * Collect our intermediate results, and combine them into a final \"\n\"result\\n\"\n\"     ************************************************************************/\"\nmsgstr \"\"\n\"/*************************************************************************\\n\"\n\"     * \\\"归约\\\"阶段\\n\"\n\"     *\\n\"\n\"     * 收集中间结果，并将它们合并成最终结果\\n\"\n\"     ************************************************************************/\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:108\nmsgid \"\"\n\"// combine each thread's intermediate results into a single final sum.\\n\"\n\"    //\\n\"\n\"    // we use the \\\"turbofish\\\" ::<> to provide sum() with a type hint.\\n\"\n\"    //\\n\"\n\"    // TODO: try without the turbofish, by instead explicitly\\n\"\n\"    // specifying the type of final_result\\n\"\nmsgstr \"\"\n\"// 将每个线程的中间结果合并成一个最终总和。\\n\"\n\"    //\\n\"\n\"    // 我们使用 \\\"turbofish\\\" ::<> 为 sum() 提供类型提示。\\n\"\n\"    //\\n\"\n\"    // TODO：尝试不使用 turbofish，而是显式\\n\"\n\"    // 指定 final_result 的类型\\n\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:116\nmsgid \"\\\"Final sum result: {}\\\"\"\nmsgstr \"\\\"最终求和结果：{}\\\"\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:120\nmsgid \"Assignments\"\nmsgstr \"练习\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:122\nmsgid \"\"\n\"It is not wise to let our number of threads depend on user inputted data. \"\n\"What if the user decides to insert a lot of spaces? Do we _really_ want to \"\n\"spawn 2,000 threads? Modify the program so that the data is always chunked \"\n\"into a limited number of chunks, defined by a static constant at the \"\n\"beginning of the program.\"\nmsgstr \"\"\n\"让线程数量依赖于用户输入的数据并不明智。如果用户决定插入大量空格，我们真的想\"\n\"要创建 2,000 个线程吗？修改程序，使数据始终被分割成固定数量的块，这个数量应由\"\n\"程序开头定义的静态常量来确定。\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:129\nmsgid \"[Threads](../threads.md)\"\nmsgstr \"[线程](../threads.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:130\nmsgid \"[vectors](../../std/vec.md) and [iterators](../../trait/iter.md)\"\nmsgstr \"[向量](../../std/vec.md)和[迭代器](../../trait/iter.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:131\nmsgid \"\"\n\"[closures](../../fn/closures.md), [move](../../scope/move.md) semantics and \"\n\"[`move` closures](https://doc.rust-lang.org/book/ch13-01-\"\n\"closures.html#closures-can-capture-their-environment)\"\nmsgstr \"\"\n\"[闭包](../../fn/closures.md)、[move](../../scope/move.md) 语义和 [`move` 闭\"\n\"包](https://doc.rust-lang.org/book/ch13-01-closures.html#closures-can-\"\n\"capture-their-environment)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:132\nmsgid \"\"\n\"[destructuring](https://doc.rust-lang.org/book/ch18-03-pattern-\"\n\"syntax.html#destructuring-to-break-apart-values) assignments\"\nmsgstr \"\"\n\"[解构](https://doc.rust-lang.org/book/ch18-03-pattern-\"\n\"syntax.html#destructuring-to-break-apart-values)赋值\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:133\nmsgid \"\"\n\"[turbofish notation](https://doc.rust-lang.org/book/appendix-02-\"\n\"operators.html?highlight=turbofish) to help type inference\"\nmsgstr \"\"\n\"[涡轮鱼符号](https://doc.rust-lang.org/book/appendix-02-operators.html?\"\n\"highlight=turbofish)用于辅助类型推断\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:134\nmsgid \"[unwrap vs. expect](../../error/option_unwrap.md)\"\nmsgstr \"[unwrap 与 expect](../../error/option_unwrap.md)\"\n\n#: src/std_misc/threads/testcase_mapreduce.md:135\nmsgid \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\nmsgstr \"[enumerate](https://doc.rust-lang.org/book/loops.html#enumerate)\"\n\n#: src/std_misc/channels.md:3\nmsgid \"\"\n\"Rust provides asynchronous `channels` for communication between threads. \"\n\"Channels allow a unidirectional flow of information between two end-points: \"\n\"the `Sender` and the `Receiver`.\"\nmsgstr \"\"\n\"Rust 提供异步通道（`channels`）用于线程间通信。通道允许信息在两个端点之间单向\"\n\"流动：发送端（`Sender`）和接收端（`Receiver`）。\"\n\n#: src/std_misc/channels.md:15\nmsgid \"\"\n\"// Channels have two endpoints: the `Sender<T>` and the `Receiver<T>`,\\n\"\n\"    // where `T` is the type of the message to be transferred\\n\"\n\"    // (type annotation is superfluous)\\n\"\nmsgstr \"\"\n\"// 通道有两个端点：`Sender<T>` 和 `Receiver<T>`，\\n\"\n\"    // 其中 `T` 是要传输的消息类型\\n\"\n\"    // （此处的类型注解是多余的）\\n\"\n\n#: src/std_misc/channels.md:22\nmsgid \"// The sender endpoint can be copied\\n\"\nmsgstr \"// 发送端可以被复制\\n\"\n\n#: src/std_misc/channels.md:25\nmsgid \"// Each thread will send its id via the channel\\n\"\nmsgstr \"// 每个线程将通过通道发送其 ID\\n\"\n\n#: src/std_misc/channels.md:27\nmsgid \"\"\n\"// The thread takes ownership over `thread_tx`\\n\"\n\"            // Each thread queues a message in the channel\\n\"\nmsgstr \"\"\n\"// 线程获取 `thread_tx` 的所有权\\n\"\n\"            // 每个线程在通道中排队一条消息\\n\"\n\n#: src/std_misc/channels.md:31\nmsgid \"\"\n\"// Sending is a non-blocking operation, the thread will continue\\n\"\n\"            // immediately after sending its message\\n\"\nmsgstr \"\"\n\"// 发送是非阻塞操作，线程在发送消息后\\n\"\n\"            // 会立即继续执行\\n\"\n\n#: src/std_misc/channels.md:33\nmsgid \"\\\"thread {} finished\\\"\"\nmsgstr \"\\\"线程 {} 已完成\\\"\"\n\n#: src/std_misc/channels.md:39\nmsgid \"// Here, all the messages are collected\\n\"\nmsgstr \"// 在这里收集所有消息\\n\"\n\n#: src/std_misc/channels.md:42\nmsgid \"\"\n\"// The `recv` method picks a message from the channel\\n\"\n\"        // `recv` will block the current thread if there are no messages \"\n\"available\\n\"\nmsgstr \"\"\n\"// `recv` 方法从通道中获取一条消息\\n\"\n\"        // 如果没有可用消息，`recv` 将阻塞当前线程\\n\"\n\n#: src/std_misc/channels.md:47\nmsgid \"// Wait for the threads to complete any remaining work\\n\"\nmsgstr \"// 等待线程完成所有剩余工作\\n\"\n\n#: src/std_misc/channels.md:49\nmsgid \"\\\"oops! the child thread panicked\\\"\"\nmsgstr \"\\\"糟糕！子线程发生了 panic\\\"\"\n\n#: src/std_misc/channels.md:52\nmsgid \"// Show the order in which the messages were sent\\n\"\nmsgstr \"// 显示消息发送的顺序\\n\"\n\n#: src/std_misc/path.md:3\nmsgid \"\"\n\"The `Path` struct represents file paths in the underlying filesystem. There \"\n\"are two flavors of `Path`: `posix::Path`, for UNIX-like systems, and \"\n\"`windows::Path`, for Windows. The prelude exports the appropriate platform-\"\n\"specific `Path` variant.\"\nmsgstr \"\"\n\"`Path` 结构体表示底层文件系统中的文件路径。`Path` 有两种变体：用于类 UNIX 系\"\n\"统的 `posix::Path` 和用于 Windows 的 `windows::Path`。prelude 会导出适合特定\"\n\"平台的 `Path` 变体。\"\n\n#: src/std_misc/path.md:8\nmsgid \"\"\n\"A `Path` can be created from an `OsStr`, and provides several methods to get \"\n\"information from the file/directory the path points to.\"\nmsgstr \"\"\n\"`Path` 可以从 `OsStr` 创建，并提供多种方法来获取路径所指向的文件或目录的信\"\n\"息。\"\n\n#: src/std_misc/path.md:11\nmsgid \"\"\n\"A `Path` is immutable. The owned version of `Path` is `PathBuf`. The \"\n\"relation between `Path` and `PathBuf` is similar to that of `str` and \"\n\"`String`: a `PathBuf` can be mutated in-place, and can be dereferenced to a \"\n\"`Path`.\"\nmsgstr \"\"\n\"`Path` 是不可变的。`Path` 的所有权版本是 `PathBuf`。`Path` 和 `PathBuf` 之间\"\n\"的关系类似于 `str` 和 `String`：`PathBuf` 可以原地修改，并且可以解引用为 \"\n\"`Path`。\"\n\n#: src/std_misc/path.md:15\nmsgid \"\"\n\"Note that a `Path` is _not_ internally represented as an UTF-8 string, but \"\n\"instead is stored as an `OsString`. Therefore, converting a `Path` to a \"\n\"`&str` is _not_ free and may fail (an `Option` is returned). However, a \"\n\"`Path` can be freely converted to an `OsString` or `&OsStr` using \"\n\"`into_os_string` and `as_os_str`, respectively.\"\nmsgstr \"\"\n\"注意，`Path` 在内部**并非**表示为 UTF-8 字符串，而是存储为 `OsString`。因此，\"\n\"将 `Path` 转换为 `&str` **并非**零开销操作，且可能失败（返回一个 `Option`）。\"\n\"然而，`Path` 可以自由地转换为 `OsString` 或 `&OsStr`，分别使用 \"\n\"`into_os_string` 和 `as_os_str` 方法。\"\n\n#: src/std_misc/path.md:25\nmsgid \"// Create a `Path` from an `&'static str`\\n\"\nmsgstr \"// 从 `&'static str` 创建一个 `Path`\\n\"\n\n#: src/std_misc/path.md:26\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/std_misc/path.md:28\nmsgid \"// The `display` method returns a `Display`able structure\\n\"\nmsgstr \"// `display` 方法返回一个可用于显示的结构体\\n\"\n\n#: src/std_misc/path.md:31\nmsgid \"\"\n\"// `join` merges a path with a byte container using the OS specific\\n\"\n\"    // separator, and returns a `PathBuf`\\n\"\nmsgstr \"\"\n\"// `join` 使用操作系统特定的分隔符将路径与字节容器合并，\\n\"\n\"    // 并返回一个 `PathBuf`\\n\"\n\n#: src/std_misc/path.md:35\nmsgid \"// `push` extends the `PathBuf` with a `&Path`\\n\"\nmsgstr \"// `push` 使用 `&Path` 扩展 `PathBuf`\\n\"\n\n#: src/std_misc/path.md:37\nmsgid \"\\\"myfile.tar.gz\\\"\"\nmsgstr \"\\\"myfile.tar.gz\\\"\"\n\n#: src/std_misc/path.md:39\nmsgid \"// `set_file_name` updates the file name of the `PathBuf`\\n\"\nmsgstr \"// `set_file_name` 更新 `PathBuf` 的文件名\\n\"\n\n#: src/std_misc/path.md:40\nmsgid \"\\\"package.tgz\\\"\"\nmsgstr \"\\\"package.tgz\\\"\"\n\n#: src/std_misc/path.md:42\nmsgid \"// Convert the `PathBuf` into a string slice\\n\"\nmsgstr \"// 将 `PathBuf` 转换为字符串切片\\n\"\n\n#: src/std_misc/path.md:44\nmsgid \"\\\"new path is not a valid UTF-8 sequence\\\"\"\nmsgstr \"\\\"新路径不是有效的 UTF-8 序列\\\"\"\n\n#: src/std_misc/path.md:45\nmsgid \"\\\"new path is {}\\\"\"\nmsgstr \"\\\"新路径是 {}\\\"\"\n\n#: src/std_misc/path.md:50\nmsgid \"\"\n\"Be sure to check at other `Path` methods (`posix::Path` or `windows::Path`) \"\n\"and the `Metadata` struct.\"\nmsgstr \"\"\n\"请务必查看其他 `Path` 方法（`posix::Path` 或 `windows::Path`）以及 \"\n\"`Metadata` 结构体。\"\n\n#: src/std_misc/path.md:55\nmsgid \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html).\"\nmsgstr \"\"\n\"[OsStr](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) 和 [Metadata]\"\n\"(https://doc.rust-lang.org/std/fs/struct.Metadata.html)。\"\n\n#: src/std_misc/file.md:3\nmsgid \"\"\n\"The `File` struct represents a file that has been opened (it wraps a file \"\n\"descriptor), and gives read and/or write access to the underlying file.\"\nmsgstr \"\"\n\"`File` 结构体表示一个已打开的文件（它封装了一个文件描述符），并提供对底层文件\"\n\"的读取和/或写入访问。\"\n\n#: src/std_misc/file.md:6\nmsgid \"\"\n\"Since many things can go wrong when doing file I/O, all the `File` methods \"\n\"return the `io::Result<T>` type, which is an alias for `Result<T, \"\n\"io::Error>`.\"\nmsgstr \"\"\n\"由于文件 I/O 操作可能会出现多种错误，所有 `File` 方法都返回 `io::Result<T>` \"\n\"类型，这是 `Result<T, io::Error>` 的别名。\"\n\n#: src/std_misc/file.md:9\nmsgid \"\"\n\"This makes the failure of all I/O operations _explicit_. Thanks to this, the \"\n\"programmer can see all the failure paths, and is encouraged to handle them \"\n\"in a proactive manner.\"\nmsgstr \"\"\n\"这使得所有 I/O 操作的失败都变得**显式**。得益于此，程序员可以看到所有可能的失\"\n\"败路径，并被鼓励主动处理这些情况。\"\n\n#: src/std_misc/file/open.md:3\nmsgid \"The `open` function can be used to open a file in read-only mode.\"\nmsgstr \"`open` 函数可用于以只读模式打开文件。\"\n\n#: src/std_misc/file/open.md:5\nmsgid \"\"\n\"A `File` owns a resource, the file descriptor and takes care of closing the \"\n\"file when it is `drop`ed.\"\nmsgstr \"`File` 拥有一个资源（即文件描述符），并在被 `drop` 时负责关闭文件。\"\n\n#: src/std_misc/file/open.md:14\nmsgid \"// Create a path to the desired file\\n\"\nmsgstr \"// 创建指向目标文件的路径\\n\"\n\n#: src/std_misc/file/open.md:15\nmsgid \"\\\"hello.txt\\\"\"\nmsgstr \"\\\"hello.txt\\\"\"\n\n#: src/std_misc/file/open.md:18\nmsgid \"// Open the path in read-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"// 以只读模式打开路径，返回 `io::Result<File>`\\n\"\n\n#: src/std_misc/file/open.md:20\nmsgid \"\\\"couldn't open {}: {}\\\"\"\nmsgstr \"\\\"无法打开 {}: {}\\\"\"\n\n#: src/std_misc/file/open.md:24\nmsgid \"// Read the file contents into a string, returns `io::Result<usize>`\\n\"\nmsgstr \"// 将文件内容读入字符串，返回 `io::Result<usize>`\\n\"\n\n#: src/std_misc/file/open.md:27\nmsgid \"\\\"couldn't read {}: {}\\\"\"\nmsgstr \"\\\"无法读取 {}: {}\\\"\"\n\n#: src/std_misc/file/open.md:28\nmsgid \"\\\"{} contains:\\\\n{}\\\"\"\nmsgstr \"\\\"{} 的内容：\\\\n{}\\\"\"\n\n#: src/std_misc/file/open.md:31\nmsgid \"// `file` goes out of scope, and the \\\"hello.txt\\\" file gets closed\\n\"\nmsgstr \"// `file` 超出作用域，\\\"hello.txt\\\" 文件随之关闭\\n\"\n\n#: src/std_misc/file/open.md:35 src/std_misc/file/create.md:39\n#: src/std_misc/fs.md:108\nmsgid \"Here's the expected successful output:\"\nmsgstr \"以下是预期的成功输出：\"\n\n#: src/std_misc/file/open.md:37\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt contains:\\n\"\n\"Hello World!\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ echo \\\"Hello World!\\\" > hello.txt\\n\"\n\"$ rustc open.rs && ./open\\n\"\n\"hello.txt 的内容：\\n\"\n\"Hello World!\\n\"\n\"```\"\n\n#: src/std_misc/file/open.md:44\nmsgid \"\"\n\"(You are encouraged to test the previous example under different failure \"\n\"conditions: `hello.txt` doesn't exist, or `hello.txt` is not readable, etc.)\"\nmsgstr \"\"\n\"（建议您在不同的失败情况下测试上述示例：例如 `hello.txt` 不存在，或 \"\n\"`hello.txt` 不可读等。）\"\n\n#: src/std_misc/file/create.md:3\nmsgid \"\"\n\"The `create` function opens a file in write-only mode. If the file already \"\n\"existed, the old content is destroyed. Otherwise, a new file is created.\"\nmsgstr \"\"\n\"`create` 函数以只写模式打开文件。如果文件已存在，旧内容会被清除；否则，会创建\"\n\"一个新文件。\"\n\n#: src/std_misc/file/create.md:9\nmsgid \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\nmsgstr \"\"\n\"\\\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\n\"\n\"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim \"\n\"veniam,\\n\"\n\"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\n\"\n\"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\n\"\n\"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \"\n\"non\\n\"\n\"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\\n\"\n\"\\\"\"\n\n#: src/std_misc/file/create.md:22\nmsgid \"\\\"lorem_ipsum.txt\\\"\"\nmsgstr \"\\\"lorem_ipsum.txt\\\"\"\n\n#: src/std_misc/file/create.md:25\nmsgid \"// Open a file in write-only mode, returns `io::Result<File>`\\n\"\nmsgstr \"// 以只写模式打开文件，返回 `io::Result<File>`\\n\"\n\n#: src/std_misc/file/create.md:27\nmsgid \"\\\"couldn't create {}: {}\\\"\"\nmsgstr \"\\\"无法创建 {}: {}\\\"\"\n\n#: src/std_misc/file/create.md:31\nmsgid \"// Write the `LOREM_IPSUM` string to `file`, returns `io::Result<()>`\\n\"\nmsgstr \"// 将 `LOREM_IPSUM` 字符串写入 `file`，返回 `io::Result<()>`\\n\"\n\n#: src/std_misc/file/create.md:33\nmsgid \"\\\"couldn't write to {}: {}\\\"\"\nmsgstr \"\\\"无法写入 {}: {}\\\"\"\n\n#: src/std_misc/file/create.md:34\nmsgid \"\\\"successfully wrote to {}\\\"\"\nmsgstr \"\\\"成功写入 {}\\\"\"\n\n#: src/std_misc/file/create.md:54\nmsgid \"\"\n\"(As in the previous example, you are encouraged to test this example under \"\n\"failure conditions.)\"\nmsgstr \"（与前面的示例类似，建议您在失败情况下测试此示例。）\"\n\n#: src/std_misc/file/create.md:57\nmsgid \"\"\n\"The [`OpenOptions`](https://doc.rust-lang.org/std/fs/\"\n\"struct.OpenOptions.html) struct can be used to configure how a file is \"\n\"opened.\"\nmsgstr \"\"\n\"[`OpenOptions`](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html) 结\"\n\"构体可用于配置文件的打开方式。\"\n\n#: src/std_misc/file/read_lines.md:3\nmsgid \"A naive approach\"\nmsgstr \"一种简单的方法\"\n\n#: src/std_misc/file/read_lines.md:5\nmsgid \"\"\n\"This might be a reasonable first attempt for a beginner's first \"\n\"implementation for reading lines from a file.\"\nmsgstr \"对于初学者来说，这可能是从文件中读取行的一个合理的初步尝试。\"\n\n#: src/std_misc/file/read_lines.md:22\nmsgid \"\"\n\"Since the method `lines()` returns an iterator over the lines in the file, \"\n\"we can also perform a map inline and collect the results, yielding a more \"\n\"concise and fluent expression.\"\nmsgstr \"\"\n\"由于 `lines()` 方法返回文件中各行的迭代器，我们可以内联执行 map 并收集结果，\"\n\"从而得到一个更简洁流畅的表达式。\"\n\n#: src/std_misc/file/read_lines.md:31\nmsgid \"// panic on possible file-reading errors\\n\"\nmsgstr \"// 遇到可能的文件读取错误时 panic\\n\"\n\n#: src/std_misc/file/read_lines.md:32\nmsgid \"// split the string into an iterator of string slices\\n\"\nmsgstr \"// 将字符串分割成字符串切片的迭代器\\n\"\n\n#: src/std_misc/file/read_lines.md:33\nmsgid \"// make each slice into a string\\n\"\nmsgstr \"// 将每个切片转换为字符串\\n\"\n\n#: src/std_misc/file/read_lines.md:34\nmsgid \"// gather them together into a vector\\n\"\nmsgstr \"// 将它们收集到一个向量中\\n\"\n\n#: src/std_misc/file/read_lines.md:38\nmsgid \"\"\n\"Note that in both examples above, we must convert the `&str` reference \"\n\"returned from `lines()` to the owned type `String`, using `.to_string()` and \"\n\"`String::from` respectively.\"\nmsgstr \"\"\n\"注意，在上述两个示例中，我们都必须将 `lines()` 返回的 `&str` 引用转换为拥有所\"\n\"有权的 `String` 类型，分别使用 `.to_string()` 和 `String::from`。\"\n\n#: src/std_misc/file/read_lines.md:42\nmsgid \"A more efficient approach\"\nmsgstr \"一种更高效的方法\"\n\n#: src/std_misc/file/read_lines.md:44\nmsgid \"\"\n\"Here we pass ownership of the open `File` to a `BufReader` struct. \"\n\"`BufReader` uses an internal buffer to reduce intermediate allocations.\"\nmsgstr \"\"\n\"在这里，我们将打开的 `File` 的所有权传递给 `BufReader` 结构体。`BufReader` 使\"\n\"用内部缓冲区来减少中间分配。\"\n\n#: src/std_misc/file/read_lines.md:47\nmsgid \"\"\n\"We also update `read_lines` to return an iterator instead of allocating new \"\n\"`String` objects in memory for each line.\"\nmsgstr \"\"\n\"我们还对 `read_lines` 函数进行了改进，使其返回一个迭代器，而不是为每行内容在\"\n\"内存中分配新的 `String` 对象。\"\n\n#: src/std_misc/file/read_lines.md:56\nmsgid \"// File hosts.txt must exist in the current path\\n\"\nmsgstr \"// 文件 hosts.txt 必须存在于当前路径下\\n\"\n\n#: src/std_misc/file/read_lines.md:57\nmsgid \"\\\"./hosts.txt\\\"\"\nmsgstr \"\\\"./hosts.txt\\\"\"\n\n#: src/std_misc/file/read_lines.md:58\nmsgid \"// Consumes the iterator, returns an (Optional) String\\n\"\nmsgstr \"// 消耗迭代器，返回一个（可选的）String\\n\"\n\n#: src/std_misc/file/read_lines.md:64\nmsgid \"\"\n\"// The output is wrapped in a Result to allow matching on errors.\\n\"\n\"// Returns an Iterator to the Reader of the lines of the file.\\n\"\nmsgstr \"\"\n\"// 输出被包装在 Result 中以便于错误匹配。\\n\"\n\"// 返回一个指向文件行读取器的迭代器。\\n\"\n\n#: src/std_misc/file/read_lines.md:74\nmsgid \"Running this program simply prints the lines individually.\"\nmsgstr \"运行此程序将逐行打印文件内容。\"\n\n#: src/std_misc/file/read_lines.md:76\nmsgid \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ echo -e \\\"127.0.0.1\\\\n192.168.0.1\\\\n\\\" > hosts.txt\\n\"\n\"$ rustc read_lines.rs && ./read_lines\\n\"\n\"127.0.0.1\\n\"\n\"192.168.0.1\\n\"\n\"```\"\n\n#: src/std_misc/file/read_lines.md:83\nmsgid \"\"\n\"(Note that since `File::open` expects a generic `AsRef<Path>` as argument, \"\n\"we define our generic `read_lines()` method with the same generic \"\n\"constraint, using the `where` keyword.)\"\nmsgstr \"\"\n\"（注意，由于 `File::open` 需要一个泛型 `AsRef<Path>` 作为参数，我们使用 \"\n\"`where` 关键字为 `read_lines()` 方法定义了相同的泛型约束。）\"\n\n#: src/std_misc/file/read_lines.md:86\nmsgid \"\"\n\"This process is more efficient than creating a `String` in memory with all \"\n\"of the file's contents. This can especially cause performance issues when \"\n\"working with larger files.\"\nmsgstr \"\"\n\"这种方法比在内存中创建包含整个文件内容的 `String` 更加高效。特别是在处理大文\"\n\"件时，后者可能会导致性能问题。\"\n\n#: src/std_misc/process.md:3\nmsgid \"\"\n\"The `process::Output` struct represents the output of a finished child \"\n\"process, and the `process::Command` struct is a process builder.\"\nmsgstr \"\"\n\"`process::Output` 结构体表示已完成子进程的输出，而 `process::Command` 结构体\"\n\"是一个进程构建器。\"\n\n#: src/std_misc/process.md:10\nmsgid \"\\\"rustc\\\"\"\nmsgstr \"\\\"rustc\\\"\"\n\n#: src/std_misc/process.md:11\nmsgid \"\\\"--version\\\"\"\nmsgstr \"\\\"--version\\\"\"\n\n#: src/std_misc/process.md:13\nmsgid \"\\\"failed to execute process: {}\\\"\"\nmsgstr \"\\\"执行进程失败：{}\\\"\"\n\n#: src/std_misc/process.md:19\nmsgid \"\\\"rustc succeeded and stdout was:\\\\n{}\\\"\"\nmsgstr \"\\\"rustc 执行成功，标准输出为：\\\\n{}\\\"\"\n\n#: src/std_misc/process.md:23\nmsgid \"\\\"rustc failed and stderr was:\\\\n{}\\\"\"\nmsgstr \"\\\"rustc 执行失败，标准错误输出为：\\\\n{}\\\"\"\n\n#: src/std_misc/process.md:28\nmsgid \"\"\n\"(You are encouraged to try the previous example with an incorrect flag \"\n\"passed to `rustc`)\"\nmsgstr \"（建议您尝试在上述示例中向 `rustc` 传递一个错误的标志）\"\n\n#: src/std_misc/process/pipe.md:3\nmsgid \"\"\n\"The `std::process::Child` struct represents a child process, and exposes the \"\n\"`stdin`, `stdout` and `stderr` handles for interaction with the underlying \"\n\"process via pipes.\"\nmsgstr \"\"\n\"`std::process::Child` 结构体代表一个子进程，它暴露了 `stdin`、`stdout` 和 \"\n\"`stderr` 句柄，允许通过管道与底层进程进行交互。\"\n\n#: src/std_misc/process/pipe.md:11\nmsgid \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\nmsgstr \"\\\"the quick brown fox jumps over the lazy dog\\\\n\\\"\"\n\n#: src/std_misc/process/pipe.md:15\nmsgid \"// Spawn the `wc` command\\n\"\nmsgstr \"// 启动 `wc` 命令\\n\"\n\n#: src/std_misc/process/pipe.md:16 src/std_misc/fs.md:12 src/std_misc/fs.md:73\n#: src/std_misc/ffi.md:11\nmsgid \"\\\"windows\\\"\"\nmsgstr \"\\\"windows\\\"\"\n\n#: src/std_misc/process/pipe.md:17\nmsgid \"\\\"powershell\\\"\"\nmsgstr \"\\\"powershell\\\"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"-Command\\\"\"\nmsgstr \"\\\"-Command\\\"\"\n\n#: src/std_misc/process/pipe.md:18\nmsgid \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\nmsgstr \"\\\"$input | Measure-Object -Line -Word -Character\\\"\"\n\n#: src/std_misc/process/pipe.md:21\nmsgid \"\\\"wc\\\"\"\nmsgstr \"\\\"wc\\\"\"\n\n#: src/std_misc/process/pipe.md:27\nmsgid \"\\\"couldn't spawn wc: {}\\\"\"\nmsgstr \"\\\"无法启动 wc：{}\\\"\"\n\n#: src/std_misc/process/pipe.md:31\nmsgid \"\"\n\"// Write a string to the `stdin` of `wc`.\\n\"\n\"    //\\n\"\n\"    // `stdin` has type `Option<ChildStdin>`, but since we know this \"\n\"instance\\n\"\n\"    // must have one, we can directly `unwrap` it.\\n\"\nmsgstr \"\"\n\"// 向 `wc` 的 `stdin` 写入字符串。\\n\"\n\"    //\\n\"\n\"    // `stdin` 的类型是 `Option<ChildStdin>`，但我们知道这个实例\\n\"\n\"    // 必定存在，所以可以直接 `unwrap` 它。\\n\"\n\n#: src/std_misc/process/pipe.md:36\nmsgid \"\\\"couldn't write to wc stdin: {}\\\"\"\nmsgstr \"\\\"无法写入 wc 的标准输入：{}\\\"\"\n\n#: src/std_misc/process/pipe.md:37\nmsgid \"\\\"sent pangram to wc\\\"\"\nmsgstr \"\\\"已将 pangram 发送给 wc\\\"\"\n\n#: src/std_misc/process/pipe.md:40\nmsgid \"\"\n\"// Because `stdin` does not live after the above calls, it is `drop`ed,\\n\"\n\"    // and the pipe is closed.\\n\"\n\"    //\\n\"\n\"    // This is very important, otherwise `wc` wouldn't start processing the\\n\"\n\"    // input we just sent.\\n\"\nmsgstr \"\"\n\"// 由于 `stdin` 在上述调用后不再存活，它会被 `drop`，\\n\"\n\"    // 管道随之关闭。\\n\"\n\"    //\\n\"\n\"    // 这一点非常重要，否则 `wc` 不会开始处理\\n\"\n\"    // 我们刚刚发送的输入。\\n\"\n\n#: src/std_misc/process/pipe.md:46\nmsgid \"\"\n\"// The `stdout` field also has type `Option<ChildStdout>` so must be \"\n\"unwrapped.\\n\"\nmsgstr \"// `stdout` 字段的类型也是 `Option<ChildStdout>`，因此必须解包。\\n\"\n\n#: src/std_misc/process/pipe.md:49\nmsgid \"\\\"couldn't read wc stdout: {}\\\"\"\nmsgstr \"\\\"无法读取 wc 的标准输出：{}\\\"\"\n\n#: src/std_misc/process/pipe.md:50\nmsgid \"\\\"wc responded with:\\\\n{}\\\"\"\nmsgstr \"\\\"wc 的响应为：\\\\n{}\\\"\"\n\n#: src/std_misc/process/wait.md:3\nmsgid \"\"\n\"If you'd like to wait for a `process::Child` to finish, you must call \"\n\"`Child::wait`, which will return a `process::ExitStatus`.\"\nmsgstr \"\"\n\"如果你想等待一个 `process::Child` 完成，你必须调用 `Child::wait`，它会返回一\"\n\"个 `process::ExitStatus`。\"\n\n#: src/std_misc/process/wait.md:10\nmsgid \"\\\"sleep\\\"\"\nmsgstr \"\\\"sleep\\\"\"\n\n#: src/std_misc/process/wait.md:13\nmsgid \"\\\"reached end of main\\\"\"\nmsgstr \"\\\"到达 main 函数末尾\\\"\"\n\n#: src/std_misc/process/wait.md:18\nmsgid \"\"\n\"# `wait` keeps running for 5 seconds until the `sleep 5` command finishes\\n\"\nmsgstr \"# `wait` 会持续运行 5 秒，直到 `sleep 5` 命令执行完毕\\n\"\n\n#: src/std_misc/fs.md:3\nmsgid \"\"\n\"The `std::fs` module contains several functions that deal with the \"\n\"filesystem.\"\nmsgstr \"`std::fs` 模块包含多个用于处理文件系统的函数。\"\n\n#: src/std_misc/fs.md:10 src/std_misc/fs.md:68 src/std_misc/ffi.md:20\nmsgid \"\\\"unix\\\"\"\nmsgstr \"\\\"unix\\\"\"\n\n#: src/std_misc/fs.md:15\nmsgid \"// A simple implementation of `% cat path`\\n\"\nmsgstr \"// `% cat path` 命令的简单实现\\n\"\n\n#: src/std_misc/fs.md:25\nmsgid \"// A simple implementation of `% echo s > path`\\n\"\nmsgstr \"// `% echo s > path` 命令的简单实现\\n\"\n\n#: src/std_misc/fs.md:32\nmsgid \"// A simple implementation of `% touch path` (ignores existing files)\\n\"\nmsgstr \"// `% touch path` 命令的简单实现（忽略已存在的文件）\\n\"\n\n#: src/std_misc/fs.md:42\nmsgid \"\\\"`mkdir a`\\\"\"\nmsgstr \"\\\"`mkdir a`\\\"\"\n\n#: src/std_misc/fs.md:43\nmsgid \"// Create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 创建目录，返回 `io::Result<()>`\\n\"\n\n#: src/std_misc/fs.md:45 src/std_misc/fs.md:52 src/std_misc/fs.md:58\n#: src/std_misc/fs.md:63 src/std_misc/fs.md:70 src/std_misc/fs.md:75\n#: src/std_misc/fs.md:81 src/std_misc/fs.md:88 src/std_misc/fs.md:97\n#: src/std_misc/fs.md:103\nmsgid \"\\\"! {:?}\\\"\"\nmsgstr \"\\\"! {:?}\\\"\"\n\n#: src/std_misc/fs.md:49\nmsgid \"\\\"`echo hello > a/b.txt`\\\"\"\nmsgstr \"\\\"`echo hello > a/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:50\nmsgid \"\"\n\"// The previous match can be simplified using the `unwrap_or_else` method\\n\"\nmsgstr \"// 可以使用 `unwrap_or_else` 方法简化之前的匹配\\n\"\n\n#: src/std_misc/fs.md:51\nmsgid \"\\\"a/b.txt\\\"\"\nmsgstr \"\\\"a/b.txt\\\"\"\n\n#: src/std_misc/fs.md:55\nmsgid \"\\\"`mkdir -p a/c/d`\\\"\"\nmsgstr \"\\\"`mkdir -p a/c/d`\\\"\"\n\n#: src/std_misc/fs.md:56\nmsgid \"// Recursively create a directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 递归创建目录，返回 `io::Result<()>`\\n\"\n\n#: src/std_misc/fs.md:57 src/std_misc/fs.md:102\nmsgid \"\\\"a/c/d\\\"\"\nmsgstr \"\\\"a/c/d\\\"\"\n\n#: src/std_misc/fs.md:61\nmsgid \"\\\"`touch a/c/e.txt`\\\"\"\nmsgstr \"\\\"`touch a/c/e.txt`\\\"\"\n\n#: src/std_misc/fs.md:62 src/std_misc/fs.md:96\nmsgid \"\\\"a/c/e.txt\\\"\"\nmsgstr \"\\\"a/c/e.txt\\\"\"\n\n#: src/std_misc/fs.md:66\nmsgid \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\nmsgstr \"\\\"`ln -s ../b.txt a/c/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:67\nmsgid \"// Create a symbolic link, returns `io::Result<()>`\\n\"\nmsgstr \"// 创建符号链接，返回 `io::Result<()>`\\n\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74\nmsgid \"\\\"../b.txt\\\"\"\nmsgstr \"\\\"../b.txt\\\"\"\n\n#: src/std_misc/fs.md:69 src/std_misc/fs.md:74 src/std_misc/fs.md:80\nmsgid \"\\\"a/c/b.txt\\\"\"\nmsgstr \"\\\"a/c/b.txt\\\"\"\n\n#: src/std_misc/fs.md:79\nmsgid \"\\\"`cat a/c/b.txt`\\\"\"\nmsgstr \"\\\"`cat a/c/b.txt`\\\"\"\n\n#: src/std_misc/fs.md:85\nmsgid \"\\\"`ls a`\\\"\"\nmsgstr \"\\\"`ls a`\\\"\"\n\n#: src/std_misc/fs.md:86\nmsgid \"// Read the contents of a directory, returns `io::Result<Vec<Path>>`\\n\"\nmsgstr \"// 读取目录内容，返回 `io::Result<Vec<Path>>`\\n\"\n\n#: src/std_misc/fs.md:94\nmsgid \"\\\"`rm a/c/e.txt`\\\"\"\nmsgstr \"\\\"`rm a/c/e.txt`\\\"\"\n\n#: src/std_misc/fs.md:95\nmsgid \"// Remove a file, returns `io::Result<()>`\\n\"\nmsgstr \"// 删除文件，返回 `io::Result<()>`\\n\"\n\n#: src/std_misc/fs.md:100\nmsgid \"\\\"`rmdir a/c/d`\\\"\"\nmsgstr \"\\\"`rmdir a/c/d`\\\"\"\n\n#: src/std_misc/fs.md:101\nmsgid \"// Remove an empty directory, returns `io::Result<()>`\\n\"\nmsgstr \"// 删除空目录，返回 `io::Result<()>`\\n\"\n\n#: src/std_misc/fs.md:110\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ rustc fs.rs && ./fs\\n\"\n\"`mkdir a`\\n\"\n\"`echo hello > a/b.txt`\\n\"\n\"`mkdir -p a/c/d`\\n\"\n\"`touch a/c/e.txt`\\n\"\n\"`ln -s ../b.txt a/c/b.txt`\\n\"\n\"`cat a/c/b.txt`\\n\"\n\"> hello\\n\"\n\"`ls a`\\n\"\n\"> \\\"a/b.txt\\\"\\n\"\n\"> \\\"a/c\\\"\\n\"\n\"`rm a/c/e.txt`\\n\"\n\"`rmdir a/c/d`\\n\"\n\"```\"\n\n#: src/std_misc/fs.md:126\nmsgid \"And the final state of the `a` directory is:\"\nmsgstr \"最终 `a` 目录的状态如下：\"\n\n#: src/std_misc/fs.md:138\nmsgid \"An alternative way to define the function `cat` is with `?` notation:\"\nmsgstr \"另一种定义 `cat` 函数的方法是使用 `?` 运算符：\"\n\n#: src/std_misc/fs.md:151\nmsgid \"[`cfg!`](../attribute/cfg.md)\"\nmsgstr \"[`cfg!`](../attribute/cfg.md)\"\n\n#: src/std_misc/arg.md:3\nmsgid \"Standard Library\"\nmsgstr \"标准库\"\n\n#: src/std_misc/arg.md:5\nmsgid \"\"\n\"The command line arguments can be accessed using `std::env::args`, which \"\n\"returns an iterator that yields a `String` for each argument:\"\nmsgstr \"\"\n\"可以使用 `std::env::args` 访问命令行参数，它返回一个迭代器，为每个参数生成一\"\n\"个 `String`：\"\n\n#: src/std_misc/arg.md:14\nmsgid \"// The first argument is the path that was used to call the program.\\n\"\nmsgstr \"// 第一个参数是用于调用程序的路径\\n\"\n\n#: src/std_misc/arg.md:15\nmsgid \"\\\"My path is {}.\\\"\"\nmsgstr \"\\\"我的路径是 {}。\\\"\"\n\n#: src/std_misc/arg.md:17\nmsgid \"\"\n\"// The rest of the arguments are the passed command line parameters.\\n\"\n\"    // Call the program like this:\\n\"\n\"    //   $ ./args arg1 arg2\\n\"\nmsgstr \"\"\n\"// 其余参数是传递的命令行参数\\n\"\n\"    // 像这样调用程序：\\n\"\n\"    //   $ ./args arg1 arg2\\n\"\n\n#: src/std_misc/arg.md:20\nmsgid \"\\\"I got {:?} arguments: {:?}.\\\"\"\nmsgstr \"\\\"我获得了 {:?} 个参数：{:?}。\\\"\"\n\n#: src/std_misc/arg.md:24\nmsgid \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"My path is ./args.\\n\"\n\"I got 3 arguments: [\\\"1\\\", \\\"2\\\", \\\"3\\\"].\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ ./args 1 2 3\\n\"\n\"程序路径：./args\\n\"\n\"接收到 3 个参数：[\\\"1\\\"、\\\"2\\\"、\\\"3\\\"]\\n\"\n\"```\"\n\n#: src/std_misc/arg.md:32\nmsgid \"\"\n\"Alternatively, there are numerous crates that can provide extra \"\n\"functionality when creating command-line applications. One of the more \"\n\"popular command line argument crates being [`clap`](https://rust-\"\n\"cli.github.io/book/tutorial/cli-args.html#parsing-cli-arguments-with-clap).\"\nmsgstr \"\"\n\"此外，在开发命令行应用程序时，还有许多 crate 可以提供额外的功能。其中，\"\n\"[`clap`](https://rust-cli.github.io/book/tutorial/cli-args.html#parsing-cli-\"\n\"arguments-with-clap) 是一个广受欢迎的命令行参数处理 crate。\"\n\n#: src/std_misc/arg/matching.md:3\nmsgid \"Matching can be used to parse simple arguments:\"\nmsgstr \"可以使用模式匹配来解析简单的参数：\"\n\n#: src/std_misc/arg/matching.md:17\nmsgid \"\"\n\"\\\"usage:\\n\"\n\"match_args <string>\\n\"\n\"    Check whether given string is the answer.\\n\"\n\"match_args {{increase|decrease}} <integer>\\n\"\n\"    Increase or decrease given integer by one.\\\"\"\nmsgstr \"\"\n\"\\\"用法：\\n\"\n\"match_args <字符串>\\n\"\n\"    检查给定的字符串是否为正确答案。\\n\"\n\"match_args {{increase|decrease}} <整数>\\n\"\n\"    将给定的整数增加或减少 1。\\\"\"\n\n#: src/std_misc/arg/matching.md:28\nmsgid \"// no arguments passed\\n\"\nmsgstr \"// 未传递参数\\n\"\n\n#: src/std_misc/arg/matching.md:30\nmsgid \"\\\"My name is 'match_args'. Try passing some arguments!\\\"\"\nmsgstr \"\\\"我的名字是 'match_args'。试试传递一些参数吧！\\\"\"\n\n#: src/std_misc/arg/matching.md:32\nmsgid \"// one argument passed\\n\"\nmsgstr \"// 传递了一个参数\\n\"\n\n#: src/std_misc/arg/matching.md:35\nmsgid \"\\\"This is the answer!\\\"\"\nmsgstr \"\\\"这就是正确答案！\\\"\"\n\n#: src/std_misc/arg/matching.md:36\nmsgid \"\\\"This is not the answer.\\\"\"\nmsgstr \"\\\"这不是正确答案。\\\"\"\n\n#: src/std_misc/arg/matching.md:39\nmsgid \"// one command and one argument passed\\n\"\nmsgstr \"// 传递了一个命令和一个参数\\n\"\n\n#: src/std_misc/arg/matching.md:43\nmsgid \"// parse the number\\n\"\nmsgstr \"// 解析数字\\n\"\n\n#: src/std_misc/arg/matching.md:49\nmsgid \"\\\"error: second argument not an integer\\\"\"\nmsgstr \"\\\"错误：第二个参数不是整数\\\"\"\n\n#: src/std_misc/arg/matching.md:54\nmsgid \"// parse the command\\n\"\nmsgstr \"// 解析命令\\n\"\n\n#: src/std_misc/arg/matching.md:56\nmsgid \"\\\"increase\\\"\"\nmsgstr \"\\\"increase\\\"\"\n\n#: src/std_misc/arg/matching.md:57\nmsgid \"\\\"decrease\\\"\"\nmsgstr \"\\\"decrease\\\"\"\n\n#: src/std_misc/arg/matching.md:59\nmsgid \"\\\"error: invalid command\\\"\"\nmsgstr \"\\\"错误：无效的命令\\\"\"\n\n#: src/std_misc/arg/matching.md:64\nmsgid \"// all the other cases\\n\"\nmsgstr \"// 所有其他情况\\n\"\n\n#: src/std_misc/arg/matching.md:66\nmsgid \"// show a help message\\n\"\nmsgstr \"// 显示帮助信息\\n\"\n\n#: src/std_misc/arg/matching.md:73\nmsgid \"\"\n\"If you named your program `match_args.rs` and compile it like this `rustc \"\n\"match_args.rs`, you can execute it as follows:\"\nmsgstr \"\"\n\"如果你将程序命名为 `match_args.rs` 并使用 `rustc match_args.rs` 编译它，你可\"\n\"以按以下方式执行：\"\n\n#: src/std_misc/ffi.md:3\nmsgid \"\"\n\"Rust provides a Foreign Function Interface (FFI) to C libraries. Foreign \"\n\"functions must be declared inside an `extern` block annotated with a \"\n\"`#[link]` attribute containing the name of the foreign library.\"\nmsgstr \"\"\n\"Rust 提供了与 C 库交互的外部函数接口（FFI）。外部函数必须在 `extern` 块内声\"\n\"明，并使用 `#[link]` 属性标注外部库的名称。\"\n\n#: src/std_misc/ffi.md:9\nmsgid \"// this extern block links to the libm library\\n\"\nmsgstr \"// 此 extern 块链接到 libm 库\\n\"\n\n#: src/std_misc/ffi.md:12\nmsgid \"\\\"msvcrt\\\"\"\nmsgstr \"\\\"msvcrt\\\"\"\n\n#: src/std_misc/ffi.md:14 src/std_misc/ffi.md:23\nmsgid \"\"\n\"// this is a foreign function\\n\"\n\"    // that computes the square root of a single precision complex number\\n\"\nmsgstr \"\"\n\"// 这是一个外部函数\\n\"\n\"    // 用于计算单精度复数的平方根\\n\"\n\n#: src/std_misc/ffi.md:21\nmsgid \"\\\"m\\\"\"\nmsgstr \"\\\"m\\\"\"\n\n#: src/std_misc/ffi.md:29\nmsgid \"\"\n\"// Since calling foreign functions is considered unsafe,\\n\"\n\"// it's common to write safe wrappers around them.\\n\"\nmsgstr \"\"\n\"// 由于调用外部函数被认为是不安全的，\\n\"\n\"// 通常会为它们编写安全的包装函数。\\n\"\n\n#: src/std_misc/ffi.md:37\nmsgid \"// z = -1 + 0i\\n\"\nmsgstr \"// z = -1 + 0i\\n\"\n\n#: src/std_misc/ffi.md:40\nmsgid \"// calling a foreign function is an unsafe operation\\n\"\nmsgstr \"// 调用外部函数是一个不安全的操作\\n\"\n\n#: src/std_misc/ffi.md:43\nmsgid \"\\\"the square root of {:?} is {:?}\\\"\"\nmsgstr \"\\\"{:?} 的平方根是 {:?}\\\"\"\n\n#: src/std_misc/ffi.md:45\nmsgid \"// calling safe API wrapped around unsafe operation\\n\"\nmsgstr \"// 调用封装了不安全操作的安全 API\\n\"\n\n#: src/std_misc/ffi.md:46\nmsgid \"\\\"cos({:?}) = {:?}\\\"\"\nmsgstr \"\\\"cos({:?}) = {:?}\\\"\"\n\n#: src/std_misc/ffi.md:48\nmsgid \"// Minimal implementation of single precision complex numbers\\n\"\nmsgstr \"// 单精度复数的最小实现\\n\"\n\n#: src/std_misc/ffi.md:60\nmsgid \"\\\"{}-{}i\\\"\"\nmsgstr \"\\\"{}-{}i\\\"\"\n\n#: src/std_misc/ffi.md:62\nmsgid \"\\\"{}+{}i\\\"\"\nmsgstr \"\\\"{}+{}i\\\"\"\n\n#: src/testing.md:3\nmsgid \"\"\n\"Rust is a programming language that cares a lot about correctness and it \"\n\"includes support for writing software tests within the language itself.\"\nmsgstr \"Rust 是一种非常注重正确性的编程语言，它内置了编写软件测试的支持。\"\n\n#: src/testing.md:6\nmsgid \"Testing comes in three styles:\"\nmsgstr \"测试分为三种类型：\"\n\n#: src/testing.md:8\nmsgid \"[Unit](testing/unit_testing.md) testing.\"\nmsgstr \"[单元测试](testing/unit_testing.md)\"\n\n#: src/testing.md:9\nmsgid \"[Doc](testing/doc_testing.md) testing.\"\nmsgstr \"[文档测试](testing/doc_testing.md)\"\n\n#: src/testing.md:10\nmsgid \"[Integration](testing/integration_testing.md) testing.\"\nmsgstr \"[集成测试](testing/integration_testing.md)\"\n\n#: src/testing.md:12\nmsgid \"Also Rust has support for specifying additional dependencies for tests:\"\nmsgstr \"此外，Rust 还支持为测试指定额外的依赖项：\"\n\n#: src/testing.md:14\nmsgid \"[Dev-dependencies](testing/dev_dependencies.md)\"\nmsgstr \"[开发依赖](testing/dev_dependencies.md)\"\n\n#: src/testing.md:18\nmsgid \"\"\n\"[The Book](https://doc.rust-lang.org/book/ch11-00-testing.html) chapter on \"\n\"testing\"\nmsgstr \"\"\n\"《Rust 程序设计语言》中[关于测试的章节](https://doc.rust-lang.org/book/\"\n\"ch11-00-testing.html)\"\n\n#: src/testing.md:19\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on doc-testing\"\nmsgstr \"\"\n\"API 指南中[关于文档测试的内容](https://rust-lang-nursery.github.io/api-\"\n\"guidelines/documentation.html)\"\n\n#: src/testing/unit_testing.md:3\nmsgid \"\"\n\"Tests are Rust functions that verify that the non-test code is functioning \"\n\"in the expected manner. The bodies of test functions typically perform some \"\n\"setup, run the code we want to test, then assert whether the results are \"\n\"what we expect.\"\nmsgstr \"\"\n\"测试是 Rust 函数，用于验证非测试代码是否按预期方式运行。测试函数的主体通常包\"\n\"括一些准备工作，运行待测试的代码，然后断言结果是否符合预期。\"\n\n#: src/testing/unit_testing.md:8\nmsgid \"\"\n\"Most unit tests go into a `tests` [mod](../mod.md) with the `#[cfg(test)]` \"\n\"[attribute](../attribute.md). Test functions are marked with the `#[test]` \"\n\"attribute.\"\nmsgstr \"\"\n\"大多数单元测试都放在带有 `#[cfg(test)]` [属性](../attribute.md)的 `tests` [模\"\n\"块](../mod.md)中。测试函数用 `#[test]` 属性标记。\"\n\n#: src/testing/unit_testing.md:11\nmsgid \"\"\n\"Tests fail when something in the test function [panics](../std/panic.md). \"\n\"There are some helper [macros](../macros.md):\"\nmsgstr \"\"\n\"当测试函数中出现[恐慌（panic）](../std/panic.md)时，测试就会失败。以下是一些\"\n\"辅助[宏](../macros.md)：\"\n\n#: src/testing/unit_testing.md:14\nmsgid \"`assert!(expression)` - panics if expression evaluates to `false`.\"\nmsgstr \"`assert!(expression)` - 如果表达式求值为 `false`，则会触发 panic。\"\n\n#: src/testing/unit_testing.md:15\nmsgid \"\"\n\"`assert_eq!(left, right)` and `assert_ne!(left, right)` - testing left and \"\n\"right expressions for equality and inequality respectively.\"\nmsgstr \"\"\n\"`assert_eq!(left, right)` 和 `assert_ne!(left, right)` - 分别用于测试左右表达\"\n\"式的相等性和不相等性。\"\n\n#: src/testing/unit_testing.md:22\nmsgid \"\"\n\"// This is a really bad adding function, its purpose is to fail in this\\n\"\n\"// example.\\n\"\nmsgstr \"// 这是一个非常糟糕的加法函数，它的目的是在这个例子中失败。\\n\"\n\n#: src/testing/unit_testing.md:32\nmsgid \"\"\n\"// Note this useful idiom: importing names from outer (for mod tests) \"\n\"scope.\\n\"\nmsgstr \"\"\n\"// 注意这个有用的惯用法：从外部作用域（对于 mod tests 而言）导入名称。\\n\"\n\n#: src/testing/unit_testing.md:42\nmsgid \"\"\n\"// This assert would fire and test will fail.\\n\"\n\"        // Please note, that private functions can be tested too!\\n\"\nmsgstr \"\"\n\"// 这个断言会触发，测试将失败。\\n\"\n\"        // 请注意，私有函数也可以被测试！\\n\"\n\n#: src/testing/unit_testing.md:49\nmsgid \"Tests can be run with `cargo test`.\"\nmsgstr \"可以使用 `cargo test` 命令运行测试。\"\n\n#: src/testing/unit_testing.md:73\nmsgid \"Tests and `?`\"\nmsgstr \"测试与 `?` 运算符\"\n\n#: src/testing/unit_testing.md:75\nmsgid \"\"\n\"None of the previous unit test examples had a return type. But in Rust 2018, \"\n\"your unit tests can return `Result<()>`, which lets you use `?` in them! \"\n\"This can make them much more concise.\"\nmsgstr \"\"\n\"之前的单元测试示例都没有返回类型。但在 Rust 2018 版本中，你的单元测试可以返\"\n\"回 `Result<()>`，这使得你可以在测试中使用 `?` 运算符！这可以使测试代码更加简\"\n\"洁。\"\n\n#: src/testing/unit_testing.md:84\nmsgid \"\\\"negative floats don't have square roots\\\"\"\nmsgstr \"\\\"负浮点数没有平方根\\\"\"\n\n#: src/testing/unit_testing.md:101\nmsgid \"\"\n\"See [\\\"The Edition Guide\\\"](https://doc.rust-lang.org/edition-guide/\"\n\"rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html) \"\n\"for more details.\"\nmsgstr \"\"\n\"更多详情请参阅[《版本指南》](https://doc.rust-lang.org/edition-guide/\"\n\"rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html)。\"\n\n#: src/testing/unit_testing.md:103\nmsgid \"Testing panics\"\nmsgstr \"测试 panic\"\n\n#: src/testing/unit_testing.md:105\nmsgid \"\"\n\"To check functions that should panic under certain circumstances, use \"\n\"attribute `#[should_panic]`. This attribute accepts optional parameter \"\n\"`expected = ` with the text of the panic message. If your function can panic \"\n\"in multiple ways, it helps make sure your test is testing the correct panic.\"\nmsgstr \"\"\n\"要检查在某些情况下应该触发恐慌的函数，可以使用 `#[should_panic]` 属性。这个属\"\n\"性接受可选参数 `expected = `，用于指定预期的恐慌消息文本。如果你的函数可能以\"\n\"多种方式触发 panic，这有助于确保你的测试正在检查正确的 panic 情况。\"\n\n#: src/testing/unit_testing.md:110\nmsgid \"\"\n\"**Note**: Rust also allows a shorthand form `#[should_panic = \\\"message\\\"]`, \"\n\"which works exactly like `#[should_panic(expected = \\\"message\\\")]`. Both are \"\n\"valid; the latter is more commonly used and is considered more explicit.\"\nmsgstr \"\"\n\"**注意**：Rust 还允许使用简写形式 `#[should_panic = \\\"message\\\"]`，其功能与 \"\n\"`#[should_panic(expected = \\\"message\\\")]` 完全相同。两种形式都有效；后者更常\"\n\"用，被认为更明确。\"\n\n#: src/testing/unit_testing.md:117 src/testing/doc_testing.md:46\nmsgid \"\\\"Divide-by-zero error\\\"\"\nmsgstr \"\\\"除以零错误\\\"\"\n\n#: src/testing/unit_testing.md:119 src/testing/unit_testing.md:140\n#: src/testing/unit_testing.md:146\nmsgid \"\\\"Divide result is zero\\\"\"\nmsgstr \"\\\"除法结果为零\\\"\"\n\n#: src/testing/unit_testing.md:146\nmsgid \"// This also works\\n\"\nmsgstr \"// 这样也可以\\n\"\n\n#: src/testing/unit_testing.md:153\nmsgid \"Running these tests gives us:\"\nmsgstr \"运行这些测试会得到以下结果：\"\n\n#: src/testing/unit_testing.md:173\nmsgid \"Running specific tests\"\nmsgstr \"运行特定测试\"\n\n#: src/testing/unit_testing.md:175\nmsgid \"\"\n\"To run specific tests one may specify the test name to `cargo test` command.\"\nmsgstr \"要运行特定的测试，可以在 `cargo test` 命令中指定测试名称。\"\n\n#: src/testing/unit_testing.md:191\nmsgid \"\"\n\"To run multiple tests one may specify part of a test name that matches all \"\n\"the tests that should be run.\"\nmsgstr \"\"\n\"要运行多个测试，可以指定测试名称的一部分，该部分匹配所有应该运行的测试。\"\n\n#: src/testing/unit_testing.md:209\nmsgid \"Ignoring tests\"\nmsgstr \"忽略测试\"\n\n#: src/testing/unit_testing.md:211\nmsgid \"\"\n\"Tests can be marked with the `#[ignore]` attribute to exclude some tests. Or \"\n\"to run them with command `cargo test -- --ignored`\"\nmsgstr \"\"\n\"可以使用 `#[ignore]` 属性标记测试以排除某些测试。或者使用命令 `cargo test -- \"\n\"--ignored` 来运行这些被忽略的测试。\"\n\n#: src/testing/doc_testing.md:3\nmsgid \"\"\n\"The primary way of documenting a Rust project is through annotating the \"\n\"source code. Documentation comments are written in [CommonMark Markdown \"\n\"specification](https://commonmark.org/) and support code blocks in them. \"\n\"Rust takes care about correctness, so these code blocks are compiled and \"\n\"used as documentation tests.\"\nmsgstr \"\"\n\"Rust 项目的主要文档编写方式是通过在源代码中添加注释。文档注释使用 \"\n\"[CommonMark Markdown 规范](https://commonmark.org/)编写，并支持其中的代码块。\"\n\"Rust 注重正确性，因此这些代码块会被编译并用作文档测试。\"\n\n#: src/testing/doc_testing.md:10\nmsgid \"\"\n\"/// First line is a short summary describing function.\\n\"\n\"///\\n\"\n\"/// The next lines present detailed documentation. Code blocks start with\\n\"\n\"/// triple backquotes and have implicit `fn main()` inside\\n\"\n\"/// and `extern crate <cratename>`. Assume we're testing a `playground` \"\n\"library\\n\"\n\"/// crate or using the Playground's Test action:\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 第一行是函数的简要描述。\\n\"\n\"///\\n\"\n\"/// 接下来的几行是详细文档。代码块以三个反引号开始，\\n\"\n\"/// 并隐含了 `fn main()` 函数和 `extern crate <cratename>` 声明。\\n\"\n\"/// 假设我们正在测试 `playground` crate：\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::add(2, 3);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:24\nmsgid \"\"\n\"/// Usually doc comments may include sections \\\"Examples\\\", \\\"Panics\\\" and \"\n\"\\\"Failures\\\".\\n\"\n\"///\\n\"\n\"/// The next function divides two numbers.\\n\"\n\"///\\n\"\n\"/// # Examples\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # Panics\\n\"\n\"///\\n\"\n\"/// The function panics if the second argument is zero.\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // panics on division by zero\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 文档注释通常包含\\\"示例\\\"、\\\"异常\\\"和\\\"错误\\\"等部分。\\n\"\n\"///\\n\"\n\"/// 下面的函数用于两数相除。\\n\"\n\"///\\n\"\n\"/// # 示例\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// let result = playground::div(10, 2);\\n\"\n\"/// assert_eq!(result, 5);\\n\"\n\"/// ```\\n\"\n\"///\\n\"\n\"/// # 异常\\n\"\n\"///\\n\"\n\"/// 当第二个参数为零时，函数会触发异常。\\n\"\n\"///\\n\"\n\"/// ```rust,should_panic\\n\"\n\"/// // 除以零会触发异常\\n\"\n\"/// playground::div(10, 0);\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:53\nmsgid \"\"\n\"Code blocks in documentation are automatically tested when running the \"\n\"regular `cargo test` command:\"\nmsgstr \"运行常规的 `cargo test` 命令时，文档中的代码块会自动进行测试：\"\n\n#: src/testing/doc_testing.md:72\nmsgid \"Motivation behind documentation tests\"\nmsgstr \"文档测试的动机\"\n\n#: src/testing/doc_testing.md:74\nmsgid \"\"\n\"The main purpose of documentation tests is to serve as examples that \"\n\"exercise the functionality, which is one of the most important [guidelines]\"\n\"(https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html#examples-use--not-try-not-unwrap-c-question-mark). It \"\n\"allows using examples from docs as complete code snippets. But using `?` \"\n\"makes compilation fail since `main` returns `unit`. The ability to hide some \"\n\"source lines from documentation comes to the rescue: one may write `fn \"\n\"try_main() -> Result<(), ErrorType>`, hide it and `unwrap` it in hidden \"\n\"`main`. Sounds complicated? Here's an example:\"\nmsgstr \"\"\n\"文档测试的主要目的是提供功能演示的示例，这是最重要的[指导原则](https://rust-\"\n\"lang-nursery.github.io/api-guidelines/documentation.html#examples-use--not-\"\n\"try-not-unwrap-c-question-mark)之一。它允许将文档中的示例作为完整的代码片段使\"\n\"用。但是使用 `?` 会导致编译失败，因为 `main` 函数返回 `unit` 类型。这时，隐藏\"\n\"文档中的某些源代码行就派上用场了：可以编写 `fn try_main() -> Result<(), \"\n\"ErrorType>`，将其隐藏，并在隐藏的 `main` 函数中 `unwrap` 它。听起来很复杂？这\"\n\"里有一个例子：\"\n\n#: src/testing/doc_testing.md:83\nmsgid \"\"\n\"/// Using hidden `try_main` in doc tests.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // hidden lines start with `#` symbol, but they're still compilable!\\n\"\n\"/// # fn try_main() -> Result<(), String> { // line that wraps the body \"\n\"shown in doc\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // returning from try_main\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // starting main that'll unwrap()\\n\"\n\"/// #    try_main().unwrap(); // calling try_main and unwrapping\\n\"\n\"/// #                         // so that test will panic in case of error\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 在文档测试中使用隐藏的 `try_main` 函数。\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # // 以 `#` 开头的行在文档中是隐藏的，但它们仍然可以编译！\\n\"\n\"/// # fn try_main() -> Result<(), String> { // 这行包装了文档中显示的函数体\\n\"\n\"/// let res = playground::try_div(10, 2)?;\\n\"\n\"/// # Ok(()) // 从 try_main 返回\\n\"\n\"/// # }\\n\"\n\"/// # fn main() { // 开始会调用 unwrap() 的 main 函数\\n\"\n\"/// #    try_main().unwrap(); // 调用 try_main 并解包\\n\"\n\"/// #                         // 这样在出错时测试会触发 panic\\n\"\n\"/// # }\\n\"\n\"/// ```\\n\"\n\n#: src/testing/doc_testing.md:98\nmsgid \"\\\"Divide-by-zero\\\"\"\nmsgstr \"\\\"除以零错误\\\"\"\n\n#: src/testing/doc_testing.md:107\nmsgid \"\"\n\"[RFC505](https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-\"\n\"conventions.md) on documentation style\"\nmsgstr \"\"\n\"关于文档风格的 [RFC505](https://github.com/rust-lang/rfcs/blob/master/text/\"\n\"0505-api-comment-conventions.md)\"\n\n#: src/testing/doc_testing.md:108\nmsgid \"\"\n\"[API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html) on documentation guidelines\"\nmsgstr \"\"\n\"关于文档指南的 [API 指南](https://rust-lang-nursery.github.io/api-guidelines/\"\n\"documentation.html)\"\n\n#: src/testing/integration_testing.md:3\nmsgid \"\"\n\"[Unit tests](unit_testing.md) are testing one module in isolation at a time: \"\n\"they're small and can test private code. Integration tests are external to \"\n\"your crate and use only its public interface in the same way any other code \"\n\"would. Their purpose is to test that many parts of your library work \"\n\"correctly together.\"\nmsgstr \"\"\n\"[单元测试](unit_testing.md)每次只隔离测试一个模块：它们规模小，可以测试私有代\"\n\"码。集成测试则位于 crate 外部，仅使用其公共接口，就像其他代码一样。集成测试的\"\n\"目的是验证库的多个部分能否正确协同工作。\"\n\n#: src/testing/integration_testing.md:8\nmsgid \"Cargo looks for integration tests in `tests` directory next to `src`.\"\nmsgstr \"Cargo 在 `src` 目录旁的 `tests` 目录中查找集成测试。\"\n\n#: src/testing/integration_testing.md:10 src/testing/dev_dependencies.md:17\nmsgid \"File `src/lib.rs`:\"\nmsgstr \"文件 `src/lib.rs`：\"\n\n#: src/testing/integration_testing.md:13\nmsgid \"// Define this in a crate called `adder`.\\n\"\nmsgstr \"// 在名为 `adder` 的 crate 中定义此内容。\\n\"\n\n#: src/testing/integration_testing.md:19\nmsgid \"File with test: `tests/integration_test.rs`:\"\nmsgstr \"测试文件：`tests/integration_test.rs`：\"\n\n#: src/testing/integration_testing.md:28\nmsgid \"Running tests with `cargo test` command:\"\nmsgstr \"使用 `cargo test` 命令运行测试：\"\n\n#: src/testing/integration_testing.md:50\nmsgid \"\"\n\"Each Rust source file in the `tests` directory is compiled as a separate \"\n\"crate. In order to share some code between integration tests we can make a \"\n\"module with public functions, importing and using it within tests.\"\nmsgstr \"\"\n\"`tests` 目录中的每个 Rust 源文件都被编译为独立的 crate。为了在集成测试之间共\"\n\"享代码，我们可以创建一个包含公共函数的模块，然后在测试中导入并使用它。\"\n\n#: src/testing/integration_testing.md:54\nmsgid \"File `tests/common/mod.rs`:\"\nmsgstr \"文件 `tests/common/mod.rs`：\"\n\n#: src/testing/integration_testing.md:58\nmsgid \"\"\n\"// some setup code, like creating required files/directories, starting\\n\"\n\"    // servers, etc.\\n\"\nmsgstr \"\"\n\"// 一些设置代码，如创建必要的文件/目录，启动\\n\"\n\"    // 服务器等。\\n\"\n\n#: src/testing/integration_testing.md:63\nmsgid \"File with test: `tests/integration_test.rs`\"\nmsgstr \"测试文件：`tests/integration_test.rs`\"\n\n#: src/testing/integration_testing.md:66\nmsgid \"// importing common module.\\n\"\nmsgstr \"// 导入 common 模块。\\n\"\n\n#: src/testing/integration_testing.md:71\nmsgid \"// using common code.\\n\"\nmsgstr \"// 使用公共代码。\\n\"\n\n#: src/testing/integration_testing.md:77\nmsgid \"\"\n\"Creating the module as `tests/common.rs` also works, but is not recommended \"\n\"because the test runner will treat the file as a test crate and try to run \"\n\"tests inside it.\"\nmsgstr \"\"\n\"将模块创建为 `tests/common.rs` 也可行，但不推荐，因为测试运行器会将该文件视为\"\n\"测试 crate 并尝试运行其中的测试。\"\n\n#: src/testing/dev_dependencies.md:1\nmsgid \"Development dependencies\"\nmsgstr \"开发依赖\"\n\n#: src/testing/dev_dependencies.md:3\nmsgid \"\"\n\"Sometimes there is a need to have dependencies for tests (or examples, or \"\n\"benchmarks) only. Such dependencies are added to `Cargo.toml` in the `[dev-\"\n\"dependencies]` section. These dependencies are not propagated to other \"\n\"packages which depend on this package.\"\nmsgstr \"\"\n\"有时我们需要仅用于测试（或示例、基准测试）的依赖项。这些依赖项添加在 \"\n\"`Cargo.toml` 的 `[dev-dependencies]` 部分。这些依赖项不会传递给依赖于本包的其\"\n\"他包。\"\n\n#: src/testing/dev_dependencies.md:8\nmsgid \"\"\n\"One such example is [`pretty_assertions`](https://docs.rs/pretty_assertions/\"\n\"1.0.0/pretty_assertions/index.html), which extends standard `assert_eq!` and \"\n\"`assert_ne!` macros, to provide colorful diff. File `Cargo.toml`:\"\nmsgstr \"\"\n\"例如 [`pretty_assertions`](https://docs.rs/pretty_assertions/1.0.0/\"\n\"pretty_assertions/index.html)，它扩展了标准的 `assert_eq!` 和 `assert_ne!` \"\n\"宏，提供彩色差异对比。  \\n\"\n\"文件 `Cargo.toml`：\"\n\n#: src/testing/dev_dependencies.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"# standard crate data is left out\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"# 省略标准的 crate 数据\\n\"\n\"[dev-dependencies]\\n\"\n\"pretty_assertions = \\\"1\\\"\\n\"\n\"```\"\n\n#: src/testing/dev_dependencies.md:27\nmsgid \"// crate for test-only use. Cannot be used in non-test code.\\n\"\nmsgstr \"// 仅用于测试的 crate。不能在非测试代码中使用。\\n\"\n\n#: src/testing/dev_dependencies.md:38\nmsgid \"\"\n\"[Cargo](http://doc.crates.io/specifying-dependencies.html) docs on \"\n\"specifying dependencies.\"\nmsgstr \"\"\n\"[Cargo 文档](http://doc.crates.io/specifying-dependencies.html)中关于指定依赖\"\n\"项的说明。\"\n\n#: src/unsafe.md:3\nmsgid \"\"\n\"As an introduction to this section, to borrow from [the official docs]\"\n\"(https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html), \\\"one should try \"\n\"to minimize the amount of unsafe code in a code base.\\\" With that in mind, \"\n\"let's get started! Unsafe annotations in Rust are used to bypass protections \"\n\"put in place by the compiler; specifically, there are four primary things \"\n\"that unsafe is used for:\"\nmsgstr \"\"\n\"作为本节的引言，借用[官方文档](https://doc.rust-lang.org/book/ch19-01-unsafe-\"\n\"rust.html)的话说：\\\"应该尽量减少代码库中不安全代码的数量。\\\"牢记这一点，让我\"\n\"们开始吧！Rust 中的不安全标注用于绕过编译器设置的保护机制。具体来说，不安全主\"\n\"要用于以下四个方面：\"\n\n#: src/unsafe.md:9\nmsgid \"dereferencing raw pointers\"\nmsgstr \"解引用裸指针\"\n\n#: src/unsafe.md:10\nmsgid \"\"\n\"calling functions or methods which are `unsafe` (including calling a \"\n\"function over FFI, see [a previous chapter](std_misc/ffi.md) of the book)\"\nmsgstr \"\"\n\"调用被标记为 `unsafe` 的函数或方法（包括通过 FFI 调用函数，参见本书[前面的章\"\n\"节](std_misc/ffi.md)）\"\n\n#: src/unsafe.md:12\nmsgid \"accessing or modifying static mutable variables\"\nmsgstr \"访问或修改静态可变变量\"\n\n#: src/unsafe.md:13\nmsgid \"implementing unsafe traits\"\nmsgstr \"实现不安全特征\"\n\n#: src/unsafe.md:15\nmsgid \"Raw Pointers\"\nmsgstr \"裸指针\"\n\n#: src/unsafe.md:17\nmsgid \"\"\n\"Raw pointers `*` and references `&T` function similarly, but references are \"\n\"always safe because they are guaranteed to point to valid data due to the \"\n\"borrow checker. Dereferencing a raw pointer can only be done through an \"\n\"unsafe block.\"\nmsgstr \"\"\n\"裸指针 `*` 和引用 `&T` 的功能类似，但引用总是安全的，因为借用检查器保证它们指\"\n\"向有效数据。解引用裸指针只能在 unsafe 块中进行。\"\n\n#: src/unsafe.md:32\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"调用不安全函数\"\n\n#: src/unsafe.md:34\nmsgid \"\"\n\"Some functions can be declared as `unsafe`, meaning it is the programmer's \"\n\"responsibility to ensure correctness instead of the compiler's. One example \"\n\"of this is [`std::slice::from_raw_parts`](https://doc.rust-lang.org/std/\"\n\"slice/fn.from_raw_parts.html) which will create a slice given a pointer to \"\n\"the first element and a length.\"\nmsgstr \"\"\n\"某些函数可以被声明为 `unsafe`，这意味着确保其正确性是程序员的责任，而不是编译\"\n\"器的责任。一个例子是 [`std::slice::from_raw_parts`](https://doc.rust-\"\n\"lang.org/std/slice/fn.from_raw_parts.html)，它根据指向第一个元素的指针和长度\"\n\"创建一个切片。\"\n\n#: src/unsafe.md:56\nmsgid \"\"\n\"For `slice::from_raw_parts`, one of the assumptions which _must_ be upheld \"\n\"is that the pointer passed in points to valid memory and that the memory \"\n\"pointed to is of the correct type. If these invariants aren't upheld then \"\n\"the program's behaviour is undefined and there is no knowing what will \"\n\"happen.\"\nmsgstr \"\"\n\"对于 `slice::from_raw_parts`，**必须**遵守的一个假设是：传入的指针指向有效内\"\n\"存，且指向的内存类型正确。如果这些不变量未被遵守，那么程序的行为将是未定义\"\n\"的，无法预知会发生什么。\"\n\n#: src/unsafe/asm.md:3\nmsgid \"\"\n\"Rust provides support for inline assembly via the `asm!` macro. It can be \"\n\"used to embed handwritten assembly in the assembly output generated by the \"\n\"compiler. Generally this should not be necessary, but might be where the \"\n\"required performance or timing cannot be otherwise achieved. Accessing low \"\n\"level hardware primitives, e.g. in kernel code, may also demand this \"\n\"functionality.\"\nmsgstr \"\"\n\"Rust 通过 `asm!` 宏提供了内联汇编支持。它可以用于在编译器生成的汇编输出中嵌入\"\n\"手写的汇编代码。通常这不是必需的，但在无法通过其他方式实现所需性能或时序要求\"\n\"时可能会用到。访问底层硬件原语（例如在内核代码中）也可能需要这个功能。\"\n\n#: src/unsafe/asm.md:8\nmsgid \"\"\n\"**Note**: the examples here are given in x86/x86-64 assembly, but other \"\n\"architectures are also supported.\"\nmsgstr \"**注意**：这里的示例使用 x86/x86-64 汇编，但也支持其他架构。\"\n\n#: src/unsafe/asm.md:10\nmsgid \"Inline assembly is currently supported on the following architectures:\"\nmsgstr \"目前支持内联汇编的架构包括：\"\n\n#: src/unsafe/asm.md:12\nmsgid \"x86 and x86-64\"\nmsgstr \"x86 和 x86-64\"\n\n#: src/unsafe/asm.md:13\nmsgid \"ARM\"\nmsgstr \"ARM\"\n\n#: src/unsafe/asm.md:14\nmsgid \"AArch64\"\nmsgstr \"AArch64\"\n\n#: src/unsafe/asm.md:15\nmsgid \"RISC-V\"\nmsgstr \"RISC-V\"\n\n#: src/unsafe/asm.md:17\nmsgid \"Basic usage\"\nmsgstr \"基本用法\"\n\n#: src/unsafe/asm.md:19\nmsgid \"Let us start with the simplest possible example:\"\nmsgstr \"让我们从最简单的例子开始：\"\n\n#: src/unsafe/asm.md:22 src/unsafe/asm.md:42 src/unsafe/asm.md:69\n#: src/unsafe/asm.md:107 src/unsafe/asm.md:124 src/unsafe/asm.md:149\n#: src/unsafe/asm.md:183 src/unsafe/asm.md:204 src/unsafe/asm.md:221\n#: src/unsafe/asm.md:260 src/unsafe/asm.md:296 src/unsafe/asm.md:312\n#: src/unsafe/asm.md:338 src/unsafe/asm.md:376 src/unsafe/asm.md:403\n#: src/unsafe/asm.md:427 src/unsafe/asm.md:465\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe/asm.md:26\nmsgid \"\\\"nop\\\"\"\nmsgstr \"\\\"nop\\\"\"\n\n#: src/unsafe/asm.md:31\nmsgid \"\"\n\"This will insert a NOP (no operation) instruction into the assembly \"\n\"generated by the compiler. Note that all `asm!` invocations have to be \"\n\"inside an `unsafe` block, as they could insert arbitrary instructions and \"\n\"break various invariants. The instructions to be inserted are listed in the \"\n\"first argument of the `asm!` macro as a string literal.\"\nmsgstr \"\"\n\"这将在编译器生成的汇编代码中插入一条 NOP（无操作）指令。请注意，所有 `asm!` \"\n\"调用都必须放在 `unsafe` 块内，因为它们可能插入任意指令并破坏各种不变量。要插\"\n\"入的指令以字符串字面量的形式列在 `asm!` 宏的第一个参数中。\"\n\n#: src/unsafe/asm.md:36\nmsgid \"Inputs and outputs\"\nmsgstr \"输入和输出\"\n\n#: src/unsafe/asm.md:38\nmsgid \"\"\n\"Now inserting an instruction that does nothing is rather boring. Let us do \"\n\"something that actually acts on data:\"\nmsgstr \"插入一个什么都不做的指令相当无聊。让我们来做些实际操作数据的事情：\"\n\n#: src/unsafe/asm.md:47\nmsgid \"\\\"mov {}, 5\\\"\"\nmsgstr \"\\\"mov {}, 5\\\"\"\n\n#: src/unsafe/asm.md:53\nmsgid \"\"\n\"This will write the value `5` into the `u64` variable `x`. You can see that \"\n\"the string literal we use to specify instructions is actually a template \"\n\"string. It is governed by the same rules as Rust [format strings](https://\"\n\"doc.rust-lang.org/std/fmt/#syntax). The arguments that are inserted into the \"\n\"template however look a bit different than you may be familiar with. First \"\n\"we need to specify if the variable is an input or an output of the inline \"\n\"assembly. In this case it is an output. We declared this by writing `out`. \"\n\"We also need to specify in what kind of register the assembly expects the \"\n\"variable. In this case we put it in an arbitrary general purpose register by \"\n\"specifying `reg`. The compiler will choose an appropriate register to insert \"\n\"into the template and will read the variable from there after the inline \"\n\"assembly finishes executing.\"\nmsgstr \"\"\n\"这将把值 `5` 写入 `u64` 类型的变量 `x`。你可以看到，我们用来指定指令的字符串\"\n\"字面量实际上是一个模板字符串。它遵循与 Rust [格式化字符串](https://doc.rust-\"\n\"lang.org/std/fmt/#syntax)相同的规则。然而，插入到模板中的参数看起来可能与你熟\"\n\"悉的有些不同。首先，我们需要指定变量是内联汇编的输入还是输出。在这个例子中，\"\n\"它是一个输出。我们通过写 `out` 来声明这一点。我们还需要指定汇编期望变量在什么\"\n\"类型的寄存器中。这里我们通过指定 `reg` 将其放在任意通用寄存器中。编译器将选择\"\n\"一个合适的寄存器插入到模板中，并在内联汇编执行完成后从该寄存器读取变量的值。\"\n\n#: src/unsafe/asm.md:66\nmsgid \"Let us see another example that also uses an input:\"\nmsgstr \"让我们再看一个使用输入的例子：\"\n\n#: src/unsafe/asm.md:76\nmsgid \"\\\"mov {0}, {1}\\\"\"\nmsgstr \"\\\"mov {0}, {1}\\\"\"\n\n#: src/unsafe/asm.md:77 src/unsafe/asm.md:112 src/unsafe/asm.md:130\nmsgid \"\\\"add {0}, 5\\\"\"\nmsgstr \"\\\"add {0}, 5\\\"\"\n\n#: src/unsafe/asm.md:86\nmsgid \"\"\n\"This will add `5` to the input in variable `i` and write the result to \"\n\"variable `o`. The particular way this assembly does this is first copying \"\n\"the value from `i` to the output, and then adding `5` to it.\"\nmsgstr \"\"\n\"这段代码会将 `5` 加到变量 `i` 的值上，然后将结果写入变量 `o`。具体的汇编实现\"\n\"是先将 `i` 的值复制到输出寄存器，然后再加上 `5`。\"\n\n#: src/unsafe/asm.md:90\nmsgid \"The example shows a few things:\"\nmsgstr \"这个例子展示了几个要点：\"\n\n#: src/unsafe/asm.md:92\nmsgid \"\"\n\"First, we can see that `asm!` allows multiple template string arguments; \"\n\"each one is treated as a separate line of assembly code, as if they were all \"\n\"joined together with newlines between them. This makes it easy to format \"\n\"assembly code.\"\nmsgstr \"\"\n\"`asm!` 宏支持多个模板字符串参数，每个参数都被视为独立的汇编代码行，就像它们之\"\n\"间用换行符连接一样。这使得格式化汇编代码变得简单。\"\n\n#: src/unsafe/asm.md:97\nmsgid \"\"\n\"Second, we can see that inputs are declared by writing `in` instead of `out`.\"\nmsgstr \"其次，我们可以看到输入参数使用 `in` 声明，而不是 `out`。\"\n\n#: src/unsafe/asm.md:99\nmsgid \"\"\n\"Third, we can see that we can specify an argument number, or name as in any \"\n\"format string. For inline assembly templates this is particularly useful as \"\n\"arguments are often used more than once. For more complex inline assembly \"\n\"using this facility is generally recommended, as it improves readability, \"\n\"and allows reordering instructions without changing the argument order.\"\nmsgstr \"\"\n\"第三，我们可以像在任何格式字符串中一样指定参数编号或名称。这在内联汇编模板中\"\n\"特别有用，因为参数通常会被多次使用。对于更复杂的内联汇编，建议使用这种方式，\"\n\"因为它提高了可读性，并且允许在不改变参数顺序的情况下重新排列指令。\"\n\n#: src/unsafe/asm.md:104\nmsgid \"We can further refine the above example to avoid the `mov` instruction:\"\nmsgstr \"我们可以进一步优化上面的例子，避免使用 `mov` 指令：\"\n\n#: src/unsafe/asm.md:118\nmsgid \"\"\n\"We can see that `inout` is used to specify an argument that is both input \"\n\"and output. This is different from specifying an input and output separately \"\n\"in that it is guaranteed to assign both to the same register.\"\nmsgstr \"\"\n\"我们可以看到 `inout` 用于指定既作为输入又作为输出的参数。这与分别指定输入和输\"\n\"出不同，它保证将两者分配到同一个寄存器。\"\n\n#: src/unsafe/asm.md:121\nmsgid \"\"\n\"It is also possible to specify different variables for the input and output \"\n\"parts of an `inout` operand:\"\nmsgstr \"也可以为 `inout` 操作数的输入和输出部分指定不同的变量：\"\n\n#: src/unsafe/asm.md:136\nmsgid \"Late output operands\"\nmsgstr \"延迟输出操作数\"\n\n#: src/unsafe/asm.md:138\nmsgid \"\"\n\"The Rust compiler is conservative with its allocation of operands. It is \"\n\"assumed that an `out` can be written at any time, and can therefore not \"\n\"share its location with any other argument. However, to guarantee optimal \"\n\"performance it is important to use as few registers as possible, so they \"\n\"won't have to be saved and reloaded around the inline assembly block. To \"\n\"achieve this Rust provides a `lateout` specifier. This can be used on any \"\n\"output that is written only after all inputs have been consumed. There is \"\n\"also an `inlateout` variant of this specifier.\"\nmsgstr \"\"\n\"Rust 编译器在分配操作数时采取保守策略。它假设 `out` 可以在任何时候被写入，因\"\n\"此不能与其他参数共享位置。然而，为了保证最佳性能，使用尽可能少的寄存器很重\"\n\"要，这样就不必在内联汇编块前后保存和重新加载寄存器。为此，Rust 提供了 \"\n\"`lateout` 说明符。这可以用于任何在所有输入被消耗后才写入的输出。此外还有一个 \"\n\"`inlateout` 变体。\"\n\n#: src/unsafe/asm.md:146\nmsgid \"\"\n\"Here is an example where `inlateout` _cannot_ be used in `release` mode or \"\n\"other optimized cases:\"\nmsgstr \"\"\n\"以下是一个在 `release` 模式或其他优化情况下 _不能_ 使用 `inlateout` 的例子：\"\n\n#: src/unsafe/asm.md:157 src/unsafe/asm.md:189 src/unsafe/asm.md:472\nmsgid \"\\\"add {0}, {1}\\\"\"\nmsgstr \"\\\"add {0}, {1}\\\"\"\n\n#: src/unsafe/asm.md:158\nmsgid \"\\\"add {0}, {2}\\\"\"\nmsgstr \"\\\"add {0}, {2}\\\"\"\n\n#: src/unsafe/asm.md:168\nmsgid \"\"\n\"In unoptimized cases (e.g. `Debug` mode), replacing `inout(reg) a` with \"\n\"`inlateout(reg) a` in the above example can continue to give the expected \"\n\"result. However, with `release` mode or other optimized cases, using \"\n\"`inlateout(reg) a` can instead lead to the final value `a = 16`, causing the \"\n\"assertion to fail.\"\nmsgstr \"\"\n\"在未优化的情况下（如 `Debug` 模式），将上述例子中的 `inout(reg) a` 替换为 \"\n\"`inlateout(reg) a` 仍能得到预期结果。但在 `release` 模式或其他优化情况下，使\"\n\"用 `inlateout(reg) a` 可能导致最终值 `a = 16`，使断言失败。\"\n\n#: src/unsafe/asm.md:173\nmsgid \"\"\n\"This is because in optimized cases, the compiler is free to allocate the \"\n\"same register for inputs `b` and `c` since it knows that they have the same \"\n\"value. Furthermore, when `inlateout` is used, `a` and `c` could be allocated \"\n\"to the same register, in which case the first `add` instruction would \"\n\"overwrite the initial load from variable `c`. This is in contrast to how \"\n\"using `inout(reg) a` ensures a separate register is allocated for `a`.\"\nmsgstr \"\"\n\"这是因为在优化情况下，编译器可以为输入 `b` 和 `c` 分配相同的寄存器，因为它知\"\n\"道它们具有相同的值。此外，当使用 `inlateout` 时，`a` 和 `c` 可能被分配到同一\"\n\"个寄存器，这种情况下，第一条 `add` 指令会覆盖从变量 `c` 初始加载的值。相比之\"\n\"下，使用 `inout(reg) a` 可以确保为 `a` 分配一个单独的寄存器。\"\n\n#: src/unsafe/asm.md:179\nmsgid \"\"\n\"However, the following example can use `inlateout` since the output is only \"\n\"modified after all input registers have been read:\"\nmsgstr \"\"\n\"然而，以下示例可以使用 `inlateout`，因为输出仅在读取所有输入寄存器后才被修\"\n\"改：\"\n\n#: src/unsafe/asm.md:195\nmsgid \"\"\n\"As you can see, this assembly fragment will still work correctly if `a` and \"\n\"`b` are assigned to the same register.\"\nmsgstr \"\"\n\"如你所见，即使 `a` 和 `b` 被分配到同一个寄存器，这段汇编代码片段仍能正确运\"\n\"行。\"\n\n#: src/unsafe/asm.md:197\nmsgid \"Explicit register operands\"\nmsgstr \"显式寄存器操作数\"\n\n#: src/unsafe/asm.md:199\nmsgid \"\"\n\"Some instructions require that the operands be in a specific register. \"\n\"Therefore, Rust inline assembly provides some more specific constraint \"\n\"specifiers. While `reg` is generally available on any architecture, explicit \"\n\"registers are highly architecture specific. E.g. for x86 the general purpose \"\n\"registers `eax`, `ebx`, `ecx`, `edx`, `ebp`, `esi`, and `edi` among others \"\n\"can be addressed by their name.\"\nmsgstr \"\"\n\"某些指令要求操作数必须位于特定寄存器中。因此，Rust 内联汇编提供了一些更具体的\"\n\"约束说明符。虽然 `reg` 通常适用于任何架构，但显式寄存器高度依赖于特定架构。例\"\n\"如，对于 x86 架构，通用寄存器如 `eax`、`ebx`、`ecx`、`edx`、`ebp`、`esi` 和 \"\n\"`edi` 等可以直接通过名称进行寻址。\"\n\n#: src/unsafe/asm.md:209\nmsgid \"\\\"out 0x64, eax\\\"\"\nmsgstr \"\\\"out 0x64, eax\\\"\"\n\n#: src/unsafe/asm.md:209 src/unsafe/asm.md:285\nmsgid \"\\\"eax\\\"\"\nmsgstr \"\\\"eax\\\"\"\n\n#: src/unsafe/asm.md:214\nmsgid \"\"\n\"In this example we call the `out` instruction to output the content of the \"\n\"`cmd` variable to port `0x64`. Since the `out` instruction only accepts \"\n\"`eax` (and its sub registers) as operand we had to use the `eax` constraint \"\n\"specifier.\"\nmsgstr \"\"\n\"在这个例子中，我们调用 `out` 指令将 `cmd` 变量的内容输出到端口 `0x64`。由于 \"\n\"`out` 指令只接受 `eax`（及其子寄存器）作为操作数，我们必须使用 `eax` 约束说明\"\n\"符。\"\n\n#: src/unsafe/asm.md:216\nmsgid \"\"\n\"**Note**: unlike other operand types, explicit register operands cannot be \"\n\"used in the template string: you can't use `{}` and should write the \"\n\"register name directly instead. Also, they must appear at the end of the \"\n\"operand list after all other operand types.\"\nmsgstr \"\"\n\"**注意**：与其他操作数类型不同，显式寄存器操作数不能在模板字符串中使用。你不\"\n\"能使用 `{}`，而应直接写入寄存器名称。此外，它们必须出现在操作数列表的末尾，位\"\n\"于所有其他操作数类型之后。\"\n\n#: src/unsafe/asm.md:218\nmsgid \"Consider this example which uses the x86 `mul` instruction:\"\nmsgstr \"考虑以下使用 x86 `mul` 指令的例子：\"\n\n#: src/unsafe/asm.md:230\nmsgid \"\"\n\"// The x86 mul instruction takes rax as an implicit input and writes\\n\"\n\"            // the 128-bit result of the multiplication to rax:rdx.\\n\"\n\"            \\\"mul {}\\\"\"\nmsgstr \"\"\n\"// x86 的 mul 指令将 rax 作为隐式输入，\\n\"\n\"            // 并将乘法的 128 位结果写入 rax:rdx。\\n\"\n\"            \\\"mul {}\\\"\"\n\n#: src/unsafe/asm.md:234 src/unsafe/asm.md:356\nmsgid \"\\\"rax\\\"\"\nmsgstr \"\\\"rax\\\"\"\n\n#: src/unsafe/asm.md:235\nmsgid \"\\\"rdx\\\"\"\nmsgstr \"\\\"rdx\\\"\"\n\n#: src/unsafe/asm.md:244\nmsgid \"\"\n\"This uses the `mul` instruction to multiply two 64-bit inputs with a 128-bit \"\n\"result. The only explicit operand is a register, that we fill from the \"\n\"variable `a`. The second operand is implicit, and must be the `rax` \"\n\"register, which we fill from the variable `b`. The lower 64 bits of the \"\n\"result are stored in `rax` from which we fill the variable `lo`. The higher \"\n\"64 bits are stored in `rdx` from which we fill the variable `hi`.\"\nmsgstr \"\"\n\"这里使用 `mul` 指令将两个 64 位输入相乘，得到一个 128 位的结果。唯一的显式操\"\n\"作数是一个寄存器，我们用变量 `a` 填充它。第二个操作数是隐式的，必须是 `rax` \"\n\"寄存器，我们用变量 `b` 填充它。结果的低 64 位存储在 `rax` 中，用于填充变量 \"\n\"`lo`。高 64 位存储在 `rdx` 中，用于填充变量 `hi`。\"\n\n#: src/unsafe/asm.md:250\nmsgid \"Clobbered registers\"\nmsgstr \"被破坏的寄存器\"\n\n#: src/unsafe/asm.md:252\nmsgid \"\"\n\"In many cases inline assembly will modify state that is not needed as an \"\n\"output. Usually this is either because we have to use a scratch register in \"\n\"the assembly or because instructions modify state that we don't need to \"\n\"further examine. This state is generally referred to as being \\\"clobbered\\\". \"\n\"We need to tell the compiler about this since it may need to save and \"\n\"restore this state around the inline assembly block.\"\nmsgstr \"\"\n\"在许多情况下，内联汇编会修改不需要作为输出的状态。这通常是因为我们必须在汇编\"\n\"中使用临时寄存器，或者因为指令修改了我们不需要进一步检查的状态。这种状态通常\"\n\"被称为\\\"被破坏\\\"。我们需要告知编译器这一点，因为它可能需要在内联汇编块前后保\"\n\"存和恢复这种状态。\"\n\n#: src/unsafe/asm.md:262\nmsgid \"// three entries of four bytes each\\n\"\nmsgstr \"// 三个条目，每个四字节\\n\"\n\n#: src/unsafe/asm.md:264\nmsgid \"\"\n\"// String is stored as ascii in ebx, edx, ecx in order\\n\"\n\"    // Because ebx is reserved, the asm needs to preserve the value of it.\\n\"\n\"    // So we push and pop it around the main asm.\\n\"\n\"    // 64 bit mode on 64 bit processors does not allow pushing/popping of\\n\"\n\"    // 32 bit registers (like ebx), so we have to use the extended rbx \"\n\"register instead.\\n\"\nmsgstr \"\"\n\"// 字符串按顺序以 ASCII 格式存储在 ebx、edx、ecx 中\\n\"\n\"    // 由于 ebx 是保留寄存器，汇编需要保留其值\\n\"\n\"    // 因此我们在主要汇编代码前后执行 push 和 pop 操作\\n\"\n\"    // 64 位处理器的 64 位模式不允许对 32 位寄存器（如 ebx）进行 push/pop 操\"\n\"作\\n\"\n\"    // 所以我们必须使用扩展的 rbx 寄存器\\n\"\n\n#: src/unsafe/asm.md:272\nmsgid \"\\\"push rbx\\\"\"\nmsgstr \"\\\"push rbx\\\"\"\n\n#: src/unsafe/asm.md:273\nmsgid \"\\\"cpuid\\\"\"\nmsgstr \"\\\"cpuid\\\"\"\n\n#: src/unsafe/asm.md:274\nmsgid \"\\\"mov [rdi], ebx\\\"\"\nmsgstr \"\\\"mov [rdi], ebx\\\"\"\n\n#: src/unsafe/asm.md:275\nmsgid \"\\\"mov [rdi + 4], edx\\\"\"\nmsgstr \"\\\"mov [rdi + 4], edx\\\"\"\n\n#: src/unsafe/asm.md:276\nmsgid \"\\\"mov [rdi + 8], ecx\\\"\"\nmsgstr \"\\\"mov [rdi + 8], ecx\\\"\"\n\n#: src/unsafe/asm.md:277\nmsgid \"\\\"pop rbx\\\"\"\nmsgstr \"\\\"pop rbx\\\"\"\n\n#: src/unsafe/asm.md:278\nmsgid \"\"\n\"// We use a pointer to an array for storing the values to simplify\\n\"\n\"            // the Rust code at the cost of a couple more asm instructions\\n\"\n\"            // This is more explicit with how the asm works however, as \"\n\"opposed\\n\"\n\"            // to explicit register outputs such as `out(\\\"ecx\\\") val`\\n\"\n\"            // The *pointer itself* is only an input even though it's \"\n\"written behind\\n\"\nmsgstr \"\"\n\"// 我们使用指向数组的指针来存储值，以简化 Rust 代码\\n\"\n\"            // 虽然这会增加几条汇编指令，但更清晰地展示了汇编的工作方式\\n\"\n\"            // 相比于使用显式寄存器输出（如 `out(\\\"ecx\\\") val`）\\n\"\n\"            // *指针本身*只是一个输入，尽管它在背后被写入\\n\"\n\n#: src/unsafe/asm.md:283 src/unsafe/asm.md:354\nmsgid \"\\\"rdi\\\"\"\nmsgstr \"\\\"rdi\\\"\"\n\n#: src/unsafe/asm.md:284\nmsgid \"// select cpuid 0, also specify eax as clobbered\\n\"\nmsgstr \"// 选择 cpuid 0，同时指定 eax 为被修改寄存器\\n\"\n\n#: src/unsafe/asm.md:286\nmsgid \"// cpuid clobbers these registers too\\n\"\nmsgstr \"// cpuid 也会修改这些寄存器\\n\"\n\n#: src/unsafe/asm.md:287\nmsgid \"\\\"ecx\\\"\"\nmsgstr \"\\\"ecx\\\"\"\n\n#: src/unsafe/asm.md:288\nmsgid \"\\\"edx\\\"\"\nmsgstr \"\\\"edx\\\"\"\n\n#: src/unsafe/asm.md:293\nmsgid \"\\\"CPU Manufacturer ID: {}\\\"\"\nmsgstr \"\\\"CPU 制造商 ID：{}\\\"\"\n\n#: src/unsafe/asm.md:300\nmsgid \"\"\n\"In the example above we use the `cpuid` instruction to read the CPU \"\n\"manufacturer ID. This instruction writes to `eax` with the maximum supported \"\n\"`cpuid` argument and `ebx`, `edx`, and `ecx` with the CPU manufacturer ID as \"\n\"ASCII bytes in that order.\"\nmsgstr \"\"\n\"在上面的示例中，我们使用 `cpuid` 指令读取 CPU 制造商 ID。该指令将最大支持的 \"\n\"`cpuid` 参数写入 `eax`，并按顺序将 CPU 制造商 ID 的 ASCII 字节写入 `ebx`、\"\n\"`edx` 和 `ecx`。\"\n\n#: src/unsafe/asm.md:303\nmsgid \"\"\n\"Even though `eax` is never read we still need to tell the compiler that the \"\n\"register has been modified so that the compiler can save any values that \"\n\"were in these registers before the asm. This is done by declaring it as an \"\n\"output but with `_` instead of a variable name, which indicates that the \"\n\"output value is to be discarded.\"\nmsgstr \"\"\n\"尽管 `eax` 从未被读取，我们仍需要告知编译器该寄存器已被修改，这样编译器就可以\"\n\"保存汇编前这些寄存器中的任何值。我们通过将其声明为输出来实现这一点，但使用 \"\n\"`_` 而非变量名，表示输出值将被丢弃。\"\n\n#: src/unsafe/asm.md:305\nmsgid \"\"\n\"This code also works around the limitation that `ebx` is a reserved register \"\n\"by LLVM. That means that LLVM assumes that it has full control over the \"\n\"register and it must be restored to its original state before exiting the \"\n\"asm block, so it cannot be used as an input or output **except** if the \"\n\"compiler uses it to fulfill a general register class (e.g. `in(reg)`). This \"\n\"makes `reg` operands dangerous when using reserved registers as we could \"\n\"unknowingly corrupt our input or output because they share the same register.\"\nmsgstr \"\"\n\"这段代码还解决了 LLVM 将 `ebx` 视为保留寄存器的限制。这意味着 LLVM 假定它对该\"\n\"寄存器拥有完全控制权，并且必须在退出汇编块之前将其恢复到原始状态。因此，\"\n\"`ebx` 不能用作输入或输出，**除非**编译器将其用于满足通用寄存器类（如 \"\n\"`in(reg)`）。这使得在使用保留寄存器时，`reg` 操作数变得危险，因为我们可能会在\"\n\"不知情的情况下破坏输入或输出，原因是它们共享同一个寄存器。\"\n\n#: src/unsafe/asm.md:307\nmsgid \"\"\n\"To work around this we use `rdi` to store the pointer to the output array, \"\n\"save `ebx` via `push`, read from `ebx` inside the asm block into the array \"\n\"and then restore `ebx` to its original state via `pop`. The `push` and `pop` \"\n\"use the full 64-bit `rbx` version of the register to ensure that the entire \"\n\"register is saved. On 32 bit targets the code would instead use `ebx` in the \"\n\"`push`/`pop`.\"\nmsgstr \"\"\n\"为了解决这个问题，我们采用以下策略：使用 `rdi` 存储输出数组的指针；通过 \"\n\"`push` 保存 `ebx`；在汇编块内从 `ebx` 读取数据到数组中；然后通过 `pop` 将 \"\n\"`ebx` 恢复到原始状态。`push` 和 `pop` 操作使用完整的 64 位 `rbx` 寄存器版本，\"\n\"以确保整个寄存器被保存。在 32 位目标上，代码会在 `push`/`pop` 操作中使用 \"\n\"`ebx`。\"\n\n#: src/unsafe/asm.md:309\nmsgid \"\"\n\"This can also be used with a general register class to obtain a scratch \"\n\"register for use inside the asm code:\"\nmsgstr \"\"\n\"这种技术还可以与通用寄存器类一起使用，以获得一个临时寄存器在汇编代码内使用：\"\n\n#: src/unsafe/asm.md:314\nmsgid \"// Multiply x by 6 using shifts and adds\\n\"\nmsgstr \"// 使用移位和加法将 x 乘以 6\\n\"\n\n#: src/unsafe/asm.md:319\nmsgid \"\\\"mov {tmp}, {x}\\\"\"\nmsgstr \"\\\"mov {tmp}, {x}\\\"\"\n\n#: src/unsafe/asm.md:320\nmsgid \"\\\"shl {tmp}, 1\\\"\"\nmsgstr \"\\\"shl {tmp}, 1\\\"\"\n\n#: src/unsafe/asm.md:321\nmsgid \"\\\"shl {x}, 2\\\"\"\nmsgstr \"\\\"shl {x}, 2\\\"\"\n\n#: src/unsafe/asm.md:322\nmsgid \"\\\"add {x}, {tmp}\\\"\"\nmsgstr \"\\\"add {x}, {tmp}\\\"\"\n\n#: src/unsafe/asm.md:331\nmsgid \"Symbol operands and ABI clobbers\"\nmsgstr \"符号操作数和 ABI 破坏\"\n\n#: src/unsafe/asm.md:333\nmsgid \"\"\n\"By default, `asm!` assumes that any register not specified as an output will \"\n\"have its contents preserved by the assembly code. The [`clobber_abi`]\"\n\"(https://doc.rust-lang.org/stable/reference/inline-assembly.html#abi-\"\n\"clobbers) argument to `asm!` tells the compiler to automatically insert the \"\n\"necessary clobber operands according to the given calling convention ABI: \"\n\"any register which is not fully preserved in that ABI will be treated as \"\n\"clobbered.  Multiple `clobber_abi` arguments may be provided and all \"\n\"clobbers from all specified ABIs will be inserted.\"\nmsgstr \"\"\n\"默认情况下，`asm!` 假定汇编代码会保留所有未指定为输出的寄存器的内容。`asm!` \"\n\"的 [`clobber_abi`](https://doc.rust-lang.org/stable/reference/inline-\"\n\"assembly.html#abi-clobbers) 参数告诉编译器根据给定的调用约定 ABI 自动插入必要\"\n\"的破坏操作数：任何在该 ABI 中未完全保留的寄存器都将被视为被破坏。可以提供多\"\n\"个 `clobber_abi` 参数，所有指定 ABI 的破坏都将被插入。\"\n\n#: src/unsafe/asm.md:341 src/unsafe/asm.md:359\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe/asm.md:342\nmsgid \"\\\"arg = {}\\\"\"\nmsgstr \"\\\"arg = {}\\\"\"\n\n#: src/unsafe/asm.md:350\nmsgid \"\\\"call {}\\\"\"\nmsgstr \"\\\"call {}\\\"\"\n\n#: src/unsafe/asm.md:351\nmsgid \"// Function pointer to call\\n\"\nmsgstr \"// 要调用的函数指针\\n\"\n\n#: src/unsafe/asm.md:353\nmsgid \"// 1st argument in rdi\\n\"\nmsgstr \"// 第一个参数在 rdi 中\\n\"\n\n#: src/unsafe/asm.md:355\nmsgid \"// Return value in rax\\n\"\nmsgstr \"// 返回值在 rax 中\\n\"\n\n#: src/unsafe/asm.md:357\nmsgid \"\"\n\"// Mark all registers which are not preserved by the \\\"C\\\" calling\\n\"\n\"            // convention as clobbered.\\n\"\nmsgstr \"\"\n\"// 将所有不被 \\\"C\\\" 调用约定保留的寄存器\\n\"\n\"            // 标记为被破坏\\n\"\n\n#: src/unsafe/asm.md:367\nmsgid \"Register template modifiers\"\nmsgstr \"寄存器模板修饰符\"\n\n#: src/unsafe/asm.md:369\nmsgid \"\"\n\"In some cases, fine control is needed over the way a register name is \"\n\"formatted when inserted into the template string. This is needed when an \"\n\"architecture's assembly language has several names for the same register, \"\n\"each typically being a \\\"view\\\" over a subset of the register (e.g. the low \"\n\"32 bits of a 64-bit register).\"\nmsgstr \"\"\n\"在某些情况下，需要对寄存器名称插入模板字符串时的格式进行精细控制。当一个架构\"\n\"的汇编语言对同一个寄存器有多个名称时，这种控制尤为必要。每个名称通常代表寄存\"\n\"器的一个子集\\\"视图\\\"（例如，64 位寄存器的低 32 位）。\"\n\n#: src/unsafe/asm.md:371\nmsgid \"\"\n\"By default the compiler will always choose the name that refers to the full \"\n\"register size (e.g. `rax` on x86-64, `eax` on x86, etc).\"\nmsgstr \"\"\n\"默认情况下，编译器总是会选择引用完整寄存器大小的名称（例如，在 x86-64 上是 \"\n\"`rax`，在 x86 上是 `eax` 等）。\"\n\n#: src/unsafe/asm.md:373\nmsgid \"\"\n\"This default can be overridden by using modifiers on the template string \"\n\"operands, just like you would with format strings:\"\nmsgstr \"\"\n\"可以通过在模板字符串操作数上使用修饰符来覆盖这个默认设置，类似于格式字符串的\"\n\"用法：\"\n\n#: src/unsafe/asm.md:382\nmsgid \"\\\"mov {0:h}, {0:l}\\\"\"\nmsgstr \"\\\"mov {0:h}, {0:l}\\\"\"\n\n#: src/unsafe/asm.md:389\nmsgid \"\"\n\"In this example, we use the `reg_abcd` register class to restrict the \"\n\"register allocator to the 4 legacy x86 registers (`ax`, `bx`, `cx`, `dx`) of \"\n\"which the first two bytes can be addressed independently.\"\nmsgstr \"\"\n\"在这个例子中，我们使用 `reg_abcd` 寄存器类来限制寄存器分配器只使用 4 个传统\"\n\"的 x86 寄存器（`ax`、`bx`、`cx`、`dx`）。这些寄存器的前两个字节可以独立寻址。\"\n\n#: src/unsafe/asm.md:391\nmsgid \"\"\n\"Let us assume that the register allocator has chosen to allocate `x` in the \"\n\"`ax` register. The `h` modifier will emit the register name for the high \"\n\"byte of that register and the `l` modifier will emit the register name for \"\n\"the low byte. The asm code will therefore be expanded as `mov ah, al` which \"\n\"copies the low byte of the value into the high byte.\"\nmsgstr \"\"\n\"假设寄存器分配器选择将 `x` 分配到 `ax` 寄存器。`h` 修饰符将生成该寄存器高字节\"\n\"的名称，而 `l` 修饰符将生成低字节的名称。因此，汇编代码将被展开为 `mov ah, \"\n\"al`，这条指令将值的低字节复制到高字节。\"\n\n#: src/unsafe/asm.md:394\nmsgid \"\"\n\"If you use a smaller data type (e.g. `u16`) with an operand and forget to \"\n\"use template modifiers, the compiler will emit a warning and suggest the \"\n\"correct modifier to use.\"\nmsgstr \"\"\n\"如果你对操作数使用较小的数据类型（例如 `u16`）并忘记使用模板修饰符，编译器将\"\n\"发出警告并建议使用正确的修饰符。\"\n\n#: src/unsafe/asm.md:396\nmsgid \"Memory address operands\"\nmsgstr \"内存地址操作数\"\n\n#: src/unsafe/asm.md:398\nmsgid \"\"\n\"Sometimes assembly instructions require operands passed via memory addresses/\"\n\"memory locations. You have to manually use the memory address syntax \"\n\"specified by the target architecture. For example, on x86/x86_64 using Intel \"\n\"assembly syntax, you should wrap inputs/outputs in `[]` to indicate they are \"\n\"memory operands:\"\nmsgstr \"\"\n\"有时汇编指令需要通过内存地址或内存位置传递操作数。你必须手动使用目标架构指定\"\n\"的内存地址语法。例如，在使用 Intel 汇编语法的 x86/x86_64 架构上，你应该用 \"\n\"`[]` 包裹输入/输出，以表明它们是内存操作数：\"\n\n#: src/unsafe/asm.md:408\nmsgid \"\\\"fldcw [{}]\\\"\"\nmsgstr \"\\\"fldcw [{}]\\\"\"\n\n#: src/unsafe/asm.md:414\nmsgid \"Labels\"\nmsgstr \"标签\"\n\n#: src/unsafe/asm.md:416\nmsgid \"\"\n\"Any reuse of a named label, local or otherwise, can result in an assembler \"\n\"or linker error or may cause other strange behavior. Reuse of a named label \"\n\"can happen in a variety of ways including:\"\nmsgstr \"\"\n\"重复使用命名标签（无论是局部的还是其他类型的）可能导致汇编器或链接器错误，或\"\n\"引起其他异常行为。命名标签的重用可能以多种方式发生，包括：\"\n\n#: src/unsafe/asm.md:418\nmsgid \"\"\n\"explicitly: using a label more than once in one `asm!` block, or multiple \"\n\"times across blocks.\"\nmsgstr \"显式重用：在一个 `asm!` 块中多次使用同一标签，或在多个块之间重复使用。\"\n\n#: src/unsafe/asm.md:419\nmsgid \"\"\n\"implicitly via inlining: the compiler is allowed to instantiate multiple \"\n\"copies of an `asm!` block, for example when the function containing it is \"\n\"inlined in multiple places.\"\nmsgstr \"\"\n\"通过内联隐式重用：编译器可能会创建 `asm!` 块的多个副本，例如当包含该块的函数\"\n\"在多处被内联时。\"\n\n#: src/unsafe/asm.md:420\nmsgid \"\"\n\"implicitly via LTO: LTO can cause code from _other crates_ to be placed in \"\n\"the same codegen unit, and so could bring in arbitrary labels.\"\nmsgstr \"\"\n\"通过 LTO 隐式重用：链接时优化（LTO）可能导致**其他 crate** 的代码被放置在同一\"\n\"代码生成单元中，从而可能引入任意标签。\"\n\n#: src/unsafe/asm.md:422\nmsgid \"\"\n\"As a consequence, you should only use GNU assembler **numeric** [local \"\n\"labels](https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-\"\n\"Labels) inside inline assembly code. Defining symbols in assembly code may \"\n\"lead to assembler and/or linker errors due to duplicate symbol definitions.\"\nmsgstr \"\"\n\"因此，你应该只在内联汇编代码中使用 GNU 汇编器的**数字**[局部标签](https://\"\n\"sourceware.org/binutils/docs/as/Symbol-Names.html#Local-Labels)。在汇编代码中\"\n\"定义符号可能会由于重复的符号定义而导致汇编器和/或链接器错误。\"\n\n#: src/unsafe/asm.md:424\nmsgid \"\"\n\"Moreover, on x86 when using the default Intel syntax, due to [an LLVM bug]\"\n\"(https://bugs.llvm.org/show_bug.cgi?id=36144), you shouldn't use labels \"\n\"exclusively made of `0` and `1` digits, e.g. `0`, `11` or `101010`, as they \"\n\"may end up being interpreted as binary values. Using `options(att_syntax)` \"\n\"will avoid any ambiguity, but that affects the syntax of the _entire_ `asm!` \"\n\"block. (See [Options](#options), below, for more on `options`.)\"\nmsgstr \"\"\n\"此外，在 x86 架构上使用默认的 Intel 语法时，由于[一个 LLVM 的 bug](https://\"\n\"bugs.llvm.org/show_bug.cgi?id=36144)，你不应使用仅由 `0` 和 `1` 组成的标签，\"\n\"如 `0`、`11` 或 `101010`，因为它们可能被误解为二进制值。使用 \"\n\"`options(att_syntax)` 可以避免这种歧义，但这会影响*整个* `asm!` 块的语法。\"\n\"（关于 `options` 的更多信息，请参见下文的[选项](#options)。）\"\n\n#: src/unsafe/asm.md:433\nmsgid \"\\\"mov {0}, 10\\\"\"\nmsgstr \"\\\"mov {0}, 10\\\"\"\n\n#: src/unsafe/asm.md:434 src/unsafe/asm.md:439\nmsgid \"\\\"2:\\\"\"\nmsgstr \"\\\"2:\\\"\"\n\n#: src/unsafe/asm.md:435\nmsgid \"\\\"sub {0}, 1\\\"\"\nmsgstr \"\\\"sub {0}, 1\\\"\"\n\n#: src/unsafe/asm.md:436\nmsgid \"\\\"cmp {0}, 3\\\"\"\nmsgstr \"\\\"cmp {0}, 3\\\"\"\n\n#: src/unsafe/asm.md:437\nmsgid \"\\\"jle 2f\\\"\"\nmsgstr \"\\\"jle 2f\\\"\"\n\n#: src/unsafe/asm.md:438\nmsgid \"\\\"jmp 2b\\\"\"\nmsgstr \"\\\"jmp 2b\\\"\"\n\n#: src/unsafe/asm.md:440\nmsgid \"\\\"add {0}, 2\\\"\"\nmsgstr \"\\\"add {0}, 2\\\"\"\n\n#: src/unsafe/asm.md:448\nmsgid \"\"\n\"This will decrement the `{0}` register value from 10 to 3, then add 2 and \"\n\"store it in `a`.\"\nmsgstr \"\"\n\"这段代码会将 `{0}` 寄存器的值从 10 递减到 3，然后加 2 并将结果存储在 `a` 中。\"\n\n#: src/unsafe/asm.md:450\nmsgid \"This example shows a few things:\"\nmsgstr \"这个例子展示了几个要点：\"\n\n#: src/unsafe/asm.md:452\nmsgid \"\"\n\"First, that the same number can be used as a label multiple times in the \"\n\"same inline block.\"\nmsgstr \"首先，同一个数字可以在同一个内联块中多次用作标签。\"\n\n#: src/unsafe/asm.md:453\nmsgid \"\"\n\"Second, that when a numeric label is used as a reference (as an instruction \"\n\"operand, for example), the suffixes “b” (“backward”) or ”f” (“forward”) \"\n\"should be added to the numeric label. It will then refer to the nearest \"\n\"label defined by this number in this direction.\"\nmsgstr \"\"\n\"其次，当数字标签被用作引用（例如作为指令操作数）时，应在数字标签后添加后缀 \"\n\"\\\"b\\\"（\\\"backward\\\"，向后）或 \\\"f\\\"（\\\"forward\\\"，向前）。这样它将引用该方向\"\n\"上由这个数字定义的最近的标签。\"\n\n#: src/unsafe/asm.md:458\nmsgid \"Options\"\nmsgstr \"选项\"\n\n#: src/unsafe/asm.md:460\nmsgid \"\"\n\"By default, an inline assembly block is treated the same way as an external \"\n\"FFI function call with a custom calling convention: it may read/write \"\n\"memory, have observable side effects, etc. However, in many cases it is \"\n\"desirable to give the compiler more information about what the assembly code \"\n\"is actually doing so that it can optimize better.\"\nmsgstr \"\"\n\"默认情况下，内联汇编块的处理方式与具有自定义调用约定的外部 FFI 函数调用相同：\"\n\"它可能读写内存，产生可观察的副作用等。然而，在许多情况下，我们希望向编译器提\"\n\"供更多关于汇编代码实际行为的信息，以便编译器能够进行更好的优化。\"\n\n#: src/unsafe/asm.md:462\nmsgid \"Let's take our previous example of an `add` instruction:\"\nmsgstr \"让我们回顾一下之前 `add` 指令的例子：\"\n\n#: src/unsafe/asm.md:481\nmsgid \"\"\n\"Options can be provided as an optional final argument to the `asm!` macro. \"\n\"We specified three options here:\"\nmsgstr \"\"\n\"可以将选项作为可选的最后一个参数传递给 `asm!` 宏。在这个例子中，我们指定了三\"\n\"个选项：\"\n\n#: src/unsafe/asm.md:483\nmsgid \"\"\n\"`pure` means that the asm code has no observable side effects and that its \"\n\"output depends only on its inputs. This allows the compiler optimizer to \"\n\"call the inline asm fewer times or even eliminate it entirely.\"\nmsgstr \"\"\n\"`pure`：表示汇编代码没有可观察的副作用，其输出仅依赖于输入。这使得编译器优化\"\n\"器能够减少内联汇编的调用次数，甚至完全消除它。\"\n\n#: src/unsafe/asm.md:484\nmsgid \"\"\n\"`nomem` means that the asm code does not read or write to memory. By default \"\n\"the compiler will assume that inline assembly can read or write any memory \"\n\"address that is accessible to it (e.g. through a pointer passed as an \"\n\"operand, or a global).\"\nmsgstr \"\"\n\"`nomem`：表示汇编代码不读取或写入内存。默认情况下，编译器会假设内联汇编可以读\"\n\"写任何它可访问的内存地址（例如通过作为操作数传递的指针或全局变量）。\"\n\n#: src/unsafe/asm.md:485\nmsgid \"\"\n\"`nostack` means that the asm code does not push any data onto the stack. \"\n\"This allows the compiler to use optimizations such as the stack red zone on \"\n\"x86-64 to avoid stack pointer adjustments.\"\nmsgstr \"\"\n\"`nostack`：表示汇编代码不会向栈中压入任何数据。这允许编译器使用诸如 x86-64 上\"\n\"的栈红区等优化技术，以避免栈指针调整。\"\n\n#: src/unsafe/asm.md:487\nmsgid \"\"\n\"These allow the compiler to better optimize code using `asm!`, for example \"\n\"by eliminating pure `asm!` blocks whose outputs are not needed.\"\nmsgstr \"\"\n\"这些选项使编译器能够更好地优化使用 `asm!` 的代码，例如消除那些输出未被使用的\"\n\"纯 `asm!` 块。\"\n\n#: src/unsafe/asm.md:489\nmsgid \"\"\n\"See the [reference](https://doc.rust-lang.org/stable/reference/inline-\"\n\"assembly.html) for the full list of available options and their effects.\"\nmsgstr \"\"\n\"有关可用选项的完整列表及其效果，请参阅[参考文档](https://doc.rust-lang.org/\"\n\"stable/reference/inline-assembly.html)。\"\n\n#: src/compatibility.md:3\nmsgid \"\"\n\"The Rust language is evolving rapidly, and because of this certain \"\n\"compatibility issues can arise, despite efforts to ensure forwards-\"\n\"compatibility wherever possible.\"\nmsgstr \"\"\n\"Rust 语言正在快速发展，因此某些兼容性问题可能会出现，尽管我们努力确保尽可能的\"\n\"向前兼容。\"\n\n#: src/compatibility.md:7\nmsgid \"[Raw identifiers](compatibility/raw_identifiers.md)\"\nmsgstr \"[原始标识符](compatibility/raw_identifiers.md)\"\n\n#: src/compatibility/raw_identifiers.md:3\nmsgid \"\"\n\"Rust, like many programming languages, has the concept of \\\"keywords\\\". \"\n\"These identifiers mean something to the language, and so you cannot use them \"\n\"in places like variable names, function names, and other places. Raw \"\n\"identifiers let you use keywords where they would not normally be allowed. \"\n\"This is particularly useful when Rust introduces new keywords, and a library \"\n\"using an older edition of Rust has a variable or function with the same name \"\n\"as a keyword introduced in a newer edition.\"\nmsgstr \"\"\n\"Rust 和许多编程语言一样，有\\\"关键字\\\"的概念。这些标识符在语言中具有特殊含义，\"\n\"因此你不能在变量名、函数名等地方使用它们。原始标识符允许你在通常不允许使用关\"\n\"键字的地方使用它们。这在 Rust 引入新关键字，而使用旧版本 Rust 的库中有与新版\"\n\"本引入的关键字同名的变量或函数时特别有用。\"\n\n#: src/compatibility/raw_identifiers.md:11\nmsgid \"\"\n\"For example, consider a crate `foo` compiled with the 2015 edition of Rust \"\n\"that exports a function named `try`. This keyword is reserved for a new \"\n\"feature in the 2018 edition, so without raw identifiers, we would have no \"\n\"way to name the function.\"\nmsgstr \"\"\n\"例如，假设有一个使用 Rust 2015 版编译的 crate `foo`，它导出了一个名为 `try` \"\n\"的函数。这个关键字在 2018 版中被保留用于新特性，如果没有原始标识符，我们就无\"\n\"法命名这个函数。\"\n\n#: src/compatibility/raw_identifiers.md:24\nmsgid \"You'll get this error:\"\nmsgstr \"你会得到这个错误：\"\n\n#: src/compatibility/raw_identifiers.md:34\nmsgid \"You can write this with a raw identifier:\"\nmsgstr \"你可以使用原始标识符这样写：\"\n\n#: src/meta.md:3\nmsgid \"\"\n\"Some topics aren't exactly relevant to how you program runs but provide you \"\n\"tooling or infrastructure support which just makes things better for \"\n\"everyone. These topics include:\"\nmsgstr \"\"\n\"有些主题虽然与程序如何运行不直接相关，但它们提供了工具或基础设施支持，使得整\"\n\"个开发生态变得更好。这些主题包括：\"\n\n#: src/meta.md:7\nmsgid \"\"\n\"[Documentation](meta/doc.md): Generate library documentation for users via \"\n\"the included `rustdoc`.\"\nmsgstr \"[文档](meta/doc.md)：使用内置的 `rustdoc` 为用户生成库文档。\"\n\n#: src/meta.md:9\nmsgid \"\"\n\"[Playground](meta/playground.md): Integrate the Rust Playground in your \"\n\"documentation.\"\nmsgstr \"[Playground](meta/playground.md)：在文档中集成 Rust Playground。\"\n\n#: src/meta/doc.md:3\nmsgid \"\"\n\"Use `cargo doc` to build documentation in `target/doc`, `cargo doc --open` \"\n\"will automatically open it in your web browser.\"\nmsgstr \"\"\n\"使用 `cargo doc` 在 `target/doc` 目录下构建文档。运行 `cargo doc --open` 将自\"\n\"动在浏览器中打开文档。\"\n\n#: src/meta/doc.md:6\nmsgid \"\"\n\"Use `cargo test` to run all tests (including documentation tests), and \"\n\"`cargo test --doc` to only run documentation tests.\"\nmsgstr \"\"\n\"使用 `cargo test` 运行所有测试（包括文档测试）。如果只想运行文档测试，请使用 \"\n\"`cargo test --doc`。\"\n\n#: src/meta/doc.md:9\nmsgid \"\"\n\"These commands will appropriately invoke `rustdoc` (and `rustc`) as required.\"\nmsgstr \"这些命令会根据需要适当地调用 `rustdoc`（和 `rustc`）。\"\n\n#: src/meta/doc.md:11\nmsgid \"Doc comments\"\nmsgstr \"文档注释\"\n\n#: src/meta/doc.md:13\nmsgid \"\"\n\"Doc comments are very useful for big projects that require documentation. \"\n\"When running `rustdoc`, these are the comments that get compiled into \"\n\"documentation. They are denoted by a `///`, and support [Markdown](https://\"\n\"en.wikipedia.org/wiki/Markdown).\"\nmsgstr \"\"\n\"文档注释对需要文档的大型项目非常有用。运行 `rustdoc` 时，这些注释会被编译成文\"\n\"档。文档注释以 `///` 开头，并支持 [Markdown](https://zh.wikipedia.org/wiki/\"\n\"Markdown) 语法。\"\n\n#: src/meta/doc.md:18\nmsgid \"\\\"doc\\\"\"\nmsgstr \"\\\"doc\\\"\"\n\n#: src/meta/doc.md:19\nmsgid \"/// A human being is represented here\\n\"\nmsgstr \"/// 这里表示一个人类\\n\"\n\n#: src/meta/doc.md:22\nmsgid \"/// A person must have a name, no matter how much Juliet may hate it\\n\"\nmsgstr \"/// 一个人必须有名字，不管朱丽叶有多么讨厌这一点\\n\"\n\n#: src/meta/doc.md:27\nmsgid \"\"\n\"/// Creates a person with the given name.\\n\"\n\"    ///\\n\"\n\"    /// # Examples\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // You can have rust code between fences inside the comments\\n\"\n\"    /// // If you pass --test to `rustdoc`, it will even test it for you!\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\nmsgstr \"\"\n\"/// 创建一个具有给定名字的人。\\n\"\n\"    ///\\n\"\n\"    /// # 示例\\n\"\n\"    ///\\n\"\n\"    /// ```\\n\"\n\"    /// // 你可以在注释中的代码块里编写 Rust 代码\\n\"\n\"    /// // 如果向 `rustdoc` 传递 --test 参数，它甚至会为你测试这段代码！\\n\"\n\"    /// use doc::Person;\\n\"\n\"    /// let person = Person::new(\\\"name\\\");\\n\"\n\"    /// ```\\n\"\n\n#: src/meta/doc.md:43\nmsgid \"\"\n\"/// Gives a friendly hello!\\n\"\n\"    ///\\n\"\n\"    /// Says \\\"Hello, [name](Person::name)\\\" to the `Person` it is called \"\n\"on.\\n\"\nmsgstr \"\"\n\"/// 给出友好的问候！\\n\"\n\"    ///\\n\"\n\"    /// 对调用此方法的 `Person` 说 \\\"Hello, [name](Person::name)\\\"。\\n\"\n\n#: src/meta/doc.md:47\nmsgid \"\\\"Hello, {}!\\\"\"\nmsgstr \"\\\"Hello, {}!\\\"\"\n\n#: src/meta/doc.md:52\nmsgid \"\\\"John\\\"\"\nmsgstr \"\\\"John\\\"\"\n\n#: src/meta/doc.md:58\nmsgid \"\"\n\"To run the tests, first build the code as a library, then tell `rustdoc` \"\n\"where to find the library so it can link it into each doctest program:\"\nmsgstr \"\"\n\"要运行测试，首先将代码构建为库，然后告诉 `rustdoc` 库的位置，以便它可以将库链\"\n\"接到每个文档测试程序中：\"\n\n#: src/meta/doc.md:61\nmsgid \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"$ rustc doc.rs --crate-type lib\\n\"\n\"$ rustdoc --test --extern doc=\\\"libdoc.rlib\\\" doc.rs\\n\"\n\"```\"\n\n#: src/meta/doc.md:66\nmsgid \"Doc attributes\"\nmsgstr \"文档属性\"\n\n#: src/meta/doc.md:68\nmsgid \"\"\n\"Below are a few examples of the most common `#[doc]` attributes used with \"\n\"`rustdoc`.\"\nmsgstr \"以下是几个与 `rustdoc` 配合使用的最常见 `#[doc]` 属性示例。\"\n\n#: src/meta/doc.md:71\nmsgid \"`inline`\"\nmsgstr \"`inline`\"\n\n#: src/meta/doc.md:73\nmsgid \"Used to inline docs, instead of linking out to separate page.\"\nmsgstr \"用于内联文档，而非链接到单独的页面。\"\n\n#: src/meta/doc.md:78\nmsgid \"/// bar docs\\n\"\nmsgstr \"/// bar 的文档\\n\"\n\n#: src/meta/doc.md:81\nmsgid \"/// the docs for Bar\\n\"\nmsgstr \"/// Bar 的文档\\n\"\n\n#: src/meta/doc.md:86\nmsgid \"`no_inline`\"\nmsgstr \"`no_inline`\"\n\n#: src/meta/doc.md:88\nmsgid \"Used to prevent linking out to separate page or anywhere.\"\nmsgstr \"用于防止链接到单独页面或其他任何地方。\"\n\n#: src/meta/doc.md:91\nmsgid \"// Example from libcore/prelude\\n\"\nmsgstr \"// libcore/prelude 中的示例\\n\"\n\n#: src/meta/doc.md:96\nmsgid \"`hidden`\"\nmsgstr \"`hidden`\"\n\n#: src/meta/doc.md:98\nmsgid \"Using this tells `rustdoc` not to include this in documentation:\"\nmsgstr \"使用此属性告诉 `rustdoc` 不要在文档中包含此内容：\"\n\n#: src/meta/doc.md:101\nmsgid \"// Example from the futures-rs library\\n\"\nmsgstr \"// futures-rs 库中的示例\\n\"\n\n#: src/meta/doc.md:106\nmsgid \"\"\n\"For documentation, `rustdoc` is widely used by the community. It's what is \"\n\"used to generate the [std library docs](https://doc.rust-lang.org/std/).\"\nmsgstr \"\"\n\"在文档生成方面，`rustdoc` 被社区广泛使用。它是用来生成 [标准库文档](https://\"\n\"doc.rust-lang.org/std/) 的工具。\"\n\n#: src/meta/doc.md:111\nmsgid \"\"\n\"[The Rust Book: Making Useful Documentation Comments](https://doc.rust-\"\n\"lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-\"\n\"documentation-comments)\"\nmsgstr \"\"\n\"[《Rust 程序设计语言》：编写有用的文档注释](https://doc.rust-lang.org/book/\"\n\"ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments)\"\n\n#: src/meta/doc.md:112\nmsgid \"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/index.html)\"\nmsgstr \"[rustdoc 手册](https://doc.rust-lang.org/rustdoc/index.html)\"\n\n#: src/meta/doc.md:113\nmsgid \"\"\n\"[The Reference: Doc comments](https://doc.rust-lang.org/stable/reference/\"\n\"comments.html#doc-comments)\"\nmsgstr \"\"\n\"[Rust 参考手册：文档注释](https://doc.rust-lang.org/stable/reference/\"\n\"comments.html#doc-comments)\"\n\n#: src/meta/doc.md:114\nmsgid \"\"\n\"[RFC 1574: API Documentation Conventions](https://rust-lang.github.io/rfcs/\"\n\"1574-more-api-documentation-conventions.html#appendix-a-full-conventions-\"\n\"text)\"\nmsgstr \"\"\n\"[RFC 1574：API 文档约定](https://rust-lang.github.io/rfcs/1574-more-api-\"\n\"documentation-conventions.html#appendix-a-full-conventions-text)\"\n\n#: src/meta/doc.md:115\nmsgid \"\"\n\"[RFC 1946: Relative links to other items from doc comments (intra-rustdoc \"\n\"links)](https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html)\"\nmsgstr \"\"\n\"[RFC 1946：文档注释中的相对链接（rustdoc 内部链接）](https://rust-\"\n\"lang.github.io/rfcs/1946-intra-rustdoc-links.html)\"\n\n#: src/meta/doc.md:116\nmsgid \"\"\n\"[Is there any documentation style guide for comments? (reddit)](https://\"\n\"www.reddit.com/r/rust/comments/ahb50s/\"\n\"is_there_any_documentation_style_guide_for/)\"\nmsgstr \"\"\n\"[有关注释的文档风格指南？（Reddit 讨论）](https://www.reddit.com/r/rust/\"\n\"comments/ahb50s/is_there_any_documentation_style_guide_for/)\"\n\n#: src/meta/playground.md:3\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) is a way to experiment \"\n\"with Rust code through a web interface.\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/) 是一个通过网页界面体验 Rust 代\"\n\"码的平台。\"\n\n#: src/meta/playground.md:6\nmsgid \"Using it with `mdbook`\"\nmsgstr \"在 `mdbook` 中使用 Playground\"\n\n#: src/meta/playground.md:8\nmsgid \"\"\n\"In [`mdbook`](https://github.com/rust-lang/mdBook), you can make code \"\n\"examples playable and editable.\"\nmsgstr \"\"\n\"在 [`mdbook`](https://github.com/rust-lang/mdBook) 中，你可以让代码示例变得可\"\n\"运行和可编辑。\"\n\n#: src/meta/playground.md:16\nmsgid \"\"\n\"This allows the reader to both run your code sample, but also modify and \"\n\"tweak it. The key here is the adding of the word `editable` to your \"\n\"codefence block separated by a comma.\"\nmsgstr \"\"\n\"这不仅允许读者运行你的代码示例，还能修改和调整它。关键是在代码块标记中添加 \"\n\"`editable` 关键字，用逗号分隔。\"\n\n#: src/meta/playground.md:26\nmsgid \"\"\n\"Additionally, you can add `ignore` if you want `mdbook` to skip your code \"\n\"when it builds and tests.\"\nmsgstr \"\"\n\"此外，如果你希望 `mdbook` 在构建和测试时跳过某段代码，可以添加 `ignore` 关键\"\n\"字。\"\n\n#: src/meta/playground.md:35\nmsgid \"Using it with docs\"\nmsgstr \"在文档中使用 Playground\"\n\n#: src/meta/playground.md:37\nmsgid \"\"\n\"You may have noticed in some of the [official Rust docs](https://doc.rust-\"\n\"lang.org/core/) a button that says \\\"Run\\\", which opens the code sample up \"\n\"in a new tab in Rust Playground. This feature is enabled if you use the \"\n\"`#[doc]` attribute called [`html_playground_url`](https://doc.rust-lang.org/\"\n\"rustdoc/write-documentation/the-doc-attribute.html#html_playground_url).\"\nmsgstr \"\"\n\"你可能注意到在一些[官方 Rust 文档](https://doc.rust-lang.org/core/)中有一个\"\n\"\\\"运行\\\"按钮，点击后会在 Rust Playground 的新标签页中打开代码示例。要启用此功\"\n\"能，需要使用 `#[doc]` 属性中的 [`html_playground_url`](https://doc.rust-\"\n\"lang.org/rustdoc/write-documentation/the-doc-\"\n\"attribute.html#html_playground_url)。\"\n\n#: src/meta/playground.md:42\nmsgid \"\"\n\"````text\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\nmsgstr \"\"\n\"````text\\n\"\n\"#![doc(html_playground_url = \\\"https://play.rust-lang.org/\\\")]\\n\"\n\"//! ```\\n\"\n\"//! println!(\\\"Hello World\\\");\\n\"\n\"//! ```\\n\"\n\"````\"\n\n#: src/meta/playground.md:51\nmsgid \"[The Rust Playground](https://play.rust-lang.org/)\"\nmsgstr \"[Rust Playground](https://play.rust-lang.org/)\"\n\n#: src/meta/playground.md:52\nmsgid \"\"\n\"[The Rust Playground On Github](https://github.com/integer32llc/rust-\"\n\"playground/)\"\nmsgstr \"\"\n\"[GitHub 上的 Rust Playground](https://github.com/integer32llc/rust-\"\n\"playground/)\"\n\n#: src/meta/playground.md:53\nmsgid \"\"\n\"[The rustdoc Book](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)\"\nmsgstr \"[rustdoc 手册](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html)\"\n"
  },
  {
    "path": "src/SUMMARY.md",
    "content": "# Summary\n\n[Introduction](index.md)\n\n- [Hello World](hello.md)\n    - [Comments](hello/comment.md)\n    - [Formatted print](hello/print.md)\n        - [Debug](hello/print/print_debug.md)\n        - [Display](hello/print/print_display.md)\n            - [Testcase: List](hello/print/print_display/testcase_list.md)\n        - [Formatting](hello/print/fmt.md)\n\n- [Primitives](primitives.md)\n    - [Literals and operators](primitives/literals.md)\n    - [Tuples](primitives/tuples.md)\n    - [Arrays and Slices](primitives/array.md)\n\n- [Custom Types](custom_types.md)\n    - [Structures](custom_types/structs.md)\n    - [Enums](custom_types/enum.md)\n        - [use](custom_types/enum/enum_use.md)\n        - [C-like](custom_types/enum/c_like.md)\n        - [Testcase: linked-list](custom_types/enum/testcase_linked_list.md)\n    - [constants](custom_types/constants.md)\n\n- [Variable Bindings](variable_bindings.md)\n    - [Mutability](variable_bindings/mut.md)\n    - [Scope and Shadowing](variable_bindings/scope.md)\n    - [Declare first](variable_bindings/declare.md)\n    - [Freezing](variable_bindings/freeze.md)\n\n- [Types](types.md)\n    - [Casting](types/cast.md)\n    - [Literals](types/literals.md)\n    - [Inference](types/inference.md)\n    - [Aliasing](types/alias.md)\n\n- [Conversion](conversion.md)\n    - [`From` and `Into`](conversion/from_into.md)\n    - [`TryFrom` and `TryInto`](conversion/try_from_try_into.md)\n    - [To and from `String`s](conversion/string.md)\n\n- [Expressions](expression.md)\n\n- [Flow of Control](flow_control.md)\n    - [if/else](flow_control/if_else.md)\n    - [loop](flow_control/loop.md)\n        - [Nesting and labels](flow_control/loop/nested.md)\n        - [Returning from loops](flow_control/loop/return.md)\n    - [while](flow_control/while.md)\n    - [for and range](flow_control/for.md)\n    - [match](flow_control/match.md)\n        - [Destructuring](flow_control/match/destructuring.md)\n            - [tuples](flow_control/match/destructuring/destructure_tuple.md)\n            - [arrays/slices](flow_control/match/destructuring/destructure_slice.md)\n            - [enums](flow_control/match/destructuring/destructure_enum.md)\n            - [pointers/ref](flow_control/match/destructuring/destructure_pointers.md)\n            - [structs](flow_control/match/destructuring/destructure_structures.md)\n        - [Guards](flow_control/match/guard.md)\n        - [Binding](flow_control/match/binding.md)\n    - [if let](flow_control/if_let.md)\n    - [let-else](flow_control/let_else.md)\n    - [while let](flow_control/while_let.md)\n\n- [Functions](fn.md)\n    - [Methods](fn/methods.md)\n    - [Closures](fn/closures.md)\n        - [Capturing](fn/closures/capture.md)\n        - [As input parameters](fn/closures/input_parameters.md)\n        - [Type anonymity](fn/closures/anonymity.md)\n        - [Input functions](fn/closures/input_functions.md)\n        - [As output parameters](fn/closures/output_parameters.md)\n        - [Examples in `std`](fn/closures/closure_examples.md)\n            - [Iterator::any](fn/closures/closure_examples/iter_any.md)\n            - [Searching through iterators](fn/closures/closure_examples/iter_find.md)\n    - [Higher Order Functions](fn/hof.md)\n    - [Diverging functions](fn/diverging.md)\n\n- [Modules](mod.md)\n    - [Visibility](mod/visibility.md)\n    - [Struct visibility](mod/struct_visibility.md)\n    - [The `use` declaration](mod/use.md)\n    - [`super` and `self`](mod/super.md)\n    - [File hierarchy](mod/split.md)\n\n- [Crates](crates.md)\n    - [Creating a Library](crates/lib.md)\n    - [Using a Library](crates/using_lib.md)\n\n- [Cargo](cargo.md)\n    - [Dependencies](cargo/deps.md)\n    - [Conventions](cargo/conventions.md)\n    - [Tests](cargo/test.md)\n    - [Build Scripts](cargo/build_scripts.md)\n\n- [Attributes](attribute.md)\n    - [`dead_code`](attribute/unused.md)\n    - [Crates](attribute/crate.md)\n    - [`cfg`](attribute/cfg.md)\n        - [Custom](attribute/cfg/custom.md)\n\n- [Generics](generics.md)\n    - [Functions](generics/gen_fn.md)\n    - [Implementation](generics/impl.md)\n    - [Traits](generics/gen_trait.md)\n    - [Bounds](generics/bounds.md)\n        - [Testcase: empty bounds](generics/bounds/testcase_empty.md)\n    - [Multiple bounds](generics/multi_bounds.md)\n    - [Where clauses](generics/where.md)\n    - [New Type Idiom](generics/new_types.md)\n    - [Associated items](generics/assoc_items.md)\n        - [The Problem](generics/assoc_items/the_problem.md)\n        - [Associated types](generics/assoc_items/types.md)\n    - [Phantom type parameters](generics/phantom.md)\n        - [Testcase: unit clarification](generics/phantom/testcase_units.md)\n\n- [Scoping rules](scope.md)\n    - [RAII](scope/raii.md)\n    - [Ownership and moves](scope/move.md)\n        - [Mutability](scope/move/mut.md)\n        - [Partial moves](scope/move/partial_move.md)\n    - [Borrowing](scope/borrow.md)\n        - [Mutability](scope/borrow/mut.md)\n        - [Aliasing](scope/borrow/alias.md)\n        - [The ref pattern](scope/borrow/ref.md)\n    - [Lifetimes](scope/lifetime.md)\n        - [Explicit annotation](scope/lifetime/explicit.md)\n        - [Functions](scope/lifetime/fn.md)\n        - [Methods](scope/lifetime/methods.md)\n        - [Structs](scope/lifetime/struct.md)\n        - [Traits](scope/lifetime/trait.md)\n        - [Bounds](scope/lifetime/lifetime_bounds.md)\n        - [Coercion](scope/lifetime/lifetime_coercion.md)\n        - [Static](scope/lifetime/static_lifetime.md)\n        - [Elision](scope/lifetime/elision.md)\n\n- [Traits](trait.md)\n    - [Derive](trait/derive.md)\n    - [Returning Traits with `dyn`](trait/dyn.md)\n    - [Operator Overloading](trait/ops.md)\n    - [Drop](trait/drop.md)\n    - [Iterators](trait/iter.md)\n    - [`impl Trait`](trait/impl_trait.md)\n    - [Clone](trait/clone.md)\n    - [Supertraits](trait/supertraits.md)\n    - [Disambiguating overlapping traits](trait/disambiguating.md)\n\n- [macro_rules!](macros.md)\n    - [Syntax](macros/syntax.md)\n        - [Designators](macros/designators.md)\n        - [Overload](macros/overload.md)\n        - [Repeat](macros/repeat.md)\n    - [DRY (Don't Repeat Yourself)](macros/dry.md)\n    - [DSL (Domain Specific Languages)](macros/dsl.md)\n    - [Variadics](macros/variadics.md)\n\n- [Error handling](error.md)\n    - [`panic`](error/panic.md)\n    - [`abort` & `unwind`](error/abort_unwind.md)\n    - [`Option` & `unwrap`](error/option_unwrap.md)\n        - [Unpacking options with `?`](error/option_unwrap/question_mark.md)\n        - [Combinators: `map`](error/option_unwrap/map.md)\n        - [Combinators: `and_then`](error/option_unwrap/and_then.md)\n        - [Defaults: `or`, `or_else`, `get_or_insert`, `get_or_insert_with`](error/option_unwrap/defaults.md)\n    - [`Result`](error/result.md)\n        - [`map` for `Result`](error/result/result_map.md)\n        - [aliases for `Result`](error/result/result_alias.md)\n        - [Early returns](error/result/early_returns.md)\n        - [Introducing `?`](error/result/enter_question_mark.md)\n    - [Multiple error types](error/multiple_error_types.md)\n        - [Pulling `Result`s out of `Option`s](error/multiple_error_types/option_result.md)\n        - [Defining an error type](error/multiple_error_types/define_error_type.md)\n        - [`Box`ing errors](error/multiple_error_types/boxing_errors.md)\n        - [Other uses of `?`](error/multiple_error_types/reenter_question_mark.md)\n        - [Wrapping errors](error/multiple_error_types/wrap_error.md)\n    - [Iterating over `Result`s](error/iter_result.md)\n\n- [Std library types](std.md)\n    - [Box, stack and heap](std/box.md)\n    - [Vectors](std/vec.md)\n    - [Strings](std/str.md)\n    - [`Option`](std/option.md)\n    - [`Result`](std/result.md)\n        - [`?`](std/result/question_mark.md)\n    - [`panic!`](std/panic.md)\n    - [HashMap](std/hash.md)\n        - [Alternate/custom key types](std/hash/alt_key_types.md)\n        - [HashSet](std/hash/hashset.md)\n    - [`Rc`](std/rc.md)\n    - [`Arc`](std/arc.md)\n\n- [Std misc](std_misc.md)\n    - [Threads](std_misc/threads.md)\n        - [Testcase: map-reduce](std_misc/threads/testcase_mapreduce.md)\n    - [Channels](std_misc/channels.md)\n    - [Path](std_misc/path.md)\n    - [File I/O](std_misc/file.md)\n        - [`open`](std_misc/file/open.md)\n        - [`create`](std_misc/file/create.md)\n        - [`read_lines`](std_misc/file/read_lines.md)\n    - [Child processes](std_misc/process.md)\n        - [Pipes](std_misc/process/pipe.md)\n        - [Wait](std_misc/process/wait.md)\n    - [Filesystem Operations](std_misc/fs.md)\n    - [Program arguments](std_misc/arg.md)\n        - [Argument parsing](std_misc/arg/matching.md)\n    - [Foreign Function Interface](std_misc/ffi.md)\n\n- [Testing](testing.md)\n    - [Unit testing](testing/unit_testing.md)\n    - [Documentation testing](testing/doc_testing.md)\n    - [Integration testing](testing/integration_testing.md)\n    - [Dev-dependencies](testing/dev_dependencies.md)\n\n- [Unsafe Operations](unsafe.md)\n    - [Inline assembly](unsafe/asm.md)\n\n- [Compatibility](compatibility.md)\n    - [Raw identifiers](compatibility/raw_identifiers.md)\n\n- [Meta](meta.md)\n    - [Documentation](meta/doc.md)\n    - [Playground](meta/playground.md)\n"
  },
  {
    "path": "src/attribute/cfg/custom.md",
    "content": "# Custom\n\nSome conditionals like `target_os` are implicitly provided by `rustc`, but\ncustom conditionals must be passed to `rustc` using the `--cfg` flag.\n\n```rust,editable,ignore,mdbook-runnable\n#[cfg(some_condition)]\nfn conditional_function() {\n    println!(\"condition met!\");\n}\n\nfn main() {\n    conditional_function();\n}\n```\n\nTry to run this to see what happens without the custom `cfg` flag.\n\nWith the custom `cfg` flag:\n\n```shell\n$ rustc --cfg some_condition custom.rs && ./custom\ncondition met!\n```\n"
  },
  {
    "path": "src/attribute/cfg.md",
    "content": "# `cfg`\n\nConfiguration conditional checks are possible through two different operators:\n\n* the `cfg` attribute: `#[cfg(...)]` in attribute position\n* the `cfg!` macro: `cfg!(...)` in boolean expressions\n\nWhile the former enables conditional compilation, the latter conditionally\nevaluates to `true` or `false` literals allowing for checks at run-time. Both\nutilize identical argument syntax.\n\n`cfg!`, unlike `#[cfg]`, does not remove any code and only evaluates to true or false. For example, all blocks in an if/else expression need to be valid when `cfg!` is used for the condition, regardless of what `cfg!` is evaluating.\n\n```rust,editable\n// This function only gets compiled if the target OS is linux\n#[cfg(target_os = \"linux\")]\nfn are_you_on_linux() {\n    println!(\"You are running linux!\");\n}\n\n// And this function only gets compiled if the target OS is *not* linux\n#[cfg(not(target_os = \"linux\"))]\nfn are_you_on_linux() {\n    println!(\"You are *not* running linux!\");\n}\n\nfn main() {\n    are_you_on_linux();\n\n    println!(\"Are you sure?\");\n    if cfg!(target_os = \"linux\") {\n        println!(\"Yes. It's definitely linux!\");\n    } else {\n        println!(\"Yes. It's definitely *not* linux!\");\n    }\n}\n```\n\n### See also:\n\n[the reference][ref], [`cfg!`][cfg], and [macros][macros].\n\n[cfg]: https://doc.rust-lang.org/std/macro.cfg!.html\n[macros]: ../macros.md\n[ref]: https://doc.rust-lang.org/reference/attributes.html#conditional-compilation\n"
  },
  {
    "path": "src/attribute/crate.md",
    "content": "# Crates\n\nThe `crate_type` attribute can be used to tell the compiler whether a crate is\na binary or a library (and even which type of library), and the `crate_name`\nattribute can be used to set the name of the crate.\n\nHowever, it is important to note that both the `crate_type` and `crate_name`\nattributes have **no** effect whatsoever when using Cargo, the Rust package\nmanager. Since Cargo is used for the majority of Rust projects, this means\nreal-world uses of `crate_type` and `crate_name` are relatively limited.\n\n```rust,editable\n// This crate is a library\n#![crate_type = \"lib\"]\n// The library is named \"rary\"\n#![crate_name = \"rary\"]\n\npub fn public_function() {\n    println!(\"called rary's `public_function()`\");\n}\n\nfn private_function() {\n    println!(\"called rary's `private_function()`\");\n}\n\npub fn indirect_access() {\n    print!(\"called rary's `indirect_access()`, that\\n> \");\n\n    private_function();\n}\n```\n\nWhen the `crate_type` attribute is used, we no longer need to pass the\n`--crate-type` flag to `rustc`.\n\n```shell\n$ rustc lib.rs\n$ ls lib*\nlibrary.rlib\n```\n"
  },
  {
    "path": "src/attribute/unused.md",
    "content": "# `dead_code`\n\nThe compiler provides a `dead_code`\n[*lint*][lint] that will warn\nabout unused functions. An *attribute* can be used to disable the lint.\n\n```rust,editable\nfn used_function() {}\n\n// `#[allow(dead_code)]` is an attribute that disables the `dead_code` lint\n#[allow(dead_code)]\nfn unused_function() {}\n\nfn noisy_unused_function() {}\n// FIXME ^ Add an attribute to suppress the warning\n\nfn main() {\n    used_function();\n}\n```\n\nNote that in real programs, you should eliminate dead code. In these examples\nwe'll allow dead code in some places because of the interactive nature of the\nexamples.\n\n[lint]: https://en.wikipedia.org/wiki/Lint_%28software%29\n"
  },
  {
    "path": "src/attribute.md",
    "content": "# Attributes\n\nAn attribute is metadata applied to some module, crate or item. This metadata\ncan be used to/for:\n\n<!-- TODO: Link these to their respective examples -->\n\n* [conditional compilation of code][cfg]\n* [set crate name, version and type (binary or library)][crate]\n* disable [lints][lint] (warnings)\n* enable compiler features (macros, glob imports, etc.)\n* link to a foreign library\n* mark functions as unit tests\n* mark functions that will be part of a benchmark\n* [attribute like macros][macros]\n\nAttributes look like `#[outer_attribute]` or `#![inner_attribute]`,\nwith the difference between them being where they apply.\n\n* `#[outer_attribute]` applies to the [item][item] immediately\n  following it. Some examples of items are: a function, a module\n  declaration, a constant, a structure, an enum. Here is an example\n  where attribute `#[derive(Debug)]` applies to the struct\n  `Rectangle`:\n\n  ```rust\n  #[derive(Debug)]\n  struct Rectangle {\n      width: u32,\n      height: u32,\n  }\n  ```\n\n* `#![inner_attribute]` applies to the enclosing [item][item] (typically a\n  module or a crate). In other words, this attribute is interpreted as\n  applying to the entire scope in which it's placed. Here is an example\n  where `#![allow(unused_variables)]` applies to the whole crate (if\n  placed in `main.rs`):\n\n  ```rust\n  #![allow(unused_variables)]\n\n  fn main() {\n      let x = 3; // This would normally warn about an unused variable.\n  }\n  ```\n\nAttributes can take arguments with different syntaxes:\n\n* `#[attribute = \"value\"]`\n* `#[attribute(key = \"value\")]`\n* `#[attribute(value)]`\n\nAttributes can have multiple values and can be separated over multiple lines, too:\n\n```rust,ignore\n#[attribute(value, value2)]\n\n\n#[attribute(value, value2, value3,\n            value4, value5)]\n```\n\n[cfg]: attribute/cfg.md\n[crate]: attribute/crate.md\n[item]: https://doc.rust-lang.org/stable/reference/items.html\n[lint]: https://en.wikipedia.org/wiki/Lint_%28software%29\n[macros]: https://doc.rust-lang.org/book/ch19-06-macros.html#attribute-like-macros\n"
  },
  {
    "path": "src/cargo/build_scripts.md",
    "content": "# Build Scripts\n\nSometimes a normal build from `cargo` is not enough. Perhaps your crate needs\nsome pre-requisites before `cargo` will successfully compile, things like code\ngeneration, or some native code that needs to be compiled. To solve this problem\nwe have build scripts that Cargo can run.\n\nTo add a build script to your package it can either be specified in the\n`Cargo.toml` as follows:\n\n```toml\n[package]\n...\nbuild = \"build.rs\"\n```\n\nOtherwise Cargo will look for a `build.rs` file in the project directory by\ndefault.\n\n## How to use a build script\n\nThe build script is simply another Rust file that will be compiled and invoked\nprior to compiling anything else in the package. Hence it can be used to fulfill\npre-requisites of your crate.\n\nCargo provides the script with inputs via environment variables [specified\nhere] that can be used.\n\nThe script provides output via stdout. All lines printed are written to\n`target/debug/build/<pkg>/output`. Further, lines prefixed with `cargo:` will be\ninterpreted by Cargo directly and hence can be used to define parameters for the\npackage's compilation.\n\nFor further specification and examples have a read of the\n[Cargo specification][cargo_specification].\n\n[specified here]: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts\n\n[cargo_specification]: https://doc.rust-lang.org/cargo/reference/build-scripts.html\n"
  },
  {
    "path": "src/cargo/conventions.md",
    "content": "# Conventions\n\nIn the previous chapter, we saw the following directory hierarchy:\n\n```txt\nfoo\n├── Cargo.toml\n└── src\n    └── main.rs\n```\n\nSuppose that we wanted to have two binaries in the same project, though. What\nthen?\n\nIt turns out that `cargo` supports this. The default binary name is `main`, as\nwe saw before, but you can add additional binaries by placing them in a `bin/`\ndirectory:\n\n```txt\nfoo\n├── Cargo.toml\n└── src\n    ├── main.rs\n    └── bin\n        └── my_other_bin.rs\n```\n\nTo tell `cargo` to only compile or run this binary, we just pass `cargo` the\n`--bin my_other_bin` flag, where `my_other_bin` is the name of the binary we\nwant to work with.\n\nIn addition to extra binaries, `cargo` supports [more features] such as\nbenchmarks, tests, and examples.\n\nIn the next chapter, we will look more closely at tests.\n\n[more features]: https://doc.rust-lang.org/cargo/guide/project-layout.html\n"
  },
  {
    "path": "src/cargo/deps.md",
    "content": "# Dependencies\n\nMost programs have dependencies on some libraries. If you have ever managed\ndependencies by hand, you know how much of a pain this can be. Luckily, the Rust\necosystem comes standard with `cargo`! `cargo` can manage dependencies for a\nproject.\n\nTo create a new Rust project,\n\n```sh\n# A binary\ncargo new foo\n\n# A library\ncargo new --lib bar\n```\n\nFor the rest of this chapter, let's assume we are making a binary, rather than\na library, but all of the concepts are the same.\n\nAfter the above commands, you should see a file hierarchy like this:\n\n```txt\n.\n├── bar\n│   ├── Cargo.toml\n│   └── src\n│       └── lib.rs\n└── foo\n    ├── Cargo.toml\n    └── src\n        └── main.rs\n```\n\nThe `main.rs` is the root source file for your new `foo` project -- nothing new there.\nThe `Cargo.toml` is the config file for `cargo` for this project. If you\nlook inside it, you should see something like this:\n\n```toml\n[package]\nname = \"foo\"\nversion = \"0.1.0\"\nauthors = [\"mark\"]\n\n[dependencies]\n```\n\nThe `name` field under `[package]` determines the name of the project. This is\nused by `crates.io` if you publish the crate (more later). It is also the name\nof the output binary when you compile.\n\nThe `version` field is a crate version number using [Semantic\nVersioning](http://semver.org/).\n\nThe `authors` field is a list of authors used when publishing the crate.\n\nThe `[dependencies]` section lets you add dependencies for your project.\n\nFor example, suppose that we want our program to have a great CLI. You can find\nlots of great packages on [crates.io](https://crates.io) (the official Rust\npackage registry). One popular choice is [clap](https://crates.io/crates/clap).\nAs of this writing, the most recent published version of `clap` is `2.27.1`. To\nadd a dependency to our program, we can simply add the following to our\n`Cargo.toml` under `[dependencies]`: `clap = \"2.27.1\"`. And that's it! You can start using\n`clap` in your program.\n\n`cargo` also supports [other types of dependencies][dependencies]. Here is just\na small sampling:\n\n```toml\n[package]\nname = \"foo\"\nversion = \"0.1.0\"\nauthors = [\"mark\"]\n\n[dependencies]\nclap = \"2.27.1\" # from crates.io\nrand = { git = \"https://github.com/rust-lang-nursery/rand\" } # from online repo\nbar = { path = \"../bar\" } # from a path in the local filesystem\n```\n\n`cargo` is more than a dependency manager. All of the available\nconfiguration options are listed in the [format specification][manifest] of\n`Cargo.toml`.\n\nTo build our project we can execute `cargo build` anywhere in the project\ndirectory (including subdirectories!). We can also do `cargo run` to build and\nrun. Notice that these commands will resolve all dependencies, download crates\nif needed, and build everything, including your crate. (Note that it only\nrebuilds what it has not already built, similar to `make`).\n\nVoila! That's all there is to it!\n\n[manifest]: https://doc.rust-lang.org/cargo/reference/manifest.html\n[dependencies]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html\n"
  },
  {
    "path": "src/cargo/test.md",
    "content": "# Testing\n\nAs we know testing is integral to any piece of software! Rust has first-class\nsupport for unit and integration testing ([see this\nchapter](https://doc.rust-lang.org/book/ch11-00-testing.html) in TRPL).\n\nFrom the testing chapters linked above, we see how to write unit tests and\nintegration tests. Organizationally, we can place unit tests in the modules they\ntest and integration tests in their own `tests/` directory:\n\n```txt\nfoo\n├── Cargo.toml\n├── src\n│   └── main.rs\n│   └── lib.rs\n└── tests\n    ├── my_test.rs\n    └── my_other_test.rs\n```\n\nEach file in `tests` is a separate\n[integration test](https://doc.rust-lang.org/book/ch11-03-test-organization.html#integration-tests),\ni.e. a test that is meant to test your library as if it were being called from a dependent\ncrate.\n\nThe [Testing][testing] chapter elaborates on the three different testing styles:\n[Unit][unit_testing], [Doc][doc_testing], and [Integration][integration_testing].\n\n`cargo` naturally provides an easy way to run all of your tests!\n\n```shell\n$ cargo test\n```\n\nYou should see output like this:\n\n```shell\n$ cargo test\n   Compiling blah v0.1.0 (file:///nobackup/blah)\n    Finished dev [unoptimized + debuginfo] target(s) in 0.89 secs\n     Running target/debug/deps/blah-d3b32b97275ec472\n\nrunning 4 tests\ntest test_bar ... ok\ntest test_baz ... ok\ntest test_foo_bar ... ok\ntest test_foo ... ok\n\ntest result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\nYou can also run tests whose name matches a pattern:\n\n```shell\n$ cargo test test_foo\n```\n\n```shell\n$ cargo test test_foo\n   Compiling blah v0.1.0 (file:///nobackup/blah)\n    Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs\n     Running target/debug/deps/blah-d3b32b97275ec472\n\nrunning 2 tests\ntest test_foo ... ok\ntest test_foo_bar ... ok\n\ntest result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out\n```\n\nOne word of caution: Cargo may run multiple tests concurrently, so make sure\nthat they don't race with each other.\n\nOne example of this concurrency causing issues is if two tests output to a\nfile, such as below:\n\n```rust\n#[cfg(test)]\nmod tests {\n    // Import the necessary modules\n    use std::fs::OpenOptions;\n    use std::io::Write;\n\n    // This test writes to a file\n    #[test]\n    fn test_file() {\n        // Opens the file ferris.txt or creates one if it doesn't exist.\n        let mut file = OpenOptions::new()\n            .append(true)\n            .create(true)\n            .open(\"ferris.txt\")\n            .expect(\"Failed to open ferris.txt\");\n\n        // Print \"Ferris\" 5 times.\n        for _ in 0..5 {\n            file.write_all(\"Ferris\\n\".as_bytes())\n                .expect(\"Could not write to ferris.txt\");\n        }\n    }\n\n    // This test tries to write to the same file\n    #[test]\n    fn test_file_also() {\n        // Opens the file ferris.txt or creates one if it doesn't exist.\n        let mut file = OpenOptions::new()\n            .append(true)\n            .create(true)\n            .open(\"ferris.txt\")\n            .expect(\"Failed to open ferris.txt\");\n\n        // Print \"Corro\" 5 times.\n        for _ in 0..5 {\n            file.write_all(\"Corro\\n\".as_bytes())\n                .expect(\"Could not write to ferris.txt\");\n        }\n    }\n}\n```\n\nAlthough the intent is to get the following:\n\n```shell\n$ cat ferris.txt\nFerris\nFerris\nFerris\nFerris\nFerris\nCorro\nCorro\nCorro\nCorro\nCorro\n```\n\nWhat actually gets put into `ferris.txt` is this:\n\n```shell\n$ cargo test test_file && cat ferris.txt\nCorro\nFerris\nCorro\nFerris\nCorro\nFerris\nCorro\nFerris\nCorro\nFerris\n```\n\n[testing]: ../testing.md\n[unit_testing]: ../testing/unit_testing.md\n[integration_testing]: ../testing/integration_testing.md\n[doc_testing]: ../testing/doc_testing.md\n"
  },
  {
    "path": "src/cargo.md",
    "content": "# Cargo\n\n`cargo` is the official Rust package management tool. It has lots of really\nuseful features to improve code quality and developer velocity! These include\n\n- Dependency management and integration with [crates.io](https://crates.io) (the\n  official Rust package registry)\n- Awareness of unit tests\n- Awareness of benchmarks\n\nThis chapter will go through some quick basics, but you can find the\ncomprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/).\n"
  },
  {
    "path": "src/compatibility/raw_identifiers.md",
    "content": "# Raw identifiers\n\nRust, like many programming languages, has the concept of \"keywords\".\nThese identifiers mean something to the language, and so you cannot use them in\nplaces like variable names, function names, and other places.\nRaw identifiers let you use keywords where they would not normally be allowed.\nThis is particularly useful when Rust introduces new keywords, and a library\nusing an older edition of Rust has a variable or function with the same name\nas a keyword introduced in a newer edition.\n\nFor example, consider a crate `foo` compiled with the 2015 edition of Rust that\nexports a function named `try`. This keyword is reserved for a new feature in\nthe 2018 edition, so without raw identifiers, we would have no way to name the\nfunction.\n\n```rust,ignore\nextern crate foo;\n\nfn main() {\n    foo::try();\n}\n```\n\nYou'll get this error:\n\n```text\nerror: expected identifier, found keyword `try`\n --> src/main.rs:4:4\n  |\n4 | foo::try();\n  |      ^^^ expected identifier, found keyword\n```\n\nYou can write this with a raw identifier:\n\n```rust,ignore\nextern crate foo;\n\nfn main() {\n    foo::r#try();\n}\n```\n"
  },
  {
    "path": "src/compatibility.md",
    "content": "# Compatibility\n\nThe Rust language is evolving rapidly, and because of this certain compatibility\nissues can arise, despite efforts to ensure forwards-compatibility wherever\npossible.\n\n* [Raw identifiers](compatibility/raw_identifiers.md)\n"
  },
  {
    "path": "src/conversion/from_into.md",
    "content": "# `From` and `Into`\n\nThe [`From`] and [`Into`] traits are inherently linked, and this is actually part of\nits implementation. If you are able to convert type A from type B, then it\nshould be easy to believe that we should be able to convert type B to type A.\n\n## `From`\n\nThe [`From`] trait allows for a type to define how to create itself from another\ntype, hence providing a very simple mechanism for converting between several\ntypes. There are numerous implementations of this trait within the standard\nlibrary for conversion of primitive and common types.\n\nFor example we can easily convert a `str` into a `String`\n\n```rust\nlet my_str = \"hello\";\nlet my_string = String::from(my_str);\n```\n\nWe can do something similar for defining a conversion for our own type.\n\n```rust,editable\nuse std::convert::From;\n\n#[derive(Debug)]\nstruct Number {\n    value: i32,\n}\n\nimpl From<i32> for Number {\n    fn from(item: i32) -> Self {\n        Number { value: item }\n    }\n}\n\nfn main() {\n    let num = Number::from(30);\n    println!(\"My number is {:?}\", num);\n}\n```\n\n## `Into`\n\nThe [`Into`] trait is simply the reciprocal of the `From` trait. It\ndefines how to convert a type into another type.\n\nCalling `into()` typically requires us to specify the result type as the compiler is unable to determine this most of the time.\n\n```rust,editable\nuse std::convert::Into;\n\n#[derive(Debug)]\nstruct Number {\n    value: i32,\n}\n\nimpl Into<Number> for i32 {\n    fn into(self) -> Number {\n        Number { value: self }\n    }\n}\n\nfn main() {\n    let int = 5;\n    // Try removing the type annotation\n    let num: Number = int.into();\n    println!(\"My number is {:?}\", num);\n}\n```\n\n## `From` and `Into` are interchangeable\n\n`From` and `Into` are designed to be complementary.\nWe do not need to provide an implementation for both traits.\nIf you have implemented the `From` trait for your type, `Into` will call it\nwhen necessary. Note, however, that the converse is not true: implementing `Into` for your type will not automatically provide it with an implementation of `From`.\n\n```rust,editable\nuse std::convert::From;\n\n#[derive(Debug)]\nstruct Number {\n    value: i32,\n}\n\n// Define `From`\nimpl From<i32> for Number {\n    fn from(item: i32) -> Self {\n        Number { value: item }\n    }\n}\n\nfn main() {\n    let int = 5;\n    // use `Into`\n    let num: Number = int.into();\n    println!(\"My number is {:?}\", num);\n}\n```\n\n[`From`]: https://doc.rust-lang.org/std/convert/trait.From.html\n[`Into`]: https://doc.rust-lang.org/std/convert/trait.Into.html\n"
  },
  {
    "path": "src/conversion/string.md",
    "content": "# To and from Strings\n\n## Converting to String\n\nTo convert any type to a `String` is as simple as implementing the [`ToString`]\ntrait for the type. Rather than doing so directly, you should implement the\n[`fmt::Display`][Display] trait which automatically provides [`ToString`] and\nalso allows printing the type as discussed in the section on [`print!`][print].\n\n```rust,editable\nuse std::fmt;\n\nstruct Circle {\n    radius: i32\n}\n\nimpl fmt::Display for Circle {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        write!(f, \"Circle of radius {}\", self.radius)\n    }\n}\n\nfn main() {\n    let circle = Circle { radius: 6 };\n    println!(\"{}\", circle.to_string());\n}\n```\n\n## Parsing a String\n\nIt's useful to convert strings into many types, but one of the more common string\noperations is to convert them from string to number. The idiomatic approach to\nthis is to use the [`parse`] function and either to arrange for type inference or\nto specify the type to parse using the 'turbofish' syntax. Both alternatives are\nshown in the following example.\n\nThis will convert the string into the type specified as long as the [`FromStr`]\ntrait is implemented for that type. This is implemented for numerous types\nwithin the standard library.\n\n```rust,editable\nfn main() {\n    let parsed: i32 = \"5\".parse().unwrap();\n    let turbo_parsed = \"10\".parse::<i32>().unwrap();\n\n    let sum = parsed + turbo_parsed;\n    println!(\"Sum: {:?}\", sum);\n}\n```\n\nTo obtain this functionality on a user defined type simply implement the\n[`FromStr`] trait for that type.\n\n```rust,editable\nuse std::num::ParseIntError;\nuse std::str::FromStr;\n\n#[derive(Debug)]\nstruct Circle {\n    radius: i32,\n}\n\nimpl FromStr for Circle {\n    type Err = ParseIntError;\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        match s.trim().parse() {\n            Ok(num) => Ok(Circle{ radius: num }),\n            Err(e) => Err(e),\n        }\n    }\n}\n\nfn main() {\n    let radius = \"    3 \";\n    let circle: Circle = radius.parse().unwrap();\n    println!(\"{:?}\", circle);\n}\n```\n\n[`ToString`]: https://doc.rust-lang.org/std/string/trait.ToString.html\n[Display]: https://doc.rust-lang.org/std/fmt/trait.Display.html\n[print]: ../hello/print.md\n[`parse`]: https://doc.rust-lang.org/std/primitive.str.html#method.parse\n[`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html\n"
  },
  {
    "path": "src/conversion/try_from_try_into.md",
    "content": "# `TryFrom` and `TryInto`\n\nSimilar to [`From` and `Into`][from-into], [`TryFrom`] and [`TryInto`] are\ngeneric traits for converting between types. Unlike `From`/`Into`, the\n`TryFrom`/`TryInto` traits are used for fallible conversions, and as such,\nreturn [`Result`]s.\n\n[from-into]: from_into.html\n[`TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html\n[`TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html\n[`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html\n\n```rust,editable\nuse std::convert::TryFrom;\nuse std::convert::TryInto;\n\n#[derive(Debug, PartialEq)]\nstruct EvenNumber(i32);\n\nimpl TryFrom<i32> for EvenNumber {\n    type Error = ();\n\n    fn try_from(value: i32) -> Result<Self, Self::Error> {\n        if value % 2 == 0 {\n            Ok(EvenNumber(value))\n        } else {\n            Err(())\n        }\n    }\n}\n\nfn main() {\n    // TryFrom\n\n    assert_eq!(EvenNumber::try_from(8), Ok(EvenNumber(8)));\n    assert_eq!(EvenNumber::try_from(5), Err(()));\n\n    // TryInto\n\n    let result: Result<EvenNumber, ()> = 8i32.try_into();\n    assert_eq!(result, Ok(EvenNumber(8)));\n    let result: Result<EvenNumber, ()> = 5i32.try_into();\n    assert_eq!(result, Err(()));\n}\n```\n"
  },
  {
    "path": "src/conversion.md",
    "content": "# Conversion\n\nPrimitive types can be converted to each other through [casting].\n\nRust addresses conversion between custom types (i.e., `struct` and `enum`)\nby the use of [traits]. The generic\nconversions will use the [`From`] and [`Into`] traits. However there are more\nspecific ones for the more common cases, in particular when converting to and\nfrom `String`s.\n\n[casting]: types/cast.md\n[traits]: trait.md\n[`From`]: https://doc.rust-lang.org/std/convert/trait.From.html\n[`Into`]: https://doc.rust-lang.org/std/convert/trait.Into.html\n"
  },
  {
    "path": "src/crates/lib.md",
    "content": "# Creating a Library\n\nLet's create a library, and then see how to link it to another crate.\n\nIn `rary.rs`:\n\n```rust,ignore\npub fn public_function() {\n    println!(\"called rary's `public_function()`\");\n}\n\nfn private_function() {\n    println!(\"called rary's `private_function()`\");\n}\n\npub fn indirect_access() {\n    print!(\"called rary's `indirect_access()`, that\\n> \");\n\n    private_function();\n}\n```\n\n```shell\n$ rustc --crate-type=lib rary.rs\n$ ls lib*\nlibrary.rlib\n```\n\nLibraries get prefixed with \"lib\", and by default they get named after their\ncrate file, but this default name can be overridden by passing\nthe `--crate-name` option to `rustc` or by using the [`crate_name`\nattribute][crate-name].\n\n[crate-name]: ../attribute/crate.md\n"
  },
  {
    "path": "src/crates/using_lib.md",
    "content": "# Using a Library\n\nTo link a crate to this new library you may use `rustc`'s `--extern` flag. All\nof its items will then be imported under a module named the same as the library.\nThis module generally behaves the same way as any other module.\n\n```rust,ignore\n// extern crate rary; // May be required for Rust 2015 edition or earlier\n\nfn main() {\n    rary::public_function();\n\n    // Error! `private_function` is private\n    //rary::private_function();\n\n    rary::indirect_access();\n}\n```\n\n```txt\n# Where library.rlib is the path to the compiled library, assumed that it's\n# in the same directory here:\n$ rustc executable.rs --extern rary=library.rlib && ./executable\ncalled rary's `public_function()`\ncalled rary's `indirect_access()`, that\n> called rary's `private_function()`\n```\n"
  },
  {
    "path": "src/crates.md",
    "content": "# Crates\n\nA crate is a compilation unit in Rust. Whenever `rustc some_file.rs` is called,\n`some_file.rs` is treated as the *crate file*. If `some_file.rs` has `mod`\ndeclarations in it, then the contents of the module files would be inserted in\nplaces where `mod` declarations in the crate file are found, *before* running\nthe compiler over it. In other words, modules do *not* get compiled\nindividually, only crates get compiled.\n\nA crate can be compiled into a binary or into a library. By default, `rustc`\nwill produce a binary from a crate. This behavior can be overridden by passing\nthe `--crate-type` flag to `lib`.\n"
  },
  {
    "path": "src/custom_types/constants.md",
    "content": "# constants\n\nRust has two different types of constants which can be declared in any scope\nincluding global. Both require explicit type annotation:\n\n* `const`: An unchangeable value (the common case).\n* `static`: A possibly mutable variable with [`'static`][static] lifetime.\n  The static lifetime is inferred and does not have to be specified.\n  Accessing or modifying a mutable static variable is [`unsafe`][unsafe].\n\n```rust,editable,ignore,mdbook-runnable\n// Globals are declared outside all other scopes.\nstatic LANGUAGE: &str = \"Rust\";\nconst THRESHOLD: i32 = 10;\n\nfn is_big(n: i32) -> bool {\n    // Access constant in some function\n    n > THRESHOLD\n}\n\nfn main() {\n    let n = 16;\n\n    // Access constant in the main thread\n    println!(\"This is {}\", LANGUAGE);\n    println!(\"The threshold is {}\", THRESHOLD);\n    println!(\"{} is {}\", n, if is_big(n) { \"big\" } else { \"small\" });\n\n    // Error! Cannot modify a `const`.\n    THRESHOLD = 5;\n    // FIXME ^ Comment out this line\n}\n```\n\n### See also:\n\n[The `const`/`static` RFC](\nhttps://github.com/rust-lang/rfcs/blob/master/text/0246-const-vs-static.md),\n[`'static` lifetime][static]\n\n[static]: ../scope/lifetime/static_lifetime.md\n[unsafe]: ../unsafe.md\n"
  },
  {
    "path": "src/custom_types/enum/c_like.md",
    "content": "# C-like\n\n`enum` can also be used as C-like enums.\n\n```rust,editable\n// An attribute to hide warnings for unused code.\n#![allow(dead_code)]\n\n// enum with implicit discriminator (starts at 0)\nenum Number {\n    Zero,\n    One,\n    Two,\n}\n\n// enum with explicit discriminator\nenum Color {\n    Red = 0xff0000,\n    Green = 0x00ff00,\n    Blue = 0x0000ff,\n}\n\nfn main() {\n    // `enums` can be cast as integers.\n    println!(\"zero is {}\", Number::Zero as i32);\n    println!(\"one is {}\", Number::One as i32);\n\n    println!(\"roses are #{:06x}\", Color::Red as u32);\n    println!(\"violets are #{:06x}\", Color::Blue as u32);\n}\n```\n\n### See also:\n\n[casting][cast]\n\n[cast]: ../../types/cast.md\n"
  },
  {
    "path": "src/custom_types/enum/enum_use.md",
    "content": "# use\n\nThe `use` declaration can be used to avoid typing the full module path to access a name:\n\n```rust,editable\n// An attribute to hide warnings for unused code.\n#![allow(dead_code)]\n\nenum Stage {\n    Beginner,\n    Advanced,\n}\n\nenum Role {\n    Student,\n    Teacher,\n}\n\nfn main() {\n    // Explicitly `use` each name so they are available without\n    // manual scoping.\n    use Stage::{Beginner, Advanced};\n    // Automatically `use` each name inside `Role`.\n    use Role::*;\n\n    // Equivalent to `Stage::Beginner`.\n    let stage = Beginner;\n    // Equivalent to `Role::Student`.\n    let role = Student;\n\n    match stage {\n        // Note the lack of scoping because of the explicit `use` above.\n        Beginner => println!(\"Beginners are starting their learning journey!\"),\n        Advanced => println!(\"Advanced learners are mastering their subjects...\"),\n    }\n\n    match role {\n        // Note again the lack of scoping.\n        Student => println!(\"Students are acquiring knowledge!\"),\n        Teacher => println!(\"Teachers are spreading knowledge!\"),\n    }\n}\n```\n\n### See also:\n\n[`match`][match] and [`use`][use]\n\n[use]: ../../mod/use.md\n[match]: ../../flow_control/match.md\n"
  },
  {
    "path": "src/custom_types/enum/testcase_linked_list.md",
    "content": "# Testcase: linked-list\n\nA common way to implement a linked-list is via `enums`:\n\n```rust,editable\nuse crate::List::*;\n\nenum List {\n    // Cons: Tuple struct that wraps an element and a pointer to the next node\n    Cons(u32, Box<List>),\n    // Nil: A node that signifies the end of the linked list\n    Nil,\n}\n\n// Methods can be attached to an enum\nimpl List {\n    // Create an empty list\n    fn new() -> List {\n        // `Nil` has type `List`\n        Nil\n    }\n\n    // Consume a list, and return the same list with a new element at its front\n    fn prepend(self, elem: u32) -> List {\n        // `Cons` also has type List\n        Cons(elem, Box::new(self))\n    }\n\n    // Return the length of the list\n    fn len(&self) -> u32 {\n        // `self` has to be matched, because the behavior of this method\n        // depends on the variant of `self`\n        // `self` has type `&List`, and `*self` has type `List`, matching on a\n        // concrete type `T` is preferred over a match on a reference `&T`\n        // after Rust 2018 you can use self here and tail (with no ref) below as well,\n        // rust will infer &s and ref tail.\n        // See https://doc.rust-lang.org/edition-guide/rust-2018/ownership-and-lifetimes/default-match-bindings.html\n        match *self {\n            // Can't take ownership of the tail, because `self` is borrowed;\n            // instead take a reference to the tail\n            // And it's a non-tail recursive call which may cause stack overflow for long lists.\n            Cons(_, ref tail) => 1 + tail.len(),\n            // Base Case: An empty list has zero length\n            Nil => 0\n        }\n    }\n\n    // Return representation of the list as a (heap allocated) string\n    fn stringify(&self) -> String {\n        match *self {\n            Cons(head, ref tail) => {\n                // `format!` is similar to `print!`, but returns a heap\n                // allocated string instead of printing to the console\n                format!(\"{}, {}\", head, tail.stringify())\n            },\n            Nil => {\n                format!(\"Nil\")\n            },\n        }\n    }\n}\n\nfn main() {\n    // Create an empty linked list\n    let mut list = List::new();\n\n    // Prepend some elements\n    list = list.prepend(1);\n    list = list.prepend(2);\n    list = list.prepend(3);\n\n    // Show the final state of the list\n    println!(\"linked list has length: {}\", list.len());\n    println!(\"{}\", list.stringify());\n}\n```\n\n### See also:\n\n[`Box`][box] and [methods][methods]\n\n[box]: ../../std/box.md\n[methods]: ../../fn/methods.md\n"
  },
  {
    "path": "src/custom_types/enum.md",
    "content": "# Enums\n\nThe `enum` keyword allows the creation of a type which may be one of a few\ndifferent variants. Any variant which is valid as a `struct` is also valid in\nan `enum`.\n\n```rust,editable\n// Create an `enum` to classify a web event. Note how both\n// names and type information together specify the variant:\n// `PageLoad != PageUnload` and `KeyPress(char) != Paste(String)`.\n// Each is different and independent.\nenum WebEvent {\n    // An `enum` variant may either be `unit-like`,\n    PageLoad,\n    PageUnload,\n    // like tuple structs,\n    KeyPress(char),\n    Paste(String),\n    // or c-like structures.\n    Click { x: i64, y: i64 },\n}\n\n// A function which takes a `WebEvent` enum as an argument and\n// returns nothing.\nfn inspect(event: WebEvent) {\n    match event {\n        WebEvent::PageLoad => println!(\"page loaded\"),\n        WebEvent::PageUnload => println!(\"page unloaded\"),\n        // Destructure `c` from inside the `enum` variant.\n        WebEvent::KeyPress(c) => println!(\"pressed '{}'.\", c),\n        WebEvent::Paste(s) => println!(\"pasted \\\"{}\\\".\", s),\n        // Destructure `Click` into `x` and `y`.\n        WebEvent::Click { x, y } => {\n            println!(\"clicked at x={}, y={}.\", x, y);\n        },\n    }\n}\n\nfn main() {\n    let pressed = WebEvent::KeyPress('x');\n    // `to_owned()` creates an owned `String` from a string slice.\n    let pasted  = WebEvent::Paste(\"my text\".to_owned());\n    let click   = WebEvent::Click { x: 20, y: 80 };\n    let load    = WebEvent::PageLoad;\n    let unload  = WebEvent::PageUnload;\n\n    inspect(pressed);\n    inspect(pasted);\n    inspect(click);\n    inspect(load);\n    inspect(unload);\n}\n\n```\n\n## Type aliases\n\nIf you use a type alias, you can refer to each enum variant via its alias.\nThis might be useful if the enum's name is too long or too generic, and you\nwant to rename it.\n\n```rust,editable\nenum VeryVerboseEnumOfThingsToDoWithNumbers {\n    Add,\n    Subtract,\n}\n\n// Creates a type alias\ntype Operations = VeryVerboseEnumOfThingsToDoWithNumbers;\n\nfn main() {\n    // We can refer to each variant via its alias, not its long and inconvenient\n    // name.\n    let x = Operations::Add;\n}\n```\n\nThe most common place you'll see this is in `impl` blocks using the `Self` alias.\n\n```rust,editable\nenum VeryVerboseEnumOfThingsToDoWithNumbers {\n    Add,\n    Subtract,\n}\n\nimpl VeryVerboseEnumOfThingsToDoWithNumbers {\n    fn run(&self, x: i32, y: i32) -> i32 {\n        match self {\n            Self::Add => x + y,\n            Self::Subtract => x - y,\n        }\n    }\n}\n```\n\nTo learn more about enums and type aliases, you can read the\n[stabilization report][aliasreport] from when this feature was stabilized into\nRust.\n\n### See also:\n\n[`match`][match], [`fn`][fn], and [`String`][str], [\"Type alias enum variants\" RFC][type_alias_rfc]\n\n[c_struct]: https://en.wikipedia.org/wiki/Struct_(C_programming_language)\n[match]: ../flow_control/match.md\n[fn]: ../fn.md\n[str]: ../std/str.md\n[aliasreport]: https://github.com/rust-lang/rust/pull/61682/#issuecomment-502472847\n[type_alias_rfc]: https://rust-lang.github.io/rfcs/2338-type-alias-enum-variants.html\n"
  },
  {
    "path": "src/custom_types/structs.md",
    "content": "# Structures\n\nThere are three types of structures (\"structs\") that can be created using the\n`struct` keyword:\n\n* Tuple structs, which are, basically, named tuples.\n* The classic [C structs][c_struct]\n* Unit structs, which are field-less, are useful for generics.\n\n```rust,editable\n// An attribute to hide warnings for unused code.\n#![allow(dead_code)]\n\n#[derive(Debug)]\nstruct Person {\n    name: String,\n    age: u8,\n}\n\n// A unit struct\nstruct Unit;\n\n// A tuple struct\nstruct Pair(i32, f32);\n\n// A struct with two fields\nstruct Point {\n    x: f32,\n    y: f32,\n}\n\n// Structs can be reused as fields of another struct\nstruct Rectangle {\n    // A rectangle can be specified by where the top left and bottom right\n    // corners are in space.\n    top_left: Point,\n    bottom_right: Point,\n}\n\nfn main() {\n    // Create struct with field init shorthand\n    let name = String::from(\"Peter\");\n    let age = 27;\n    let peter = Person { name, age };\n\n    // Print debug struct\n    println!(\"{:?}\", peter);\n\n    // Instantiate a `Point`\n    let point: Point = Point { x: 5.2, y: 0.4 };\n    let another_point: Point = Point { x: 10.3, y: 0.2 };\n\n    // Access the fields of the point\n    println!(\"point coordinates: ({}, {})\", point.x, point.y);\n\n    // Make a new point by using struct update syntax to use the fields of our\n    // other one\n    let bottom_right = Point { x: 10.3, ..another_point };\n\n    // `bottom_right.y` will be the same as `another_point.y` because we used that field\n    // from `another_point`\n    println!(\"second point: ({}, {})\", bottom_right.x, bottom_right.y);\n\n    // Destructure the point using a `let` binding\n    let Point { x: left_edge, y: top_edge } = point;\n\n    let _rectangle = Rectangle {\n        // struct instantiation is an expression too\n        top_left: Point { x: left_edge, y: top_edge },\n        bottom_right: bottom_right,\n    };\n\n    // Instantiate a unit struct\n    let _unit = Unit;\n\n    // Instantiate a tuple struct\n    let pair = Pair(1, 0.1);\n\n    // Access the fields of a tuple struct\n    println!(\"pair contains {:?} and {:?}\", pair.0, pair.1);\n\n    // Destructure a tuple struct\n    let Pair(integer, decimal) = pair;\n\n    println!(\"pair contains {:?} and {:?}\", integer, decimal);\n}\n```\n\n### Activity\n\n1. Add a function `rect_area` which calculates the area of a `Rectangle` (try\n   using nested destructuring).\n2. Add a function `square` which takes a `Point` and a `f32` as arguments, and\n   returns a `Rectangle` with its top left corner on the point, and a width and\n   height corresponding to the `f32`.\n\n### See also\n\n[`attributes`][attributes], [raw identifiers][raw_identifiers] and [destructuring][destructuring]\n\n[attributes]: ../attribute.md\n[c_struct]: https://en.wikipedia.org/wiki/Struct_(C_programming_language)\n[destructuring]: ../flow_control/match/destructuring.md\n[raw_identifiers]: ../compatibility/raw_identifiers.md\n"
  },
  {
    "path": "src/custom_types.md",
    "content": "# Custom Types\n\nRust custom data types are formed mainly through the two keywords:\n\n* `struct`: define a structure\n* `enum`: define an enumeration\n\nConstants can also be created via the `const` and `static` keywords.\n"
  },
  {
    "path": "src/error/abort_unwind.md",
    "content": "# `abort` and `unwind`\n\nThe previous section illustrates the error handling mechanism `panic`.  Different code paths can be conditionally compiled based on the panic setting. The current values available are `unwind` and `abort`.\n\nBuilding on the prior lemonade example, we explicitly use the panic strategy to exercise different lines of code.\n\n```rust,editable,mdbook-runnable\nfn drink(beverage: &str) {\n    // You shouldn't drink too much sugary beverages.\n    if beverage == \"lemonade\" {\n        if cfg!(panic = \"abort\") {\n            println!(\"This is not your party. Run!!!!\");\n        } else {\n            println!(\"Spit it out!!!!\");\n        }\n    } else {\n        println!(\"Some refreshing {} is all I need.\", beverage);\n    }\n}\n\nfn main() {\n    drink(\"water\");\n    drink(\"lemonade\");\n}\n```\n\nHere is another example focusing on rewriting `drink()` and explicitly use the `unwind` keyword.\n\n```rust,editable\n#[cfg(panic = \"unwind\")]\nfn ah() {\n    println!(\"Spit it out!!!!\");\n}\n\n#[cfg(not(panic = \"unwind\"))]\nfn ah() {\n    println!(\"This is not your party. Run!!!!\");\n}\n\nfn drink(beverage: &str) {\n    if beverage == \"lemonade\" {\n        ah();\n    } else {\n        println!(\"Some refreshing {} is all I need.\", beverage);\n    }\n}\n\nfn main() {\n    drink(\"water\");\n    drink(\"lemonade\");\n}\n```\n\nThe panic strategy can be set from the command line by using `abort` or `unwind`.\n\n```console\nrustc  lemonade.rs -C panic=abort\n```\n"
  },
  {
    "path": "src/error/iter_result.md",
    "content": "# Iterating over `Result`s\n\nAn `Iter::map` operation might fail, for example:\n\n```rust,editable\nfn main() {\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n    let numbers: Vec<_> = strings\n        .into_iter()\n        .map(|s| s.parse::<i32>())\n        .collect();\n    println!(\"Results: {:?}\", numbers);\n}\n```\n\nLet's step through strategies for handling this.\n\n## Ignore the failed items with `filter_map()`\n\n`filter_map` calls a function and filters out the results that are `None`.\n\n```rust,editable\nfn main() {\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n    let numbers: Vec<_> = strings\n        .into_iter()\n        .filter_map(|s| s.parse::<i32>().ok())\n        .collect();\n    println!(\"Results: {:?}\", numbers);\n}\n```\n\n## Collect the failed items with `map_err()` and `filter_map()`\n\n`map_err` calls a function with the error, so by adding that to the previous\n`filter_map` solution we can save them off to the side while iterating.\n\n```rust,editable\nfn main() {\n    let strings = vec![\"42\", \"tofu\", \"93\", \"999\", \"18\"];\n    let mut errors = vec![];\n    let numbers: Vec<_> = strings\n        .into_iter()\n        .map(|s| s.parse::<u8>())\n        .filter_map(|r| r.map_err(|e| errors.push(e)).ok())\n        .collect();\n    println!(\"Numbers: {:?}\", numbers);\n    println!(\"Errors: {:?}\", errors);\n}\n```\n\n## Fail the entire operation with `collect()`\n\n`Result` implements `FromIterator` so that a vector of results (`Vec<Result<T, E>>`)\ncan be turned into a result with a vector (`Result<Vec<T>, E>`). Once an\n`Result::Err` is found, the iteration will terminate.\n\n```rust,editable\nfn main() {\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n    let numbers: Result<Vec<_>, _> = strings\n        .into_iter()\n        .map(|s| s.parse::<i32>())\n        .collect();\n    println!(\"Results: {:?}\", numbers);\n}\n```\n\nThis same technique can be used with `Option`.\n\n## Collect all valid values and failures with `partition()`\n\n```rust,editable\nfn main() {\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n    let (numbers, errors): (Vec<_>, Vec<_>) = strings\n        .into_iter()\n        .map(|s| s.parse::<i32>())\n        .partition(Result::is_ok);\n    println!(\"Numbers: {:?}\", numbers);\n    println!(\"Errors: {:?}\", errors);\n}\n```\n\nWhen you look at the results, you'll note that everything is still wrapped in\n`Result`.  A little more boilerplate is needed for this.\n\n```rust,editable\nfn main() {\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n    let (numbers, errors): (Vec<_>, Vec<_>) = strings\n        .into_iter()\n        .map(|s| s.parse::<i32>())\n        .partition(Result::is_ok);\n    let numbers: Vec<_> = numbers.into_iter().map(Result::unwrap).collect();\n    let errors: Vec<_> = errors.into_iter().map(Result::unwrap_err).collect();\n    println!(\"Numbers: {:?}\", numbers);\n    println!(\"Errors: {:?}\", errors);\n}\n```\n"
  },
  {
    "path": "src/error/multiple_error_types/boxing_errors.md",
    "content": "# `Box`ing errors\n\nA way to write simple code while preserving the original errors is to [`Box`][box]\nthem.  The drawback is that the underlying error type is only known at runtime and not\n[statically determined][dynamic_dispatch].\n\nThe stdlib helps in boxing our errors by having `Box` implement conversion from\nany type that implements the `Error` trait into the trait object `Box<Error>`,\nvia [`From`][from].\n\n```rust,editable\nuse std::error;\nuse std::fmt;\n\n// Change the alias to use `Box<dyn error::Error>`.\ntype Result<T> = std::result::Result<T, Box<dyn error::Error>>;\n\n#[derive(Debug, Clone)]\nstruct EmptyVec;\n\nimpl fmt::Display for EmptyVec {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        write!(f, \"invalid first item to double\")\n    }\n}\n\nimpl error::Error for EmptyVec {}\n\nfn double_first(vec: Vec<&str>) -> Result<i32> {\n    vec.first()\n        .ok_or_else(|| EmptyVec.into()) // Converts to Box using Into trait.\n        .and_then(|s| {\n            s.parse::<i32>()\n                .map_err(From::from) // Converts to Box using From::from fn pointer.\n                .map(|i| 2 * i)\n        })\n}\n\nfn print(result: Result<i32>) {\n    match result {\n        Ok(n) => println!(\"The first doubled is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    print(double_first(numbers));\n    print(double_first(empty));\n    print(double_first(strings));\n}\n```\n\n### See also:\n\n[Dynamic dispatch][dynamic_dispatch] and [`Error` trait][error]\n\n[box]: https://doc.rust-lang.org/std/boxed/struct.Box.html\n[dynamic_dispatch]: https://doc.rust-lang.org/book/ch17-02-trait-objects.html#trait-objects-perform-dynamic-dispatch\n[error]: https://doc.rust-lang.org/std/error/trait.Error.html\n[from]: https://doc.rust-lang.org/std/convert/trait.From.html\n"
  },
  {
    "path": "src/error/multiple_error_types/define_error_type.md",
    "content": "# Defining an error type\n\nSometimes it simplifies the code to mask all of the different errors with a\nsingle type of error.  We'll show this with a custom error.\n\nRust allows us to define our own error types. In general, a \"good\" error type:\n\n* Represents different errors with the same type\n* Presents nice error messages to the user\n* Is easy to compare with other types\n  * Good: `Err(EmptyVec)`\n  * Bad: `Err(\"Please use a vector with at least one element\".to_owned())`\n* Can hold information about the error\n  * Good: `Err(BadChar(c, position))`\n  * Bad: `Err(\"+ cannot be used here\".to_owned())`\n* Composes well with other errors\n\n```rust,editable\nuse std::fmt;\n\ntype Result<T> = std::result::Result<T, DoubleError>;\n\n// Define our error types. These may be customized for our error handling cases.\n// Now we will be able to write our own errors, defer to an underlying error\n// implementation, or do something in between.\n#[derive(Debug, Clone)]\nstruct DoubleError;\n\n// Generation of an error is completely separate from how it is displayed.\n// There's no need to be concerned about cluttering complex logic with the display style.\n//\n// Note that we don't store any extra info about the errors. This means we can't state\n// which string failed to parse without modifying our types to carry that information.\nimpl fmt::Display for DoubleError {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        write!(f, \"invalid first item to double\")\n    }\n}\n\nfn double_first(vec: Vec<&str>) -> Result<i32> {\n    vec.first()\n        // Change the error to our new type.\n        .ok_or(DoubleError)\n        .and_then(|s| {\n            s.parse::<i32>()\n                // Update to the new error type here also.\n                .map_err(|_| DoubleError)\n                .map(|i| 2 * i)\n        })\n}\n\nfn print(result: Result<i32>) {\n    match result {\n        Ok(n) => println!(\"The first doubled is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    print(double_first(numbers));\n    print(double_first(empty));\n    print(double_first(strings));\n}\n```\n"
  },
  {
    "path": "src/error/multiple_error_types/option_result.md",
    "content": "# Pulling `Result`s out of `Option`s\n\nThe most basic way of handling mixed error types is to just embed them in each\nother.\n\n```rust,editable\nuse std::num::ParseIntError;\n\nfn double_first(vec: Vec<&str>) -> Option<Result<i32, ParseIntError>> {\n    vec.first().map(|first| {\n        first.parse::<i32>().map(|n| 2 * n)\n    })\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    println!(\"The first doubled is {:?}\", double_first(numbers));\n\n    println!(\"The first doubled is {:?}\", double_first(empty));\n    // Error 1: the input vector is empty\n\n    println!(\"The first doubled is {:?}\", double_first(strings));\n    // Error 2: the element doesn't parse to a number\n}\n```\n\nThere are times when we'll want to stop processing on errors (like with\n[`?`][enter_question_mark]) but keep going when the `Option` is `None`. The `transpose` function comes in handy to swap the `Result` and `Option`.\n\n```rust,editable\nuse std::num::ParseIntError;\n\nfn double_first(vec: Vec<&str>) -> Result<Option<i32>, ParseIntError> {\n    let opt = vec.first().map(|first| {\n        first.parse::<i32>().map(|n| 2 * n)\n    });\n\n    opt.transpose()\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    println!(\"The first doubled is {:?}\", double_first(numbers));\n    println!(\"The first doubled is {:?}\", double_first(empty));\n    println!(\"The first doubled is {:?}\", double_first(strings));\n}\n```\n\n[enter_question_mark]: ../result/enter_question_mark.md\n"
  },
  {
    "path": "src/error/multiple_error_types/reenter_question_mark.md",
    "content": "# Other uses of `?`\n\nNotice in the previous example that our immediate reaction to calling\n`parse` is to `map` the error from a library error into a boxed\nerror:\n\n```rust,ignore\n.and_then(|s| s.parse::<i32>())\n    .map_err(|e| e.into())\n```\n\nSince this is a simple and common operation, it would be convenient if it\ncould be elided. Alas, because `and_then` is not sufficiently flexible, it\ncannot. However, we can instead use `?`.\n\n`?` was previously explained as either `unwrap` or `return Err(err)`.\nThis is only mostly true. It actually means `unwrap` or\n`return Err(From::from(err))`. Since `From::from` is a conversion utility\nbetween different types, this means that if you `?` where the error is\nconvertible to the return type, it will convert automatically.\n\nHere, we rewrite the previous example using `?`. As a result, the\n`map_err` will go away when `From::from` is implemented for our error type:\n\n```rust,editable\nuse std::error;\nuse std::fmt;\n\n// Change the alias to use `Box<dyn error::Error>`.\ntype Result<T> = std::result::Result<T, Box<dyn error::Error>>;\n\n#[derive(Debug)]\nstruct EmptyVec;\n\nimpl fmt::Display for EmptyVec {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        write!(f, \"invalid first item to double\")\n    }\n}\n\nimpl error::Error for EmptyVec {}\n\n// The same structure as before but rather than chain all `Results`\n// and `Options` along, we `?` to get the inner value out immediately.\nfn double_first(vec: Vec<&str>) -> Result<i32> {\n    let first = vec.first().ok_or(EmptyVec)?;\n    let parsed = first.parse::<i32>()?;\n    Ok(2 * parsed)\n}\n\nfn print(result: Result<i32>) {\n    match result {\n        Ok(n)  => println!(\"The first doubled is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    print(double_first(numbers));\n    print(double_first(empty));\n    print(double_first(strings));\n}\n```\n\nThis is actually fairly clean now. Compared with the original `panic`, it\nis very similar to replacing the `unwrap` calls with `?` except that the\nreturn types are `Result`. As a result, they must be destructured at the\ntop level.\n\n### See also:\n\n[`From::from`][from] and [`?`][q_mark]\n\n[from]: https://doc.rust-lang.org/std/convert/trait.From.html\n[q_mark]: https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-question-mark-operator\n"
  },
  {
    "path": "src/error/multiple_error_types/wrap_error.md",
    "content": "# Wrapping errors\n\nAn alternative to boxing errors is to wrap them in your own error type.\n\n```rust,editable\nuse std::error;\nuse std::error::Error;\nuse std::num::ParseIntError;\nuse std::fmt;\n\ntype Result<T> = std::result::Result<T, DoubleError>;\n\n#[derive(Debug)]\nenum DoubleError {\n    EmptyVec,\n    // We will defer to the parse error implementation for their error.\n    // Supplying extra info requires adding more data to the type.\n    Parse(ParseIntError),\n}\n\nimpl fmt::Display for DoubleError {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        match *self {\n            DoubleError::EmptyVec =>\n                write!(f, \"please use a vector with at least one element\"),\n            // The wrapped error contains additional information and is available\n            // via the source() method.\n            DoubleError::Parse(..) =>\n                write!(f, \"the provided string could not be parsed as int\"),\n        }\n    }\n}\n\nimpl error::Error for DoubleError {\n    fn source(&self) -> Option<&(dyn error::Error + 'static)> {\n        match *self {\n            DoubleError::EmptyVec => None,\n            // The cause is the underlying implementation error type. Is implicitly\n            // cast to the trait object `&error::Error`. This works because the\n            // underlying type already implements the `Error` trait.\n            DoubleError::Parse(ref e) => Some(e),\n        }\n    }\n}\n\n// Implement the conversion from `ParseIntError` to `DoubleError`.\n// This will be automatically called by `?` if a `ParseIntError`\n// needs to be converted into a `DoubleError`.\nimpl From<ParseIntError> for DoubleError {\n    fn from(err: ParseIntError) -> DoubleError {\n        DoubleError::Parse(err)\n    }\n}\n\nfn double_first(vec: Vec<&str>) -> Result<i32> {\n    let first = vec.first().ok_or(DoubleError::EmptyVec)?;\n    // Here we implicitly use the `ParseIntError` implementation of `From` (which\n    // we defined above) in order to create a `DoubleError`.\n    let parsed = first.parse::<i32>()?;\n\n    Ok(2 * parsed)\n}\n\nfn print(result: Result<i32>) {\n    match result {\n        Ok(n)  => println!(\"The first doubled is {}\", n),\n        Err(e) => {\n            println!(\"Error: {}\", e);\n            if let Some(source) = e.source() {\n                println!(\"  Caused by: {}\", source);\n            }\n        },\n    }\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    print(double_first(numbers));\n    print(double_first(empty));\n    print(double_first(strings));\n}\n```\n\nThis adds a bit more boilerplate for handling errors and might not be needed in\nall applications. There are some libraries that can take care of the boilerplate\nfor you.\n\n### See also:\n\n[`From::from`][from] and [`Enums`][enums]\n\n[`Crates for handling errors`][crates-errors]\n\n[from]: https://doc.rust-lang.org/std/convert/trait.From.html\n[enums]: ../../custom_types/enum.md\n[crates-errors]: https://crates.io/keywords/error-handling\n"
  },
  {
    "path": "src/error/multiple_error_types.md",
    "content": "# Multiple error types\n\nThe previous examples have always been very convenient; `Result`s interact\nwith other `Result`s and `Option`s interact with other `Option`s.\n\nSometimes an `Option` needs to interact with a `Result`, or a\n`Result<T, Error1>` needs to interact with a `Result<T, Error2>`. In those\ncases, we want to manage our different error types in a way that makes them\ncomposable and easy to interact with.\n\nIn the following code, two instances of `unwrap` generate different error\ntypes. `Vec::first` returns an `Option`, while `parse::<i32>` returns a\n`Result<i32, ParseIntError>`:\n\n```rust,editable,ignore,mdbook-runnable\nfn double_first(vec: Vec<&str>) -> i32 {\n    let first = vec.first().unwrap(); // Generate error 1\n    2 * first.parse::<i32>().unwrap() // Generate error 2\n}\n\nfn main() {\n    let numbers = vec![\"42\", \"93\", \"18\"];\n    let empty = vec![];\n    let strings = vec![\"tofu\", \"93\", \"18\"];\n\n    println!(\"The first doubled is {}\", double_first(numbers));\n\n    println!(\"The first doubled is {}\", double_first(empty));\n    // Error 1: the input vector is empty\n\n    println!(\"The first doubled is {}\", double_first(strings));\n    // Error 2: the element doesn't parse to a number\n}\n```\n\nOver the next sections, we'll see several strategies for handling these kind of problems.\n"
  },
  {
    "path": "src/error/option_unwrap/and_then.md",
    "content": "# Combinators: `and_then`\n\n`map()` was described as a chainable way to simplify `match` statements.\nHowever, using `map()` on a function that returns an `Option<T>` results\nin the nested `Option<Option<T>>`. Chaining multiple calls together can\nthen become confusing. That's where another combinator called `and_then()`,\nknown in some languages as flatmap, comes in.\n\n`and_then()` calls its function input with the wrapped value and returns the result. If the `Option` is `None`, then it returns `None` instead.\n\nIn the following example, `cookable_v3()` results in an `Option<Food>`.\nUsing `map()` instead of `and_then()` would have given an\n`Option<Option<Food>>`, which is an invalid type for `eat()`.\n\n```rust,editable\n#![allow(dead_code)]\n\n#[derive(Debug)] enum Food { CordonBleu, Steak, Sushi }\n#[derive(Debug)] enum Day { Monday, Tuesday, Wednesday }\n\n// We don't have the ingredients to make Sushi.\nfn have_ingredients(food: Food) -> Option<Food> {\n    match food {\n        Food::Sushi => None,\n        _           => Some(food),\n    }\n}\n\n// We have the recipe for everything except Cordon Bleu.\nfn have_recipe(food: Food) -> Option<Food> {\n    match food {\n        Food::CordonBleu => None,\n        _                => Some(food),\n    }\n}\n\n// To make a dish, we need both the recipe and the ingredients.\n// We can represent the logic with a chain of `match`es:\nfn cookable_v1(food: Food) -> Option<Food> {\n    match have_recipe(food) {\n        None       => None,\n        Some(food) => have_ingredients(food),\n    }\n}\n\n// This can conveniently be rewritten more compactly with `and_then()`:\nfn cookable_v3(food: Food) -> Option<Food> {\n    have_recipe(food).and_then(have_ingredients)\n}\n\n// Otherwise we'd need to `flatten()` an `Option<Option<Food>>`\n// to get an `Option<Food>`:\nfn cookable_v2(food: Food) -> Option<Food> {\n    have_recipe(food).map(have_ingredients).flatten()\n}\n\nfn eat(food: Food, day: Day) {\n    match cookable_v3(food) {\n        Some(food) => println!(\"Yay! On {:?} we get to eat {:?}.\", day, food),\n        None       => println!(\"Oh no. We don't get to eat on {:?}?\", day),\n    }\n}\n\nfn main() {\n    let (cordon_bleu, steak, sushi) = (Food::CordonBleu, Food::Steak, Food::Sushi);\n\n    eat(cordon_bleu, Day::Monday);\n    eat(steak, Day::Tuesday);\n    eat(sushi, Day::Wednesday);\n}\n```\n\n### See also:\n\n[closures][closures], [`Option`][option], [`Option::and_then()`][and_then], and [`Option::flatten()`][flatten]\n\n[closures]: ../../fn/closures.md\n[option]: https://doc.rust-lang.org/std/option/enum.Option.html\n[and_then]: https://doc.rust-lang.org/std/option/enum.Option.html#method.and_then\n[flatten]: https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten\n"
  },
  {
    "path": "src/error/option_unwrap/defaults.md",
    "content": "# Unpacking options and defaults\n\nThere is more than one way to unpack an `Option` and fall back on a default if it is `None`. To choose the one that meets our needs, we need to consider the following:\n\n* do we need eager or lazy evaluation?\n* do we need to keep the original empty value intact, or modify it in place?\n\n## `or()` is chainable, evaluates eagerly, keeps empty value intact\n\n`or()`is chainable and eagerly evaluates its argument, as is shown in the following example. Note that because `or`'s arguments are evaluated eagerly, the variable passed to `or` is moved.\n\n```rust,editable\n#[derive(Debug)]\nenum Fruit { Apple, Orange, Banana, Kiwi, Lemon }\n\nfn main() {\n    let apple = Some(Fruit::Apple);\n    let orange = Some(Fruit::Orange);\n    let no_fruit: Option<Fruit> = None;\n\n    let first_available_fruit = no_fruit.or(orange).or(apple);\n    println!(\"first_available_fruit: {:?}\", first_available_fruit);\n    // first_available_fruit: Some(Orange)\n\n    // `or` moves its argument.\n    // In the example above, `or(orange)` returned a `Some`, so `or(apple)` was not invoked.\n    // But the variable named `apple` has been moved regardless, and cannot be used anymore.\n    // println!(\"Variable apple was moved, so this line won't compile: {:?}\", apple);\n    // TODO: uncomment the line above to see the compiler error\n}\n```\n\n## `or_else()` is chainable, evaluates lazily, keeps empty value intact\n\nAnother alternative is to use `or_else`, which is also chainable, and evaluates lazily, as is shown in the following example:\n\n```rust,editable\n#[derive(Debug)]\nenum Fruit { Apple, Orange, Banana, Kiwi, Lemon }\n\nfn main() {\n    let no_fruit: Option<Fruit> = None;\n    let get_kiwi_as_fallback = || {\n        println!(\"Providing kiwi as fallback\");\n        Some(Fruit::Kiwi)\n    };\n    let get_lemon_as_fallback = || {\n        println!(\"Providing lemon as fallback\");\n        Some(Fruit::Lemon)\n    };\n\n    let first_available_fruit = no_fruit\n        .or_else(get_kiwi_as_fallback)\n        .or_else(get_lemon_as_fallback);\n    println!(\"first_available_fruit: {:?}\", first_available_fruit);\n    // Providing kiwi as fallback\n    // first_available_fruit: Some(Kiwi)\n}\n```\n\n## `get_or_insert()` evaluates eagerly, modifies empty value in place\n\nTo make sure that an `Option` contains a value, we can use `get_or_insert` to modify it in place with a fallback value, as is shown in the following example. Note that `get_or_insert` eagerly evaluates its parameter, so variable `apple` is moved:\n\n```rust,editable\n#[derive(Debug)]\nenum Fruit { Apple, Orange, Banana, Kiwi, Lemon }\n\nfn main() {\n    let mut my_fruit: Option<Fruit> = None;\n    let apple = Fruit::Apple;\n    let first_available_fruit = my_fruit.get_or_insert(apple);\n    println!(\"first_available_fruit is: {:?}\", first_available_fruit);\n    println!(\"my_fruit is: {:?}\", my_fruit);\n    // first_available_fruit is: Apple\n    // my_fruit is: Some(Apple)\n    //println!(\"Variable named `apple` is moved: {:?}\", apple);\n    // TODO: uncomment the line above to see the compiler error\n}\n```\n\n## `get_or_insert_with()` evaluates lazily, modifies empty value in place\n\nInstead of explicitly providing a value to fall back on, we can pass a closure to `get_or_insert_with`, as follows:\n\n```rust,editable\n#[derive(Debug)]\nenum Fruit { Apple, Orange, Banana, Kiwi, Lemon }\n\nfn main() {\n    let mut my_fruit: Option<Fruit> = None;\n    let get_lemon_as_fallback = || {\n        println!(\"Providing lemon as fallback\");\n        Fruit::Lemon\n    };\n    let first_available_fruit = my_fruit\n        .get_or_insert_with(get_lemon_as_fallback);\n    println!(\"first_available_fruit is: {:?}\", first_available_fruit);\n    println!(\"my_fruit is: {:?}\", my_fruit);\n    // Providing lemon as fallback\n    // first_available_fruit is: Lemon\n    // my_fruit is: Some(Lemon)\n\n    // If the Option has a value, it is left unchanged, and the closure is not invoked\n    let mut my_apple = Some(Fruit::Apple);\n    let should_be_apple = my_apple.get_or_insert_with(get_lemon_as_fallback);\n    println!(\"should_be_apple is: {:?}\", should_be_apple);\n    println!(\"my_apple is unchanged: {:?}\", my_apple);\n    // The output is a follows. Note that the closure `get_lemon_as_fallback` is not invoked\n    // should_be_apple is: Apple\n    // my_apple is unchanged: Some(Apple)\n}\n```\n\n### See also:\n\n[`closures`][closures], [`get_or_insert`][get_or_insert], [`get_or_insert_with`][get_or_insert_with], [`moved variables`][moved], [`or`][or], [`or_else`][or_else]\n\n[closures]: https://doc.rust-lang.org/book/ch13-01-closures.html\n[get_or_insert]: https://doc.rust-lang.org/core/option/enum.Option.html#method.get_or_insert\n[get_or_insert_with]: https://doc.rust-lang.org/core/option/enum.Option.html#method.get_or_insert_with\n[moved]: https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html\n[or]: https://doc.rust-lang.org/core/option/enum.Option.html#method.or\n[or_else]: https://doc.rust-lang.org/core/option/enum.Option.html#method.or_else\n"
  },
  {
    "path": "src/error/option_unwrap/map.md",
    "content": "# Combinators: `map`\n\n`match` is a valid method for handling `Option`s. However, you may\neventually find heavy usage tedious, especially with operations only valid\nwith an input. In these cases, [combinators][combinators] can be used to\nmanage control flow in a modular fashion.\n\n`Option` has a built in method called `map()`, a combinator for the simple\nmapping of `Some -> Some` and `None -> None`. Multiple `map()` calls can be\nchained together for even more flexibility.\n\nIn the following example, `process()` replaces all functions previous\nto it while staying compact.\n\n```rust,editable\n#![allow(dead_code)]\n\n#[derive(Debug)] enum Food { Apple, Carrot, Potato }\n\n#[derive(Debug)] struct Peeled(Food);\n#[derive(Debug)] struct Chopped(Food);\n#[derive(Debug)] struct Cooked(Food);\n\n// Peeling food. If there isn't any, then return `None`.\n// Otherwise, return the peeled food.\nfn peel(food: Option<Food>) -> Option<Peeled> {\n    match food {\n        Some(food) => Some(Peeled(food)),\n        None       => None,\n    }\n}\n\n// Chopping food. If there isn't any, then return `None`.\n// Otherwise, return the chopped food.\nfn chop(peeled: Option<Peeled>) -> Option<Chopped> {\n    match peeled {\n        Some(Peeled(food)) => Some(Chopped(food)),\n        None               => None,\n    }\n}\n\n// Cooking food. Here, we showcase `map()` instead of `match` for case handling.\nfn cook(chopped: Option<Chopped>) -> Option<Cooked> {\n    chopped.map(|Chopped(food)| Cooked(food))\n}\n\n// A function to peel, chop, and cook food all in sequence.\n// We chain multiple uses of `map()` to simplify the code.\nfn process(food: Option<Food>) -> Option<Cooked> {\n    food.map(|f| Peeled(f))\n        .map(|Peeled(f)| Chopped(f))\n        .map(|Chopped(f)| Cooked(f))\n}\n\n// Check whether there's food or not before trying to eat it!\nfn eat(food: Option<Cooked>) {\n    match food {\n        Some(food) => println!(\"Mmm. I love {:?}\", food),\n        None       => println!(\"Oh no! It wasn't edible.\"),\n    }\n}\n\nfn main() {\n    let apple = Some(Food::Apple);\n    let carrot = Some(Food::Carrot);\n    let potato = None;\n\n    let cooked_apple = cook(chop(peel(apple)));\n    let cooked_carrot = cook(chop(peel(carrot)));\n    // Let's try the simpler looking `process()` now.\n    let cooked_potato = process(potato);\n\n    eat(cooked_apple);\n    eat(cooked_carrot);\n    eat(cooked_potato);\n}\n```\n\n### See also:\n\n[closures][closures], [`Option`][option], [`Option::map()`][map]\n\n[combinators]: https://doc.rust-lang.org/reference/glossary.html#combinator\n[closures]: ../../fn/closures.md\n[option]: https://doc.rust-lang.org/std/option/enum.Option.html\n[map]: https://doc.rust-lang.org/std/option/enum.Option.html#method.map\n"
  },
  {
    "path": "src/error/option_unwrap/question_mark.md",
    "content": "# Unpacking options with `?`\n\nYou can unpack `Option`s by using `match` statements, but it's often easier to\nuse the `?` operator. If `x` is an `Option`, then evaluating `x?` will return\nthe underlying value if `x` is `Some`, otherwise it will terminate whatever\nfunction is being executed and return `None`.\n\n```rust,ignore\nfn next_birthday(current_age: Option<u8>) -> Option<String> {\n    // If `current_age` is `None`, this returns `None`.\n    // If `current_age` is `Some`, the inner `u8` value + 1\n    // gets assigned to `next_age`\n    let next_age: u8 = current_age? + 1;\n    Some(format!(\"Next year I will be {}\", next_age))\n}\n```\n\nYou can chain many `?`s together to make your code much more readable.\n\n```rust,editable\nstruct Person {\n    job: Option<Job>,\n}\n\n#[derive(Clone, Copy)]\nstruct Job {\n    phone_number: Option<PhoneNumber>,\n}\n\n#[derive(Clone, Copy)]\n#[allow(dead_code)]\nstruct PhoneNumber {\n    area_code: Option<u8>,\n    number: u32,\n}\n\nimpl Person {\n\n    // Gets the area code of the phone number of the person's job, if it exists.\n    fn work_phone_area_code(&self) -> Option<u8> {\n        // This would need many nested `match` statements without the `?` operator.\n        // It would take a lot more code - try writing it yourself and see which\n        // is easier.\n        self.job?.phone_number?.area_code\n    }\n}\n\nfn main() {\n    let p = Person {\n        job: Some(Job {\n            phone_number: Some(PhoneNumber {\n                area_code: Some(61),\n                number: 439222222,\n            }),\n        }),\n    };\n\n    assert_eq!(p.work_phone_area_code(), Some(61));\n}\n```\n"
  },
  {
    "path": "src/error/option_unwrap.md",
    "content": "# `Option` & `unwrap`\n\nIn the last example, we showed that we can induce program failure at will.\nWe told our program to `panic` if we drink a sugary lemonade.\nBut what if we expect _some_ drink but don't receive one?\nThat case would be just as bad, so it needs to be handled!\n\nWe _could_ test this against the null string (`\"\"`) as we do with a lemonade.\nSince we're using Rust, let's instead have the compiler point out cases\nwhere there's no drink.\n\nAn `enum` called `Option<T>` in the `std` library is used when absence is a\npossibility. It manifests itself as one of two \"options\":\n\n* `Some(T)`: An element of type `T` was found\n* `None`: No element was found\n\nThese cases can either be explicitly handled via `match` or implicitly with\n`unwrap`. Implicit handling will either return the inner element or `panic`.\n\nNote that it's possible to manually customize `panic` with [expect][expect],\nbut `unwrap` otherwise leaves us with a less meaningful output than explicit\nhandling. In the following example, explicit handling yields a more\ncontrolled result while retaining the option to `panic` if desired.\n\n```rust,editable,ignore,mdbook-runnable\n// The adult has seen it all, and can handle any drink well.\n// All drinks are handled explicitly using `match`.\nfn give_adult(drink: Option<&str>) {\n    // Specify a course of action for each case.\n    match drink {\n        Some(\"lemonade\") => println!(\"Yuck! Too sugary.\"),\n        Some(inner)   => println!(\"{}? How nice.\", inner),\n        None          => println!(\"No drink? Oh well.\"),\n    }\n}\n\n// Others will `panic` before drinking sugary drinks.\n// All drinks are handled implicitly using `unwrap`.\nfn drink(drink: Option<&str>) {\n    // `unwrap` returns a `panic` when it receives a `None`.\n    let inside = drink.unwrap();\n    if inside == \"lemonade\" { panic!(\"AAAaaaaa!!!!\"); }\n\n    println!(\"I love {}s!!!!!\", inside);\n}\n\nfn main() {\n    let water  = Some(\"water\");\n    let lemonade = Some(\"lemonade\");\n    let void  = None;\n\n    give_adult(water);\n    give_adult(lemonade);\n    give_adult(void);\n\n    let coffee = Some(\"coffee\");\n    let nothing = None;\n\n    drink(coffee);\n    drink(nothing);\n}\n```\n\n[expect]: https://doc.rust-lang.org/std/option/enum.Option.html#method.expect\n"
  },
  {
    "path": "src/error/panic.md",
    "content": "# `panic`\n\nThe simplest error handling mechanism we will see is `panic`. It prints an\nerror message, starts unwinding the stack, and usually exits the program.\nHere, we explicitly call `panic` on our error condition:\n\n```rust,editable,ignore,mdbook-runnable\nfn drink(beverage: &str) {\n    // You shouldn't drink too many sugary beverages.\n    if beverage == \"lemonade\" { panic!(\"AAAaaaaa!!!!\"); }\n\n    println!(\"Some refreshing {} is all I need.\", beverage);\n}\n\nfn main() {\n    drink(\"water\");\n    drink(\"lemonade\");\n    drink(\"still water\");\n}\n```\n\nThe first call to `drink` works. The second panics and thus the third is never called.\n"
  },
  {
    "path": "src/error/result/early_returns.md",
    "content": "# Early returns\n\nIn the previous example, we explicitly handled the errors using combinators.\nAnother way to deal with this case analysis is to use a combination of\n`match` statements and *early returns*.\n\nThat is, we can simply stop executing the function and return the error if\none occurs. For some, this form of code can be easier to both read and\nwrite. Consider this version of the previous example, rewritten using early returns:\n\n```rust,editable\nuse std::num::ParseIntError;\n\nfn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {\n    let first_number = match first_number_str.parse::<i32>() {\n        Ok(first_number)  => first_number,\n        Err(e) => return Err(e),\n    };\n\n    let second_number = match second_number_str.parse::<i32>() {\n        Ok(second_number)  => second_number,\n        Err(e) => return Err(e),\n    };\n\n    Ok(first_number * second_number)\n}\n\nfn print(result: Result<i32, ParseIntError>) {\n    match result {\n        Ok(n)  => println!(\"n is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    print(multiply(\"10\", \"2\"));\n    print(multiply(\"t\", \"2\"));\n}\n```\n\nAt this point, we've learned to explicitly handle errors using combinators\nand early returns. While we generally want to avoid panicking, explicitly\nhandling all of our errors is cumbersome.\n\nIn the next section, we'll introduce `?` for the cases where we simply\nneed to `unwrap` without possibly inducing `panic`.\n"
  },
  {
    "path": "src/error/result/enter_question_mark.md",
    "content": "# Introducing `?`\n\nSometimes we just want the simplicity of `unwrap` without the possibility of\na `panic`. Until now, `unwrap` has forced us to nest deeper and deeper when\nwhat we really wanted was to get the variable *out*. This is exactly the purpose of `?`.\n\nUpon finding an `Err`, there are two valid actions to take:\n\n1. `panic!` which we already decided to try to avoid if possible\n2. `return` because an `Err` means it cannot be handled\n\n`?` is *almost*[^†] exactly equivalent to an `unwrap` which `return`s\ninstead of `panic`king on `Err`s. Let's see how we can simplify the earlier\nexample that used combinators:\n\n```rust,editable\nuse std::num::ParseIntError;\n\nfn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {\n    let first_number = first_number_str.parse::<i32>()?;\n    let second_number = second_number_str.parse::<i32>()?;\n\n    Ok(first_number * second_number)\n}\n\nfn print(result: Result<i32, ParseIntError>) {\n    match result {\n        Ok(n)  => println!(\"n is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    print(multiply(\"10\", \"2\"));\n    print(multiply(\"t\", \"2\"));\n}\n```\n\n## The `try!` macro\n\nBefore there was `?`, the same functionality was achieved with the `try!` macro.\nThe `?` operator is now recommended, but you may still find `try!` when looking\nat older code. The same `multiply` function from the previous example\nwould look like this using `try!`:\n\n```rust,editable,edition2015\n// To compile and run this example without errors, while using Cargo, change the value\n// of the `edition` field, in the `[package]` section of the `Cargo.toml` file, to \"2015\".\n\nuse std::num::ParseIntError;\n\nfn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {\n    let first_number = try!(first_number_str.parse::<i32>());\n    let second_number = try!(second_number_str.parse::<i32>());\n\n    Ok(first_number * second_number)\n}\n\nfn print(result: Result<i32, ParseIntError>) {\n    match result {\n        Ok(n)  => println!(\"n is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    print(multiply(\"10\", \"2\"));\n    print(multiply(\"t\", \"2\"));\n}\n```\n\n[^†]: See [re-enter ?][re_enter_?] for more details.\n\n[re_enter_?]: ../multiple_error_types/reenter_question_mark.md\n"
  },
  {
    "path": "src/error/result/result_alias.md",
    "content": "# aliases for `Result`\n\nHow about when we want to reuse a specific `Result` type many times?\nRecall that Rust allows us to create [aliases][typealias]. Conveniently,\nwe can define one for the specific `Result` in question.\n\nAt a module level, creating aliases can be particularly helpful. Errors\nfound in a specific module often have the same `Err` type, so a single alias\ncan succinctly define *all* associated `Results`. This is so useful that the\n`std` library even supplies one: [`io::Result`][io_result]!\n\nHere's a quick example to show off the syntax:\n\n```rust,editable\nuse std::num::ParseIntError;\n\n// Define a generic alias for a `Result` with the error type `ParseIntError`.\ntype AliasedResult<T> = Result<T, ParseIntError>;\n\n// Use the above alias to refer to our specific `Result` type.\nfn multiply(first_number_str: &str, second_number_str: &str) -> AliasedResult<i32> {\n    first_number_str.parse::<i32>().and_then(|first_number| {\n        second_number_str.parse::<i32>().map(|second_number| first_number * second_number)\n    })\n}\n\n// Here, the alias again allows us to save some space.\nfn print(result: AliasedResult<i32>) {\n    match result {\n        Ok(n)  => println!(\"n is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    print(multiply(\"10\", \"2\"));\n    print(multiply(\"t\", \"2\"));\n}\n```\n\n### See also:\n\n[`io::Result`][io_result]\n\n[typealias]: ../../types/alias.md\n[io_result]: https://doc.rust-lang.org/std/io/type.Result.html\n"
  },
  {
    "path": "src/error/result/result_map.md",
    "content": "# `map` for `Result`\n\nPanicking in the previous example's `multiply` does not make for robust code.\nGenerally, we want to return the error to the caller so it can decide what is\nthe right way to respond to errors.\n\nWe first need to know what kind of error type we are dealing with. To determine\nthe `Err` type, we look to [`parse()`][parse], which is implemented with the\n[`FromStr`][from_str] trait for [`i32`][i32]. As a result, the `Err` type is\nspecified as [`ParseIntError`][parse_int_error].\n\nIn the example below, the straightforward `match` statement leads to code\nthat is overall more cumbersome.\n\n```rust,editable\nuse std::num::ParseIntError;\n\n// With the return type rewritten, we use pattern matching without `unwrap()`.\nfn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {\n    match first_number_str.parse::<i32>() {\n        Ok(first_number)  => {\n            match second_number_str.parse::<i32>() {\n                Ok(second_number)  => {\n                    Ok(first_number * second_number)\n                },\n                Err(e) => Err(e),\n            }\n        },\n        Err(e) => Err(e),\n    }\n}\n\nfn print(result: Result<i32, ParseIntError>) {\n    match result {\n        Ok(n)  => println!(\"n is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    // This still presents a reasonable answer.\n    let twenty = multiply(\"10\", \"2\");\n    print(twenty);\n\n    // The following now provides a much more helpful error message.\n    let tt = multiply(\"t\", \"2\");\n    print(tt);\n}\n```\n\nLuckily, `Option`'s `map`, `and_then`, and many other combinators are also\nimplemented for `Result`. [`Result`][result] contains a complete listing.\n\n```rust,editable\nuse std::num::ParseIntError;\n\n// As with `Option`, we can use combinators such as `map()`.\n// This function is otherwise identical to the one above and reads:\n// Multiply if both values can be parsed from str, otherwise pass on the error.\nfn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {\n    first_number_str.parse::<i32>().and_then(|first_number| {\n        second_number_str.parse::<i32>().map(|second_number| first_number * second_number)\n    })\n}\n\nfn print(result: Result<i32, ParseIntError>) {\n    match result {\n        Ok(n)  => println!(\"n is {}\", n),\n        Err(e) => println!(\"Error: {}\", e),\n    }\n}\n\nfn main() {\n    // This still presents a reasonable answer.\n    let twenty = multiply(\"10\", \"2\");\n    print(twenty);\n\n    // The following now provides a much more helpful error message.\n    let tt = multiply(\"t\", \"2\");\n    print(tt);\n}\n```\n\n[parse]: https://doc.rust-lang.org/std/primitive.str.html#method.parse\n[from_str]: https://doc.rust-lang.org/std/str/trait.FromStr.html\n[i32]: https://doc.rust-lang.org/std/primitive.i32.html\n[parse_int_error]: https://doc.rust-lang.org/std/num/struct.ParseIntError.html\n[result]: https://doc.rust-lang.org/std/result/enum.Result.html\n"
  },
  {
    "path": "src/error/result.md",
    "content": "# `Result`\n\n[`Result`][result] is a richer version of the [`Option`][option] type that\ndescribes possible *error* instead of possible *absence*.\n\nThat is, `Result<T, E>` could have one of two outcomes:\n\n* `Ok(T)`: An element `T` was found\n* `Err(E)`: An error was found with element `E`\n\nBy convention, the expected outcome is `Ok` while the unexpected outcome is `Err`.\n\nLike `Option`, `Result` has many methods associated with it. `unwrap()`, for\nexample, either yields the element `T` or `panic`s. For case handling,\nthere are many combinators between `Result` and `Option` that overlap.\n\nIn working with Rust, you will likely encounter methods that return the\n`Result` type, such as the [`parse()`][parse] method. It might not always\nbe possible to parse a string into the other type, so `parse()` returns a\n`Result` indicating possible failure.\n\nLet's see what happens when we successfully and unsuccessfully `parse()` a string:\n\n```rust,editable,ignore,mdbook-runnable\nfn multiply(first_number_str: &str, second_number_str: &str) -> i32 {\n    // Let's try using `unwrap()` to get the number out. Will it bite us?\n    let first_number = first_number_str.parse::<i32>().unwrap();\n    let second_number = second_number_str.parse::<i32>().unwrap();\n    first_number * second_number\n}\n\nfn main() {\n    let twenty = multiply(\"10\", \"2\");\n    println!(\"double is {}\", twenty);\n\n    let tt = multiply(\"t\", \"2\");\n    println!(\"double is {}\", tt);\n}\n```\n\nIn the unsuccessful case, `parse()` leaves us with an error for `unwrap()`\nto `panic` on. Additionally, the `panic` exits our program and provides an\nunpleasant error message.\n\nTo improve the quality of our error message, we should be more specific\nabout the return type and consider explicitly handling the error.\n\n## Using `Result` in `main`\n\nThe `Result` type can also be the return type of the `main` function if\nspecified explicitly. Typically the `main` function will be of the form:\n\n```rust\nfn main() {\n    println!(\"Hello World!\");\n}\n```\n\nHowever `main` is also able to have a return type of `Result`. If an error\noccurs within the `main` function it will return an error code and print a debug\nrepresentation of the error (using the [`Debug`] trait). The following example\nshows such a scenario and touches on aspects covered in [the following section].\n\n```rust,editable\nuse std::num::ParseIntError;\n\nfn main() -> Result<(), ParseIntError> {\n    let number_str = \"10\";\n    let number = match number_str.parse::<i32>() {\n        Ok(number)  => number,\n        Err(e) => return Err(e),\n    };\n    println!(\"{}\", number);\n    Ok(())\n}\n```\n\n[option]: https://doc.rust-lang.org/std/option/enum.Option.html\n[result]: https://doc.rust-lang.org/std/result/enum.Result.html\n[parse]: https://doc.rust-lang.org/std/primitive.str.html#method.parse\n[`Debug`]: https://doc.rust-lang.org/std/fmt/trait.Debug.html\n[the following section]: result/early_returns.md\n"
  },
  {
    "path": "src/error.md",
    "content": "# Error handling\n\nError handling is the process of handling the possibility of failure. For\nexample, failing to read a file and then continuing to use that *bad* input\nwould clearly be problematic. Noticing and explicitly managing those errors\nsaves the rest of the program from various pitfalls.\n\nThere are various ways to deal with errors in Rust, which are described in the\nfollowing subchapters. They all have more or less subtle differences and different\nuse cases. As a rule of thumb:\n\nAn explicit `panic` is mainly useful for tests and dealing with unrecoverable errors.\nFor prototyping it can be useful, for example when dealing with functions that\nhaven't been implemented yet, but in those cases the more descriptive `unimplemented`\nis better. In tests `panic` is a reasonable way to explicitly fail.\n\nThe `Option` type is for when a value is optional or when the lack of a value is\nnot an error condition. For example the parent of a directory - `/` and `C:` don't\nhave one. When dealing with `Option`s, `unwrap` is fine for prototyping and cases\nwhere it's absolutely certain that there is guaranteed to be a value. However `expect`\nis more useful since it lets you specify an error message in case something goes\nwrong anyway.\n\nWhen there is a chance that things do go wrong and the caller has to deal with the\nproblem, use `Result`. You can `unwrap` and `expect` them as well (please don't\ndo that unless it's a test or quick prototype).\n\nFor a more rigorous discussion of error handling, refer to the error\nhandling section in the [official book][book].\n\n[book]: https://doc.rust-lang.org/book/ch09-00-error-handling.html\n"
  },
  {
    "path": "src/expression.md",
    "content": "# Expressions\n\nA Rust program is (mostly) made up of a series of statements:\n\n```rust,editable\nfn main() {\n    // statement\n    // statement\n    // statement\n}\n```\n\nThere are a few kinds of statements in Rust. The most common two are declaring\na variable binding, and using a `;` with an expression:\n\n```rust,editable\nfn main() {\n    // variable binding\n    let x = 5;\n\n    // expression;\n    x;\n    x + 1;\n    15;\n}\n```\n\nBlocks are expressions too, so they can be used as values in\nassignments. The last expression in the block will be assigned to the\nplace expression such as a local variable. However, if the last expression of the block ends with a\nsemicolon, the return value will be `()`.\n\n```rust,editable\nfn main() {\n    let x = 5u32;\n\n    let y = {\n        let x_squared = x * x;\n        let x_cube = x_squared * x;\n\n        // This expression will be assigned to `y`\n        x_cube + x_squared + x\n    };\n\n    let z = {\n        // The semicolon suppresses this expression and `()` is assigned to `z`\n        2 * x;\n    };\n\n    println!(\"x is {:?}\", x);\n    println!(\"y is {:?}\", y);\n    println!(\"z is {:?}\", z);\n}\n```\n"
  },
  {
    "path": "src/flow_control/for.md",
    "content": "# for loops\n\n## for and range\n\nThe `for in` construct can be used to iterate through an `Iterator`.\nOne of the easiest ways to create an iterator is to use the range\nnotation `a..b`. This yields values from `a` (inclusive) to `b`\n(exclusive) in steps of one.\n\nLet's write FizzBuzz using `for` instead of `while`.\n\n```rust,editable\nfn main() {\n    // `n` will take the values: 1, 2, ..., 100 in each iteration\n    for n in 1..101 {\n        if n % 15 == 0 {\n            println!(\"fizzbuzz\");\n        } else if n % 3 == 0 {\n            println!(\"fizz\");\n        } else if n % 5 == 0 {\n            println!(\"buzz\");\n        } else {\n            println!(\"{}\", n);\n        }\n    }\n}\n```\n\nAlternatively, `a..=b` can be used for a range that is inclusive on both ends.\nThe above can be written as:\n\n```rust,editable\nfn main() {\n    // `n` will take the values: 1, 2, ..., 100 in each iteration\n    for n in 1..=100 {\n        if n % 15 == 0 {\n            println!(\"fizzbuzz\");\n        } else if n % 3 == 0 {\n            println!(\"fizz\");\n        } else if n % 5 == 0 {\n            println!(\"buzz\");\n        } else {\n            println!(\"{}\", n);\n        }\n    }\n}\n```\n\n## for and iterators\n\nThe `for in` construct is able to interact with an `Iterator` in several ways.\nAs discussed in the section on the [Iterator][iter] trait, by default the `for`\nloop will apply the `into_iter` function to the collection. However, this is\nnot the only means of converting collections into iterators.\n\n`into_iter`, `iter` and `iter_mut` all handle the conversion of a collection\ninto an iterator in different ways, by providing different views on the data\nwithin.\n\n* `iter` - This borrows each element of the collection through each iteration.\n  Thus leaving the collection untouched and available for reuse after the loop.\n\n```rust,editable\nfn main() {\n    let names = vec![\"Bob\", \"Frank\", \"Ferris\"];\n\n    for name in names.iter() {\n        match name {\n            &\"Ferris\" => println!(\"There is a rustacean among us!\"),\n            // TODO ^ Try deleting the & and matching just \"Ferris\"\n            _ => println!(\"Hello {}\", name),\n        }\n    }\n\n    println!(\"names: {:?}\", names);\n}\n```\n\n* `into_iter` - This consumes the collection so that on each iteration the exact\n  data is provided. Once the collection has been consumed it is no longer\n  available for reuse as it has been 'moved' within the loop.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    let names = vec![\"Bob\", \"Frank\", \"Ferris\"];\n\n    for name in names.into_iter() {\n        match name {\n            \"Ferris\" => println!(\"There is a rustacean among us!\"),\n            _ => println!(\"Hello {}\", name),\n        }\n    }\n\n    println!(\"names: {:?}\", names);\n    // FIXME ^ Comment out this line\n}\n```\n\n* `iter_mut` - This mutably borrows each element of the collection, allowing for\n  the collection to be modified in place.\n\n```rust,editable\nfn main() {\n    let mut names = vec![\"Bob\", \"Frank\", \"Ferris\"];\n\n    for name in names.iter_mut() {\n        *name = match name {\n            &mut \"Ferris\" => \"There is a rustacean among us!\",\n            _ => \"Hello\",\n        }\n    }\n\n    println!(\"names: {:?}\", names);\n}\n```\n\nIn the above snippets note the type of `match` branch, that is the key\ndifference in the types of iteration. The difference in type then of course\nimplies differing actions that are able to be performed.\n\n### See also:\n\n[Iterator][iter]\n\n[iter]: ../trait/iter.md\n"
  },
  {
    "path": "src/flow_control/if_else.md",
    "content": "# if/else\n\nBranching with `if`-`else` is similar to other languages. Unlike many of them,\nthe boolean condition doesn't need to be surrounded by parentheses, and each\ncondition is followed by a block. `if`-`else` conditionals are expressions,\nand, all branches must return the same type.\n\n```rust,editable\nfn main() {\n    let n = 5;\n\n    if n < 0 {\n        print!(\"{} is negative\", n);\n    } else if n > 0 {\n        print!(\"{} is positive\", n);\n    } else {\n        print!(\"{} is zero\", n);\n    }\n\n    let big_n =\n        if n < 10 && n > -10 {\n            println!(\", and is a small number, increase ten-fold\");\n\n            // This expression returns an `i32`.\n            10 * n\n        } else {\n            println!(\", and is a big number, halve the number\");\n\n            // This expression must return an `i32` as well.\n            n / 2\n            // TODO ^ Try suppressing this expression with a semicolon.\n        };\n    //   ^ Don't forget to put a semicolon here! All `let` bindings need it.\n\n    println!(\"{} -> {}\", n, big_n);\n}\n```\n"
  },
  {
    "path": "src/flow_control/if_let.md",
    "content": "# if let\n\nFor some use cases, when matching enums, `match` is awkward. For example:\n\n```rust\n// Make `optional` of type `Option<i32>`\nlet optional = Some(7);\n\nmatch optional {\n    Some(i) => println!(\"This is a really long string and `{:?}`\", i),\n    _ => {},\n    // ^ Required because `match` is exhaustive. Doesn't it seem\n    // like wasted space?\n};\n\n```\n\n`if let` is cleaner for this use case and in addition allows various\nfailure options to be specified:\n\n```rust,editable\nfn main() {\n    // All have type `Option<i32>`\n    let number = Some(7);\n    let letter: Option<i32> = None;\n    let emoticon: Option<i32> = None;\n\n    // The `if let` construct reads: \"if `let` destructures `number` into\n    // `Some(i)`, evaluate the block (`{}`).\n    if let Some(i) = number {\n        println!(\"Matched {:?}!\", i);\n    }\n\n    // If you need to specify a failure, use an else:\n    if let Some(i) = letter {\n        println!(\"Matched {:?}!\", i);\n    } else {\n        // Destructure failed. Change to the failure case.\n        println!(\"Didn't match a number. Let's go with a letter!\");\n    }\n\n    // Provide an altered failing condition.\n    let i_like_letters = false;\n\n    if let Some(i) = emoticon {\n        println!(\"Matched {:?}!\", i);\n    // Destructure failed. Evaluate an `else if` condition to see if the\n    // alternate failure branch should be taken:\n    } else if i_like_letters {\n        println!(\"Didn't match a number. Let's go with a letter!\");\n    } else {\n        // The condition evaluated false. This branch is the default:\n        println!(\"I don't like letters. Let's go with an emoticon :)!\");\n    }\n}\n```\n\nIn the same way, `if let` can be used to match any enum value:\n\n```rust,editable\n// Our example enum\nenum Foo {\n    Bar,\n    Baz,\n    Qux(u32)\n}\n\nfn main() {\n    // Create example variables\n    let a = Foo::Bar;\n    let b = Foo::Baz;\n    let c = Foo::Qux(100);\n\n    // Variable a matches Foo::Bar\n    if let Foo::Bar = a {\n        println!(\"a is foobar\");\n    }\n\n    // Variable b does not match Foo::Bar\n    // So this will print nothing\n    if let Foo::Bar = b {\n        println!(\"b is foobar\");\n    }\n\n    // Variable c matches Foo::Qux which has a value\n    // Similar to Some() in the previous example\n    if let Foo::Qux(value) = c {\n        println!(\"c is {}\", value);\n    }\n\n    // Binding also works with `if let`\n    if let Foo::Qux(value @ 100) = c {\n        println!(\"c is one hundred\");\n    }\n}\n```\n\nAnother benefit is that `if let` allows us to match non-parameterized enum variants. This is true even in cases where the enum doesn't implement or derive `PartialEq`. In such cases `if Foo::Bar == a` would fail to compile, because instances of the enum cannot be equated, however `if let` will continue to work.\n\nWould you like a challenge? Fix the following example to use `if let`:\n\n```rust,editable,ignore,mdbook-runnable\n// This enum purposely neither implements nor derives PartialEq.\n// That is why comparing Foo::Bar == a fails below.\nenum Foo {Bar}\n\nfn main() {\n    let a = Foo::Bar;\n\n    // Variable a matches Foo::Bar\n    if Foo::Bar == a {\n    // ^-- this causes a compile-time error. Use `if let` instead.\n        println!(\"a is foobar\");\n    }\n}\n```\n\n### See also:\n\n[`enum`][enum], [`Option`][option], and the [RFC][if_let_rfc]\n\n[enum]: ../custom_types/enum.md\n[if_let_rfc]: https://github.com/rust-lang/rfcs/pull/160\n[option]: ../std/option.md\n"
  },
  {
    "path": "src/flow_control/let_else.md",
    "content": "# let-else\n\n> 🛈 stable since: rust 1.65\n>\n> 🛈 you can target specific edition by compiling like this\n> `rustc --edition=2021 main.rs`\n\nWith `let`-`else`, a refutable pattern can match and bind variables\nin the surrounding scope like a normal `let`, or else diverge (e.g. `break`,\n`return`, `panic!`) when the pattern doesn't match.\n\n```rust\nuse std::str::FromStr;\n\nfn get_count_item(s: &str) -> (u64, &str) {\n    let mut it = s.split(' ');\n    let (Some(count_str), Some(item)) = (it.next(), it.next()) else {\n        panic!(\"Can't segment count item pair: '{s}'\");\n    };\n    let Ok(count) = u64::from_str(count_str) else {\n        panic!(\"Can't parse integer: '{count_str}'\");\n    };\n    (count, item)\n}\n\nfn main() {\n    assert_eq!(get_count_item(\"3 chairs\"), (3, \"chairs\"));\n}\n```\n\nThe scope of name bindings is the main thing that makes this different from\n`match` or `if let`-`else` expressions. You could previously approximate these\npatterns with an unfortunate bit of repetition and an outer `let`:\n\n```rust\n# use std::str::FromStr;\n#\n# fn get_count_item(s: &str) -> (u64, &str) {\n#     let mut it = s.split(' ');\n    let (count_str, item) = match (it.next(), it.next()) {\n        (Some(count_str), Some(item)) => (count_str, item),\n        _ => panic!(\"Can't segment count item pair: '{s}'\"),\n    };\n    let count = if let Ok(count) = u64::from_str(count_str) {\n        count\n    } else {\n        panic!(\"Can't parse integer: '{count_str}'\");\n    };\n#     (count, item)\n# }\n#\n# assert_eq!(get_count_item(\"3 chairs\"), (3, \"chairs\"));\n```\n\n### See also:\n\n[option][option], [match][match], [if let][if_let] and the [let-else RFC][let_else_rfc].\n\n[match]: ./match.md\n[if_let]: ./if_let.md\n[let_else_rfc]: https://rust-lang.github.io/rfcs/3137-let-else.html\n[option]: ../std/option.md\n"
  },
  {
    "path": "src/flow_control/loop/nested.md",
    "content": "# Nesting and labels\n\nIt's possible to `break` or `continue` outer loops when dealing with nested\nloops. In these cases, the loops must be annotated with some `'label`, and the\nlabel must be passed to the `break`/`continue` statement.\n\n```rust,editable\n#![allow(unreachable_code, unused_labels)]\n\nfn main() {\n    'outer: loop {\n        println!(\"Entered the outer loop\");\n\n        'inner: loop {\n            println!(\"Entered the inner loop\");\n\n            // This would break only the inner loop\n            //break;\n\n            // This breaks the outer loop\n            break 'outer;\n        }\n\n        println!(\"This point will never be reached\");\n    }\n\n    println!(\"Exited the outer loop\");\n}\n```\n"
  },
  {
    "path": "src/flow_control/loop/return.md",
    "content": "# Returning from loops\n\nOne of the uses of a `loop` is to retry an operation until it succeeds. If the\noperation returns a value though, you might need to pass it to the rest of the\ncode: put it after the `break`, and it will be returned by the `loop`\nexpression.\n\n```rust,editable\nfn main() {\n    let mut counter = 0;\n\n    let result = loop {\n        counter += 1;\n\n        if counter == 10 {\n            break counter * 2;\n        }\n    };\n\n    assert_eq!(result, 20);\n}\n```\n"
  },
  {
    "path": "src/flow_control/loop.md",
    "content": "# loop\n\nRust provides a `loop` keyword to indicate an infinite loop.\n\nThe `break` statement can be used to exit a loop at anytime, whereas the\n`continue` statement can be used to skip the rest of the iteration and start a\nnew one.\n\n```rust,editable\nfn main() {\n    let mut count = 0u32;\n\n    println!(\"Let's count until infinity!\");\n\n    // Infinite loop\n    loop {\n        count += 1;\n\n        if count == 3 {\n            println!(\"three\");\n\n            // Skip the rest of this iteration\n            continue;\n        }\n\n        println!(\"{}\", count);\n\n        if count == 5 {\n            println!(\"OK, that's enough\");\n\n            // Exit this loop\n            break;\n        }\n    }\n}\n```\n"
  },
  {
    "path": "src/flow_control/match/binding.md",
    "content": "# Binding\n\nIndirectly accessing a variable makes it impossible to branch and use that\nvariable without re-binding. `match` provides the `@` sigil for binding values to\nnames:\n\n```rust,editable\n// A function `age` which returns a `u32`.\nfn age() -> u32 {\n    15\n}\n\nfn main() {\n    println!(\"Tell me what type of person you are\");\n\n    match age() {\n        0             => println!(\"I haven't celebrated my first birthday yet\"),\n        // Could `match` 1 ..= 12 directly but then what age\n        // would the child be?\n        // Could `match` n and use an `if` guard, but would\n        // not contribute to exhaustiveness checks.\n        // (Although in this case that would not matter since\n        // a \"catch-all\" pattern is present at the bottom)\n        // Instead, bind to `n` for the sequence of 1 ..= 12.\n        // Now the age can be reported.\n        n @ 1  ..= 12 => println!(\"I'm a child of age {:?}\", n),\n        n @ 13 ..= 19 => println!(\"I'm a teen of age {:?}\", n),\n        // A similar binding can be done when matching several values.\n        n @ (1 | 7 | 15 | 13) => println!(\"I'm a teen of age {:?}\", n),\n        // Nothing bound. Return the result.\n        n             => println!(\"I'm an old person of age {:?}\", n),\n    }\n}\n```\n\nYou can also use binding to \"destructure\" `enum` variants, such as `Option`:\n\n```rust,editable\nfn some_number() -> Option<u32> {\n    Some(42)\n}\n\nfn main() {\n    match some_number() {\n        // Got `Some` variant, match if its value, bound to `n`,\n        // is equal to 42.\n        // Could also use `Some(42)` and print `\"The Answer: 42!\"`\n        // but that would require changing `42` in 2 spots should\n        // you ever wish to change it.\n        // Could also use `Some(n) if n == 42` and print `\"The Answer: {n}!\"`\n        // but that would not contribute to exhaustiveness checks.\n        // (Although in this case that would not matter since\n        // the next arm is a \"catch-all\" pattern)\n        Some(n @ 42) => println!(\"The Answer: {}!\", n),\n        // Match any other number.\n        Some(n)      => println!(\"Not interesting... {}\", n),\n        // Match anything else (`None` variant).\n        _            => (),\n    }\n}\n```\n\n### See also:\n\n[`functions`][functions], [`enums`][enums] and [`Option`][option]\n\n[functions]: ../../fn.md\n[enums]: ../../custom_types/enum.md\n[option]: ../../std/option.md\n"
  },
  {
    "path": "src/flow_control/match/destructuring/destructure_enum.md",
    "content": "# enums\n\nAn `enum` is destructured similarly:\n\n```rust,editable\n// `allow` required to silence warnings because only\n// one variant is used.\n#[allow(dead_code)]\nenum Color {\n    // These 3 are specified solely by their name.\n    Red,\n    Blue,\n    Green,\n    // These likewise tie `u32` tuples to different names: color models.\n    RGB(u32, u32, u32),\n    HSV(u32, u32, u32),\n    HSL(u32, u32, u32),\n    CMY(u32, u32, u32),\n    CMYK(u32, u32, u32, u32),\n}\n\nfn main() {\n    let color = Color::RGB(122, 17, 40);\n    // TODO ^ Try different variants for `color`\n\n    println!(\"What color is it?\");\n    // An `enum` can be destructured using a `match`.\n    match color {\n        Color::Red   => println!(\"The color is Red!\"),\n        Color::Blue  => println!(\"The color is Blue!\"),\n        Color::Green => println!(\"The color is Green!\"),\n        Color::RGB(r, g, b) =>\n            println!(\"Red: {}, green: {}, and blue: {}!\", r, g, b),\n        Color::HSV(h, s, v) =>\n            println!(\"Hue: {}, saturation: {}, value: {}!\", h, s, v),\n        Color::HSL(h, s, l) =>\n            println!(\"Hue: {}, saturation: {}, lightness: {}!\", h, s, l),\n        Color::CMY(c, m, y) =>\n            println!(\"Cyan: {}, magenta: {}, yellow: {}!\", c, m, y),\n        Color::CMYK(c, m, y, k) =>\n            println!(\"Cyan: {}, magenta: {}, yellow: {}, key (black): {}!\",\n                c, m, y, k),\n        // Don't need another arm because all variants have been examined\n    }\n}\n```\n\n### See also:\n\n[`#[allow(...)]`][allow], [color models][color_models] and [`enum`][enum]\n\n[allow]: ../../../attribute/unused.md\n[color_models]: https://en.wikipedia.org/wiki/Color_model\n[enum]: ../../../custom_types/enum.md\n"
  },
  {
    "path": "src/flow_control/match/destructuring/destructure_pointers.md",
    "content": "# pointers/ref\n\nFor pointers, a distinction needs to be made between destructuring\nand dereferencing as they are different concepts which are used\ndifferently from languages like C/C++.\n\n* Dereferencing uses `*`\n* Destructuring uses `&`, `ref`, and `ref mut`\n\n```rust,editable\nfn main() {\n    // Assign a reference of type `i32`. The `&` signifies there\n    // is a reference being assigned.\n    let reference = &4;\n\n    match reference {\n        // If `reference` is pattern matched against `&val`, it results\n        // in a comparison like:\n        // `&i32`\n        // `&val`\n        // ^ We see that if the matching `&`s are dropped, then the `i32`\n        // should be assigned to `val`.\n        &val => println!(\"Got a value via destructuring: {:?}\", val),\n    }\n\n    // To avoid the `&`, you dereference before matching.\n    match *reference {\n        val => println!(\"Got a value via dereferencing: {:?}\", val),\n    }\n\n    // What if you don't start with a reference? `reference` was a `&`\n    // because the right side was already a reference. This is not\n    // a reference because the right side is not one.\n    let _not_a_reference = 3;\n\n    // Rust provides `ref` for exactly this purpose. It modifies the\n    // assignment so that a reference is created for the element; this\n    // reference is assigned.\n    let ref _is_a_reference = 3;\n\n    // Accordingly, by defining 2 values without references, references\n    // can be retrieved via `ref` and `ref mut`.\n    let value = 5;\n    let mut mut_value = 6;\n\n    // Use `ref` keyword to create a reference.\n    match value {\n        ref r => println!(\"Got a reference to a value: {:?}\", r),\n    }\n\n    // Use `ref mut` similarly.\n    match mut_value {\n        ref mut m => {\n            // Got a reference. Gotta dereference it before we can\n            // add anything to it.\n            *m += 10;\n            println!(\"We added 10. `mut_value`: {:?}\", m);\n        },\n    }\n}\n```\n\n### See also:\n\n[The ref pattern](../../../scope/borrow/ref.md)\n"
  },
  {
    "path": "src/flow_control/match/destructuring/destructure_slice.md",
    "content": "# arrays/slices\n\nLike tuples, arrays and slices can be destructured this way:\n\n```rust,editable\nfn main() {\n    // Try changing the values in the array, or make it a slice!\n    let array = [1, -2, 6];\n\n    match array {\n        // Binds the second and the third elements to the respective variables\n        [0, second, third] =>\n            println!(\"array[0] = 0, array[1] = {}, array[2] = {}\", second, third),\n\n        // Single values can be ignored with _\n        [1, _, third] => println!(\n            \"array[0] = 1, array[2] = {} and array[1] was ignored\",\n            third\n        ),\n\n        // You can also bind some and ignore the rest\n        [-1, second, ..] => println!(\n            \"array[0] = -1, array[1] = {} and all the other ones were ignored\",\n            second\n        ),\n        // The code below would not compile\n        // [-1, second] => ...\n\n        // Or store them in another array/slice (the type depends on\n        // that of the value that is being matched against)\n        [3, second, tail @ ..] => println!(\n            \"array[0] = 3, array[1] = {} and the other elements were {:?}\",\n            second, tail\n        ),\n\n        // Combining these patterns, we can, for example, bind the first and\n        // last values, and store the rest of them in a single array\n        [first, middle @ .., last] => println!(\n            \"array[0] = {}, middle = {:?}, array[2] = {}\",\n            first, middle, last\n        ),\n    }\n}\n```\n\n### See also:\n\n[Arrays and Slices](../../../primitives/array.md) and [Binding](../binding.md) for `@` sigil\n"
  },
  {
    "path": "src/flow_control/match/destructuring/destructure_structures.md",
    "content": "# structs\n\nSimilarly, a `struct` can be destructured as shown:\n\n```rust,editable\nfn main() {\n    struct Foo {\n        x: (u32, u32),\n        y: u32,\n    }\n\n    // Try changing the values in the struct to see what happens\n    let foo = Foo { x: (1, 2), y: 3 };\n\n    match foo {\n        Foo { x: (1, b), y } => println!(\"First of x is 1, b = {},  y = {} \", b, y),\n\n        // you can destructure structs and rename the variables,\n        // the order is not important\n        Foo { y: 2, x: i } => println!(\"y is 2, i = {:?}\", i),\n\n        // and you can also ignore some variables:\n        Foo { y, .. } => println!(\"y = {}, we don't care about x\", y),\n        // this will give an error: pattern does not mention field `x`\n        //Foo { y } => println!(\"y = {}\", y),\n    }\n\n    let faa = Foo { x: (1, 2), y: 3 };\n\n    // You do not need a match block to destructure structs:\n    let Foo { x : x0, y: y0 } = faa;\n    println!(\"Outside: x0 = {x0:?}, y0 = {y0}\");\n\n    // Destructuring works with nested structs as well:\n    struct Bar {\n        foo: Foo,\n    }\n\n    let bar = Bar { foo: faa };\n    let Bar { foo: Foo { x: nested_x, y: nested_y } } = bar;\n    println!(\"Nested: nested_x = {nested_x:?}, nested_y = {nested_y:?}\");\n}\n```\n\n### See also:\n\n[Structs](../../../custom_types/structs.md)\n"
  },
  {
    "path": "src/flow_control/match/destructuring/destructure_tuple.md",
    "content": "# tuples\n\nTuples can be destructured in a `match` as follows:\n\n```rust,editable\nfn main() {\n    let triple = (0, -2, 3);\n    // TODO ^ Try different values for `triple`\n\n    println!(\"Tell me about {:?}\", triple);\n    // Match can be used to destructure a tuple\n    match triple {\n        // Destructure the second and third elements\n        (0, y, z) => println!(\"First is `0`, `y` is {:?}, and `z` is {:?}\", y, z),\n        (1, ..)  => println!(\"First is `1` and the rest doesn't matter\"),\n        (.., 2)  => println!(\"last is `2` and the rest doesn't matter\"),\n        (3, .., 4)  => println!(\"First is `3`, last is `4`, and the rest doesn't matter\"),\n        // `..` can be used to ignore the rest of the tuple\n        _      => println!(\"It doesn't matter what they are\"),\n        // `_` means don't bind the value to a variable\n    }\n}\n```\n\n### See also:\n\n[Tuples](../../../primitives/tuples.md)\n"
  },
  {
    "path": "src/flow_control/match/destructuring.md",
    "content": "# Destructuring\n\nA `match` block can destructure items in a variety of ways.\n\n* [Destructuring Tuples][tuple]\n* [Destructuring Arrays and Slices][slice]\n* [Destructuring Enums][enum]\n* [Destructuring Pointers][refs]\n* [Destructuring Structures][struct]\n\n[enum]: destructuring/destructure_enum.md\n[refs]: destructuring/destructure_pointers.md\n[struct]: destructuring/destructure_structures.md\n[tuple]: destructuring/destructure_tuple.md\n[slice]: destructuring/destructure_slice.md\n\n### See also:\n\n[The Rust Reference for Destructuring](https://doc.rust-lang.org/reference/patterns.html#r-patterns.destructure)\n"
  },
  {
    "path": "src/flow_control/match/guard.md",
    "content": "# Guards\n\nA `match` *guard* can be added to filter the arm.\n\n```rust,editable\n#[allow(dead_code)]\nenum Temperature {\n    Celsius(i32),\n    Fahrenheit(i32),\n}\n\nfn main() {\n    let temperature = Temperature::Celsius(35);\n    // ^ TODO try different values for `temperature`\n\n    match temperature {\n        Temperature::Celsius(t) if t > 30 => println!(\"{}C is above 30 Celsius\", t),\n        // The `if condition` part ^ is a guard\n        Temperature::Celsius(t) => println!(\"{}C is equal to or below 30 Celsius\", t),\n\n        Temperature::Fahrenheit(t) if t > 86 => println!(\"{}F is above 86 Fahrenheit\", t),\n        Temperature::Fahrenheit(t) => println!(\"{}F is equal to or below 86 Fahrenheit\", t),\n    }\n}\n```\n\nNote that the compiler won't take guard conditions into account when checking\nif all patterns are covered by the match expression.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    let number: u8 = 4;\n\n    match number {\n        i if i == 0 => println!(\"Zero\"),\n        i if i > 0 => println!(\"Greater than zero\"),\n        // _ => unreachable!(\"Should never happen.\"),\n        // TODO ^ uncomment to fix compilation\n    }\n}\n```\n\n### See also:\n\n[Tuples](../../primitives/tuples.md)\n[Enums](../../custom_types/enum.md)\n"
  },
  {
    "path": "src/flow_control/match.md",
    "content": "# match\n\nRust provides pattern matching via the `match` keyword, which can be used like\na C `switch`. The first matching arm is evaluated and all possible values must be\ncovered.\n\n```rust,editable\nfn main() {\n    let number = 13;\n    // TODO ^ Try different values for `number`\n\n    println!(\"Tell me about {}\", number);\n    match number {\n        // Match a single value\n        1 => println!(\"One!\"),\n        // Match several values\n        2 | 3 | 5 | 7 | 11 => println!(\"This is a prime\"),\n        // TODO ^ Try adding 13 to the list of prime values\n        // Match an inclusive range\n        13..=19 => println!(\"A teen\"),\n        // Handle the rest of cases\n        _ => println!(\"Ain't special\"),\n        // TODO ^ Try commenting out this catch-all arm\n    }\n\n    let boolean = true;\n    // Match is an expression too\n    let binary = match boolean {\n        // The arms of a match must cover all the possible values\n        false => 0,\n        true => 1,\n        // TODO ^ Try commenting out one of these arms\n    };\n\n    println!(\"{} -> {}\", boolean, binary);\n}\n```\n"
  },
  {
    "path": "src/flow_control/while.md",
    "content": "# while\n\nThe `while` keyword can be used to run a loop while a condition is true.\n\nLet's write the infamous [FizzBuzz][fizzbuzz] using a `while` loop.\n\n```rust,editable\nfn main() {\n    // A counter variable\n    let mut n = 1;\n\n    // Loop while `n` is less than 101\n    while n < 101 {\n        if n % 15 == 0 {\n            println!(\"fizzbuzz\");\n        } else if n % 3 == 0 {\n            println!(\"fizz\");\n        } else if n % 5 == 0 {\n            println!(\"buzz\");\n        } else {\n            println!(\"{}\", n);\n        }\n\n        // Increment counter\n        n += 1;\n    }\n}\n```\n\n[fizzbuzz]: https://en.wikipedia.org/wiki/Fizz_buzz\n"
  },
  {
    "path": "src/flow_control/while_let.md",
    "content": "# while let\n\nSimilar to `if let`, `while let` can make awkward `match` sequences\nmore tolerable. Consider the following sequence that increments `i`:\n\n```rust\n// Make `optional` of type `Option<i32>`\nlet mut optional = Some(0);\n\n// Repeatedly try this test.\nloop {\n    match optional {\n        // If `optional` destructures, evaluate the block.\n        Some(i) => {\n            if i > 9 {\n                println!(\"Greater than 9, quit!\");\n                optional = None;\n            } else {\n                println!(\"`i` is `{:?}`. Try again.\", i);\n                optional = Some(i + 1);\n            }\n            // ^ Requires 3 indentations!\n        },\n        // Quit the loop when the destructure fails:\n        _ => { break; }\n        // ^ Why should this be required? There must be a better way!\n    }\n}\n```\n\nUsing `while let` makes this sequence much nicer:\n\n```rust,editable\nfn main() {\n    // Make `optional` of type `Option<i32>`\n    let mut optional = Some(0);\n\n    // This reads: \"while `let` destructures `optional` into\n    // `Some(i)`, evaluate the block (`{}`). Else `break`.\n    while let Some(i) = optional {\n        if i > 9 {\n            println!(\"Greater than 9, quit!\");\n            optional = None;\n        } else {\n            println!(\"`i` is `{:?}`. Try again.\", i);\n            optional = Some(i + 1);\n        }\n        // ^ Less rightward drift and doesn't require\n        // explicitly handling the failing case.\n    }\n    // ^ `if let` had additional optional `else`/`else if`\n    // clauses. `while let` does not have these.\n}\n```\n\n### See also:\n\n[`enum`][enum], [`Option`][option], and the [RFC][while_let_rfc]\n\n[enum]: ../custom_types/enum.md\n[option]: ../std/option.md\n[while_let_rfc]: https://github.com/rust-lang/rfcs/pull/214\n"
  },
  {
    "path": "src/flow_control.md",
    "content": "# Flow of Control\n\nAn integral part of any programming language are ways to modify control flow:\n`if`/`else`, `for`, and others. Let's talk about them in Rust.\n"
  },
  {
    "path": "src/fn/closures/anonymity.md",
    "content": "# Type anonymity\n\nClosures succinctly capture variables from enclosing scopes. Does this have\nany consequences? It surely does. Observe how using a closure as a function\nparameter requires [generics], which is necessary because of how they are\ndefined:\n\n```rust\n// `F` must be generic.\nfn apply<F>(f: F) where\n    F: FnOnce() {\n    f();\n}\n```\n\nWhen a closure is defined, the compiler implicitly creates a new\nanonymous structure to store the captured variables inside, meanwhile\nimplementing the functionality via one of the `traits`: `Fn`, `FnMut`, or\n`FnOnce` for this unknown type. This type is assigned to the variable which\nis stored until calling.\n\nSince this new type is of unknown type, any usage in a function will require\ngenerics. However, an unbounded type parameter `<T>` would still be ambiguous\nand not be allowed. Thus, bounding by one of the `traits`: `Fn`, `FnMut`, or\n`FnOnce` (which it implements) is sufficient to specify its type.\n\n```rust,editable\n// `F` must implement `Fn` for a closure which takes no\n// inputs and returns nothing - exactly what is required\n// for `print`.\nfn apply<F>(f: F) where\n    F: Fn() {\n    f();\n}\n\nfn main() {\n    let x = 7;\n\n    // Capture `x` into an anonymous type and implement\n    // `Fn` for it. Store it in `print`.\n    let print = || println!(\"{}\", x);\n\n    apply(print);\n}\n```\n\n### See also:\n\n[A thorough analysis][thorough_analysis], [`Fn`][fn], [`FnMut`][fn_mut],\nand [`FnOnce`][fn_once]\n\n[generics]: ../../generics.md\n[fn]: https://doc.rust-lang.org/std/ops/trait.Fn.html\n[fn_mut]: https://doc.rust-lang.org/std/ops/trait.FnMut.html\n[fn_once]: https://doc.rust-lang.org/std/ops/trait.FnOnce.html\n[thorough_analysis]: https://huonw.github.io/blog/2015/05/finding-closure-in-rust/\n"
  },
  {
    "path": "src/fn/closures/capture.md",
    "content": "# Capturing\n\nClosures are inherently flexible and will do what the functionality requires\nto make the closure work without annotation. This allows capturing to\nflexibly adapt to the use case, sometimes moving and sometimes borrowing.\nClosures can capture variables:\n\n* by reference: `&T`\n* by mutable reference: `&mut T`\n* by value: `T`\n\nThey preferentially capture variables by reference and only go lower when\nrequired.\n\n```rust,editable\nfn main() {\n    use std::mem;\n\n    let color = String::from(\"green\");\n\n    // A closure to print `color` which immediately borrows (`&`) `color` and\n    // stores the borrow and closure in the `print` variable. It will remain\n    // borrowed until `print` is used the last time.\n    //\n    // `println!` only requires arguments by immutable reference so it doesn't\n    // impose anything more restrictive.\n    let print = || println!(\"`color`: {}\", color);\n\n    // Call the closure using the borrow.\n    print();\n\n    // `color` can be borrowed immutably again, because the closure only holds\n    // an immutable reference to `color`.\n    let _reborrow = &color;\n    print();\n\n    // A move or reborrow is allowed after the final use of `print`\n    let _color_moved = color;\n\n\n    let mut count = 0;\n    // A closure to increment `count` could take either `&mut count` or `count`\n    // but `&mut count` is less restrictive so it takes that. Immediately\n    // borrows `count`.\n    //\n    // A `mut` is required on `inc` because a `&mut` is stored inside. Thus,\n    // calling the closure mutates `count` which requires a `mut`.\n    let mut inc = || {\n        count += 1;\n        println!(\"`count`: {}\", count);\n    };\n\n    // Call the closure using a mutable borrow.\n    inc();\n\n    // The closure still mutably borrows `count` because it is called later.\n    // An attempt to reborrow will lead to an error.\n    // let _reborrow = &count;\n    // ^ TODO: try uncommenting this line.\n    inc();\n\n    // The closure no longer needs to borrow `&mut count`. Therefore, it is\n    // possible to reborrow without an error\n    let _count_reborrowed = &mut count;\n\n\n    // A non-copy type.\n    let movable = Box::new(3);\n\n    // `mem::drop` requires `T` so this must take by value. A copy type\n    // would copy into the closure leaving the original untouched.\n    // A non-copy must move and so `movable` immediately moves into\n    // the closure.\n    let consume = || {\n        println!(\"`movable`: {:?}\", movable);\n        mem::drop(movable);\n    };\n\n    // `consume` consumes the variable so this can only be called once.\n    consume();\n    // consume();\n    // ^ TODO: Try uncommenting this line.\n}\n```\n\nUsing `move` before vertical pipes forces closure\nto take ownership of captured variables:\n\n```rust,editable\nfn main() {\n    // `Vec` has non-copy semantics.\n    let haystack = vec![1, 2, 3];\n\n    let contains = move |needle| haystack.contains(needle);\n\n    println!(\"{}\", contains(&1));\n    println!(\"{}\", contains(&4));\n\n    // println!(\"There're {} elements in vec\", haystack.len());\n    // ^ Uncommenting above line will result in compile-time error\n    // because borrow checker doesn't allow re-using variable after it\n    // has been moved.\n\n    // Removing `move` from closure's signature will cause closure\n    // to borrow _haystack_ variable immutably, hence _haystack_ is still\n    // available and uncommenting above line will not cause an error.\n}\n```\n\n### See also:\n\n[`Box`][box] and [`std::mem::drop`][drop]\n\n[box]: ../../std/box.md\n[drop]: https://doc.rust-lang.org/std/mem/fn.drop.html\n"
  },
  {
    "path": "src/fn/closures/closure_examples/iter_any.md",
    "content": "# Iterator::any\n\n`Iterator::any` is a function which when passed an iterator, will return\n`true` if any element satisfies the predicate. Otherwise `false`. Its\nsignature:\n\n```rust,ignore\npub trait Iterator {\n    // The type being iterated over.\n    type Item;\n\n    // `any` takes `&mut self` meaning the caller may be borrowed\n    // and modified, but not consumed.\n    fn any<F>(&mut self, f: F) -> bool where\n        // `FnMut` meaning any captured variable may at most be\n        // modified, not consumed. `Self::Item` is the closure parameter type,\n        // which is determined by the iterator (e.g., `&T` for `.iter()`,\n        // `T` for `.into_iter()`).\n        F: FnMut(Self::Item) -> bool;\n}\n```\n\n```rust,editable\nfn main() {\n    let vec1 = vec![1, 2, 3];\n    let vec2 = vec![4, 5, 6];\n\n    // `iter()` for vecs yields `&i32`. Destructure to `i32`.\n    println!(\"2 in vec1: {}\", vec1.iter()     .any(|&x| x == 2));\n    // `into_iter()` for vecs yields `i32`. No destructuring required.\n    println!(\"2 in vec2: {}\", vec2.into_iter().any(|x| x == 2));\n\n    // `iter()` only borrows `vec1` and its elements, so they can be used again\n    println!(\"vec1 len: {}\", vec1.len());\n    println!(\"First element of vec1 is: {}\", vec1[0]);\n    // `into_iter()` does move `vec2` and its elements, so they cannot be used again\n    // println!(\"First element of vec2 is: {}\", vec2[0]);\n    // println!(\"vec2 len: {}\", vec2.len());\n    // TODO: uncomment two lines above and see compiler errors.\n\n    let array1 = [1, 2, 3];\n    let array2 = [4, 5, 6];\n\n    // `iter()` for arrays yields `&i32`.\n    println!(\"2 in array1: {}\", array1.iter()     .any(|&x| x == 2));\n    // `into_iter()` for arrays yields `i32`.\n    println!(\"2 in array2: {}\", array2.into_iter().any(|x| x == 2));\n}\n```\n\n### See also:\n\n[`std::iter::Iterator::any`][any]\n\n[any]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.any\n"
  },
  {
    "path": "src/fn/closures/closure_examples/iter_find.md",
    "content": "# Searching through iterators\n\n`Iterator::find` is a function which iterates over an iterator and searches for the\nfirst value which satisfies some condition. If none of the values satisfy the\ncondition, it returns `None`. Its signature:\n\n```rust,ignore\npub trait Iterator {\n    // The type being iterated over.\n    type Item;\n\n    // `find` takes `&mut self` meaning the caller may be borrowed\n    // and modified, but not consumed.\n    fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where\n        // `FnMut` meaning any captured variable may at most be\n        // modified, not consumed. `&Self::Item` states it takes\n        // arguments to the closure by reference.\n        P: FnMut(&Self::Item) -> bool;\n}\n```\n\n```rust,editable\nfn main() {\n    let vec1 = vec![1, 2, 3];\n    let vec2 = vec![4, 5, 6];\n\n    // `vec1.iter()` yields `&i32`.\n    let mut iter = vec1.iter();\n    // `vec2.into_iter()` yields `i32`.\n    let mut into_iter = vec2.into_iter();\n\n    // `iter()` yields `&i32`, and `find` passes `&Item` to the predicate.\n    // Since `Item = &i32`, the closure argument has type `&&i32`,\n    // which we pattern-match to dereference down to `i32`.\n    println!(\"Find 2 in vec1: {:?}\", iter.find(|&&x| x == 2));\n    \n    // `into_iter()` yields `i32`, and `find` passes `&Item` to the predicate.\n    // Since `Item = i32`, the closure argument has type `&i32`,\n    // which we pattern-match to dereference down to `i32`.\n    println!(\"Find 2 in vec2: {:?}\", into_iter.find(|&x| x == 2));\n\n    let array1 = [1, 2, 3];\n    let array2 = [4, 5, 6];\n\n    // `array1.iter()` yields `&i32`\n    println!(\"Find 2 in array1: {:?}\", array1.iter().find(|&&x| x == 2));\n    // `array2.into_iter()` yields `i32`\n    println!(\"Find 2 in array2: {:?}\", array2.into_iter().find(|&x| x == 2));\n}\n```\n\n`Iterator::find` gives you a reference to the item. But if you want the _index_ of the\nitem, use `Iterator::position`.\n\n```rust,editable\nfn main() {\n    let vec = vec![1, 9, 3, 3, 13, 2];\n\n    // `position` passes the iterator’s `Item` by value to the predicate.\n    // `vec.iter()` yields `&i32`, so the predicate receives `&i32`,\n    // which we pattern-match to dereference to `i32`.\n    let index_of_first_even_number = vec.iter().position(|&x| x % 2 == 0);\n    assert_eq!(index_of_first_even_number, Some(5));\n\n    // `vec.into_iter()` yields `i32`, so the predicate receives `i32` directly.\n    let index_of_first_negative_number = vec.into_iter().position(|x| x < 0);\n    assert_eq!(index_of_first_negative_number, None);\n}\n```\n\n### See also:\n\n[`std::iter::Iterator::find`][find]\n\n[`std::iter::Iterator::find_map`][find_map]\n\n[`std::iter::Iterator::position`][position]\n\n[`std::iter::Iterator::rposition`][rposition]\n\n[find]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find\n[find_map]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find_map\n[position]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.position\n[rposition]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.rposition\n"
  },
  {
    "path": "src/fn/closures/closure_examples.md",
    "content": "# Examples in `std`\n\nThis section contains a few examples of using closures from the `std` library.\n"
  },
  {
    "path": "src/fn/closures/input_functions.md",
    "content": "# Input functions\n\nSince closures may be used as arguments, you might wonder if the same can be said\nabout functions. And indeed they can! If you declare a function that takes a\nclosure as parameter, then any function that satisfies the trait bound of that\nclosure can be passed as a parameter.\n\n```rust,editable\n// Define a function which takes a generic `F` argument\n// bounded by `Fn`, and calls it\nfn call_me<F: Fn()>(f: F) {\n    f();\n}\n\n// Define a wrapper function satisfying the `Fn` bound\nfn function() {\n    println!(\"I'm a function!\");\n}\n\nfn main() {\n    // Define a closure satisfying the `Fn` bound\n    let closure = || println!(\"I'm a closure!\");\n\n    call_me(closure);\n    call_me(function);\n}\n```\n\nAs an additional note, the `Fn`, `FnMut`, and `FnOnce` `traits` dictate how\na closure captures variables from the enclosing scope.\n\n### See also:\n\n[`Fn`][fn], [`FnMut`][fn_mut], and [`FnOnce`][fn_once]\n\n[fn]: https://doc.rust-lang.org/std/ops/trait.Fn.html\n[fn_mut]: https://doc.rust-lang.org/std/ops/trait.FnMut.html\n[fn_once]: https://doc.rust-lang.org/std/ops/trait.FnOnce.html\n"
  },
  {
    "path": "src/fn/closures/input_parameters.md",
    "content": "# As input parameters\n\nWhile Rust chooses how to capture variables on the fly mostly without type\nannotation, this ambiguity is not allowed when writing functions. When\ntaking a closure as an input parameter, the closure's complete type must be\nannotated using one of a few `traits`, and they're determined by what the\nclosure does with captured value. In order of decreasing restriction,\nthey are:\n\n* `Fn`: the closure uses the captured value by reference (`&T`)\n* `FnMut`: the closure uses the captured value by mutable reference (`&mut T`)\n* `FnOnce`: the closure uses the captured value by value (`T`)\n\nOn a variable-by-variable basis, the compiler will capture variables in the\nleast restrictive manner possible.\n\nFor instance, consider a parameter annotated as `FnOnce`. This specifies\nthat the closure *may* capture by `&T`, `&mut T`, or `T`, but the compiler\nwill ultimately choose based on how the captured variables are used in the\nclosure.\n\nThis is because if a move is possible, then any type of borrow should also\nbe possible. Note that the reverse is not true. If the parameter is\nannotated as `Fn`, then capturing variables by `&mut T` or `T` are not\nallowed. However, `&T` is allowed.\n\nIn the following example, try swapping the usage of `Fn`, `FnMut`, and\n`FnOnce` to see what happens:\n\n```rust,editable\n// A function which takes a closure as an argument and calls it.\n// <F> denotes that F is a \"Generic type parameter\"\nfn apply<F>(f: F) where\n    // The closure takes no input and returns nothing.\n    F: FnOnce() {\n    // ^ TODO: Try changing this to `Fn` or `FnMut`.\n\n    f();\n}\n\n// A function which takes a closure and returns an `i32`.\nfn apply_to_3<F>(f: F) -> i32 where\n    // The closure takes an `i32` and returns an `i32`.\n    F: Fn(i32) -> i32 {\n\n    f(3)\n}\n\nfn main() {\n    use std::mem;\n\n    let greeting = \"hello\";\n    // A non-copy type.\n    // `to_owned` creates owned data from borrowed one\n    let mut farewell = \"goodbye\".to_owned();\n\n    // Capture 2 variables: `greeting` by reference and\n    // `farewell` by value.\n    let diary = || {\n        // `greeting` is by reference: requires `Fn`.\n        println!(\"I said {}.\", greeting);\n\n        // Mutation forces `farewell` to be captured by\n        // mutable reference. Now requires `FnMut`.\n        farewell.push_str(\"!!!\");\n        println!(\"Then I screamed {}.\", farewell);\n        println!(\"Now I can sleep. zzzzz\");\n\n        // Manually calling drop forces `farewell` to\n        // be captured by value. Now requires `FnOnce`.\n        mem::drop(farewell);\n    };\n\n    // Call the function which applies the closure.\n    apply(diary);\n\n    // `double` satisfies `apply_to_3`'s trait bound\n    let double = |x| 2 * x;\n\n    println!(\"3 doubled: {}\", apply_to_3(double));\n}\n```\n\n### See also:\n\n[`std::mem::drop`][drop], [`Fn`][fn], [`FnMut`][fnmut], [Generics][generics], [where][where] and [`FnOnce`][fnonce]\n\n[drop]: https://doc.rust-lang.org/std/mem/fn.drop.html\n[fn]: https://doc.rust-lang.org/std/ops/trait.Fn.html\n[fnmut]: https://doc.rust-lang.org/std/ops/trait.FnMut.html\n[fnonce]: https://doc.rust-lang.org/std/ops/trait.FnOnce.html\n[generics]: ../../generics.md\n[where]: ../../generics/where.md\n"
  },
  {
    "path": "src/fn/closures/output_parameters.md",
    "content": "# As output parameters\n\nClosures as input parameters are possible, so returning closures as\noutput parameters should also be possible. However, anonymous\nclosure types are, by definition, unknown, so we have to use\n`impl Trait` to return them.\n\nThe valid traits for returning a closure are:\n\n* `Fn`\n* `FnMut`\n* `FnOnce`\n\nBeyond this, the `move` keyword must be used, which signals that all captures\noccur by value. This is required because any captures by reference would be\ndropped as soon as the function exited, leaving invalid references in the\nclosure.\n\n```rust,editable\nfn create_fn() -> impl Fn() {\n    let text = \"Fn\".to_owned();\n\n    move || println!(\"This is a: {}\", text)\n}\n\nfn create_fnmut() -> impl FnMut() {\n    let text = \"FnMut\".to_owned();\n\n    move || println!(\"This is a: {}\", text)\n}\n\nfn create_fnonce() -> impl FnOnce() {\n    let text = \"FnOnce\".to_owned();\n\n    move || println!(\"This is a: {}\", text)\n}\n\nfn main() {\n    let fn_plain = create_fn();\n    let mut fn_mut = create_fnmut();\n    let fn_once = create_fnonce();\n\n    fn_plain();\n    fn_mut();\n    fn_once();\n}\n```\n\n### See also:\n\n[`Fn`][fn], [`FnMut`][fnmut], [Generics][generics] and [impl Trait][impltrait].\n\n[fn]: https://doc.rust-lang.org/std/ops/trait.Fn.html\n[fnmut]: https://doc.rust-lang.org/std/ops/trait.FnMut.html\n[generics]: ../../generics.md\n[impltrait]: ../../trait/impl_trait.md\n"
  },
  {
    "path": "src/fn/closures.md",
    "content": "# Closures\n\nClosures are functions that can capture the enclosing environment. For\nexample, a closure that captures the `x` variable:\n\n```Rust\n|val| val + x\n```\n\nThe syntax and capabilities of closures make them very convenient for\non the fly usage. Calling a closure is exactly like calling a function.\nHowever, both input and return types *can* be inferred and input\nvariable names *must* be specified.\n\nOther characteristics of closures include:\n\n* using `||` instead of `()` around input variables.\n* optional body delimitation (`{}`) for a single line expression (mandatory otherwise).\n* the ability to capture the outer environment variables.\n\n```rust,editable\nfn main() {\n    let outer_var = 42;\n\n    // A regular function can't refer to variables in the enclosing environment\n    //fn function(i: i32) -> i32 { i + outer_var }\n    // TODO: uncomment the line above and see the compiler error. The compiler\n    // suggests that we define a closure instead.\n\n    // Closures are anonymous, here we are binding them to references.\n    // Annotation is identical to function annotation but is optional\n    // as are the `{}` wrapping the body. These nameless functions\n    // are assigned to appropriately named variables.\n    let closure_annotated = |i: i32| -> i32 { i + outer_var };\n    let closure_inferred  = |i     |          i + outer_var  ;\n\n    // Call the closures.\n    println!(\"closure_annotated: {}\", closure_annotated(1));\n    println!(\"closure_inferred: {}\", closure_inferred(1));\n    // Once closure's type has been inferred, it cannot be inferred again with another type.\n    //println!(\"cannot reuse closure_inferred with another type: {}\", closure_inferred(42i64));\n    // TODO: uncomment the line above and see the compiler error.\n\n    // A closure taking no arguments which returns an `i32`.\n    // The return type is inferred.\n    let one = || 1;\n    println!(\"closure returning one: {}\", one());\n\n}\n```\n"
  },
  {
    "path": "src/fn/diverging.md",
    "content": "# Diverging functions\n\nDiverging functions never return. They are marked using `!`, which is an empty type.\n\n```rust\nfn foo() -> ! {\n    panic!(\"This call never returns.\");\n}\n```\n\nAs opposed to all the other types, this one cannot be instantiated, because the\nset of all possible values this type can have is empty. Note that, it is\ndifferent from the `()` type, which has exactly one possible value.\n\nFor example, this function returns as usual, although there is no information\nin the return value.\n\n```rust\nfn some_fn() {\n    ()\n}\n\nfn main() {\n    let _a: () = some_fn();\n    println!(\"This function returns and you can see this line.\");\n}\n```\n\nAs opposed to this function, which will never return the control back to the caller.\n\n```rust,ignore\n#![feature(never_type)]\n\nfn main() {\n    let x: ! = panic!(\"This call never returns.\");\n    println!(\"You will never see this line!\");\n}\n```\n\nAlthough this might seem like an abstract concept, it is actually very useful and\noften handy. The main advantage of this type is that it can be cast to any other\ntype, making it versatile in situations where an exact type is required, such as\nin match branches. This flexibility allows us to write code like this:\n\n```rust\nfn main() {\n    fn sum_odd_numbers(up_to: u32) -> u32 {\n        let mut acc = 0;\n        for i in 0..up_to {\n            // Notice that the return type of this match expression must be u32\n            // because of the type of the \"addition\" variable.\n            let addition: u32 = match i%2 == 1 {\n                // The \"i\" variable is of type u32, which is perfectly fine.\n                true => i,\n                // On the other hand, the \"continue\" expression does not return\n                // u32, but it is still fine, because it never returns and therefore\n                // does not violate the type requirements of the match expression.\n                false => continue,\n            };\n            acc += addition;\n        }\n        acc\n    }\n    println!(\"Sum of odd numbers up to 9 (excluding): {}\", sum_odd_numbers(9));\n}\n```\n\nIt is also the return type of functions that loop forever (e.g. `loop {}`) like\nnetwork servers or functions that terminate the process (e.g. `exit()`).\n"
  },
  {
    "path": "src/fn/hof.md",
    "content": "# Higher Order Functions\n\nRust provides Higher Order Functions (HOF). These are functions that\ntake one or more functions and/or produce a more useful function. HOFs\nand lazy iterators give Rust its functional flavor.\n\n```rust,editable\nfn is_odd(n: u32) -> bool {\n    n % 2 == 1\n}\n\nfn main() {\n    println!(\"Find the sum of all the numbers with odd squares under 1000\");\n    let upper = 1000;\n\n    // Imperative approach\n    // Declare accumulator variable\n    let mut acc = 0;\n    // Iterate: 0, 1, 2, ... to infinity\n    for n in 0.. {\n        // Square the number\n        let n_squared = n * n;\n\n        if n_squared >= upper {\n            // Break loop if exceeded the upper limit\n            break;\n        } else if is_odd(n_squared) {\n            // Accumulate value, if it's odd\n            acc += n;\n        }\n    }\n    println!(\"imperative style: {}\", acc);\n\n    // Functional approach\n    let sum: u32 =\n        (0..).take_while(|&n| n * n < upper) // Below upper limit\n             .filter(|&n| is_odd(n * n))     // That are odd\n             .sum();                         // Sum them\n    println!(\"functional style: {}\", sum);\n}\n```\n\n[Option][option]\nand\n[Iterator][iter]\nimplement their fair share of HOFs.\n\n[option]: https://doc.rust-lang.org/core/option/enum.Option.html\n[iter]: https://doc.rust-lang.org/core/iter/trait.Iterator.html\n"
  },
  {
    "path": "src/fn/methods.md",
    "content": "# Associated functions & Methods\n\nSome functions are connected to a particular type. These come in two forms:\nassociated functions, and methods. Associated functions are functions that\nare defined on a type generally, while methods are associated functions that are\ncalled on a particular instance of a type.\n\n```rust,editable\nstruct Point {\n    x: f64,\n    y: f64,\n}\n\n// Implementation block, all `Point` associated functions & methods go in here\nimpl Point {\n    // This is an \"associated function\" because this function is associated with\n    // a particular type, that is, Point.\n    //\n    // Associated functions don't need to be called with an instance.\n    // These functions are generally used like constructors.\n    fn origin() -> Point {\n        Point { x: 0.0, y: 0.0 }\n    }\n\n    // Another associated function, taking two arguments:\n    fn new(x: f64, y: f64) -> Point {\n        Point { x: x, y: y }\n    }\n}\n\nstruct Rectangle {\n    p1: Point,\n    p2: Point,\n}\n\nimpl Rectangle {\n    // This is a method\n    // `&self` is sugar for `self: &Self`, where `Self` is the type of the\n    // caller object. In this case `Self` = `Rectangle`\n    fn area(&self) -> f64 {\n        // `self` gives access to the struct fields via the dot operator\n        let Point { x: x1, y: y1 } = self.p1;\n        let Point { x: x2, y: y2 } = self.p2;\n\n        // `abs` is a `f64` method that returns the absolute value of the\n        // caller\n        ((x1 - x2) * (y1 - y2)).abs()\n    }\n\n    fn perimeter(&self) -> f64 {\n        let Point { x: x1, y: y1 } = self.p1;\n        let Point { x: x2, y: y2 } = self.p2;\n\n        2.0 * ((x1 - x2).abs() + (y1 - y2).abs())\n    }\n\n    // This method requires the caller object to be mutable\n    // `&mut self` desugars to `self: &mut Self`\n    fn translate(&mut self, x: f64, y: f64) {\n        self.p1.x += x;\n        self.p2.x += x;\n\n        self.p1.y += y;\n        self.p2.y += y;\n    }\n}\n\n// `Pair` owns resources: two heap allocated integers\nstruct Pair(Box<i32>, Box<i32>);\n\nimpl Pair {\n    // This method \"consumes\" the resources of the caller object\n    // `self` desugars to `self: Self`\n    fn destroy(self) {\n        // Destructure `self`\n        let Pair(first, second) = self;\n\n        println!(\"Destroying Pair({}, {})\", first, second);\n\n        // `first` and `second` go out of scope and get freed\n    }\n}\n\nfn main() {\n    let rectangle = Rectangle {\n        // Associated functions are called using double colons\n        p1: Point::origin(),\n        p2: Point::new(3.0, 4.0),\n    };\n\n    // Methods are called using the dot operator\n    // Note that the first argument `&self` is implicitly passed, i.e.\n    // `rectangle.perimeter()` === `Rectangle::perimeter(&rectangle)`\n    println!(\"Rectangle perimeter: {}\", rectangle.perimeter());\n    println!(\"Rectangle area: {}\", rectangle.area());\n\n    let mut square = Rectangle {\n        p1: Point::origin(),\n        p2: Point::new(1.0, 1.0),\n    };\n\n    // Error! `rectangle` is immutable, but this method requires a mutable\n    // object\n    //rectangle.translate(1.0, 0.0);\n    // TODO ^ Try uncommenting this line\n\n    // Okay! Mutable objects can call mutable methods\n    square.translate(1.0, 1.0);\n\n    let pair = Pair(Box::new(1), Box::new(2));\n\n    pair.destroy();\n\n    // Error! Previous `destroy` call \"consumed\" `pair`\n    //pair.destroy();\n    // TODO ^ Try uncommenting this line\n}\n```\n"
  },
  {
    "path": "src/fn.md",
    "content": "# Functions\n\nFunctions are declared using the `fn` keyword. Its arguments are type\nannotated, just like variables, and, if the function returns a value, the\nreturn type must be specified after an arrow `->`.\n\nThe final expression in the function will be used as return value.\nAlternatively, the `return` statement can be used to return a value earlier\nfrom within the function, even from inside loops or `if` statements.\n\nLet's rewrite FizzBuzz using functions!\n\n```rust,editable\n// Unlike C/C++, there's no restriction on the order of function definitions\nfn main() {\n    // We can use this function here, and define it somewhere later\n    fizzbuzz_to(100);\n}\n\n// Function that returns a boolean value\nfn is_divisible_by(lhs: u32, rhs: u32) -> bool {\n    // Corner case, early return\n    if rhs == 0 {\n        return false;\n    }\n\n    // This is an expression, the `return` keyword is not necessary here\n    lhs % rhs == 0\n}\n\n// Functions that \"don't\" return a value, actually return the unit type `()`\nfn fizzbuzz(n: u32) -> () {\n    if is_divisible_by(n, 15) {\n        println!(\"fizzbuzz\");\n    } else if is_divisible_by(n, 3) {\n        println!(\"fizz\");\n    } else if is_divisible_by(n, 5) {\n        println!(\"buzz\");\n    } else {\n        println!(\"{}\", n);\n    }\n}\n\n// When a function returns `()`, the return type can be omitted from the\n// signature\nfn fizzbuzz_to(n: u32) {\n    for n in 1..=n {\n        fizzbuzz(n);\n    }\n}\n```\n"
  },
  {
    "path": "src/generics/assoc_items/the_problem.md",
    "content": "# The Problem\n\nA `trait` that is generic over its container type has type specification\nrequirements - users of the `trait` *must* specify all of its generic types.\n\nIn the example below, the `Contains` `trait` allows the use of the generic\ntypes `A` and `B`. The trait is then implemented for the `Container` type,\nspecifying `i32` for `A` and `B` so that it can be used with `fn difference()`.\n\nBecause `Contains` is generic, we are forced to explicitly state *all* of the\ngeneric types for `fn difference()`. In practice, we want a way to express that\n`A` and `B` are determined by the *input* `C`. As you will see in the next\nsection, associated types provide exactly that capability.\n\n```rust,editable\nstruct Container(i32, i32);\n\n// A trait which checks if 2 items are stored inside of container.\n// Also retrieves first or last value.\ntrait Contains<A, B> {\n    fn contains(&self, _: &A, _: &B) -> bool; // Explicitly requires `A` and `B`.\n    fn first(&self) -> i32; // Doesn't explicitly require `A` or `B`.\n    fn last(&self) -> i32;  // Doesn't explicitly require `A` or `B`.\n}\n\nimpl Contains<i32, i32> for Container {\n    // True if the numbers stored are equal.\n    fn contains(&self, number_1: &i32, number_2: &i32) -> bool {\n        (&self.0 == number_1) && (&self.1 == number_2)\n    }\n\n    // Grab the first number.\n    fn first(&self) -> i32 { self.0 }\n\n    // Grab the last number.\n    fn last(&self) -> i32 { self.1 }\n}\n\n// `C` contains `A` and `B`. In light of that, having to express `A` and\n// `B` again is a nuisance.\nfn difference<A, B, C>(container: &C) -> i32 where\n    C: Contains<A, B> {\n    container.last() - container.first()\n}\n\nfn main() {\n    let number_1 = 3;\n    let number_2 = 10;\n\n    let container = Container(number_1, number_2);\n\n    println!(\"Does container contain {} and {}: {}\",\n        &number_1, &number_2,\n        container.contains(&number_1, &number_2));\n    println!(\"First number: {}\", container.first());\n    println!(\"Last number: {}\", container.last());\n\n    println!(\"The difference is: {}\", difference(&container));\n}\n```\n\n### See also:\n\n[`struct`s][structs], and [`trait`s][traits]\n\n[structs]: ../../custom_types/structs.md\n[traits]: ../../trait.md\n"
  },
  {
    "path": "src/generics/assoc_items/types.md",
    "content": "# Associated types\n\nThe use of \"Associated types\" improves the overall readability of code\nby moving inner types locally into a trait as *output* types. Syntax\nfor the `trait` definition is as follows:\n\n```rust\n// `A` and `B` are defined in the trait via the `type` keyword.\n// (Note: `type` in this context is different from `type` when used for\n// aliases).\ntrait Contains {\n    type A;\n    type B;\n\n    // Updated syntax to refer to these new types generically.\n    fn contains(&self, _: &Self::A, _: &Self::B) -> bool;\n}\n```\n\nNote that functions that use the `trait` `Contains` are no longer required\nto express `A` or `B` at all:\n\n```rust,ignore\n// Without using associated types\nfn difference<A, B, C>(container: &C) -> i32 where\n    C: Contains<A, B> { ... }\n\n// Using associated types\nfn difference<C: Contains>(container: &C) -> i32 { ... }\n```\n\nLet's rewrite the example from the previous section using associated types:\n\n```rust,editable\nstruct Container(i32, i32);\n\n// A trait which checks if 2 items are stored inside of container.\n// Also retrieves first or last value.\ntrait Contains {\n    // Define generic types here which methods will be able to utilize.\n    type A;\n    type B;\n\n    fn contains(&self, _: &Self::A, _: &Self::B) -> bool;\n    fn first(&self) -> i32;\n    fn last(&self) -> i32;\n}\n\nimpl Contains for Container {\n    // Specify what types `A` and `B` are. If the `input` type\n    // is `Container(i32, i32)`, the `output` types are determined\n    // as `i32` and `i32`.\n    type A = i32;\n    type B = i32;\n\n    // `&Self::A` and `&Self::B` are also valid here.\n    fn contains(&self, number_1: &i32, number_2: &i32) -> bool {\n        (&self.0 == number_1) && (&self.1 == number_2)\n    }\n    // Grab the first number.\n    fn first(&self) -> i32 { self.0 }\n\n    // Grab the last number.\n    fn last(&self) -> i32 { self.1 }\n}\n\nfn difference<C: Contains>(container: &C) -> i32 {\n    container.last() - container.first()\n}\n\nfn main() {\n    let number_1 = 3;\n    let number_2 = 10;\n\n    let container = Container(number_1, number_2);\n\n    println!(\"Does container contain {} and {}: {}\",\n        &number_1, &number_2,\n        container.contains(&number_1, &number_2));\n    println!(\"First number: {}\", container.first());\n    println!(\"Last number: {}\", container.last());\n\n    println!(\"The difference is: {}\", difference(&container));\n}\n```\n"
  },
  {
    "path": "src/generics/assoc_items.md",
    "content": "# Associated items\n\n\"Associated Items\" refers to a set of rules pertaining to [`item`][items]s\nof various types. It is an extension to `trait` generics, and allows\n`trait`s to internally define new items.\n\nOne such item is called an *associated type*, providing simpler usage\npatterns when the `trait` is generic over its container type.\n\n### See also:\n\n[RFC][RFC]\n\n[items]: https://doc.rust-lang.org/reference/items.html\n[RFC]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md\n"
  },
  {
    "path": "src/generics/bounds/testcase_empty.md",
    "content": "# Testcase: empty bounds\n\nA consequence of how bounds work is that even if a `trait` doesn't\ninclude any functionality, you can still use it as a bound. `Eq` and\n`Copy` are examples of such `trait`s from the `std` library.\n\n```rust,editable\nstruct Cardinal;\nstruct BlueJay;\nstruct Turkey;\n\ntrait Red {}\ntrait Blue {}\n\nimpl Red for Cardinal {}\nimpl Blue for BlueJay {}\n\n// These functions are only valid for types which implement these\n// traits. The fact that the traits are empty is irrelevant.\nfn red<T: Red>(_: &T)   -> &'static str { \"red\" }\nfn blue<T: Blue>(_: &T) -> &'static str { \"blue\" }\n\nfn main() {\n    let cardinal = Cardinal;\n    let blue_jay = BlueJay;\n    let _turkey   = Turkey;\n\n    // `red()` won't work on a blue jay nor vice versa\n    // because of the bounds.\n    println!(\"A cardinal is {}\", red(&cardinal));\n    println!(\"A blue jay is {}\", blue(&blue_jay));\n    //println!(\"A turkey is {}\", red(&_turkey));\n    // ^ TODO: Try uncommenting this line.\n}\n```\n\n### See also:\n\n[`std::cmp::Eq`][eq], [`std::marker::Copy`][copy], and [`trait`s][traits]\n\n[eq]: https://doc.rust-lang.org/std/cmp/trait.Eq.html\n[copy]: https://doc.rust-lang.org/std/marker/trait.Copy.html\n[traits]: ../../trait.md\n"
  },
  {
    "path": "src/generics/bounds.md",
    "content": "# Bounds\n\nWhen working with generics, the type parameters often must use traits as *bounds* to\nstipulate what functionality a type implements. For example, the following\nexample uses the trait `Display` to print and so it requires `T` to be bound\nby `Display`; that is, `T` *must* implement `Display`.\n\n```rust,ignore\n// Define a function `printer` that takes a generic type `T` which\n// must implement trait `Display`.\nfn printer<T: Display>(t: T) {\n    println!(\"{}\", t);\n}\n```\n\nBounding restricts the generic to types that conform to the bounds. That is:\n\n```rust,ignore\nstruct S<T: Display>(T);\n\n// Error! `Vec<T>` does not implement `Display`. This\n// specialization will fail.\nlet s = S(vec![1]);\n```\n\nAnother effect of bounding is that generic instances are allowed to access the\n[methods] of traits specified in the bounds. For example:\n\n```rust,editable\n// A trait which implements the print marker: `{:?}`.\nuse std::fmt::Debug;\n\ntrait HasArea {\n    fn area(&self) -> f64;\n}\n\nimpl HasArea for Rectangle {\n    fn area(&self) -> f64 { self.length * self.height }\n}\n\n#[derive(Debug)]\nstruct Rectangle { length: f64, height: f64 }\n#[allow(dead_code)]\nstruct Triangle  { length: f64, height: f64 }\n\n// The generic `T` must implement `Debug`. Regardless\n// of the type, this will work properly.\nfn print_debug<T: Debug>(t: &T) {\n    println!(\"{:?}\", t);\n}\n\n// `T` must implement `HasArea`. Any type which meets\n// the bound can access `HasArea`'s function `area`.\nfn area<T: HasArea>(t: &T) -> f64 { t.area() }\n\nfn main() {\n    let rectangle = Rectangle { length: 3.0, height: 4.0 };\n    let _triangle = Triangle  { length: 3.0, height: 4.0 };\n\n    print_debug(&rectangle);\n    println!(\"Area: {}\", area(&rectangle));\n\n    //print_debug(&_triangle);\n    //println!(\"Area: {}\", area(&_triangle));\n    // ^ TODO: Try uncommenting these.\n    // | Error: Does not implement either `Debug` or `HasArea`.\n}\n```\n\nAs an additional note, [`where`][where] clauses can also be used to apply bounds in\nsome cases to be more expressive.\n\n### See also:\n\n[`std::fmt`][fmt], [`struct`s][structs], and [`trait`s][traits]\n\n[fmt]: ../hello/print.md\n[methods]: ../fn/methods.md\n[structs]: ../custom_types/structs.md\n[traits]: ../trait.md\n[where]: ../generics/where.md\n"
  },
  {
    "path": "src/generics/gen_fn.md",
    "content": "# Functions\n\nThe same set of rules can be applied to functions: a type `T` becomes\ngeneric when preceded by `<T>`.\n\nUsing generic functions sometimes requires explicitly specifying type\nparameters. This may be the case if the function is called where the return type\nis generic, or if the compiler doesn't have enough information to infer\nthe necessary type parameters.\n\nA function call with explicitly specified type parameters looks like:\n`fun::<A, B, ...>()`.\n\n```rust,editable\nstruct A;          // Concrete type `A`.\nstruct S(A);       // Concrete type `S`.\nstruct SGen<T>(T); // Generic type `SGen`.\n\n// The following functions all take ownership of the variable passed into\n// them and immediately go out of scope, freeing the variable.\n\n// Define a function `reg_fn` that takes an argument `_s` of type `S`.\n// This has no `<T>` so this is not a generic function.\nfn reg_fn(_s: S) {}\n\n// Define a function `gen_spec_t` that takes an argument `_s` of type `SGen<T>`.\n// It has been explicitly given the type parameter `A`, but because `A` has not\n// been specified as a generic type parameter for `gen_spec_t`, it is not generic.\nfn gen_spec_t(_s: SGen<A>) {}\n\n// Define a function `gen_spec_i32` that takes an argument `_s` of type `SGen<i32>`.\n// It has been explicitly given the type parameter `i32`, which is a specific type.\n// Because `i32` is not a generic type, this function is also not generic.\nfn gen_spec_i32(_s: SGen<i32>) {}\n\n// Define a function `generic` that takes an argument `_s` of type `SGen<T>`.\n// Because `SGen<T>` is preceded by `<T>`, this function is generic over `T`.\nfn generic<T>(_s: SGen<T>) {}\n\nfn main() {\n    // Using the non-generic functions\n    reg_fn(S(A));          // Concrete type.\n    gen_spec_t(SGen(A));   // Implicitly specified type parameter `A`.\n    gen_spec_i32(SGen(6)); // Implicitly specified type parameter `i32`.\n\n    // Explicitly specified type parameter `char` to `generic()`.\n    generic::<char>(SGen('a'));\n\n    // Implicitly specified type parameter `char` to `generic()`.\n    generic(SGen('c'));\n}\n```\n\n### See also:\n\n[functions][fn] and [`struct`s][structs]\n\n[fn]: ../fn.md\n[structs]: ../custom_types/structs.md\n"
  },
  {
    "path": "src/generics/gen_trait.md",
    "content": "# Traits\n\nOf course `trait`s can also be generic. Here we define one which reimplements\nthe `Drop` `trait` as a generic method to `drop` itself and an input.\n\n```rust,editable\n// Non-copyable types.\nstruct Empty;\nstruct Null;\n\n// A trait generic over `T`.\ntrait DoubleDrop<T> {\n    // Define a method on the caller type which takes an\n    // additional single parameter `T` and does nothing with it.\n    fn double_drop(self, _: T);\n}\n\n// Implement `DoubleDrop<T>` for any generic parameter `T` and\n// caller `U`.\nimpl<T, U> DoubleDrop<T> for U {\n    // This method takes ownership of both passed arguments,\n    // deallocating both.\n    fn double_drop(self, _: T) {}\n}\n\nfn main() {\n    let empty = Empty;\n    let null  = Null;\n\n    // Deallocate `empty` and `null`.\n    empty.double_drop(null);\n\n    //empty;\n    //null;\n    // ^ TODO: Try uncommenting these lines.\n}\n```\n\n### See also:\n\n[`Drop`][Drop], [`struct`][structs], and [`trait`][traits]\n\n[Drop]: https://doc.rust-lang.org/std/ops/trait.Drop.html\n[structs]: ../custom_types/structs.md\n[traits]: ../trait.md\n"
  },
  {
    "path": "src/generics/impl.md",
    "content": "# Implementation\n\nSimilar to functions, implementations require care to remain generic.\n\n```rust\nstruct S; // Concrete type `S`\nstruct GenericVal<T>(T); // Generic type `GenericVal`\n\n// impl of GenericVal where we explicitly specify type parameters:\nimpl GenericVal<f32> {} // Specify `f32`\nimpl GenericVal<S> {} // Specify `S` as defined above\n\n// `<T>` Must precede the type to remain generic\nimpl<T> GenericVal<T> {}\n```\n\n```rust,editable\nstruct Val {\n    val: f64,\n}\n\nstruct GenVal<T> {\n    gen_val: T,\n}\n\n// impl of Val\nimpl Val {\n    fn value(&self) -> &f64 {\n        &self.val\n    }\n}\n\n// impl of GenVal for a generic type `T`\nimpl<T> GenVal<T> {\n    fn value(&self) -> &T {\n        &self.gen_val\n    }\n}\n\nfn main() {\n    let x = Val { val: 3.0 };\n    let y = GenVal { gen_val: 3i32 };\n\n    println!(\"{}, {}\", x.value(), y.value());\n}\n```\n\n### See also:\n\n[functions returning references][fn], [`impl`][methods], and [`struct`][structs]\n\n[fn]: ../scope/lifetime/fn.md\n[methods]: ../fn/methods.md\n[specialization_plans]: https://blog.rust-lang.org/2015/05/11/traits.html#the-future\n[structs]: ../custom_types/structs.md\n"
  },
  {
    "path": "src/generics/multi_bounds.md",
    "content": "# Multiple bounds\n\nMultiple bounds for a single type can be applied with a `+`. Like normal, different types are\nseparated with `,`.\n\n```rust,editable\nuse std::fmt::{Debug, Display};\n\nfn compare_prints<T: Debug + Display>(t: &T) {\n    println!(\"Debug: `{:?}`\", t);\n    println!(\"Display: `{}`\", t);\n}\n\nfn compare_types<T: Debug, U: Debug>(t: &T, u: &U) {\n    println!(\"t: `{:?}`\", t);\n    println!(\"u: `{:?}`\", u);\n}\n\nfn main() {\n    let string = \"words\";\n    let array = [1, 2, 3];\n    let vec = vec![1, 2, 3];\n\n    compare_prints(&string);\n    //compare_prints(&array);\n    // TODO ^ Try uncommenting this.\n\n    compare_types(&array, &vec);\n}\n```\n\n### See also:\n\n[`std::fmt`][fmt] and [`trait`s][traits]\n\n[fmt]: ../hello/print.md\n[traits]: ../trait.md\n"
  },
  {
    "path": "src/generics/new_types.md",
    "content": "# New Type Idiom\n\nThe `newtype` idiom gives compile time guarantees that the right type of value is supplied\nto a program.\n\nFor example, an age verification function that checks age in years, *must* be given\na value of type `Years`.\n\n```rust, editable\nstruct Years(i64);\n\nstruct Days(i64);\n\nimpl Years {\n    pub fn to_days(&self) -> Days {\n        Days(self.0 * 365)\n    }\n}\n\nimpl Days {\n    /// truncates partial years\n    pub fn to_years(&self) -> Years {\n        Years(self.0 / 365)\n    }\n}\n\nfn is_adult(age: &Years) -> bool {\n    age.0 >= 18\n}\n\nfn main() {\n    let age = Years(25);\n    let age_days = age.to_days();\n    println!(\"Is an adult? {}\", is_adult(&age));\n    println!(\"Is an adult? {}\", is_adult(&age_days.to_years()));\n    // println!(\"Is an adult? {}\", is_adult(&age_days));\n}\n```\n\nUncomment the last print statement to observe that the type supplied must be `Years`.\n\nTo obtain the `newtype`'s value as the base type, you may use the tuple or destructuring syntax like so:\n\n```rust, editable\nstruct Years(i64);\n\nfn main() {\n    let years = Years(42);\n    let years_as_primitive_1: i64 = years.0; // Tuple\n    let Years(years_as_primitive_2) = years; // Destructuring\n}\n```\n\n### See also:\n\n[`structs`][struct]\n\n[struct]: ../custom_types/structs.md\n"
  },
  {
    "path": "src/generics/phantom/testcase_units.md",
    "content": "# Testcase: unit clarification\n\nA useful method of unit conversions can be examined by implementing `Add`\nwith a phantom type parameter. The `Add` `trait` is examined below:\n\n```rust,ignore\n// This construction would impose: `Self + RHS = Output`\n// where RHS defaults to Self if not specified in the implementation.\npub trait Add<RHS = Self> {\n    type Output;\n\n    fn add(self, rhs: RHS) -> Self::Output;\n}\n\n// `Output` must be `T<U>` so that `T<U> + T<U> = T<U>`.\nimpl<U> Add for T<U> {\n    type Output = T<U>;\n    ...\n}\n```\n\nThe whole implementation:\n\n```rust,editable\nuse std::ops::Add;\nuse std::marker::PhantomData;\n\n/// Create void enumerations to define unit types.\n#[derive(Debug, Clone, Copy)]\nenum Inch {}\n#[derive(Debug, Clone, Copy)]\nenum Mm {}\n\n/// `Length` is a type with phantom type parameter `Unit`,\n/// and is not generic over the length type (that is `f64`).\n///\n/// `f64` already implements the `Clone` and `Copy` traits.\n#[derive(Debug, Clone, Copy)]\nstruct Length<Unit>(f64, PhantomData<Unit>);\n\n/// The `Add` trait defines the behavior of the `+` operator.\nimpl<Unit> Add for Length<Unit> {\n    type Output = Length<Unit>;\n\n    // add() returns a new `Length` struct containing the sum.\n    fn add(self, rhs: Length<Unit>) -> Length<Unit> {\n        // `+` calls the `Add` implementation for `f64`.\n        Length(self.0 + rhs.0, PhantomData)\n    }\n}\n\nfn main() {\n    // Specifies `one_foot` to have phantom type parameter `Inch`.\n    let one_foot:  Length<Inch> = Length(12.0, PhantomData);\n    // `one_meter` has phantom type parameter `Mm`.\n    let one_meter: Length<Mm>   = Length(1000.0, PhantomData);\n\n    // `+` calls the `add()` method we implemented for `Length<Unit>`.\n    //\n    // Since `Length` implements `Copy`, `add()` does not consume\n    // `one_foot` and `one_meter` but copies them into `self` and `rhs`.\n    let two_feet = one_foot + one_foot;\n    let two_meters = one_meter + one_meter;\n\n    // Addition works.\n    println!(\"one foot + one_foot = {:?} in\", two_feet.0);\n    println!(\"one meter + one_meter = {:?} mm\", two_meters.0);\n\n    // Nonsensical operations fail as they should:\n    // Compile-time Error: type mismatch.\n    //let one_feter = one_foot + one_meter;\n}\n```\n\n### See also:\n\n[Borrowing (`&`)], [Bounds (`X: Y`)], [enum], [impl & self],\n[Overloading], [ref], [Traits (`X for Y`)], and [TupleStructs].\n\n[Borrowing (`&`)]: ../../scope/borrow.md\n[Bounds (`X: Y`)]: ../../generics/bounds.md\n[enum]: ../../custom_types/enum.md\n[impl & self]: ../../fn/methods.md\n[Overloading]: ../../trait/ops.md\n[ref]: ../../scope/borrow/ref.md\n[Traits (`X for Y`)]: ../../trait.md\n[TupleStructs]: ../../custom_types/structs.md\n[std::marker::PhantomData]: https://doc.rust-lang.org/std/marker/struct.PhantomData.html\n"
  },
  {
    "path": "src/generics/phantom.md",
    "content": "# Phantom type parameters\n\nA phantom type parameter is one that doesn't show up at runtime,\nbut is checked statically (and only) at compile time.\n\nData types can use extra generic type parameters to act as markers\nor to perform type checking at compile time. These extra parameters\nhold no storage values, and have no runtime behavior.\n\nIn the following example, we combine [std::marker::PhantomData]\nwith the phantom type parameter concept to create tuples containing\ndifferent data types.\n\n```rust,editable\nuse std::marker::PhantomData;\n\n// A phantom tuple struct which is generic over `A` with hidden parameter `B`.\n#[derive(PartialEq)] // Allow equality test for this type.\nstruct PhantomTuple<A, B>(A, PhantomData<B>);\n\n// A phantom type struct which is generic over `A` with hidden parameter `B`.\n#[derive(PartialEq)] // Allow equality test for this type.\nstruct PhantomStruct<A, B> { first: A, phantom: PhantomData<B> }\n\n// Note: Storage is allocated for generic type `A`, but not for `B`.\n//       Therefore, `B` cannot be used in computations.\n\nfn main() {\n    // Here, `f32` and `f64` are the hidden parameters.\n    // PhantomTuple type specified as `<char, f32>`.\n    let _tuple1: PhantomTuple<char, f32> = PhantomTuple('Q', PhantomData);\n    // PhantomTuple type specified as `<char, f64>`.\n    let _tuple2: PhantomTuple<char, f64> = PhantomTuple('Q', PhantomData);\n\n    // Type specified as `<char, f32>`.\n    let _struct1: PhantomStruct<char, f32> = PhantomStruct {\n        first: 'Q',\n        phantom: PhantomData,\n    };\n    // Type specified as `<char, f64>`.\n    let _struct2: PhantomStruct<char, f64> = PhantomStruct {\n        first: 'Q',\n        phantom: PhantomData,\n    };\n\n    // Compile-time Error! Type mismatch so these cannot be compared:\n    // println!(\"_tuple1 == _tuple2 yields: {}\",\n    //           _tuple1 == _tuple2);\n\n    // Compile-time Error! Type mismatch so these cannot be compared:\n    // println!(\"_struct1 == _struct2 yields: {}\",\n    //           _struct1 == _struct2);\n}\n```\n\n### See also:\n\n[Derive], [struct], and [tuple](../primitives/tuples.html).\n\n[Derive]: ../trait/derive.md\n[struct]: ../custom_types/structs.md\n[std::marker::PhantomData]: https://doc.rust-lang.org/std/marker/struct.PhantomData.html\n"
  },
  {
    "path": "src/generics/where.md",
    "content": "# Where clauses\n\nA bound can also be expressed using a `where` clause immediately\nbefore the opening `{`, rather than at the type's first mention.\nAdditionally, `where` clauses can apply bounds to arbitrary types,\nrather than just to type parameters.\n\nSome cases that a `where` clause is useful:\n\n* When specifying generic types and bounds separately is clearer:\n\n```rust,ignore\nimpl <A: TraitB + TraitC, D: TraitE + TraitF> MyTrait<A, D> for YourType {}\n\n// Expressing bounds with a `where` clause\nimpl <A, D> MyTrait<A, D> for YourType where\n    A: TraitB + TraitC,\n    D: TraitE + TraitF {}\n```\n\n* When using a `where` clause is more expressive than using normal syntax.\nThe `impl` in this example cannot be directly expressed without a `where` clause:\n\n```rust,editable\nuse std::fmt::Debug;\n\ntrait PrintInOption {\n    fn print_in_option(self);\n}\n\n// Because we would otherwise have to express this as `T: Debug` or\n// use another method of indirect approach, this requires a `where` clause:\nimpl<T> PrintInOption for T where\n    Option<T>: Debug {\n    // We want `Option<T>: Debug` as our bound because that is what's\n    // being printed. Doing otherwise would be using the wrong bound.\n    fn print_in_option(self) {\n        println!(\"{:?}\", Some(self));\n    }\n}\n\nfn main() {\n    let vec = vec![1, 2, 3];\n\n    vec.print_in_option();\n}\n```\n\n### See also:\n\n[RFC][where], [`struct`][struct], and [`trait`][trait]\n\n[struct]: ../custom_types/structs.md\n[trait]: ../trait.md\n[where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md\n"
  },
  {
    "path": "src/generics.md",
    "content": "# Generics\n\n*Generics* is the topic of generalizing types and functionalities to broader\ncases. This is extremely useful for reducing code duplication in many ways,\nbut can call for rather involved syntax. Namely, being generic requires\ntaking great care to specify over which types a generic type\nis actually considered valid. The simplest and most common use of generics\nis for type parameters.\n\nA type parameter is specified as generic by the use of angle brackets and upper\n[camel case][camelcase]: `<Aaa, Bbb, ...>`. \"Generic type parameters\" are\ntypically represented as `<T>`. In Rust, \"generic\" also describes anything that\naccepts one or more generic type parameters `<T>`. Any type specified as a\ngeneric type parameter is generic, and everything else is concrete (non-generic).\n\nFor example, defining a *generic function* named `foo` that takes an argument\n`T` of any type:\n\n```rust,ignore\nfn foo<T>(arg: T) { ... }\n```\n\nBecause `T` has been specified as a generic type parameter using `<T>`, it\nis considered generic when used here as `(arg: T)`. This is the case even if `T`\nhas previously been defined as a `struct`.\n\nThis example shows some of the syntax in action:\n\n```rust,editable\n// A concrete type `A`.\nstruct A;\n\n// In defining the type `Single`, the first use of `A` is not preceded by `<A>`.\n// Therefore, `Single` is a concrete type, and `A` is defined as above.\nstruct Single(A);\n//            ^ Here is `Single`s first use of the type `A`.\n\n// Here, `<T>` precedes the first use of `T`, so `SingleGen` is a generic type.\n// Because the type parameter `T` is generic, it could be anything, including\n// the concrete type `A` defined at the top.\nstruct SingleGen<T>(T);\n\nfn main() {\n    // `Single` is concrete and explicitly takes `A`.\n    let _s = Single(A);\n\n    // Create a variable `_char` of type `SingleGen<char>`\n    // and give it the value `SingleGen('a')`.\n    // Here, `SingleGen` has a type parameter explicitly specified.\n    let _char: SingleGen<char> = SingleGen('a');\n\n    // `SingleGen` can also have a type parameter implicitly specified:\n    let _t    = SingleGen(A); // Uses `A` defined at the top.\n    let _i32  = SingleGen(6); // Uses `i32`.\n    let _char = SingleGen('a'); // Uses `char`.\n}\n```\n\n### See also:\n\n[`structs`][structs]\n\n[structs]: custom_types/structs.md\n[camelcase]: https://en.wikipedia.org/wiki/CamelCase\n"
  },
  {
    "path": "src/hello/comment.md",
    "content": "# Comments\n\nAny program requires comments, and Rust supports\na few different varieties:\n\n## Regular Comments\n\nThese are ignored by the compiler:\n\n* **Line comments**: Start with `//` and continue to the end of the line\n* **Block comments**: Enclosed in `/* ... */` and can span multiple lines\n\n## Documentation Comments (Doc Comments) which are parsed into HTML library [documentation][docs]:\n\n - `///` - Generates docs for the item that follows it\n- `//!` - Generates docs for the enclosing item (typically used at the top of a file or module)\n```rust,editable\n\nfn main() {\n    // Line comments start with two slashes.\n    // Everything after the slashes is ignored by the compiler.\n\n    // Example: This line won't execute\n    // println!(\"Hello, world!\");\n\n    // Try removing the slashes above and running the code again.\n\n    /*\n     * Block comments are useful for temporarily disabling code.\n     * They can also be nested: /* like this */ which makes it easy\n     * to comment out large sections quickly.\n     */\n\n    /*\n    Note: The asterisk column on the left is just for style - \n    it's not required by the language.\n    */\n\n    // Block comments make it easy to toggle code on/off by adding\n    // or removing just one slash:\n\n    /* <- Add a '/' here to uncomment the entire block below\n\n    println!(\"Now\");\n    println!(\"everything\");\n    println!(\"executes!\");\n    // Line comments inside remain unaffected\n\n    // */\n\n    // Block comments can also be used within expressions:\n    let x = 5 + /* 90 + */ 5;\n    println!(\"Is `x` 10 or 100? x = {}\", x);\n}\n```\n\n### See also:\n\n[Library documentation][docs]\n\n[docs]: ../meta/doc.md\n"
  },
  {
    "path": "src/hello/print/fmt.md",
    "content": "# Formatting\n\nWe've seen that formatting is specified via a *format string*:\n\n* `format!(\"{}\", foo)` -> `\"3735928559\"`\n* `format!(\"0x{:X}\", foo)` -> [`\"0xDEADBEEF\"`][deadbeef]\n* `format!(\"0o{:o}\", foo)` -> `\"0o33653337357\"`\n\nThe same variable (`foo`) can be formatted differently depending on which\n*argument type* is used: `X` vs `o` vs *unspecified*.\n\nThis formatting functionality is implemented via traits, and there is one trait\nfor each argument type. The most common formatting trait is `Display`, which\nhandles cases where the argument type is left unspecified: `{}` for instance.\n\n```rust,editable\nuse std::fmt::{self, Formatter, Display};\n\nstruct City {\n    name: &'static str,\n    // Latitude\n    lat: f32,\n    // Longitude\n    lon: f32,\n}\n\nimpl Display for City {\n    // `f` is a buffer, and this method must write the formatted string into it.\n    fn fmt(&self, f: &mut Formatter) -> fmt::Result {\n        let lat_c = if self.lat >= 0.0 { 'N' } else { 'S' };\n        let lon_c = if self.lon >= 0.0 { 'E' } else { 'W' };\n\n        // `write!` is like `format!`, but it will write the formatted string\n        // into a buffer (the first argument).\n        write!(f, \"{}: {:.3}°{} {:.3}°{}\",\n               self.name, self.lat.abs(), lat_c, self.lon.abs(), lon_c)\n    }\n}\n\n#[derive(Debug)]\nstruct Color {\n    red: u8,\n    green: u8,\n    blue: u8,\n}\n\nfn main() {\n    for city in [\n        City { name: \"Dublin\", lat: 53.347778, lon: -6.259722 },\n        City { name: \"Oslo\", lat: 59.95, lon: 10.75 },\n        City { name: \"Vancouver\", lat: 49.25, lon: -123.1 },\n    ] {\n        println!(\"{}\", city);\n    }\n    for color in [\n        Color { red: 128, green: 255, blue: 90 },\n        Color { red: 0, green: 3, blue: 254 },\n        Color { red: 0, green: 0, blue: 0 },\n    ] {\n        // Switch this to use {} once you've added an implementation\n        // for fmt::Display.\n        println!(\"{:?}\", color);\n    }\n}\n```\n\nYou can view a [full list of formatting traits][fmt_traits] and their argument\ntypes in the [`std::fmt`][fmt] documentation.\n\n### Activity\n\nAdd an implementation of the `fmt::Display` trait for the `Color` struct above\nso that the output displays as:\n\n```text\nRGB (128, 255, 90) 0x80FF5A\nRGB (0, 3, 254) 0x0003FE\nRGB (0, 0, 0) 0x000000\n```\n\nTwo hints if you get stuck:\n\n* You [may need to list each color more than once][named_parameters].\n* You can [pad with zeros to a width of 2][fmt_width] with `:0>2`.\nFor hexadecimals, you can use `:02X`.\n\nBonus:\n\n* If you would like to experiment with [type casting][type_casting] in advance,\nthe formula for [calculating a color in the RGB color space][rgb_color] is\n`RGB = (R * 65_536) + (G * 256) + B`, where `R is RED, G is GREEN, and B is BLUE`.\nAn unsigned 8-bit integer (`u8`) can only hold numbers up to 255. To cast `u8` to `u32`, you can write `variable_name as u32`.\n\n### See also:\n\n[`std::fmt`][fmt]\n\n[rgb_color]: https://www.rapidtables.com/web/color/RGB_Color.html#rgb-format\n[named_parameters]: https://doc.rust-lang.org/std/fmt/#named-parameters\n[deadbeef]: https://en.wikipedia.org/wiki/Deadbeef#Magic_debug_values\n[fmt]: https://doc.rust-lang.org/std/fmt/\n[fmt_traits]: https://doc.rust-lang.org/std/fmt/#formatting-traits\n[fmt_width]: https://doc.rust-lang.org/std/fmt/#width\n[type_casting]: ../../types/cast.md\n"
  },
  {
    "path": "src/hello/print/print_debug.md",
    "content": "# Debug\n\nAll types which want to use `std::fmt` formatting `traits` require an\nimplementation to be printable. Automatic implementations are only provided\nfor types such as in the `std` library. All others *must* be manually\nimplemented somehow.\n\nThe `fmt::Debug` `trait` makes this very straightforward. *All* types can\n`derive` (automatically create) the `fmt::Debug` implementation. This is\nnot true for `fmt::Display` which must be manually implemented.\n\n```rust\n// This structure cannot be printed either with `fmt::Display` or\n// with `fmt::Debug`.\nstruct UnPrintable(i32);\n\n// The `derive` attribute automatically creates the implementation\n// required to make this `struct` printable with `fmt::Debug`.\n#[derive(Debug)]\nstruct DebugPrintable(i32);\n```\n\nAll `std` library types are automatically printable with `{:?}` too:\n\n```rust,editable\n// Derive the `fmt::Debug` implementation for `Structure`. `Structure`\n// is a structure which contains a single `i32`.\n#[derive(Debug)]\nstruct Structure(i32);\n\n// Put a `Structure` inside of the structure `Deep`. Make it printable\n// also.\n#[derive(Debug)]\nstruct Deep(Structure);\n\nfn main() {\n    // Printing with `{:?}` is similar to with `{}`.\n    println!(\"{:?} months in a year.\", 12);\n    println!(\"{1:?} {0:?} is the {actor:?} name.\",\n             \"Slater\",\n             \"Christian\",\n             actor=\"actor's\");\n\n    // `Structure` is printable!\n    println!(\"Now {:?} will print!\", Structure(3));\n\n    // The problem with `derive` is there is no control over how\n    // the results look. What if I want this to just show a `7`?\n    println!(\"Now {:?} will print!\", Deep(Structure(7)));\n}\n```\n\nSo `fmt::Debug` definitely makes this printable but sacrifices some elegance.\nRust also provides \"pretty printing\" with `{:#?}`.\n\n```rust,editable\n#[derive(Debug)]\nstruct Person<'a> {\n    name: &'a str,\n    age: u8\n}\n\nfn main() {\n    let name = \"Peter\";\n    let age = 27;\n    let peter = Person { name, age };\n\n    // Pretty print\n    println!(\"{:#?}\", peter);\n}\n```\n\nOne can manually implement `fmt::Display` to control the display.\n\n### See also:\n\n[`attributes`][attributes], [`derive`][derive], [`std::fmt`][fmt],\nand [`struct`][structs]\n\n[attributes]: https://doc.rust-lang.org/reference/attributes.html\n[derive]: ../../trait/derive.md\n[fmt]: https://doc.rust-lang.org/std/fmt/\n[structs]: ../../custom_types/structs.md\n"
  },
  {
    "path": "src/hello/print/print_display/testcase_list.md",
    "content": "# Testcase: List\n\nImplementing `fmt::Display` for a structure where the elements must each be\nhandled sequentially is tricky. The problem is that each `write!` generates a\n`fmt::Result`. Proper handling of this requires dealing with *all* the\nresults. Rust provides the `?` operator for exactly this purpose.\n\nUsing `?` on `write!` looks like this:\n\n```rust,ignore\n// Try `write!` to see if it errors. If it errors, return\n// the error. Otherwise continue.\nwrite!(f, \"{}\", value)?;\n```\n\nWith `?` available, implementing `fmt::Display` for a `Vec` is\nstraightforward:\n\n```rust,editable\nuse std::fmt; // Import the `fmt` module.\n\n// Define a structure named `List` containing a `Vec`.\nstruct List(Vec<i32>);\n\nimpl fmt::Display for List {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        // Extract the value using tuple indexing,\n        // and create a reference to `vec`.\n        let vec = &self.0;\n\n        write!(f, \"[\")?;\n\n        // Iterate over `v` in `vec` while enumerating the iteration\n        // index in `index`.\n        for (index, v) in vec.iter().enumerate() {\n            // For every element except the first, add a comma.\n            // Use the ? operator to return on errors.\n            if index != 0 { write!(f, \", \")?; }\n            write!(f, \"{}\", v)?;\n        }\n\n        // Close the opened bracket and return a fmt::Result value.\n        write!(f, \"]\")\n    }\n}\n\nfn main() {\n    let v = List(vec![1, 2, 3]);\n    println!(\"{}\", v);\n}\n```\n\n### Activity\n\nTry changing the program so that the index of each element in the vector is also\nprinted. The new output should look like this:\n\n```rust,ignore\n[0: 1, 1: 2, 2: 3]\n```\n\n### See also:\n\n[`for`][for], [`ref`][ref], [`Result`][result], [`struct`][struct],\n[`?`][q_mark], and [`vec!`][vec]\n\n[for]: ../../../flow_control/for.md\n[result]: ../../../std/result.md\n[ref]: ../../../scope/borrow/ref.md\n[struct]: ../../../custom_types/structs.md\n[q_mark]: ../../../std/result/question_mark.md\n[vec]: ../../../std/vec.md\n"
  },
  {
    "path": "src/hello/print/print_display.md",
    "content": "# Display\n\n`fmt::Debug` hardly looks compact and clean, so it is often advantageous to\ncustomize the output appearance. This is done by manually implementing\n[`fmt::Display`][fmt], which uses the `{}` print marker. Implementing it\nlooks like this:\n\n```rust\n// Import (via `use`) the `fmt` module to make it available.\nuse std::fmt;\n\n// Define a structure for which `fmt::Display` will be implemented. This is\n// a tuple struct named `Structure` that contains an `i32`.\nstruct Structure(i32);\n\n// To use the `{}` marker, the trait `fmt::Display` must be implemented\n// manually for the type.\nimpl fmt::Display for Structure {\n    // This trait requires `fmt` with this exact signature.\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        // Write strictly the first element into the supplied output\n        // stream: `f`. Returns `fmt::Result` which indicates whether the\n        // operation succeeded or failed. Note that `write!` uses syntax which\n        // is very similar to `println!`.\n        write!(f, \"{}\", self.0)\n    }\n}\n```\n\n`fmt::Display` may be cleaner than `fmt::Debug` but this presents\na problem for the `std` library. How should ambiguous types be displayed?\nFor example, if the `std` library implemented a single style for all\n`Vec<T>`, what style should it be? Would it be either of these two?\n\n* `Vec<path>`: `/:/etc:/home/username:/bin` (split on `:`)\n* `Vec<number>`: `1,2,3` (split on `,`)\n\nNo, because there is no ideal style for all types and the `std` library\ndoesn't presume to dictate one. `fmt::Display` is not implemented for `Vec<T>`\nor for any other generic containers. `fmt::Debug` must then be used for these\ngeneric cases.\n\nThis is not a problem though because for any new *container* type which is\n*not* generic, `fmt::Display` can be implemented.\n\n```rust,editable\nuse std::fmt; // Import `fmt`\n\n// A structure holding two numbers. `Debug` will be derived so the results can\n// be contrasted with `Display`.\n#[derive(Debug)]\nstruct MinMax(i64, i64);\n\n// Implement `Display` for `MinMax`.\nimpl fmt::Display for MinMax {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        // Use `self.number` to refer to each positional data point.\n        write!(f, \"({}, {})\", self.0, self.1)\n    }\n}\n\n// Define a structure where the fields are nameable for comparison.\n#[derive(Debug)]\nstruct Point2D {\n    x: f64,\n    y: f64,\n}\n\n// Similarly, implement `Display` for `Point2D`.\nimpl fmt::Display for Point2D {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        // Customize so only `x` and `y` are denoted.\n        write!(f, \"x: {}, y: {}\", self.x, self.y)\n    }\n}\n\nfn main() {\n    let minmax = MinMax(0, 14);\n\n    println!(\"Compare structures:\");\n    println!(\"Display: {}\", minmax);\n    println!(\"Debug: {:?}\", minmax);\n\n    let big_range =   MinMax(-300, 300);\n    let small_range = MinMax(-3, 3);\n\n    println!(\"The big range is {big} and the small is {small}\",\n             small = small_range,\n             big = big_range);\n\n    let point = Point2D { x: 3.3, y: 7.2 };\n\n    println!(\"Compare points:\");\n    println!(\"Display: {}\", point);\n    println!(\"Debug: {:?}\", point);\n\n    // Error. Both `Debug` and `Display` were implemented, but `{:b}`\n    // requires `fmt::Binary` to be implemented. This will not work.\n    // println!(\"What does Point2D look like in binary: {:b}?\", point);\n}\n```\n\nSo, `fmt::Display` has been implemented but `fmt::Binary` has not, and therefore\ncannot be used. `std::fmt` has many such [`traits`][traits] and each requires\nits own implementation. This is detailed further in [`std::fmt`][fmt].\n\n### Activity\n\nAfter checking the output of the above example, use the `Point2D` struct as a\nguide to add a `Complex` struct to the example. When printed in the same\nway, the output should be:\n\n```txt\nDisplay: 3.3 +7.2i\nDebug: Complex { real: 3.3, imag: 7.2 }\n\nDisplay: 4.7 -2.3i\nDebug: Complex { real: 4.7, imag: -2.3 }\n```\n\nBonus: Add a space after the `+`/`-` signs.\n\nHints in case you get stuck:\n\n- Check the documentation for [`Sign/#/0`][fmt_sign0] in `std::fmt`.\n- Bonus: Check [`if`-`else`][if_else] branching and the [`abs`][f64_abs] function.\n\n### See also:\n\n[`derive`][derive], [`std::fmt`][fmt], [`macros`][macros], [`struct`][structs],\n[`trait`][traits], and [`use`][use]\n\n[derive]: ../../trait/derive.md\n[f64_abs]: https://doc.rust-lang.org/std/primitive.f64.html#method.abs\n[fmt]: https://doc.rust-lang.org/std/fmt/\n[fmt_sign0]: https://doc.rust-lang.org/std/fmt/#sign0\n[if_else]: ../../flow_control/if_else.md\n[macros]: ../../macros.md\n[structs]: ../../custom_types/structs.md\n[traits]: https://doc.rust-lang.org/std/fmt/#formatting-traits\n[use]: ../../mod/use.md\n"
  },
  {
    "path": "src/hello/print.md",
    "content": "# Formatted print\n\nPrinting is handled by a series of [`macros`][macros] defined in\n[`std::fmt`][fmt] some of which are:\n\n* `format!`: write formatted text to [`String`][string]\n* `print!`: same as `format!` but the text is printed to the console\n  (io::stdout).\n* `println!`: same as `print!` but a newline is appended.\n* `eprint!`: same as `print!` but the text is printed to the standard error\n  (io::stderr).\n* `eprintln!`: same as `eprint!` but a newline is appended.\n\nAll parse text in the same fashion. As a plus, Rust checks formatting\ncorrectness at compile time.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    // In general, the `{}` will be automatically replaced with any\n    // arguments. These will be stringified.\n    println!(\"{} days\", 31);\n\n    // Positional arguments can be used. Specifying an integer inside `{}`\n    // determines which additional argument will be replaced. Arguments start\n    // at 0 immediately after the format string.\n    println!(\"{0}, this is {1}. {1}, this is {0}\", \"Alice\", \"Bob\");\n\n    // As can named arguments.\n    println!(\"{subject} {verb} {object}\",\n             object=\"the lazy dog\",\n             subject=\"the quick brown fox\",\n             verb=\"jumps over\");\n\n    // Different formatting can be invoked by specifying the format character\n    // after a `:`.\n    println!(\"Base 10:               {}\",   69420); // 69420\n    println!(\"Base 2 (binary):       {:b}\", 69420); // 10000111100101100\n    println!(\"Base 8 (octal):        {:o}\", 69420); // 207454\n    println!(\"Base 16 (hexadecimal): {:x}\", 69420); // 10f2c\n\n    // You can right-justify text with a specified width. This will\n    // output \"    1\". (Four white spaces and a \"1\", for a total width of 5.)\n    println!(\"{number:>5}\", number=1);\n\n    // You can pad numbers with extra zeroes,\n    println!(\"{number:0>5}\", number=1); // 00001\n    // and left-adjust by flipping the sign. This will output \"10000\".\n    println!(\"{number:0<5}\", number=1); // 10000\n\n    // You can use named arguments in the format specifier by appending a `$`.\n    println!(\"{number:0>width$}\", number=1, width=5);\n\n    // Rust even checks to make sure the correct number of arguments are used.\n    println!(\"My name is {0}, {1} {0}\", \"Bond\");\n    // FIXME ^ Add the missing argument: \"James\"\n\n    // Only types that implement fmt::Display can be formatted with `{}`. User-\n    // defined types do not implement fmt::Display by default.\n\n    #[allow(dead_code)] // disable `dead_code` which warn against unused module\n    struct Structure(i32);\n\n    // This will not compile because `Structure` does not implement\n    // fmt::Display.\n    // println!(\"This struct `{}` won't print...\", Structure(3));\n    // TODO ^ Try uncommenting this line\n\n    // For Rust 1.58 and above, you can directly capture the argument from a\n    // surrounding variable. Just like the above, this will output\n    // \"    1\", 4 white spaces and a \"1\".\n    let number: f64 = 1.0;\n    let width: usize = 5;\n    println!(\"{number:>width$}\");\n}\n```\n\n[`std::fmt`][fmt] contains many [`traits`][traits] which govern the display\nof text. The base form of two important ones are listed below:\n\n* `fmt::Debug`: Uses the `{:?}` marker. Format text for debugging purposes.\n* `fmt::Display`: Uses the `{}` marker. Format text in a more elegant, user\n  friendly fashion.\n\nHere, we used `fmt::Display` because the std library provides implementations\nfor these types. To print text for custom types, more steps are required.\n\nImplementing the `fmt::Display` trait automatically implements the\n[`ToString`] trait which allows us to [convert] the type to [`String`][string].\n\nIn *line 43*, `#[allow(dead_code)]` is an [attribute] which only applies to the module after it.\n\n### Activities\n\n* Fix the issue in the above code (see FIXME) so that it runs without\n  error.\n* Try uncommenting the line that attempts to format the `Structure` struct\n  (see TODO)\n* Add a `println!` macro call that prints: `Pi is roughly 3.142` by controlling\n  the number of decimal places shown. For the purposes of this exercise, use\n  `let pi = 3.141592` as an estimate for pi. (Hint: you may need to check the\n  [`std::fmt`][fmt] documentation for setting the number of decimals to display)\n\n### See also:\n\n[`std::fmt`][fmt], [`macros`][macros], [`struct`][structs], [`traits`][traits], and [`dead_code`][dead_code]\n\n[fmt]: https://doc.rust-lang.org/std/fmt/\n[macros]: ../macros.md\n[string]: ../std/str.md\n[structs]: ../custom_types/structs.md\n[traits]: https://doc.rust-lang.org/std/fmt/#formatting-traits\n[`ToString`]: https://doc.rust-lang.org/std/string/trait.ToString.html\n[convert]: ../conversion/string.md\n[attribute]: ../attribute.md\n[dead_code]: ../attribute/unused.md\n"
  },
  {
    "path": "src/hello.md",
    "content": "# Hello World\n\nThis is the source code of the traditional Hello World program.\n\n```rust,editable\n// This is a comment, and is ignored by the compiler.\n// You can test this code by clicking the \"Run\" button over there ->\n// or if you prefer to use your keyboard, you can use the \"Ctrl + Enter\"\n// shortcut.\n\n// This code is editable, feel free to hack it!\n// You can always return to the original code by clicking the \"Reset\" button ->\n\n// This is the main function.\nfn main() {\n    // Statements here are executed when the compiled binary is called.\n\n    // Print text to the console.\n    println!(\"Hello World!\");\n}\n```\n\n`println!` is a [*macro*][macros] that prints text to the\nconsole.\n\nA binary can be generated using the Rust compiler: `rustc`.\n\n```bash\n$ rustc hello.rs\n```\n\n`rustc` will produce a `hello` binary that can be executed.\n\n```bash\n$ ./hello\nHello World!\n```\n\n### Activity\n\nClick 'Run' above to see the expected output. Next, add a new\nline with a second `println!` macro so that the output shows:\n\n```text\nHello World!\nI'm a Rustacean!\n```\n\n[macros]: macros.md\n"
  },
  {
    "path": "src/index.md",
    "content": "# Rust by Example\n\n[Rust][rust] is a modern systems programming language focusing on safety, speed,\nand concurrency. It accomplishes these goals by being memory safe without using\ngarbage collection.\n\nRust by Example (RBE) is a collection of runnable examples that illustrate various Rust\nconcepts and standard libraries. To get even more out of these examples, don't forget\nto [install Rust locally][install] and check out the [official docs][std].\nAdditionally for the curious, you can also [check out the source code for this site][home].\n\nNow let's begin!\n\n- [Hello World](hello.md) - Start with a traditional Hello World program.\n\n- [Primitives](primitives.md) - Learn about signed integers, unsigned integers and other primitives.\n\n- [Custom Types](custom_types.md) - `struct` and `enum`.\n\n- [Variable Bindings](variable_bindings.md) - mutable bindings, scope, shadowing.\n\n- [Types](types.md) - Learn about changing and defining types.\n\n- [Conversion](conversion.md) - Convert between different types, such as strings, integers, and floats.\n\n- [Expressions](expression.md) - Learn about Expressions & how to use them.\n\n- [Flow of Control](flow_control.md) - `if`/`else`, `for`, and others.\n\n- [Functions](fn.md) - Learn about Methods, Closures and Higher Order Functions.\n\n- [Modules](mod.md) - Organize code using modules\n\n- [Crates](crates.md) - A crate is a compilation unit in Rust. Learn to create a library.\n\n- [Cargo](cargo.md) - Go through some basic features of the official Rust package management tool.\n\n- [Attributes](attribute.md) - An attribute is metadata applied to some module, crate or item.\n\n- [Generics](generics.md) - Learn about writing a function or data type which can work for multiple types of arguments.\n\n- [Scoping rules](scope.md) - Scopes play an important part in ownership, borrowing, and lifetimes.\n\n- [Traits](trait.md) - A trait is a collection of methods defined for an unknown type: `Self`\n\n- [Macros](macros.md) - Macros are a way of writing code that writes other code, which is known as metaprogramming.\n\n- [Error handling](error.md) - Learn Rust way of handling failures.\n\n- [Std library types](std.md) - Learn about some custom types provided by `std` library.\n\n- [Std misc](std_misc.md) - More custom types for file handling, threads.\n\n- [Testing](testing.md) - All sorts of testing in Rust.\n\n- [Unsafe Operations](unsafe.md) - Learn about entering a block of unsafe operations.\n\n- [Compatibility](compatibility.md) - Handling Rust's evolution and potential compatibility issues.\n\n- [Meta](meta.md) - Documentation, Benchmarking.\n\n[rust]: https://www.rust-lang.org/\n[install]: https://www.rust-lang.org/tools/install\n[std]: https://doc.rust-lang.org/std/\n[home]: https://github.com/rust-lang/rust-by-example\n"
  },
  {
    "path": "src/macros/designators.md",
    "content": "# Designators\n\nThe arguments of a macro are prefixed by a dollar sign `$` and type annotated\nwith a *designator*:\n\n```rust,editable\nmacro_rules! create_function {\n    // This macro takes an argument of designator `ident` and\n    // creates a function named `$func_name`.\n    // The `ident` designator is used for variable/function names.\n    ($func_name:ident) => {\n        fn $func_name() {\n            // The `stringify!` macro converts an `ident` into a string.\n            println!(\"You called {:?}()\",\n                     stringify!($func_name));\n        }\n    };\n}\n\n// Create functions named `foo` and `bar` with the above macro.\ncreate_function!(foo);\ncreate_function!(bar);\n\nmacro_rules! print_result {\n    // This macro takes an expression of type `expr` and prints\n    // it as a string along with its result.\n    // The `expr` designator is used for expressions.\n    ($expression:expr) => {\n        // `stringify!` will convert the expression *as it is* into a string.\n        println!(\"{:?} = {:?}\",\n                 stringify!($expression),\n                 $expression);\n    };\n}\n\nfn main() {\n    foo();\n    bar();\n\n    print_result!(1u32 + 1);\n\n    // Recall that blocks are expressions too!\n    print_result!({\n        let x = 1u32;\n\n        x * x + 2 * x - 1\n    });\n}\n```\n\nThese are some of the available designators:\n\n* `block`\n* `expr` is used for expressions\n* `ident` is used for variable/function names\n* `item`\n* `literal` is used for literal constants\n* `pat` (*pattern*)\n* `path`\n* `stmt` (*statement*)\n* `tt` (*token tree*)\n* `ty` (*type*)\n* `vis` (*visibility qualifier*)\n\nFor a complete list, see the [Rust Reference].\n\n[Rust Reference]: https://doc.rust-lang.org/reference/macros-by-example.html\n"
  },
  {
    "path": "src/macros/dry.md",
    "content": "# DRY (Don't Repeat Yourself)\n\nMacros allow writing DRY code by factoring out the common parts of functions\nand/or test suites. Here is an example that implements and tests the `+=`, `*=`\nand `-=` operators on `Vec<T>`:\n\n```rust,editable\nuse std::ops::{Add, Mul, Sub};\n\nmacro_rules! assert_equal_len {\n    // The `tt` (token tree) designator is used for\n    // operators and tokens.\n    ($a:expr, $b:expr, $func:ident, $op:tt) => {\n        assert!($a.len() == $b.len(),\n                \"{:?}: dimension mismatch: {:?} {:?} {:?}\",\n                stringify!($func),\n                ($a.len(),),\n                stringify!($op),\n                ($b.len(),));\n    };\n}\n\nmacro_rules! op {\n    ($func:ident, $bound:ident, $op:tt, $method:ident) => {\n        fn $func<T: $bound<T, Output=T> + Copy>(xs: &mut Vec<T>, ys: &Vec<T>) {\n            assert_equal_len!(xs, ys, $func, $op);\n\n            for (x, y) in xs.iter_mut().zip(ys.iter()) {\n                *x = $bound::$method(*x, *y);\n                // *x = x.$method(*y);\n            }\n        }\n    };\n}\n\n// Implement `add_assign`, `mul_assign`, and `sub_assign` functions.\nop!(add_assign, Add, +=, add);\nop!(mul_assign, Mul, *=, mul);\nop!(sub_assign, Sub, -=, sub);\n\nmod test {\n    use std::iter;\n    macro_rules! test {\n        ($func:ident, $x:expr, $y:expr, $z:expr) => {\n            #[test]\n            fn $func() {\n                for size in 0usize..10 {\n                    let mut x: Vec<_> = iter::repeat($x).take(size).collect();\n                    let y: Vec<_> = iter::repeat($y).take(size).collect();\n                    let z: Vec<_> = iter::repeat($z).take(size).collect();\n\n                    super::$func(&mut x, &y);\n\n                    assert_eq!(x, z);\n                }\n            }\n        };\n    }\n\n    // Test `add_assign`, `mul_assign`, and `sub_assign`.\n    test!(add_assign, 1u32, 2u32, 3u32);\n    test!(mul_assign, 2u32, 3u32, 6u32);\n    test!(sub_assign, 3u32, 2u32, 1u32);\n}\n```\n\n```shell\n$ rustc --test dry.rs && ./dry\nrunning 3 tests\ntest test::mul_assign ... ok\ntest test::add_assign ... ok\ntest test::sub_assign ... ok\n\ntest result: ok. 3 passed; 0 failed; 0 ignored; 0 measured\n```\n"
  },
  {
    "path": "src/macros/dsl.md",
    "content": "# Domain Specific Languages (DSLs)\n\nA DSL is a mini \"language\" embedded in a Rust macro. It is completely valid\nRust because the macro system expands into normal Rust constructs, but it looks\nlike a small language. This allows you to define concise or intuitive syntax for\nsome special functionality (within bounds).\n\nSuppose that I want to define a little calculator API. I would like to supply\nan expression and have the output printed to console.\n\n```rust,editable\nmacro_rules! calculate {\n    (eval $e:expr) => {\n        {\n            let val: usize = $e; // Force types to be unsigned integers\n            println!(\"{} = {}\", stringify!{$e}, val);\n        }\n    };\n}\n\nfn main() {\n    calculate! {\n        eval 1 + 2 // hehehe `eval` is _not_ a Rust keyword!\n    }\n\n    calculate! {\n        eval (1 + 2) * (3 / 4)\n    }\n}\n```\n\nOutput:\n\n```txt\n1 + 2 = 3\n(1 + 2) * (3 / 4) = 0\n```\n\nThis was a very simple example, but much more complex interfaces have been\ndeveloped, such as [`lazy_static`](https://crates.io/crates/lazy_static) or\n[`clap`](https://crates.io/crates/clap).\n\nAlso, note the two pairs of braces in the macro. The outer ones are\npart of the syntax of `macro_rules!`, in addition to `()` or `[]`.\n"
  },
  {
    "path": "src/macros/overload.md",
    "content": "# Overload\n\nMacros can be overloaded to accept different combinations of arguments.\nIn that regard, `macro_rules!` can work similarly to a match block:\n\n```rust,editable\n// `test!` will compare `$left` and `$right`\n// in different ways depending on how you invoke it:\nmacro_rules! test {\n    // Arguments don't need to be separated by a comma.\n    // Any template can be used!\n    ($left:expr; and $right:expr) => {\n        println!(\"{:?} and {:?} is {:?}\",\n                 stringify!($left),\n                 stringify!($right),\n                 $left && $right)\n    };\n    // ^ each arm must end with a semicolon.\n    ($left:expr; or $right:expr) => {\n        println!(\"{:?} or {:?} is {:?}\",\n                 stringify!($left),\n                 stringify!($right),\n                 $left || $right)\n    };\n}\n\nfn main() {\n    test!(1i32 + 1 == 2i32; and 2i32 * 2 == 4i32);\n    test!(true; or false);\n}\n```\n"
  },
  {
    "path": "src/macros/repeat.md",
    "content": "# Repeat\n\nMacros can use `+` in the argument list to indicate that an argument may\nrepeat at least once, or `*`, to indicate that the argument may repeat zero or\nmore times.\n\nIn the following example, surrounding the matcher with `$(...),+` will\nmatch one or more expression, separated by commas.\nAlso note that the semicolon is optional on the last case.\n\n```rust,editable\n// `find_min!` will calculate the minimum of any number of arguments.\nmacro_rules! find_min {\n    // Base case:\n    ($x:expr) => ($x);\n    // `$x` followed by at least one `$y,`\n    ($x:expr, $($y:expr),+) => (\n        // Call `find_min!` on the tail `$y`\n        std::cmp::min($x, find_min!($($y),+))\n    )\n}\n\nfn main() {\n    println!(\"{}\", find_min!(1));\n    println!(\"{}\", find_min!(1 + 2, 2));\n    println!(\"{}\", find_min!(5, 2 * 3, 4));\n}\n```\n"
  },
  {
    "path": "src/macros/syntax.md",
    "content": "# Syntax\n\nIn following subsections, we will show how to define macros in Rust.\nThere are three basic ideas:\n\n- [Patterns and Designators][designators]\n- [Overloading][overloading]\n- [Repetition][repetition]\n\n[designators]: designators.md\n[overloading]: overload.md\n[repetition]: repeat.md\n"
  },
  {
    "path": "src/macros/variadics.md",
    "content": "# Variadic Interfaces\n\nA _variadic_ interface takes an arbitrary number of arguments. For example,\n`println!` can take an arbitrary number of arguments, as determined by the\nformat string.\n\nWe can extend our `calculate!` macro from the previous section to be variadic:\n\n```rust,editable\nmacro_rules! calculate {\n    // The pattern for a single `eval`\n    (eval $e:expr) => {\n        {\n            let val: usize = $e; // Force types to be integers\n            println!(\"{} = {}\", stringify!{$e}, val);\n        }\n    };\n\n    // Decompose multiple `eval`s recursively\n    (eval $e:expr, $(eval $es:expr),+) => {{\n        calculate! { eval $e }\n        calculate! { $(eval $es),+ }\n    }};\n}\n\nfn main() {\n    calculate! { // Look ma! Variadic `calculate!`!\n        eval 1 + 2,\n        eval 3 + 4,\n        eval (2 * 3) + 1\n    }\n}\n```\n\nOutput:\n\n```txt\n1 + 2 = 3\n3 + 4 = 7\n(2 * 3) + 1 = 7\n```\n"
  },
  {
    "path": "src/macros.md",
    "content": "# `macro_rules!`\n\nRust provides a powerful macro system that allows metaprogramming. As you've\nseen in previous chapters, macros look like functions, except that their name\nends with a bang `!`, but instead of generating a function call, macros are\nexpanded into source code that gets compiled with the rest of the program.\nHowever, unlike macros in C and other languages, Rust macros are expanded into\nabstract syntax trees, rather than string preprocessing, so you don't get\nunexpected precedence bugs.\n\nMacros are created using the `macro_rules!` macro.\n\n```rust,editable\n// This is a simple macro named `say_hello`.\nmacro_rules! say_hello {\n    // `()` indicates that the macro takes no argument.\n    () => {\n        // The macro will expand into the contents of this block.\n        println!(\"Hello!\")\n    };\n}\n\nfn main() {\n    // This call will expand into `println!(\"Hello!\")`\n    say_hello!()\n}\n```\n\nSo why are macros useful?\n\n1. Don't repeat yourself. There are many cases where you may need similar\n   functionality in multiple places but with different types. Often, writing a\n   macro is a useful way to avoid repeating code. (More on this later)\n\n2. Domain-specific languages. Macros allow you to define special syntax for a\n   specific purpose. (More on this later)\n\n3. Variadic interfaces. Sometimes you want to define an interface that takes a\n   variable number of arguments. An example is `println!` which could take any\n   number of arguments, depending on the format string. (More on this later)\n"
  },
  {
    "path": "src/meta/doc.md",
    "content": "# Documentation\n\nUse `cargo doc` to build documentation in `target/doc`, `cargo doc --open`\nwill automatically open it in your web browser.\n\nUse `cargo test` to run all tests (including documentation tests), and `cargo\ntest --doc` to only run documentation tests.\n\nThese commands will appropriately invoke `rustdoc` (and `rustc`) as required.\n\n## Doc comments\n\nDoc comments are very useful for big projects that require documentation. When\nrunning `rustdoc`, these are the comments that get compiled into\ndocumentation. They are denoted by a `///`, and support [Markdown].\n\n````rust,editable,ignore\n#![crate_name = \"doc\"]\n\n/// A human being is represented here\npub struct Person {\n    /// A person must have a name, no matter how much Juliet may hate it\n    name: String,\n}\n\nimpl Person {\n    /// Creates a person with the given name.\n    ///\n    /// # Examples\n    ///\n    /// ```\n    /// // You can have rust code between fences inside the comments\n    /// // If you pass --test to `rustdoc`, it will even test it for you!\n    /// use doc::Person;\n    /// let person = Person::new(\"name\");\n    /// ```\n    pub fn new(name: &str) -> Person {\n        Person {\n            name: name.to_string(),\n        }\n    }\n\n    /// Gives a friendly hello!\n    ///\n    /// Says \"Hello, [name](Person::name)\" to the `Person` it is called on.\n    pub fn hello(&self) {\n        println!(\"Hello, {}!\", self.name);\n    }\n}\n\nfn main() {\n    let john = Person::new(\"John\");\n\n    john.hello();\n}\n````\n\nTo run the tests, first build the code as a library, then tell `rustdoc` where\nto find the library so it can link it into each doctest program:\n\n```shell\n$ rustc doc.rs --crate-type lib\n$ rustdoc --test --extern doc=\"libdoc.rlib\" doc.rs\n```\n\n## Doc attributes\n\nBelow are a few examples of the most common `#[doc]` attributes used with\n`rustdoc`.\n\n### `inline`\n\nUsed to inline docs, instead of linking out to separate page.\n\n```rust,ignore\n#[doc(inline)]\npub use bar::Bar;\n\n/// bar docs\npub mod bar {\n    /// the docs for Bar\n    pub struct Bar;\n}\n```\n\n### `no_inline`\n\nUsed to prevent linking out to separate page or anywhere.\n\n```rust,ignore\n// Example from libcore/prelude\n#[doc(no_inline)]\npub use crate::mem::drop;\n```\n\n### `hidden`\n\nUsing this tells `rustdoc` not to include this in documentation:\n\n```rust,editable,ignore\n// Example from the futures-rs library\n#[doc(hidden)]\npub use self::async_await::*;\n```\n\nFor documentation, `rustdoc` is widely used by the community. It's what is used\nto generate the [std library docs](https://doc.rust-lang.org/std/).\n\n### See also:\n\n- [The Rust Book: Making Useful Documentation Comments][book]\n- [The rustdoc Book][rustdoc-book]\n- [The Reference: Doc comments][ref-comments]\n- [RFC 1574: API Documentation Conventions][api-conv]\n- [RFC 1946: Relative links to other items from doc comments (intra-rustdoc links)][intra-links]\n- [Is there any documentation style guide for comments? (reddit)][reddit]\n\n[markdown]: https://en.wikipedia.org/wiki/Markdown\n[book]: https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments\n[ref-comments]: https://doc.rust-lang.org/stable/reference/comments.html#doc-comments\n[rustdoc-book]: https://doc.rust-lang.org/rustdoc/index.html\n[api-conv]: https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text\n[intra-links]: https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html\n[reddit]: https://www.reddit.com/r/rust/comments/ahb50s/is_there_any_documentation_style_guide_for/\n"
  },
  {
    "path": "src/meta/playground.md",
    "content": "# Playground\n\nThe [Rust Playground](https://play.rust-lang.org/) is a way to experiment with\nRust code through a web interface.\n\n## Using it with `mdbook`\n\nIn [`mdbook`][mdbook], you can make code examples playable and editable.\n\n```rust,editable\nfn main() {\n    println!(\"Hello World!\");\n}\n```\n\nThis allows the reader to both run your code sample, but also modify and tweak\nit. The key here is the adding of the word `editable` to your codefence block\nseparated by a comma.\n\n````markdown\n```rust,editable\n//...place your code here\n```\n````\n\nAdditionally, you can add `ignore` if you want `mdbook` to skip your code when\nit builds and tests.\n\n````markdown\n```rust,editable,ignore\n//...place your code here\n```\n````\n\n## Using it with docs\n\nYou may have noticed in some of the [official Rust docs][official-rust-docs] a\nbutton that says \"Run\", which opens the code sample up in a new tab in Rust\nPlayground. This feature is enabled if you use the `#[doc]` attribute called\n[`html_playground_url`][html-playground-url].\n\n```text\n#![doc(html_playground_url = \"https://play.rust-lang.org/\")]\n//! ```\n//! println!(\"Hello World\");\n//! ```\n```\n\n### See also:\n\n- [The Rust Playground][rust-playground]\n- [The Rust Playground On Github][rust-playground-github]\n- [The rustdoc Book][rustdoc-book]\n\n[rust-playground]: https://play.rust-lang.org/\n[rust-playground-github]: https://github.com/integer32llc/rust-playground/\n[mdbook]: https://github.com/rust-lang/mdBook\n[official-rust-docs]: https://doc.rust-lang.org/core/\n[rustdoc-book]: https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html\n[html-playground-url]: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#html_playground_url\n"
  },
  {
    "path": "src/meta.md",
    "content": "# Meta\n\nSome topics aren't exactly relevant to how you program runs but provide you\ntooling or infrastructure support which just makes things better for\neveryone. These topics include:\n\n- [Documentation][doc]: Generate library documentation for users via the included\n  `rustdoc`.\n- [Playground][playground]: Integrate the Rust Playground in your documentation.\n\n[doc]: meta/doc.md\n[playground]: meta/playground.md\n"
  },
  {
    "path": "src/mod/split.md",
    "content": "# File hierarchy\n\nModules can be mapped to a file/directory hierarchy. Let's break down the\n[visibility example][visibility] in files:\n\n```shell\n$ tree .\n.\n├── my\n│   ├── inaccessible.rs\n│   └── nested.rs\n├── my.rs\n└── split.rs\n```\n\nIn `split.rs`:\n\n```rust,ignore\n// This declaration will look for a file named `my.rs` and will\n// insert its contents inside a module named `my` under this scope\nmod my;\n\nfn function() {\n    println!(\"called `function()`\");\n}\n\nfn main() {\n    my::function();\n\n    function();\n\n    my::indirect_access();\n\n    my::nested::function();\n}\n\n```\n\nIn `my.rs`:\n\n```rust,ignore\n// Similarly `mod inaccessible` and `mod nested` will locate the `nested.rs`\n// and `inaccessible.rs` files and insert them here under their respective\n// modules\nmod inaccessible;\npub mod nested;\n\npub fn function() {\n    println!(\"called `my::function()`\");\n}\n\nfn private_function() {\n    println!(\"called `my::private_function()`\");\n}\n\npub fn indirect_access() {\n    print!(\"called `my::indirect_access()`, that\\n> \");\n\n    private_function();\n}\n```\n\nIn `my/nested.rs`:\n\n```rust,ignore\npub fn function() {\n    println!(\"called `my::nested::function()`\");\n}\n\n#[allow(dead_code)]\nfn private_function() {\n    println!(\"called `my::nested::private_function()`\");\n}\n```\n\nIn `my/inaccessible.rs`:\n\n```rust,ignore\n#[allow(dead_code)]\npub fn public_function() {\n    println!(\"called `my::inaccessible::public_function()`\");\n}\n```\n\nLet's check that things still work as before:\n\n```shell\n$ rustc split.rs && ./split\ncalled `my::function()`\ncalled `function()`\ncalled `my::indirect_access()`, that\n> called `my::private_function()`\ncalled `my::nested::function()`\n```\n\n[visibility]: visibility.md\n"
  },
  {
    "path": "src/mod/struct_visibility.md",
    "content": "# Struct visibility\n\nStructs have an extra level of visibility with their fields. The visibility\ndefaults to private, and can be overridden with the `pub` modifier. This\nvisibility only matters when a struct is accessed from outside the module\nwhere it is defined, and has the goal of hiding information (encapsulation).\n\n```rust,editable\nmod my {\n    // A public struct with a public field of generic type `T`\n    pub struct OpenBox<T> {\n        pub contents: T,\n    }\n\n    // A public struct with a private field of generic type `T`\n    pub struct ClosedBox<T> {\n        contents: T,\n    }\n\n    impl<T> ClosedBox<T> {\n        // A public constructor method\n        pub fn new(contents: T) -> ClosedBox<T> {\n            ClosedBox {\n                contents: contents,\n            }\n        }\n    }\n}\n\nfn main() {\n    // Public structs with public fields can be constructed as usual\n    let open_box = my::OpenBox { contents: \"public information\" };\n\n    // and their fields can be normally accessed.\n    println!(\"The open box contains: {}\", open_box.contents);\n\n    // Public structs with private fields cannot be constructed using field names.\n    // Error! `ClosedBox` has private fields\n    //let closed_box = my::ClosedBox { contents: \"classified information\" };\n    // TODO ^ Try uncommenting this line\n\n    // However, structs with private fields can be created using\n    // public constructors\n    let _closed_box = my::ClosedBox::new(\"classified information\");\n\n    // and the private fields of a public struct cannot be accessed.\n    // Error! The `contents` field is private\n    //println!(\"The closed box contains: {}\", _closed_box.contents);\n    // TODO ^ Try uncommenting this line\n}\n```\n\n### See also:\n\n[generics][generics] and [methods][methods]\n\n[generics]: ../generics.md\n[methods]: ../fn/methods.md\n"
  },
  {
    "path": "src/mod/super.md",
    "content": "# `super` and `self`\n\nThe `super` and `self` keywords can be used in the path to remove ambiguity\nwhen accessing items and to prevent unnecessary hardcoding of paths.\n\n```rust,editable\nfn function() {\n    println!(\"called `function()`\");\n}\n\nmod cool {\n    pub fn function() {\n        println!(\"called `cool::function()`\");\n    }\n}\n\nmod my {\n    fn function() {\n        println!(\"called `my::function()`\");\n    }\n\n    mod cool {\n        pub fn function() {\n            println!(\"called `my::cool::function()`\");\n        }\n    }\n\n    pub fn indirect_call() {\n        // Let's access all the functions named `function` from this scope!\n        print!(\"called `my::indirect_call()`, that\\n> \");\n\n        // The `self` keyword refers to the current module scope - in this case `my`.\n        // Calling `self::function()` and calling `function()` directly both give\n        // the same result, because they refer to the same function.\n        self::function();\n        function();\n\n        // We can also use `self` to access another module inside `my`:\n        self::cool::function();\n\n        // The `super` keyword refers to the parent scope (outside the `my` module).\n        super::function();\n\n        // This will bind to the `cool::function` in the *crate* scope.\n        // In this case the crate scope is the outermost scope.\n        {\n            use crate::cool::function as root_function;\n            root_function();\n        }\n    }\n}\n\nfn main() {\n    my::indirect_call();\n}\n```\n"
  },
  {
    "path": "src/mod/use.md",
    "content": "# The `use` declaration\n\nThe `use` declaration can be used to bind a full path to a new name, for easier\naccess. It is often used like this:\n\n```rust,editable,ignore\nuse crate::deeply::nested::{\n    my_first_function,\n    my_second_function,\n    AndATraitType\n};\n\nfn main() {\n    my_first_function();\n}\n```\n\nYou can use the `as` keyword to bind imports to a different name:\n\n```rust,editable\n// Bind the `deeply::nested::function` path to `other_function`.\nuse deeply::nested::function as other_function;\n\nfn function() {\n    println!(\"called `function()`\");\n}\n\nmod deeply {\n    pub mod nested {\n        pub fn function() {\n            println!(\"called `deeply::nested::function()`\");\n        }\n    }\n}\n\nfn main() {\n    // Easier access to `deeply::nested::function`\n    other_function();\n\n    println!(\"Entering block\");\n    {\n        // This is equivalent to `use deeply::nested::function as function`.\n        // This `function()` will shadow the outer one.\n        use crate::deeply::nested::function;\n\n        // `use` bindings have a local scope. In this case, the\n        // shadowing of `function()` is only in this block.\n        function();\n\n        println!(\"Leaving block\");\n    }\n\n    function();\n}\n```\n"
  },
  {
    "path": "src/mod/visibility.md",
    "content": "# Visibility\n\nBy default, the items in a module have private visibility, but this can be\noverridden with the `pub` modifier. Only the public items of a module can be\naccessed from outside the module scope.\n\n```rust,editable\n// A module named `my_mod`\nmod my_mod {\n    // Items in modules default to private visibility.\n    fn private_function() {\n        println!(\"called `my_mod::private_function()`\");\n    }\n\n    // Use the `pub` modifier to override default visibility.\n    pub fn function() {\n        println!(\"called `my_mod::function()`\");\n    }\n\n    // Items can access other items in the same module,\n    // even when private.\n    pub fn indirect_access() {\n        print!(\"called `my_mod::indirect_access()`, that\\n> \");\n        private_function();\n    }\n\n    // Modules can also be nested\n    pub mod nested {\n        pub fn function() {\n            println!(\"called `my_mod::nested::function()`\");\n        }\n\n        #[allow(dead_code)]\n        fn private_function() {\n            println!(\"called `my_mod::nested::private_function()`\");\n        }\n\n        // Functions declared using `pub(in path)` syntax are only visible\n        // within the given path. `path` must be a parent or ancestor module\n        pub(in crate::my_mod) fn public_function_in_my_mod() {\n            print!(\"called `my_mod::nested::public_function_in_my_mod()`, that\\n> \");\n            public_function_in_nested();\n        }\n\n        // Functions declared using `pub(self)` syntax are only visible within\n        // the current module, which is the same as leaving them private\n        pub(self) fn public_function_in_nested() {\n            println!(\"called `my_mod::nested::public_function_in_nested()`\");\n        }\n\n        // Functions declared using `pub(super)` syntax are only visible within\n        // the parent module\n        pub(super) fn public_function_in_super_mod() {\n            println!(\"called `my_mod::nested::public_function_in_super_mod()`\");\n        }\n    }\n\n    pub fn call_public_function_in_my_mod() {\n        print!(\"called `my_mod::call_public_function_in_my_mod()`, that\\n> \");\n        nested::public_function_in_my_mod();\n        print!(\"> \");\n        nested::public_function_in_super_mod();\n    }\n\n    // pub(crate) makes functions visible only within the current crate\n    pub(crate) fn public_function_in_crate() {\n        println!(\"called `my_mod::public_function_in_crate()`\");\n    }\n\n    // Nested modules follow the same rules for visibility\n    mod private_nested {\n        #[allow(dead_code)]\n        pub fn function() {\n            println!(\"called `my_mod::private_nested::function()`\");\n        }\n\n        // Private parent items will still restrict the visibility of a child item,\n        // even if it is declared as visible within a bigger scope.\n        #[allow(dead_code)]\n        pub(crate) fn restricted_function() {\n            println!(\"called `my_mod::private_nested::restricted_function()`\");\n        }\n    }\n}\n\nfn function() {\n    println!(\"called `function()`\");\n}\n\nfn main() {\n    // Modules allow disambiguation between items that have the same name.\n    function();\n    my_mod::function();\n\n    // Public items, including those inside nested modules, can be\n    // accessed from outside the parent module.\n    my_mod::indirect_access();\n    my_mod::nested::function();\n    my_mod::call_public_function_in_my_mod();\n\n    // pub(crate) items can be called from anywhere in the same crate\n    my_mod::public_function_in_crate();\n\n    // pub(in path) items can only be called from within the module specified\n    // Error! function `public_function_in_my_mod` is private\n    //my_mod::nested::public_function_in_my_mod();\n    // TODO ^ Try uncommenting this line\n\n    // Private items of a module cannot be directly accessed, even if\n    // nested in a public module:\n\n    // Error! `private_function` is private\n    //my_mod::private_function();\n    // TODO ^ Try uncommenting this line\n\n    // Error! `private_function` is private\n    //my_mod::nested::private_function();\n    // TODO ^ Try uncommenting this line\n\n    // Error! `private_nested` is a private module\n    //my_mod::private_nested::function();\n    // TODO ^ Try uncommenting this line\n\n    // Error! `private_nested` is a private module\n    //my_mod::private_nested::restricted_function();\n    // TODO ^ Try uncommenting this line\n}\n```\n"
  },
  {
    "path": "src/mod.md",
    "content": "# Modules\n\nRust provides a powerful module system that can be used to hierarchically split\ncode in logical units (modules), and manage visibility (public/private) between\nthem.\n\nA module is a collection of items: functions, structs, traits, `impl` blocks,\nand even other modules.\n"
  },
  {
    "path": "src/primitives/array.md",
    "content": "# Arrays and Slices\n\nAn array is a collection of objects of the same type `T`, stored in contiguous\nmemory. Arrays are created using brackets `[]`, and their length, which is known\nat compile time, is part of their type signature `[T; length]`.\n\nSlices are similar to arrays, but their length is not known at compile time.\nInstead, a slice is a two-word object; the first word is a pointer to the data,\nthe second word is the length of the slice. The word size is the same as usize,\ndetermined by the processor architecture, e.g. 64 bits on an x86-64. Slices can\nbe used to borrow a section of an array and have the type signature `&[T]`.\n\n```rust,editable,ignore,mdbook-runnable\nuse std::mem;\n\n// This function borrows a slice.\nfn analyze_slice(slice: &[i32]) {\n    println!(\"First element of the slice: {}\", slice[0]);\n    println!(\"The slice has {} elements\", slice.len());\n}\n\nfn main() {\n    // Fixed-size array (type signature is superfluous).\n    let xs: [i32; 5] = [1, 2, 3, 4, 5];\n\n    // All elements can be initialized to the same value.\n    let ys: [i32; 500] = [0; 500];\n\n    // Indexing starts at 0.\n    println!(\"First element of the array: {}\", xs[0]);\n    println!(\"Second element of the array: {}\", xs[1]);\n\n    // `len` returns the count of elements in the array.\n    println!(\"Number of elements in array: {}\", xs.len());\n\n    // Arrays are stack allocated.\n    println!(\"Array occupies {} bytes\", mem::size_of_val(&xs));\n\n    // Arrays can be automatically borrowed as slices.\n    println!(\"Borrow the whole array as a slice.\");\n    analyze_slice(&xs);\n\n    // Slices can point to a section of an array.\n    // They are of the form [starting_index..ending_index].\n    // `starting_index` is the first position in the slice.\n    // `ending_index` is one more than the last position in the slice.\n    println!(\"Borrow a section of the array as a slice.\");\n    analyze_slice(&ys[1 .. 4]);\n\n    // Example of empty slice `&[]`:\n    let empty_array: [u32; 0] = [];\n    assert_eq!(&empty_array, &[]);\n    assert_eq!(&empty_array, &[][..]); // Same but more verbose\n\n    // Arrays can be safely accessed using `.get`, which returns an\n    // `Option`. This can be matched as shown below, or used with\n    // `.expect()` if you would like the program to exit with a nice\n    // message instead of happily continue.\n    for i in 0..xs.len() + 1 { // Oops, one element too far!\n        match xs.get(i) {\n            Some(xval) => println!(\"{}: {}\", i, xval),\n            None => println!(\"Slow down! {} is too far!\", i),\n        }\n    }\n\n    // Out of bound indexing on array with constant value causes compile time error.\n    //println!(\"{}\", xs[5]);\n    // Out of bound indexing on slice causes runtime error.\n    //println!(\"{}\", xs[..][5]);\n}\n```\n"
  },
  {
    "path": "src/primitives/literals.md",
    "content": "# Literals and operators\n\nIntegers `1`, floats `1.2`, characters `'a'`, strings `\"abc\"`, booleans `true`\nand the unit type `()` can be expressed using literals.\n\nIntegers can, alternatively, be expressed using hexadecimal, octal or binary\nnotation using these prefixes respectively: `0x`, `0o` or `0b`.\n\nUnderscores can be inserted in numeric literals to improve readability, e.g.\n`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.\n\nRust also supports scientific [E-notation][enote], e.g. `1e6`, `7.6e-4`. The\nassociated type is `f64`.\n\nWe need to tell the compiler the type of the literals we use. For now,\nwe'll use the `u32` suffix to indicate that the literal is an unsigned 32-bit\ninteger, and the `i32` suffix to indicate that it's a signed 32-bit integer.\n\nThe operators available and their precedence [in Rust][rust op-prec] are similar\nto other [C-like languages][op-prec].\n\n```rust,editable\nfn main() {\n    // Integer addition\n    println!(\"1 + 2 = {}\", 1u32 + 2);\n\n    // Integer subtraction\n    println!(\"1 - 2 = {}\", 1i32 - 2);\n    // TODO ^ Try changing `1i32` to `1u32` to see why the type is important\n\n    // Scientific notation\n    println!(\"1e4 is {}, -2.5e-3 is {}\", 1e4, -2.5e-3);\n\n    // Short-circuiting boolean logic\n    println!(\"true AND false is {}\", true && false);\n    println!(\"true OR false is {}\", true || false);\n    println!(\"NOT true is {}\", !true);\n\n    // Bitwise operations\n    println!(\"0011 AND 0101 is {:04b}\", 0b0011u32 & 0b0101);\n    println!(\"0011 OR 0101 is {:04b}\", 0b0011u32 | 0b0101);\n    println!(\"0011 XOR 0101 is {:04b}\", 0b0011u32 ^ 0b0101);\n    println!(\"1 << 5 is {}\", 1u32 << 5);\n    println!(\"0x80 >> 2 is 0x{:x}\", 0x80u32 >> 2);\n\n    // Use underscores to improve readability!\n    println!(\"One million is written as {}\", 1_000_000u32);\n}\n```\n\n[enote]: https://en.wikipedia.org/wiki/Scientific_notation#E_notation\n[rust op-prec]: https://doc.rust-lang.org/reference/expressions.html#expression-precedence\n[op-prec]: https://en.wikipedia.org/wiki/Operator_precedence#Programming_languages\n"
  },
  {
    "path": "src/primitives/tuples.md",
    "content": "# Tuples\n\nA tuple is a collection of values of different types. Tuples are constructed\nusing parentheses `()`, and each tuple itself is a value with type signature\n`(T1, T2, ...)`, where `T1`, `T2` are the types of its members. Functions can\nuse tuples to return multiple values, as tuples can hold any number of values.\n\n```rust,editable\n// Tuples can be used as function arguments and as return values.\nfn reverse(pair: (i32, bool)) -> (bool, i32) {\n    // `let` can be used to bind the members of a tuple to variables.\n    let (int_param, bool_param) = pair;\n\n    (bool_param, int_param)\n}\n\n// The following struct is for the activity.\n#[derive(Debug)]\nstruct Matrix(f32, f32, f32, f32);\n\nfn main() {\n    // A tuple with a bunch of different types.\n    let long_tuple = (1u8, 2u16, 3u32, 4u64,\n                      -1i8, -2i16, -3i32, -4i64,\n                      0.1f32, 0.2f64,\n                      'a', true);\n\n    // Values can be extracted from the tuple using tuple indexing.\n    println!(\"Long tuple first value: {}\", long_tuple.0);\n    println!(\"Long tuple second value: {}\", long_tuple.1);\n\n    // Tuples can be tuple members.\n    let tuple_of_tuples = ((1u8, 2u16, 2u32), (4u64, -1i8), -2i16);\n\n    // Tuples are printable.\n    println!(\"tuple of tuples: {:?}\", tuple_of_tuples);\n\n    // But long Tuples (more than 12 elements) cannot be printed.\n    //let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);\n    //println!(\"Too long tuple: {:?}\", too_long_tuple);\n    // TODO ^ Uncomment the above 2 lines to see the compiler error\n\n    let pair = (1, true);\n    println!(\"Pair is {:?}\", pair);\n\n    println!(\"The reversed pair is {:?}\", reverse(pair));\n\n    // To create one element tuples, the comma is required to tell them apart\n    // from a literal surrounded by parentheses.\n    println!(\"One element tuple: {:?}\", (5u32,));\n    println!(\"Just an integer: {:?}\", (5u32));\n\n    // Tuples can be destructured to create bindings.\n    let tuple = (1, \"hello\", 4.5, true);\n\n    let (a, b, c, d) = tuple;\n    println!(\"{:?}, {:?}, {:?}, {:?}\", a, b, c, d);\n\n    let matrix = Matrix(1.1, 1.2, 2.1, 2.2);\n    println!(\"{:?}\", matrix);\n}\n```\n\n### Activity\n\n1. *Recap*: Add the `fmt::Display` trait to the `Matrix` struct in the above\n   example, so that if you switch from printing the debug format `{:?}` to the\n   display format `{}`, you see the following output:\n\n   ```text\n   ( 1.1 1.2 )\n   ( 2.1 2.2 )\n   ```\n\n   You may want to refer back to the example for [print display][print_display].\n2. Add a `transpose` function using the `reverse` function as a template, which\n   accepts a matrix as an argument, and returns a matrix in which two elements\n   have been swapped. For example:\n\n   ```rust,ignore\n   println!(\"Matrix:\\n{}\", matrix);\n   println!(\"Transpose:\\n{}\", transpose(matrix));\n   ```\n\n   Results in the output:\n\n   ```text\n   Matrix:\n   ( 1.1 1.2 )\n   ( 2.1 2.2 )\n   Transpose:\n   ( 1.1 2.1 )\n   ( 1.2 2.2 )\n   ```\n\n[print_display]: ../hello/print/print_display.md\n"
  },
  {
    "path": "src/primitives.md",
    "content": "# Primitives\n\nRust provides access to a wide variety of `primitives`. A sample includes:\n\n### Scalar Types\n\n* Signed integers: `i8`, `i16`, `i32`, `i64`, `i128` and `isize` (pointer size)\n* Unsigned integers: `u8`, `u16`, `u32`, `u64`, `u128` and `usize` (pointer\n  size)\n* Floating point: `f32`, `f64`\n* `char` Unicode scalar values like `'a'`, `'α'` and `'∞'` (4 bytes each)\n* `bool` either `true` or `false`\n* The unit type `()`, whose only possible value is an empty tuple: `()`\n\nDespite the value of a unit type being a tuple, it is not considered a compound\ntype because it does not contain multiple values.\n\n### Compound Types\n\n* Arrays like `[1, 2, 3]`\n* Tuples like `(1, true)`\n\nVariables can always be *type annotated*. Numbers may additionally be annotated\nvia a *suffix* or *by default*. Integers default to `i32` and floats to `f64`.\nNote that Rust can also infer types from context.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    // Variables can be type annotated.\n    let logical: bool = true;\n\n    let a_float: f64 = 1.0;  // Regular annotation\n    let an_integer   = 5i32; // Suffix annotation\n\n    // Or a default will be used.\n    let default_float   = 3.0; // `f64`\n    let default_integer = 7;   // `i32`\n\n    // A type can also be inferred from context.\n    let mut inferred_type = 12; // Type i64 is inferred from another line.\n    inferred_type = 4294967296i64;\n\n    // A mutable variable's value can be changed.\n    let mut mutable = 12; // Mutable `i32`\n    mutable = 21;\n\n    // Error! The type of a variable can't be changed.\n    mutable = true;\n\n    // Variables can be overwritten with shadowing.\n    let mutable = true;\n\n    /* Compound types - Array and Tuple */\n\n    // Array signature consists of Type T and length as [T; length].\n    let my_array: [i32; 5] = [1, 2, 3, 4, 5];\n\n    // Tuple is a collection of values of different types\n    // and is constructed using parentheses ().\n    let my_tuple = (5u32, 1u8, true, -5.04f32);\n}\n```\n\n### See also:\n\n[the `std` library][std], [`mut`][mut], [`inference`][inference], and\n[`shadowing`][shadowing]\n\n[std]: https://doc.rust-lang.org/std/\n[mut]: variable_bindings/mut.md\n[inference]: types/inference.md\n[shadowing]: variable_bindings/scope.md\n"
  },
  {
    "path": "src/scope/borrow/alias.md",
    "content": "# Aliasing\n\nData can be immutably borrowed any number of times, but while immutably\nborrowed, the original data can't be mutably borrowed. On the other hand, only\n*one* mutable borrow is allowed at a time. The original data can be borrowed\nagain only *after* the mutable reference has been used for the last time.\n\n```rust,editable\nstruct Point { x: i32, y: i32, z: i32 }\n\nfn main() {\n    let mut point = Point { x: 0, y: 0, z: 0 };\n\n    let borrowed_point = &point;\n    let another_borrow = &point;\n\n    // Data can be accessed via the references and the original owner\n    println!(\"Point has coordinates: ({}, {}, {})\",\n                borrowed_point.x, another_borrow.y, point.z);\n\n    // Error! Can't borrow `point` as mutable because it's currently\n    // borrowed as immutable.\n    // let mutable_borrow = &mut point;\n    // TODO ^ Try uncommenting this line\n\n    // The borrowed values are used again here\n    println!(\"Point has coordinates: ({}, {}, {})\",\n                borrowed_point.x, another_borrow.y, point.z);\n\n    // The immutable references are no longer used for the rest of the code so\n    // it is possible to reborrow with a mutable reference.\n    let mutable_borrow = &mut point;\n\n    // Change data via mutable reference\n    mutable_borrow.x = 5;\n    mutable_borrow.y = 2;\n    mutable_borrow.z = 1;\n\n    // Error! Can't borrow `point` as immutable because it's currently\n    // borrowed as mutable.\n    // let y = &point.y;\n    // TODO ^ Try uncommenting this line\n\n    // Error! Can't print because `println!` takes an immutable reference.\n    // println!(\"Point Z coordinate is {}\", point.z);\n    // TODO ^ Try uncommenting this line\n\n    // Ok! Mutable references can be passed as immutable to `println!`\n    println!(\"Point has coordinates: ({}, {}, {})\",\n                mutable_borrow.x, mutable_borrow.y, mutable_borrow.z);\n\n    // The mutable reference is no longer used for the rest of the code so it\n    // is possible to reborrow\n    let new_borrowed_point = &point;\n    println!(\"Point now has coordinates: ({}, {}, {})\",\n             new_borrowed_point.x, new_borrowed_point.y, new_borrowed_point.z);\n}\n```\n"
  },
  {
    "path": "src/scope/borrow/mut.md",
    "content": "# Mutability\n\nMutable data can be mutably borrowed using `&mut T`. This is called\na *mutable reference* and gives read/write access to the borrower.\nIn contrast, `&T` borrows the data via an immutable reference, and\nthe borrower can read the data but not modify it:\n\n```rust,editable,ignore,mdbook-runnable\n#[allow(dead_code)]\n#[derive(Clone, Copy)]\nstruct Book {\n    // `&'static str` is a reference to a string allocated in read only memory\n    author: &'static str,\n    title: &'static str,\n    year: u32,\n}\n\n// This function takes a reference to a book\nfn borrow_book(book: &Book) {\n    println!(\"I immutably borrowed {} - {} edition\", book.title, book.year);\n}\n\n// This function takes a reference to a mutable book and changes `year` to 2014\nfn new_edition(book: &mut Book) {\n    book.year = 2014;\n    println!(\"I mutably borrowed {} - {} edition\", book.title, book.year);\n}\n\nfn main() {\n    // Create an immutable Book named `immutabook`\n    let immutabook = Book {\n        // string literals have type `&'static str`\n        author: \"Douglas Hofstadter\",\n        title: \"Gödel, Escher, Bach\",\n        year: 1979,\n    };\n\n    // Create a mutable copy of `immutabook` and call it `mutabook`\n    let mut mutabook = immutabook;\n\n    // Immutably borrow an immutable object\n    borrow_book(&immutabook);\n\n    // Immutably borrow a mutable object\n    borrow_book(&mutabook);\n\n    // Borrow a mutable object as mutable\n    new_edition(&mut mutabook);\n\n    // Error! Cannot borrow an immutable object as mutable\n    new_edition(&mut immutabook);\n    // FIXME ^ Comment out this line\n}\n```\n\n### See also:\n\n[`static`][static]\n\n[static]: ../lifetime/static_lifetime.md\n"
  },
  {
    "path": "src/scope/borrow/ref.md",
    "content": "# The ref pattern\n\nWhen doing pattern matching or destructuring via the `let` binding, the `ref`\nkeyword can be used to take references to the fields of a struct/tuple. The\nexample below shows a few instances where this can be useful:\n\n```rust,editable\n#[derive(Clone, Copy)]\nstruct Point { x: i32, y: i32 }\n\nfn main() {\n    let c = 'Q';\n\n    // A `ref` borrow on the left side of an assignment is equivalent to\n    // an `&` borrow on the right side.\n    let ref ref_c1 = c;\n    let ref_c2 = &c;\n\n    println!(\"ref_c1 equals ref_c2: {}\", *ref_c1 == *ref_c2);\n\n    let point = Point { x: 0, y: 0 };\n\n    // `ref` is also valid when destructuring a struct.\n    let _copy_of_x = {\n        // `ref_to_x` is a reference to the `x` field of `point`.\n        let Point { x: ref ref_to_x, y: _ } = point;\n\n        // Return a copy of the `x` field of `point`.\n        *ref_to_x\n    };\n\n    // A mutable copy of `point`\n    let mut mutable_point = point;\n\n    {\n        // `ref` can be paired with `mut` to take mutable references.\n        let Point { x: _, y: ref mut mut_ref_to_y } = mutable_point;\n\n        // Mutate the `y` field of `mutable_point` via a mutable reference.\n        *mut_ref_to_y = 1;\n    }\n\n    println!(\"point is ({}, {})\", point.x, point.y);\n    println!(\"mutable_point is ({}, {})\", mutable_point.x, mutable_point.y);\n\n    // A mutable tuple that includes a pointer\n    let mut mutable_tuple = (Box::new(5u32), 3u32);\n\n    {\n        // Destructure `mutable_tuple` to change the value of `last`.\n        let (_, ref mut last) = mutable_tuple;\n        *last = 2u32;\n    }\n\n    println!(\"tuple is {:?}\", mutable_tuple);\n}\n```\n"
  },
  {
    "path": "src/scope/borrow.md",
    "content": "# Borrowing\n\nMost of the time, we'd like to access data without taking ownership over\nit. To accomplish this, Rust uses a *borrowing* mechanism. Instead of\npassing objects by value (`T`), objects can be passed by reference (`&T`).\n\nThe compiler statically guarantees (via its borrow checker) that references\n*always* point to valid objects. That is, while references to an object\nexist, the object cannot be destroyed.\n\n```rust,editable,ignore,mdbook-runnable\n// This function takes ownership of a box and destroys it\nfn eat_box_i32(boxed_i32: Box<i32>) {\n    println!(\"Destroying box that contains {}\", boxed_i32);\n}\n\n// This function borrows an i32\nfn borrow_i32(borrowed_i32: &i32) {\n    println!(\"This int is: {}\", borrowed_i32);\n}\n\nfn main() {\n    // Create a boxed i32 in the heap, and an i32 on the stack\n    // Remember: numbers can have arbitrary underscores added for readability\n    // 5_i32 is the same as 5i32\n    let boxed_i32 = Box::new(5_i32);\n    let stacked_i32 = 6_i32;\n\n    // Borrow the contents of the box. Ownership is not taken,\n    // so the contents can be borrowed again.\n    borrow_i32(&boxed_i32);\n    borrow_i32(&stacked_i32);\n\n    {\n        // Take a reference to the data contained inside the box\n        let _ref_to_i32: &i32 = &boxed_i32;\n\n        // Error!\n        // Can't destroy `boxed_i32` while the inner value is borrowed later in scope.\n        eat_box_i32(boxed_i32);\n        // FIXME ^ Comment out this line\n\n        // Attempt to borrow `_ref_to_i32` after inner value is destroyed\n        borrow_i32(_ref_to_i32);\n        // `_ref_to_i32` goes out of scope and is no longer borrowed.\n    }\n\n    // `boxed_i32` can now give up ownership to `eat_box_i32` and be destroyed\n    eat_box_i32(boxed_i32);\n}\n```\n"
  },
  {
    "path": "src/scope/lifetime/elision.md",
    "content": "# Elision\n\nSome lifetime patterns are overwhelmingly common and so the borrow checker\nwill allow you to omit them to save typing and to improve readability.\nThis is known as elision. Elision exists in Rust solely because these patterns\nare common.\n\nThe following code shows a few examples of elision. For a more comprehensive\ndescription of elision, see [lifetime elision][elision] in the book.\n\n```rust,editable\n// `elided_input` and `annotated_input` essentially have identical signatures\n// because the lifetime of `elided_input` is inferred by the compiler:\nfn elided_input(x: &i32) {\n    println!(\"`elided_input`: {}\", x);\n}\n\nfn annotated_input<'a>(x: &'a i32) {\n    println!(\"`annotated_input`: {}\", x);\n}\n\n// Similarly, `elided_pass` and `annotated_pass` have identical signatures\n// because the lifetime is added implicitly to `elided_pass`:\nfn elided_pass(x: &i32) -> &i32 { x }\n\nfn annotated_pass<'a>(x: &'a i32) -> &'a i32 { x }\n\nfn main() {\n    let x = 3;\n\n    elided_input(&x);\n    annotated_input(&x);\n\n    println!(\"`elided_pass`: {}\", elided_pass(&x));\n    println!(\"`annotated_pass`: {}\", annotated_pass(&x));\n}\n```\n\n### See also:\n\n[elision][elision]\n\n[elision]: https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#lifetime-elision\n"
  },
  {
    "path": "src/scope/lifetime/explicit.md",
    "content": "# Explicit annotation\n\nThe borrow checker uses explicit lifetime annotations to determine\nhow long references should be valid. In cases where lifetimes are not\nelided[^1], Rust requires explicit annotations to determine what the\nlifetime of a reference should be. The syntax for explicitly annotating\na lifetime uses an apostrophe character as follows:\n\n```rust,ignore\nfoo<'a>\n// `foo` has a lifetime parameter `'a`\n```\n\nSimilar to [closures][anonymity], using lifetimes requires generics.\nAdditionally, this lifetime syntax indicates that the lifetime of `foo`\nmay not exceed that of `'a`. Explicit annotation of a type has the form\n`&'a T` where `'a` has already been introduced.\n\nIn cases with multiple lifetimes, the syntax is similar:\n\n```rust,ignore\nfoo<'a, 'b>\n// `foo` has lifetime parameters `'a` and `'b`\n```\n\nIn this case, the lifetime of `foo` cannot exceed that of either `'a` *or* `'b`.\n\nSee the following example for explicit lifetime annotation in use:\n\n```rust,editable,ignore,mdbook-runnable\n// `print_refs` takes two references to `i32` which have different\n// lifetimes `'a` and `'b`. These two lifetimes must both be at\n// least as long as the function `print_refs`.\nfn print_refs<'a, 'b>(x: &'a i32, y: &'b i32) {\n    println!(\"x is {} and y is {}\", x, y);\n}\n\n// A function which takes no arguments, but has a lifetime parameter `'a`.\nfn failed_borrow<'a>() {\n    let _x = 12;\n\n    // ERROR: `_x` does not live long enough\n    let _y: &'a i32 = &_x;\n    // Attempting to use the lifetime `'a` as an explicit type annotation\n    // inside the function will fail because the lifetime of `&_x` is shorter\n    // than that of `_y`. A short lifetime cannot be coerced into a longer one.\n}\n\nfn main() {\n    // Create variables to be borrowed below.\n    let (four, nine) = (4, 9);\n\n    // Borrows (`&`) of both variables are passed into the function.\n    print_refs(&four, &nine);\n    // Any input which is borrowed must outlive the borrower.\n    // In other words, the lifetime of `four` and `nine` must\n    // be longer than that of `print_refs`.\n\n    failed_borrow();\n    // `failed_borrow` contains no references to force `'a` to be\n    // longer than the lifetime of the function, but `'a` is longer.\n    // Because the lifetime is never constrained, it defaults to `'static`.\n}\n```\n\n[^1]: [elision] implicitly annotates lifetimes and so is different.\n\n### See also:\n\n[generics][generics] and [closures][closures]\n\n[anonymity]: ../../fn/closures/anonymity.md\n[closures]: ../../fn/closures.md\n[elision]: elision.md\n[generics]: ../../generics.md\n"
  },
  {
    "path": "src/scope/lifetime/fn.md",
    "content": "# Functions\n\nIgnoring [elision], function signatures with lifetimes have a few constraints:\n\n* any reference *must* have an annotated lifetime.\n* any reference being returned *must* have the same lifetime as an input or\nbe `static`.\n\nAdditionally, note that returning references without input is banned if it\nwould result in returning references to invalid data. The following example shows\noff some valid forms of functions with lifetimes:\n\n```rust,editable\n// One input reference with lifetime `'a` which must live\n// at least as long as the function.\nfn print_one<'a>(x: &'a i32) {\n    println!(\"`print_one`: x is {}\", x);\n}\n\n// Mutable references are possible with lifetimes as well.\nfn add_one<'a>(x: &'a mut i32) {\n    *x += 1;\n}\n\n// Multiple elements with different lifetimes. In this case, it\n// would be fine for both to have the same lifetime `'a`, but\n// in more complex cases, different lifetimes may be required.\nfn print_multi<'a, 'b>(x: &'a i32, y: &'b i32) {\n    println!(\"`print_multi`: x is {}, y is {}\", x, y);\n}\n\n// Returning references that have been passed in is acceptable.\n// However, the correct lifetime must be returned.\nfn pass_x<'a, 'b>(x: &'a i32, _: &'b i32) -> &'a i32 { x }\n\n//fn invalid_output<'a>() -> &'a String { &String::from(\"foo\") }\n// The above is invalid: `'a` must live longer than the function.\n// Here, `&String::from(\"foo\")` would create a `String`, followed by a\n// reference. Then the data is dropped upon exiting the scope, leaving\n// a reference to invalid data to be returned.\n\nfn main() {\n    let x = 7;\n    let y = 9;\n\n    print_one(&x);\n    print_multi(&x, &y);\n\n    let z = pass_x(&x, &y);\n    print_one(z);\n\n    let mut t = 3;\n    add_one(&mut t);\n    print_one(&t);\n}\n```\n\n### See also:\n\n[Functions][fn]\n\n[fn]: ../../fn.md\n\n[elision]: elision.md\n"
  },
  {
    "path": "src/scope/lifetime/lifetime_bounds.md",
    "content": "# Bounds\n\nJust like generic types can be bounded, lifetimes (themselves generic)\nuse bounds as well. The `:` character has a slightly different meaning here,\nbut `+` is the same. Note how the following read:\n\n1. `T: 'a`: *All* references in `T` must outlive lifetime `'a`.\n2. `T: Trait + 'a`: Type `T` must implement trait `Trait` and *all* references\nin `T` must outlive `'a`.\n\nThe example below shows the above syntax in action used after keyword `where`:\n\n```rust,editable\nuse std::fmt::Debug; // Trait to bound with.\n\n#[derive(Debug)]\nstruct Ref<'a, T: 'a>(&'a T);\n// `Ref` contains a reference to a generic type `T` that has\n// some lifetime `'a` unknown by `Ref`. `T` is bounded such that any\n// *references* in `T` must outlive `'a`. Additionally, the lifetime\n// of `Ref` may not exceed `'a`.\n\n// A generic function which prints using the `Debug` trait.\nfn print<T>(t: T) where\n    T: Debug {\n    println!(\"`print`: t is {:?}\", t);\n}\n\n// Here a reference to `T` is taken where `T` implements\n// `Debug` and all *references* in `T` outlive `'a`. In\n// addition, `'a` must outlive the function.\nfn print_ref<'a, T>(t: &'a T) where\n    T: Debug + 'a {\n    println!(\"`print_ref`: t is {:?}\", t);\n}\n\nfn main() {\n    let x = 7;\n    let ref_x = Ref(&x);\n\n    print_ref(&ref_x);\n    print(ref_x);\n}\n```\n\n### See also:\n\n[generics][generics], [bounds in generics][bounds], and\n[multiple bounds in generics][multibounds]\n\n[generics]: ../../generics.md\n[bounds]: ../../generics/bounds.md\n[multibounds]: ../../generics/multi_bounds.md\n"
  },
  {
    "path": "src/scope/lifetime/lifetime_coercion.md",
    "content": "# Coercion\n\nA longer lifetime can be coerced into a shorter one\nso that it works inside a scope it normally wouldn't work in.\nThis comes in the form of inferred coercion by the Rust compiler,\nand also in the form of declaring a lifetime difference:\n\n```rust,editable\n// Here, Rust infers a lifetime that is as short as possible.\n// The two references are then coerced to that lifetime.\nfn multiply<'a>(first: &'a i32, second: &'a i32) -> i32 {\n    first * second\n}\n\n// `<'a: 'b, 'b>` reads as lifetime `'a` is at least as long as `'b`.\n// Here, we take in an `&'a i32` and return a `&'b i32` as a result of coercion.\nfn choose_first<'a: 'b, 'b>(first: &'a i32, _: &'b i32) -> &'b i32 {\n    first\n}\n\nfn main() {\n    let first = 2; // Longer lifetime\n\n    {\n        let second = 3; // Shorter lifetime\n\n        println!(\"The product is {}\", multiply(&first, &second));\n        println!(\"{} is the first\", choose_first(&first, &second));\n    };\n}\n```\n"
  },
  {
    "path": "src/scope/lifetime/methods.md",
    "content": "# Methods\n\nMethods are annotated similarly to functions:\n\n```rust,editable\nstruct Owner(i32);\n\nimpl Owner {\n    // Annotate lifetimes as in a standalone function.\n    fn add_one<'a>(&'a mut self) { self.0 += 1; }\n    fn print<'a>(&'a self) {\n        println!(\"`print`: {}\", self.0);\n    }\n}\n\nfn main() {\n    let mut owner = Owner(18);\n\n    owner.add_one();\n    owner.print();\n}\n```\n\n### See also:\n\n[methods]\n\n[methods]: ../../fn/methods.md\n"
  },
  {
    "path": "src/scope/lifetime/static_lifetime.md",
    "content": "# Static\n\nRust has a few reserved lifetime names. One of those is `'static`. You\nmight encounter it in two situations:\n\n```rust, ignore\n// A reference with 'static lifetime:\nlet s: &'static str = \"hello world\";\n\n// 'static as part of a trait bound:\nfn generic<T>(x: T) where T: 'static {}\n```\n\nBoth are related but subtly different and this is a common source for\nconfusion when learning Rust. Here are some examples for each situation:\n\n## Reference lifetime\n\nAs a reference lifetime `'static` indicates that the data pointed to by\nthe reference lives for the remaining lifetime of the running program.\nIt can still be coerced to a shorter lifetime.\n\nThere are two common ways to make a variable with `'static` lifetime, and both\nare stored in the read-only memory of the binary:\n\n* Make a constant with the `static` declaration.\n* Make a `string` literal which has type: `&'static str`.\n\nSee the following example for a display of each method:\n\n```rust,editable\n// Make a constant with `'static` lifetime.\nstatic NUM: i32 = 18;\n\n// Returns a reference to `NUM` where its `'static`\n// lifetime is coerced to that of the input argument.\nfn coerce_static<'a>(_: &'a i32) -> &'a i32 {\n    &NUM\n}\n\nfn main() {\n    {\n        // Make a `string` literal and print it:\n        let static_string = \"I'm in read-only memory\";\n        println!(\"static_string: {}\", static_string);\n\n        // When `static_string` goes out of scope, the reference\n        // can no longer be used, but the data remains in the binary.\n    }\n\n    {\n        // Make an integer to use for `coerce_static`:\n        let lifetime_num = 9;\n\n        // Coerce `NUM` to lifetime of `lifetime_num`:\n        let coerced_static = coerce_static(&lifetime_num);\n\n        println!(\"coerced_static: {}\", coerced_static);\n    }\n\n    println!(\"NUM: {} stays accessible!\", NUM);\n}\n```\n\nSince `'static` references only need to be valid for the _remainder_ of\na program's life, they can be created while the program is executed. Just to\ndemonstrate, the below example uses\n[`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak)\nto dynamically create `'static` references. In that case it definitely doesn't\nlive for the entire duration, but only from the leaking point onward.\n\n```rust,editable,compile_fail\nextern crate rand;\nuse rand::Fill;\n\nfn random_vec() -> &'static [u64; 100] {\n    let mut rng = rand::rng();\n    let mut boxed = Box::new([0; 100]);\n    boxed.fill(&mut rng);\n    Box::leak(boxed)\n}\n\nfn main() {\n    let first: &'static [u64; 100] = random_vec();\n    let second: &'static [u64; 100] = random_vec();\n    assert_ne!(first, second)\n}\n```\n\n## Trait bound\n\nAs a trait bound, it means the type does not contain any non-static\nreferences. Eg. the receiver can hold on to the type for as long as\nthey want and it will never become invalid until they drop it.\n\nIt's important to understand this means that any owned data always passes\na `'static` lifetime bound, but a reference to that owned data generally\ndoes not:\n\n```rust,editable,compile_fail\nuse std::fmt::Debug;\n\nfn print_it(input: impl Debug + 'static) {\n    println!(\"'static value passed in is: {:?}\", input);\n}\n\nfn main() {\n    // i is owned and contains no references, thus it's 'static:\n    let i = 5;\n    print_it(i);\n\n    // oops, &i only has the lifetime defined by the scope of\n    // main(), so it's not 'static:\n    print_it(&i);\n}\n```\n\nThe compiler will tell you:\n\n```ignore\nerror[E0597]: `i` does not live long enough\n  --> src/lib.rs:15:15\n   |\n15 |     print_it(&i);\n   |     ---------^^--\n   |     |         |\n   |     |         borrowed value does not live long enough\n   |     argument requires that `i` is borrowed for `'static`\n16 | }\n   | - `i` dropped here while still borrowed\n```\n\n### See also:\n\n[`'static` constants][static_const]\n\n[static_const]: ../../custom_types/constants.md\n"
  },
  {
    "path": "src/scope/lifetime/struct.md",
    "content": "# Structs\n\nAnnotation of lifetimes in structures are also similar to functions:\n\n```rust,editable\n// A type `Borrowed` which houses a reference to an\n// `i32`. The reference to `i32` must outlive `Borrowed`.\n#[derive(Debug)]\nstruct Borrowed<'a>(&'a i32);\n\n// Similarly, both references here must outlive this structure.\n#[derive(Debug)]\nstruct NamedBorrowed<'a> {\n    x: &'a i32,\n    y: &'a i32,\n}\n\n// An enum which is either an `i32` or a reference to one.\n#[derive(Debug)]\nenum Either<'a> {\n    Num(i32),\n    Ref(&'a i32),\n}\n\nfn main() {\n    let x = 18;\n    let y = 15;\n\n    let single = Borrowed(&x);\n    let double = NamedBorrowed { x: &x, y: &y };\n    let reference = Either::Ref(&x);\n    let number    = Either::Num(y);\n\n    println!(\"x is borrowed in {:?}\", single);\n    println!(\"x and y are borrowed in {:?}\", double);\n    println!(\"x is borrowed in {:?}\", reference);\n    println!(\"y is *not* borrowed in {:?}\", number);\n}\n```\n\n### See also:\n\n[`struct`s][structs]\n\n[structs]: ../../custom_types/structs.md\n"
  },
  {
    "path": "src/scope/lifetime/trait.md",
    "content": "# Traits\n\nAnnotation of lifetimes in trait methods basically are similar to functions.\nNote that `impl` may have annotation of lifetimes too.\n\n```rust,editable\n// A struct with annotation of lifetimes.\n#[derive(Debug)]\nstruct Borrowed<'a> {\n    x: &'a i32,\n}\n\n// Annotate lifetimes to impl.\nimpl<'a> Default for Borrowed<'a> {\n    fn default() -> Self {\n        Self {\n            x: &10,\n        }\n    }\n}\n\nfn main() {\n    let b: Borrowed = Default::default();\n    println!(\"b is {:?}\", b);\n}\n```\n\n### See also:\n\n[`trait`s][trait]\n\n[trait]: ../../trait.md\n"
  },
  {
    "path": "src/scope/lifetime.md",
    "content": "# Lifetimes\n\nA *lifetime* is a construct the compiler (or more specifically, its *borrow\nchecker*) uses to ensure all borrows are valid. Specifically, a variable's\nlifetime begins when it is created and ends when it is destroyed. While\nlifetimes and scopes are often referred to together, they are not the same.\n\nTake, for example, the case where we borrow a variable via `&`. The\nborrow has a lifetime that is determined by where it is declared. As a result,\nthe borrow is valid as long as it ends before the lender is destroyed. However,\nthe scope of the borrow is determined by where the reference is used.\n\nIn the following example and in the rest of this section, we will see how\nlifetimes relate to scopes, as well as how the two differ.\n\n```rust,editable\n// Lifetimes are annotated below with lines denoting the creation\n// and destruction of each variable.\n// `i` has the longest lifetime because its scope entirely encloses\n// both `borrow1` and `borrow2`. The duration of `borrow1` compared\n// to `borrow2` is irrelevant since they are disjoint.\nfn main() {\n    let i = 3; // Lifetime for `i` starts. ────────────────┐\n    //                                                     │\n    { //                                                   │\n        let borrow1 = &i; // `borrow1` lifetime starts. ──┐│\n        //                                                ││\n        println!(\"borrow1: {}\", borrow1); //              ││\n    } // `borrow1` ends. ─────────────────────────────────┘│\n    //                                                     │\n    //                                                     │\n    { //                                                   │\n        let borrow2 = &i; // `borrow2` lifetime starts. ──┐│\n        //                                                ││\n        println!(\"borrow2: {}\", borrow2); //              ││\n    } // `borrow2` ends. ─────────────────────────────────┘│\n    //                                                     │\n}   // Lifetime ends. ─────────────────────────────────────┘\n```\n\nNote that no names or types are assigned to label lifetimes.\nThis restricts how lifetimes will be able to be used as we will see.\n"
  },
  {
    "path": "src/scope/move/mut.md",
    "content": "# Mutability\n\nMutability of data can be changed when ownership is transferred.\n\n```rust,editable\nfn main() {\n    let immutable_box = Box::new(5u32);\n\n    println!(\"immutable_box contains {}\", immutable_box);\n\n    // Mutability error\n    //*immutable_box = 4;\n\n    // *Move* the box, changing the ownership (and mutability)\n    let mut mutable_box = immutable_box;\n\n    println!(\"mutable_box contains {}\", mutable_box);\n\n    // Modify the contents of the box\n    *mutable_box = 4;\n\n    println!(\"mutable_box now contains {}\", mutable_box);\n}\n```\n"
  },
  {
    "path": "src/scope/move/partial_move.md",
    "content": "# Partial moves\n\nWithin the [destructuring] of a single variable, both `by-move` and\n`by-reference` pattern bindings can be used at the same time. Doing\nthis will result in a _partial move_ of the variable, which means\nthat parts of the variable will be moved while other parts stay. In\nsuch a case, the parent variable cannot be used afterwards as a\nwhole, however the parts that are only referenced (and not moved)\ncan still be used. Note that types that implement the\n[`Drop` trait][droptrait] cannot be partially moved from, because\nits `drop` method would use it afterwards as a whole.\n\n\n```rust,editable\nfn main() {\n    #[derive(Debug)]\n    struct Person {\n        name: String,\n        age: Box<u8>,\n    }\n\n    // Error! cannot move out of a type which implements the `Drop` trait\n    //impl Drop for Person {\n    //    fn drop(&mut self) {\n    //        println!(\"Dropping the person struct {:?}\", self)\n    //    }\n    //}\n    // TODO ^ Try uncommenting these lines\n\n    let person = Person {\n        name: String::from(\"Alice\"),\n        age: Box::new(20),\n    };\n\n    // `name` is moved out of person, but `age` is referenced\n    let Person { name, ref age } = person;\n\n    println!(\"The person's age is {}\", age);\n\n    println!(\"The person's name is {}\", name);\n\n    // Error! borrow of partially moved value: `person` partial move occurs\n    //println!(\"The person struct is {:?}\", person);\n\n    // `person` cannot be used but `person.age` can be used as it is not moved\n    println!(\"The person's age from person struct is {}\", person.age);\n}\n```\n\n(In this example, we store the `age` variable on the heap to\nillustrate the partial move: deleting `ref` in the above code would\ngive an error as the ownership of `person.age` would be moved to the\nvariable `age`. If `Person.age` were stored on the stack, `ref` would\nnot be required as the definition of `age` would copy the data from\n`person.age` without moving it.)\n\n### See also:\n\n[destructuring][destructuring]\n\n[droptrait]: ../../trait/drop.md\n[destructuring]: ../../flow_control/match/destructuring.md\n"
  },
  {
    "path": "src/scope/move.md",
    "content": "# Ownership and moves\n\nBecause variables are in charge of freeing their own resources,\n**resources can only have one owner**. This prevents resources\nfrom being freed more than once. Note that not all variables own\nresources (e.g. [references]).\n\nWhen doing assignments (`let x = y`) or passing function arguments by value\n(`foo(x)`), the *ownership* of the resources is transferred. In Rust-speak,\nthis is known as a *move*.\n\nAfter moving resources, the previous owner can no longer be used. This avoids\ncreating dangling pointers.\n\n```rust,editable\n// This function takes ownership of the heap allocated memory\nfn destroy_box(c: Box<i32>) {\n    println!(\"Destroying a box that contains {}\", c);\n\n    // `c` is destroyed and the memory freed\n}\n\nfn main() {\n    // _Stack_ allocated integer\n    let x = 5u32;\n\n    // *Copy* `x` into `y` - no resources are moved\n    let y = x;\n\n    // Both values can be independently used\n    println!(\"x is {}, and y is {}\", x, y);\n\n    // `a` is a pointer to a _heap_ allocated integer\n    let a = Box::new(5i32);\n\n    println!(\"a contains: {}\", a);\n\n    // *Move* `a` into `b`\n    let b = a;\n    // The pointer address of `a` is copied (not the data) into `b`.\n    // Both are now pointers to the same heap allocated data, but\n    // `b` now owns it.\n\n    // Error! `a` can no longer access the data, because it no longer owns the\n    // heap memory\n    //println!(\"a contains: {}\", a);\n    // TODO ^ Try uncommenting this line\n\n    // This function takes ownership of the heap allocated memory from `b`\n    destroy_box(b);\n\n    // Since the heap memory has been freed at this point, this action would\n    // result in dereferencing freed memory, but it's forbidden by the compiler\n    // Error! Same reason as the previous Error\n    //println!(\"b contains: {}\", b);\n    // TODO ^ Try uncommenting this line\n}\n```\n\n[references]: ../flow_control/match/destructuring/destructure_pointers.md\n"
  },
  {
    "path": "src/scope/raii.md",
    "content": "# RAII\n\nVariables in Rust do more than just hold data in the stack: they also *own*\nresources, e.g. `Box<T>` owns memory in the heap. Rust enforces [RAII][raii]\n(Resource Acquisition Is Initialization), so whenever an object goes out of\nscope, its destructor is called and its owned resources are freed.\n\nThis behavior shields against *resource leak* bugs, so you'll never have to\nmanually free memory or worry about memory leaks again! Here's a quick showcase:\n\n```rust,editable\n// raii.rs\nfn create_box() {\n    // Allocate an integer on the heap\n    let _box1 = Box::new(3i32);\n\n    // `_box1` is destroyed here, and memory gets freed\n}\n\nfn main() {\n    // Allocate an integer on the heap\n    let _box2 = Box::new(5i32);\n\n    // A nested scope:\n    {\n        // Allocate an integer on the heap\n        let _box3 = Box::new(4i32);\n\n        // `_box3` is destroyed here, and memory gets freed\n    }\n\n    // Creating lots of boxes just for fun\n    // There's no need to manually free memory!\n    for _ in 0u32..1_000 {\n        create_box();\n    }\n\n    // `_box2` is destroyed here, and memory gets freed\n}\n```\n\nOf course, we can double check for memory errors using [`valgrind`][valgrind]:\n\n<!-- REUSE-IgnoreStart -->\n<!-- Prevent REUSE from parsing the copyright statement in the sample code -->\n```shell\n$ rustc raii.rs && valgrind ./raii\n==26873== Memcheck, a memory error detector\n==26873== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.\n==26873== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info\n==26873== Command: ./raii\n==26873==\n==26873==\n==26873== HEAP SUMMARY:\n==26873==     in use at exit: 0 bytes in 0 blocks\n==26873==   total heap usage: 1,013 allocs, 1,013 frees, 8,696 bytes allocated\n==26873==\n==26873== All heap blocks were freed -- no leaks are possible\n==26873==\n==26873== For counts of detected and suppressed errors, rerun with: -v\n==26873== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)\n```\n<!-- REUSE-IgnoreEnd -->\n\nNo leaks here!\n\n## Destructor\n\nThe notion of a destructor in Rust is provided through the [`Drop`] trait. The\ndestructor is called when the resource goes out of scope. This trait is not\nrequired to be implemented for every type, only implement it for your type if\nyou require its own destructor logic.\n\nRun the below example to see how the [`Drop`] trait works. When the variable in\nthe `main` function goes out of scope the custom destructor will be invoked.\n\n```rust,editable\nstruct ToDrop;\n\nimpl Drop for ToDrop {\n    fn drop(&mut self) {\n        println!(\"ToDrop is being dropped\");\n    }\n}\n\nfn main() {\n    let x = ToDrop;\n    println!(\"Made a ToDrop!\");\n}\n```\n\n### See also:\n\n[Box][box]\n\n[raii]: https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization\n[box]: ../std/box.md\n[valgrind]: http://valgrind.org/info/\n[`Drop`]: https://doc.rust-lang.org/std/ops/trait.Drop.html\n"
  },
  {
    "path": "src/scope.md",
    "content": "# Scoping rules\n\nScopes play an important part in ownership, borrowing, and lifetimes.\nThat is, they indicate to the compiler when borrows are valid, when\nresources can be freed, and when variables are created or destroyed.\n"
  },
  {
    "path": "src/std/arc.md",
    "content": "# Arc\n\nWhen shared ownership between threads is needed, `Arc`(Atomically Reference\nCounted) can be used. This struct, via the `Clone` implementation can create\na reference pointer for the location of a value in the memory heap while\nincreasing the reference counter. As it shares ownership between threads, when\nthe last reference pointer to a value is out of scope, the variable is dropped.\n\n```rust,editable\nuse std::time::Duration;\nuse std::sync::Arc;\nuse std::thread;\n\nfn main() {\n    // This variable declaration is where its value is specified.\n    let apple = Arc::new(\"the same apple\");\n\n    for _ in 0..10 {\n        // Here there is no value specification as it is a pointer to a\n        // reference in the memory heap.\n        let apple = Arc::clone(&apple);\n\n        thread::spawn(move || {\n            // As Arc was used, threads can be spawned using the value allocated\n            // in the Arc variable pointer's location.\n            println!(\"{:?}\", apple);\n        });\n    }\n\n    // Make sure all Arc instances are printed from spawned threads.\n    thread::sleep(Duration::from_secs(1));\n}\n```\n"
  },
  {
    "path": "src/std/box.md",
    "content": "# Box, stack and heap\n\nAll values in Rust are stack allocated by default. Values can be *boxed*\n(allocated on the heap) by creating a `Box<T>`. A box is a smart pointer to a\nheap allocated value of type `T`. When a box goes out of scope, its destructor\nis called, the inner object is destroyed, and the memory on the heap is freed.\n\nBoxed values can be dereferenced using the `*` operator; this removes one layer\nof indirection.\n\n```rust,editable\nuse std::mem;\n\n#[allow(dead_code)]\n#[derive(Debug, Clone, Copy)]\nstruct Point {\n    x: f64,\n    y: f64,\n}\n\n// A Rectangle can be specified by where its top left and bottom right\n// corners are in space\n#[allow(dead_code)]\nstruct Rectangle {\n    top_left: Point,\n    bottom_right: Point,\n}\n\nfn origin() -> Point {\n    Point { x: 0.0, y: 0.0 }\n}\n\nfn boxed_origin() -> Box<Point> {\n    // Allocate this point on the heap, and return a pointer to it\n    Box::new(Point { x: 0.0, y: 0.0 })\n}\n\nfn main() {\n    // (all the type annotations are superfluous)\n    // Stack allocated variables\n    let point: Point = origin();\n    let rectangle: Rectangle = Rectangle {\n        top_left: origin(),\n        bottom_right: Point { x: 3.0, y: -4.0 }\n    };\n\n    // Heap allocated rectangle\n    let boxed_rectangle: Box<Rectangle> = Box::new(Rectangle {\n        top_left: origin(),\n        bottom_right: Point { x: 3.0, y: -4.0 },\n    });\n\n    // The output of functions can be boxed\n    let boxed_point: Box<Point> = Box::new(origin());\n\n    // Double indirection\n    let box_in_a_box: Box<Box<Point>> = Box::new(boxed_origin());\n\n    println!(\"Point occupies {} bytes on the stack\",\n             mem::size_of_val(&point));\n    println!(\"Rectangle occupies {} bytes on the stack\",\n             mem::size_of_val(&rectangle));\n\n    // box size == pointer size\n    println!(\"Boxed point occupies {} bytes on the stack\",\n             mem::size_of_val(&boxed_point));\n    println!(\"Boxed rectangle occupies {} bytes on the stack\",\n             mem::size_of_val(&boxed_rectangle));\n    println!(\"Boxed box occupies {} bytes on the stack\",\n             mem::size_of_val(&box_in_a_box));\n\n    // Copy the data contained in `boxed_point` into `unboxed_point`\n    let unboxed_point: Point = *boxed_point;\n    println!(\"Unboxed point occupies {} bytes on the stack\",\n             mem::size_of_val(&unboxed_point));\n}\n```\n"
  },
  {
    "path": "src/std/hash/alt_key_types.md",
    "content": "# Alternate/custom key types\n\nAny type that implements the `Eq` and `Hash` traits can be a key in `HashMap`.\nThis includes:\n\n* `bool` (though not very useful since there are only two possible keys)\n* `int`, `uint`, and all variations thereof\n* `String` and `&str` (protip: you can have a `HashMap` keyed by `String`\nand call `.get()` with an `&str`)\n\nNote that `f32` and `f64` do *not* implement `Hash`,\nlikely because [floating-point precision errors][floating]\nwould make using them as hashmap keys horribly error-prone.\n\nAll collection classes implement `Eq` and `Hash`\nif their contained type also respectively implements `Eq` and `Hash`.\nFor example, `Vec<T>` will implement `Hash` if `T` implements `Hash`.\n\nYou can easily implement `Eq` and `Hash` for a custom type with just one line:\n`#[derive(PartialEq, Eq, Hash)]`\n\nThe compiler will do the rest. If you want more control over the details,\nyou can implement `Eq` and/or `Hash` yourself.\nThis guide will not cover the specifics of implementing `Hash`.\n\nTo play around with using a `struct` in `HashMap`,\nlet's try making a very simple user logon system:\n\n```rust,editable\nuse std::collections::HashMap;\n\n// Eq requires that you derive PartialEq on the type.\n#[derive(PartialEq, Eq, Hash)]\nstruct Account<'a>{\n    username: &'a str,\n    password: &'a str,\n}\n\nstruct AccountInfo<'a>{\n    name: &'a str,\n    email: &'a str,\n}\n\ntype Accounts<'a> = HashMap<Account<'a>, AccountInfo<'a>>;\n\nfn try_logon<'a>(accounts: &Accounts<'a>,\n        username: &'a str, password: &'a str){\n    println!(\"Username: {}\", username);\n    println!(\"Password: {}\", password);\n    println!(\"Attempting logon...\");\n\n    let logon = Account {\n        username,\n        password,\n    };\n\n    match accounts.get(&logon) {\n        Some(account_info) => {\n            println!(\"Successful logon!\");\n            println!(\"Name: {}\", account_info.name);\n            println!(\"Email: {}\", account_info.email);\n        },\n        _ => println!(\"Login failed!\"),\n    }\n}\n\nfn main(){\n    let mut accounts: Accounts = HashMap::new();\n\n    let account = Account {\n        username: \"j.everyman\",\n        password: \"password123\",\n    };\n\n    let account_info = AccountInfo {\n        name: \"John Everyman\",\n        email: \"j.everyman@email.com\",\n    };\n\n    accounts.insert(account, account_info);\n\n    try_logon(&accounts, \"j.everyman\", \"psasword123\");\n\n    try_logon(&accounts, \"j.everyman\", \"password123\");\n}\n```\n\n[hash]: https://en.wikipedia.org/wiki/Hash_function\n[floating]: https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems\n"
  },
  {
    "path": "src/std/hash/hashset.md",
    "content": "# HashSet\n\nConsider a `HashSet` as a `HashMap` where we just care about the keys (\n`HashSet<T>` is, in actuality, just a wrapper around `HashMap<T, ()>`).\n\n\"What's the point of that?\" you ask. \"I could just store the keys in a `Vec`.\"\n\nA `HashSet`'s unique feature is that\nit is guaranteed to not have duplicate elements.\nThat's the contract that any set collection fulfills.\n`HashSet` is just one implementation. (see also: [`BTreeSet`][treeset])\n\nIf you insert a value that is already present in the `HashSet`,\n(i.e. the new value is equal to the existing and they both have the same hash),\nthen the new value will replace the old.\n\nThis is great for when you never want more than one of something,\nor when you want to know if you've already got something.\n\nBut sets can do more than that.\n\nSets have 4 primary operations (all of the following calls return an iterator):\n\n* `union`: get all the unique elements in both sets.\n\n* `difference`: get all the elements that are in the first set but not the second.\n\n* `intersection`: get all the elements that are only in *both* sets.\n\n* `symmetric_difference`:\nget all the elements that are in one set or the other, but *not* both.\n\nTry all of these in the following example:\n\n```rust,editable,ignore,mdbook-runnable\nuse std::collections::HashSet;\n\nfn main() {\n    let mut a: HashSet<i32> = vec![1i32, 2, 3].into_iter().collect();\n    let mut b: HashSet<i32> = vec![2i32, 3, 4].into_iter().collect();\n\n    assert!(a.insert(4));\n    assert!(a.contains(&4));\n\n    // `HashSet::insert()` returns false if\n    // there was a value already present.\n    assert!(b.insert(4), \"Value 4 is already in set B!\");\n    // FIXME ^ Comment out this line\n\n    b.insert(5);\n\n    // If a collection's element type implements `Debug`,\n    // then the collection implements `Debug`.\n    // It usually prints its elements in the format `[elem1, elem2, ...]`\n    println!(\"A: {:?}\", a);\n    println!(\"B: {:?}\", b);\n\n    // Print [1, 2, 3, 4, 5] in arbitrary order\n    println!(\"Union: {:?}\", a.union(&b).collect::<Vec<&i32>>());\n\n    // This should print [1]\n    println!(\"Difference: {:?}\", a.difference(&b).collect::<Vec<&i32>>());\n\n    // Print [2, 3, 4] in arbitrary order.\n    println!(\"Intersection: {:?}\", a.intersection(&b).collect::<Vec<&i32>>());\n\n    // Print [1, 5]\n    println!(\"Symmetric Difference: {:?}\",\n             a.symmetric_difference(&b).collect::<Vec<&i32>>());\n}\n```\n\n(Examples are adapted from the [documentation.][hash-set])\n\n[treeset]: https://doc.rust-lang.org/std/collections/struct.BTreeSet.html\n[hash-set]: https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.difference\n"
  },
  {
    "path": "src/std/hash.md",
    "content": "# HashMap\n\nWhere vectors store values by an integer index, `HashMap`s store values by key.\n`HashMap` keys can be booleans, integers, strings,\nor any other type that implements the `Eq` and `Hash` traits.\nMore on this in the next section.\n\nLike vectors, `HashMap`s are growable, but HashMaps can also shrink themselves\nwhen they have excess space.\nYou can create a HashMap with a certain starting capacity using\n`HashMap::with_capacity(uint)`, or use `HashMap::new()` to get a HashMap\nwith a default initial capacity (recommended).\n\n```rust,editable\nuse std::collections::HashMap;\n\nfn call(number: &str) -> &str {\n    match number {\n        \"798-1364\" => \"We're sorry, the call cannot be completed as dialed.\n            Please hang up and try again.\",\n        \"645-7689\" => \"Hello, this is Mr. Awesome's Pizza. My name is Fred.\n            What can I get for you today?\",\n        _ => \"Hi! Who is this again?\"\n    }\n}\n\nfn main() {\n    let mut contacts = HashMap::new();\n\n    contacts.insert(\"Daniel\", \"798-1364\");\n    contacts.insert(\"Ashley\", \"645-7689\");\n    contacts.insert(\"Katie\", \"435-8291\");\n    contacts.insert(\"Robert\", \"956-1745\");\n\n    // Takes a reference and returns Option<&V>\n    match contacts.get(&\"Daniel\") {\n        Some(&number) => println!(\"Calling Daniel: {}\", call(number)),\n        _ => println!(\"Don't have Daniel's number.\"),\n    }\n\n    // `HashMap::insert()` returns `None`\n    // if the inserted value is new, `Some(value)` otherwise\n    contacts.insert(\"Daniel\", \"164-6743\");\n\n    match contacts.get(&\"Ashley\") {\n        Some(&number) => println!(\"Calling Ashley: {}\", call(number)),\n        _ => println!(\"Don't have Ashley's number.\"),\n    }\n\n    contacts.remove(&\"Ashley\");\n\n    // `HashMap::iter()` returns an iterator that yields\n    // (&'a key, &'a value) pairs in arbitrary order.\n    for (contact, &number) in contacts.iter() {\n        println!(\"Calling {}: {}\", contact, call(number));\n    }\n}\n```\n\nFor more information on how hashing and hash maps\n(sometimes called hash tables) work, have a look at\n[Hash Table Wikipedia][wiki-hash]\n\n[wiki-hash]: https://en.wikipedia.org/wiki/Hash_table\n"
  },
  {
    "path": "src/std/option.md",
    "content": "# `Option`\n\nSometimes it's desirable to catch the failure of some parts of a program\ninstead of calling `panic!`; this can be accomplished using the `Option` enum.\n\nThe `Option<T>` enum has two variants:\n\n* `None`, to indicate failure or lack of value, and\n* `Some(value)`, a tuple struct that wraps a `value` with type `T`.\n\n```rust,editable,ignore,mdbook-runnable\n// An integer division that doesn't `panic!`\nfn checked_division(dividend: i32, divisor: i32) -> Option<i32> {\n    if divisor == 0 {\n        // Failure is represented as the `None` variant\n        None\n    } else {\n        // Result is wrapped in a `Some` variant\n        Some(dividend / divisor)\n    }\n}\n\n// This function handles a division that may not succeed\nfn try_division(dividend: i32, divisor: i32) {\n    // `Option` values can be pattern matched, just like other enums\n    match checked_division(dividend, divisor) {\n        None => println!(\"{} / {} failed!\", dividend, divisor),\n        Some(quotient) => {\n            println!(\"{} / {} = {}\", dividend, divisor, quotient)\n        },\n    }\n}\n\nfn main() {\n    try_division(4, 2);\n    try_division(1, 0);\n\n    // Binding `None` to a variable needs to be type annotated\n    let none: Option<i32> = None;\n    let _equivalent_none = None::<i32>;\n\n    let optional_float = Some(0f32);\n\n    // Unwrapping a `Some` variant will extract the value wrapped.\n    println!(\"{:?} unwraps to {:?}\", optional_float, optional_float.unwrap());\n\n    // Unwrapping a `None` variant will `panic!`\n    println!(\"{:?} unwraps to {:?}\", none, none.unwrap());\n}\n```\n"
  },
  {
    "path": "src/std/panic.md",
    "content": "# `panic!`\n\nThe `panic!` macro can be used to generate a panic and start unwinding\nits stack. While unwinding, the runtime will take care of freeing all the\nresources *owned* by the thread by calling the destructor of all its objects.\n\nSince we are dealing with programs with only one thread, `panic!` will cause the\nprogram to report the panic message and exit.\n\n```rust,editable,ignore,mdbook-runnable\n// Re-implementation of integer division (/)\nfn division(dividend: i32, divisor: i32) -> i32 {\n    if divisor == 0 {\n        // Division by zero triggers a panic\n        panic!(\"division by zero\");\n    } else {\n        dividend / divisor\n    }\n}\n\n// The `main` task\nfn main() {\n    // Heap allocated integer\n    let _x = Box::new(0i32);\n\n    // This operation will trigger a task failure\n    division(3, 0);\n\n    println!(\"This point won't be reached!\");\n\n    // `_x` should get destroyed at this point\n}\n```\n\nLet's check that `panic!` doesn't leak memory.\n\n<!-- REUSE-IgnoreStart -->\n<!-- Prevent REUSE from parsing the copyright statement in the sample code -->\n```shell\n$ rustc panic.rs && valgrind ./panic\n==4401== Memcheck, a memory error detector\n==4401== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.\n==4401== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info\n==4401== Command: ./panic\n==4401==\nthread '<main>' panicked at 'division by zero', panic.rs:5\n==4401==\n==4401== HEAP SUMMARY:\n==4401==     in use at exit: 0 bytes in 0 blocks\n==4401==   total heap usage: 18 allocs, 18 frees, 1,648 bytes allocated\n==4401==\n==4401== All heap blocks were freed -- no leaks are possible\n==4401==\n==4401== For counts of detected and suppressed errors, rerun with: -v\n==4401== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)\n```\n<!-- REUSE-IgnoreEnd -->\n"
  },
  {
    "path": "src/std/rc.md",
    "content": "# `Rc`\n\nWhen multiple ownership is needed, `Rc`(Reference Counting) can be used. `Rc`\nkeeps track of the number of the references which means the number of owners of\nthe value wrapped inside an `Rc`.\n\nReference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and\ndecreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an\n`Rc`'s reference count becomes zero (which means there are no remaining owners),\nboth the `Rc` and the value are all dropped.\n\nCloning an `Rc` never performs a deep copy. Cloning creates just another pointer\nto the wrapped value, and increments the count.\n\n```rust,editable\nuse std::rc::Rc;\n\nfn main() {\n    let rc_examples = \"Rc examples\".to_string();\n    {\n        println!(\"--- rc_a is created ---\");\n\n        let rc_a: Rc<String> = Rc::new(rc_examples);\n        println!(\"Reference Count of rc_a: {}\", Rc::strong_count(&rc_a));\n\n        {\n            println!(\"--- rc_a is cloned to rc_b ---\");\n\n            let rc_b: Rc<String> = Rc::clone(&rc_a);\n            println!(\"Reference Count of rc_b: {}\", Rc::strong_count(&rc_b));\n            println!(\"Reference Count of rc_a: {}\", Rc::strong_count(&rc_a));\n\n            // Two `Rc`s are equal if their inner values are equal\n            println!(\"rc_a and rc_b are equal: {}\", rc_a.eq(&rc_b));\n\n            // We can use methods of a value directly\n            println!(\"Length of the value inside rc_a: {}\", rc_a.len());\n            println!(\"Value of rc_b: {}\", rc_b);\n\n            println!(\"--- rc_b is dropped out of scope ---\");\n        }\n\n        println!(\"Reference Count of rc_a: {}\", Rc::strong_count(&rc_a));\n\n        println!(\"--- rc_a is dropped out of scope ---\");\n    }\n\n    // Error! `rc_examples` already moved into `rc_a`\n    // And when `rc_a` is dropped, `rc_examples` is dropped together\n    // println!(\"rc_examples: {}\", rc_examples);\n    // TODO ^ Try uncommenting this line\n}\n```\n\n### See also:\n\n[std::rc][1] and [std::sync::arc][2].\n\n[1]: https://doc.rust-lang.org/std/rc/index.html\n[2]: https://doc.rust-lang.org/std/sync/struct.Arc.html\n"
  },
  {
    "path": "src/std/result/question_mark.md",
    "content": "# `?`\n\nChaining results using match can get pretty untidy; luckily, the `?` operator\ncan be used to make things pretty again. `?` is used at the end of an expression\nreturning a `Result`, and is equivalent to a match expression, where the\n`Err(err)` branch expands to an early `return Err(From::from(err))`, and the `Ok(ok)`\nbranch expands to an `ok` expression.\n\n```rust,editable,ignore,mdbook-runnable\nmod checked {\n    #[derive(Debug)]\n    enum MathError {\n        DivisionByZero,\n        NonPositiveLogarithm,\n        NegativeSquareRoot,\n    }\n\n    type MathResult = Result<f64, MathError>;\n\n    fn div(x: f64, y: f64) -> MathResult {\n        if y == 0.0 {\n            Err(MathError::DivisionByZero)\n        } else {\n            Ok(x / y)\n        }\n    }\n\n    fn sqrt(x: f64) -> MathResult {\n        if x < 0.0 {\n            Err(MathError::NegativeSquareRoot)\n        } else {\n            Ok(x.sqrt())\n        }\n    }\n\n    fn ln(x: f64) -> MathResult {\n        if x <= 0.0 {\n            Err(MathError::NonPositiveLogarithm)\n        } else {\n            Ok(x.ln())\n        }\n    }\n\n    // Intermediate function\n    fn op_(x: f64, y: f64) -> MathResult {\n        // if `div` \"fails\", then `DivisionByZero` will be `return`ed\n        let ratio = div(x, y)?;\n\n        // if `ln` \"fails\", then `NonPositiveLogarithm` will be `return`ed\n        let ln = ln(ratio)?;\n\n        sqrt(ln)\n    }\n\n    pub fn op(x: f64, y: f64) {\n        match op_(x, y) {\n            Err(why) => panic!(\"{}\", match why {\n                MathError::NonPositiveLogarithm\n                    => \"logarithm of non-positive number\",\n                MathError::DivisionByZero\n                    => \"division by zero\",\n                MathError::NegativeSquareRoot\n                    => \"square root of negative number\",\n            }),\n            Ok(value) => println!(\"{}\", value),\n        }\n    }\n}\n\nfn main() {\n    checked::op(1.0, 10.0);\n}\n```\n\nBe sure to check the [documentation][docs],\nas there are many methods to map/compose `Result`.\n\n[docs]: https://doc.rust-lang.org/std/result/index.html\n"
  },
  {
    "path": "src/std/result.md",
    "content": "# `Result`\n\nWe've seen that the `Option` enum can be used as a return value from functions\nthat may fail, where `None` can be returned to indicate failure. However,\nsometimes it is important to express *why* an operation failed. To do this we\nhave the `Result` enum.\n\nThe `Result<T, E>` enum has two variants:\n\n* `Ok(value)` which indicates that the operation succeeded, and wraps the\n  `value` returned by the operation. (`value` has type `T`)\n* `Err(why)`, which indicates that the operation failed, and wraps `why`,\n  which (hopefully) explains the cause of the failure. (`why` has type `E`)\n\n```rust,editable,ignore,mdbook-runnable\nmod checked {\n    // Mathematical \"errors\" we want to catch\n    #[derive(Debug)]\n    pub enum MathError {\n        DivisionByZero,\n        NonPositiveLogarithm,\n        NegativeSquareRoot,\n    }\n\n    pub type MathResult = Result<f64, MathError>;\n\n    pub fn div(x: f64, y: f64) -> MathResult {\n        if y == 0.0 {\n            // This operation would `fail`, instead let's return the reason of\n            // the failure wrapped in `Err`\n            Err(MathError::DivisionByZero)\n        } else {\n            // This operation is valid, return the result wrapped in `Ok`\n            Ok(x / y)\n        }\n    }\n\n    pub fn sqrt(x: f64) -> MathResult {\n        if x < 0.0 {\n            Err(MathError::NegativeSquareRoot)\n        } else {\n            Ok(x.sqrt())\n        }\n    }\n\n    pub fn ln(x: f64) -> MathResult {\n        if x <= 0.0 {\n            Err(MathError::NonPositiveLogarithm)\n        } else {\n            Ok(x.ln())\n        }\n    }\n}\n\n// `op(x, y)` === `sqrt(ln(x / y))`\nfn op(x: f64, y: f64) -> f64 {\n    // This is a three level match pyramid!\n    match checked::div(x, y) {\n        Err(why) => panic!(\"{:?}\", why),\n        Ok(ratio) => match checked::ln(ratio) {\n            Err(why) => panic!(\"{:?}\", why),\n            Ok(ln) => match checked::sqrt(ln) {\n                Err(why) => panic!(\"{:?}\", why),\n                Ok(sqrt) => sqrt,\n            },\n        },\n    }\n}\n\nfn main() {\n    // Will this fail?\n    println!(\"{}\", op(1.0, 10.0));\n}\n```\n"
  },
  {
    "path": "src/std/str.md",
    "content": "# Strings\n\nThe two most used string types in Rust are `String` and `&str`.\n\nA `String` is stored as a vector of bytes (`Vec<u8>`), but guaranteed to\nalways be a valid UTF-8 sequence. `String` is heap allocated, growable and not\nnull terminated.\n\n`&str` is a slice (`&[u8]`) that always points to a valid UTF-8 sequence, and\ncan be used to view into a `String`, just like `&[T]` is a view into `Vec<T>`.\n\n```rust,editable\nfn main() {\n    // (all the type annotations are superfluous)\n    // A reference to a string allocated in read only memory\n    let pangram: &'static str = \"the quick brown fox jumps over the lazy dog\";\n    println!(\"Pangram: {}\", pangram);\n\n    // Iterate over words in reverse, no new string is allocated\n    println!(\"Words in reverse\");\n    for word in pangram.split_whitespace().rev() {\n        println!(\"> {}\", word);\n    }\n\n    // Copy chars into a vector, sort and remove duplicates\n    let mut chars: Vec<char> = pangram.chars().collect();\n    chars.sort();\n    chars.dedup();\n\n    // Create an empty and growable `String`\n    let mut string = String::new();\n    for c in chars {\n        // Insert a char at the end of string\n        string.push(c);\n        // Insert a string at the end of string\n        string.push_str(\", \");\n    }\n\n    // The trimmed string is a slice to the original string, hence no new\n    // allocation is performed\n    let chars_to_trim: &[char] = &[' ', ','];\n    let trimmed_str: &str = string.trim_matches(chars_to_trim);\n    println!(\"Used characters: {}\", trimmed_str);\n\n    // Heap allocate a string\n    let alice = String::from(\"I like dogs\");\n    // Allocate new memory and store the modified string there\n    let bob: String = alice.replace(\"dog\", \"cat\");\n\n    println!(\"Alice says: {}\", alice);\n    println!(\"Bob says: {}\", bob);\n}\n```\n\nMore `str`/`String` methods can be found under the\n[std::str][str] and\n[std::string][string]\nmodules\n\n## Literals and escapes\n\nThere are multiple ways to write string literals with special characters in them.\nAll result in a similar `&str` so it's best to use the form that is the most\nconvenient to write. Similarly there are multiple ways to write byte string literals,\nwhich all result in `&[u8; N]`.\n\nGenerally special characters are escaped with a backslash character: `\\`.\nThis way you can add any character to your string, even unprintable ones\nand ones that you don't know how to type. If you want a literal backslash,\nescape it with another one: `\\\\`\n\nString or character literal delimiters occurring within a literal must be escaped: `\"\\\"\"`, `'\\''`.\n\n```rust,editable\nfn main() {\n    // You can use escapes to write bytes by their hexadecimal values...\n    let byte_escape = \"I'm writing \\x52\\x75\\x73\\x74!\";\n    println!(\"What are you doing\\x3F (\\\\x3F means ?) {}\", byte_escape);\n\n    // ...or Unicode code points.\n    let unicode_codepoint = \"\\u{211D}\";\n    let character_name = \"\\\"DOUBLE-STRUCK CAPITAL R\\\"\";\n\n    println!(\"Unicode character {} (U+211D) is called {}\",\n                unicode_codepoint, character_name );\n\n\n    let long_string = \"String literals\n                        can span multiple lines.\n                        The linebreak and indentation here ->\\\n                        <- can be escaped too!\";\n    println!(\"{}\", long_string);\n}\n```\n\nSometimes there are just too many characters that need to be escaped or it's just\nmuch more convenient to write a string out as-is. This is where raw string literals come into play.\n\n```rust, editable\nfn main() {\n    let raw_str = r\"Escapes don't work here: \\x3F \\u{211D}\";\n    println!(\"{}\", raw_str);\n\n    // If you need quotes in a raw string, add a pair of #s\n    let quotes = r#\"And then I said: \"There is no escape!\"\"#;\n    println!(\"{}\", quotes);\n\n    // If you need \"# in your string, just use more #s in the delimiter.\n    // You can use up to 255 #s.\n    let longer_delimiter = r###\"A string with \"# in it. And even \"##!\"###;\n    println!(\"{}\", longer_delimiter);\n}\n```\n\nWant a string that's not UTF-8? (Remember, `str` and `String` must be valid UTF-8).\nOr maybe you want an array of bytes that's mostly text? Byte strings to the rescue!\n\n```rust, editable\nuse std::str;\n\nfn main() {\n    // Note that this is not actually a `&str`\n    let bytestring: &[u8; 21] = b\"this is a byte string\";\n\n    // Byte arrays don't have the `Display` trait, so printing them is a bit limited\n    println!(\"A byte string: {:?}\", bytestring);\n\n    // Byte strings can have byte escapes...\n    let escaped = b\"\\x52\\x75\\x73\\x74 as bytes\";\n    // ...but no unicode escapes\n    // let escaped = b\"\\u{211D} is not allowed\";\n    println!(\"Some escaped bytes: {:?}\", escaped);\n\n\n    // Raw byte strings work just like raw strings\n    let raw_bytestring = br\"\\u{211D} is not escaped here\";\n    println!(\"{:?}\", raw_bytestring);\n\n    // Converting a byte array to `str` can fail\n    if let Ok(my_str) = str::from_utf8(raw_bytestring) {\n        println!(\"And the same as text: '{}'\", my_str);\n    }\n\n    let _quotes = br#\"You can also use \"fancier\" formatting, \\\n                    like with normal raw strings\"#;\n\n    // Byte strings don't have to be UTF-8\n    let shift_jis = b\"\\x82\\xe6\\x82\\xa8\\x82\\xb1\\x82\\xbb\"; // \"ようこそ\" in SHIFT-JIS\n\n    // But then they can't always be converted to `str`\n    match str::from_utf8(shift_jis) {\n        Ok(my_str) => println!(\"Conversion successful: '{}'\", my_str),\n        Err(e) => println!(\"Conversion failed: {:?}\", e),\n    };\n}\n```\n\nFor conversions between character encodings check out the [encoding][encoding-crate] crate.\n\nA more detailed listing of the ways to write string literals and escape characters\nis given in the ['Tokens' chapter][tokens] of the Rust Reference.\n\n[str]: https://doc.rust-lang.org/std/str/\n[string]: https://doc.rust-lang.org/std/string/\n[tokens]: https://doc.rust-lang.org/reference/tokens.html\n[encoding-crate]: https://crates.io/crates/encoding\n"
  },
  {
    "path": "src/std/vec.md",
    "content": "# Vectors\n\nVectors are re-sizable arrays. Like slices, their size is not known at compile\ntime, but they can grow or shrink at any time. A vector is represented using\n3 parameters:\n\n- pointer to the data\n- length\n- capacity\n\nThe capacity indicates how much memory is reserved for the vector. The vector\ncan grow as long as the length is smaller than the capacity. When this threshold\nneeds to be surpassed, the vector is reallocated with a larger capacity.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    // Iterators can be collected into vectors\n    let collected_iterator: Vec<i32> = (0..10).collect();\n    println!(\"Collected (0..10) into: {:?}\", collected_iterator);\n\n    // The `vec!` macro can be used to initialize a vector\n    let mut xs = vec![1i32, 2, 3];\n    println!(\"Initial vector: {:?}\", xs);\n\n    // Insert new element at the end of the vector\n    println!(\"Push 4 into the vector\");\n    xs.push(4);\n    println!(\"Vector: {:?}\", xs);\n\n    // Error! Immutable vectors can't grow\n    collected_iterator.push(0);\n    // FIXME ^ Comment out this line\n\n    // The `len` method yields the number of elements currently stored in a vector\n    println!(\"Vector length: {}\", xs.len());\n\n    // Indexing is done using the square brackets (indexing starts at 0)\n    println!(\"Second element: {}\", xs[1]);\n\n    // `pop` removes the last element from the vector and returns it\n    println!(\"Pop last element: {:?}\", xs.pop());\n\n    // Out of bounds indexing yields a panic\n    println!(\"Fourth element: {}\", xs[3]);\n    // FIXME ^ Comment out this line\n\n    // `Vector`s can be easily iterated over\n    println!(\"Contents of xs:\");\n    for x in xs.iter() {\n        println!(\"> {}\", x);\n    }\n\n    // A `Vector` can also be iterated over while the iteration\n    // count is enumerated in a separate variable (`i`)\n    for (i, x) in xs.iter().enumerate() {\n        println!(\"In position {} we have value {}\", i, x);\n    }\n\n    // Thanks to `iter_mut`, mutable `Vector`s can also be iterated\n    // over in a way that allows modifying each value\n    for x in xs.iter_mut() {\n        *x *= 3;\n    }\n    println!(\"Updated vector: {:?}\", xs);\n}\n```\n\nMore `Vec` methods can be found under the\n[std::vec][vec] module\n\n[vec]: https://doc.rust-lang.org/std/vec/\n"
  },
  {
    "path": "src/std.md",
    "content": "# Std library types\n\nThe `std` library provides many custom types which expands drastically on\nthe `primitives`. Some of these include:\n\n* growable `String`s like: `\"hello world\"`\n* growable vectors: `[1, 2, 3]`\n* optional types: `Option<i32>`\n* error handling types: `Result<i32, i32>`\n* heap allocated pointers: `Box<i32>`\n\n### See also:\n\n[primitives] and [the std library][std]\n\n[primitives]: primitives.md\n[std]: https://doc.rust-lang.org/std/\n"
  },
  {
    "path": "src/std_misc/arg/matching.md",
    "content": "# Argument parsing\n\nMatching can be used to parse simple arguments:\n\n```rust,ignore\nuse std::env;\n\nfn increase(number: i32) {\n    println!(\"{}\", number + 1);\n}\n\nfn decrease(number: i32) {\n    println!(\"{}\", number - 1);\n}\n\nfn help() {\n    println!(\"usage:\nmatch_args <string>\n    Check whether given string is the answer.\nmatch_args {{increase|decrease}} <integer>\n    Increase or decrease given integer by one.\");\n}\n\nfn main() {\n    let args: Vec<String> = env::args().collect();\n\n    match args.len() {\n        // no arguments passed\n        1 => {\n            println!(\"My name is 'match_args'. Try passing some arguments!\");\n        },\n        // one argument passed\n        2 => {\n            match args[1].parse() {\n                Ok(42) => println!(\"This is the answer!\"),\n                _ => println!(\"This is not the answer.\"),\n            }\n        },\n        // one command and one argument passed\n        3 => {\n            let cmd = &args[1];\n            let num = &args[2];\n            // parse the number\n            let number: i32 = match num.parse() {\n                Ok(n) => {\n                    n\n                },\n                Err(_) => {\n                    eprintln!(\"error: second argument not an integer\");\n                    help();\n                    return;\n                },\n            };\n            // parse the command\n            match &cmd[..] {\n                \"increase\" => increase(number),\n                \"decrease\" => decrease(number),\n                _ => {\n                    eprintln!(\"error: invalid command\");\n                    help();\n                },\n            }\n        },\n        // all the other cases\n        _ => {\n            // show a help message\n            help();\n        }\n    }\n}\n```\n\nIf you named your program `match_args.rs` and compile it like this `rustc\nmatch_args.rs`, you can execute it as follows:\n\n```shell\n$ ./match_args Rust\nThis is not the answer.\n$ ./match_args 42\nThis is the answer!\n$ ./match_args do something\nerror: second argument not an integer\nusage:\nmatch_args <string>\n    Check whether given string is the answer.\nmatch_args {increase|decrease} <integer>\n    Increase or decrease given integer by one.\n$ ./match_args do 42\nerror: invalid command\nusage:\nmatch_args <string>\n    Check whether given string is the answer.\nmatch_args {increase|decrease} <integer>\n    Increase or decrease given integer by one.\n$ ./match_args increase 42\n43\n```\n"
  },
  {
    "path": "src/std_misc/arg.md",
    "content": "# Program arguments\n\n## Standard Library\n\nThe command line arguments can be accessed using `std::env::args`, which\nreturns an iterator that yields a `String` for each argument:\n\n```rust,editable\nuse std::env;\n\nfn main() {\n    let args: Vec<String> = env::args().collect();\n\n    // The first argument is the path that was used to call the program.\n    println!(\"My path is {}.\", args[0]);\n\n    // The rest of the arguments are the passed command line parameters.\n    // Call the program like this:\n    //   $ ./args arg1 arg2\n    println!(\"I got {:?} arguments: {:?}.\", args.len() - 1, &args[1..]);\n}\n```\n\n```shell\n$ ./args 1 2 3\nMy path is ./args.\nI got 3 arguments: [\"1\", \"2\", \"3\"].\n```\n\n## Crates\n\nAlternatively, there are numerous crates that can provide extra functionality\nwhen creating command-line applications. One of the more popular command line\nargument crates being [`clap`].\n\n[`clap`]: https://rust-cli.github.io/book/tutorial/cli-args.html#parsing-cli-arguments-with-clap\n"
  },
  {
    "path": "src/std_misc/channels.md",
    "content": "# Channels\n\nRust provides asynchronous `channels` for communication between threads. Channels\nallow a unidirectional flow of information between two end-points: the\n`Sender` and the `Receiver`.\n\n```rust,editable\nuse std::sync::mpsc::{Sender, Receiver};\nuse std::sync::mpsc;\nuse std::thread;\n\nstatic NTHREADS: i32 = 3;\n\nfn main() {\n    // Channels have two endpoints: the `Sender<T>` and the `Receiver<T>`,\n    // where `T` is the type of the message to be transferred\n    // (type annotation is superfluous)\n    let (tx, rx): (Sender<i32>, Receiver<i32>) = mpsc::channel();\n    let mut children = Vec::new();\n\n    for id in 0..NTHREADS {\n        // The sender endpoint can be copied\n        let thread_tx = tx.clone();\n\n        // Each thread will send its id via the channel\n        let child = thread::spawn(move || {\n            // The thread takes ownership over `thread_tx`\n            // Each thread queues a message in the channel\n            thread_tx.send(id).unwrap();\n\n            // Sending is a non-blocking operation, the thread will continue\n            // immediately after sending its message\n            println!(\"thread {} finished\", id);\n        });\n\n        children.push(child);\n    }\n\n    // Here, all the messages are collected\n    let mut ids = Vec::with_capacity(NTHREADS as usize);\n    for _ in 0..NTHREADS {\n        // The `recv` method picks a message from the channel\n        // `recv` will block the current thread if there are no messages available\n        ids.push(rx.recv());\n    }\n\n    // Wait for the threads to complete any remaining work\n    for child in children {\n        child.join().expect(\"oops! the child thread panicked\");\n    }\n\n    // Show the order in which the messages were sent\n    println!(\"{:?}\", ids);\n}\n```\n"
  },
  {
    "path": "src/std_misc/ffi.md",
    "content": "# Foreign Function Interface\n\nRust provides a Foreign Function Interface (FFI) to C libraries. Foreign\nfunctions must be declared inside an `extern` block annotated with a `#[link]`\nattribute containing the name of the foreign library.\n\n```rust,ignore\nuse std::fmt;\n\n// this extern block links to the libm library\n#[cfg(target_family = \"windows\")]\n#[link(name = \"msvcrt\")]\nextern {\n    // this is a foreign function\n    // that computes the square root of a single precision complex number\n    fn csqrtf(z: Complex) -> Complex;\n\n    fn ccosf(z: Complex) -> Complex;\n}\n#[cfg(target_family = \"unix\")]\n#[link(name = \"m\")]\nextern {\n    // this is a foreign function\n    // that computes the square root of a single precision complex number\n    fn csqrtf(z: Complex) -> Complex;\n\n    fn ccosf(z: Complex) -> Complex;\n}\n\n// Since calling foreign functions is considered unsafe,\n// it's common to write safe wrappers around them.\nfn cos(z: Complex) -> Complex {\n    unsafe { ccosf(z) }\n}\n\nfn main() {\n    // z = -1 + 0i\n    let z = Complex { re: -1., im: 0. };\n\n    // calling a foreign function is an unsafe operation\n    let z_sqrt = unsafe { csqrtf(z) };\n\n    println!(\"the square root of {:?} is {:?}\", z, z_sqrt);\n\n    // calling safe API wrapped around unsafe operation\n    println!(\"cos({:?}) = {:?}\", z, cos(z));\n}\n\n// Minimal implementation of single precision complex numbers\n#[repr(C)]\n#[derive(Clone, Copy)]\nstruct Complex {\n    re: f32,\n    im: f32,\n}\n\nimpl fmt::Debug for Complex {\n    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n        if self.im < 0. {\n            write!(f, \"{}-{}i\", self.re, -self.im)\n        } else {\n            write!(f, \"{}+{}i\", self.re, self.im)\n        }\n    }\n}\n```\n"
  },
  {
    "path": "src/std_misc/file/create.md",
    "content": "# `create`\n\nThe `create` function opens a file in write-only mode. If the file\nalready existed, the old content is destroyed. Otherwise, a new file is\ncreated.\n\n```rust,ignore\nstatic LOREM_IPSUM: &str =\n    \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\";\n\nuse std::fs::File;\nuse std::io::prelude::*;\nuse std::path::Path;\n\nfn main() {\n    let path = Path::new(\"lorem_ipsum.txt\");\n    let display = path.display();\n\n    // Open a file in write-only mode, returns `io::Result<File>`\n    let mut file = match File::create(&path) {\n        Err(why) => panic!(\"couldn't create {}: {}\", display, why),\n        Ok(file) => file,\n    };\n\n    // Write the `LOREM_IPSUM` string to `file`, returns `io::Result<()>`\n    match file.write_all(LOREM_IPSUM.as_bytes()) {\n        Err(why) => panic!(\"couldn't write to {}: {}\", display, why),\n        Ok(_) => println!(\"successfully wrote to {}\", display),\n    }\n}\n```\n\nHere's the expected successful output:\n\n```shell\n$ rustc create.rs && ./create\nsuccessfully wrote to lorem_ipsum.txt\n\n$ cat lorem_ipsum.txt\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n```\n\n(As in the previous example, you are encouraged to test this example under\nfailure conditions.)\n\nThe [`OpenOptions`] struct can be used to configure how a file is opened.\n\n[`OpenOptions`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html\n"
  },
  {
    "path": "src/std_misc/file/open.md",
    "content": "# `open`\n\nThe `open` function can be used to open a file in read-only mode.\n\nA `File` owns a resource, the file descriptor and takes care of closing the\nfile when it is `drop`ed.\n\n```rust,editable,ignore\nuse std::fs::File;\nuse std::io::prelude::*;\nuse std::path::Path;\n\nfn main() {\n    // Create a path to the desired file\n    let path = Path::new(\"hello.txt\");\n    let display = path.display();\n\n    // Open the path in read-only mode, returns `io::Result<File>`\n    let mut file = match File::open(&path) {\n        Err(why) => panic!(\"couldn't open {}: {}\", display, why),\n        Ok(file) => file,\n    };\n\n    // Read the file contents into a string, returns `io::Result<usize>`\n    let mut s = String::new();\n    match file.read_to_string(&mut s) {\n        Err(why) => panic!(\"couldn't read {}: {}\", display, why),\n        Ok(_) => print!(\"{} contains:\\n{}\", display, s),\n    }\n\n    // `file` goes out of scope, and the \"hello.txt\" file gets closed\n}\n```\n\nHere's the expected successful output:\n\n```shell\n$ echo \"Hello World!\" > hello.txt\n$ rustc open.rs && ./open\nhello.txt contains:\nHello World!\n```\n\n(You are encouraged to test the previous example under different failure\nconditions: `hello.txt` doesn't exist, or `hello.txt` is not readable,\netc.)\n"
  },
  {
    "path": "src/std_misc/file/read_lines.md",
    "content": "# `read_lines`\n\n## A naive approach\n\nThis might be a reasonable first attempt for a beginner's first\nimplementation for reading lines from a file.\n\n```rust,no_run\nuse std::fs::read_to_string;\n\nfn read_lines(filename: &str) -> Vec<String> {\n    let mut result = Vec::new();\n\n    for line in read_to_string(filename).unwrap().lines() {\n        result.push(line.to_string())\n    }\n\n    result\n}\n```\n\nSince the method `lines()` returns an iterator over the lines in the file,\nwe can also perform a map inline and collect the results, yielding a more\nconcise and fluent expression.\n\n```rust,no_run\nuse std::fs::read_to_string;\n\nfn read_lines(filename: &str) -> Vec<String> {\n    read_to_string(filename)\n        .unwrap()  // panic on possible file-reading errors\n        .lines()  // split the string into an iterator of string slices\n        .map(String::from)  // make each slice into a string\n        .collect()  // gather them together into a vector\n}\n```\n\nNote that in both examples above, we must convert the `&str` reference\nreturned from `lines()` to the owned type `String`, using `.to_string()`\nand `String::from` respectively.\n\n## A more efficient approach\n\nHere we pass ownership of the open `File` to a `BufReader` struct. `BufReader` uses an internal\nbuffer to reduce intermediate allocations.\n\nWe also update `read_lines` to return an iterator instead of allocating new\n`String` objects in memory for each line.\n\n```rust,no_run\nuse std::fs::File;\nuse std::io::{self, BufRead};\nuse std::path::Path;\n\nfn main() {\n    // File hosts.txt must exist in the current path\n    if let Ok(lines) = read_lines(\"./hosts.txt\") {\n        // Consumes the iterator, returns an (Optional) String\n        for line in lines.map_while(Result::ok) {\n            println!(\"{}\", line);\n        }\n    }\n}\n\n// The output is wrapped in a Result to allow matching on errors.\n// Returns an Iterator to the Reader of the lines of the file.\nfn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>\nwhere P: AsRef<Path>, {\n    let file = File::open(filename)?;\n    Ok(io::BufReader::new(file).lines())\n}\n```\n\nRunning this program simply prints the lines individually.\n\n```shell\n$ echo -e \"127.0.0.1\\n192.168.0.1\\n\" > hosts.txt\n$ rustc read_lines.rs && ./read_lines\n127.0.0.1\n192.168.0.1\n```\n\n(Note that since `File::open` expects a generic `AsRef<Path>` as argument, we define our\ngeneric `read_lines()` method with the same generic constraint, using the `where` keyword.)\n\nThis process is more efficient than creating a `String` in memory with all of the file's\ncontents. This can especially cause performance issues when working with larger files.\n"
  },
  {
    "path": "src/std_misc/file.md",
    "content": "# File I/O\n\nThe `File` struct represents a file that has been opened (it wraps a file\ndescriptor), and gives read and/or write access to the underlying file.\n\nSince many things can go wrong when doing file I/O, all the `File` methods\nreturn the `io::Result<T>` type, which is an alias for `Result<T, io::Error>`.\n\nThis makes the failure of all I/O operations *explicit*. Thanks to this, the\nprogrammer can see all the failure paths, and is encouraged to handle them in\na proactive manner.\n"
  },
  {
    "path": "src/std_misc/fs.md",
    "content": "# Filesystem Operations\n\nThe `std::fs` module contains several functions that deal with the filesystem.\n\n```rust,ignore\nuse std::fs;\nuse std::fs::{File, OpenOptions};\nuse std::io;\nuse std::io::prelude::*;\n#[cfg(target_family = \"unix\")]\nuse std::os::unix;\n#[cfg(target_family = \"windows\")]\nuse std::os::windows;\nuse std::path::Path;\n\n// A simple implementation of `% cat path`\nfn cat(path: &Path) -> io::Result<String> {\n    let mut f = File::open(path)?;\n    let mut s = String::new();\n    match f.read_to_string(&mut s) {\n        Ok(_) => Ok(s),\n        Err(e) => Err(e),\n    }\n}\n\n// A simple implementation of `% echo s > path`\nfn echo(s: &str, path: &Path) -> io::Result<()> {\n    let mut f = File::create(path)?;\n\n    f.write_all(s.as_bytes())\n}\n\n// A simple implementation of `% touch path` (ignores existing files)\nfn touch(path: &Path) -> io::Result<()> {\n    match OpenOptions::new().create(true).write(true).open(path) {\n        Ok(_) => Ok(()),\n        Err(e) => Err(e),\n    }\n}\n\nfn main() {\n    println!(\"`mkdir a`\");\n    // Create a directory, returns `io::Result<()>`\n    match fs::create_dir(\"a\") {\n        Err(why) => println!(\"! {:?}\", why.kind()),\n        Ok(_) => {},\n    }\n\n    println!(\"`echo hello > a/b.txt`\");\n    // The previous match can be simplified using the `unwrap_or_else` method\n    echo(\"hello\", &Path::new(\"a/b.txt\")).unwrap_or_else(|why| {\n        println!(\"! {:?}\", why.kind());\n    });\n\n    println!(\"`mkdir -p a/c/d`\");\n    // Recursively create a directory, returns `io::Result<()>`\n    fs::create_dir_all(\"a/c/d\").unwrap_or_else(|why| {\n        println!(\"! {:?}\", why.kind());\n    });\n\n    println!(\"`touch a/c/e.txt`\");\n    touch(&Path::new(\"a/c/e.txt\")).unwrap_or_else(|why| {\n        println!(\"! {:?}\", why.kind());\n    });\n\n    println!(\"`ln -s ../b.txt a/c/b.txt`\");\n    // Create a symbolic link, returns `io::Result<()>`\n    #[cfg(target_family = \"unix\")] {\n        unix::fs::symlink(\"../b.txt\", \"a/c/b.txt\").unwrap_or_else(|why| {\n            println!(\"! {:?}\", why.kind());\n        });\n    }\n    #[cfg(target_family = \"windows\")] {\n        windows::fs::symlink_file(\"../b.txt\", \"a/c/b.txt\").unwrap_or_else(|why| {\n            println!(\"! {:?}\", why.to_string());\n        });\n    }\n\n    println!(\"`cat a/c/b.txt`\");\n    match cat(&Path::new(\"a/c/b.txt\")) {\n        Err(why) => println!(\"! {:?}\", why.kind()),\n        Ok(s) => println!(\"> {}\", s),\n    }\n\n    println!(\"`ls a`\");\n    // Read the contents of a directory, returns `io::Result<Vec<Path>>`\n    match fs::read_dir(\"a\") {\n        Err(why) => println!(\"! {:?}\", why.kind()),\n        Ok(paths) => for path in paths {\n            println!(\"> {:?}\", path.unwrap().path());\n        },\n    }\n\n    println!(\"`rm a/c/e.txt`\");\n    // Remove a file, returns `io::Result<()>`\n    fs::remove_file(\"a/c/e.txt\").unwrap_or_else(|why| {\n        println!(\"! {:?}\", why.kind());\n    });\n\n    println!(\"`rmdir a/c/d`\");\n    // Remove an empty directory, returns `io::Result<()>`\n    fs::remove_dir(\"a/c/d\").unwrap_or_else(|why| {\n        println!(\"! {:?}\", why.kind());\n    });\n}\n```\n\nHere's the expected successful output:\n\n```shell\n$ rustc fs.rs && ./fs\n`mkdir a`\n`echo hello > a/b.txt`\n`mkdir -p a/c/d`\n`touch a/c/e.txt`\n`ln -s ../b.txt a/c/b.txt`\n`cat a/c/b.txt`\n> hello\n`ls a`\n> \"a/b.txt\"\n> \"a/c\"\n`rm a/c/e.txt`\n`rmdir a/c/d`\n```\n\nAnd the final state of the `a` directory is:\n\n```shell\n$ tree a\na\n|-- b.txt\n`-- c\n    `-- b.txt -> ../b.txt\n\n1 directory, 2 files\n```\n\nAn alternative way to define the function `cat` is with `?` notation:\n\n```rust,ignore\nfn cat(path: &Path) -> io::Result<String> {\n    let mut f = File::open(path)?;\n    let mut s = String::new();\n    f.read_to_string(&mut s)?;\n    Ok(s)\n}\n```\n\n### See also:\n\n[`cfg!`][cfg]\n\n[cfg]: ../attribute/cfg.md\n"
  },
  {
    "path": "src/std_misc/path.md",
    "content": "# Path\n\nThe `Path` type represents file paths in the underlying filesystem. Across all\nplatforms there is a single `std::path::Path` that abstracts over\nplatform-specific path semantics and separators. Bring it into scope with\n`use std::path::Path;` when needed.\n\nA `Path` can be created from an `OsStr`, and provides several methods to get\ninformation from the file/directory the path points to.\n\nA `Path` is immutable. The owned version of `Path` is `PathBuf`. The relation\nbetween `Path` and `PathBuf` is similar to that of `str` and `String`:\na `PathBuf` can be mutated in-place, and can be dereferenced to a `Path`.\n\nNote that a `Path` is *not* internally represented as an UTF-8 string, but\ninstead is stored as an `OsString`. Therefore, converting a `Path` to a `&str`\nis *not* free and may fail (an `Option` is returned). However, a `Path` can be\nfreely converted to an `OsString` or `&OsStr` using `into_os_string` and\n`as_os_str`, respectively.\n\n```rust,editable\nuse std::path::Path;\n\nfn main() {\n    // Create a `Path` from an `&'static str`\n    let path = Path::new(\".\");\n\n    // The `display` method returns a `Display`able structure\n    let _display = path.display();\n\n    // `join` merges a path with a byte container using the OS specific\n    // separator, and returns a `PathBuf`\n    let mut new_path = path.join(\"a\").join(\"b\");\n\n    // `push` extends the `PathBuf` with a `&Path`\n    new_path.push(\"c\");\n    new_path.push(\"myfile.tar.gz\");\n\n    // `set_file_name` updates the file name of the `PathBuf`\n    new_path.set_file_name(\"package.tgz\");\n\n    // Convert the `PathBuf` into a string slice\n    match new_path.to_str() {\n        None => panic!(\"new path is not a valid UTF-8 sequence\"),\n        Some(s) => println!(\"new path is {}\", s),\n    }\n}\n```\n\nBe sure to check other `Path` methods and the `Metadata` struct.\n\n### See also:\n\n[OsStr][1] and [Metadata][2].\n\n[1]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html\n[2]: https://doc.rust-lang.org/std/fs/struct.Metadata.html\n"
  },
  {
    "path": "src/std_misc/process/pipe.md",
    "content": "# Pipes\n\nThe `std::process::Child` struct represents a child process, and exposes the\n`stdin`, `stdout` and `stderr` handles for interaction with the underlying\nprocess via pipes.\n\n```rust,ignore\nuse std::io::prelude::*;\nuse std::process::{Command, Stdio};\n\nstatic PANGRAM: &'static str =\n\"the quick brown fox jumps over the lazy dog\\n\";\n\nfn main() {\n    // Spawn the `wc` command\n    let mut cmd = if cfg!(target_family = \"windows\") {\n        let mut cmd = Command::new(\"powershell\");\n        cmd.arg(\"-Command\").arg(\"$input | Measure-Object -Line -Word -Character\");\n        cmd\n    } else {\n        Command::new(\"wc\")\n    };\n    let process = match cmd\n                                .stdin(Stdio::piped())\n                                .stdout(Stdio::piped())\n                                .spawn() {\n        Err(why) => panic!(\"couldn't spawn wc: {}\", why),\n        Ok(process) => process,\n    };\n\n    // Write a string to the `stdin` of `wc`.\n    //\n    // `stdin` has type `Option<ChildStdin>`, but since we know this instance\n    // must have one, we can directly `unwrap` it.\n    match process.stdin.unwrap().write_all(PANGRAM.as_bytes()) {\n        Err(why) => panic!(\"couldn't write to wc stdin: {}\", why),\n        Ok(_) => println!(\"sent pangram to wc\"),\n    }\n\n    // Because `stdin` does not live after the above calls, it is `drop`ed,\n    // and the pipe is closed.\n    //\n    // This is very important, otherwise `wc` wouldn't start processing the\n    // input we just sent.\n\n    // The `stdout` field also has type `Option<ChildStdout>` so must be unwrapped.\n    let mut s = String::new();\n    match process.stdout.unwrap().read_to_string(&mut s) {\n        Err(why) => panic!(\"couldn't read wc stdout: {}\", why),\n        Ok(_) => print!(\"wc responded with:\\n{}\", s),\n    }\n}\n```\n"
  },
  {
    "path": "src/std_misc/process/wait.md",
    "content": "# Wait\n\nIf you'd like to wait for a `process::Child` to finish, you must call\n`Child::wait`, which will return a `process::ExitStatus`.\n\n```rust,ignore\nuse std::process::Command;\n\nfn main() {\n    let mut child = Command::new(\"sleep\").arg(\"5\").spawn().unwrap();\n    let _result = child.wait().unwrap();\n\n    println!(\"reached end of main\");\n}\n```\n\n```bash\n$ rustc wait.rs && ./wait\n# `wait` keeps running for 5 seconds until the `sleep 5` command finishes\nreached end of main\n```\n"
  },
  {
    "path": "src/std_misc/process.md",
    "content": "# Child processes\n\nThe `process::Output` struct represents the output of a finished child process,\nand the `process::Command` struct is a process builder.\n\n```rust,editable,ignore\nuse std::process::Command;\n\nfn main() {\n    let output = Command::new(\"rustc\")\n        .arg(\"--version\")\n        .output().unwrap_or_else(|e| {\n            panic!(\"failed to execute process: {}\", e)\n    });\n\n    if output.status.success() {\n        let s = String::from_utf8_lossy(&output.stdout);\n\n        print!(\"rustc succeeded and stdout was:\\n{}\", s);\n    } else {\n        let s = String::from_utf8_lossy(&output.stderr);\n\n        print!(\"rustc failed and stderr was:\\n{}\", s);\n    }\n}\n```\n\n(You are encouraged to try the previous example with an incorrect flag passed\nto `rustc`)\n"
  },
  {
    "path": "src/std_misc/threads/testcase_mapreduce.md",
    "content": "# Testcase: map-reduce\n\nRust makes it very easy to parallelize data processing, without many of the headaches traditionally associated with such an attempt.\n\nThe standard library provides great threading primitives out of the box.\nThese, combined with Rust's concept of Ownership and aliasing rules, automatically prevent\ndata races.\n\nThe aliasing rules (one writable reference XOR many readable references) automatically prevent\nyou from manipulating state that is visible to other threads. (Where synchronization is needed,\nthere are synchronization\nprimitives like `Mutex`es or `Channel`s.)\n\nIn this example, we will calculate the sum of all digits in a block of numbers.\nWe will do this by parcelling out chunks of the block into different threads. Each thread will sum\nits tiny block of digits, and subsequently we will sum the intermediate sums produced by each\nthread.\n\nNote that, although we're passing references across thread boundaries, Rust understands that we're\nonly passing read-only references, and that thus no unsafety or data races can occur. Also because\nthe references we're passing have `'static` lifetimes, Rust understands that our data won't be\ndestroyed while these threads are still running. (When you need to share non-`static` data between\nthreads, you can use a smart pointer like `Arc` to keep the data alive and avoid non-`static`\nlifetimes.)\n\n```rust,editable\nuse std::thread;\n\n// This is the `main` thread\nfn main() {\n\n    // This is our data to process.\n    // We will calculate the sum of all digits via a threaded map-reduce algorithm.\n    // Each whitespace separated chunk will be handled in a different thread.\n    //\n    // TODO: see what happens to the output if you insert spaces!\n    let data = \"86967897737416471853297327050364959\n11861322575564723963297542624962850\n70856234701860851907960690014725639\n38397966707106094172783238747669219\n52380795257888236525459303330302837\n58495327135744041048897885734297812\n69920216438980873548808413720956532\n16278424637452589860345374828574668\";\n\n    // Make a vector to hold the child-threads which we will spawn.\n    let mut children = vec![];\n\n    /*************************************************************************\n     * \"Map\" phase\n     *\n     * Divide our data into segments, and apply initial processing\n     ************************************************************************/\n\n    // split our data into segments for individual calculation\n    // each chunk will be a reference (&str) into the actual data\n    let chunked_data = data.split_whitespace();\n\n    // Iterate over the data segments.\n    // .enumerate() adds the current loop index to whatever is iterated\n    // the resulting tuple \"(index, element)\" is then immediately\n    // \"destructured\" into two variables, \"i\" and \"data_segment\" with a\n    // \"destructuring assignment\"\n    for (i, data_segment) in chunked_data.enumerate() {\n        println!(\"data segment {} is \\\"{}\\\"\", i, data_segment);\n\n        // Process each data segment in a separate thread\n        //\n        // spawn() returns a handle to the new thread,\n        // which we MUST keep to access the returned value\n        //\n        // 'move || -> u32' is syntax for a closure that:\n        // * takes no arguments ('||')\n        // * takes ownership of its captured variables ('move') and\n        // * returns an unsigned 32-bit integer ('-> u32')\n        //\n        // Rust is smart enough to infer the '-> u32' from\n        // the closure itself so we could have left that out.\n        //\n        // TODO: try removing the 'move' and see what happens\n        children.push(thread::spawn(move || -> u32 {\n            // Calculate the intermediate sum of this segment:\n            let result = data_segment\n                        // iterate over the characters of our segment..\n                        .chars()\n                        // .. convert text-characters to their number value..\n                        .map(|c| c.to_digit(10).expect(\"should be a digit\"))\n                        // .. and sum the resulting iterator of numbers\n                        .sum();\n\n            // println! locks stdout, so no text-interleaving occurs\n            println!(\"processed segment {}, result={}\", i, result);\n\n            // \"return\" not needed, because Rust is an \"expression language\", the\n            // last evaluated expression in each block is automatically its value.\n            result\n\n        }));\n    }\n\n\n    /*************************************************************************\n     * \"Reduce\" phase\n     *\n     * Collect our intermediate results, and combine them into a final result\n     ************************************************************************/\n\n    // combine each thread's intermediate results into a single final sum.\n    //\n    // we use the \"turbofish\" ::<> to provide sum() with a type hint.\n    //\n    // TODO: try without the turbofish, by instead explicitly\n    // specifying the type of final_result\n    let final_result = children.into_iter().map(|c| c.join().unwrap()).sum::<u32>();\n\n    println!(\"Final sum result: {}\", final_result);\n}\n```\n\n### Assignments\n\nIt is not wise to let our number of threads depend on user inputted data.\nWhat if the user decides to insert a lot of spaces? Do we _really_ want to spawn 2,000 threads?\nModify the program so that the data is always chunked into a limited number of chunks,\ndefined by a static constant at the beginning of the program.\n\n### See also:\n\n* [Threads][thread]\n* [vectors][vectors] and [iterators][iterators]\n* [closures][closures], [move][move] semantics and [`move` closures][move_closure]\n* [destructuring][destructuring] assignments\n* [turbofish notation][turbofish] to help type inference\n* [unwrap vs. expect][unwrap]\n* [enumerate][enumerate]\n\n[thread]: ../threads.md\n[vectors]: ../../std/vec.md\n[iterators]: ../../trait/iter.md\n[destructuring]: https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html#destructuring-to-break-apart-values\n[closures]: ../../fn/closures.md\n[move]: ../../scope/move.md\n[move_closure]: https://doc.rust-lang.org/book/ch13-01-closures.html#closures-can-capture-their-environment\n[turbofish]: https://doc.rust-lang.org/book/appendix-02-operators.html?highlight=turbofish\n[unwrap]: ../../error/option_unwrap.md\n[enumerate]: https://doc.rust-lang.org/book/loops.html#enumerate\n"
  },
  {
    "path": "src/std_misc/threads.md",
    "content": "# Threads\n\nRust provides a mechanism for spawning native OS threads via the `spawn`\nfunction, the argument of this function is a moving closure.\n\n```rust,editable\nuse std::thread;\n\nconst NTHREADS: u32 = 10;\n\n// This is the `main` thread\nfn main() {\n    // Make a vector to hold the children which are spawned.\n    let mut children = vec![];\n\n    for i in 0..NTHREADS {\n        // Spin up another thread\n        children.push(thread::spawn(move || {\n            println!(\"this is thread number {}\", i);\n        }));\n    }\n\n    for child in children {\n        // Wait for the thread to finish. Returns a result.\n        let _ = child.join();\n    }\n}\n```\n\nThese threads will be scheduled by the OS.\n"
  },
  {
    "path": "src/std_misc.md",
    "content": "# Std misc\n\nMany other types are provided by the std library to support\nthings such as:\n\n* Threads\n* Channels\n* File I/O\n\nThese expand beyond what the [primitives] provide.\n\n### See also:\n\n[primitives] and [the std library][std]\n\n[primitives]: primitives.md\n[std]: https://doc.rust-lang.org/std/\n"
  },
  {
    "path": "src/testing/dev_dependencies.md",
    "content": "# Development dependencies\n\nSometimes there is a need to have dependencies for tests (or examples,\nor benchmarks) only. Such dependencies are added to `Cargo.toml` in the\n`[dev-dependencies]` section. These dependencies are not propagated to other\npackages which depend on this package.\n\nOne such example is [`pretty_assertions`](https://docs.rs/pretty_assertions/1.0.0/pretty_assertions/index.html), which extends standard `assert_eq!` and `assert_ne!` macros, to provide colorful diff.\nFile `Cargo.toml`:\n\n```toml\n# standard crate data is left out\n[dev-dependencies]\npretty_assertions = \"1\"\n```\n\nFile `src/lib.rs`:\n\n```rust,ignore\npub fn add(a: i32, b: i32) -> i32 {\n    a + b\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use pretty_assertions::assert_eq; // crate for test-only use. Cannot be used in non-test code.\n\n    #[test]\n    fn test_add() {\n        assert_eq!(add(2, 3), 5);\n    }\n}\n```\n\n## See Also\n\n[Cargo][cargo] docs on specifying dependencies.\n\n[cargo]: http://doc.crates.io/specifying-dependencies.html\n"
  },
  {
    "path": "src/testing/doc_testing.md",
    "content": "# Documentation testing\n\nThe primary way of documenting a Rust project is through annotating the source\ncode. Documentation comments are written in\n[CommonMark Markdown specification][commonmark] and support code blocks in them.\nRust takes care about correctness, so these code blocks are compiled and used\nas documentation tests.\n\n```rust,ignore\n/// First line is a short summary describing function.\n///\n/// The next lines present detailed documentation. Code blocks start with\n/// triple backquotes and have implicit `fn main()` inside\n/// and `extern crate <cratename>`. Assume we're testing a `playground` library\n/// crate or using the Playground's Test action:\n///\n/// ```\n/// let result = playground::add(2, 3);\n/// assert_eq!(result, 5);\n/// ```\npub fn add(a: i32, b: i32) -> i32 {\n    a + b\n}\n\n/// Usually doc comments may include sections \"Examples\", \"Panics\" and \"Failures\".\n///\n/// The next function divides two numbers.\n///\n/// # Examples\n///\n/// ```\n/// let result = playground::div(10, 2);\n/// assert_eq!(result, 5);\n/// ```\n///\n/// # Panics\n///\n/// The function panics if the second argument is zero.\n///\n/// ```rust,should_panic\n/// // panics on division by zero\n/// playground::div(10, 0);\n/// ```\npub fn div(a: i32, b: i32) -> i32 {\n    if b == 0 {\n        panic!(\"Divide-by-zero error\");\n    }\n\n    a / b\n}\n```\n\nCode blocks in documentation are automatically tested\nwhen running the regular `cargo test` command:\n\n```shell\n$ cargo test\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n\n   Doc-tests playground\n\nrunning 3 tests\ntest src/lib.rs - add (line 7) ... ok\ntest src/lib.rs - div (line 21) ... ok\ntest src/lib.rs - div (line 31) ... ok\n\ntest result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\n## Motivation behind documentation tests\n\nThe main purpose of documentation tests is to serve as examples that exercise\nthe functionality, which is one of the most important\n[guidelines][question-instead-of-unwrap]. It allows using examples from docs as\ncomplete code snippets. But using `?` makes compilation fail since `main`\nreturns `unit`. The ability to hide some source lines from documentation comes\nto the rescue: one may write `fn try_main() -> Result<(), ErrorType>`, hide it\nand `unwrap` it in hidden `main`. Sounds complicated? Here's an example:\n\n```rust,ignore\n/// Using hidden `try_main` in doc tests.\n///\n/// ```\n/// # // hidden lines start with `#` symbol, but they're still compilable!\n/// # fn try_main() -> Result<(), String> { // line that wraps the body shown in doc\n/// let res = playground::try_div(10, 2)?;\n/// # Ok(()) // returning from try_main\n/// # }\n/// # fn main() { // starting main that'll unwrap()\n/// #    try_main().unwrap(); // calling try_main and unwrapping\n/// #                         // so that test will panic in case of error\n/// # }\n/// ```\npub fn try_div(a: i32, b: i32) -> Result<i32, String> {\n    if b == 0 {\n        Err(String::from(\"Divide-by-zero\"))\n    } else {\n        Ok(a / b)\n    }\n}\n```\n\n## See Also\n\n* [RFC505][RFC505] on documentation style\n* [API Guidelines][doc-nursery] on documentation guidelines\n\n[doc-nursery]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html\n[commonmark]: https://commonmark.org/\n[RFC505]: https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md\n[question-instead-of-unwrap]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#examples-use--not-try-not-unwrap-c-question-mark\n"
  },
  {
    "path": "src/testing/integration_testing.md",
    "content": "# Integration testing\n\n[Unit tests][unit] are testing one module in isolation at a time: they're small\nand can test private code. Integration tests are external to your crate and use\nonly its public interface in the same way any other code would. Their purpose is\nto test that many parts of your library work correctly together.\n\nCargo looks for integration tests in `tests` directory next to `src`.\n\nFile `src/lib.rs`:\n\n```rust,ignore\n// Define this in a crate called `adder`.\npub fn add(a: i32, b: i32) -> i32 {\n    a + b\n}\n```\n\nFile with test: `tests/integration_test.rs`:\n\n```rust,ignore\n#[test]\nfn test_add() {\n    assert_eq!(adder::add(3, 2), 5);\n}\n```\n\nRunning tests with `cargo test` command:\n\n```shell\n$ cargo test\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n\n     Running target/debug/deps/integration_test-bcd60824f5fbfe19\n\nrunning 1 test\ntest test_add ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n\n   Doc-tests adder\n\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\nEach Rust source file in the `tests` directory is compiled as a separate crate. In\norder to share some code between integration tests we can make a module with public\nfunctions, importing and using it within tests.\n\nFile `tests/common/mod.rs`:\n\n```rust,ignore\npub fn setup() {\n    // some setup code, like creating required files/directories, starting\n    // servers, etc.\n}\n```\n\nFile with test: `tests/integration_test.rs`\n\n```rust,ignore\n// importing common module.\nmod common;\n\n#[test]\nfn test_add() {\n    // using common code.\n    common::setup();\n    assert_eq!(adder::add(3, 2), 5);\n}\n```\n\nCreating the module as `tests/common.rs` also works, but is not recommended\nbecause the test runner will treat the file as a test crate and try to run tests\ninside it.\n\n[unit]: unit_testing.md\n[mod]: ../mod.md\n"
  },
  {
    "path": "src/testing/unit_testing.md",
    "content": "# Unit testing\n\nTests are Rust functions that verify that the non-test code is functioning in\nthe expected manner. The bodies of test functions typically perform some setup,\nrun the code we want to test, then assert whether the results are what we\nexpect.\n\nMost unit tests go into a `tests` [mod][mod] with the `#[cfg(test)]` [attribute][attribute].\nTest functions are marked with the `#[test]` attribute.\n\nTests fail when something in the test function [panics][panic]. There are some\nhelper [macros][macros]:\n\n* `assert!(expression)` - panics if expression evaluates to `false`.\n* `assert_eq!(left, right)` and `assert_ne!(left, right)` - testing left and\n  right expressions for equality and inequality respectively.\n\n```rust,ignore\npub fn add(a: i32, b: i32) -> i32 {\n    a + b\n}\n\n// This is a really bad adding function, its purpose is to fail in this\n// example.\n#[allow(dead_code)]\nfn bad_add(a: i32, b: i32) -> i32 {\n    a - b\n}\n\n#[cfg(test)]\nmod tests {\n    // Note this useful idiom: importing names from outer (for mod tests) scope.\n    use super::*;\n\n    #[test]\n    fn test_add() {\n        assert_eq!(add(1, 2), 3);\n    }\n\n    #[test]\n    fn test_bad_add() {\n        // This assert would fire and test will fail.\n        // Please note, that private functions can be tested too!\n        assert_eq!(bad_add(1, 2), 3);\n    }\n}\n```\n\nTests can be run with `cargo test`.\n\n```shell\n$ cargo test\n\nrunning 2 tests\ntest tests::test_bad_add ... FAILED\ntest tests::test_add ... ok\n\nfailures:\n\n---- tests::test_bad_add stdout ----\n        thread 'tests::test_bad_add' panicked at 'assertion failed: `(left == right)`\n  left: `-1`,\n right: `3`', src/lib.rs:21:8\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\n\n\nfailures:\n    tests::test_bad_add\n\ntest result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\n## Tests and `?`\n\nNone of the previous unit test examples had a return type. But in Rust 2018,\nyour unit tests can return `Result<()>`, which lets you use `?` in them! This\ncan make them much more concise.\n\n```rust,editable\nfn sqrt(number: f64) -> Result<f64, String> {\n    if number >= 0.0 {\n        Ok(number.powf(0.5))\n    } else {\n        Err(\"negative floats don't have square roots\".to_owned())\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_sqrt() -> Result<(), String> {\n        let x = 4.0;\n        assert_eq!(sqrt(x)?.powf(2.0), x);\n        Ok(())\n    }\n}\n```\n\nSee [\"The Edition Guide\"][editionguide] for more details.\n\n## Testing panics\n\nTo check functions that should panic under certain circumstances, use attribute\n`#[should_panic]`. This attribute accepts optional parameter `expected = ` with\nthe text of the panic message. If your function can panic in multiple ways, it helps\nmake sure your test is testing the correct panic.\n\n**Note**: Rust also allows a shorthand form `#[should_panic = \"message\"]`, which works\nexactly like `#[should_panic(expected = \"message\")]`. Both are valid; the latter is more commonly\nused and is considered more explicit.\n\n```rust,ignore\npub fn divide_non_zero_result(a: u32, b: u32) -> u32 {\n    if b == 0 {\n        panic!(\"Divide-by-zero error\");\n    } else if a < b {\n        panic!(\"Divide result is zero\");\n    }\n    a / b\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_divide() {\n        assert_eq!(divide_non_zero_result(10, 2), 5);\n    }\n\n    #[test]\n    #[should_panic]\n    fn test_any_panic() {\n        divide_non_zero_result(1, 0);\n    }\n\n    #[test]\n    #[should_panic(expected = \"Divide result is zero\")]\n    fn test_specific_panic() {\n        divide_non_zero_result(1, 10);\n    }\n\n    #[test]\n    #[should_panic = \"Divide result is zero\"] // This also works\n    fn test_specific_panic_shorthand() {\n        divide_non_zero_result(1, 10);\n    }\n}\n```\n\nRunning these tests gives us:\n\n```shell\n$ cargo test\n\nrunning 4 tests\ntest tests::test_any_panic ... ok\ntest tests::test_divide ... ok\ntest tests::test_specific_panic ... ok\ntest tests::test_specific_panic_shorthand ... ok\n\ntest result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n\n   Doc-tests tmp-test-should-panic\n\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\n## Running specific tests\n\nTo run specific tests one may specify the test name to `cargo test` command.\n\n```shell\n$ cargo test test_any_panic\nrunning 1 test\ntest tests::test_any_panic ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 3 filtered out\n\n   Doc-tests tmp-test-should-panic\n\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\nTo run multiple tests one may specify part of a test name that matches all the\ntests that should be run.\n\n```shell\n$ cargo test panic\nrunning 3 tests\ntest tests::test_any_panic ... ok\ntest tests::test_specific_panic ... ok\ntest tests::test_specific_panic_shorthand ... ok\n\ntest result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out\n\n   Doc-tests tmp-test-should-panic\n\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\n## Ignoring tests\n\nTests can be marked with the `#[ignore]` attribute to exclude some tests. Or to run\nthem with command `cargo test -- --ignored`\n\n```rust,ignore\npub fn add(a: i32, b: i32) -> i32 {\n    a + b\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_add() {\n        assert_eq!(add(2, 2), 4);\n    }\n\n    #[test]\n    fn test_add_hundred() {\n        assert_eq!(add(100, 2), 102);\n        assert_eq!(add(2, 100), 102);\n    }\n\n    #[test]\n    #[ignore]\n    fn ignored_test() {\n        assert_eq!(add(0, 0), 0);\n    }\n}\n```\n\n```shell\n$ cargo test\nrunning 3 tests\ntest tests::ignored_test ... ignored\ntest tests::test_add ... ok\ntest tests::test_add_hundred ... ok\n\ntest result: ok. 2 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out\n\n   Doc-tests tmp-ignore\n\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n\n$ cargo test -- --ignored\nrunning 1 test\ntest tests::ignored_test ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n\n   Doc-tests tmp-ignore\n\nrunning 0 tests\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\n[attribute]: ../attribute.md\n[panic]: ../std/panic.md\n[macros]: ../macros.md\n[mod]: ../mod.md\n[editionguide]: https://doc.rust-lang.org/edition-guide/rust-2018/error-handling-and-panics/question-mark-in-main-and-tests.html\n"
  },
  {
    "path": "src/testing.md",
    "content": "# Testing\n\nRust is a programming language that cares a lot about correctness and it\nincludes support for writing software tests within the language itself.\n\nTesting comes in three styles:\n\n* [Unit][unit] testing.\n* [Doc][doc] testing.\n* [Integration][integration] testing.\n\nAlso Rust has support for specifying additional dependencies for tests:\n\n* [Dev-dependencies][dev-dependencies]\n\n## See Also\n\n* [The Book][doc-testing] chapter on testing\n* [API Guidelines][doc-nursery] on doc-testing\n\n[unit]: testing/unit_testing.md\n[doc]: testing/doc_testing.md\n[integration]: testing/integration_testing.md\n[dev-dependencies]: testing/dev_dependencies.md\n[doc-testing]: https://doc.rust-lang.org/book/ch11-00-testing.html\n[doc-nursery]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html\n"
  },
  {
    "path": "src/trait/clone.md",
    "content": "# Clone and Copy\n\nWhen dealing with resources, the default behavior is to transfer them during\nassignments or function calls. However, sometimes we need to make a\ncopy of the resource as well.\n\nThe [`Clone`][clone] trait helps us do exactly this. Most commonly, we can\nuse the `.clone()` method defined by the `Clone` trait.\n\n## Copy: Implicit Cloning\n\nThe [`Copy`][copy] trait allows a type to be duplicated simply by copying bits,\nwith no additional logic required. When a type implements `Copy`, assignments\nand function calls will implicitly copy the value instead of moving it.\n\n**Important:** `Copy` requires `Clone` - any type that implements `Copy` must\nalso implement `Clone`. This is because `Copy` is defined as a subtrait:\n`trait Copy: Clone {}`. The `Clone` implementation for `Copy` types simply\ncopies the bits.\n\nNot all types can implement `Copy`. A type can only be `Copy` if:\n- All of its components are `Copy`\n- It doesn't manage external resources (like heap memory, file handles, etc.)\n\n```rust,editable\n// A unit struct without resources\n// Note: Copy requires Clone, so we must derive both\n#[derive(Debug, Clone, Copy)]\nstruct Unit;\n\n// A tuple struct with resources that implements the `Clone` trait\n// This CANNOT be Copy because Box<T> is not Copy\n#[derive(Clone, Debug)]\nstruct Pair(Box<i32>, Box<i32>);\n\nfn main() {\n    // Instantiate `Unit`\n    let unit = Unit;\n    // Copy `Unit` - this is an implicit copy, not a move!\n    // Because Unit implements Copy, the value is duplicated automatically\n    let copied_unit = unit;\n\n    // Both `Unit`s can be used independently\n    println!(\"original: {:?}\", unit);\n    println!(\"copy: {:?}\", copied_unit);\n\n    // Instantiate `Pair`\n    let pair = Pair(Box::new(1), Box::new(2));\n    println!(\"original: {:?}\", pair);\n\n    // Move `pair` into `moved_pair`, moves resources\n    // Pair does not implement Copy, so this is a move\n    let moved_pair = pair;\n    println!(\"moved: {:?}\", moved_pair);\n\n    // Error! `pair` has lost its resources\n    //println!(\"original: {:?}\", pair);\n    // TODO ^ Try uncommenting this line\n\n    // Clone `moved_pair` into `cloned_pair` (resources are included)\n    // Unlike Copy, Clone is explicit - we must call .clone()\n    let cloned_pair = moved_pair.clone();\n    // Drop the moved original pair using std::mem::drop\n    drop(moved_pair);\n\n    // Error! `moved_pair` has been dropped\n    //println!(\"moved and dropped: {:?}\", moved_pair);\n    // TODO ^ Try uncommenting this line\n\n    // The result from .clone() can still be used!\n    println!(\"clone: {:?}\", cloned_pair);\n}\n```\n\n[clone]: https://doc.rust-lang.org/std/clone/trait.Clone.html\n[copy]: https://doc.rust-lang.org/std/marker/trait.Copy.html\n"
  },
  {
    "path": "src/trait/derive.md",
    "content": "# Derive\n\nThe compiler is capable of providing basic implementations for some traits via\nthe `#[derive]` [attribute][attribute]. These traits can still be\nmanually implemented if a more complex behavior is required.\n\nThe following is a list of derivable traits:\n\n* Comparison traits:\n  [`Eq`][eq], [`PartialEq`][partial-eq], [`Ord`][ord], [`PartialOrd`][partial-ord].\n* [`Clone`][clone], to create `T` from `&T` via a copy.\n* [`Copy`][copy], to give a type 'copy semantics' instead of 'move semantics'.\n* [`Hash`][hash], to compute a hash from `&T`.\n* [`Default`][default], to create an empty instance of a data type.\n* [`Debug`][debug], to format a value using the `{:?}` formatter.\n\n```rust,editable\n// `Centimeters`, a tuple struct that can be compared\n#[derive(PartialEq, PartialOrd)]\nstruct Centimeters(f64);\n\n// `Inches`, a tuple struct that can be printed\n#[derive(Debug)]\nstruct Inches(i32);\n\nimpl Inches {\n    fn to_centimeters(&self) -> Centimeters {\n        let &Inches(inches) = self;\n\n        Centimeters(inches as f64 * 2.54)\n    }\n}\n\n// `Seconds`, a tuple struct with no additional attributes\nstruct Seconds(i32);\n\nfn main() {\n    let _one_second = Seconds(1);\n\n    // Error: `Seconds` can't be printed; it doesn't implement the `Debug` trait\n    //println!(\"One second looks like: {:?}\", _one_second);\n    // TODO ^ Try uncommenting this line\n\n    // Error: `Seconds` can't be compared; it doesn't implement the `PartialEq` trait\n    //let _this_is_true = (_one_second == _one_second);\n    // TODO ^ Try uncommenting this line\n\n    let foot = Inches(12);\n\n    println!(\"One foot equals {:?}\", foot);\n\n    let meter = Centimeters(100.0);\n\n    let cmp =\n        if foot.to_centimeters() < meter {\n            \"smaller\"\n        } else {\n            \"bigger\"\n        };\n\n    println!(\"One foot is {} than one meter.\", cmp);\n}\n```\n\n### See also:\n\n[`derive`][derive]\n\n[attribute]: ../attribute.md\n[eq]: https://doc.rust-lang.org/std/cmp/trait.Eq.html\n[partial-eq]: https://doc.rust-lang.org/std/cmp/trait.PartialEq.html\n[ord]: https://doc.rust-lang.org/std/cmp/trait.Ord.html\n[partial-ord]: https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html\n[clone]: https://doc.rust-lang.org/std/clone/trait.Clone.html\n[copy]: https://doc.rust-lang.org/core/marker/trait.Copy.html\n[hash]: https://doc.rust-lang.org/std/hash/trait.Hash.html\n[default]: https://doc.rust-lang.org/std/default/trait.Default.html\n[debug]: https://doc.rust-lang.org/std/fmt/trait.Debug.html\n[derive]: https://doc.rust-lang.org/reference/attributes.html#derive\n"
  },
  {
    "path": "src/trait/disambiguating.md",
    "content": "# Disambiguating overlapping traits\n\nA type can implement many different traits. What if two traits both require\nthe same name for a function? For example, many traits might have a method\nnamed `get()`. They might even have different return types!\n\nGood news: because each trait implementation gets its own `impl` block, it's\nclear which trait's `get` method you're implementing.\n\nWhat about when it comes time to _call_ those methods? To disambiguate between\nthem, we have to use Fully Qualified Syntax.\n\n```rust,editable\ntrait UsernameWidget {\n    // Get the selected username out of this widget\n    fn get(&self) -> String;\n}\n\ntrait AgeWidget {\n    // Get the selected age out of this widget\n    fn get(&self) -> u8;\n}\n\n// A form with both a UsernameWidget and an AgeWidget\nstruct Form {\n    username: String,\n    age: u8,\n}\n\nimpl UsernameWidget for Form {\n    fn get(&self) -> String {\n        self.username.clone()\n    }\n}\n\nimpl AgeWidget for Form {\n    fn get(&self) -> u8 {\n        self.age\n    }\n}\n\nfn main() {\n    let form = Form {\n        username: \"rustacean\".to_owned(),\n        age: 28,\n    };\n\n    // If you uncomment this line, you'll get an error saying\n    // \"multiple `get` found\". Because, after all, there are multiple methods\n    // named `get`.\n    // println!(\"{}\", form.get());\n\n    let username = <Form as UsernameWidget>::get(&form);\n    assert_eq!(\"rustacean\".to_owned(), username);\n    let age = <Form as AgeWidget>::get(&form);\n    assert_eq!(28, age);\n}\n```\n\n### See also:\n\n[The Rust Programming Language chapter on Fully Qualified syntax][trpl_fqsyntax]\n\n[trpl_fqsyntax]: https://doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name\n"
  },
  {
    "path": "src/trait/drop.md",
    "content": "# Drop\n\nThe [`Drop`][Drop] trait only has one method: `drop`, which is called automatically\nwhen an object goes out of scope. The main use of the `Drop` trait is to free the\nresources that the implementor instance owns.\n\n`Box`, `Vec`, `String`, `File`, and `Process` are some examples of types that\nimplement the `Drop` trait to free resources. The `Drop` trait can also be\nmanually implemented for any custom data type.\n\nThe following example adds a print to console to the `drop` function to announce\nwhen it is called.\n\n```rust,editable\nstruct Droppable {\n    name: &'static str,\n}\n\n// This trivial implementation of `drop` adds a print to console.\nimpl Drop for Droppable {\n    fn drop(&mut self) {\n        println!(\"> Dropping {}\", self.name);\n    }\n}\n\nfn main() {\n    let _a = Droppable { name: \"a\" };\n\n    // block A\n    {\n        let _b = Droppable { name: \"b\" };\n\n        // block B\n        {\n            let _c = Droppable { name: \"c\" };\n            let _d = Droppable { name: \"d\" };\n\n            println!(\"Exiting block B\");\n        }\n        println!(\"Just exited block B\");\n\n        println!(\"Exiting block A\");\n    }\n    println!(\"Just exited block A\");\n\n    // Variable can be manually dropped using the `drop` function\n    drop(_a);\n    // TODO ^ Try commenting this line\n\n    println!(\"end of the main function\");\n\n    // `_a` *won't* be `drop`ed again here, because it already has been\n    // (manually) `drop`ed\n}\n```\n\nFor a more practical example, here's how the `Drop` trait can be used to automatically\nclean up temporary files when they're no longer needed:\n\n```rust,editable\nuse std::fs::File;\nuse std::path::PathBuf;\n\nstruct TempFile {\n    file: File,\n    path: PathBuf,\n}\n\nimpl TempFile {\n    fn new(path: PathBuf) -> std::io::Result<Self> {\n        // Note: File::create() will overwrite existing files\n        let file = File::create(&path)?;\n\n        Ok(Self { file, path })\n    }\n}\n\n// When TempFile is dropped:\n// 1. First, our drop implementation will remove the file's name from the filesystem.\n// 2. Then, File's drop will close the file, removing its underlying content from the disk.\nimpl Drop for TempFile {\n    fn drop(&mut self) {\n        if let Err(e) = std::fs::remove_file(&self.path) {\n            eprintln!(\"Failed to remove temporary file: {}\", e);\n        }\n        println!(\"> Dropped temporary file: {:?}\", self.path);\n        // File's drop is implicitly called here because it is a field of this struct.\n    }\n}\n\nfn main() -> std::io::Result<()> {\n    // Create a new scope to demonstrate drop behavior\n    {\n        let temp = TempFile::new(\"test.txt\".into())?;\n        println!(\"Temporary file created\");\n        // File will be automatically cleaned up when temp goes out of scope\n    }\n    println!(\"End of scope - file should be cleaned up\");\n\n    // We can also manually drop if needed\n    let temp2 = TempFile::new(\"another_test.txt\".into())?;\n    drop(temp2); // Explicitly drop the file\n    println!(\"Manually dropped file\");\n\n    Ok(())\n}\n```\n\n[Drop]: https://doc.rust-lang.org/std/ops/trait.Drop.html\n"
  },
  {
    "path": "src/trait/dyn.md",
    "content": "# Returning Traits with `dyn`\n\nThe Rust compiler needs to know how much space every function's return type requires. This means all\nyour functions have to return a concrete type. Unlike other languages, if you have a trait like\n`Animal`, you can't write a function that returns `Animal`, because its different implementations\nwill need different amounts of memory.\n\nHowever, there's an easy workaround. Instead of returning a trait object directly, our functions\nreturn a `Box` which _contains_ some `Animal`. A `box` is just a reference to some memory in the\nheap. Because a reference has a statically-known size, and the compiler can guarantee it points to a\nheap-allocated `Animal`, we can return a trait from our function!\n\nRust tries to be as explicit as possible whenever it allocates memory on the heap. So if your\nfunction returns a pointer-to-trait-on-heap in this way, you need to write the return type with the\n`dyn` keyword, e.g. `Box<dyn Animal>`.\n\n```rust,editable\nstruct Sheep {}\nstruct Cow {}\n\ntrait Animal {\n    // Instance method signature\n    fn noise(&self) -> &'static str;\n}\n\n// Implement the `Animal` trait for `Sheep`.\nimpl Animal for Sheep {\n    fn noise(&self) -> &'static str {\n        \"baaaaah!\"\n    }\n}\n\n// Implement the `Animal` trait for `Cow`.\nimpl Animal for Cow {\n    fn noise(&self) -> &'static str {\n        \"moooooo!\"\n    }\n}\n\n// Returns some struct that implements Animal, but we don't know which one at compile time.\nfn random_animal(random_number: f64) -> Box<dyn Animal> {\n    if random_number < 0.5 {\n        Box::new(Sheep {})\n    } else {\n        Box::new(Cow {})\n    }\n}\n\nfn main() {\n    let random_number = 0.234;\n    let animal = random_animal(random_number);\n    println!(\"You've randomly chosen an animal, and it says {}\", animal.noise());\n}\n\n```\n"
  },
  {
    "path": "src/trait/impl_trait.md",
    "content": "# `impl Trait`\n\n`impl Trait` can be used in two locations:\n\n1. as an argument type\n2. as a return type\n\n## As an argument type\n\nIf your function is generic over a trait but you don't mind the specific type, you can simplify the function declaration using `impl Trait` as the type of the argument.\n\nFor example, consider the following code:\n\n```rust,editable\nfn parse_csv_document<R: std::io::BufRead>(src: R) -> std::io::Result<Vec<Vec<String>>> {\n    src.lines()\n        .map(|line| {\n            // For each line in the source\n            line.map(|line| {\n                // If the line was read successfully, process it, if not, return the error\n                line.split(',') // Split the line separated by commas\n                    .map(|entry| String::from(entry.trim())) // Remove leading and trailing whitespace\n                    .collect() // Collect all strings in a row into a Vec<String>\n            })\n        })\n        .collect() // Collect all lines into a Vec<Vec<String>>\n}\n```\n\n`parse_csv_document` is generic, allowing it to take any type which implements BufRead, such as `BufReader<File>` or `[u8]`,\nbut it's not important what type `R` is, and `R` is only used to declare the type of `src`, so the function can also be written as:\n\n```rust,editable\nfn parse_csv_document(src: impl std::io::BufRead) -> std::io::Result<Vec<Vec<String>>> {\n    src.lines()\n        .map(|line| {\n            // For each line in the source\n            line.map(|line| {\n                // If the line was read successfully, process it, if not, return the error\n                line.split(',') // Split the line separated by commas\n                    .map(|entry| String::from(entry.trim())) // Remove leading and trailing whitespace\n                    .collect() // Collect all strings in a row into a Vec<String>\n            })\n        })\n        .collect() // Collect all lines into a Vec<Vec<String>>\n}\n```\n\nNote that using `impl Trait` as an argument type means that you cannot explicitly state what form of the function you use, i.e. `parse_csv_document::<std::io::Empty>(std::io::empty())` will not work with the second example.\n\n## As a return type\n\nIf your function returns a type that implements `MyTrait`, you can write its\nreturn type as `-> impl MyTrait`. This can help simplify your type signatures quite a lot!\n\n```rust,editable\nuse std::iter;\nuse std::vec::IntoIter;\n\n// This function combines two `Vec<i32>` and returns an iterator over it.\n// Look how complicated its return type is!\nfn combine_vecs_explicit_return_type(\n    v: Vec<i32>,\n    u: Vec<i32>,\n) -> iter::Cycle<iter::Chain<IntoIter<i32>, IntoIter<i32>>> {\n    v.into_iter().chain(u.into_iter()).cycle()\n}\n\n// This is the exact same function, but its return type uses `impl Trait`.\n// Look how much simpler it is!\nfn combine_vecs(\n    v: Vec<i32>,\n    u: Vec<i32>,\n) -> impl Iterator<Item=i32> {\n    v.into_iter().chain(u.into_iter()).cycle()\n}\n\nfn main() {\n    let v1 = vec![1, 2, 3];\n    let v2 = vec![4, 5];\n    let mut v3 = combine_vecs(v1, v2);\n    assert_eq!(Some(1), v3.next());\n    assert_eq!(Some(2), v3.next());\n    assert_eq!(Some(3), v3.next());\n    assert_eq!(Some(4), v3.next());\n    assert_eq!(Some(5), v3.next());\n    println!(\"all done\");\n}\n```\n\nMore importantly, some Rust types can't be written out. For example, every\nclosure has its own unnamed concrete type. Before `impl Trait` syntax, you had\nto allocate on the heap in order to return a closure. But now you can do it all\nstatically, like this:\n\n```rust,editable\n// Returns a function that adds `y` to its input\nfn make_adder_function(y: i32) -> impl Fn(i32) -> i32 {\n    let closure = move |x: i32| { x + y };\n    closure\n}\n\nfn main() {\n    let plus_one = make_adder_function(1);\n    assert_eq!(plus_one(2), 3);\n}\n```\n\nYou can also use `impl Trait` to return an iterator that uses `map` or `filter`\nclosures! This makes using `map` and `filter` easier. Because closure types don't\nhave names, you can't write out an explicit return type if your function returns\niterators with closures. But with `impl Trait` you can do this easily:\n\n```rust,editable\nfn double_positives<'a>(numbers: &'a Vec<i32>) -> impl Iterator<Item = i32> + 'a {\n    numbers\n        .iter()\n        .filter(|x| x > &&0)\n        .map(|x| x * 2)\n}\n\nfn main() {\n    let singles = vec![-3, -2, 2, 3];\n    let doubles = double_positives(&singles);\n    assert_eq!(doubles.collect::<Vec<i32>>(), vec![4, 6]);\n}\n```\n"
  },
  {
    "path": "src/trait/iter.md",
    "content": "# Iterators\n\nThe [`Iterator`][iter] trait is used to implement iterators over collections\nsuch as arrays.\n\nThe trait requires only a method to be defined for the `next` element,\nwhich may be manually defined in an `impl` block or automatically\ndefined (as in arrays and ranges).\n\nAs a point of convenience for common situations, the `for` construct\nturns some collections into iterators using the [`.into_iter()`][intoiter] method.\n\n```rust,editable\nstruct Fibonacci {\n    curr: u32,\n    next: u32,\n}\n\n// Implement `Iterator` for `Fibonacci`.\n// The `Iterator` trait only requires a method to be defined for the `next` element,\n// and an `associated type` to declare the return type of the iterator.\nimpl Iterator for Fibonacci {\n    // We can refer to this type using Self::Item\n    type Item = u32;\n\n    // Here, we define the sequence using `.curr` and `.next`.\n    // The return type is `Option<T>`:\n    //     * When the `Iterator` is finished, `None` is returned.\n    //     * Otherwise, the next value is wrapped in `Some` and returned.\n    // We use Self::Item in the return type, so we can change\n    // the type without having to update the function signatures.\n    fn next(&mut self) -> Option<Self::Item> {\n        let current = self.curr;\n\n        self.curr = self.next;\n        self.next = current + self.next;\n\n        // Since there's no endpoint to a Fibonacci sequence, the `Iterator`\n        // will never return `None`, and `Some` is always returned.\n        Some(current)\n    }\n}\n\n// Returns a Fibonacci sequence generator\nfn fibonacci() -> Fibonacci {\n    Fibonacci { curr: 0, next: 1 }\n}\n\nfn main() {\n    // `0..3` is an `Iterator` that generates: 0, 1, and 2.\n    let mut sequence = 0..3;\n\n    println!(\"Four consecutive `next` calls on 0..3\");\n    println!(\"> {:?}\", sequence.next());\n    println!(\"> {:?}\", sequence.next());\n    println!(\"> {:?}\", sequence.next());\n    println!(\"> {:?}\", sequence.next());\n\n    // `for` works through an `Iterator` until it returns `None`.\n    // Each `Some` value is unwrapped and bound to a variable (here, `i`).\n    println!(\"Iterate through 0..3 using `for`\");\n    for i in 0..3 {\n        println!(\"> {}\", i);\n    }\n\n    // The `take(n)` method reduces an `Iterator` to its first `n` terms.\n    println!(\"The first four terms of the Fibonacci sequence are: \");\n    for i in fibonacci().take(4) {\n        println!(\"> {}\", i);\n    }\n\n    // The `skip(n)` method shortens an `Iterator` by dropping its first `n` terms.\n    println!(\"The next four terms of the Fibonacci sequence are: \");\n    for i in fibonacci().skip(4).take(4) {\n        println!(\"> {}\", i);\n    }\n\n    let array = [1u32, 3, 3, 7];\n\n    // The `iter` method produces an `Iterator` over an array/slice.\n    println!(\"Iterate the following array {:?}\", &array);\n    for i in array.iter() {\n        println!(\"> {}\", i);\n    }\n}\n```\n\n[intoiter]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html\n[iter]: https://doc.rust-lang.org/core/iter/trait.Iterator.html\n"
  },
  {
    "path": "src/trait/ops.md",
    "content": "# Operator Overloading\n\nIn Rust, many of the operators can be overloaded via traits. That is, some operators can\nbe used to accomplish different tasks based on their input arguments. This is possible\nbecause operators are syntactic sugar for method calls. For example, the `+` operator in\n`a + b` calls the `add` method (as in `a.add(b)`). This `add` method is part of the `Add`\ntrait. Hence, the `+` operator can be used by any implementor of the `Add` trait.\n\nA list of the traits, such as `Add`, that overload operators can be found in [`core::ops`][ops].\n\n```rust,editable\nuse std::ops;\n\nstruct Foo;\nstruct Bar;\n\n#[derive(Debug)]\nstruct FooBar;\n\n#[derive(Debug)]\nstruct BarFoo;\n\n// The `std::ops::Add` trait is used to specify the functionality of `+`.\n// Here, we make `Add<Bar>` - the trait for addition with a RHS of type `Bar`.\n// The following block implements the operation: Foo + Bar = FooBar\nimpl ops::Add<Bar> for Foo {\n    type Output = FooBar;\n\n    fn add(self, _rhs: Bar) -> FooBar {\n        println!(\"> Foo.add(Bar) was called\");\n\n        FooBar\n    }\n}\n\n// By reversing the types, we end up implementing non-commutative addition.\n// Here, we make `Add<Foo>` - the trait for addition with a RHS of type `Foo`.\n// This block implements the operation: Bar + Foo = BarFoo\nimpl ops::Add<Foo> for Bar {\n    type Output = BarFoo;\n\n    fn add(self, _rhs: Foo) -> BarFoo {\n        println!(\"> Bar.add(Foo) was called\");\n\n        BarFoo\n    }\n}\n\nfn main() {\n    println!(\"Foo + Bar = {:?}\", Foo + Bar);\n    println!(\"Bar + Foo = {:?}\", Bar + Foo);\n}\n```\n\n### See Also\n\n[Add][add], [Syntax Index][syntax]\n\n[add]: https://doc.rust-lang.org/core/ops/trait.Add.html\n[ops]: https://doc.rust-lang.org/core/ops/\n[syntax]:https://doc.rust-lang.org/book/appendix-02-operators.html\n"
  },
  {
    "path": "src/trait/supertraits.md",
    "content": "# Supertraits\n\nRust doesn't have \"inheritance\", but you can define a trait as being a superset\nof another trait. For example:\n\n```rust,editable\ntrait Person {\n    fn name(&self) -> String;\n}\n\n// Person is a supertrait of Student.\n// Implementing Student requires you to also impl Person.\ntrait Student: Person {\n    fn university(&self) -> String;\n}\n\ntrait Programmer {\n    fn fav_language(&self) -> String;\n}\n\n// CompSciStudent (computer science student) is a subtrait of both Programmer\n// and Student. Implementing CompSciStudent requires you to impl both supertraits.\ntrait CompSciStudent: Programmer + Student {\n    fn git_username(&self) -> String;\n}\n\nfn comp_sci_student_greeting(student: &dyn CompSciStudent) -> String {\n    format!(\n        \"My name is {} and I attend {}. My favorite language is {}. My Git username is {}\",\n        student.name(),\n        student.university(),\n        student.fav_language(),\n        student.git_username()\n    )\n}\n\nstruct CSStudent {\n    name: String,\n    university: String,\n    fav_language: String,\n    git_username: String\n}\n\nimpl Programmer for CSStudent {\n    fn fav_language(&self) -> String {\n        self.fav_language.clone()\n    }\n}\n\nimpl Student for CSStudent {\n    fn university(&self) -> String {\n        self.university.clone()\n    }\n}\n\nimpl Person for CSStudent {\n    fn name(&self) -> String {\n        self.name.clone()\n    }\n}\n\nimpl CompSciStudent for CSStudent {\n    fn git_username(&self) -> String {\n        self.git_username.clone()\n    }\n}\n\nfn main() {\n    let student = CSStudent {\n        name: String::from(\"Alice\"),\n        university: String::from(\"MIT\"),\n        fav_language: String::from(\"Rust\"),\n        git_username: String::from(\"alice_codes\"),\n    };\n\n    let greeting = comp_sci_student_greeting(&student);\n    println!(\"{}\", greeting);\n}\n```\n\n### See also:\n\n[The Rust Programming Language chapter on supertraits][trpl_supertraits]\n\n[trpl_supertraits]: https://doc.rust-lang.org/book/ch19-03-advanced-traits.html#using-supertraits-to-require-one-traits-functionality-within-another-trait\n"
  },
  {
    "path": "src/trait.md",
    "content": "# Traits\n\nA `trait` is a collection of methods defined for an unknown type:\n`Self`. They can access other methods declared in the same trait.\n\nTraits can be implemented for any data type. In the example below,\nwe define `Animal`, a group of methods. The `Animal` `trait` is\nthen implemented for the `Sheep` data type, allowing the use of\nmethods from `Animal` with a `Sheep`.\n\n```rust,editable\nstruct Sheep { naked: bool, name: &'static str }\n\ntrait Animal {\n    // Associated function signature; `Self` refers to the implementor type.\n    fn new(name: &'static str) -> Self;\n\n    // Method signatures; these will return a string.\n    fn name(&self) -> &'static str;\n    fn noise(&self) -> &'static str;\n\n    // Traits can provide default method definitions.\n    fn talk(&self) {\n        println!(\"{} says {}\", self.name(), self.noise());\n    }\n}\n\nimpl Sheep {\n    fn is_naked(&self) -> bool {\n        self.naked\n    }\n\n    fn shear(&mut self) {\n        if self.is_naked() {\n            // Implementor methods can use the implementor's trait methods.\n            println!(\"{} is already naked...\", self.name());\n        } else {\n            println!(\"{} gets a haircut!\", self.name);\n\n            self.naked = true;\n        }\n    }\n}\n\n// Implement the `Animal` trait for `Sheep`.\nimpl Animal for Sheep {\n    // `Self` is the implementor type: `Sheep`.\n    fn new(name: &'static str) -> Sheep {\n        Sheep { name: name, naked: false }\n    }\n\n    fn name(&self) -> &'static str {\n        self.name\n    }\n\n    fn noise(&self) -> &'static str {\n        if self.is_naked() {\n            \"baaaaah?\"\n        } else {\n            \"baaaaah!\"\n        }\n    }\n\n    // Default trait methods can be overridden.\n    fn talk(&self) {\n        // For example, we can add some quiet contemplation.\n        println!(\"{} pauses briefly... {}\", self.name, self.noise());\n    }\n}\n\nfn main() {\n    // Type annotation is necessary in this case.\n    let mut dolly: Sheep = Animal::new(\"Dolly\");\n    // TODO ^ Try removing the type annotations.\n\n    dolly.talk();\n    dolly.shear();\n    dolly.talk();\n}\n```\n"
  },
  {
    "path": "src/types/alias.md",
    "content": "# Aliasing\n\nThe `type` statement can be used to give a new name to an existing type. Types\nmust have `UpperCamelCase` names, or the compiler will raise a warning. The\nexception to this rule are the primitive types: `usize`, `f32`, etc.\n\n```rust,editable\n// `NanoSecond`, `Inch`, and `U64` are new names for `u64`.\ntype NanoSecond = u64;\ntype Inch = u64;\ntype U64 = u64;\n\nfn main() {\n    // `NanoSecond` = `Inch` = `U64` = `u64`.\n    let nanoseconds: NanoSecond = 5 as u64;\n    let inches: Inch = 2 as U64;\n\n    // Note that type aliases *don't* provide any extra type safety, because\n    // aliases are *not* new types\n    println!(\"{} nanoseconds + {} inches = {} unit?\",\n             nanoseconds,\n             inches,\n             nanoseconds + inches);\n}\n```\n\nThe main use of aliases is to reduce boilerplate; for example the `io::Result<T>` type\nis an alias for the `Result<T, io::Error>` type.\n\n### See also:\n\n[Attributes](../attribute.md)\n"
  },
  {
    "path": "src/types/cast.md",
    "content": "# Casting\n\nRust provides no implicit type conversion (coercion) between primitive types.\nBut, explicit type conversion (casting) can be performed using the `as` keyword.\n\nRules for converting between integral types follow C conventions generally,\nexcept in cases where C has undefined behavior. The behavior of all casts\nbetween integral types is well defined in Rust.\n\n```rust,editable,ignore,mdbook-runnable\n// Suppress all errors from casts which overflow.\n#![allow(overflowing_literals)]\n\nfn main() {\n    let decimal = 65.4321_f32;\n\n    // Error! No implicit conversion\n    let integer: u8 = decimal;\n    // FIXME ^ Comment out this line\n\n    // Explicit conversion\n    let integer = decimal as u8;\n    let character = integer as char;\n\n    // Error! There are limitations in conversion rules.\n    // A float cannot be directly converted to a char.\n    let character = decimal as char;\n    // FIXME ^ Comment out this line\n\n    println!(\"Casting: {} -> {} -> {}\", decimal, integer, character);\n\n    // when casting any value to an unsigned type, T,\n    // T::MAX + 1 is added or subtracted until the value\n    // fits into the new type ONLY when the #![allow(overflowing_literals)]\n    // lint is specified like above. Otherwise there will be a compiler error.\n\n    // 1000 already fits in a u16\n    println!(\"1000 as a u16 is: {}\", 1000 as u16);\n\n    // 1000 - 256 - 256 - 256 = 232\n    // Under the hood, the first 8 least significant bits (LSB) are kept,\n    // while the rest towards the most significant bit (MSB) get truncated.\n    println!(\"1000 as a u8 is : {}\", 1000 as u8);\n    // -1 + 256 = 255\n    println!(\"  -1 as a u8 is : {}\", (-1i8) as u8);\n\n    // For positive numbers, this is the same as the modulus\n    println!(\"1000 mod 256 is : {}\", 1000 % 256);\n\n    // When casting to a signed type, the (bitwise) result is the same as\n    // first casting to the corresponding unsigned type. If the most significant\n    // bit of that value is 1, then the value is negative.\n\n    // Unless it already fits, of course.\n    println!(\" 128 as a i16 is: {}\", 128 as i16);\n\n    // In boundary case 128 value in 8-bit two's complement representation is -128\n    println!(\" 128 as a i8 is : {}\", 128 as i8);\n\n    // repeating the example above\n    // 1000 as u8 -> 232\n    println!(\"1000 as a u8 is : {}\", 1000 as u8);\n    // and the value of 232 in 8-bit two's complement representation is -24\n    println!(\" 232 as a i8 is : {}\", 232 as i8);\n\n    // Since Rust 1.45, the `as` keyword performs a *saturating cast*\n    // when casting from float to int. If the floating point value exceeds\n    // the upper bound or is less than the lower bound, the returned value\n    // will be equal to the bound crossed.\n\n    // 300.0 as u8 is 255\n    println!(\" 300.0 as u8 is : {}\", 300.0_f32 as u8);\n    // -100.0 as u8 is 0\n    println!(\"-100.0 as u8 is : {}\", -100.0_f32 as u8);\n    // nan as u8 is 0\n    println!(\"   nan as u8 is : {}\", f32::NAN as u8);\n\n    // This behavior incurs a small runtime cost and can be avoided\n    // with unsafe methods, however the results might overflow and\n    // return **unsound values**. Use these methods wisely:\n    unsafe {\n        // 300.0 as u8 is 44\n        println!(\" 300.0 as u8 is : {}\", 300.0_f32.to_int_unchecked::<u8>());\n        // -100.0 as u8 is 156\n        println!(\"-100.0 as u8 is : {}\", (-100.0_f32).to_int_unchecked::<u8>());\n        // nan as u8 is 0\n        println!(\"   nan as u8 is : {}\", f32::NAN.to_int_unchecked::<u8>());\n    }\n}\n```\n"
  },
  {
    "path": "src/types/inference.md",
    "content": "# Inference\n\nThe type inference engine is pretty smart. It does more than looking at the\ntype of the value expression\nduring an initialization. It also looks at how the variable is used afterwards\nto infer its type. Here's an advanced example of type inference:\n\n```rust,editable\nfn main() {\n    // Because of the annotation, the compiler knows that `elem` has type u8.\n    let elem = 5u8;\n\n    // Create an empty vector (a growable array).\n    let mut vec = Vec::new();\n    // At this point the compiler doesn't know the exact type of `vec`, it\n    // just knows that it's a vector of something (`Vec<_>`).\n\n    // Insert `elem` in the vector.\n    vec.push(elem);\n    // Aha! Now the compiler knows that `vec` is a vector of `u8`s (`Vec<u8>`)\n    // TODO ^ Try commenting out the `vec.push(elem)` line\n\n    println!(\"{:?}\", vec);\n}\n```\n\nNo type annotation of variables was needed, the compiler is happy and so is the\nprogrammer!\n"
  },
  {
    "path": "src/types/literals.md",
    "content": "# Literals\n\nNumeric literals can be type annotated by adding the type as a suffix. As an example,\nto specify that the literal `42` should have the type `i32`, write `42i32`.\n\nThe type of unsuffixed numeric literals will depend on how they are used. If no\nconstraint exists, the compiler will use `i32` for integers, and `f64` for\nfloating-point numbers.\n\n```rust,editable\nfn main() {\n    // Suffixed literals, their types are known at initialization\n    let x = 1u8;\n    let y = 2u32;\n    let z = 3f32;\n\n    // Unsuffixed literals, their types depend on how they are used\n    let i = 1;\n    let f = 1.0;\n\n    // `size_of_val` returns the size of a variable in bytes\n    println!(\"size of `x` in bytes: {}\", std::mem::size_of_val(&x));\n    println!(\"size of `y` in bytes: {}\", std::mem::size_of_val(&y));\n    println!(\"size of `z` in bytes: {}\", std::mem::size_of_val(&z));\n    println!(\"size of `i` in bytes: {}\", std::mem::size_of_val(&i));\n    println!(\"size of `f` in bytes: {}\", std::mem::size_of_val(&f));\n}\n```\n\nThere are some concepts used in the previous code that haven't been explained\nyet, here's a brief explanation for the impatient readers:\n\n* `std::mem::size_of_val` is a function, but called with its *full path*. Code\n  can be split in logical units called *modules*. In this case, the\n  `size_of_val` function is defined in the `mem` module, and the `mem` module\n  is defined in the `std` *crate*. For more details, see\n  [modules][mod] and [crates][crate].\n\n[mod]: ../mod.md\n[crate]: ../crates.md\n"
  },
  {
    "path": "src/types.md",
    "content": "# Types\n\nRust provides several mechanisms to change or define the type of primitive and\nuser defined types. The following sections cover:\n\n* [Casting] between primitive types\n* Specifying the desired type of [literals]\n* Using [type inference]\n* [Aliasing] types\n\n[Casting]: types/cast.md\n[literals]: types/literals.md\n[type inference]: types/inference.md\n[Aliasing]: types/alias.md\n"
  },
  {
    "path": "src/unsafe/asm.md",
    "content": "# Inline assembly\n\nRust provides support for inline assembly via the `asm!` macro.\nIt can be used to embed handwritten assembly in the assembly output generated by the compiler.\nGenerally this should not be necessary, but might be where the required performance or timing\ncannot be otherwise achieved. Accessing low level hardware primitives, e.g. in kernel code, may also demand this functionality.\n\n> **Note**: the examples here are given in x86/x86-64 assembly, but other architectures are also supported.\n\nInline assembly is currently supported on the following architectures:\n\n- x86 and x86-64\n- ARM\n- AArch64\n- RISC-V\n\n## Basic usage\n\nLet us start with the simplest possible example:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nunsafe {\n    asm!(\"nop\");\n}\n# }\n```\n\nThis will insert a NOP (no operation) instruction into the assembly generated by the compiler.\nNote that all `asm!` invocations have to be inside an `unsafe` block, as they could insert\narbitrary instructions and break various invariants. The instructions to be inserted are listed\nin the first argument of the `asm!` macro as a string literal.\n\n## Inputs and outputs\n\nNow inserting an instruction that does nothing is rather boring. Let us do something that\nactually acts on data:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet x: u64;\nunsafe {\n    asm!(\"mov {}, 5\", out(reg) x);\n}\nassert_eq!(x, 5);\n# }\n```\n\nThis will write the value `5` into the `u64` variable `x`.\nYou can see that the string literal we use to specify instructions is actually a template string.\nIt is governed by the same rules as Rust [format strings][format-syntax].\nThe arguments that are inserted into the template however look a bit different than you may\nbe familiar with. First we need to specify if the variable is an input or an output of the\ninline assembly. In this case it is an output. We declared this by writing `out`.\nWe also need to specify in what kind of register the assembly expects the variable.\nIn this case we put it in an arbitrary general purpose register by specifying `reg`.\nThe compiler will choose an appropriate register to insert into\nthe template and will read the variable from there after the inline assembly finishes executing.\n\n[format-syntax]: https://doc.rust-lang.org/std/fmt/#syntax\n\nLet us see another example that also uses an input:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet i: u64 = 3;\nlet o: u64;\nunsafe {\n    asm!(\n        \"mov {0}, {1}\",\n        \"add {0}, 5\",\n        out(reg) o,\n        in(reg) i,\n    );\n}\nassert_eq!(o, 8);\n# }\n```\n\nThis will add `5` to the input in variable `i` and write the result to variable `o`.\nThe particular way this assembly does this is first copying the value from `i` to the output,\nand then adding `5` to it.\n\nThe example shows a few things:\n\nFirst, we can see that `asm!` allows multiple template string arguments; each\none is treated as a separate line of assembly code, as if they were all joined\ntogether with newlines between them. This makes it easy to format assembly\ncode.\n\nSecond, we can see that inputs are declared by writing `in` instead of `out`.\n\nThird, we can see that we can specify an argument number, or name as in any format string.\nFor inline assembly templates this is particularly useful as arguments are often used more than once.\nFor more complex inline assembly using this facility is generally recommended, as it improves\nreadability, and allows reordering instructions without changing the argument order.\n\nWe can further refine the above example to avoid the `mov` instruction:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet mut x: u64 = 3;\nunsafe {\n    asm!(\"add {0}, 5\", inout(reg) x);\n}\nassert_eq!(x, 8);\n# }\n```\n\nWe can see that `inout` is used to specify an argument that is both input and output.\nThis is different from specifying an input and output separately in that it is guaranteed to assign both to the same register.\n\nIt is also possible to specify different variables for the input and output parts of an `inout` operand:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet x: u64 = 3;\nlet y: u64;\nunsafe {\n    asm!(\"add {0}, 5\", inout(reg) x => y);\n}\nassert_eq!(y, 8);\n# }\n```\n\n## Late output operands\n\nThe Rust compiler is conservative with its allocation of operands. It is assumed that an `out`\ncan be written at any time, and can therefore not share its location with any other argument.\nHowever, to guarantee optimal performance it is important to use as few registers as possible,\nso they won't have to be saved and reloaded around the inline assembly block.\nTo achieve this Rust provides a `lateout` specifier. This can be used on any output that is\nwritten only after all inputs have been consumed. There is also an `inlateout` variant of this\nspecifier.\n\nHere is an example where `inlateout` *cannot* be used in `release` mode or other optimized cases:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet mut a: u64 = 4;\nlet b: u64 = 4;\nlet c: u64 = 4;\nunsafe {\n    asm!(\n        \"add {0}, {1}\",\n        \"add {0}, {2}\",\n        inout(reg) a,\n        in(reg) b,\n        in(reg) c,\n    );\n}\nassert_eq!(a, 12);\n# }\n```\n\nIn unoptimized cases (e.g. `Debug` mode), replacing `inout(reg) a` with `inlateout(reg) a` in the\nabove example can continue to give the expected result. However, with `release` mode or other\noptimized cases, using `inlateout(reg) a` can instead lead to the final value `a = 16`, causing the\nassertion to fail.\n\nThis is because in optimized cases, the compiler is free to allocate the same register for inputs\n`b` and `c` since it knows that they have the same value. Furthermore, when `inlateout` is used, `a`\nand `c` could be allocated to the same register, in which case the first `add` instruction would\noverwrite the initial load from variable `c`. This is in contrast to how using `inout(reg) a`\nensures a separate register is allocated for `a`.\n\nHowever, the following example can use `inlateout` since the output is only modified after all input\nregisters have been read:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet mut a: u64 = 4;\nlet b: u64 = 4;\nunsafe {\n    asm!(\"add {0}, {1}\", inlateout(reg) a, in(reg) b);\n}\nassert_eq!(a, 8);\n# }\n```\n\nAs you can see, this assembly fragment will still work correctly if `a` and `b` are assigned to the same register.\n\n## Explicit register operands\n\nSome instructions require that the operands be in a specific register.\nTherefore, Rust inline assembly provides some more specific constraint specifiers.\nWhile `reg` is generally available on any architecture, explicit registers are highly architecture specific. E.g. for x86 the general purpose registers `eax`, `ebx`, `ecx`, `edx`, `ebp`, `esi`, and `edi` among others can be addressed by their name.\n\n```rust,no_run\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet cmd = 0xd1;\nunsafe {\n    asm!(\"out 0x64, eax\", in(\"eax\") cmd);\n}\n# }\n```\n\nIn this example we call the `out` instruction to output the content of the `cmd` variable to port `0x64`. Since the `out` instruction only accepts `eax` (and its sub registers) as operand we had to use the `eax` constraint specifier.\n\n> **Note**: unlike other operand types, explicit register operands cannot be used in the template string: you can't use `{}` and should write the register name directly instead. Also, they must appear at the end of the operand list after all other operand types.\n\nConsider this example which uses the x86 `mul` instruction:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nfn mul(a: u64, b: u64) -> u128 {\n    let lo: u64;\n    let hi: u64;\n\n    unsafe {\n        asm!(\n            // The x86 mul instruction takes rax as an implicit input and writes\n            // the 128-bit result of the multiplication to rax:rdx.\n            \"mul {}\",\n            in(reg) a,\n            inlateout(\"rax\") b => lo,\n            lateout(\"rdx\") hi\n        );\n    }\n\n    ((hi as u128) << 64) + lo as u128\n}\n# }\n```\n\nThis uses the `mul` instruction to multiply two 64-bit inputs with a 128-bit result.\nThe only explicit operand is a register, that we fill from the variable `a`.\nThe second operand is implicit, and must be the `rax` register, which we fill from the variable `b`.\nThe lower 64 bits of the result are stored in `rax` from which we fill the variable `lo`.\nThe higher 64 bits are stored in `rdx` from which we fill the variable `hi`.\n\n## Clobbered registers\n\nIn many cases inline assembly will modify state that is not needed as an output.\nUsually this is either because we have to use a scratch register in the assembly or because instructions modify state that we don't need to further examine.\nThis state is generally referred to as being \"clobbered\".\nWe need to tell the compiler about this since it may need to save and restore this state around the inline assembly block.\n\n```rust\nuse std::arch::asm;\n\n# #[cfg(target_arch = \"x86_64\")]\nfn main() {\n    // three entries of four bytes each\n    let mut name_buf = [0_u8; 12];\n    // String is stored as ascii in ebx, edx, ecx in order\n    // Because ebx is reserved, the asm needs to preserve the value of it.\n    // So we push and pop it around the main asm.\n    // 64 bit mode on 64 bit processors does not allow pushing/popping of\n    // 32 bit registers (like ebx), so we have to use the extended rbx register instead.\n\n    unsafe {\n        asm!(\n            \"push rbx\",\n            \"cpuid\",\n            \"mov [rdi], ebx\",\n            \"mov [rdi + 4], edx\",\n            \"mov [rdi + 8], ecx\",\n            \"pop rbx\",\n            // We use a pointer to an array for storing the values to simplify\n            // the Rust code at the cost of a couple more asm instructions\n            // This is more explicit with how the asm works however, as opposed\n            // to explicit register outputs such as `out(\"ecx\") val`\n            // The *pointer itself* is only an input even though it's written behind\n            in(\"rdi\") name_buf.as_mut_ptr(),\n            // select cpuid 0, also specify eax as clobbered\n            inout(\"eax\") 0 => _,\n            // cpuid clobbers these registers too\n            out(\"ecx\") _,\n            out(\"edx\") _,\n        );\n    }\n\n    let name = core::str::from_utf8(&name_buf).unwrap();\n    println!(\"CPU Manufacturer ID: {}\", name);\n}\n\n# #[cfg(not(target_arch = \"x86_64\"))]\n# fn main() {}\n```\n\nIn the example above we use the `cpuid` instruction to read the CPU manufacturer ID.\nThis instruction writes to `eax` with the maximum supported `cpuid` argument and `ebx`, `edx`, and `ecx` with the CPU manufacturer ID as ASCII bytes in that order.\n\nEven though `eax` is never read we still need to tell the compiler that the register has been modified so that the compiler can save any values that were in these registers before the asm. This is done by declaring it as an output but with `_` instead of a variable name, which indicates that the output value is to be discarded.\n\nThis code also works around the limitation that `ebx` is a reserved register by LLVM. That means that LLVM assumes that it has full control over the register and it must be restored to its original state before exiting the asm block, so it cannot be used as an input or output **except** if the compiler uses it to fulfill a general register class (e.g. `in(reg)`). This makes `reg` operands dangerous when using reserved registers as we could unknowingly corrupt our input or output because they share the same register.\n\nTo work around this we use `rdi` to store the pointer to the output array, save `ebx` via `push`, read from `ebx` inside the asm block into the array and then restore `ebx` to its original state via `pop`. The `push` and `pop` use the full 64-bit `rbx` version of the register to ensure that the entire register is saved. On 32 bit targets the code would instead use `ebx` in the `push`/`pop`.\n\nThis can also be used with a general register class to obtain a scratch register for use inside the asm code:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\n// Multiply x by 6 using shifts and adds\nlet mut x: u64 = 4;\nunsafe {\n    asm!(\n        \"mov {tmp}, {x}\",\n        \"shl {tmp}, 1\",\n        \"shl {x}, 2\",\n        \"add {x}, {tmp}\",\n        x = inout(reg) x,\n        tmp = out(reg) _,\n    );\n}\nassert_eq!(x, 4 * 6);\n# }\n```\n\n## Symbol operands and ABI clobbers\n\nBy default, `asm!` assumes that any register not specified as an output will have its contents preserved by the assembly code. The [`clobber_abi`] argument to `asm!` tells the compiler to automatically insert the necessary clobber operands according to the given calling convention ABI: any register which is not fully preserved in that ABI will be treated as clobbered.  Multiple `clobber_abi` arguments may be provided and all clobbers from all specified ABIs will be inserted.\n\n[`clobber_abi`]: https://doc.rust-lang.org/stable/reference/inline-assembly.html#abi-clobbers\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nextern \"C\" fn foo(arg: i32) -> i32 {\n    println!(\"arg = {}\", arg);\n    arg * 2\n}\n\nfn call_foo(arg: i32) -> i32 {\n    unsafe {\n        let result;\n        asm!(\n            \"call {}\",\n            // Function pointer to call\n            in(reg) foo,\n            // 1st argument in rdi\n            in(\"rdi\") arg,\n            // Return value in rax\n            out(\"rax\") result,\n            // Mark all registers which are not preserved by the \"C\" calling\n            // convention as clobbered.\n            clobber_abi(\"C\"),\n        );\n        result\n    }\n}\n# }\n```\n\n## Register template modifiers\n\nIn some cases, fine control is needed over the way a register name is formatted when inserted into the template string. This is needed when an architecture's assembly language has several names for the same register, each typically being a \"view\" over a subset of the register (e.g. the low 32 bits of a 64-bit register).\n\nBy default the compiler will always choose the name that refers to the full register size (e.g. `rax` on x86-64, `eax` on x86, etc).\n\nThis default can be overridden by using modifiers on the template string operands, just like you would with format strings:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet mut x: u16 = 0xab;\n\nunsafe {\n    asm!(\"mov {0:h}, {0:l}\", inout(reg_abcd) x);\n}\n\nassert_eq!(x, 0xabab);\n# }\n```\n\nIn this example, we use the `reg_abcd` register class to restrict the register allocator to the 4 legacy x86 registers (`ax`, `bx`, `cx`, `dx`) of which the first two bytes can be addressed independently.\n\nLet us assume that the register allocator has chosen to allocate `x` in the `ax` register.\nThe `h` modifier will emit the register name for the high byte of that register and the `l` modifier will emit the register name for the low byte. The asm code will therefore be expanded as `mov ah, al` which copies the low byte of the value into the high byte.\n\nIf you use a smaller data type (e.g. `u16`) with an operand and forget to use template modifiers, the compiler will emit a warning and suggest the correct modifier to use.\n\n## Memory address operands\n\nSometimes assembly instructions require operands passed via memory addresses/memory locations.\nYou have to manually use the memory address syntax specified by the target architecture.\nFor example, on x86/x86_64 using Intel assembly syntax, you should wrap inputs/outputs in `[]` to indicate they are memory operands:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nfn load_fpu_control_word(control: u16) {\n    unsafe {\n        asm!(\"fldcw [{}]\", in(reg) &control, options(nostack));\n    }\n}\n# }\n```\n\n## Labels\n\nAny reuse of a named label, local or otherwise, can result in an assembler or linker error or may cause other strange behavior. Reuse of a named label can happen in a variety of ways including:\n\n- explicitly: using a label more than once in one `asm!` block, or multiple times across blocks.\n- implicitly via inlining: the compiler is allowed to instantiate multiple copies of an `asm!` block, for example when the function containing it is inlined in multiple places.\n- implicitly via LTO: LTO can cause code from *other crates* to be placed in the same codegen unit, and so could bring in arbitrary labels.\n\nAs a consequence, you should only use GNU assembler **numeric** [local labels] inside inline assembly code. Defining symbols in assembly code may lead to assembler and/or linker errors due to duplicate symbol definitions.\n\nMoreover, on x86 when using the default Intel syntax, due to [an LLVM bug], you shouldn't use labels exclusively made of `0` and `1` digits, e.g. `0`, `11` or `101010`, as they may end up being interpreted as binary values. Using `options(att_syntax)` will avoid any ambiguity, but that affects the syntax of the *entire* `asm!` block. (See [Options](#options), below, for more on `options`.)\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet mut a = 0;\nunsafe {\n    asm!(\n        \"mov {0}, 10\",\n        \"2:\",\n        \"sub {0}, 1\",\n        \"cmp {0}, 3\",\n        \"jle 2f\",\n        \"jmp 2b\",\n        \"2:\",\n        \"add {0}, 2\",\n        out(reg) a\n    );\n}\nassert_eq!(a, 5);\n# }\n```\n\nThis will decrement the `{0}` register value from 10 to 3, then add 2 and store it in `a`.\n\nThis example shows a few things:\n\n- First, that the same number can be used as a label multiple times in the same inline block.\n- Second, that when a numeric label is used as a reference (as an instruction operand, for example), the suffixes “b” (“backward”) or ”f” (“forward”) should be added to the numeric label. It will then refer to the nearest label defined by this number in this direction.\n\n[local labels]: https://sourceware.org/binutils/docs/as/Symbol-Names.html#Local-Labels\n[an LLVM bug]: https://bugs.llvm.org/show_bug.cgi?id=36144\n\n## Options {#options}\n\nBy default, an inline assembly block is treated the same way as an external FFI function call with a custom calling convention: it may read/write memory, have observable side effects, etc. However, in many cases it is desirable to give the compiler more information about what the assembly code is actually doing so that it can optimize better.\n\nLet's take our previous example of an `add` instruction:\n\n```rust\n# #[cfg(target_arch = \"x86_64\")] {\nuse std::arch::asm;\n\nlet mut a: u64 = 4;\nlet b: u64 = 4;\nunsafe {\n    asm!(\n        \"add {0}, {1}\",\n        inlateout(reg) a, in(reg) b,\n        options(pure, nomem, nostack),\n    );\n}\nassert_eq!(a, 8);\n# }\n```\n\nOptions can be provided as an optional final argument to the `asm!` macro. We specified three options here:\n\n- `pure` means that the asm code has no observable side effects and that its output depends only on its inputs. This allows the compiler optimizer to call the inline asm fewer times or even eliminate it entirely.\n- `nomem` means that the asm code does not read or write to memory. By default the compiler will assume that inline assembly can read or write any memory address that is accessible to it (e.g. through a pointer passed as an operand, or a global).\n- `nostack` means that the asm code does not push any data onto the stack. This allows the compiler to use optimizations such as the stack red zone on x86-64 to avoid stack pointer adjustments.\n\nThese allow the compiler to better optimize code using `asm!`, for example by eliminating pure `asm!` blocks whose outputs are not needed.\n\nSee the [reference](https://doc.rust-lang.org/stable/reference/inline-assembly.html) for the full list of available options and their effects.\n"
  },
  {
    "path": "src/unsafe.md",
    "content": "# Unsafe Operations\n\nAs an introduction to this section, to borrow from [the official docs][unsafe],\n\"one should try to minimize the amount of unsafe code in a code base.\" With that\nin mind, let's get started! Unsafe annotations in Rust are used to bypass\nprotections put in place by the compiler; specifically, there are four primary\nthings that unsafe is used for:\n\n* dereferencing raw pointers\n* calling functions or methods which are `unsafe` (including calling a function\n  over FFI, see [a previous chapter](std_misc/ffi.md) of the book)\n* accessing or modifying static mutable variables\n* implementing unsafe traits\n\n### Raw Pointers\n\nRaw pointers `*` and references `&T` function similarly, but references are\nalways safe because they are guaranteed to point to valid data due to the\nborrow checker. Dereferencing a raw pointer can only be done through an unsafe\nblock.\n\n```rust,editable\nfn main() {\n    let raw_p: *const u32 = &10;\n\n    unsafe {\n        assert!(*raw_p == 10);\n    }\n}\n```\n\n### Calling Unsafe Functions\n\nSome functions can be declared as `unsafe`, meaning it is the programmer's\nresponsibility to ensure correctness instead of the compiler's. One example\nof this is [`std::slice::from_raw_parts`] which will create a slice given a\npointer to the first element and a length.\n\n```rust,editable\nuse std::slice;\n\nfn main() {\n    let some_vector = vec![1, 2, 3, 4];\n\n    let pointer = some_vector.as_ptr();\n    let length = some_vector.len();\n\n    unsafe {\n        let my_slice: &[u32] = slice::from_raw_parts(pointer, length);\n\n        assert_eq!(some_vector.as_slice(), my_slice);\n    }\n}\n```\n\nFor `slice::from_raw_parts`, one of the assumptions which *must* be upheld is\nthat the pointer passed in points to valid memory and that the memory pointed to\nis of the correct type. If these invariants aren't upheld then the program's\nbehaviour is undefined and there is no knowing what will happen.\n\n[unsafe]: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html\n[`std::slice::from_raw_parts`]: https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html\n"
  },
  {
    "path": "src/variable_bindings/declare.md",
    "content": "# Declare first\n\nIt is possible to declare variable bindings first and initialize them later, but all variable bindings must be initialized before they are used: the compiler forbids use of uninitialized variable bindings, as it would lead to undefined behavior.\n\nIt is not common to declare a variable binding and initialize it later in the function.\nIt is more difficult for a reader to find the initialization when initialization is separated from declaration.\nIt is common to declare and initialize a variable binding near where the variable will be used.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    // Declare a variable binding\n    let a_binding;\n\n    {\n        let x = 2;\n\n        // Initialize the binding\n        a_binding = x * x;\n    }\n\n    println!(\"a binding: {}\", a_binding);\n\n    let another_binding;\n\n    // Error! Use of uninitialized binding\n    println!(\"another binding: {}\", another_binding);\n    // FIXME ^ Comment out this line\n\n    another_binding = 1;\n\n    println!(\"another binding: {}\", another_binding);\n}\n```\n\n\n"
  },
  {
    "path": "src/variable_bindings/freeze.md",
    "content": "# Freezing\n\nWhen data is bound by the same name immutably, it also *freezes*. *Frozen* data can't be\nmodified until the immutable binding goes out of scope:\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    let mut _mutable_integer = 7i32;\n\n    {\n        // Shadowing by immutable `_mutable_integer`\n        let _mutable_integer = _mutable_integer;\n\n        // Error! `_mutable_integer` is frozen in this scope\n        _mutable_integer = 50;\n        // FIXME ^ Comment out this line\n\n        // `_mutable_integer` goes out of scope\n    }\n\n    // Ok! `_mutable_integer` is not frozen in this scope\n    _mutable_integer = 3;\n}\n```\n"
  },
  {
    "path": "src/variable_bindings/mut.md",
    "content": "# Mutability\n\nVariable bindings are immutable by default, but this can be overridden using\nthe `mut` modifier.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    let _immutable_binding = 1;\n    let mut mutable_binding = 1;\n\n    println!(\"Before mutation: {}\", mutable_binding);\n\n    // Ok\n    mutable_binding += 1;\n\n    println!(\"After mutation: {}\", mutable_binding);\n\n    // Error! Cannot assign a new value to an immutable variable\n    _immutable_binding += 1;\n}\n```\n\nThe compiler will throw a detailed diagnostic about mutability errors.\n"
  },
  {
    "path": "src/variable_bindings/scope.md",
    "content": "# Scope and Shadowing\n\nVariable bindings have a scope, and are constrained to live in a *block*. A\nblock is a collection of statements enclosed by braces `{}`.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    // This binding lives in the main function\n    let long_lived_binding = 1;\n\n    // This is a block, and has a smaller scope than the main function\n    {\n        // This binding only exists in this block\n        let short_lived_binding = 2;\n\n        println!(\"inner short: {}\", short_lived_binding);\n    }\n    // End of the block\n\n    // Error! `short_lived_binding` doesn't exist in this scope\n    println!(\"outer short: {}\", short_lived_binding);\n    // FIXME ^ Comment out this line\n\n    println!(\"outer long: {}\", long_lived_binding);\n}\n```\n\nAlso, [variable shadowing][variable-shadow] is allowed.\n\n```rust,editable,ignore,mdbook-runnable\nfn main() {\n    let shadowed_binding = 1;\n\n    {\n        println!(\"before being shadowed: {}\", shadowed_binding);\n\n        // This binding *shadows* the outer one\n        let shadowed_binding = \"abc\";\n\n        println!(\"shadowed in inner block: {}\", shadowed_binding);\n    }\n    println!(\"outside inner block: {}\", shadowed_binding);\n\n    // This binding *shadows* the previous binding\n    let shadowed_binding = 2;\n    println!(\"shadowed in outer block: {}\", shadowed_binding);\n}\n```\n\n[variable-shadow]: https://en.wikipedia.org/wiki/Variable_shadowing\n"
  },
  {
    "path": "src/variable_bindings.md",
    "content": "# Variable Bindings\n\nRust provides type safety via static typing. Variable bindings can be type\nannotated when declared. However, in most cases, the compiler will be able\nto infer the type of the variable from the context, heavily reducing the\nannotation burden.\n\nValues (like literals) can be bound to variables, using the `let` binding.\n\n```rust,editable\nfn main() {\n    let an_integer = 1u32;\n    let a_boolean = true;\n    let unit = ();\n\n    // copy `an_integer` into `copied_integer`\n    let copied_integer = an_integer;\n\n    println!(\"An integer: {:?}\", copied_integer);\n    println!(\"A boolean: {:?}\", a_boolean);\n    println!(\"Meet the unit value: {:?}\", unit);\n\n    // The compiler warns about unused variable bindings; these warnings can\n    // be silenced by prefixing the variable name with an underscore\n    let _unused_variable = 3u32;\n\n    let noisy_unused_variable = 2u32;\n    // FIXME ^ Prefix with an underscore to suppress the warning\n    // Please note that warnings may not be shown in a browser\n}\n```\n"
  },
  {
    "path": "theme/css/language-picker.css",
    "content": "#language-list {\n  left: auto;\n  right: 10px;\n}\n\n[dir=\"rtl\"] #language-list {\n  left: 10px;\n  right: auto;\n}\n\n#language-list a {\n  color: inherit;\n}\n"
  },
  {
    "path": "theme/head.hbs",
    "content": "<script>\n    document.addEventListener('DOMContentLoaded', function() {\n        const mdbookPath = \"{{ path }}\";\n        const mdbookPathToRoot = \"{{ path_to_root }}\";\n        const rightButtonsElement = document.querySelector('.right-buttons');\n        rightButtonsElement.insertAdjacentHTML(\"afterbegin\", `\n            <button id=\"language-toggle\" class=\"icon-button\" type=\"button\"\n                    title=\"Change language\" aria-label=\"Change language\"\n                    aria-haspopup=\"true\" aria-expanded=\"false\"\n                    aria-controls=\"language-list\">\n                {{fa \"solid\" \"globe\"}}\n            </button>\n            <ul id=\"language-list\" class=\"theme-popup\" aria-label=\"Languages\" role=\"menu\">\n              <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n                  <a id=\"en\">English</a>\n              </button></li>\n              <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n                  <a id=\"ja\">日本語</a>\n              </button></li>\n              <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n                  <a id=\"zh\">中文</a>\n              </button></li>\n              <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n                  <a id=\"es\">Español</a>\n              </button></li>\n              <li role=\"none\"><button role=\"menuitem\" class=\"theme\">\n                  <a id=\"ko\">한국어</a>\n              </button></li>\n            </ul>\n        `);\n\n        const language = document.documentElement.getAttribute(\"lang\");\n        let langToggle = document.getElementById(\"language-toggle\");\n        let langList = document.getElementById(\"language-list\");\n        langToggle.addEventListener(\"click\", (event) => {\n            langList.style.display =\n                langList.style.display == \"block\" ? \"none\" : \"block\";\n        });\n        let selectedLang = document.getElementById(language);\n        if (selectedLang) {\n            selectedLang.parentNode.classList.add(\"theme-selected\");\n        }\n\n        // The path to the root, taking the current language into account.\n        let full_path_to_root =\n            language == \"en\" ? `${mdbookPathToRoot}` : `${mdbookPathToRoot}../`;\n        // The page path (mdbook only gives us access to the path to the Markdown file).\n        let path = mdbookPath.replace(/\\.md$/, \".html\");\n        const langAnchors = Array.from(langList.querySelectorAll(\"a\"));\n        for (let lang of langAnchors) {\n            if (lang.id == \"en\") {\n                lang.href = `${full_path_to_root}${path}`;\n            } else {\n                lang.href = `${full_path_to_root}${lang.id}/${path}`;\n            }\n        }\n\n        // Hide languages whose target page is not available (e.g., not deployed).\n        // This prevents users from hitting 404s on sites that only ship some locales.\n        for (let lang of langAnchors) {\n            const url = lang.href;\n            // Attempt a lightweight HEAD request; fall back to hiding on failure.\n            fetch(url, { method: \"HEAD\" }).then((resp) => {\n                if (!resp.ok) {\n                    const li = lang.parentNode && lang.parentNode.parentNode;\n                    if (li) li.style.display = \"none\";\n                }\n            }).catch(() => {\n                const li = lang.parentNode && lang.parentNode.parentNode;\n                if (li) li.style.display = \"none\";\n            });\n        }\n    });\n</script>\n"
  },
  {
    "path": "triagebot.toml",
    "content": "[assign]\n\n[assign.owners]\n\"*\" = [\"@marioidival\"]\n"
  }
]